Author Topic: game time as variable in field?  (Read 1299 times)

Tenko Kuugen

  • Public Enemy
  • No life
  • *
  • Posts: 1427
  • Karma: 0
    • View Profile
    • Twitter
game time as variable in field?
« on: 2012-09-06 04:12:45 »
does the game keep track of time as a variable such as gamemoment or battlecount / escapecount?
if yes, which variable is that?
specifically, i'd need a variable that runs only seconds
« Last Edit: 2012-09-06 11:31:23 by KuugenTheFox »

NFITC1

  • No life
  • *
  • Posts: 2843
  • Karma: 71
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: game time as variable in field?
« Reply #1 on: 2012-09-06 12:31:55 »
indeed it does. It's at 0xBB6 in the save game structure. That's accessible in-battle, but I don't know how the field references those addresses.

Tenko Kuugen

  • Public Enemy
  • No life
  • *
  • Posts: 1427
  • Karma: 0
    • View Profile
    • Twitter
Re: game time as variable in field?
« Reply #2 on: 2012-09-06 20:58:18 »
indeed it does. It's at 0xBB6 in the save game structure. That's accessible in-battle, but I don't know how the field references those addresses.

I'll ask myst6re, if anyone knows than her / him
thanks for asnwering. save game map is sadly not useful since I need to run a constant check on if even then, if = 0
well, what I have now works too but its a little clumsier

NFITC1

  • No life
  • *
  • Posts: 2843
  • Karma: 71
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: game time as variable in field?
« Reply #3 on: 2012-09-06 21:50:33 »
Oh, well yeah. Either way, the value is continually updated in memory. I just don't know where the save block starts.

Tenko Kuugen

  • Public Enemy
  • No life
  • *
  • Posts: 1427
  • Karma: 0
    • View Profile
    • Twitter
Re: game time as variable in field?
« Reply #4 on: 2012-09-06 22:17:30 »
right now I'm using IF battlecount & 1, then
execute script 30 from group cloud ( my randomizer )

now, the extern script sets battlecount = battlecount +1 so the script doesnt loop but it fires after every battle due to this ( as intended )

the external script puts the battlecount into an empty unsigned 16 bit variable and then it gets cut down to <100 and from there it runs four IFs

the one and only problem with this is: the script only hits after a battle and the battlecount is multiplied by two.

alternatives I tried were steps and stuff like gil but they trigger the script way too often and it breaks other stuff.
optimal would be if I could have it trigger every 15 seconds but I dont know if its possible to do this without gigantic annoying scripts