Author Topic: How to call variables in an IRO's .xml file?  (Read 414 times)

Jairus

  • *
  • Posts: 66
    • View Profile
How to call variables in an IRO's .xml file?
« on: 2021-06-20 17:38:15 »
Hi, all. Been working on a mod for a while now - graphics and gameplay, that sort of thing - and for part of I want the player to able to switch at times between two different elements that use the same files. To be more specific, part of the mod involves making Jessie playable the same way it was done in the mod that adds her to the Reactor 1 mission - overriding Tifa's name, avatar, and battle model with Jessie's. Now, during the Midgar portion of the game, I know PPV would be fine since it wouldn't make sense to be able to switch between them at that point. However, Jessie will survive the plate collapse (along with Biggs and Wedge) and later on join the group. It's at that point that I'd like the player to, through certain dialogue options (and variables being set/unset), be able to switch between Tifa and Jessie. I think I've figured out how to do most of it, but I'm not sure how to call out a specific variable in the mod's .xml file to tell the game when to use which set of files for Tifa/Jessie (aside from PPV, which I've seen done in the Jessie mod's file). How are other variables referenced in the .xml file? Because it doesn't seem to be the same as in Makou Reactor. Thanks for your help.

markul

  • *
  • Posts: 122
    • View Profile
Re: How to call variables in an IRO's .xml file?
« Reply #1 on: 2021-06-20 18:44:11 »
Hi,
If you want to check other vars (not included in 7th heaven) u need to identify them with hex address.
Something like this in .xml:
#This checks  var 1-95 to change between 2 folders

<Conditional Folder="Transforma\Aeris\Armadura" ActiveWhen="gameplay = 1" >
      <RuntimeVar Var="Byte:0xDC093B" Values="1" />
   </Conditional>
   <Conditional Folder="Transforma\Aeris\Angel" ActiveWhen="gameplay = 1" >
      <RuntimeVar Var="Byte:0xDC093B" Values="2" />
   </Conditional>

#This checks var 1-96  to change between 2 folders
<Conditional Folder="Transforma\Barret\Armadura" ActiveWhen="gameplay = 1" >
      <RuntimeVar Var="Byte:0xDC093C" Values="1" />
   </Conditional>
   <Conditional Folder="Transforma\Barret\ArmaduraUltima" ActiveWhen="gameplay = 1" >
      <RuntimeVar Var="Byte:0xDC093C" Values="2" />
   </Conditional>

If you go to the 7th heaven folder, in 7th heaven.var, you can check all the variables that 7th heaven already declared , and what are his hex address.

EDIT: Dont use the variable from Aeris ,it seems that this var is used for timer  xD
« Last Edit: 2021-08-07 16:11:50 by markul »

Jairus

  • *
  • Posts: 66
    • View Profile
Re: How to call variables in an IRO's .xml file?
« Reply #2 on: 2021-06-20 23:41:35 »
Thanks, I'll check that out. I'm sure there's one included in 7H that I can use.  :)

How do you ID a variable's hex address?
« Last Edit: 2021-06-20 23:51:09 by Jairus »

markul

  • *
  • Posts: 122
    • View Profile
Re: How to call variables in an IRO's .xml file?
« Reply #3 on: 2021-06-21 20:40:35 »
Thanks, I'll check that out. I'm sure there's one included in 7H that I can use.  :)

How do you ID a variable's hex address?
Searching and calculating xD
In my case,the first time ,i  saw the vars that already use 7th heaven in the file .var and i searched one of them with makou reactor (for example a key item) . With that, you can calculate the hex address of previous or next vars .
Like the example that i give you,  the var 1:95 is the Hex address "0xDC093B"  and the next variable (1:96) is "0xDC093C".


EDIT: Dont use the variable  1:95 from Aeris ,it seems that this var is used for timer  xD

« Last Edit: 2021-08-07 16:12:28 by markul »