Skip to content

Potion for changing global variables

The inspiration for this was the very long and drawn out Jaheira romance. I figured if i could make an item that could change the local lovetalk variable and the global romance variables, it would make it more feasible, as I tend to fly through the game. I found the Set Global Variable effect in Near Infinity, but I can't figure out how to choose the variable to change. Any pointers?
Btw, I call it Love Potion No. 9.

Comments

  • PaulaMigratePaulaMigrate Member Posts: 1,201
    For globals you can assign an effect directly by using opcode 265, the field *string* contains the variable's name and you can use set or increment . You can use that right away.
    For Locals, it is a bit more complex, because you must created a new eff file for every Local you want to change, using opcode 187 template.
  • extremeragnarokextremeragnarok Member Posts: 23
    edited September 2017
    Thanks. When I try to put the variable name "JAHEIRAROMANCE" in the string field, i get an error. Do I need to find the string number and put that in the field?
    Post edited by extremeragnarok on
  • [Deleted User][Deleted User] Posts: 0
    edited September 2017
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • kjeronkjeron Member Posts: 2,368

    Thanks. When I try to put the variable name "JAHEIRAROMANCE" in the string field, i get an error. Do I need to find the string number and put that in the field?

    Regardless of Variable type(Global[265]/Local[309]), if the Variable name is more than 8 characters, you will need to use an external EFF file through opcode 177.
    The variable name is then split among the 3 resource fields of the EFF file, 8 characters at a time.
    Resource = JAHEIRAR
    Resource2 = OMANCE
    Resource3 =
    If you'd like an example for how the EFF should be, look at TUTOR1.EFF.
Sign In or Register to comment.