Adding a second solar scorcher (or other ammo-less weapon)

Discussion in 'Fallout General Modding' started by Velizar, Jul 17, 2019.

  1. Velizar

    Velizar First time out of the vault

    Jul 17, 2019
    I'm working on a mod and I would like to add a second solar scorcher. From what I gather, the solar scorcher's logic is hardcoded in the game engine. An old post claims that it is actually in the exe, but I looked for the solar scorcher's ID number (00000390 in decimal, 186 in hex) and I couldn't find it in the exe, so that might be wrong.

    How would I go about adding the solar scorcher reloading mechanism to a weapon I made, without changing the original solar scorcher? The reason I want to do this is that I would like my mod to be compatible with other mods, and since other mods might have the solar scorcher, I don't want to break it for them.

    Alternatively, is there a way I can add an ammo-less weapon to the game? The reason why I want to do this is that my mod adds a weak solar scorcher before the temple of trials, so that energy weapon characters can do something better than struggle with melee weapons / small guns for the first half of the game.

    I could make it use BB pellets (description: it melts them and shoots them at enemies), but lore-wise that isn't very goo in my opinion. The lore for the solar weapon (Solar Needle is its name, might change) is that it was crafted by a tribal who had a passion for energy weapons, but could not afford the ammunition, so crafted this which uses solar energy. I think that's considerably better than the BB version? Opinions welcome.
     
  2. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Solar scorcher's logic is indeed hardcoded in the engine.
    For the weapon you want, the easier solution I can think of is to add a new weapon and a new ammo, and use sfall's ammocost hook script to make it doesn't really cost any ammo when attacking. It's not a real "ammo-less" weapon as it still requires having the ammo loaded, but you can take this as attaching a jury-rigged solar panel to the weapon. Or you can use the concept of New Vega's recharger pistol to set it as a weak self-charging EW (i.e. infinite ammo).
     
    Last edited: Jul 17, 2019
  3. Velizar

    Velizar First time out of the vault

    Jul 17, 2019
    Great idea! But I also wanted to add a burst mode, so I don't think this will work with that. I might abandon my burst mode idea or go with BBs if nothing else works.

    Are there tutorials / tools for modifying the game engine? I just want to change the logic to apply to weapon IDs 390 && 532, rather than only 390 - are we sure that this is hard to do? I'm currently looking at fallout.exe from within a hex editor.........

    Edit: Upon further investigation, I might be going with BB ammo.
     
    Last edited: Jul 17, 2019
  4. burn

    burn Mildly Dipped
    Modder

    Apr 22, 2012
    I don't quite understand the problem. Making it "use" a new ammo pid, and adding a script to auto recharge it after a shot should be enough, no?
     
  5. Velizar

    Velizar First time out of the vault

    Jul 17, 2019
    Originally I wanted to specifically use the solar scorcher's logic, since I liked the lore - for this it should only recharge on sunlight. But I managed to convince myself that the BBs version is more realistic.

    Also, in hindsight, 99% of the time fixing lore should be way easier than changing the game engine.
     
  6. burn

    burn Mildly Dipped
    Modder

    Apr 22, 2012
    Adding a check for light level and/or indoor/outdoor area in auto-recharge also should be easy enough.
    (Of course auto-recharge is slightly different from scorcher's "0 AP recharge", but arguably it's even better)
     
  7. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015