Fallout 2 mod Fallout 1 Demo in Fallout 2

Discussion in 'Fallout General Modding' started by FeelTheRads, Sep 6, 2018.

  1. FeelTheRads

    FeelTheRads Vault Senior Citizen

    Sep 15, 2004
    I am using them, but I'm not using the reaction macros and stuff that uses Sex Appeal, since the demo didn't use reaction anyway. Well, each NPC script actually had some reaction procedures but they were not used for anything.
    Hell, reaction is barely used in Fallout 2 as far as I could see.

    Yeah, figured that one eventually after Lexx mentioned Perks.ini
    So if I make a new version I'll do that.
    However, it seems you can't do Night Person with Perks.ini alone. There doesn't seem to be any way to use conditions... as in -1 to something during the day and +1 to that during the night?

    So, in the version that is uploaded here I'm modifying it with by using the set_pc_extra_stat function. That's essentially like getting stat increases or decreases from drugs, alcohol etc. So increasing intelligence like this it does not affect skill points. So I had to script the skill points increase/decrease.
    However, now I'm working on a way to do it with set_pc_base_stat. The scripting is more complex with this one but I think I've got it figured out and the skill points will be adjusted automatically and correctly.
    It should also work with Mutate. Current version does too.
    If it works, then the only problem will be that the effects won't be visible immediately when selecting it at character creation or through Mutate.

    Which bring me to:

    Thanks for this, will definitely give it a try.
    Can you explain what this does, though:

    Code:
       if (metarule(22, 0)) then begin
          return 0;
       end
    Thanks a lot!
     
  2. Alchemist

    Alchemist Nocturnal Mechanic Modder

    Dec 26, 2004
    That is correct. You still have to use scripting for the conditional behavior.

    Well, I don't remeber set_pc_base_stat amoung the standart calls. Is it SFall-specific stuff?
    Just checked my old code from dude_obj.ssl, it was using the standart set_critter_stat. So, if you take that old code and inject it into the global script result would look as follows:
    Code:
    procedure check_trait_nightperson
    begin
       variable np_adj;
       variable np_flags;
    
    
            np_flags := get_sfall_global_int(SVAR_NP_MOD);
    
       if (has_trait(2, dude_obj, 13)) then begin // TRAIT_TRAIT, dude_obj, TRAIT_night_person
    
           if (NP_night) then begin
    
               if ((np_flags bwand FLAG_NP_MOD_NIGHT) == 0) then begin
    
                   if (np_flags bwand FLAG_NP_MOD_DAY != 0) then
                       np_adj := 2;
                   else
                       np_adj := 1;
    
                   set_critter_stat(dude_obj, STAT_pe, np_adj);
                   set_critter_stat(dude_obj, STAT_iq, np_adj);
                   set_sfall_global(SVAR_NP_MOD, (np_flags bwor FLAG_NP_MOD_NIGHT) bwand (bit_ALL bwxor FLAG_NP_MOD_DAY));
    
                   DEBUG_MSG("Night; np_adj = (" + np_adj + ")")
    
               end
           end
           else if (NP_day) then begin
    
               if ((np_flags bwand FLAG_NP_MOD_DAY) == 0) then begin
    
                   if (np_flags bwand FLAG_NP_MOD_NIGHT != 0) then
                       np_adj := -2;
                   else
                       np_adj := -1;
    
                   set_critter_stat(dude_obj, STAT_pe, np_adj);
                   set_critter_stat(dude_obj, STAT_iq, np_adj);
                   set_sfall_global(SVAR_NP_MOD, (np_flags bwor FLAG_NP_MOD_DAY) bwand (bit_ALL bwxor FLAG_NP_MOD_NIGHT));
    
                   DEBUG_MSG("Day; np_adj = (" + np_adj + ")")
               end
           end
    
       end
       else begin
    
           if (np_flags bwand FLAG_NP_MOD_NIGHT != 0) then begin
               np_adj := -1;
               set_critter_stat(dude_obj, STAT_pe, np_adj);
               set_critter_stat(dude_obj, STAT_iq, np_adj);
               set_sfall_global(SVAR_NP_MOD, (np_flags bwand (bit_ALL bwxor FLAG_NP_MOD_NIGHT)));
    
               DEBUG_MSG("Wear off night; np_adj = (" + np_adj + ")")
           end
    
           if (np_flags bwand FLAG_NP_MOD_DAY != 0) then begin
               np_adj := 1;
               set_critter_stat(dude_obj, STAT_pe, np_adj);
               set_critter_stat(dude_obj, STAT_iq, np_adj);
               set_sfall_global(SVAR_NP_MOD, (np_flags bwand (bit_ALL bwxor FLAG_NP_MOD_DAY)));
    
    
               DEBUG_MSG("Wear off day; np_adj = (" + np_adj + ")")
           end
       end
    
    end
    
    May be this will help you. Testing is needed for the Mutate compliance though.


    "If script has been called in the middle of the saved game loading -- do nothing."

    --- Update ---
    P.S. BTW Mutants Rising team had own implementation of the Night Person trait, AFAIR. You may want to see their code as an example as well.
     
    Last edited: Sep 15, 2018
    • [Rad] [Rad] x 1
  3. naossano

    naossano Sonny, I Watched the Vault Bein' Built!

    Oct 19, 2006
    Are you still there ?
     
  4. FeelTheRads

    FeelTheRads Vault Senior Citizen

    Sep 15, 2004
    Oh yeah, sorry, I didn't check NMA in a while. Why?
     
  5. Oracle

    Oracle Water Chip? Been There, Done That

    May 19, 2003
    Wasn't the Demo included in the MIB megamod as well? Recall playing the demo in F2 already. Sorry if it has been mentioned before.
     
  6. naossano

    naossano Sonny, I Watched the Vault Bein' Built!

    Oct 19, 2006
    I almost done with polishing the french version and i was wondering if i could upload it somewhere or if you were still planning to make updates.

    About the Scrapyard map in Megamod, it is a map in a bigger gameworld, that you can reach at any stage, at any level and with any gear, while the plot is meant to be played with a fresh character.

    Beside, FeelTheRads version is much closer from the original than Megamod version.

    In megamod version i've noticed the following changes.
    - They didn't keep the music (or rather, the soundtrack)
    - They changed the skin of some critters (plot relevant guys like Lex)
    - They changed one of the gangs names. (i think they replaced Crypts by Blades)
    - They changed some of the dialogs to fit with the Fo2 plot, while the demo had references to the first game plot. For instance, the protagonist is looking for the geck instead of the waterchip, the owner of the dog was killed by Metzger men instead of Gizmo's men, etc... Although, they didn't remove one mention of Necropolis.
    - They included some randomized gear.
    - There are also a couple of gameplay changes related to the Megamod itself, like different looting system.
    - There might be a couple of gameplay changes that i didn't noticed. But i rather keep testing FeeltheRads version, than the Megamod version.
     
  7. Oracle

    Oracle Water Chip? Been There, Done That

    May 19, 2003
    Yea quite sure MIBB made some adjustment for the better F2 plot wise.
     
  8. FeelTheRads

    FeelTheRads Vault Senior Citizen

    Sep 15, 2004
    Not sure. I was thinking I'd do one if there are any bug reports. As it is I'd only like to update the Night Person script. This shouldn't affect the translation.

    Well, yeah, as I said, I did it to learn how to mod not for a specific purpose.
     
  9. Oracle

    Oracle Water Chip? Been There, Done That

    May 19, 2003
    Alright, carry on and good luck!