moving water(object) and moving it to bottle (Container)

onimike
Hello all Im new to this but the program makes its pretty simple to operate however I am stuck. I am trying to get water into my bottle and have it be drinkable also deplete as you drink the water from the bottle. I have it where you have to turn on the sink to get the water to run and have the bottle to get the water but I can not add water to bottle and make it drinkable. Please help thanks
Mike

And sorry was gonna upload my game so far but do not know how to do that either lol sorry.

HegemonKhan
[HK Edited: newer version]

you'll probably need to use Sora's Stackable Library (I'm still a long ways from this level, so I can't help much on this code area aspect myself):

(we can help you with how to add in a library to your game)

viewforum.php?f=18 (Library forum)
viewtopic.php?f=18&t=3515 (Sora's Stackable Library)

---------

Note: this is *NOT* based upon using Sora's Stackable library

it is not easy to reply in-using the GUI~Editor, and I'm assuming that you don't know code nor how to work with it yet either, so I'll try to do what I can with the small effort I'm going to put into this for now anyways:

in the GUI~Editor mode (this is what you're using to make your game, is very noob friendly with the buttons, pull down boxes, and etc):

Add a~new script -> (this should have a script called "move object", and hopefully you can figure how to set it up correctly, to move the "water" object to the "bottle" container object)

or, you can look~read below for a more complex~better way to do it:

----

you might also want to add a "max_capacity" onto your bottle (for how much water it can hold):

"bottle" -> Attribute (Tab) -> Attributes -> Add ->

Name: max_capacity
Type: int (integer)
Value: 10

----

you do this where you want it, such as a "fill_bottle" Verb (Tab) for your "facet" object:

"facet" Object -> Verb (Tab) -> Add a~new script ->

if -> player has bottle in inventory
-> if -> facet is turned on (set the facet to be switchable, an option in one of the Tabs for the facet object)
->-> if -> set a variable or attribute -> bottle.water_count_in_bottle < bottle.max_capacity
->->-> Set a variable or attribute -> bottle.water_count_in_bottle = bottle.water_count_in_bottle + 1
->->-> print a message ("you fill the bottle up with water")
->-> else ->
->->-> print message ("Your bottle is full already")
-> else ->
->-> print message ("the facet is not turned on yet!"
else
-> print message ("you don't have a bottle"

and for the "drinkable" part:

"bottle" Object -> Verb -> drink -> add a~new script ->

if -> bottle has~contains~(or if water.parent=bottle) water,
-> if -> Set a variable or attribute -> bottle.water_count_in_bottle > 0
->-> Set a variable or attribute -> bottle.water_count_in_bottle = bottle.water_count_in_bottle - 1
->-> print a message ("you drink the water from the bottle")
-> else ->
->-> print a message ("you tilt the bottle up but not even a single drop of water drops into your mouth.")
else ->
-> print a message ("you only want~need to drink water, and there's no water in your bottle.")

---------------------

P.S.

you can just attach your game file (your_game_name.aslx) to the post, for us to look at,

or you can post the game code, which can be viewed~opened two ways:

1. simply open up your game file in notepad, wordpad, or notepad++, highlight all, copy, and paste it here.

or

2. click on your game file normally, and in the GUI~Editor, at the top of the screen is a notepaper like button between the "play" and "?" (help) buttons. this is a toggle button, for going back and forth between GUI~Editor mode and Code View mode. Once in code view mode: highlight it, copy, and paste it here.

Also, to post code here, you use this format:

[code.] (your pasted code) [/code.]

but without the dots in it, and it should look like this (but with more code in it, lol):

<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>


P.S.S.

also, if you haven't already, going through the tutorial is extremely useful to get the basics of using quest:

http://quest5.net/wiki/Tutorial

P.S.S.S.

usually it is better to use attributes as your "virtual" objects than using actual objects:

you don't want 1,000 "gold coin" objects in your game, lol.

instead you simply want:

player -> Attributes (Tab) -> Attribute -> Add ->

Name: gold_coins
Type: int (integer)
Value: 0

then putting (add a~new script) these scripts to where you want it (such as in an Object's Verb):

Set a variable or attribute ->

Addition:

player.gold_coins = player.gold_coins + your_amount

player.gold_coins = player.gold_coins + 1

Subtraction:

player.gold_coins = player.gold_coins - your_amount

Multiplication:

player.gold_coins = player.gold_coins * your_amount

Division:

player.gold_coins = player.gold_coins / your_amount

Lastly, you got to also "set" (Add) the status attribute too, so you can see it on the right pane, when you play the game:

player -> Attributes (Tab) -> Status Attributes -> Add ->

name: gold_coins
value: (leave blank)

onimike
Oh wow thank you I will defiantly try to figure out the script I got it to where I can add water to bottle and must open bottle to drink but still cant give a value or volume to the water so it actually runs out. right now I can just drink forever and wanted to make it where if you don't drink you can dehydrate. Yes I have read over the tutorial many times and got a lot figured out for now, im sure the further I go along the more bumps ill run into. I have uploaded the game in a zip so all the sounds and pics I have work am going to put way more detail into it once I figure out how to use this program better :) thanks again because I really want to give this game some depth I don't want it to be a 5 min game, I want to reveal a whole state, with multiple cities, towns etc.

Mike

HegemonKhan
[HK edited: newer version]

you need some attributes (max_capacity), conditions (usually "If" scripts), and to "compare" ("operators": =, >, <, not equal ~ <>, <=, >=, and etc) the "current" (bottle.water_amount_in_the_bottle) and "max" (bottle.max_capacity) attributes:

(I'll bold the key conceptual parts)

here's the section from my post above on doing this stuff:

you might also want to add a "max_capacity" onto your bottle (for how much water it can hold):

"bottle" -> Attribute (Tab) -> Attributes -> Add ->

Name: max_capacity
Type: int (integer)
Value: 10 (or whatever amount you want)


----

you do this where you want it, such as a "fill_bottle" Verb (Tab) for your "facet" object:

"facet" Object -> Verb (Tab) -> Add a~new script ->

if -> player has bottle in inventory
-> if -> facet is turned on (set the facet to be switchable, an option in one of the Tabs for the facet object)
->-> if -> set a variable or attribute -> bottle.water_count_in_bottle < bottle.max_capacity
->->-> Set a variable or attribute -> bottle.water_count_in_bottle = bottle.water_count_in_bottle + 1
->->-> print a message ("you fill the bottle up with water")
->-> else ->
->->-> print message ("Your bottle is full already")
-> else ->
->-> print message ("the facet is not turned on yet!"
else
-> print message ("you don't have a bottle"

and for the "drinkable" part:

"bottle" Object -> Verb -> drink -> add a~new script ->

if -> bottle has~contains~(or if water.parent=bottle) water, // actually, remove (don't do) this line as it was for the more simply method far above, and not for this more complex method here
-> if -> Set a variable or attribute -> bottle.water_count_in_bottle > 0
->-> Set a variable or attribute -> bottle.water_count_in_bottle = bottle.water_count_in_bottle - 1
->-> print a message ("you drink the water from the bottle")
-> else ->
->-> print a message ("you tilt the bottle up but not even a single drop of water drops into your mouth.")
else ->
-> print a message ("you only want~need to drink water, and there's no water in your bottle.")

HegemonKhan
[HK Edited: newer version]

if you can't figure this out on your own, (and if someone doesn't beat me to it), on the weekend (when I've got the time) I'll put this stuff into your game file, upload it back here as a post, for you to then download it. I don't have the time to do this right now though, and~as it'll take some time for me to do this too.

P.S.

omimike wrote:and wanted to make it where if you don't drink you can dehydrate.


player -> Attributes (Tab) -> Attributes -> Add ->

Name: dehydration_count
Type: int
Value: 100

and also add these Attributes too:

player -> Attributes (Tab) -> Attributes -> Add ->

Name: turns
Type: int
Value: 0

player -> Attributes (Tab) -> Status Attributes -> Add ->

Name: turns
value: (leave blank)

click on the top left most "Object" on the left side's "tree of stuff", just so that it is highlighted ->

top of the screen -> Add -> Turnscript ->

Name: global_events_turnscript

Turnscript "Object" -> Turnscript (Tab, it's only tab, lol) -> Add script ->

Set a variable or attribute -> player.dehydration_count = player.dehydration_count - 1
if -> player.dehydration_count = 0 ->
-> finish (this script, ie add a~new script, ends the game)
Set a variable or attribute -> player.turns = player.turns + 1

also, in the turnscript menu -> click the checkbox (I think) for it to be "enabled when game begins", or something like this, lol.

lastly, you need to add in a script to the drinking of the water from the bottle to raise (increase~addition or multiply) your "player.dehydration_count" too.

onimike
that's awesome thank you I think I might get it I will post if I fix it right now its having problems so have to wait a while to mess with it.
Thanks again
Mike

HegemonKhan
here's my testing game code which has (experience) "potion drinking" in it (for my actual purpose of testing a leveling function):

~err, my drink verb is extremly simple, lol. I forgot that I did this so I could quickly keep drinking to test my leveling function. It originally would move the potion into a "game_storage_object" (removing ~ "using it up" from the game player's inventory) along with a command to move it back into the game player's inventory to use again. this was too "slow", so I just took it out lol. so, my bad. if you want to see this done, I can add it back into this game file for you.

(hopefully this works, if not, I'll try again to update it to v5.4, as it was written for v5.2, lol)

<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>cd102f9d-370a-4bda-b6ea-ca42288f619c</gameid>
<version>1.0</version>
<start type="script">
msg ("What is your name?")
get input {
msg (" - " + result)
player.alias = result
show menu ("What is your gender?", split ("male;female" , ";"), false) {
player.gender = result
show menu ("What is your race?", split ("human;elf;dwarf" , ";"), false) {
player.race = result
show menu ("What is your class?", split ("warrior;cleric;mage;thief" , ";"), false) {
player.class = result
msg (player.alias + " is a " + " " + player.gender + " " + player.race + " " + player.class + ".")
}
}
}
}
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
<age type="int">0</age>
<height type="int">0</height>
<weight type="int">0</weight>
<strength type="int">0</strength>
<intelligence type="int">0</intelligence>
<agility type="int">0</agility>
<statusattributes type="simplestringdictionary">age = ;height = ;weight = ;strength = ;intelligence = ;agility = ;level = ;experience = ;cash = ;turns = </statusattributes>
<level type="int">0</level>
<experience type="int">0</experience>
<cash type="int">0</cash>
<turns type="int">0</turns>
</object>
<object name="potion100">
<inherit name="editor_object" />
<alias>100 exp potion</alias>
<take />
<displayverbs>Look at; Take; drink</displayverbs>
<inventoryverbs>Look at; Use; Drop; drink</inventoryverbs>
<drink type="script">
msg ("You drink the exp potion, receiving 100 experience.")
player.experience = player.experience + 100
</drink>
</object>
<object name="potion300">
<inherit name="editor_object" />
<alias>300 exp potion</alias>
<take />
<displayverbs>Look at; Take; drink</displayverbs>
<inventoryverbs>Look at; Use; Drop; drink</inventoryverbs>
<drink type="script">
msg ("You drink the exp potion, receiving 300 experience.")
player.experience = player.experience + 300
</drink>
</object>
</object>
<turnscript name="turns lvlup script">
<enabled />
<script>
lvlup
player.turns = player.turns + 1
</script>
</turnscript>
<function name="lvlup"><![CDATA[
if (player.experience >= player.level * 100 + 100) {
player.experience = player.experience - (player.level * 100 + 100)
player.level = player.level + 1
switch (player.gender) {
case ("male") {
player.strength = player.strength + 1
}
case ("female") {
player.agility = player.agility + 1
}
}
switch (player.race) {
case ("dwarf") {
player.strength = player.strength + 2
}
case ("elf") {
player.agility = player.intelligence + 2
}
case ("human") {
player.strength = player.strength + 1
player.agility = player.agility + 1
}
}
switch (player.class) {
case ("warrior") {
player.strength = player.strength + 2
}
case ("cleric") {
player.intelligence = player.intelligence + 1
player.agility = player.agility + 1
}
case ("mage") {
player.intelligence = player.intelligence + 2
}
case ("thief") {
player.strength = player.strength + 1
player.agility = player.agility + 1
}
}
lvlup
}
]]></function>
</asl>


click on the "select all" button above to highlight my game code, ctrl+C to copy it, now create a new game, click on that note paper looking button to go into code view, highlight and delete the entire code, ctrl+P to paste in my game code, save the game, and then try~play it out, hehe.

Just so you can see how i set up my "drink" verb (and see some other stuff too).

--------------

P.S.

in case you don't know about these, here's some very useful links too:

http://quest5.net/wiki/Main_Page
http://quest5.net/wiki/How_to
viewforum.php?f=18

and if~when you start working with the code:

http://quest5.net/wiki/Category:All_Fun ... t_Commands (page 1, range: A-S)
http://quest5.net/w/index.php?title=Cat ... h#mw-pages (page 2, range: S-Z)

enjoy ;)

onimike
Thank you I have used that way by moving object to a different location when u drink, im not sure if u know or not but is there a limit of scripts, rooms, and objects you can make and use because quest program was working fine then the more I added into it the more glitch it got. But yes that way will deff work for now thanks again.
mike

HegemonKhan
I don't think there's any limit for quest itself, and as I think Jayna said, computers and~or quest have no problem with doing millions of processes in just seconds, though maybe the computer itself would be the limit. However, I'm not knowledgeable in this subject, so wait for an answer by someone who knows what they're talking about, as I don't. I still don't understand all this computer stuff very well.

What do you mean by glitches? Actual glitches, or merely (human made) errors as happens as you add or do (or try to do, lol) more stuff in quest ?

onimike
Oh it kept shuting down but its because I was running wrong scripts and it would boot me. Man off of that one post you sent I was able to do a lot got a exp leveling system still trouble with adding to attribute with class selection but every thing else is running a lot better. I redid all the other script so they ran smoother and more efficant now im stuck with how to do combat do I have to know how to script or can that be bypassed using attributes? Man I cant tell u how thankful I am you helped me out working way better, but also when u start and u have player put in name then it take u to gender then class, after mine gets ur name it runs my room script and I want it to run after player is done building character. I know its one lil thing im missing but im going to pm the whole game I got o far if I can. Thanks again
Mike

onimike
k wont let me so hopefully u get it

HegemonKhan
Trouble-shooting the game is fun... I felt like I conquered the world, when I finally got my combat coding to (cursing) work! I had so many (mostly simple ~ relief and anger, lol) errors... such a pain to find them all, and get it working... lol

(Then Pertex takes a look at it, and "cleans" it up, making it so much shorter, clearer, and etc, lol. I'm jealous of his skill!)

----------

you got to keep your scripts be continually "nested" (indented) properly, so that it's just one script block. The exact format is annoying, it's hard to get it to not display the room info before your "start" game script (such as "character creation" script) is done. I think the "get input" makes it more annoying to get it to run properly (run the full script before the room info stuff is displayed). I don't really understand all the rules of how it works, I just tinker around (sometimes it takes me a long time, lol) until I get it to work, doing the full script block, before it then displays the room info stuff.

-------------

can you narrow down your problem with getting the stats to work based on the race selections?

are you having a problem with the "switch" function working, or with the stats themselves (such as they not adding to the player's stats), or something else is causing you the problem ??

--------------

combat...

this can be very simple to do (but the combat is very simple too), or one of the most complex coding~scripting challenges, but the combat itself is very advanced.

unfortunately, a lot of the RPG aspects~elements (magic system, combat system, dialogue system, stealth~thievery system, npc~monster~hostility system, equipment system, map~world system, etc etc etc) involve very good~advanced coding skills.

here's some links on (just physical) combat (ranging from simple to do to complex~advanced coding required):

http://quest5.net/wiki/Hs-baddy1 (???)
http://quest5.net/wiki/Hs-baddy2 (???)
http://quest5.net/wiki/Simple_Combat_System_(Advanced) (Pixie)
viewtopic.php?f=18&t=2660 (Pertex)
viewtopic.php?f=10&t=3348&hilit=noob+hk+help+me+thread (noob HK's thread, see the last pages ~most recent posts ~ for the combat stuff ~ my combat is based upon and thanks to Pertex' Combat Library)
viewtopic.php?f=10&t=3700 (another combat thread)

Equipment:

viewtopic.php?f=18&t=2901 (Chase)
viewtopic.php?f=18&t=2660 (Pertex, this also has equipment in it)
viewtopic.php?f=18&t=2567 (Pixie)

Items:

viewtopic.php?f=18&t=3515 (Sora)

etc etc etc... (I'm going to look for the other thread, where I give a list of all the links for the various RPG stuff)

here it is (though I got lazy in it too, argh, lol):

viewtopic.php?f=10&t=3787

------------------

P.S.

I'll also look at your game file too, as I've wrote this post before having done so, and will return it hopefully fixed up for you.

-------------------

P.S.S.

if you're working with code (or especially just trying to trouble shoot your game ~ getting it to work), then you'll want~need this (get the most recent version obviously):

http://notepad-plus-plus.org/

it color codes everything, making it easier to write, read, and especially spot errors~mistakes in your game code.

once you got it up, at the top, click on "language" and select "XML", for the correct computer language color coding to be used.

-------------------

P.S.S.S.

My apologizes on the character creation script that I had in my code that I provided you. It was done long ago, and things have changed since then.

here's a link for how to do a character creation script block:

http://quest5.net/wiki/Character_Creation

and here's about the "switch" (a quicker way to do multiple "If" scripts, though sometimes it won't work for some things, so you just got to do those things with the "If" scripts):

http://quest5.net/wiki/Switch
http://quest5.net/wiki/Hs-multiple

--------------

also, here's a more advanced (longer) character creation script block, just so you can see just how much you can do with it:

(my apologizes to other ethnicities, as I'm white, I don't know the full nor correct range of characteristics of the other ethnicities, this physical description stuff isn't easy to plot out or decide what terms to use (such as blonde vs yellow; brunette vs brown; amber vs yellow, and as well as what color types to use), lol. I've been using google search wikis: "skin color", "hair color", and "eye color" for this stuff. If anyone wants to help me with this stuff, esepcially in getting it right, I'd be very appreciative, lol. Also, this is a work in progress, I've copy and pasted the european range of characteristics, just as placeholders, until I update it with the hopefully correct characters for the other ethnicities. This classification stuff is a pain to try to do, lol. I then got to think up of stuff for the non-human races~ethnicities too, lol. This is going to take forever, hehe. Amibitious HK! Also, "American" refers to the native ~ north, central, and south ~ americans: cherokee, iroquis, aztecs, incas, mayans, and etc., and NOT to the 'immigrant or conquest' U.S. citizens from europe, asia, and africa, which are often associated with the word "Americans". Sorry, to Australians, you got left out, as I think the only natives are the aboriginees, and they can be better placed into the "african" category, than to have a category just for them. So, in this case, "african" refers to people with dark skin, be they from Africa or Australia, or elsewhere too)

<function name="character_creation_function">
msg ("What is your name?")
get input {
msg ("-" + game.pov.alias)
game.pov.alias=result
show menu ("What is your gender?", split ("male;female",";"), false) {
game.pov.gender=result
show menu ("What is your species?", split ("human;dwarf;elf;gnome;hobbit",";"), false) {
game.pov.species=result
switch (game.pov.species) {
case ("human") {
show menu ("What is your race?", split ("european;african;asian;american",";"), false) {
game.pov.race=result
switch (game.pov.race) {
case ("european") {
show menu ("What is your skin color?", split ("white;orangish;redish;olive;tanned",";"), false) {
game.pov.skin_color = result
show menu ("What is your eye color?", split ("blue;green;light_brown;dark_brown;amber;hazel;grey",";"), false) {
game.pov.eye_color = result
show menu ("What is your hair color?", split ("white;light_yellow;bright_yellow;dirty_yellow;red;orange;red_orange;light_brown;dark_brown;black;grey",";"), false) {
game.pov.hair_color = result
show menu ("What is your hair type?", split ("straight;wavy;curly",";"), false) {
game.pov.hair_type = result
}
}
}
}
}
case ("african") {
show menu ("What is your skin color?", split ("light_brown;dark_brown;black;greyish",";"), false) {
game.pov.skin_color = result
show menu ("What is your eye color?", split ("blue;green;light_brown;dark_brown;amber;hazel;grey",";"), false) {
game.pov.eye_color = result
show menu ("What is your hair color?", split ("white;light_yellow;bright_yellow;dirty_yellow;red;orange;red_orange;light_brown;dark_brown;black;grey",";"), false) {
game.pov.hair_color = result
show menu ("What is your hair type?", split ("straight;wavy;curly",";"), false) {
game.pov.hair_type = result
}
}
}
}
}
case ("asian") {
show menu ("What is your skin color?", split ("white;light_brown;dark_brown;olive;tanned",";"), false) {
game.pov.skin_color = result
show menu ("What is your eye color?", split ("blue;green;light_brown;dark_brown;amber;hazel;grey",";"), false) {
game.pov.eye_color = result
show menu ("What is your hair color?", split ("white;light_yellow;bright_yellow;dirty_yellow;red;orange;red_orange;light_brown;dark_brown;black;grey",";"), false) {
game.pov.hair_color = result
show menu ("What is your hair type?", split ("straight;wavy;curly",";"), false) {
game.pov.hair_type = result
}
}
}
}
}
case ("american") {
show menu ("What is your skin color?", split ("white;light_brown;dark_brown;olive;tanned",";"), false) {
game.pov.skin_color = result
show menu ("What is your eye color?", split ("blue;green;light_brown;dark_brown;amber;hazel;grey",";"), false) {
game.pov.eye_color = result
show menu ("What is your hair color?", split ("white;light_yellow;bright_yellow;dirty_yellow;red;orange;red_orange;light_brown;dark_brown;black;grey",";"), false) {
game.pov.hair_color = result
show menu ("What is your hair type?", split ("straight;wavy;curly",";"), false) {
game.pov.hair_type = result
}
}
}
}
}
}
}
}
case ("dwarf") {
msg ("???")
}
case ("elf") {
show menu ("What is your race?", split ("high;dark;wood",";"), false) {
game.pov.race=result
}
}
case ("gnome") {
msg ("???")
}
case ("hobbit") {
msg ("???")
}
}
}
}
}
on ready {
msg (game.pov.alias + " is a " + game.pov.age + " year old " + game.pov.gender + " " + game.pov.race + " " + game.pov.species + " with " + game.pov.skin_color + " skin, " + game.pov.eye_color + " eyes, and " + game.pov.hair_color + " " + game.pov.hair_type + " hair.")
}
</function>


Getting the description at the end~bottom to work, is such a pain in the behind, still even now I have trouble with it, lol. Also, it's really hard to try to explain how to make~get it right too, argh. The syntax has to be perfect with the quatation marks and plus signs in their proper places and quantity... GRRR

I'll try to explain it anyways, lol...

The Always Rule:

you must have your (ie equal number of) left quotation marks match up with your right quotation marks.

then, there's two ways to look at it:

" + your_attribute + "
ie: " + game.pov.age + "
(except if it is at the very beginning, then you don't need the left quatation mark, as seen by: game.pov.alias + ")

~OR~

your_attribute + " your_text " + your_attribute
ie: game.pov.alias + " is a " + game.pov.age

though you've really got to use (understand and apply) BOTH ways actually when trying to get it to work correctly.

also, if you notice:

your_attribute <-> + <-> your_text

your_attribute <-> + " " + <-> your_attribute

so here's the ways to look at it:

Note: I'm doing this vertical to show the "way to look at it" chunks

msg (game.pov.alias + " is a " + game.pov.age + " year old " + game.pov.gender + " " + game.pov.race + " " + game.pov.species + " with " + game.pov.skin_color + " skin, " + game.pov.eye_color + " eyes, and " + game.pov.hair_color + " " + game.pov.hair_type + " hair.")

way 1:

game.pov.alias +
" is a "
+ game.pov.age +
" year old "
+ game.pov.gender +
" "
+ game.pov.race +
" "
+ game.pov.species +
" with "
+ game.pov.skin_color +
" skin, "
+ game.pov.eye_color +
" eyes, and "
+ game.pov.hair_color +
" "
+ game.pov.hair_type +
" hair."


or

way 2:

game.pov.alias + " // (HK note: this needs a right quatation mark, which will be at the very end, after the period)
is a
" + game.pov.age + "
year old
" + game.pov.gender + "
" + game.pov.race + "
" + game.pov.species + "
with
" + game.pov.skin_color + "
skin,
" + game.pov.eye_color + "
eyes, and
" + game.pov.hair_color + "
" + game.pov.hair_type + "
hair." // (HK note: this is the right quatation mark that matches up with the left quation mark at the very beginning, after: game.pov.alias +)

HegemonKhan
I'm going over your game file, I'm not sure exactly how you want to have stuff done, so you'll need to take a look at what I've done, to see if I done stuff how you wanted, or if not, then I'll correct it to how you want it. Also, some of the stuff you've done or used, I haven't yet used nor familiarized myself with (I've still got lots to learn too, hehe), so I can't help you with this such stuff, lol.

one mistake is simply a typo by you in the "lvlup" (now it's: "leveling_function" ~ I renamed some things) function:

phyical -> physical (you were missing the "S" letter, hehe ~ isn't trouble shooting fun... lol)

this was preventing it from working for increasing your "physical" stat (attribute) when you leveled up (as I was ~had choosen~ the "military" field).

when you use stuff (like with attributes, invoking scripts' names~labels, call functions' names~labels, object types ~ inherited attributes, and etc), it has to be precisely correct in its spelling, as otherwise the Quest engine will not understand (computers are stupid in this regard, unlike humans).

----------

Also, scenery objects are completely unknown to the game player (during game play), as they don't appear in the "places and objects" pane (panel~window~box), so often game makers will mention these scenery objects in their room descriptions, allowing the game player to know about these objects, and hopefully try to do commands (by typing in hopefully the correct command, ie verb or whatever, stuff) with them.

------------

here's my editing of your game file (I didn't complete it, as I think I should let you try to work on fixing it, as I don't know your game as well as you do. Though, if you need help, I'll help with fixing it up. Also, check if what I done is what you wanted, or if not, and I'll correct my edits for you), see the attachment below.

Also, see my next post (due to the site's posting character limit, lol)

HegemonKhan
Also, here it (HK edited version) is in code too:

<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="another z game">
<gameid>7bbac88f-66a1-42ad-8ab5-6ef501e27f25</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<attr name="autodescription_description" type="int">4</attr>
<attr name="autodescription_youcansee" type="int">2</attr>
<attr name="autodescription_youcango" type="int">3</attr>
<autodescription_youarein_useprefix />
<gridmap type="boolean">false</gridmap>
<showscore type="boolean">false</showscore>
<start type="script">
character_creation_function
</start>
</game>
<function name="character_creation_function">
msg ("First, what is your name?")
get input {
msg ("-" + result)
player.alias = result
show menu ("What gender are you?", split ("male;female",";"), false) {
player.gender = result
show menu ("What field are you in?", split ("officer;doctor;nurse;survivalist;military", ";"), false) {
player.field = result
msg ("")
msg (player.alias + " is a " + player.gender + " " + player.field +".")
msg ("")
wait {
}
}
}
}
</function>
<function name="global_game_turns_function">
player.turns = player.turns + 1
</function>
<turnscript name="global_events_turnscript">
<enabled />
<script>
leveling_function
global_game_turns_function
</script>
</turnscript>
<type name="playable_character_object_type">
<mental type="int">0</mental>
<experience type="int">0</experience>
<physical type="int">0</physical>
<heart type="int">0</heart>
<strength type="int">0</strength>
<intelligence type="int">0</intelligence>
<stamina type="int">0</stamina>
<turns type="int">0</turns>
<level type="int">0</level>
<statusattributes type="simplestringdictionary">mental =; physical =; stamina =; strength =; intelligence =; experience =; heart =; level =; turns =</statusattributes>
<field type="simplestringlist">doctor;officer;nurse;military;survivalist</field>
</type>
<object name="ward 14">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<description type="string">"HK: Do you want a message here?"</description>
<attr name="grid_label">Ward14</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<firstenter type="script">
// you need a script(s) here, if you want to use it
</firstenter>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="playable_character_object_type" />
</object>
<object name="window">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<look>Its a long window with white shutters.</look>
<alt type="stringlist">
<value>glass</value>
</alt>
<inventoryverbs type="stringlist">
<value>look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<lookout type="script">
firsttime {
player.experience = player.experience + 2
msg ("Looking out the window you see a mass of bodies, military cars and trucks though out the parking lot.")
} otherwise {
// do you want some script or message (see below) here?
// msg ("Do you want a message here, or was the message that I moved~have above, suppose to be here?")
}
</lookout>
</object>
<object name="newspaper">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<alt type="stringlist">
<value>paper</value>
</alt>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
<value>Read</value>
</displayverbs>
<take />
<look type="script">
msg ("Georgia Times")
</look>
<read type="script">
firsttime {
player.experience = player.experience + 5
msg ("Wonder if I can find out any thing from this.") // Did you want this to be the message for the "firsttime" script? If yes, then replace this with what I put above
SetTimeout (3) {
msg ("Headlines: MASSIVE VIRUS OUTBEAK SPREADS ALL AROUND THE WORLD!!")
SetTimeout (5) {
msg ("All around the world regions have be struck by a massive virus outbreak. No one can confirm where and how it started. Must regions have placed safe zones for area of quarintine, these regions include CHINA, RUSSIA, JAPAN, EUORPE, ITALY, CANADA, MEXICO AND THE U.S. ")
SetTimeout (6) {
msg ("Offical documents released these photo as the outbreak hit the U.S")
SetTimeout (3) {
picture ("zom pic.png")
SetTimeout (3) {
msg ("The victom here is Mall of America which sadly we say there is no hope for. Major U.S cities have marked signs with this logo")
SetTimeout (4) {
picture ("quarintine.jpg")
SetTimeout (3) {
msg ("Follow these signs, this leads to safe zones this will be our last print its been a pleasure serving the American people for over 75 years may God have mercy on us all.")
}
}
}
}
}
}
}
} otherwise {
msg ("Wonder if I can find out any thing from this.") // Did you want this to be the message for the "firsttime" script? If yes, then replace this with what I put above
SetTimeout (3) {
msg ("Headlines: MASSIVE VIRUS OUTBEAK SPREADS ALL AROUND THE WORLD!!")
SetTimeout (5) {
msg ("All around the world regions have be struck by a massive virus outbreak. No one can confirm where and how it started. Must regions have placed safe zones for area of quarintine, these regions include CHINA, RUSSIA, JAPAN, EUORPE, ITALY, CANADA, MEXICO AND THE U.S. ")
SetTimeout (6) {
msg ("Offical documents released these photo as the outbreak hit the U.S")
SetTimeout (3) {
picture ("zom pic.png")
SetTimeout (3) {
msg ("The victom here is Mall of America which sadly we say there is no hope for. Major U.S cities have marked signs with this logo")
SetTimeout (4) {
picture ("quarintine.jpg")
SetTimeout (3) {
msg ("Follow these signs, this leads to safe zones this will be our last print its been a pleasure serving the American people for over 75 years may God have mercy on us all.")
}
}
}
}
}
}
}
}
</read>
</object>
<object name="medical equipment">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<look>no power nothing happens.</look>
<use>Doesn't do anything without power.</use>
</object>
<exit alias="east" to="bathroom">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="ward 14">
<inherit name="southdirection" />
<lookonly />
<look type="string">"HK: Do you want a message here?"</look>
</exit>
<exit alias="north" to="hallway">
<inherit name="northdirection" />
<look>Its a door to the hall it looks like.</look>
</exit>
</object>
<object name="bathroom">
<inherit name="editor_room" />
<description>It a hospital bathroom with very white walls and a handicap shower. A sink sits to the left with a toilet next to it.</description>
<attr name="grid_label">Bathroom</attr>
<exit alias="west" to="ward 14">
<inherit name="westdirection" />
<look>Thats the room I woke up in.</look>
</exit>
<object name="toliet">
<inherit name="editor_object" />
<scenery />
<flush type="script">
msg ("Toliet flushes, water still on.")
</flush>
</object>
<object name="shower">
<inherit name="editor_object" />
<inherit name="switchable" />
<scenery />
<switchedondesc>No time for a shower.</switchedondesc>
<switchedoffdesc>Would be nice if I had the time.</switchedoffdesc>
</object>
<object name="sink">
<inherit name="editor_object" />
<inherit name="switchable" />
<take type="boolean">false</take>
<inventoryverbs type="stringlist" />
<switchedondesc>Cool water flows from the sink.</switchedondesc>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Switch on</value>
<value>Switch off</value>
</displayverbs>
<ontake type="script">
// Did you want a (or multiple) script(s) here?
</ontake>
<onswitchon type="script">
play sound ("Running Water-SoundBible.com-568417508.mp3", false, true)
firsttime {
player.experience = player.experience + 5
} otherwise {
// Do you want any scripts here?
}
</onswitchon>
<onswitchoff type="script">
play sound ("water-droplet-2.mp3", false, false)
</onswitchoff>
<attr name="fill_bottle" type="script">
firsttime {
if (Got(bottle)) {
if (bottle.isopen) {
if (IsSwitchedOn(sink)) {
player.experience = player.experience + 5
MoveObject (water, bottle)
} else if (not IsSwitchedOn(sink)) {
msg ("Helps to turn on the sink....Wow!")
}
} else if (not bottle.isopen) {
msg ("Helps to open bottle first genious!")
}
} else {
msg (You need a bottle, silly.")
}
} otherwise {
if (Got(bottle)) {
if (bottle.isopen) {
if (IsSwitchedOn(sink)) {
MoveObject (water, bottle)
} else if (not IsSwitchedOn(sink)) {
msg ("Helps to turn on the sink....Wow!")
}
} else if (not bottle.isopen) {
msg ("Helps to open bottle first genious!")
}
} else {
msg (You need a bottle, silly.")
}
}
</attr>
<object name="water">
<inherit name="editor_object" />
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<look>Looks like clean water.</look>
<scenery />
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<volume type="int">1</volume>
</object>
</object>
</object>
<object name="ward 15">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Ward15</attr>
<exit alias="south" to="hall1">
<inherit name="southdirection" />
<look>Its a recovery ward.</look>
</exit>
</object>
<object name="ward 16">
<inherit name="editor_room" />
<dark type="boolean">false</dark>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<attr name="grid_label">Ward16</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<description>Its kinda dark really could use a little light. Not much different then the other ward, just without a window.</description>
<beforeenter type="script">
// Did you want scripts here?
</beforeenter>
<enter type="script">
// Did you want scripts here?
</enter>
<darkroomdescription type="script">
// Did you want scripts here?
</darkroomdescription>
<firstenter type="script">
// Did you want scripts here?
</firstenter>
<exit alias="north" to="hall1">
<inherit name="northdirection" />
<look>Its a hallway</look>
</exit>
<object name="bottle">
<inherit name="editor_object" />
<inherit name="container_limited" />
<take />
<isopen type="boolean">false</isopen>
<transparent type="boolean">false</transparent>
<look>Aquafina</look>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
<value>Open</value>
<value>Close</value>
</inventoryverbs>
<maxvolume type="boolean">false</maxvolume>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
</displayverbs>
<maxobjects type="boolean">false</maxobjects>
<listchildren />
<listchildrenprefix>Heres some good</listchildrenprefix>
<alt type="stringlist">
<value>water bottle</value>
<value>container</value>
</alt>
<scenery type="boolean">false</scenery>
<visible type="boolean">false</visible>
<usedefaultprefix />
<ontake type="script">
msg ("I should fill this up.")
</ontake>
<ondrop type="script">
msg ("I really should keep this.")
</ondrop>
<onopen type="script">
// Did you want scripts here?
</onopen>
<drink type="script">
if (Contains (bottle,water)) {
player.mental = player.mental + 1
player.physical = player.physical + 1
MoveObject (water, sink)
}
</drink>
<selfuseon type="scriptdictionary">
<item key="water">
if (Got(bottle)) {
if (IsSwitchedOn(sink)) {
MoveObject (water, bottle)
}
}
</item>
</selfuseon>
</object>
</object>
<verb>
<property>lookout</property>
<pattern>look out</pattern>
<defaultexpression>"You can't look out " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>use</property>
<pattern>use </pattern>
<defaultexpression>"You can't use " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>flush</property>
<pattern>flush</pattern>
<defaultexpression>"You can't flush " + object.article + "."</defaultexpression>
</verb>
<object name="hallway">
<inherit name="editor_room" />
<description>Its a hallway with mangled bodies, blood, beds and chairs scattered throughout.</description>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hallway</attr>
<attr name="grid_fill">Yellow</attr>
<exit alias="south" to="ward 14">
<inherit name="southdirection" />
</exit>
<exit alias="west" to="hall1">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="hall2">
<inherit name="eastdirection" />
</exit>
<exit alias="north" to="hallway">
<lookonly />
<look>The walls are covered in blood and bullet holes.</look>
</exit>
<object name="wall">
<inherit name="editor_object" />
<scenery />
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<look>blood and bullet holes cover the entire wall.</look>
<use type="boolean">false</use>
</object>
</object>
<object name="hall1">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hall1</attr>
<attr name="grid_fill">Yellow</attr>
<exit alias="east" to="hallway">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="ward 16">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="ward 15">
<inherit name="northdirection" />
</exit>
<exit alias="west" to="hall1">
<inherit name="westdirection" />
<lookonly />
<look>This way is blocked by piled debris and mangled bodies.</look>
</exit>
<object name="exp juice">
<inherit name="editor_object" />
<take />
<drink type="script"><![CDATA[
// the "<![CDATA[ ]] >" is for coding only, for the quest engine to recognize the "<" and ">" that you used within a script to be seen as "greater than" or "lesser than" operators, instead of as the coding stuff (ie <function name="blah">)
// Did you want the "<br/>" in the message script line below? I'm not personally familiar with the use of this coding stuff yet, nor with what it does, but if you want it there, then obviously leave it there, lol.
msg ("You drink the juice<br/>")
player.experience = player.experience + 10
]]></drink>
</object>
</object>
<object name="hall2">
<inherit name="editor_room" />
<description>There is a intake desk along with phone and papers scattered around.</description>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hall2</attr>
<attr name="grid_fill">Yellow</attr>
<firstenter type="script">
msg ("A object flashes past with the sound of clicking nails on the tiled floor tap.")
</firstenter>
<exit alias="west" to="hallway">
<inherit name="westdirection" />
</exit>
<object name="intake desk">
<inherit name="editor_object" />
<inherit name="surface" />
<alt type="stringlist">
<value>desk</value>
</alt>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<hidechildren />
<object name="matches">
<inherit name="editor_object" />
<take />
<takemsg>Now I'll be able to see in the dark.</takemsg>
<open type="boolean">false</open>
<close type="boolean">false</close>
<scenery type="boolean">false</scenery>
<dropmsg>I really shouldn't Ill need these.</dropmsg>
<lightsource />
<lightstrength>weak</lightstrength>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<light type="script">
firsttime {
player.experience = player.experience + 8
msg ("At least I can see a little bit.")
} otherwise {
if (player.parent = ward 16) {
msg ("Humm not much different then the other wards, just without a window. Oh, you see something now...")
MakeObjectVisible (bottle)
}
}
</light>
<look type="script">
picture ("matches.png")
</look>
</object>
</object>
</object>
<verb>
<property>light</property>
<pattern>light</pattern>
<defaultexpression>"You can't light " + object.article + "."</defaultexpression>
</verb>
<object name="ward16a">
<inherit name="editor_room" />
</object>
<object name="corridor">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">corridor</attr>
<description type="script">
// Did you want scripts (such as a message script) here?
</description>
<beforeenter type="script">
// Did you want scripts (such as a message script) here?
</beforeenter>
<beforefirstenter type="script">
play sound ("Dog Growl V2.mp3", true, false)
</beforefirstenter>
<firstenter type="script">
play sound ("Rip Arm Off-SoundBible.com-1079968039.mp3", false, false)
</firstenter>
<object name="dog">
<inherit name="editor_object" />
<inherit name="namedmale" />
<look type="script">
play sound ("Dog Growl V2.mp3", true, false)
msg ("The dog is eatting peoples dead fleah from the rotting carcusses on the floor.")
</look>
</object>
<exit alias="south" to="hall2">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="hall3">
<inherit name="northdirection" />
<locked type="boolean">false</locked>
</exit>
</object>
<object name="room of the dead">
<inherit name="openable" />
<description>{img:dead door.jpg}</description>
<attr name="grid_label">Door of the Dead</attr>
<picture>dead door.jpg</picture>
<attr name="grid_fill">DarkSeaGreen</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_borderwidth" type="int">1</attr>
<take type="boolean">false</take>
<openscript type="script">
</openscript>
<beforeenter type="script">
LockExit
</beforeenter>
<exit alias="west" to="hall3">
<inherit name="westdirection" />
</exit>
</object>
<object name="hall3">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<description type="script">
MakeObjectVisible (room of the dead)
</description>
<beforeenter type="script">
picture ("dead door.jpg")
play sound ("Zombie_Horde-Mike_Koenig-1926300541.mp3", false, false)
</beforeenter>
<exit alias="south" to="corridor">
<inherit name="southdirection" />
</exit>
<exit alias="east" to="room of the dead">
<inherit name="eastdirection" />
<locked />
<lockmessage>This way is blocked by locked chains.</lockmessage>
<attr name="grid_length" type="int">2</attr>
<look type="script">
picture ("dead door.jpg")
</look>
</exit>
</object>
<verb>
<property>fill_bottle</property>
<pattern>fill_bottle</pattern>
<defaultexpression>"You can't fill_bottle " + object.article + "."</defaultexpression>
</verb>
<function name="leveling_function"><![CDATA[
if (player.experience >= player.level * 10 + 10) {
player.experience = player.experience - (player.level * 10 + 10)
player.level = player.level + 1
switch (player.gender) {
case ("male") {
player.strength = player.strength +1
}
case ("female") {
player.inteligence = player.intelligence + 1
}
}
switch (player.field) {
case ("officer") {
player.intelligence = player.intelligence + 1
player.physical = player.physical + 1
}
case ("doctor") {
player.intelligence = player.intelligence + 2
}
case ("survivalist") {
player.strength = player.strength + 1
player.intelligence = player.intelligence + 1
}
case ("nurse") {
player.heart = player.heart + 1
player.intelligence = player.intelligence + 1
}
case ("military") {
player.stamina = player.stamina + 1
player.physical = player.physical + 1
player.strength = player.strength + 1
}
}
leveling_function
}
]]></function>
<timer name="newspaper_timer">
<interval>3</interval>
<script>
// you need a script(s) here, if you want to use it
</script>
</timer>
<timer name="hydryation_timer">
<interval>60</interval>
<enabled type="boolean">false</enabled>
<script>
// you need a script(s) here, if you want to use it
</script>
</timer>
<timer name="no_water_timer">
<interval>1</interval>
<script>
// you need a script(s) here, if you want to use it
</script>
</timer>
</asl>


and here's your original game file coding:

<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="another z game">
<gameid>7bbac88f-66a1-42ad-8ab5-6ef501e27f25</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<attr name="autodescription_description" type="int">4</attr>
<attr name="autodescription_youcansee" type="int">2</attr>
<attr name="autodescription_youcango" type="int">3</attr>
<autodescription_youarein_useprefix />
<gridmap type="boolean">false</gridmap>
<showscore type="boolean">false</showscore>
<start type="script">
msg ("First, what is your name?")
get input {
msg (" - " + result)
player.alias = result
ShowMenu ("What gender are you?", split ("male;female" , ";"), false) {
player.gender = result
ShowMenu ("What field are you in?", split ("officer;doctor;nurse;survivalist;military" , ";"), false) {
player.field = result
msg ("")
msg (player.alias + " is a " + " " + player.gender + " " + " " + player.field + ".")
msg ("")
msg ("Press any key to begin!")
}
}
}
</start>
<turnscript name="turns level_up">
<enabled />
<script>
level_up
player.turns = player.turns + 1
</script>
</turnscript>
</game>
<object name="ward 14">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<description type="string"></description>
<attr name="grid_label">Ward14</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<firstenter type="script">
</firstenter>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<statusattributes type="stringdictionary">
<item>
<key>mental</key>
<value></value>
</item>
<item>
<key>physical</key>
<value></value>
</item>
<item>
<key>stamina</key>
<value></value>
</item>
<item>
<key>strength</key>
<value></value>
</item>
<item>
<key>intelligence</key>
<value></value>
</item>
<item>
<key>experience</key>
<value></value>
</item>
<item>
<key>heart</key>
<value></value>
</item>
<item>
<key>level</key>
<value></value>
</item>
<item>
<key>turns</key>
<value></value>
</item>
</statusattributes>
<mental type="int">0</mental>
<experience type="int">0</experience>
<physical type="int">0</physical>
<heart type="int">0</heart>
<strength type="int">0</strength>
<intelligence type="int">0</intelligence>
<stamina type="int">0</stamina>
<turns type="int">0</turns>
<level type="int">0</level>
<field type="stringdictionary">
<item>
<key>doctor</key>
<value></value>
</item>
<item>
<key>officer</key>
<value></value>
</item>
<item>
<key>nurse</key>
<value></value>
</item>
<item>
<key>military</key>
<value></value>
</item>
<item>
<key>survivalist</key>
<value></value>
</item>
</field>
</object>
<object name="window">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<look>Its a long window with white shutters.</look>
<alt type="stringlist">
<value>glass</value>
</alt>
<inventoryverbs type="stringlist">
<value>look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<lookout type="script">
firsttime {
player.experience = player.experience + 2
}
msg ("Looking out the window you see a mass of bodies, military cars and trucks though out the parking lot.")
</lookout>
</object>
<object name="newspaper">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<alt type="stringlist">
<value>paper</value>
</alt>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
<value>Read</value>
</displayverbs>
<take />
<look type="script">
msg ("Georgia Times")
</look>
<read type="script">
firsttime {
player.experience = player.experience + 5
}
msg ("Wonder if I can find out any thing from this.")
SetTimeout (3) {
msg ("Headlines: MASSIVE VIRUS OUTBEAK SPREADS ALL AROUND THE WORLD!!")
SetTimeout (5) {
msg ("All around the world regions have be struck by a massive virus outbreak. No one can confirm where and how it started. Must regions have placed safe zones for area of quarintine, these regions include CHINA, RUSSIA, JAPAN, EUORPE, ITALY, CANADA, MEXICO AND THE U.S. ")
SetTimeout (6) {
msg ("Offical documents released these photo as the outbreak hit the U.S")
SetTimeout (3) {
picture ("zom pic.png")
SetTimeout (3) {
msg ("The victom here is Mall of America which sadly we say there is no hope for. Major U.S cities have marked signs with this logo")
SetTimeout (4) {
picture ("quarintine.jpg")
SetTimeout (3) {
msg ("Follow these signs, this leads to safe zones this will be our last print its been a pleasure serving the American people for over 75 years may God have mercy on us all.")
}
}
}
}
}
}
}
</read>
</object>
<object name="medical equipment">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<look>no power nothing happens.</look>
<use>Doesn't do anything without power.</use>
</object>
<exit alias="east" to="bathroom">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="ward 14">
<inherit name="southdirection" />
<lookonly />
<look type="string"></look>
</exit>
<exit alias="north" to="hallway">
<inherit name="northdirection" />
<look>Its a door to the hall it looks like.</look>
</exit>
</object>
<object name="bathroom">
<inherit name="editor_room" />
<description>It a hospital bathroom with very white walls and a hadicap shower. A sink sits to the left with a toilet next to it.</description>
<attr name="grid_label">Bathroom</attr>
<exit alias="west" to="ward 14">
<inherit name="westdirection" />
<look>Thats the room I woke up in.</look>
</exit>
<object name="toliet">
<inherit name="editor_object" />
<scenery />
<flush type="script">
msg ("Toliet flushes, water still on.")
</flush>
</object>
<object name="shower">
<inherit name="editor_object" />
<inherit name="switchable" />
<scenery />
<switchedondesc>No time for a shower.</switchedondesc>
<switchedoffdesc>Would be nice if I had the time.</switchedoffdesc>
</object>
<object name="sink">
<inherit name="editor_object" />
<inherit name="switchable" />
<take type="boolean">false</take>
<inventoryverbs type="stringlist" />
<switchedondesc>Cool water flows from the sink.</switchedondesc>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Switch on</value>
<value>Switch off</value>
</displayverbs>
<ontake type="script">
</ontake>
<onswitchon type="script">
play sound ("Running Water-SoundBible.com-568417508.mp3", false, true)
firsttime {
player.experience = player.experience + 5
}
</onswitchon>
<onswitchoff type="script">
play sound ("water-droplet-2.mp3", false, false)
</onswitchoff>
<attr name="fill_bottle" type="script">
firsttime {
player.experience = player.experience + 5
}
if (Got(bottle)) {
if (bottle.isopen) {
if (IsSwitchedOn(sink)) {
MoveObject (water, bottle)
}
}
else if (not IsSwitchedOn(sink)) {
msg ("Helps to turn on the sink....Wow!")
}
else if (not bottle.isopen) {
msg ("Helps to open bottle first genious!")
}
}
</attr>
<object name="water">
<inherit name="editor_object" />
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<look>Looks like clean water.</look>
<scenery />
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<volume type="int">1</volume>
</object>
</object>
</object>
<object name="ward 15">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Ward15</attr>
<exit alias="south" to="hall1">
<inherit name="southdirection" />
<look>Its a recovery ward.</look>
</exit>
</object>
<object name="ward 16">
<inherit name="editor_room" />
<dark type="boolean">false</dark>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<attr name="grid_label">Ward16</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<description>Its kinda dark really could use a little light.not much different then the other ward just not window.</description>
<beforeenter type="script">
</beforeenter>
<enter type="script">
</enter>
<darkroomdescription type="script">
</darkroomdescription>
<firstenter type="script">
</firstenter>
<exit alias="north" to="hall1">
<inherit name="northdirection" />
<look>Its a hallway</look>
</exit>
<object name="bottle">
<inherit name="editor_object" />
<inherit name="container_limited" />
<take />
<isopen type="boolean">false</isopen>
<transparent type="boolean">false</transparent>
<look>Aquafina</look>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
<value>Open</value>
<value>Close</value>
</inventoryverbs>
<maxvolume type="boolean">false</maxvolume>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
</displayverbs>
<maxobjects type="boolean">false</maxobjects>
<listchildren />
<listchildrenprefix>Heres some good</listchildrenprefix>
<alt type="stringlist">
<value>water bottle</value>
<value>container</value>
</alt>
<scenery type="boolean">false</scenery>
<visible type="boolean">false</visible>
<usedefaultprefix />
<ontake type="script">
msg ("I should fill this up.")
</ontake>
<ondrop type="script">
msg ("I really should keep this.")
</ondrop>
<onopen type="script">
</onopen>
<drink type="script">
if (Contains (bottle,water)) {
player.mental = player.mental + 1
player.physical = player.physical + 1
MoveObject (water, sink)
}
</drink>
<selfuseon type="scriptdictionary">
<item key="water">
if (Got(bottle)) {
if (IsSwitchedOn(sink)) {
MoveObject (water, bottle)
}
}
</item>
</selfuseon>
</object>
</object>
<verb>
<property>lookout</property>
<pattern>look out</pattern>
<defaultexpression>"You can't look out " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>use</property>
<pattern>use </pattern>
<defaultexpression>"You can't use " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>flush</property>
<pattern>flush</pattern>
<defaultexpression>"You can't flush " + object.article + "."</defaultexpression>
</verb>
<object name="hallway">
<inherit name="editor_room" />
<description>Its a hallway with mangled bodies, blood, beds and chairs scattered throughout. </description>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hallway</attr>
<attr name="grid_fill">Yellow</attr>
<exit alias="south" to="ward 14">
<inherit name="southdirection" />
</exit>
<exit alias="west" to="hall1">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="hall2">
<inherit name="eastdirection" />
</exit>
<exit alias="north" to="hallway">
<lookonly />
<look>The walls are covered in blood and bullet holes.</look>
</exit>
<object name="wall">
<inherit name="editor_object" />
<scenery />
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<look>blood and bullet holes cover the entire wall.</look>
<use type="boolean">false</use>
</object>
</object>
<object name="hall1">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hall1</attr>
<attr name="grid_fill">Yellow</attr>
<exit alias="east" to="hallway">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="ward 16">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="ward 15">
<inherit name="northdirection" />
</exit>
<exit alias="west" to="hall1">
<inherit name="westdirection" />
<lookonly />
<look>This way is blocked by piled debris and mangled bodies.</look>
</exit>
<object name="exp juice">
<inherit name="editor_object" />
<take />
<drink type="script"><![CDATA[
msg ("You drink the juice<br/>")
player.experience = player.experience + 10
]]></drink>
</object>
</object>
<object name="hall2">
<inherit name="editor_room" />
<description>There is a intake desk along with phone and papers scattered around.</description>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hall2</attr>
<attr name="grid_fill">Yellow</attr>
<firstenter type="script">
msg ("A object flashes past with the sound of clicking nails on the tiled floor tap.")
</firstenter>
<exit alias="west" to="hallway">
<inherit name="westdirection" />
</exit>
<object name="intake desk">
<inherit name="editor_object" />
<inherit name="surface" />
<alt type="stringlist">
<value>desk</value>
</alt>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<hidechildren />
<object name="matches">
<inherit name="editor_object" />
<take />
<takemsg>Now I'll be able to see in the dark.</takemsg>
<open type="boolean">false</open>
<close type="boolean">false</close>
<scenery type="boolean">false</scenery>
<dropmsg>I really shouldn't Ill need these.</dropmsg>
<lightsource />
<lightstrength>weak</lightstrength>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<light type="script">
if (game.pov.parent = ward 16) {
msg ("Humm not much different then the other wards just not window.")
}
msg ("At least I can see a little bit.")
MakeObjectVisible (bottle)
firsttime {
player.experience = player.experience + 8
}
</light>
<look type="script">
picture ("matches.png")
</look>
</object>
</object>
</object>
<verb>
<property>light</property>
<pattern>light</pattern>
<defaultexpression>"You can't light " + object.article + "."</defaultexpression>
</verb>
<object name="ward16a">
<inherit name="editor_room" />
</object>
<object name="corridor">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">corridor</attr>
<description type="script">
</description>
<beforeenter type="script">
</beforeenter>
<beforefirstenter type="script">
play sound ("Dog Growl V2.mp3", true, false)
</beforefirstenter>
<firstenter type="script">
play sound ("Rip Arm Off-SoundBible.com-1079968039.mp3", false, false)
</firstenter>
<object name="dog">
<inherit name="editor_object" />
<inherit name="namedmale" />
<look type="script">
play sound ("Dog Growl V2.mp3", true, false)
msg ("The dog is eatting peoples dead fleah from the rotting carcusses on the floor.")
</look>
</object>
<exit alias="south" to="hall2">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="hall3">
<inherit name="northdirection" />
<locked type="boolean">false</locked>
</exit>
</object>
<object name="room of the dead">
<inherit name="openable" />
<description>{img:dead door.jpg}</description>
<attr name="grid_label">Door of the Dead</attr>
<picture>dead door.jpg</picture>
<attr name="grid_fill">DarkSeaGreen</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_borderwidth" type="int">1</attr>
<take type="boolean">false</take>
<openscript type="script">
</openscript>
<beforeenter type="script">
LockExit
</beforeenter>
<exit alias="west" to="hall3">
<inherit name="westdirection" />
</exit>
</object>
<object name="hall3">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<description type="script">
MakeObjectVisible (room of the dead)
</description>
<beforeenter type="script">
picture ("dead door.jpg")
play sound ("Zombie_Horde-Mike_Koenig-1926300541.mp3", false, false)
</beforeenter>
<exit alias="south" to="corridor">
<inherit name="southdirection" />
</exit>
<exit alias="east" to="room of the dead">
<inherit name="eastdirection" />
<locked />
<lockmessage>This way is blocked by locked chains.</lockmessage>
<attr name="grid_length" type="int">2</attr>
<look type="script">
picture ("dead door.jpg")
</look>
</exit>
</object>
<verb>
<property>fill_bottle</property>
<pattern>fill_bottle</pattern>
<defaultexpression>"You can't fill_bottle " + object.article + "."</defaultexpression>
</verb>
<function name="level_up"><![CDATA[
if (player.experience >= player.level * 10 + 10) {
player.experience = player.experience - (player.level * 10 + 10)
player.level = player.level + 1
switch (player.gender) {
case ("male") {
player.strength = player.strength +1
}
case ("female") {
player.inteligence = player.intelligence + 1
}
}
switch (player.field) {
case ("officer") {
player.intelligence = player.intelligence + 1
player.physical = player.physical + 1
}
case ("doctor") {
player.intelligence = player.intelligence + 2
}
case ("survivalist") {
player.strength = player.strength + 1
player.intelligence = player.intelligence + 1
}
case ("nurse") {
player.heart = player.heart + 1
player.intelligence = player.intelligence + 1
}
case ("military") {
player.stamina = player.stamina + 1
player.physical = player.phyical + 1
player.strength = player.strength + 1
}
}
level_up
}
]]></function>
<timer name="newspaper timer">
<interval>3</interval>
<script>
</script>
</timer>
<timer name="hydryation_timer">
<interval>60</interval>
<enabled type="boolean">false</enabled>
<script>
</script>
</timer>
<timer name="no water timer">
<interval>1</interval>
<script>
</script>
</timer>
</asl>

HegemonKhan
I forgot to explain this too, with trouble shooting:

there's two parts to it:

1. just getting the quest (GUI~Editor) to actually load up. yes, if your game code has errors (our human errors from trying to make our games) in it, the quest engine will prevent this from happening.

2. then, there's the in-game (during actual game play ~ game play mode) errors of "yours" (humans, us game makers) as well to deal with too.

these are not quest glitches, these are our human errors, preventing quest from working (as it can't read our game code, due to our errors in it) properly (or at all ~ ie it doesn't even load up the GUI~Editor).

-------

and this also, probably needs to be explained:

http://quest5.net/wiki/Changing_the_player_object

"player" is your default Player Object

(just as "room" is your default Room Object)

but, you can make more Player Objects, being able to switch between them.

whereas:

game.pov

is whoever is your CURRENT(LY CONTROLLED) Player Object.

for example:

Player Objects:

1. player (default)
2. hk (created~added by you)
3. onimike (created~added by you)

player.strength = player.strength + 5 ~ will only add +5 strength to the "player" Player Object
hk.strength = hk.strength + 5 ~ will only add +5 strength to the "hk" Player Object
onimike.strength = onimike.strength + 5 ~ will only add +5 strength to the "onimike" Player Object

but:

game.pov.strength = game.pov.strength + 5 ~ will add +5 strength to whoever is the current(ly controlled) Player Object. Yes, each Player Character can have their own stats (often as Integer or double type Attributes), inventories (objectlist type Attributes), and displayed stats (Status Attributes ~ stringdictionary type Attributes). So, you got to be careful when~if using: game.pov

game.pov represents ("becomes" to the quest engine) whoever is your current Player Object.

if you're only using a single Player Object, then you can use game.pov or your Player Object's name (such as the default's name of "player")

these are the same thing (if you're only using a single Player Object), you can use whichever you prefer:

msg ("What is your name?")
get input {
game.pov.alias
// blah blah blah more character creation coding~scripts
}


and

msg ("What is your name?")
get input {
player.alias = result // or whatever you changed its name to: your_choosen_name.alias ~ ie: player_1.alias = result ~ ie master_chief_from_Halo_game_err_actually_this_might_be_legally_protected_so_bad_idea_lol.alias = result
// blah blah blah more character creation coding~scripts
}


though, hopefully, you can understand the distinctions of using "game.pov" vs "that specific Player Object's name" when you're using multiple Player Objects... lol. You got to becareful that you do what you want done!

onimike
I will definitely lok at those I got excited earlier because I figured a way to add my "field" type attributes after player is done making their character :) I think im more bypassing or using loop hole rather then doing it excactly right lol but its till fun and most is working now im looking into that combat script you gave trying to cme up with a easier way to just run scripts linked to attributes.. All the help is very much appreciated and used to the best f my ability its a lil difficult to know what symbols t put in where to give you the out come you want, like I said I have a basic idea on how to use every thing but if there is a dictionary on quest with the functions of symbols when type d I would be fine lol. I think.. im gonna go play around with this some more try to figure more of it out lol. thank
Mike

HegemonKhan
laughs, it's not a loophole, you can add attributes (which includes lists ~ your "field" attribute's type, and dictionaries too), anywhere. Having a "character creation" script block for your "game.start" script, is but one way to create your character. This is good, as you seem to be understanding at using quest better~more, hehe.

if you mean this, then here's my own (as in) HIGHLY USED (I did *NOT* write these) vital "Quest Coding Bible" pages~links, lol:

(I refer to these pages~links constantly, as I've not memorized all of them... UGH!, lol)

http://quest5.net/wiki/Category:All_Fun ... t_Commands (page 1, range: A-S)
http://quest5.net/w/index.php?title=Cat ... h#mw-pages (page 2, range: S-Z)

also, you got the search box in the upper right, which you can type anything into, to see if the quest wiki pages has info on it.

Also, don't miss the left side too:

1. Main Page -> this leads to the link for the "guides" (libraries) and other useful info
2. Tutorial (but you know of this already)
3. Script Commands
4. Functions
5. Attribute Types
6. Object Attributes

------------------------------

Pertex (and mine based upon Pertex' code) Combat Coding is very advanced, because it is "RPG turn based like".

For non-turn based, and simplier coding of combat, take a look at Pixie's Combat Library, or if you don't want~need actual combat, you can do the first (of the unknown authors) links, using message and other scripts for doing a "pretend~virtual" battle~fight~combat.

for a "quick" example of much simplified combat (or however you do "verb" scripting correctly, meh, lol):

<asl version="540">

<include ref="English.aslx" />
<include ref="Core.aslx" />

<game name="blah">
<gameid>bbc85c01-6e80-4a71-8abf-c1e870fb5b42</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>

<object name="room">
<inherit name="editor_room" />
</object>

<type name="character_object_type"> // create~add an Object Type: Advanced -> Object Type -> Add
<dead type="boolean">false</dead>
<hit_points type="int">0</hp>
<damage type="int">0</damage>
<experience type="int">0</experience>
<cash type="int">0</cash>
</type>

<turnscript name="global_events_turnscript">
<inherit name="enabled" /> // this means the turnscript is activated at the very start of the game
<script>
game_over_function // in the GUI~Editor this is the "Call Function" script: add a~new script -> Scripts -> "Call function" script
global_game_turns_function // another "Call Function" script
</script>
</turnscript>

<function name="game_over_function">
if (player.hit_points <= 0) {
finish // GAME OVER, you lose the game
}
</function>

<function name="global_game_turns_function">
player.turns = player.turns + 1
</function>

<object name="player">
<parent>room</parent>
<inherit name="defaultplayer" />
<inherit name="character_object_type" />
<turns type="int">0</turns>
<hit_points type="int">999</hit_points> // see below
<physical_damage type="int">100</physical_damage> // see below
</object>

<object name="orc">
<parent>room</parent>
<inherit name="editor_object" />
<inherit name="character_object_type" />
<hit_points type="int">100</hit_points> // this overrides the "0" hp from the inherited attribute "character_object_type"
<physical_damage type="int">50</physical_damage> // see above
<experience type="int">100</experience> // see above
<cash type="int">50</cash>
<verb name="fight"><![CDATA[ // this CDATA coding is for the use of the ">" and "<" as greater~lesser than operators for the quest engine to understand, instead of as for, for example: <object name="orc">
if (orc.dead = true) {
msg (The orc is already dead, silly!")
} else if (orc.dead = false) {
if (orc.hit_points <= 0) {
player.experience = player.experience + orc.experience
player.cash = player.cash + orc.cash
orc.dead = true // this is a "boolean" type attribute
msg ("You won the fight, killing the orc")
} else if (orc.hit_points > 0) {
player.hit_points = player.hit_points - orc.damage
msg ("The orc attacks you, doing" + orc.damage + "damage to you!")
}
on ready { // this causes the below scripts to wait until the above scripts are done
if (player.hit_points <= 0) {
player.dead = true
msg ("The battle is over, as the orc killed you.")
} else if (player.hit_points > 0) {
orc.hit_points = orc.hit_points - player.damage
msg ("You attack the orc, doing" + player.damage + "damage to the orc!")
}
}
}
]]></verb> // the ending of the CDATA coding, which is before, the ending for the verb coding
</object>

</asl>


----------

oh... did you mean all of my abreviation~anacronym terms that I used in my combat code?

(my sincere apologies, I was just focused on getting this code to work way back when I was working on this combat code of mine, that I had forgotten how no one would know what all of these things meant, besides me, lol. I haven't taken the time to rewrite all of them yet, so instead I had just made a key~legend for them, which you can see below, sorry for the inconvience of having to use this to know what is every term that I use, lol)

(I did this combat code quite some time ago, and I learned from this mistake of mine, and have been writing out my terms so that people know what they are, ever since, even if it takes a bit longer, do to having to write more out, and, I actually like it better, as I too forgot what all those abrev terms mean too... lolololol)

01. cc = character creation function
02. sa = status attributes (mainly for implementing/displaying of ' cur / max ' stats) function
03. char = character object type ("pcs", "npcs", "monsters", etc., so, not a room, item, equipment, spell, etc)
04. pc = playable character object type ("player" characters / game.povs)
05. npc = non-playable character ("people", "monsters", and etc, so not a "player" character / not a game.pov, I'm going to have a hostility system, so any npc can be friendly or hostile, instead of having an actual "monster/enemy" type set aside)
06. hp = hit points (life) stat attribute
07. mp = mana points (magic) stat attribute
08. str = strength (physical damage, carry weight / equipment requirement, etc) stat attribute
09. end = endurance (physical defense, and etc) stat attribute
10. dex = dexterity (weapon~attack skill, think of this as "if your attack connects or not, do you 'whiff' or not", so not to gete confused with hc, and etc) stat attribute
11. agi = agility (dodging/evading, and etc) stat attribute
12. spd = speed (who goes first in battle, extra battle turns, escaping from battle, and etc) stat attribute
13. hc = hit chance (think of this more as piercing their armor or not, so not to get confused with dex, and etc) stat attribute
14. pd = physical damage stat attribute
15. fp = fire damage stat attribute
16. wp = water damage stat attribute
17. ap = air damage stat attribute
18. ed = earth damage stat attribute
19. ld = light damage stat attribute
20. dd = dark damage stat attribute
21. pr = physical resistance stat attribute
22. fr = fire resistance stat attribute
23. wr = water resistance stat attribute
24. ar = air resistance stat attribute
25. er = earth resistance stat attribute
26. lr = light resistance stat attribute
27. dr = dark resistance stat attribute
28. defending = boolean (reduces damage done for that character and increases the damage done by that character, if they chosoe to attack on the next turn)
29. escaped = boolean, run from battle (not completed/implemented yet)
30. hostile = boolean, any npc can be friendly or a(n) "monster/enemy", based upon a hostility scale (0-100), but not completed
31. dead = boolean
32. crit_hit = critical hit (bonus damage based upon luck)
33. luck = luck stat attribute
34. lvl = level stat attribute
35. exp = experience stat attribute
36. cash = cash stat attribute (currency)
37. lvlup = level up function


err... some of those spell element attributes have a "p" instead of what sHOULD BE a "d" for damage, my bad...

HegemonKhan
here's a more recent combat coding by me (though it may not be functional still, and it's as a library file, ask and I can help to convert it into a game file for you to see if it works; if it's functional, lol):

(but no mysterious abrev. terms, lol)

<library>

<!-- New Game -->

<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Colloseum">
<gameid>bbc85c01-6e80-4a71-8abf-c1e870fb5b42</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>

<!-- Object Types -->

<type name="character_object_type">

<strength type="int">0</strength>
<endurance type="int">0</endurance>
<dexterity type="int">0</dexterity>
<agility type="int">0</agility>
<speed type="int">0</speed>
<intelligence type="int">0</intelligence>
<spirituality type="int">0</spirituality>
<mentality type="int">0</mentality>
<piety type="int">0</piety>
<luck type="int">0</luck>

<dead type="boolean">false</dead>

<undead type="boolean">false</undead>

<defending type="boolean">false</defending>
<casting type="boolean">false</casting>

<experience_points type="int">0</experience_points>
<cash type="int">0</cash>
<level type="int">0</level>
<level_up_points type="int">0</level_up_points>
<attribute_points type="int">0</attribute_points>

<health_points type="string">0/0</health_points>
<mana_points type="string">0/0</mana_points>

<current_health_points type="int">0</current_health_points>
<maximum_health_points type="int">0</maximum_health_points>
<current_mana_points type="int">0</current_mana_points>
<maximum_mana_points type="int">0</maximum_mana_points>

</type>

<!-- Turnscripts -->

<turnscript name="global_events_turnscript">
status_attributes_function
level_up_function
game.turns = game.turns + 1
</turnscript>

<!-- Commands -->

<command name="fight_command">
<pattern>fight #text#</pattern>
<script>
fight_function (game.pov,text)
</script>
</command>

<command name="level_up_system_command">
<pattern>lvlup</pattern>
<script>
level_up_system_function
</script>
</command>

<!-- Functions -->

<function name="fight_function" parameters="self,text">
enemy=GetObject(text)
if (enemy=null) {
foreach (obj,AllObjects()) {
if (obj.alias=text) {
enemy=obj
} else {
msg ("There seemingly is no " + text + " here.")
}
}
} else if (not check_reachable_function (enemy) = true) {
msg ("There seemingly is no " + enemy.alias + " here.")
} else if (not DoesInherit (enemy,"character_object_type")) {
msg (enemy.alias + "is seemingly not something that you can battle.")
} else if (GetBoolean (enemy,"hostile") = false) {
msg (enemy.alias + " is seemingly not something that you can battle.")
} else if (GetBoolean (enemy,"dead") = true) {
msg (enemy.alias + " is already dead.")
} else {
battle_sequence_function (self,enemy)
}
</function>

<function name="battle_sequence_function" parameters="self,enemy"><![CDATA[
if (enemy.dead=false or self.escaped=false) {
you_go_first=false
if (GetInt (self,"speed") > GetInt (enemy,"speed") {
you_go_first=true
} else if (GetInt (self,"speed") = GetInt (enemy,"speed") and RandomChance (50)=true) {
you_go_first=true
}
if (you_go_first=true) {
msg ("You get to go first for this round")
self_battle_turn_function (self,enemy)
on ready {
if (not enemy.dead=true or not self.escaped=true){
enemy_battle_turn_function (self,enemy)
}
}
} else {
msg (enemy.alias + " gets to go first for this round.")
enemy_battle_turn_function (self,enemy)
on ready {
if (not enemy.dead=true or not self.escaped=true){
msg ("It is now your turn.")
self_battle_turn_function (self,enemy)
}
}
}
on ready {
msg ("The round has ended.")
battle_sequence_function (self,enemy)
}
} else {
msg ("The battle is over.")
}
]]></function>

<function name="self_battle_turn_function" parameters="self,enemy"><![CDATA[
msg (self.alias + " has " + self.current_health_points + " HP left.")
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
wait {
show menu ("What is your battle choice?", split ("Attack;Defend;Cast;Item;Run", ";"), false) {
switch (result) {
case ("Attack") {
self_attack_failed = false
if (RandomChance (GetInt (enemy,"agility") - GetInt (self,"speed")) = true) {
msg (enemy.alias + "evaded your attack!")
self_attack_failed = true
self.defending = false
} else if (RandomChance (GetInt (enemy,"dexterity") - GetInt (self,"agility")) = true) {
msg (enemy.alias + "parried your attack!")
self_attack_failed = true
self.defending = false
} else if (RandomChance (GetInt (enemy,"agility") - GetInt (self,"dexterity")) = true) {
msg (enemy.alias + "blocked your attack!")
self_attack_failed = true
self.defending = false
} else if (RandomChance (GetInt (self,"dexterity") - GetInt (enemy,"speed")) = false) {
msg ("Your attack missed " + enemy.alias +"!")
self_attack_failed = true
self.defending = false
} else if (RandomChance (GetInt (enemy,"armor_class") - GetInt (self,"attack_rating")) = true) {
msg ("Your attack failed to penetrate " + enemy.alias +"!")
self_attack_failed = true
self.defending = false
} else if (self_attack_failed = false) {
if (self.defending = true and enemy.defending = true) {
enemy.current_health_points = enemy.current_health_points - (critical_hit_function (self) * 2 * GetInt (self,"physical_damage") / 2 + GetInt (self,"physical_damage") * (GetInt (self,"strength") - GetInt (enemy,"endurance")) / 100)
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
self.defending = false
} else if (self.defending = true and enemy.defending = false) {
enemy.current_health_points = enemy.current_health_points - (critical_hit_function (self) * 2 * GetInt (self,"physical_damage") + GetInt (self,"physical_damage") * (GetInt (self,"strength") - GetInt (enemy,"endurance")) / 100)
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
self.defending = false
} else if (self.defending = false and enemy.defending = true) {
enemy.current_health_points = enemy.current_health_points - (critical_hit_function (self) * GetInt (self,"physical_damage") / 2 + GetInt (self,"physical_damage") * (GetInt (self,"strength") - GetInt (enemy,"endurance")) / 100)
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
} else if (self.defending = false and enemy.defending = false) {
enemy.current_health_points = enemy.current_health_points - (critical_hit_function (self) * GetInt (self,"physical_damage") + GetInt (self,"physical_damage") * (GetInt (self,"strength") - GetInt (enemy,"endurance")) / 100)
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
}
}
}
case ("Defend") {
msg ("You defend yourself against " + enemy.alias)
self.defending = true
}
case ("Cast") {
self.defending = false
}
case ("Item") {
self.defending = false
}
case ("Run") {
self.defending = false
self.escaping = true
}
}
if (GetInt (enemy,"current_health_points") > 0) {
if ( RandomChance (GetInt (self,"speed") - GetInt (enemy,"speed"))= true) {
msg ("You get an extra battle turn!")
self_battle_turn (self,enemy)
} else {
msg ("Your battle turn is over.")
}
} else if (GetInt (enemy,"current_health_points") <= 0) {
msg (enemy.alias + " is dead.")
msg ("You have won the battle!")
self.defending = false
self.escaping = false
enemy.defending = false
enemy.dead = true
}
}
}
]]></function>

<function name="enemy_battle_turn_function" parameters="self,enemy"><![CDATA[
msg (self.alias + " has " + self.current_health_points + " HP left.")
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
result = GetRandomInt (1,3)
switch (result) {
case (1) {
enemy_attack_failed = false
if (RandomChance (GetInt (self,"agility") - GetInt (enemy,"speed")) = true) {
msg ("You have evaded the attack!")
enemy_attack_failed = true
enemy.defending = false
} else if (RandomChance (GetInt (self,"dexterity") - GetInt (enemy,"agility")) = true) {
msg ("You have parried the attack!")
enemy_attack_failed = true
enemy.defending = false
} else if (RandomChance (GetInt (self,"agility") - GetInt (enemy,"dexterity")) = true) {
msg ("You have blocked the attack!")
enemy_attack_failed = true
enemy.defending = false
} else if (RandomChance (GetInt (enemy,"dexterity") - GetInt (self,"speed")) = false) {
msg (enemy.alias +"'s attack missed!")
enemy_attack_failed = true
enemy.defending = false
} else if (RandomChance (GetInt (self,"armor_class") - GetInt (enemy,"attack_rating")) = true) {
msg ("You weren't penetrated by the attack!")
enemy_attack_failed = true
enemy.defending = false
} else if (enemy_attack_failed = false) {
if (enemy.defending = true and self.defending = true) {
self.current_health_points = self.current_health_points - (critical_hit_function (enemy) * 2 * GetInt (enemy,"physical_damage") / 2 + GetInt (enemy,"physical_damage") * (GetInt (enemy,"strength") - GetInt (self,"endurance")) / 100)
msg (self.alias + " has " + self.cur_hp + " HP left.")
enemy.defending = false
} else if (enemy.defending = true and self.defending = false) {
self.current_health_points = self.current_health_points - (critical_hit_function (enemy) * 2 * GetInt (enemy,"physical_damage") + GetInt (enemy,"physical_damage") * (GetInt (enemy,"strength") - GetInt (self,"endurance")) / 100)
msg (self.alias + " has " + self.current_health_points + " HP left.")
enemy.defending = false
} else if (enemy.defending = false and self.defending = true) {
self.current_health_points = self.current_health_points - (critical_hit_function (enemy) * GetInt (enemy,"physical_damage") / 2 + GetInt (enemy,"physical_damage") * (GetInt (enemy,"strength") - GetInt (self,"endurance")) / 100)
msg (self.alias + " has " + self.current_health_points + " HP left.")
} else if (enemy.defending = false and self.defending = false) {
self.current_health_points = self.current_health_points - (critical_hit_function (enemy) * GetInt (enemy,"physical_damage") + GetInt (enemy,"physical_damage") * (GetInt (enemy,"strength") - GetInt (self,"endurance")) / 100)
msg (self.alias + " has " + self.current_health_points + " HP left.")
}
}
}
case (2) {
msg (enemy.alias + " has choosen to defend itself.")
enemy.defending = true
}
case (3) {
enemy.defending = false
msg ("Cast")
}
}
if (GetInt (self,"current_health_points") > 0) {
if (RandomChance (GetInt (enemy,"speed") - GetInt (self,"speed")) = true) {
msg (enemy.alias + " gets an extra battle turn!")
wait {
enemy_battle_turn (self,enemy)
}
} else {
msg (enemy.alias + " 's battle turn is over.")
}
} else if (GetInt (self,"current_health_points") <= 0) {
msg (self.alias + " has died.")
msg ("GAME OVER")
finish
}
]]></function>

<function name="check_reachable_function" parameters="enemy" type="boolean">
foreach (obj,ScopeReachableNotHeld ()) {
if (obj=enemy) {
value = true
} else {
value = false
}
}
return (value)
</function>

<function name="critical_hit_function" parameters="target" type="int">
if (RandomChance (GetInt (target,"luck")) = true) {
value = 2
} else {
value = 1
}
return (value)
</function>

<function name="level_up_function"><![CDATA[
if (game.pov.experience_points >= game.pov.level * 100 + 100) {
game.pov.experience_points = game.pov.experience_points - (game.pov.level * 100 + 100)
game.pov.attribute_points = game.pov.attribute_points + 5
game.pov.level_up_points = game.pov.level_up_points + 1
game.pov.level = game.pov.level + 1
level_up_function
}
]]></function>

<function name="level_up_system_function"><![CDATA[
if (game.pov.level_up_points > 0) {
if (game.pov.attribute_points > 0) {
show menu ("What attribute would you like to raise?",split("strength;endurance;dexterity;agility;speed;intelligence;spirituality;mentality;piety;luck",";"),false) {
switch (result) {
case ("strength") {
msg ("How many points?")
get input {
game.pov.points=result
}
}
}
}
]]></function>

<function name="status_attributes_function">
game.pov.health_points = game.pov.current_health_points + "/" + game.pov.maximum_health_points
game.pov.mana_points = game.pov.current_mana_points + "/" + game.pov.maximum_mana_points
</function>

<function name="shop_function">
</function>

</library>

onimike
here is a quick combat I made still has bugs but I think im on the right track. thank you for all the links because its a lil nerve wrecking lol. but I will look into the rest in morning thanks again man.
Mike

P.S. can you look over this and tell me why my game is not stoping when life attribute reaches 0 because I believe I have every thing in the right place but if I did it would be working right lol

HegemonKhan
ya, when I was a total noob, just all the terms was "information overload", I was so confused as to what was an "element", a "script", a "command", a "function", an "object", and etc... lol.

I'm giving you way too much advanced stuff and just too much stuff, take it slow, find something very simple (for example, I started my code learning with the "character creation" scripting, and you can see my progress, by the way, in my thread: ~ " Noob HK's Help Me Thread, or something like this, lol. I've been using quest for maybe a year now... slowly learning to code)

---------

sure, let me look at it now ;)

------

P.S.

always go back and look at my previous posts again, as I usually edit them often, adding in more stuff or just fixing them up of mistakes.

HegemonKhan
here's is my edited code of your game file:

(if this isn't what you wanted, let me know, and I'll fix it up to what you had wanted to be done in it)

<!--Saved by Quest 5.4.4840.17608-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="nm">
<gameid>46538ab8-34a9-4af7-b16a-692260fd7984</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="defaultplayer" />
<statusattributes type="stringdictionary">
<item>
<key>turns</key>
<value></value>
</item>
<item>
<key>attack</key>
<value></value>
</item>
<item>
<key>defend</key>
<value></value>
</item>
<item>
<key>life</key>
<value></value>
</item>
</statusattributes>
<turns type="int">0</turns>
<life type="int">5</life>
<attack type="int">5</attack>
<defend type="int">3</defend>
</object>
<object name="hostile">
<inherit name="editor_object" />
<life type="int">5</life>
<attack type="int">4</attack>
<defend type="int">4</defend>
<dead type="boolean">false</dead>
<fight type="script"><![CDATA[
if (hostile.dead=false) {
if (RandomChance(50)=true) {
player_damage = player.attack - hostile.defend
on ready {
if (player_damage < 0) {
player_damage = 0
}
on ready {
hostile.life = hostile.life - player_damage
msg ("You hit it for " + player_damage + " damage, and it has only " + hostile.life + " life left.")
on ready {
if (hostile.life <= 0) {
msg ("You killed it, and gained some stats too!")
player.life = player.life + 2
player.attack = player.attack +1
hostile.dead = true
}
}
}
}
} else {
msg ("")
msg ("Carefull!")
msg ("")
msg ("Hostile lashes at you!")
hostile_damage = hostile.attack - player.defend
on ready {
if (hostile_damage < 0) {
hostile_damage = 0
}
on ready {
player.life = player.life - hostile_damage
msg ("Shit that hurt!")
msg ("Hostile hit you for " + hostile_damage + " damage, and you now have only " + player.life + " life left.")
on ready {
if (player.life <= 0) {
msg ("You are dead")
finish
}
}
}
}
}
}
else {
msg ("Hostile is already dead, silly!")
}
]]></fight>
<look type="script">
msg ("Life: " + hostile.life)
msg ("Attack: " + hostile.attack)
msg ("Defend: " + hostile.defend)
</look>
</object>
</object>
<verb>
<property>fight</property>
<pattern>fight</pattern>
<defaultexpression>"You can't fight " + object.article + "."</defaultexpression>
</verb>
<turnscript name="global_events_turnscript">
<enabled />
<script>
player.turns = player.turns + 1
</script>
</turnscript>
</asl>


and here's your own original game code:

<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="nm">
<gameid>46538ab8-34a9-4af7-b16a-692260fd7984</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<description type="script">
</description>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<statusattributes type="stringdictionary">
<item>
<key>attack</key>
<value>5</value>
</item>
<item>
<key>defend</key>
<value>3</value>
</item>
<item>
<key>life</key>
<value></value>
</item>
</statusattributes>
<life type="int">5</life>
</object>
<object name="hostile">
<inherit name="editor_object" />
<life type="int">5</life>
<attack type="int">4</attack>
<defend type="int">4</defend>
<fight type="script">
if (RandomChance(50)) {
player.attack = hostile.defend
msg ("You hit him for 1 damage!")
hostile.life = hostile.life - 1
if (hostile.life = 0) {
msg ("You killed it!")
player.life = player.life + 2
player.attack = player.attack +1
}
}
else {
msg ("Carefull!")
}
msg ("He lashes back!")
if (RandomChance(47)) {
hostile.attack = player.defense
msg ("Shit that hurt!")
player.life = player.life - 2
if (player.life = 0) {
msg ("You are dead")
finish
}
}
else {
msg ("Missed me!")
}
</fight>
</object>
</object>
<verb>
<property>fight</property>
<pattern>fight</pattern>
<defaultexpression>"You can't fight " + object.article + "."</defaultexpression>
</verb>
</asl>


and my edited version of you game file is an attachment below as well:

onimike
Oh wow you sir are Awesome its exactly what I was looking for something simple that works well and (lol I would of never thought to put it in that way as you have idk why but its seems easy until your trying to do something then it becomes a whirlwind of scripts and correct wording lol) that I don't have to add to much to make combat a choice in game. Another ? though, if my game is complete and this is my base for all combats will you be able to just walk around the guy and him not hit you, because hostile only hits when you press "fight" key right? I really wish I knew how to code I think this whole thing would be a lot easier just to directly put in what you want :)
thanks again Khan for taking the time to review my work can't tell how helpful you have been, honestly if it was left to me I would have got frustrated by not being able to work the program probably quit and deleted it lmao.

Mike

HegemonKhan
I did change up your fight verb a bit, so it may not do exactly as you wanted it to do, so you might want to examine~test it carefully, to see if it's not set up to how you wanted it to be ~ if it's not doing something that you wanted it to do. Unfortunately, I don't know what you wanted out of it, so you'll have to try to figure out if I got it doing what you wanted or if not, lol.

-------------------------

you can do all of this stuff via the GUI~Editor too, it's just easier~quicker to use code when helping someone with something.

Just open up your game, and you can see how it's set up ~ done ~ in the GUI~Editor, though you'll have to find or figure out how or where to do those things in the GUI~Editor.

If you don't like working with the code, then stay with the GUI~Editor, as Alex has worked on it to make it really user friendly. But, doing this more advanced stuff that you're asking for, isn't so intuitive in how to set it up in the GUI~Editor, along with just the "brain~mental logic" of thinking that you need to develop too (and this takes a awhile, as it's very different from how you think in other subjects, even math).

Well, we created~used a Verb, which is only activated by pressing the button (or clicking on the text hyperlink).

All, you would have to do, is to put the script block that we used for the Verb, into a different location such as the "on entering room -> [RUN A SCRIPT]" (one of the tabs for Room Objects has this, too lazy to open up quest to see which one). And this is but one way to force a battle. (You can even have objects, like monsters ~ ie your "Hostile" or npcs ~ ie "townspeople", follow you around. So, you could have your "Hostile" monster Object immediately attack~fight your character upon entering a room, as well as following you to the next room, and attacking~fighting you there too, and this would continue until either it or you are dead, hehe)

This is a quick way to implement "following" (Credit goes to Sgreig for his "Following Code"):

(I'll try to help you via the GUI~Editor, but it takes so much more time to do it this way... sighs)

"Orc" or your "Hostile" (Object) -> Attributes (Tab) -> Attributes -> Add ->

Name: following
Type: boolean
Value: false

"Orc" or your "Hostile" (Object) -> Verbs (Tab) -> add -> fight (let's say we're using our fight verb that we just made) ->

we'll put it at the almost, "if (hostile.dead = false)" comes first, unless you want its ghost or corpse to follow you, lol) beginning of our fight Verb's script block (sorry, going to do this in code, as it's quick to do so, lol):

to use a boolean in the GUI~Editor, (I think) you do this:

Add a~new script -> Scripts -> If ->
Add a~new script -> Variables -> Set a variable or attribute -> hostile.following = false ->
->-> Add a~new script -> Variables -> Set a variable or attribute -> hostile.following = true

~OR (I think) ~

Add a~new script -> Scripts -> If ->
(whatever the path is for this) SetObjectFlagOff (and set it up to match this: hostile.following=false) ->
-> (whatever the path is for this) SetObjectFlagOn (and set it up to match this: hostile.following=true)

(also, we need to put in a script for when the orc is dead, to change its "following" boolean~flag attribute to be set as false)

<fight type="script"><![CDATA[
if (hostile.dead=false) {
if (hostile.following = false) {
hostile.following = true
}
if (RandomChance(50)=true) {
player_damage = player.attack - hostile.defend
on ready {
if (player_damage < 0) {
player_damage = 0
}
on ready {
hostile.life = hostile.life - player_damage
msg ("You hit it for " + player_damage + " damage, and it has only " + hostile.life + " life left.")
on ready {
if (hostile.life <= 0) {
msg ("You killed it, and gained some stats too!")
player.life = player.life + 2
player.attack = player.attack +1
hostile.following = false
hostile.dead = true
}
}
}
}
} else {
msg ("")
msg ("Carefull!")
msg ("")
msg ("Hostile lashes at you!")
hostile_damage = hostile.attack - player.defend
on ready {
if (hostile_damage < 0) {
hostile_damage = 0
}
on ready {
player.life = player.life - hostile_damage
msg ("Shit that hurt!")
msg ("Hostile hit you for " + hostile_damage + " damage, and you now have only " + player.life + " life left.")
on ready {
if (player.life <= 0) {
msg ("You are dead")
finish
}
}
}
}
}
}
else {
msg ("Hostile is already dead, silly!")
}
]]></fight>


we've set up the boolean="flag" to be set to true upon clicking on the fight verb, so now in our "on enter room":

In GUI~Editor:

"room_2" Room Object -> whatever_the_tab (Tab) -> "On Enter Room" -> Run a script ->

Add a~new script -> Scripts -> If ->
Add a~new script -> Variables -> Set a variable or attribute -> hostile.following = true // or: (whatever the path is for this) SetObjectFlagOn (and set it up to match this: hostile.following=true)
-> Add a~new script -> Scripts -> If ->
-> Add a~new script -> Variables -> Set a variable or attribute -> orc.parent ("not equal" = "<>") player.parent // a "parent" means the room (or other Object, such as a "cash" Object in a "wallet" Object) that an Object is in. The "wallet" Object would be the "parent" Object of the "cash" Object, and the "cash" Object would be the "child" Object of the "wallet" Object. Also, there's probably another way to do this via the GUI~Editor, like maybe: Add a~new script -> Objects -> HasObject ~ something like this
->-> Add a~new script -> Variables -> Set a variable or attribute -> orc.parent = player.parent

In code:

OnEnterRoom (however you do~get this in code, lol):

if (orc.following=true) {
if (not orc.parent = player.parent) {
orc.parent = player.parent
}
}


------------------

P.S.

if you want to learn to code (ie work with the code), then start small and simple, understand it, and then try to understand something else, gradually you'll learn to code more and more:

you can see this progression of mine in the ~"Noob HK Help Me Thread"

this is how I started and progressed:

1. The Tutorial: go through ALL~most of it, being able to do everything successfully
1.5. If you can't understand~read the code, then ask me, and I can gladly help you with it.*
2. "Character Creation" code: study it, understand it, do~write it from memory and have it work successfully. Though the ending message~description line takes forever to understand it enough that you can get it to work, lol. This is a hard part of the "character creation" code.
3. find some other very simple code as you can (such as the libraries or within this discussion forum's threads and its posts), and master it.
4. continue to do this, as you're building a larger knowledge base of coding ways and means
5. then gradually try to move onto harder codes, and try to learn other codes at this same harder level of coding.
6. then move onto an even harder level of coding.
7. once you feel you got some coding skills, try to do whatever you want to try to do in code yourself.
8. just keep it up, work at one thing at a time, take it slow, and be gradual in your move onto a higher level of code skill that is required.
9. also, try to help others, as it helps you learn new things or jus helps you get better at coding.
10. ask others for help (I'd be happy to help you learn to code! it help me too, hehe)

*why not, let's start here:

first, how to view your game code, there's two ways:

1. In the GUI~Editor, at the top, there's a menu bar, click on the notepaper like button (it's between the "play" and "?~help" buttons. This is a toggle button to go between the GUI~Editor mode and the Code View mode.

2. just open up your game file with notepad, wordpad, or notepad++

if you're going to work with code, you *MUST* get (and use) this (it makes coding: reading, writing, and trouble shooting so much easier):

http://notepad-plus-plus.org/

then, open it up, and at the top click on "languages", and select "XML", which will color code everything correctly for you!

<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>


This is the default code of a new game.

<asl version="540"> is the version of quest and this (asl) is the beginning line of the quest game code
</asl> is the ending line of the quest game code

all code, everything, has to be between these two lines above for a Game File (and it's file uses: your_game_file_name.aslx)

to make a Library File (it too uses the same extension of ".aslx": your_library_file_name.aslx), however, it's slightly different coding:

<library> // beginning line of your library file
// all code, everything, has to be in between these two library lines
</library> // ending line of your library file

pretty simple right? don't worry for right now though about how to use a library file or what it is. Well, for now, think of it as a way to work on your code stuff and store it. you can have your library file hold code, which you can then use to copy and paste it over to your game file, if or when you want to have that code in your game file. if you are interested though, think of a library file as like a patch or expansion pack or a mod, such as for games (if you're a gamer). A library file is simple a file of code, which you can then add that library (and thus its code; which can add code, change code, or remove code) to your game file.

anyways, back to explaining the default new game code, lol

these below are your default added libraries:

<include ref="English.aslx" />
<include ref="Core.aslx" />

the "english" library file provides your game its "english" text-font-characters-language

the "core" library file is Alex' core code (such as all the pre-built stuff like your "take" or "drop", and much more), that runs everything behind the scenes.

this core code can be seen in the GUI~Editor:

Filter (very bottom left corner, on the left side, the "tree of stuff") -> Show Library Elements -> click on it so that it has a check mark.

all of the core code, will be in the left side, the "tree of stuff", as light grey colored font~text. you can change this code code stuff too, just click on something (like "take"), and then in the right side, in the ~ upper right, click on the copy button. this allows you to change the core code, while at the same time keeping it intact too (to keep quest safe, so you don't have to re down load it again due to messing it up).

anyways, back to the default new game code, lol

<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>

This is your Game Object with its stuff~"attributes" inside.

"gameid" should be self explanatory, all games (and also all "name" attributes too) must be unique, so that the quest engine isn't confused. think of quest as the government, what if two people had the same fingerprint or ID card or two homes with the same address or two phone lines using the same numbers, or whatever other identifier? it would have a serious problem!

ID = "name" attribute in quest; this must be unique

"what we think of as a name" = "alias" attribute in quest, this does not have to be unique, you can have multiple Objects with the same "alias" attribute

<version>1.0</version> is just an attribute that you can change, to keep track of your updates to your game file.

<firstpublished>2013</firstpublished> see above; an info attribute for you and others

In the GUI~Editor:

Game (the Game Object) -> Setup (Tab) ~ Script (Tab) ~ Room Descriptions (Tab) ~ Player (Tab) ~ Display (Tab) ~ Attributes (Tab)

try doing~adding something in the Setup (Tab), save your game, then go into Code View, and see how your change is done as code! See how the GUI~Editor matches up to its code equivalent.

you should see some more code lines now in your:

<game name="blah">
</game>

go to your Script (Tab) and add in a Start script (such as a character creation scripting~coding), save game, and switch to Code View, you should now have this:

<game name="blah">
// blah coding
<start type="script">
// blah coding
</start>
// blah coding
</game>

/blah coding


test anything you want in the GUI~Editor, then see what happens in Code View, this is a good way to learn code too, though it is slow ~ time consuming process... lol

and I'm getting tired, but I think you now have an idea to read~understand anything in coding now... well somethings you may not know still, but just ask about them (such as maybe, for example, what the, <inherit name="editor_room">, means, hehe).

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums