Fallout 2 mod FO2 Engine Tweaks (Sfall)

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

  1. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Is there an easy way to figure out the correct FID? The wiki page about FIDs is driving me nuts.

    /Edit: I used "obj_art_fid(x)" to fetch me the FIDs, but "reg_anim_change_fid" doesn't play animations. I've workarounded this with instead switching to the stand-with-weapon FID, then calling a normal weapon attack animation. It's not the same as playing the animation directly, but oh well.

    Problem with this is, I would need to check for every armor and then pick the FID accordingly. That's not a very pretty approach, imo.
     
    Last edited: Apr 8, 2017
  2. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Out of curiosity - did anything change with the hero appearance mod at some point? I'm not sure if it's related to my mod (and if it is, then I don't know why), but whenever I start a game as e.g. bald head dude, save the game, then load, I'll find myself as normal dude. Same with the female: I start with green hair, save, load, and I am back to normal.

    I'm posting this in here because the only thing I can imagine right now is that it's an Sfall issue.
     
    Last edited: Apr 23, 2017
  3. NovaRain

    NovaRain Casual Modder

    Mar 10, 2007
    Looks like it's been bugged since 3.8.2. Probably has something to do with changing the load order of sfallgv.sav.
     
  4. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    That's good to hear. I mean, it's shit the bug exists, but boy am I happy it's not related to my mod. :p
    This thing has become so big, trying to fixing such bugs always takes a big toll.
     
  5. NovaRain

    NovaRain Casual Modder

    Mar 10, 2007
    sfall 3.8.4 is released on SourceForge, along with win2k version.
     
    • [Like] [Like] x 1
  6. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Funny bug:


    Happens when having an item in slot2, then using wield_obj_critter() to wield the object (putting it into slot1). You can drag and drop the weapon out of dudes hands and as long as you don't touch slot2, the above happens (big gun in both hands) similar to how it worked in the old Fo1 screenshots.

    No idea if this is a good or bad idea, but I wondered if this can be abused to make it a toggle-able feature? (it's probably a bad idea)
     
  7. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    I just keep on doubleposting.

    Either I am doing something wrong or set_critter_skill_points isn't working reliably. If I do this:

    Code:
    #define remove_stealing_bonus            tmp_skill := has_skill(dude_obj,SKILL_STEAL);  \
                                                       set_critter_skill_points(dude_obj, SKILL_STEAL, tmp_skill-15)
    With 41 base skill points, I am ending up with 67 skill points. Why? No idea.
    If I change the value to +15, I am ending up with 56 skill points.
    If I change the value to only -15, without the tmp variable, it changes the skill points to a flat -15.....

    What exactly am I doing wrong? How do I remove skill points from the player in a correct way?
     
  8. NovaRain

    NovaRain Casual Modder

    Mar 10, 2007
    Why don't you use get_critter_skill_points(dude_obj, SKILL_STEAL) if you're working with additional skill points?
    has_skill gets "total" skill level (base + additional points), so for an all-10 character with 170 additional points of steal skill (for a total 200%), it would be like:
    tmp_skill := has_skill(dude_obj, SKILL_STEAL) -> tmp_skill := 200
    set_critter_skill_points(dude_obj, SKILL_STEAL, 185) -> even higher than what the character originally has (steal skill got raised to 215%)

    EDIT: BTW, the game doesn't like the additional point being negative values. When the additional point for a skill is negative value (e.g. -5), the skill will be displayed as "-5%" instead of (base - 5)%.
     
    Last edited: May 15, 2017
  9. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    I just ninja copy&pasted it this morning. I'll change it to get_critter_skill_... later.

    So if the game fucks up with reducing skill points... in theory it should work to set it to e.g. flat -10 and then add the "real" amount of skill points on top of that?
    Just trying to figure out what the best way for achieving this would be. What I want to have is a temporary bonus to the player character that gets enabled / disabled at certain times.
     
  10. NovaRain

    NovaRain Casual Modder

    Mar 10, 2007
    Yes, but in fact the game messed up the skill when its additional point is negative. You can set one with F12se and check the skill in game. And it's in vanilla game, not sfall.
    So basically you can't lower a skill below its base value (calculated from SPECIAL + traits) with scripting.
     
  11. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    I cant reduce it lower than the base value, but if i increase it first, *then* I can reduce it?

    Example: Temporary effect gets activated.. +10 skill. Then once the effect is disabled, we return to -10 points. We stay above the base skill value at any time.

    /Edit: Yess, it works exactly how I want it. First we'll add the skill points via
    Code:
    critter_mod_skill(dude_obj,SKILL_STEAL,15);
    Then we are able to reduce it again via
    Code:
    tmp_skill := get_critter_skill_points(dude_obj, SKILL_STEAL);
    set_critter_skill_points(dude_obj, SKILL_STEAL, tmp_skill-stealing_bonus);
    Thanks for the heads-up, this solved a huge problem for me.
     
    Last edited: May 15, 2017
  12. Magnus

    Magnus Weapons Manufacturer Modder

    Dec 6, 2007
    Guys, I'm having some questions regarding the BonusHthDamageFix and DisplayBonusDamage INI settings (both handled in AmmoMod.cpp).

    From what I can tell, it works like this:

    If you enable BonusHtHDamageFix, then however many points of extra damage you have from the Bonus HtH Damage perk gets deducted from your total Melee Damage, and applied to your Minimum damage instead.
    If you also apply the DisplayBonusDamage, then this will be reflected in the inventory screen, otherwise it will show it as normal, i.e. the Bonus Melee Damage as part of the Max damage.

    Now, what I've done in F2WR is to apply the entire Melee Damage stat, not just the one from the Bonus HtH Damage perk, to the minimum damage (for all critters, not just the player). This is done by hook script, and works fine, but the inventory screen doesn't show it. Furthermore, I have to disable both those INI vars or they will produce incorrect results in game since they conflict with what the hook script does.

    I would love to add a hook script for setting the display value of the weapon's current damage values, but that means I have to distribute the mod with a custom sfall, and I'd rather not do that.

    So what I had in mind is something like this:

    1. Make a custom sfall where I change DisplayBonusHtHDmg1 and 2 so that they add the whole Melee Damage stat to the stack pointer for minimum damage, not just BonusHtH damage as they do now.

    2. Start the game with both INI vars enabled, and memdump it.

    3. Grab the bytes for those functions from the memory dump.

    4. Run the game with regular sfall, disable both INI variables, and in the hook script(or rather, the global that does the hook script) use the unsafe script functions to write in the opcodes for those functions in the offsets where they would have been HookCall/MakeCalled, had the INI vars been enabled.

    But is there an easier way? I would cheer loudly if we could have a hook script for what is displayed in the damage string in the inventory card, with a pointer to the weapon. Any other suggestions?
     
  13. StrikeFIN

    StrikeFIN First time out of the vault

    Jul 25, 2017
    I installed Fallout 2 GoG version (2.1.0.18), I think there was only sfall and high resolution patch included on it.

    sfall latest (3.8.4) worked just fine without unofficial patch, but there are too many bugs without it, so you are basically forced to use either it, or restoration project.

    and then sfall latest doesn't work, as unoffical patch/restoration project (v 3.3) use modified version. I checked with text compare app, what is different, just few values. I changed them to sfall 3.8.4 vanilla ini, but still something is wrong.
     
    Last edited: Jul 25, 2017
  14. NovaRain

    NovaRain Casual Modder

    Mar 10, 2007
    Doesn't work? Why did you change the values in your RP ddraw.ini with vanilla ones? You should just overwrite ddraw.dll and add new settings/options from sfall 3.8.4 vanilla ini to RP's ini if you want to use them.
     
    Last edited: Jul 25, 2017
  15. StrikeFIN

    StrikeFIN First time out of the vault

    Jul 25, 2017
    I'm just very confused with some things on unofficial patch INI file:

    Code:
    VersionString=FALLOUT II 1.02.31
    PatchFile=DoNotUseAPatchFile.dat
    OverrideArtCacheSize=1
    CorpseLineOfFireFix=2
    
    ;Set to one to directly control party members in combat
    ControlPartyMembers=0
    
    ;Set to 1 to fix the problem with melee weapon equiped npcs being unable to attack multi-hex critters
    MultiHexPathingFix=1
    
    ControlPartyMembers and MultiHexPathingFix doesn't exist on 3.8.4 anymore and first 4 ones are also confusing what to do.

    Rest is pretty simple copy paste to end of Unofficial INI bottom. Sorry for being so stupid with these things, never been my strong point.
     
    Last edited: Jul 25, 2017
  16. StrikeFIN

    StrikeFIN First time out of the vault

    Jul 25, 2017
    btw, what is your "FO2_UP_postfix" project? You continue where killap left unofficial patch?
     
  17. NovaRain

    NovaRain Casual Modder

    Mar 10, 2007
    You can just keep the first four settings as UP/RP's values. Read their descriptions if you plan to fiddle with them (don't see a reason for you to).
    ControlPartyMembers has already been obsoleted. Check the section of ControlCombat in 3.8.4 ini for new settings.
    MultiHexPathingFix has been removed from sfall INI.
     
  18. StrikeFIN

    StrikeFIN First time out of the vault

    Jul 25, 2017
    Application error, fallout2HR.exe

    Windows XP SP3, Fallout 2 GoG version, RP 2.3.3 + sfall 3.8.4

    I was playing full screen and suddenly during random encounter with highwaymen, I hit enemy once with my jab, which caused black screen. Was able to go desktop, but didn't manage get error report (if it's possible to get one?)

    I can share my save, because it happened just after I load that save and went to this random encounter.

    https://ufile.io/99ywz
     
    Last edited: Jul 27, 2017
  19. StrikeFIN

    StrikeFIN First time out of the vault

    Jul 25, 2017
    That crash happened yesterday, it worked nice for 4-5 hours. But then again same error "application error, fallout2HR.exe"

    Windows XP SP3, Fallout 2 GoG version, RP 2.3.3 + sfall 3.8.4

    This time loaded save from vault 15 G level, when went to level 1 and fight with vault 15 guards, suddenly when tried to hit enemy with my hammer punch, black screen came, again! Like yesterday.

    Edit: I crippled enemy legs/hands, but it was strange for first turn of enemy still used 2 handed weapon, shotgun most likely (burst, rifle sprite), but after that enemy had still shotgun on it's hands but used unarmed this time.

    I went to fallout2HR.exe process, but it didn't show possible error message and tried press CTRL + C, but it seem it didn't manage get it.

    I can share save (vault 15 door outside)
    https://ufile.io/cvxde
     
    Last edited: Jul 27, 2017
  20. Cairn

    Cairn First time out of the vault

    Jul 10, 2017
    Most recent version, 3.8.4, listed here: https://sourceforge.net/projects/sfall/files/sfall/

    Is this 3.8.4 version still compatible with the Restoration Project 2.3.3, which I believe is the most recent Restoration Project version?

    I ask because the restoration project comes with sfall version 3.3a, but the ddraw.ini isn't entirely updated in that version. For example, the character control option is listed wrongly, and must be changed to the newer command in order to actually work. So, of course, that makes me wonder what other commands are not being utilized because the .ini file isn't properly updated with the correct commands. So, if the 3.8.4 version is still fully compatible with RP 2.3.3, then I would like to find the instructions on how to update sfall without breaking RP 2.3.3 in the process. I mean, would it be a simple matter of copy-paste overwrite of everything, or must I do some other stuff?

    Update:
    I actually just discovered the readme that comes with the sfall download and followed its instruction, only replacing the dll. However, I also edited the ini manually line-by-line to ensure the commands were the same. I noticed several additions. Many I was unsure about. Some I didn't know if the RP already addressed the problem or not.

    I commented out everything I was unsure of, which means I copy-pasted most of the extra additions, and then commented out most everything. I did this because your .ini seems to comment out every command that is unlikely to be used.

    Is merely commenting out every command that I am unsure about sufficient to avoid it being used, or is there some kind of instruction site online that can show me what these options are and how to ensure they aren't being used?
     
    Last edited: Jul 28, 2017