Help: change GL explosion to Molotov

Discussion in 'PC Mods' started by Paladin Knight, Sep 20, 2017.

Thread Status:
Not open for further replies.
  1. Hi,

    I tried to change GL explosion to Molotov behavior.
    In the file UL_Grenade.xml (\Game\scripts\entities\items\xml\ammo\), I change the explosion effect to molotov.wilkerson (see below), but it worked only for the screen effect as there is actually still an explosion hidden, but the effect showed on the screen is fire effect instead of explosion effect.

    UL_Grenade.xml (\Game\scripts\entities\items\xml\ammo\)

    <param name="pressure" value="2000"/>
    <param name="min_radius" value="18"/>
    <param name="max_radius" value="18"/>
    <param name="min_phys_radius" value="18.0"/>
    <param name="max_phys_radius" value="18.0"/>
    <param name="hole_size" value="2"/>
    <param name="terrain_hole_size" value="3"/>
    <param name="decal" value="textures/decal/"/>
    <param name="effect_scale" value="1.0"/>
    <param name="effect" value="Class3Explosions.Molotov.wilkersons_detonatate_3m2sec"/>
    <param name="radialblurdist" value="30"/>
    <param name="type" value="frag"/>

    What I actually wanted is to have completely Molotov behavior that burns the zed instead of explosion that scatter them away.

    Any suggestion?

    Thank you,
    Del44ZSlayer and Bob Crees like this.
  2. Bob Crees

    Bob Crees Banned

    @Paladin Knight - Welcome to the Forums:)

    I am sure that some of the 'Modders' will be able to help you:)
    Del44ZSlayer and Paladin Knight like this.
  3. QMJS

    QMJS Famous

    You are only looking at half of the relevant files.

    What you have so far is part of it, but look in Game\scripts\entities\items, and compare the ulgrenade.lua and ul_molotov_hicks.lua files. Those also affect the fire/explosion effects.
  4. Hi Bob & QMJS, thanks for the warm welcome :)

    I've tried to copy paste some (and later all) the code from ul_molotov_hicks.lua to ulgrenade.lua, but alas no luck.
    It seems like it only works for hand-thrown grenade type.
    When I copy-paste the molotov lua content to M67 grenade lua file (ulgrenade_m67.lua), it works properly, the M67 perform like molotov.
    However it did not do anything when applied to GL ammo type.

    So I guess the burn effect only belong to hand-thrown molotov?
    Del44ZSlayer and Bob Crees like this.
  5. QMJS

    QMJS Famous

    That is possible. I haven't ever specifically tried to change those.

    It probably is a question of replacing only specific pieces of the lua code. Try copying the entire function UL_Molotov_Hicks:Explode() from UL_molotov_hicks.lua and replacing just that part in Ulgrenade.lua, replacing the contents of the function ULGrenade:Explode(), but keep the first line (the function name) the same.
  6. Hi QMJS,

    Yup that's what I actually did. And it worked fine with M67, instead of exploding the M67 now burn the zed.
    However when applying it to GL, it kills the horde of zeds in one shot. So I think it probably related to weapon damage, but then even I changed the weapon damage to 10 - which make the zeds laugh - it still didn't burn them.

    For comparison, the molotov homemade strong when thrown to surface will burn the surface (even without zed).
    But when it settings applied to ULGrenade.LUA then it only show the first detonate effect. This detonate effect actually comes from UL_Grenade.XML not from ulgrenade.lua.

    I thought it might be another files that need to look at?
    Del44ZSlayer and Bob Crees like this.
  7. QMJS

    QMJS Famous

    The only other thing that it could be is the ulgrenade.ent file. That only contains the name of the script script (lua file) that it runs. Maybe just assigning the molatov lua script would work.

    I suspect the difference is the weapon class... technically the ulgrenade is a rocket, while the Molotov's are all thrown. That is probably affecting other parts, since you have to fire the grenade launcher, but use to throw the Molotovs. Somewhere in the code where those are handled (statemachine stuff, we can't really do anything with) it may be interfering.

    Edit: The ent files are in Game\entities\ulgrenade.ent
  8. Unfortunately, changing the ulgrenade.ent isn't working either.
    All rite then, I think I'll just play around with what I can change.
    Thanks anyway, appreciate your help this far :)
    Bob Crees, Del44ZSlayer and QMJS like this.
  9. Hi @QMJS do you mind if I asked another matter here? :D

    I would like to reduce the number of personnel in Call for Backup from 3 to 2.
    I go around mercenary_x.lua (game/scripts/entities/ai) but I think it just for the behaviour of those mercs.
    Also not in mercenary.xml (game/scripts/ai/selectiontrees/ul/)
    Any suggestion?

    Bob Crees likes this.
  10. QMJS

    QMJS Famous

    There are two different versions of that radio call, the mercenaries from Lifeline and the SWAT team in Breakdown/Story mode, but both simply select characters with the Trait.Merc.Gun, so the same process is used in each version.

    The call itself is handled by either a statemachine or the exe itself, and is out of reach so far.

    However, I think you could probably limit it by making sure that the characters file only had two characters with the
    <DefaultTrait Trait="Trait.Merc.Gun" />

    There are three in story mode, and six in Breakdown and Lifeline. I wouldn't remove the characters themselves, just the trait. That way you can put it back easily if it breaks the scripting and the radio call just stops working entirely.
    Paladin Knight and Bob Crees like this.
  11. Hi QMJS,

    I did as instructed, by commenting one of the trait, but they still come with 3 personnel.
    However, I might have some of my game files corrupted (or probably corrupted saved game), as they're not the SWAT Officers who respond the call for backup radio, but 3 random NPC characters.
    So every time I called in the swat backup, 3 random NPC appears.
    I will need to try to restart the story from beginning to see whether those changes will take effect.
    Or is there any way to enable the swat radio after arrived at church?
    Bob Crees likes this.
  12. QMJS

    QMJS Famous

    Because of the story progression and the fact that he isn't actually ever one of your survivors, the normal trait used to control the ability to summon the swat team isn't used. It is instead enabled as part of a different system, and I think that changing that could entirely mess up the story mode missions.
    Bob Crees likes this.
  13. Update: I've figured out how to enable the radio when story arrived at church, and then tested the trait removal. Restarting the game fixes the error above, but it still 3 personnel arrives instead of 2 even though I have removed one of the merc trait. So I think there is no way I could do this. Well it's ok then. I play this game again just for fun after watching sod2 trailer.
    Bob Crees likes this.
Thread Status:
Not open for further replies.

Share This Page