Global var questions for Fallout please answer

Discussion in 'Fallout General Modding' started by Frank Horrigan@BIS, Jul 21, 2004.

  1. Frank Horrigan@BIS

    Frank Horrigan@BIS Still Mildly Glowing

    Apr 3, 2003

    I'm getting along pretty well with scriting, though here is something I really need to know.

    1) Will new global var values that are placed in Vault13.gam of Fallout work?

    2) I'm asking this because the script I've created looks like this

    procedure talk_p_proc
    call get_reaction();
    op_start_gdialog(671, op_self_obj(), 4, -1, -1);
    if (op_global_var(618) == 0) then
    call Demanc01();
    else if (op_global_var(618) == 1) then
    call Deman13();
    else if (op_global_var(618) == 2) then
    call Deman11();
    call Deman04();
    if (op_global_var(618) == 2) then
    if (op_global_var(314) == 0) then
    op_display_msg(op_msg_string(671, 126));
    op_set_global_var(618, 1);
    if (unwield_flag == 1) then
    unwield_flag := 0;

    Important values for the questions later on are:

    618 - which is the global_var value that I've added to Vault13.gam were it stands for DemanStatus. All NPCs have this.

    Deman11 - which refers to the dialog when the critter is in the party.

    Deman13 - which refers to the dialog when the critter is kicked out of the party (and talked to afterward).

    Deman01 - which refers to the dialog when you first meet the critter.

    Deman04 - which refers to the dialog screen that appears if you ended node01 and didn't manage to pick up the critter in your party.

    Now if Deman joins in node01 you should get 500exp. and the dialog should change to node11 next time you talk to the critter. However the dialog just ends and restarts with node01 whenever you talk to Deman again.

    I than changed the global var value to 118 which is the global var value of Ian (not having Ian in the party of cause). Everything worked now as it should, but as I want Deman to have his own global var value I've the following questions:

    1) Does it work to add new values?

    2) I've decompiled some map scripts and noticed that the global var value of every NPC is used most of the time. Do I also need to add Deman's global var value to all map scripts (and perhaps other scripts) to get it working?

    Please reply.
  2. EnderWiggin

    EnderWiggin First time out of the vault

    Jul 14, 2004
    I'm rather curious as to whether or not global variables could be added. I imagine we should be able to.
  3. jargo

    jargo Where'd That 6th Toe Come From?

    May 25, 2003
    1)in Fallout 2 yes in FO1 i think yes

    2) not really if i remember correctly then its used for some dor blocking things, not very imortant.
  4. Corpse

    Corpse Mildly Dipped

    Apr 7, 2003
    Yes, you can add new global variables to Fallout 1; I did it in the cheatboy mod.

    For your second question, you don't need to add the gvar to the map script.