easy one..
cainj
19 Apr 2013, 20:07I been using quest for some time.. drifted away for a bit while I was playing some fo the new games that came out. But now IM back and oh boy - lots of nice changes in the engine since 4.0 LOL
Here is my question:
I want to make a room that acts as a character initialization. I see the program has added a status feature - very nice. I set 3 stats, skill, stamina and luck. default is zero. When the game starts I want to up date those with a random number.
The random number part I get.
What I dont get is where are those vars stored at? i tried name->object->player-> but the list doest show the three stats mentioned above. I am sure I am going about this all wrong. so if someone canpoint me in the right dir.. that would be great.
Here is my question:
I want to make a room that acts as a character initialization. I see the program has added a status feature - very nice. I set 3 stats, skill, stamina and luck. default is zero. When the game starts I want to up date those with a random number.
The random number part I get.
What I dont get is where are those vars stored at? i tried name->object->player-> but the list doest show the three stats mentioned above. I am sure I am going about this all wrong. so if someone canpoint me in the right dir.. that would be great.

jaynabonne
19 Apr 2013, 20:26From what I can see, it seems the editor just adds the status strings into the status pane. It's up to you to actually create the variables in the player.
Sora574
19 Apr 2013, 21:07I'm not sure what you're asking...
Do you mean, how do you add a random status integer? Or are you trying to recall the number?
I'm probably way off... Could you explain?
Do you mean, how do you add a random status integer? Or are you trying to recall the number?
I'm probably way off... Could you explain?
HegemonKhan
20 Apr 2013, 12:52if you can't work with code, let me know
also, this has some more cool stuff with using status attributes
Credit goes to Pixie, as this is his~her code
for the random number inclusion:
if you only want it to happen once, then use this:
Game -> Scripts -> Start Script
otherwise, you can plug the random number script into the turnscript, but it's going to be executed~run~used every turn, lol.
also, this has some more cool stuff with using status attributes
Credit goes to Pixie, as this is his~her code
<asl version="530">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>cd102f9d-370a-4bda-b6ea-ca42288f619c</gameid>
<version>1.0</version>
<turns type="int">0</turns>
<hp>0 / 0</hp>
<statusattributes type="stringdictionary">turns = ;hp = </statusattributes>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
<curhp type="int">250</curhp>
<maxhp type="int">500</maxhp>
</object>
</object>
<turnscript name="turns_turnscript">
<enabled />
<script>
game.hp = game.pov.curhp + " / " + game.pov.maxhp
game.turns = game.turns + 1
</script>
</turnscript>
</asl>
for the random number inclusion:
if you only want it to happen once, then use this:
Game -> Scripts -> Start Script
otherwise, you can plug the random number script into the turnscript, but it's going to be executed~run~used every turn, lol.
Sora574
20 Apr 2013, 14:12@HK instead of using a maxhp, you could do this in the status attributes (which should be in the player... the game shouldn't have to keep track of statuses for you)
Then you could change the max later, if you want, like this:
I don't know which way would be easier... But you could just use a changedhp script for that, so you don't go under 0, and you wouldn't need a turn script for anything.
<statusattributes>hp=!/500</statusattributes>
Then you could change the max later, if you want, like this:
dictionary remove (game.pov.statusattributes, "hp")
dictionary add (game.pov.statusattributes, "hp", "!/600")
I don't know which way would be easier... But you could just use a changedhp script for that, so you don't go under 0, and you wouldn't need a turn script for anything.
HegemonKhan
20 Apr 2013, 20:57thank you, that's much more useful and less cluttering of scripts too 
