Fallout 2 Modding: Quick Question / Answer Thread

Discussion in 'Fallout General Modding' started by Cyrus, Nov 12, 2015.

  1. Cyrus

    Cyrus It Wandered In From the Wastes

    152
    Nov 5, 2015
    This type of thread is a really good idea to have in any modding forum, so I am making it. Its only 15 years too late, but better late than never! :)

    All small questions can go in here, so that there aren't a 100 threads addressing small subjects. Also easier for people to read, all in one place.

    I hope no one is apposed! :)
     
  2. Cyrus

    Cyrus It Wandered In From the Wastes

    152
    Nov 5, 2015
    So here we go:


    1. Is the damage of ranged weapons generated totally randomly within the min/max, or is it based on how far the target is?


    2. In the combat formula:
    ...What type of varibles are X and Y?
    Short? Long? Byte? signed/undigned? INT?

    Thank you.
     
    Last edited: Nov 12, 2015
  3. Magnus

    Magnus Water Chip? Been There, Done That
    Modder

    953
    Dec 6, 2007
    Damage is randomly within min-max.

    As for the formula, it might help if you explain what the hell RD, RB, CM, CD, ADT, AI, ADR and RM are supposed to mean.
     
  4. Cyrus

    Cyrus It Wandered In From the Wastes

    152
    Nov 5, 2015
    Oh, I just pulled this from this page: http://falloutmods.wikia.com/wiki/Fallout_engine_calculations

    I thought everyone pretty much knows this. All the way at bottom of page:
    But also those varibales aren't important, I only wanna know X and Y. Can they be negative,... what is their numeric range, that sort of thing.
     
  5. Magnus

    Magnus Water Chip? Been There, Done That
    Modder

    953
    Dec 6, 2007
    They are the damage mod on the ammo used, as listed in the inventory image (always 1/1 for melee/unarmed attacks). It is 1/1 for most ammo, 3/2 for some, and a whopping 2/1 for Gauss and Needler AP ammo (i.e. 200% damage). JHP ammo has a 2/1 mod as well, but also a +20 DR mod so that Damage Resistance is increased on the target. This still results in far better damage than other ammo, especially with criticals. On AP ammo it is an erroneous 1/2, which means all AP ammo is shit because it does half damage.

    I've fixed this in F2WR by giving AP ammo a 1/1 mod and a -40 DR mod, whereas JHP has a 7/2 damage mod and a +48 DR mod. This puts the point where AP ammo outperforms JHP at Metal Armor (whose DR I have also increased, while lowering DT).

    The damage mod values are stored as signed integers in the ammo proto file, so in theory they can be negative, but I have no idea what happens if you try.
     
    Last edited: Nov 12, 2015
  6. Cyrus

    Cyrus It Wandered In From the Wastes

    152
    Nov 5, 2015
    Bingo, thanks. That's what I wanted to know. The other stuff I knew, but thanks anyways.

    And yeah I know about your mod, as a matter of fact I will likely use your mod as the base for mine, but first, I need to learn how to mod for FO2! lol


    Now do you know how big X and Y can be? Are they a single byte value (-127 to +128) or Short (-32000~ to +32000~)? (I've got something up my sleeve, hence these questions... :wink: )



    2. When I read the guides often it says pass a speech check, but no number is given, what is actually checked if no number is specified?


    3. I'd like to learn how to edit the combat formula (both ranged and Unarmed/melee), and also learn to edit critter, and item files (proto files I guess). How can I get started, where should I look to learn?


    Thanks guys.
     
    Last edited: Nov 13, 2015
  7. Magnus

    Magnus Water Chip? Been There, Done That
    Modder

    953
    Dec 6, 2007
    The numbers are stored as 32-bit integers, but I'm not sure if the game treats them as such. You'll have to experiment.

    This page contains all you'll need to know to start modding: http://www.nma-fallout.com/content.php?page=fo-modding

    You may also want to check the fallout wiki for more accurate information on the proto file format.
     
  8. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    This page specifically.
     
  9. Cyrus

    Cyrus It Wandered In From the Wastes

    152
    Nov 5, 2015
    Thanks so much guys.

    BTW, Ive really looked hard and asked elsewhere but got no answer to this:

    Do any of the Melee or Ranged weapons have any hidden characteristics that are not already listed on the wiki pages? For example critical chances, like the heymaker and piercing strike. I'm wondering for example if there is a difference between a thrust and a swing action for some melee weapons. I haven't found any info searching the internet or this forum.
     
  10. Magnus

    Magnus Water Chip? Been There, Done That
    Modder

    953
    Dec 6, 2007
    There are no hidden characteristics like that. And there's no difference between thrust and swing.
     
  11. Cyrus

    Cyrus It Wandered In From the Wastes

    152
    Nov 5, 2015
    So is it not possible then to give additional critical chance or penetration ability to a particular attack-mode of a weapon?

    Similar to unarmed, but for melee weapons.
     
  12. burn

    burn Mildly Dipped
    Modder

    571
    Apr 22, 2012
    I think it's already done in mechanics overhaul mod.
     
  13. Magnus

    Magnus Water Chip? Been There, Done That
    Modder

    953
    Dec 6, 2007
    This is possible, with the hs_combatdamage and hs_tohit hook scripts. It does require you to rewrite much of the formula yourself, if you want to do it correctly. And yes, I believe these mechanics are implemented in Jim's mechanical overhaul and phobos' combat rebalance mod.

    You can download the sfall script editor and open the hook script .int files in those mods with it, to see how they have done it.
     
    Last edited: Nov 14, 2015
  14. Cyrus

    Cyrus It Wandered In From the Wastes

    152
    Nov 5, 2015
    Awesome! ...Though a bit like ...holy crap! Where will I find the time to learn all of that!

    Thanks guys.
     
  15. Blackened

    Blackened I should set a cutom tite

    598
    Jun 29, 2008
    On many occasions modders are saying that certain things are "impossible" to change, or in the engine. But there are mods which work by changing the engine, e.g. Mr. Fixit. What is going on? Is it that changing the engine is possible but difficult because it depends on a lot of code, or is it more difficult (for example, if some things are closed source so they can't easily be replaced or even recreated).

    Asking because I'm planning to spend some time modding, preferably contributing to very promising mods which need programmer time. Any loosely related advice which wasn't mentioned in the question would also be appreciated.
     
  16. Magnus

    Magnus Water Chip? Been There, Done That
    Modder

    953
    Dec 6, 2007
    Changing the engine is difficult because it basically means reverse engineering it, hunting down memory addresses and writing a lot of assembly code.
    The preferred way to do it nowadays is through sfall, which is open source, but even so it requires that you make a custom version of it which might not be compatible with future versions or other mods.
     
  17. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    mr fixit is actually a funny example of how inflexible something like graphics in the engine still is. When you first look at it, it might seem very simple: the inventory art of the item you want to create superimposed over custom artwork by the mod creator. But this inventory art (frm's) can't simply be used on the fly: it has to be converted to a pcx file first. These pcx's don't have the transparency that comes with frm's, so you can't simply superimpose them. So what the creator had to do was manually integrate each and every piece of item art with his custom interface, which is really silly when you think about it.

    This is sort of a lesson for everything related to fallout modding: very little is out of bounds or strictly hardcoded per se, but you will need to be creative in terms of intensive (or even total) workarounds (see some of my threads for how this applies to something like AI modding).
     
  18. Blackened

    Blackened I should set a cutom tite

    598
    Jun 29, 2008
    So all modding would've been different and much easier if they'd made the game open-source?
     
  19. Magnus

    Magnus Water Chip? Been There, Done That
    Modder

    953
    Dec 6, 2007
    Yeah, but that wasn't a thing in the 90s.
     
  20. Gizmojunk

    Gizmojunk Half-way Through My Half-life

    Nov 26, 2007
    Are there reasons [technical reasons] that the FOnline engine cannot be used to replace the original in a future user patch?
    (Loosely akin to BG-TuTu.)