FO2 Mechanics Overhaul Mod

Discussion in 'Fallout General Modding' started by JimTheDinosaur, Apr 24, 2013.

  1. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    THE FALLOUT 2 MECHANICS OVERHAUL MOD V. 0.8

    "Frank, killing giant ants was never this much fun, or was it?" "Not sure, Steve, not sure."


    Note for those two people who've played my old, old, old versions: almost nothing of it remains intact (so no morale, exhaustion, etc.).


    DOWNLOAD VERSION COMPATIBLE WITH RESTORATION PROJECT HERE


    DOWNLOAD REGULAR VERSION HERE


    View list of Perk & Trait changes here.



    Installation Instructions:



    Note: When installing new versions of the mod you only need to delete the scripts folder in the "Mechanics Overhaul Mod" folder before overwriting everything (this is to avoid scripts that might have been removed between versions from remaining).




    Step 1: In case you haven't already, download sfall.

    Step 1.5 (for RP): Just have RP regularly installed, there's nothing additional you need to do.

    Step 2: Place the "Mechanics Overhaul Mod" folder in your FO2 directory

    Step 3: Copy the "Fallout2.exe" to the new mod folder. ALWAYS USE THIS FALLOUT2.EXE TO RUN THE GAME IF YOU WANT TO USE THE MOD.

    Step 4: Copy your sfall's "ddraw.ini" and "ddraw.dll" files to the new mod folder.

    Step 5: change, and if necessary uncomment (remove the ";" before the line), this entry in the ddraw.ini to the following:

    DamageFormula=4

    and uncomment the following lines:

    PerksFile=Perks.ini
    SkillsFile=skills.ini
    DerivedStats=stats.ini

    and copy paste this at the end of your ddraw.ini:

    ;Set to 1 to enable the new arrays behavior
    ;Set to 0 for backward compatibility with pre-3.4 scripts
    arraysBehavior=0


    Version 0.6.5:


    Additions/Changes/Fixes:


    - 9 new perks added.
    - Fixed Needler pistols doing poison damage, had become broken at some point.
    - While adding a perk that adds a small amount of poison damage to each spear and knife the player attacks with (see the "Perks and Traits" doc), I've given one rank of this perk to each "primitive" critter. All this in a bid to make poison damage a bit more relevant (remember that it deals damage much quicker with this mod than in the original).
    - To "solve" the issue where kicking progressively lags behind punching for unarmed combat characters because it can't equip anything, and is generally just boring mechanically, it now represents grappling or sweeping unarmed attacks. What this entails is that "kicks" cost more AP than punches, but carry with them a larger chance of status effects (disarms, knockdowns, etc.), and as the only attack in the game ignores the requirement of doing any damage to be able to cause such status effects. So, while kicks will do little to (probably) no damage to armored opponents, they will still be able to cause status effects.
    -Implemented the molotov cocktail fix by phobos2077 (in vanilla FO2 molotovs do explosion damage, now they finally properly do fire damage).
    -Fixed a bug in the Mobile Attacker perk: now it properly only applies for only one attack per turn.


    Version 0.6 Changes/Additions/Fixes:




    Version 0.6:


    Additions/Changes:


    -Completely overhauled the sequence changes to fix a bug which caused melee critters to keep from charging at the player. The system now works as follows:


    *if the player is both invisible to AND outsequences the opponent he is aiming at (and his teammates) then the player gets an extra turn to attack after the first.
    *if the player is either invisible or outsequences the opponent then sequence proceeds as normal (first the player can attack, then the rest of the combatants, then the player, etc.).
    *if the player is neither invisible nor outsequences his opponents then he loses his first turn and combat starts in the regular order of sequence (so starting with the opponent with the highest sequence, which isn't the player).


    As mentioned before, these changes are to make sure that A) sequence actually determines who starts combat, and B) that stealth plays a larger role in combat sequence as well.
    To make the new system apply to enemies trying to ambush you as well, set the SequenceChanges in JimsMods.ini to 2, note however that this means ANY non-player attack assumes the player is the one being attacked for sequence determining purposes. So, if a critter is attempting to attack another non-player critter in a random encounter, sequence will most likely not make any sense. SequenceChanges is set to 2 by default, but can either apply exclusively to the player with 1 and also be disabled by setting it to 0.
    Because these changes threatened to make Perception somewhat overpowered (a low perception character could be A) unable to spot an enemy ambushing him and at the same time be B) outsequenced by him, meaning the difference between starting off combat and having the enemy have 2 turns to start off with), sequence is now determined in equal measure by agility and perception. This way sequence properly represents reaction speed.


    -Because of this mod's new non-linear weapon system, the starting equipment of a spear can make the beginning quite difficult if you don't start out tagging the Heavy Melee skill. In case you feel this is a problem, you can now enable StartingEquipment=1 in the JimsMods.ini to have your starting equipment be based on your highest starting skill and attributes (so, a high STR + light Melee character gets a club, while a Rifles character gets a pipe rifle with some ammunition). Note that you will also need to change your sfall ddraw.ini in this section:


    ;To change the default and starting player models, uncomment the next four lines.
    ;The default models can also be changed ingame via script
    MaleStartModel=hmjmps
    ;MaleDefaultModel=hmjmps
    FemaleStartModel=hfjmps
    ;FemaleDefaultModel=hfjmps


    This is to make sure that your starting character actually has the animation set to use the new weapons provided.


    - Added key bindings for (almost) all the new UI options, see the image added.







    - Added the option to see the DT and DR of the critter you're aiming at (for the damage type of the weapon you're using) by pressing the V-key after having aimed (or attacked, it remembers the last enemy you've aimed at). This option is mostly for testing purposes.
    - When using the V-key after aiming at a party member, instead of DT and DR values, you get to see their skill levels, allowing you to see how the new npc-levelling system is working.
    - Similarly, you now have the option to view the chances of getting a certain status effect (e.g. knockdown, crippled limbs, etc.) against the target you've aimed at by pressing the J-key. You get a list of percentages corresponding to each bodypart.
    - Cleaned up JimsMods.ini so that all the old variables that didn't do anything are gone. Whatever is there can be used to change the mod.


    Fixes:


    - Removed old AP cost numbers from appearing underneath the new ones in the interface.
    - One- and two-handed melee are now correctly denoted in the skill list.
    - unarmed enemies will no longer "drop their weapons" when hit with a crit in their arms.
    - fixed a bug where the weapon of the attacker was read as that of the target.
    -fixed movement ap cost bug (after attacking or using inventory every hex moved after the first one erroneously cost extra, without even displaying that)
    -fixed a problem with evasion bonus from movement periodically stacking incorrectly.
    - Fixed a bug where you could still invest an additional AP to aim when the bonus was already at its maximum.
    - Fixed a bug where the AI would spend too little AP aiming, and wouldn't spend its AP aiming in a stupid way generally. Now high Agility critters will more often max out their AP spent aiming to account for it being relatively cheap for them.
    - Fixed a bug with checking the remaining safe drug times causing a crash sometimes.
    - For some reason the Localization system (where a missed attack on, e.g., the eyes still has a chance of hitting the head, etc.) was removed from the mod to a large degree, restored it.
    - Corrected the skill stat bonus descriptions on chargen.
    - Fixed an inexplicably stupid issue with critters not getting 10 AP to spend as they're supposed to.
    -fixed bug in damage formula that decreased the importance of crit chance.
    - Corrected the companion skills list in JimsMods.ini (i.e. the list which determines which skills are prioritized by NPC's on leveling up).
    - Removed the old npc levelling system, which was interfering with the new one.
    - Fixed a bug in the npc levelling system which had broken the entire thing.
    - Fixed a variety of bugs in the knife attack mode switching mechanic.
    - Fixed a bug with the burst amount changing system where sometimes the attack mode would switch to something weird.
    - Fixed the miniburst system (for bursts below 4 rounds) so it would actually work.
    - Fixed some compatibility issues with killap's RP (him releasing the source code has made it easy to update the one conflicting script, namely the OBJ_DUDE.int one).


    Introduction:


    The goal of this mod is to address what I consider to be a number of systemic shortcomings of Fallout 2. (In cursive are remarks on quirks/bugs or unimped features).


    The first problem is the lack of useful skills, attributes and perks: It's obvious enough that INT and AG are king, there's only a couple of useful perks, and only a handful of skills are worth investing in at all. Here's a list of the changes that are made to the attributes, perks and skills to alleviate this:


    ST:
    - Carry weight. This used to be a stat that was more about convenience than anything else: how much would you need to manipulate your mules in the game? Now it's limited to what you carry in your active hand and wear as armor (the counter also shows what's in your inactive hand, but that one doesn't affect penalties). Exceed it and you get movement and THC penalties during combat. This means that having a low ST character will be no more annoying than a high ST one, but you'll only be able to wear light armors and weapons without penalties.
    - Weapon min ST reqs. This now only affects recoil: each gun has a min ST requirement per bullet fired, and if you already exceed this requirement for the very first bullet, the weapon costs additional AP's to fire as you spend time steadying it. For burst weapons, every additional round you fire adds up to the requirement, resulting in stacking THC penalties if you exceed it.
    - Melee Damage. This is now based on a weapon's weight (or, if unarmed, the "weight" of your punches is determined by your strength): each point of ST adds 10% of the weapon's weight to its damage, making ST much more relevant for heavy weapons like sledges than knives.
    - Blocking power. Against melee attackers, you can choose at what THC for the enemy you'll block, adding to your DR based on how much higher your ST is than your opponent. Note that a sufficiently skilled opponent can find a way to circumvent this block.
    - Resistance against knockdowns and weapon drops.


    PE:
    - Sequence. This was a largely irrelevant stat because you'd almost always end up getting the drop on your enemies anyway: the real sequence in combat almost always worked out in your favor. Now the character with the highest sequence always gets the first turn: try aiming your weapon at a character with higher sequence (who also sees you pointing that weapon) and that character initiates combat. Note that this is definitely quite buggy... I left in an option to switch it off at the top of JimsMods.ini, just turn SequenceChanges=1 to =0.
    - Ranged Modifiers. Worked as a lame flat bonus in the original. Now each point of PE substracts 10% of a weapon's range from the per hex THC distance penalty. So maxed out PE with a 70 hexes range weapon gives a 70% lower distance penalty. Scopes additionally multiply your effective PE by 1.5.
    - Unused AP's defence bonus. If you can see the opponent attacking you and he's standing nearby you, each unused AP is spent focussing on his next move, giving you a defence bonus (due to something weird, I had to set the base "AC" to 1 rather than 0, in case you're confused about that).


    EN:
    - Hitpoints. This mod introduces fixed HP, meaning that you won't end up with as much of an infinite supply of HP you would regardless of your EN. A low EN character will be very vulnerable throughout the game.
    - Rad resistance. This mod has radiation zones on the world map, and increases the effect of EN on rad resistance. You can spot rad zones by either having a geiger counter in your inventory or by asking somebody where the nearest rad zone is located.
    - Poison resistance. Poison now affects you every turn in combat and every few seconds outside of it, making it more of a short-term threat. Additionally, Needler pistols now do poison damage.
    - Resisting knockouts, missed turns, and crippling hits.


    CH:
    - Number of party members. Same as always, but the Leadership stat should make them more interesting (see below).
    - One minor addition is that it now affects the likelihood of characters accepting a drink or drugs from you (and the number of intoxicants they accept before turning hostile).


    IN:
    - Skill Points. Nerfed somewhat by moving the start of increased costs down from 100 skill points to 75 and increasing base skill points per level from 5 to 10.


    AG:
    - Aiming bonus. AP is now set at a constant 10, unaffected by AG. Unaimed and aimed shots cost the same amount of AP (unaimed shots are now simply defaulted torso shots), and you can spend additional AP's to increase your chance to hit. Each point of AG increases the percentage that gets added to your effective weapon skill by 20%, up to a maximum of 400%, meaning a maxed out AG character can spend 2 AP aiming for a 200% skill bonus per AP.
    - Movement speed. AG now only affects the cost for the first hex moved. Every second point of AG reduces that cost by 1, going from 6 AP for the first hex moved at minimum AG, to 1 AP at max. The cost of the first hex moved is additionally raised by large weapons (1 for sledges/rifles, 2 for big guns), armors (1 for leather, 2 for metal/combat and 3 for power) and for moving to a hex either diagonally or straight behind you. This of course all in all highly complicates the peak-around-the-corner exploit. Moving during your turn now also gives a defense bonus against ranged attacks.
    - Dodge bonus. If you aren't blocking an attack, you gain a dodge bonus against melee attacks based on your AG.


    LU:
    - Damage. There are no longer criticals in the form of damage multipliers. Instead, LU affects the likelihood of hitting higher values in your damage range (e.g. with a weapon that does 15-40 damage, a high LU character would have a higher chance of getting 40 than a low LU one).
    - Armor Piercing. The same principle applies to armor piercing, which is now based on your weapon's upper damage range. There's always a roll made to see how much you actually pierce, and LU determines how high this ends up.
    - Special effects chance (knockdowns, knockouts, cripplings, etc.)


    Concerning skills, in general your starting attributes have a much greater effect on them: they all have a base value of 10%, to which 40% can potentially be added through relevant stats. Skills have also been capped at 200%, and the first increment of increased cost now comes from 75-100%, rather than the original 100-125%. Now for a list of the changed skills:


    - The six combat skills have been changed to One-handed small arms (pistols and smg's), Two-handed small arms (rifles), Big guns, One-handed melee (clubs and knives), Two-handed-melee (spears and sledges), and Unarmed. Skill simply depends on which animation is used for the weapon, so grenades use the unarmed skill, and throwing knives the One-handed melee skill. You also get a defense bonus based on your "relevant" melee skill (so, if your melee attacked while carrying a rifle, your ability to use that rifle as a tool to block an opponent's attack depends on your Two-handed melee skill).
    - Gambling has been changed to Leadership, which raises the skills party members gain per level. Party members no longer gain levels at random, but every time you level up. Note that the old gambling checks still use this skill, will eventually change these to basic luck rolls.
    - Traps now lets you set traps yourself by entering Sneak mode and dropping either a spear or an explosive on the ground. The value of the item used to make a trap and the type of material of the tile you're placing it on determine how much trap skill you need to place it. How the traps (especially the explosives) work during combat is still a bit of a mystery to me, ymmv).
    - First Aid and Doctor have become more relevant with Stimpaks only being able to be used sporadically (see below), and automatic rest healing being removed. You now need either First Aid kits or "Improvised Healing Materials" to heal HP's during rest, and Doctors Materials to heal crippled limbs, also during rest. So be very, very careful with using the "heal until rested" option, lest you get stuck, just don't use it actually.
    - Outdoorsman now affects world map travel speed (mostly useful when traveling through rad zones), and the quality of the Improvised Healing Materials you find (which affects up to how many HP's you can heal with them during rest).
    - Stealing has gotten an additional barrier: the more allies of the target can see you, the harder it is to even see inside the inventory of your target, let alone steal or plant.
    - Stealth has additional uses because of how enemies will be on the lookout for assassins if their buddies step on your traps, and that all unlocked containers are now "guarded" by characters that can see them, and who will warn you not to touch them (they won't automatically enter combat though; if they're weaker than you, they'll simply cause you to lose town reputation). Also, if characters can "hear" you (partially determined by the surface material you're walking on), they'll turn in your direction unless you're stealthy enough, making a stealthy thief more useful at pickpocketing. This turning effect only applies in certain towns for now, because for some reason towns like Den and Reno have lots of scripts forcing characters to look in one single direction.




    As to Perks, the problem was of course that the vast majority of them simply weren't viable as 1 per 3 levels picks. My solution is to have perks every level, and nerf (or remove) the more overpowered ones. Also, perks are no longer tiered according to level (meaning you had an ever-increasing number of obsolete low-level perks populating the list): att. and skill requirements only govern which perk you can have. These requirements are also more flexible now with regards to multi-rank perks, meaning that the first rank might cost 40% of a certain skill, and the second 80, etc. You can find a list of perk and trait changes here (bolded means implemented, cursive in the case of traits):
    https://app.box.com/s/0eema1esji3omeurwbae


    Note that for some reason the new perks don't show up until you've scrolled a bit.


    The second problem is the game's lack of combat difficulty and complexity. The point is to give you some more options other than eye critting your opponents continuously. There's a couple of issues with combat this mod tries to address:


    - Limiting inventory time. Ostensibly tough fights became a breeze once you have enough HP's because you can simply wait until low on damage, then enter inven and fully heal. However, Stimpaks can now only be used once every 30 minutes. Also, inventory use AP cost has been raised significantly, and you can only use one item in it before being forced to exit. Reloading now also takes substantially more AP's (8 for two-handed, 4 for one-handed).
    - Removing drug exploits. The addiction system could previously be easily circumvented, now addiction isn't chance based, but time based: after using a certain drug you have a number of days (determined by your endurance) before you can use it again.
    - Avoiding automatic eye-critting. To avoid higher skill levels resulting in almost automatic hits on even the hardest targets, I've nerfed THC at higher values (going from 0-10% THC will be much easier than going from 80-90%, especially in the case of hard to hit bodyparts or burst attacks). Because the mod makes it so that missing a targetted body part can still score a hit on an adjacent bodypart, the base penalties for aiming for certain bodyparts have also been reduced, meaning you should be able to aim for different bodyparts throughout the game now.
    - Giving more flexibility for bursts. As said, the amount you can stably burst depends on your ST, meaning you'll now be able to adjust the number of burst rounds through the interface. Additionally, if your burst rounds become less than 4, you now forego the regular burst cone for one that spreads based on your THC (so with high enough skill you can make all your bullets hit the intended target). AP costs are determined based on 5 or less = +1 AP, 5-20 = +2 AP and above 20 = +3 AP.
    - Giving more options during melee combat. You'll be able to choose when your character prefers to block rather than dodge, and in addition whether to attempt a counter-attack on a "succesful" block/dodge (to attempt to do so comes at a defense penalty however, counter-attacking is still unimped). Defense against melee attacks is now also partially determined by your own relevant melee skill.
    - Adjusting how many AP's are spent aiming.
    - Expanded secondary attack modes. All spears and knives can now be swung (for added base damage), thrusted (for more penetration), or thrown (swinging is unimped for spears). Sledges and unarmed attacks can either produce knockback (swings/ punch A) or not ("thrusts"/ punch B). Laser beams can be concentrated to add armor piercing and plasma bolts can be made less stable so they produce more splash damage.
    - Limited AI improvements. Not much I can do in this regard, but the AI chooses more smartly which bodypart to aim for rather than the random way it worked before.
    - Working AP bullets. AP was always inferior to JHP in the original game. Now AP bullets raise your upper damage range (meaning an increase in penetration) at the cost of a general reduction in damage.


    An overview of the new options integrated into a (temporary) UI made by the FoN team:





    Note that there's still some problems with the "tags" (Level up, sneak, etc.) popping up over the interface; I've removed them where I could, so pay attention when you level up.


    The third problem is that of weapon progression/variety. Replaying FO2, you notice that you always get weapons in more or less the same order, with many hard-to-find weapons showing up too late to be of any use. Too many weapons also play too similar, with no considerable difference between a sledgehammer or a knife, and a rifle or a pistol.


    My solutions to this are:
    - Gear randomization. You can probably already dream the place you're first going to encounter the Bozar by now, and this mixes it all up, generating weapons based on location, attributes and experience level. There's also more variation in terms of ammo load-outs, with powerful characters in rich regions having more chance of having more, and more powerful, ammo, while poor characters often have only a single round in the chamber.
    - More distinctive weapon types. Fallout 2 has a lot of different types of shotguns, but they're mostly indistinguishable from other rifles. So I introduce different types of shells which spread out in a "shotgun-y" way. Also, with reloading having become a bigger problem, pump action shotguns have less reloading to do, but cost one extra AP (for the "pump") to fire. Lasers will penetrate targets and potentially hit targets next in line. Plasma rifles do splash damage to nearby targets. Cattle prods produce more knockouts. There's a spasm gun that does damage based on the target's perception and intelligence. An electrorifle that does additional damage to additional targets if they are standing on a metal surface. Weapons using caseless ammo get an advantage when firing mini-bursts of 3 bullets or less, costing the same AP's as a single shot. Miniguns always use the same AP penalty for bursting, regardless of the amount (+2 AP).
    - Non-linear weapon progression. Having you automatically gravitate towards the pulse rifle is quite boring. Instead, different types of characters should benefit from different types of weapons. High ST likes sledges and heavy/burst guns, high AG likes pistols and knives, high PE scoped rifles and high LU weapons with wide damage ranges. Different weapon types should remain viable, rather than becoming irrelevant as the game progresses.
    - Less linear armor system. Having bigger armor should not be a no-brainer; it now costs you in terms of agility (indirectly: you get penalties to the AP spent aiming bonus and movement) and (if you're not strong enough) combat effectiveness. The armor system has also been changed so that DT doesn't (nearly) automatically takes off a huge chunk of your damage: it is now purely a threshold which gets ignored if your armor piercing roll (again, based on your weapon's upper damage range) exceeds it. So, almost all weapons and ammo will rarely do any damage against the strongest armors at full strength because they won't pass the DT. Characters with fast and weak weapons (knives, pistols) will therefor be required to aim for bodyparts that give higher chances of penetration. So the goal is that there aren't any "hard counters": if you can't pierce, there's always a way to bypass - it's just harder. Similarly, going around with a combat leather jacket shouldn't be impossible, just very hard because you'll need to place the emphasis on dodging attacks, and taking out enemies quickly.
    - Differences between one- and two-handed weapons. You'll now generally be faster both in movement and attack AP cost with one-handed weapons and be able to cheaply switch between hands, which you can no longer do with two-handed weapons to compensate for the shorter ranges and lower damage outputs.
    - Systematized weapon upgrades. Instead of having just a couple of different weapons that can have one type of upgrade, each weapon type can get a certain upgrade. So each rifle can be outfitted with a scope, each pistol with an enlarged magazine, etc. All of these upgrades will now have potential drawbacks attached as well: an enlarged magazine weighs down your weapon, possibly making it cost more AP to use, etc. You can have upgrades done at the usual suspects, but also yourself: Guns 'n Bullets magazines now increase the skill you have at improving weapons in combination with either Repair (for most guns), Science (energy weapons), or Outdoorsman (for most melee weapons). (Unimped)


    Finally, there's the issue of the economy. Like with combat difficulty, this starts out fine, with you scrounging for nickles to pay for that first leather jacket. It just goes off the rails pretty quickly, with barter becoming absolutely irrelevant soon enough.


    To fix it I've put together a pretty complicated economic system. As I see it, the problem is that you always end up amassing a lot of inferior items to buy the superior ones you actually need: you convert a stack of deagles into that plasma rifle you really want. Problem is, why does that high tec trader want all those deagles in the first place? I introduce a demand system based on different zones: certain wealthy zones just want premium goods and won't give you squat for inferior stuff - they also charge more for the stuff that's in demand in their zone. Same works vice versa: tribes won't trade all their livelihood for a plasma rifle they don't need.


    To make this work, I also had to deal with money: you could just sell your deagles for cash in one place, then exchange the cash for the plasma rifle in another. So I implemented inflation zones separate from the demand zones: here track's kept of the cash in the zone, and cash prices are adjusted accordingly. Here's a map of the various zones:





    Another "issue" was store inventories: they become a bit dull after your second playthrough, and have now been randomized based on the demand zone of the store/caravan/trader. Stores also now "realistically" stock restock based on the amount of cash they have and the cost of the items they want to buy. Note that these stores carry 100 first aid and doctor kits as a placeholder until I find out a way to make it work. Plus, only part of the stores have been changed because I'm still not a 100% sure on the implementation. Here follows the list of stores changed using the new system, so let me know if something's weird about them:

    den: tubby
    flick
    broken hills: liz
    gecko: percy
    klamath: ma buckner
    ncr: duppo
    new reno: renesco
    eldridge
    san fran: lao chou
    vault city: happy harry's


    A final issue for the economy was random encounters featuring two opposing factions: you'd have free reign to finish of the weakened victors. What I'll do is have enemies appear after so many turns during random encounters: basically the scenario of you stumbling upon two fighting factions will happen to you as well. (Unimped)
     
    Last edited: Nov 4, 2014
    • [Like] [Like] x 1
  2. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Actually the calculation of to-hit chance for ranged attack is a bit more complex. You can take a look at this pseudocode.
     
  3. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    Thanks! Though, as far as I can tell, the fundamentals aren't really any different; I'll just have to also account for stuff like multi-hex enemies, enemies being knocked out, and so on; or am I missing something?

    EDIT: Odd that the player's perception gets nerfed for the purposes of determining to hit; was this an attempt to balance things slightly? If so, what an arbitrary (not to mention insufficient) method.
     
  4. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    I totally dig your thinking Jim.. it's great to see sfall being used to it's potential - TImeslip would be proud.

    The eye-crit problem really drags FO1 & 2 down. Although i have no experience of guns I would guess it as pretty much beyond human ability to reliably hit someone in the eye who is moving around at normal speed. I say cap the chance at 20%.
     
  5. .Pixote.

    .Pixote. Venerable Relic of the Wastes
    Modder

    Sep 14, 2009
    It would be great to see this up and running in game. Only then will we know how it affects the overall feel of combat.
     
  6. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    Thanks! I sure hope Timeslip'd be proud; I think he's the only one who can help me out with the scripts. :P

    I share your frustration, but I absolutely hate caps; if your skill increases in an RPG, it should have consequences. That's a big reason (beyond the balancing issues) why I hate the current system: once you reach 140% or so on your combat stat in the early game your regular shots have already reached their peak - the rest just makes for easier eye-critting over high distances.

    Anyway, let me just try and convince you why my system is sensible. Here's how an eyeshot would work with the metal armored guy example:

    (EDIT: I've rationalized the secondary system a bit, which you can find updated in my first post. You could now change the increments easily by changing the tmp beneath the relevant body part)

    (150 + 10) + (((10-6)*(10-3))/2) - (5 * (11 - 6) + 3*(12-6)) - (6*3) - (6) - (60)= 47%
    then
    20+(27/2)=33%

    or, with an unrealistic 300 skillpoints in Small Weapons:

    (300 + 10) + (((10-6)*(10-3))/2) - (5 * (11 - 6) + 3*(12-6)) - (6*3) - (6) - (60)= 197%
    then
    20+(40/2)+(60/3)+(77/4)=79%

    I admit, these still feel a bit too high, but remember that in the Fallout mechanics, an eye shot intuitively "includes" the possibility of you missing the eye, but hitting the rest of the head or another part of the body. Needless to say, this system is highly flawed, but I saw you ask Timeslip about it in another thread and he said he was "working the kinks" out of a afterhitroll hookscript that would cause secondary body part hits before falling silent.

    As an aside: suppose someone does end up working the kinks out of the script then I can think of two possible systems:

    (1) Keep the current body part modifiers (eyes -60, head-40 etc.) but make them more "localized" (i.e. 30%eyes becomes 15% eyes and 15% head; 40% head becomes 20%head, 5%eyes and 15%body, etc. etc.).

    (2) Use the system of (1), but change the body part modifiers to account for the fact that it makes little sense that aiming for the eyes has less chance of hitting the enemy than aiming for "the head" in general (I would find this as odd as the uncalled-called shot difference in hitchance). This system might have, e.g., a eye-shot and a head-shot both have a 30% chance, only with the eye-shot taking an extra AP (requires more concentration) than the head-shot.

    EDIT: Of course, there's an even more radical additional measure we could take, which is to "localize" the uncalled shot as well. So, an uncalled shot would then become something like 40% body, 20%legs, 15%arms, etc. I would personally love this. Of course this would necessitate an additional penalty to the uncalled shot (perhaps for ranged combat a distance modifier of -2 per hex and for melee a bonus to the opponents skill, both in addition to the new base penalty of -30).
     
  7. Glovz

    Glovz Vault Dweller
    Modder

    735
    Sep 16, 2005
    @JimTheDinosaur
    I like your ideas very much and I believe I understand the gist of what you are doing.

    Question:
    In the UNFINISHED SCRIPT SEGMENTS, you still incorporate the target's AC value. Maybe I've misunderstood and these are just code snips from the original scripts, but I thought you were looking to ignore/workaround the AC values?

    The main thing that you'll want to avoid is having to change proto file values to accomplish your goals, given that in order for proto file changes to take affect, all items/critters on all maps would need to be replaced. That just the way it works.

    Otherwise if you can overwrite values or use original values in your scripts then you should be able to accomplish what you want.

    Cheers! :)
     
  8. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    Thanks! As to your question: the AC is used as a workaround in the system. I set everyone's AC to zero (through stats.ini for the player and through a global script for the rest, so no messing with protos), so that any AC that isn't zero is guaranteed to be the result of unused action points (at least, I think so; might not be that simple), which I then use in combination with endurance to calculate a hitchance bonus for the opponent. I do it this way because (I think) sfall can't use excess action points directly as a condition, and I'm already bothering Timeslip too much about more relevant stuff to ask about that.

    Edit: But you make a good point; with my workaround system I would probably still have to edit armor and ammo protos to edit the AC-bonusses/penalties away, so ignoring it altogether might be the more sensible option, thereby making everything scriptable. Besides, a mod consisting only of four or five scripts would be best; that way it's also easiest for everyone to tweak it the way they themselves like best.

    In fact, the more I think about it, the more I realize how idiotic my choice to use AC as a workaround for unspent AP really is. I'll have to bother Timeslip about it at some point.

    EDIT2: Actually, the ideal system wouldn't even involve unspent AP per turn at all. Ideally, the system would revolve around AP spent for the duration of combat. This way, a low endurance character would progressively become an easier target as he continually expends energy (perhaps AP may even decrease over the duration of the battle unless occasional breathers are taken). No idea whether that would be even remotely feasible though. I'll try out some stuff with COMBAT_SUBTYPE_TURN, etc.

    Either way, bottom line for balancing purposes is that endurance has to start playing a more prominent role in combat than it does under the current system. Only problem is how to make it do so without being arbitrary.
     
  9. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    I thought I'd give you all an update on where I'm at. As hubristic as I know these boasts are, I think I'll have an 0.1 version up for download in a couple of days.

    ENDURANCE

    Well, it took a lot of fiddling, but I've come up with an endurance system I'm pretty happy with. It still uses AC as a workaround, but at the very least keeping AC in some form offers the player some type of graphical representation to keep track of his exhaustion.

    Here's how the system works: in the dude_obj script a global variable (COMBAT_TURN) gets increased with each combat turn. This value then gets manipulated by the following global script:

    Code:
    procedure start;
    
    
    #include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\sfall.h"
    #include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\define.h"
    #include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\command.h"
    
    procedure start begin
      variable critter;
      variable n;
      if game_loaded then begin
        set_global_script_type(1);
        set_global_script_repeat(100);
      end else begin
      if not (combat_is_initialized) then begin
      	if (global_var(GVAR_COMBAT_TURN) != 0) then begin
       		set_global_var(GVAR_COMBAT_TURN, 0);
       	end  	
        foreach critter in list_as_array(LIST_CRITTERS) begin
            if (get_critter_stat(critter, STAT_unused) != 0) or (get_critter_stat(critter, STAT_ac) != 0) then begin
            	set_critter_base_stat(critter, STAT_ac, 0);
           		set_critter_base_stat(critter, STAT_unused, 0);
            	debug_msg("combat is not initialized and I'm getting set to 0");
            	end
            end
        end
       else if (combat_is_initialized) then begin
       		if (global_var(GVAR_COMBAT_TURN) > 0) then   		
            n:= (global_var(GVAR_COMBAT_TURN)-1);
            else
            n:= 0;
        foreach critter in list_as_array(LIST_CRITTERS) begin
       		if (global_var(GVAR_COMBAT_TURN) != 0) and (get_critter_base_stat(critter, STAT_unused) == n) then begin
       			if (get_critter_stat(critter, STAT_ac) > (get_critter_base_stat(critter, STAT_ac))) then begin 
       			set_critter_base_stat(critter, STAT_ac, (get_critter_stat(critter, STAT_ac)));
            	set_critter_base_stat(critter, STAT_unused, n+1);
                debug_msg("Turn over! My unused stat is now"+(get_critter_stat(critter, STAT_unused)));
                end
            end
        end
       end
      end
    end
    
    Basically, this adds up the unspent Action Points for each critter at the start of every new turn. Once combat ends, each critter's AC and the global variable for the turns get set to zero again.

    I was thinking of using the resulting information to calculate the opponent's hitchance bonus in the following way:

    Code:
    Exhaustion: ( ( (max ap ) * turns) - AC [i.e. the workaround for accumulated unspent AP] ) / Endurance target ) / 2
    
    So, what does this mean? Suppose you happen to be an extremely agile character, but without the slightest endurance (AG 10, EN 1). Now, you spend the first 5 turns of combat vigorously expending all of your energy, leaving not a single unspent AP. Your exhaustion cause the opponent to get a hitchance bonus of:

    Code:
    ( ( ( 10 ) * 5 ) - 0 ) / 1 ) / 2 = 25% 
    Had you spent all your childhood days building up a decent stamina (EN 5), then the opponent's bonus would be drastically lower:


    Code:
    ( ( ( 10 ) * 5 ) - 0 ) / 5 ) / 2 = 5% 
    MIN-STRENGTH

    I like the current Minimum-Strength system for ranged weapons in theory (the idea that you should have a decent strength to handle a large weapon, but shouldn't get better at handling a small pistol if you become a bodybuilder is sound). However, in practice it is incorporated too arbitrarily for my taste: why should you need to be as strong to properly handle a Tommy Gun, as you would a Gatling Laser (both Min-Str 6)? The main problem seems to be that most of the heavier weapons tend to have hopelessly optimistic min-Strengths (you only need above average strength to handle a minigun optimally on the move? Really?).

    To me it seems plausible to have Min-Str determined on the one hand by the ability to handle the weight of the weapon, and on the other by the ability to control the recoil. While weight is easy enough to check for, recoil is not, so I tried coming up with some broad representations (for the moment they're fairly arbitrary, and are mostly meant to end up with a plausible min strength in the end):

    Code:
    recoil:= 4 (for big guns) or 3 (for shotguns, heavy rifles, heavy pistols and non-big gun energy weapons) or 2 (light rifles, pistols and smg's)
    
    Min Str:= (weight/3)+recoil
    
    To use two examples, the 10mm pistol keeps the same Min-Str this way (3/3+2=3), but that of the minigun becomes much higher (28/3+4=14), meaning it can only be wielded perfectly by a 10 strength character wearing power armor. While this change seems logical to me, it might require some rebalancing to not make miniguns weaker than they should be. For the actual penalty, I want to involve the exhaustion mechanic as well:

    Code:
    Str penalty: ( (Min Str)  - (attacker ST) ) * (exhaustion/2)
    
    So if you're not strong enough to wield a certain weapon, the hitchance penalty will get progressively worse as the battle drags on (unless, that is, you have a high endurance or conserve your energy).

    UPDATED RANGED FORMULA

    As you'll see, I've tried to remove as many arbitrary values as possible:

    Code:
    ( Skill attacker ) + ( exhaustion target ) - (HEX * (10 - PE) for first (weaponrange / 5), HEX * ( 11-PE ) for the next, etc. (add 1 for night ) ) - (agility target*3) - (perception target) - (Str Penalty) 
    As you can see, now the increments of the distance penalty are determined by the weapon range, so that, e.g., a rifle decreases in accuracy over distance less rapidly than a pistol (this is in addition to the scoped rifle changes mentioned in the first post).

    I hope that this system guarantees that not only does each (physical) stat play a relevant role in combat, but that they do so in a non-arbitrary way. I believe it makes sense that a low PE character will now have to try and get in close range of his enemies and that a low EN character will have to try and avoid drawn-out battles.
     
  10. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    Well, hubris and all that; I've hit a huge, annoying roadblock that I should have seen coming.

    As far as I can tell, the game insanely can't tell what your active hand is; that is, it doesn't know whether you're using your left hand or your right. I always stupidly assumed that the "put your weapons away" command only applied to the active hand, but nope.

    This means that all of the basic stuff of tohit calculation, like skill checks, become impossible. The only workaround I could think of was the (get_attack_type) command, but apparently that only kicks in just after the tohit sequence (it just returns "punch" during tohit, for some reason).

    So unless one of you knows another workaround I've missed, I think making the tohit calculation yourself is impossible.
     
  11. Glovz

    Glovz Vault Dweller
    Modder

    735
    Sep 16, 2005
    @JimTheDinosaur
    Why not ask Timeslip if there is a way a flag of some sort can be captured for the active hand slot?
     
  12. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    I forgot to check the sfall function list for the umpteenth time before posting my laments:

    0x8193 - int active_hand()
    0x8194 - void toggle_active_hand()

    EDIT: Doesn't seem to work

    display_msg(" attacktype " + (obj_pid(critter_inven_obj(target,active_hand))));
    display_msg(" attacktype " + (obj_pid(critter_inven_obj(attacker,active_hand))));
    display_msg(" attacktype " + (obj_pid(critter_inven_obj(dude_obj,active_hand))));

    All return -1 (i.e. unarmed) when attacking Klint with a spear. Anybody have any ideas?

    EDIT2: If my google translating of this thread is correct, then Timeslip was apparently one byte off with the active_hand command, though I'm not sure if I won't break the current version of sfall if I download the new .dll supplied there. I'll test it later today.

    EDIT3: Yup, that just broke everything; oh well, I'll just send a pm to Timeslip asking if he can make the fix.
     
  13. mcwayne86

    mcwayne86 First time out of the vault

    1
    May 3, 2013
    I like your ideas very much not bad at all
     
  14. Riel88

    Riel88 First time out of the vault

    76
    Mar 30, 2010
    Hey Jim !

    I found those old files i told you about, the ones that make stimpacks heal over the course of multiple - i think 3- turns...
    This way one cannot heal him/herself magickly in one single turn...

    This gives combat a whole new layer... making you have to think ahead, judge the situation and time your actions a little differently than before .. also it makes you actually look for cover at the end of a turn. (not that fallout should be realistic perse- but i had allot of fun trying to squeeze as much out of my ap's as possible.

    I also found the files to make all items get double weight- making it harder what to choose or leave behind and makes that car trunk and followers backpack feel much more appriciated.

    also the weapon drop mod (which actually turned out real good and fun in contrary to what on paper could turn out not so fun due to engine limitations.

    (i also have a small combat tweak mod which gives melee a small but to me a fresh twist, for example making thrusting an swinging knives act more differently than before - both having their uses againts armored and unarmored foes)

    Im an avid melee and unarmed player so this was a godsend adding just that small layer of difference while keeping things balanced.

    Also, throwing weapons were made much mucgh more potent, making it worth and actually viable for players to choose or invest in this skill. - not to mention enemies with grenades are now a priority to take out first.
    (and you gotta love when a nade gets thrown wrong and randomly lands somewhere !

    I feel these small tweaks could very well be a good source of inspiration and add to what you are doing.
    To me i cannot play without these changes anymore.

    And all of these tweaks and mods were made by what to me, are the fallout gods - like nirran ,josan12,glovz,cubik,haenlomal,pixote... so it would be a shame of these idears and works got lost in time !

    Thnx guys !

    so if anybody wants these let me know
     
  15. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    I've been thinking about the stimpack problem, and I've come to the conclusion that the delayed technique is not preferable. Here's why:

    First, what are stimpacks? The game is kind of nebulous about it, but what's at least clear from the description is that it's a combat stimulant meant to "heal" minor damage instantly. I remember that since the first time I played Fallout I couldn't wrap my head around this concept; if I get shot in the leg for 15 damage, why is this bullet wound healed instantly by pumping some liquid there? The explanation from a gameplay perspective is clear enough: Fallout needed a D&D health potion of its own, because players want to get healed on the fly or else they get frustrated. Which I understand; but it still annoys me just like all D&D holdovers in Fallout annoy me.

    Now, the reason I don't like your (or rather, Josan's) approach is that it doesn't address the fundamental problem: why, or how, does the stimpack "heal" anything, whether delayed or instantaneously? The solution I would suggest is to make it what it implicitly states on the tin: an advanced combat stimulant; are you shot in the leg, but do you need to fight on through the pain and blood loss? Inject a stimpack full of painkillers and coagulants to keep you going! The wound itself will still be there, but temporarily the problem will be fixed.

    So here would be my approach: the stimpack "heals", say, 16 hitpoints instantly, after half an hour, when the painkillers wear off, you lose half of that, and after an hour, when the coagulants bleed through, the rest is gone as well. This approach would also address the problem (to me at least) that, as it is now, a low EN character can take potentially a hundred bullets in the head in a single battle, as long as he takes the time to inject a stimpack after each hit. Now, you would only be able to take as many stimpacks as you max hitpoints allows. I would probably need to ask Timeslip for a variant on the super stimpack fix to avoid making regular stimpacks an assassination tool or having them accidentally kill you when you miscalculate.

    With stimpacks made into the temporary healing devices they should have (in my opinion) been from the start, we can make first aid and doctor more important. I'm pretty sure I can easily script the Healing Rate to be dependent on these skills (if you can take your HR up to, say, 20, then resting suddenly becomes a less annoying healing method), so that would be one way of making these skills more viable.
     
  16. Riel88

    Riel88 First time out of the vault

    76
    Mar 30, 2010
    Hey !
    I like your temporary healing device idear a great deal and i get what your saying about staying true to what a stimpack is or supposed to be in the fallout world.
    Im all for having more purpose and use for all the different underused skills.

    Guess the only thing i will miss is having to duck for cover and make use of the scenery and surroundings more during combat instead of just standing still taking and receiving hits.

    Or would an optional setting be possible for also adding the heal over 2/3 turns next to your temp.heath increase mechanic so this way for those that want to it can be extra difficult ?
     
  17. Hety

    Hety First time out of the vault

    27
    Nov 9, 2008
    Reinvention of JA2 system of healing... nice :) And yes, FA and Doctor need some love. But i also believe, that stimpacks need to heal some of he damage fully and instantly to reflect the fact, that some medicine can stimulate rapid regeneration(we are talking about the world, where plasma and laser weapons are reality, after all). Also adding HP enchancing effect to Super Stimpack (and maybe AP enchancing, like 1 AP or something) is a good idea, considering the drawbacks.
     
  18. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    Yeah, I came to the same conclusion that stimpacks should at least heal something, but that this should never be their primary purpose. I disagree about super stimpacks and AP though; we already have plenty of offensive combat stimulants in the game, (super) stims should be the defensive variant. What I have done is that super stims now raise your max hitpoints (temporarily) by 10, then raise your hitpoints by 50, then the first decreases -5, -5 and the latter -20, -20 (so it does heal something permanently at least: 10 hp - not enough to make you want to use it outside of battle). Regular stims now heal 20, then -8, -8 (so 4 hp permanent - again, you won't be using it outside of battle).

    I've also changed Psycho while I was at it because I always found the system it used quite silly (you can suddenly resist 90% of bullet damage, but explosions, lasers, etc. still do the same damage?). Now it drastically raises your max hp (40) to reflect the additional punishment you can take, which then drops 50 after you start coming down (and of course back to normal after that). I had to sacrifice the initial INT penalty to make this new system work, but I doubt anybody found it had any gameplay consequences other than an exploit for becoming stupid temporarily (you can of course still use it for that purpose, except now you have to become addicted first).

    Another reason I had to change Psycho was to free up critters' base DR for another project for improving a hitherto fairly useless stat, but which in the wasteland should be essential: repair. What I've done is that the armor you and your party members wear (at least, I'm pretty sure nobody else wears armor) changes based on the ability of the wearer to maintain it. Have a nice suit of power armor but not the slightest idea of how to keep it in good shape? The armor's DR will suffer as a result. Conversely, if you're extremely adept at armor maintanence (150+ repair) then the DR will actually increase. I would liked to have had this also apply to weapons, but I'm pretty sure that's impossible.

    Anyway, I've added them all to a download along with the supply and demand mod, and you can pick which one you want to try out/tweak (again, the the dude script is only there to fire global vars on map enter; if you don't want to override your own, just add
    Code:
    set_sfall_global("priceset", 1);
    set_sfall_global("healtset", 1);   
    at map_enter_p_proc)
    If you want to check out the scripts (they're also in the "source" folders in the download), here they are:

    [spoiler:7f48cac89a]
    Armor Repair:
    Code:
    procedure start;
    
    
    #include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\sfall.h"
    #include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\define.h"
    
    procedure start begin
      variable arcritter;
      if game_loaded then begin
        set_global_script_type(1);
        set_global_script_repeat(100);
      end else begin
        	foreach arcritter in list_as_array(LIST_CRITTERS) begin
      			if is_wearing_leather_armor(arcritter) and ((get_critter_base_stat(arcritter, STAT_dmg_resist) != leather(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_laser) != leather(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_fire ) != leather(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_plasma) != leather(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_electrical) != leather(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_explosion) != leather(arcritter))) then begin 
     				set_critter_base_stat(arcritter, STAT_dmg_resist, leather(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_laser, leather(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_fire, leather(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_plasma, leather(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_electrical, leather(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_explosion, leather(arcritter));
       				//display_msg(" base stat1 " + get_critter_base_stat(arcritter, STAT_dmg_resist));
     			end
      			else if is_wearing_metal_armor(arcritter) and ((get_critter_base_stat(arcritter, STAT_dmg_resist) != metal(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_laser) != metal(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_fire ) != metal(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_plasma) != metal(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_electrical) != metal(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_explosion) != metal(arcritter))) then begin 
     				set_critter_base_stat(arcritter, STAT_dmg_resist, metal(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_laser, metal(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_fire, metal(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_plasma, metal(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_electrical, metal(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_explosion, metal(arcritter));
       				display_msg(" base stat2 " + get_critter_base_stat(arcritter, STAT_dmg_resist));
     			end
      			else if is_wearing_combat_armor(arcritter) and ((get_critter_base_stat(arcritter, STAT_dmg_resist) != combat(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_laser) != combat(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_fire ) != combat(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_plasma) != combat(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_electrical) != combat(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_explosion) != combat(arcritter))) then begin 
     				set_critter_base_stat(arcritter, STAT_dmg_resist, combat(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_laser, combat(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_fire, combat(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_plasma, combat(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_electrical, combat(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_explosion, combat(arcritter));
       				//display_msg(" base stat3 " + get_critter_base_stat(arcritter, STAT_dmg_resist));
     			end
      			else if is_wearing_power_armor(arcritter) and ((get_critter_base_stat(arcritter, STAT_dmg_resist) != power(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_laser) != power(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_fire ) != power(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_plasma) != power(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_electrical) != power(arcritter)) or (get_critter_base_stat(arcritter, STAT_dmg_resist_explosion) != power(arcritter))) then begin 
     				set_critter_base_stat(arcritter, STAT_dmg_resist, power(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_laser, power(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_fire, power(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_plasma, power(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_electrical, power(arcritter));
      				set_critter_base_stat(arcritter, STAT_dmg_resist_explosion, power(arcritter));
       				//display_msg(" base stat4 " + get_critter_base_stat(arcritter, STAT_dmg_resist));
     			end
     			else if ((get_critter_base_stat(arcritter, STAT_dmg_resist) != 0) or (get_critter_base_stat(arcritter, STAT_dmg_resist_laser) != 0) or (get_critter_base_stat(arcritter, STAT_dmg_resist_fire ) != 0) or (get_critter_base_stat(arcritter, STAT_dmg_resist_plasma) != 0) or (get_critter_base_stat(arcritter, STAT_dmg_resist_electrical) != 0) or (get_critter_base_stat(arcritter, STAT_dmg_resist_explosion) != 0)) and not (is_wearing_leather_armor(arcritter) or is_wearing_metal_armor(arcritter) or is_wearing_combat_armor(arcritter) or is_wearing_power_armor(arcritter)) then begin
     				set_critter_base_stat(arcritter, STAT_dmg_resist, 0);
      				set_critter_base_stat(arcritter, STAT_dmg_resist_laser, 0);
      				set_critter_base_stat(arcritter, STAT_dmg_resist_fire, 0);
      				set_critter_base_stat(arcritter, STAT_dmg_resist_plasma, 0);
      				set_critter_base_stat(arcritter, STAT_dmg_resist_electrical, 0);
      				set_critter_base_stat(arcritter, STAT_dmg_resist_explosion, 0);
       				//display_msg(" base stat set to 0 " + get_critter_base_stat(arcritter, STAT_dmg_resist));
     		 	end
     		end
      end
    end
    Drug changes:
    Code:
    procedure start;
    
    
    #include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\sfall.h"
    #include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\define.h"
    
    procedure start begin
      if game_loaded then begin
        set_global_script_type(1);
        set_global_script_repeat(100);
      end else begin
      	if (get_proto_data(PID_STIMPAK, 40) != -1) then begin
      		set_proto_data(PID_STIMPAK, 36, 35);
      		set_proto_data(PID_STIMPAK, 40, -1);
      		set_proto_data(PID_STIMPAK, 48, 20);
      		set_proto_data(PID_STIMPAK, 60, 30);
      		set_proto_data(PID_STIMPAK, 64, -8);
      		set_proto_data(PID_STIMPAK, 76, 60);
      		set_proto_data(PID_STIMPAK, 80, -8);
       				//display_msg(" stim " );
        	end
      	if (get_proto_data(PID_SUPER_STIMPAK, 36) != 7) then begin
      		set_proto_data(PID_SUPER_STIMPAK, 36, 7);
      		set_proto_data(PID_SUPER_STIMPAK, 40, 35);
      		set_proto_data(PID_SUPER_STIMPAK, 48, 10);
      		set_proto_data(PID_SUPER_STIMPAK, 52, 50);
      		set_proto_data(PID_SUPER_STIMPAK, 60, 30);
      		set_proto_data(PID_SUPER_STIMPAK, 64, -5);
      		set_proto_data(PID_SUPER_STIMPAK, 68, -20);
      		set_proto_data(PID_SUPER_STIMPAK, 76, 60);
      		set_proto_data(PID_SUPER_STIMPAK, 80, -5);
      		set_proto_data(PID_SUPER_STIMPAK, 84, -20);
       				//display_msg(" superstim " );
        	end
      	if (get_proto_data(PID_PSYCHO, 44) != 7) then begin
      		set_proto_data(PID_PSYCHO, 40, 7);
      		set_proto_data(PID_PSYCHO, 44, 35);
      		set_proto_data(PID_PSYCHO, 52, 40);
      		set_proto_data(PID_PSYCHO, 56, 40);
      		set_proto_data(PID_PSYCHO, 68, -50);
      		set_proto_data(PID_PSYCHO, 72, -40);
      		set_proto_data(PID_PSYCHO, 84, 10);
      		set_proto_data(PID_PSYCHO, 88, 0);
       				//display_msg(" psycho " );
        	end
      end
    end
    Health rate changes:
    Code:
    procedure start;
    
    
    #include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\sfall.h"
    #include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\define.h"
    
    procedure start begin
    	variable hrcritter;
      if game_loaded then begin
        set_global_script_type(1);
        set_global_script_repeat(100);
      end else begin
      	if (get_sfall_global_int("healtset") == 1) then begin
        	foreach hrcritter in list_as_array(LIST_CRITTERS) begin
      			if (get_critter_extra_stat(hrcritter, STAT_heal_rate) != healingrate(hrcritter)) then begin
      			 set_critter_extra_stat(hrcritter, STAT_heal_rate, healingrate(hrcritter));
      			 end
      		end
      		set_sfall_global("healtset", 0);
      	end
      end
    end
    defines added to define.h:
    Code:
    //healing rate define
    
    #define healingrate(x)                        ((get_critter_stat(x, SKILL_FIRST_AID)/10)+(get_critter_stat(x, SKILL_DOCTOR)/30))
    
    //armor repair defines
    
    #define leather(x) 							 (-10 + (get_critter_stat(x, SKILL_REPAIR)/15))
    #define metal(x) 							 (-10 + (get_critter_stat(x, SKILL_REPAIR)/15))
    #define combat(x) 							 (-10 + (get_critter_stat(x, SKILL_REPAIR)/15))
    #define power(x) 							 (-10 + (get_critter_stat(x, SKILL_REPAIR)/15))
                                                 
    [/spoiler:7f48cac89a]
     
  19. Hety

    Hety First time out of the vault

    27
    Nov 9, 2008
    Can we get installation instructions plix? :)
     
  20. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    Oh, right, sorry. Was considering adding a readme, but I thought only the incrowd would be interested at this stage.

    For all the sfall scripts (the ones starting with "gl"), all you need to do is make a data/scripts folder where your game is (they don't override anything). However, for the obj_dude script you need to do a bit more, because the game will automatically use the one in the patch .dat. What I'd recommend is use dat explorer or some other program to extract the patch to a temp folder, rename the .dat to .bak or something, then rename the temp folder to Patch000.dat. Now override the Obj_Dude in there with the new one.

    Bit of a hassle, but I think it's the easiest one.

    EDIT: Crap, only just found out that I was wrongly using critter_stat instead of has_skill for skills all this time. I'll have a fix up later today.

    EDIT2: fixed

    EDIT3: Oh well, it's all a lot more buggy than I'd expected, better pull the plug.