Fallout 2 mod FO2 Engine Tweaks (Sfall)

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

  1. NovaRain

    NovaRain Casual 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
    Code:
    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?

    Code:
       if game_loaded and (sfall_ver_major < 4) then begin
         set_global_script_repeat(60);
         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

    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

    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:
    v3.8.5
    >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
    @NovaRain
    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

    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?

    Edit:
    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
    Modder

    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
    Modder

    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

    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

    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

    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.