Fallout 2 mod FO2 Engine Tweaks (Sfall)

Discussion in 'Fallout General Modding' started by Dude101, Jul 30, 2007.

  1. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    OK, actually Awareness perk can also be scripted. In my previous post I did something stupid for the game that prevented the perk being added to critters. I've updated my previous post. Guess I'll just leave the perk stuff as it is.
    Last edited: Oct 3, 2017
  2. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    critter_list := list_begin(LIST_CRITTERS);
    I do not quite understand, do you give perks for each the critters on the map?

    Maybe you need to use function party_member_list_critters?

       if game_loaded and (sfall_ver_major < 4) then begin
         if has_trait(TRAIT_PERK, dude_obj, PERK_bonus_awareness) then hasAwareness := true;
         if has_trait(TRAIT_PERK, dude_obj, PERK_gecko_skinning_perk) then hasGeckoSkinning := true;
    this code will check the perks only when starting or loading the game)
    Last edited: Oct 3, 2017
  3. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Well, that's just in case some people using party control on critters other than party members. (controlMode=1)
    Yes, I already mentioned that under the code.
    Last edited: Oct 4, 2017
  4. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    These people are cheaters)
    controlMode=1 - IMHO This mode is only for debugging.
    • [Like] [Like] x 1
  5. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    sfall 4.0 and 3.8.5 are released on SourceForge, along with their respective modders packs and win2k version (3.8.5 only).
    I marked some of the biggest changes in sfall 4.0 in bold. Now you need to extract 'ddraw.dll', 'sfall-mods.ini', and 'data' folder from the archive if you want to update your pre-4.0 sfall, or you won't be able to use item highlighting and NPC combat control features.

    sfall 3.8.5 is the last maintenance release of 3.x branch, with some more bug fixes, plus a couple of minor features backported from 4.0 if feasible, but lacks the scripting features/flexibility of 4.0. Generally, people should use the new 4.0 instead of 3.8.x. Here's the changelog:
    >Fixed an issue with the game being rendered before the hero appearance mod is loaded
    >Included chinese and russian translations

    Original engine bug fixes and various features based on the work by Crafty:
    >Added a fix for an exploit that Bonus Move APs are replenished when you save and load the game in combat
    >Added a fix for the displayed message when the attack randomly hits a target that is not a critter and has a script attached
    >Added a fix for damage_p_proc being called for misses if the target is not a critter
    >Added a fix for the double damage effect of Silent Death perk not being applied to critical hits
    >Implemented standard script procedures: combat_is_starting_p_proc (called when a combat starts, but does not mean that the critter is in combat) and combat_is_over_p_proc (called when a combat ends)
    >Added a new argument to hs_combatdamage hook script
    >Added an option to prevent the player from running while sneaking without Silent Running perk

    Both modders packs now also include Mr.Stalin's script editor.
    Last edited: Oct 26, 2017
    • [Like] [Like] x 2
  6. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    Got couple of questions regarding v4.0 armor change addon...
    - I assume it will work only with Fo2 without specific tweaks to ini file (no plug&play version for resurrection) so the question is will resurrection based armor change still work if i use Sfall v4.0 without this mod?

    -animation pid list numbers don't seem to high, does it actually use those custom made animations for RP, or only basic vanilla animations?

    - I assume Marcus's metal armor would have to be added manually?

    - do animations that are set for all (PA;APA;robes) are for all party npc's or only for those that are on the list?

    - would it be possible to add Lenny to the list with robes PA & APA default animations only? it always was driving me crazy having lenny to lag behind when running across the map and him looking like a looser while everyone else in the party wears some sort of power armor (seriously i farm loot and exchange it for PA's in san fran for all party members who can wear them.
    I assume that Dex should be the same case. I mean his suit looks pretty nice however it looks silly when enclave trooper hits him with gatling laser and he withstands the shot in that black suit and a bowtie, it looks pretty damn silly...
    Last edited: Oct 17, 2017
  7. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    The NPC armor appearance mod is NOT included in sfall 4.0 archive, only in the modderspack. The mod by default works on Sulik, Vic, Cassidy, Myron, Cat Jules, and Kitsune. It's been designed to replace the current appearance mod in RP that the code is scattered in multiple NPC scripts, and can work on UP provided you copy all required FRMs from RP. It's also a framework and a demo that shows how modders can make their own NPC appearance mod for their TCs.

    If you want to add more NPCs, feel free to modify the script/ini. For Marcus his armor changing is done in a slightly different way from other normal NPCs that can wear their armors in combat preference panel.
    Last edited: Oct 17, 2017
  8. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    Oh ok so I take it as it's a work in progress feature that didn't make it yet to main sfall's release. perhaps one day it will be available as a separate download with all those fancy new animations (black guy, punk girl, lou, bald dude, long hair dude etc.)

    anyways was writing this below when @NovaRain replied...

    I figured that now when party members don't share perks with the player, could it be possible for them to actually gain perks via sfall?
    I mean player could choose a perk for them every time they level-up, via their character sheet, wich is available in combat mode when switching to npc's turn (old CombatControl=2) this customization would greatly increase replayability *even further* as they could choose different perks than the player since they each have different stats and skill levels.
    Since Fo2 engine does not provide nor can track such feature it would probably be the first thing wich would have to be saved by the sfall savefile function.

    What do You guys think about this idea?

    as for marcus.. by saying it's not equipped by combat panel, do You mean that this script is related somehow to pressing use best armor function and not to npc's slot "X" ? ...
    this may cause troubles for mods such as resurrection wich have that buton disabled and equip the armors by dialogue.. marcus also actually equips his metal armor to slot "X" only the armor has invisible graphics. (can't remember however what happens when player deequips that armor from marcus's inventory and puts it on himself :p )

    edit i remembered when removing the armor from marcus's armor slot in his inventory he still had lou graphics so i guess tis is heavily scripted and as You've said it would not work.
    the only option to change this is to set the armor to act like regular armor (change appearance when equipped but restrict it to supermutant "race" + change marcus "race" to supermutant :p

    As i recall there was some work done on "race" option on the char screen however i'm not sure how it ended up...
    Last edited: Oct 17, 2017
  9. phobos2077

    phobos2077 Mildly Dipped

    Apr 24, 2010
    Yes, if you look at the ini file, there is a Default section specifically for this.

    Not sure what PID list number you refer to, but all values were taken directly from armor appearance mod included in latest Restoration Project (from the scripts of NPCs).

    To use this mod with ANY FO2 game, you need to just install the appropriate hero appearance graphics files, without any script changes. Then copy .int file into your data/scripts folder and .ini file in the game root folder and just configure the INI files according to your mod.

    For Resurrection (or any other mod without standard NPC companions), you can try just adding sections [1], [2], etc and add only PID for each one (use Cubik's or Mr.Stalin tools to check PID for each party member NPC). In this case, default graphics for Robes and Power Armor will be used.
    Also make sure to add all armor item PIDs to the first section, if this mod introduces new armor. Also note that you are not limited to pre-defined set of armor types: Leather, Metal, Power, etc. You can add as many mapping as you want, in case that your mod adds whole new types of armor. This mod was designed to be usable anywhere.

    No need for savefile. You can use save_array/load_array functions to store perks for each NPC. The tricky part is how to implement allowing player to select perks whenever NPC is leveling up...
    If you can find the way to do it, then just modify the party control script accordingly. The engine support for this mod is pretty basic - it just switches the currently controlled critter to whatever you choose and transfers all stats/skills/etc.
    Last edited: Oct 17, 2017
    • [Like] [Like] x 1
  10. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    So You basically say that when i eqiup marcus or goris with Power Armor (through inventory during their turn [CombatControl=2]) they will look like power armored critters?

    I thinkt this would need to be adressed. I thought maybe a .ini file that is able to restrict wich PID can't equip what armor. So marcus, goris, all brainbots , all dogs and all other non human companions can't wear standard armors *and* everyone besides marcus can't wear marcus's metal armor. + set inventory image and armor animation (Fo1 Lou) for marcus's metal armor.(same can be done with dogmeat armor, although i don't think it's nessecary). This way it could bypass race restrictions and merge it with the current iteration of armor-appearance mod. ( that is *if* it is doable in the first place, as I only gave an idea for it, and have no knowledge how to make / implement it) it could prevent a lot of cheating / abusing of buged game mechanic, because as of now it's just a mater of setting ControlCombat=2, transfering the armor to the npc, turning combat on, switching to that npc's turn, opening their inventory, and equipping *any* armor. so i think some logical restrictions should be set in place. This also opens up a way for goris and brainbot armor (ie. thick leather rags and robot planting).

    Now that's a bummer i thought it could be easily done, however if You put it that way than it's best to just forget those perks for npc's.
  11. khai9999

    khai9999 First time out of the vault

    Nov 16, 2016
    Hey guys. I've problem here with CombatControl (I think). Prob is... in arroyo when I do quest rescue smoke in the wild, I get CTD after attacking gecko (I hit then run about few hexes and after the gecko chasing me it will CTD). This crash happen only if CombatControl=2 and smoke few meter away from the battle.

    I install RP+ECCO (sfall 4.0 with modified draw.ini)
  12. phobos2077

    phobos2077 Mildly Dipped

    Apr 24, 2010
    1. Please provide more details about "CTD". If there is any window showing up during CTD, give the full message.
    2. Also does this crash happen every time?
    3. Upload your savegame just before the crash, so we can also test it.
    • [Like] [Like] x 1
  13. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Actually the game will just crash if Smoke is following the player, and player starts combat and passes his own turn. The crash happens when the game is trying to control Smoke. No matter ControlCombat is 1 or 2.

    error message is:
    The instruction at 00496042 referenced memory at 4c350e20
    The memory could not be read from

    EDIT: OK it's fixed. There's a bug in the engine function. We'll release it as a hot fix tonight (UTC +8)
    Last edited: Oct 18, 2017
  14. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    sfall 4.0.1 and 3.8.6 are released on SourceForge as the hotfix for previous 4.0 and 3.8.5.
    Smoke is added as a temporary party member by party_add() function in his script while he's following the player, but there's no data for him in party.txt. When NPC combat control calls partyMemberGetCurLevel_ engine function on Smoke to get his level, there's an index register not properly initialized in the engine function, so the game will try to load data from an incorrect memory address and crash.
    • [Like] [Like] x 2
  15. StrikeFIN

    StrikeFIN First time out of the vault

    Jul 25, 2017
    I use Windows XP SP3, I don't see Visual 2015 installed, so which version should I use?
  16. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Just the normal 4.0.x. You don't have to install anything, because sfall is compiled with all necessary runtime included.
  17. r0y

    r0y First time out of the vault

    Nov 21, 2017
    Is it possible to use a sfall 4.0.x with killap's unofficial patch? I tried the following on Linux:
    1. `WINEARCH=win32 WINEPREFIX=/opt/disk/wine/fallout2 WINEDEBUG=-all /opt/wine-staging/bin/winecfg` and set OS to Win98 and DLL Override to ddraw (native, builtin).
    2. Install a fresh fallout2 humongous to c:\games\Fallout2.
    3. Install killap's unofficial patch version 1.02.31 (JULY/05/2014) via the installer, with "latest" version (not legacy).
    4. Extract the ddraw.dll and data/scripts/* from sfall 4.0.1.

    But I get this error:
    Don't know if it matters, but after killap's patch there was no ddraw.dll. Instead there was an sfall.dll.
  18. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    It's because you installed win9x version of the patch, which has a modified fallout2.exe that newer non-win9x sfall builds don't think it has correct CRC.
    I don't use Linux or Wine, so I don't know why the unofficial patch thinks it getting installed in a win9x environment. You might try to overwrite the fallout2.exe with the one from US 1.02d patch.
    Last edited: Nov 21, 2017
  19. r0y

    r0y First time out of the vault

    Nov 21, 2017
    Doh! Stupid me. I had set wine's config to Win 98 for some stupid reason. Wiping clean and re-installing with the default of Win 7 fixed it. Thanks for the immediate help!

    Now plain unofficial patch works fine, but when I install sfall 4.0.1 the resolution is way blown up, so all I can see on the menu screen is the first four options (not even exit). So I think I'll just give up on this for now.
  20. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    sfall 4.0.2 and 3.8.7 are released on SourceForge, along with their respective modders packs and win2k version (3.8.7 only).
    There's an bug about player's base EMP DR: if you create a new character and then start the game, your base EMP DR won't be initialized correctly, leaving it only 0%, which means you will certainly get killed by pulse grenades if you don't wear any armor. But if you choose a premade character or load a GCD file to start a new game, you base EMP DR will be set to 100%. This bug existed since FO1.

    The functionality of UseScrollWheel now basically equals to ALT_MOUSE_INPUT=1 + SCROLLWHEEL_FOCUS_PRIMARY_MENU=1 in HRP. Before you can only scroll your main inventory list with sfall's UseScrollWheel, but enabling HRP's ALT_MOUSE_INPUT makes new UI buttons scripted with sfall scripts unusable (like the ones in JimTheDinosaur's inventory sort buttons mod and Mr.Stalin's inventory filter mod). Now you can scroll other item lists in loot and barter screens when hovering cursor on them, and those new UI buttons work as they should.
    • [Like] [Like] x 3