I have done some personnal tweak to your script and i succedded to adjust some things (i dont know to code so i've done some empiric experiment and that work, may be not in an elegant way but... ^^) :
i've added a player HP check to avoid activation at full life and in helicopter / note my values are set for a 33% player HP with Infinite Heaven, so that should be ajusted for other values (or may be set a % check, but i dont know how to do that). Also i forced the med spray animation (so broken leg and arm should happen only on defaut situation) and my tweaks have a line for the Exhaution mod.
(my tweak are after ----X lines)
-------------------------
if(Player.IsVarsCurrentItemCBox()) then
else
----X added lifecheck
if (vars.playerLife < 1500 and bit.band(PlayerVars.scannedButtonsDirect,PlayerPad.ACTION)==PlayerPad.ACTION)then
if (Time.GetRawElapsedTimeSinceStartUp() - e.hold_pressed3 > 1)then
----X check added to avoid activation in helicopter
I thought about a medkit possibilities, : if you want to add some kind of medkit use, you could add a check for a "medkit usage" variable refilled when you use a cardbox for exemple. Not perfect, but that could do the trick.
Hi, your tweak sounds cool! I have very limited knowledge on MGSV Modding. What file would we need to open to make such tweaks? What program should be used? I know how to use Snakebite, Makebite, Notepad++, and all that. Is it possible for me to do myself?
Yup thats this line, initally that was "math.random(1,3)" (1 was leg injury and 2 was hand if i'm correct), i guess i could have just replace it by just "3" (so removing the random calculation which became useless) but i just tried it and that works so i'd keep it like that.
For this kind of tweak on scripts, you need almost nothing, thats a .lua file, a simple notepad is enough. The scripts added for Infinite Heaven are located in \MGS_TPP\mod\modules.
Could you tell me which script you changed to force the First Aid Spray? Your instructions are pretty straightforward, but I couldn't see any instructions related to forcing the First Aid Spray only. I'm assuming it's this one:
Player.SetForceInjury{type=math.random(3,3)}
Sorry, I have no idea how all this works, just guesswork for me... I simply want to get the HP Check and First Aid Spray only animation. I think I understand what to change for the HP Check, but again, not for the First Aid Spray...
May be you could add a low HP check to prevent activation when high/full life, caus that can be problematic when doing parkour for exemple (keeping Y pressed for chain climbing activate the injury).
I'm planning on downloading this and checking it out. You asked for suggestions, maybe you could do a bleeding state and having to use bandages to stop losing health or something like that? Maybe it can't be done but I figured it didn't hurt to ask. I also like the med kit bait bottle idea.
Do you happen to know the aliases for other keypresses? I would like to change the forced injury input from action (3 seconds) to something else (probably quickdive 5 seconds)
Using action (3s) conflicts with fulton often.
This mod is great, this was the final piece I needed to MGSV to be the perfect arcadey stealth action roguelite
33 comments
i've added a player HP check to avoid activation at full life and in helicopter / note my values are set for a 33% player HP with Infinite Heaven, so that should be ajusted for other values (or may be set a % check, but i dont know how to do that). Also i forced the med spray animation (so broken leg and arm should happen only on defaut situation) and my tweaks have a line for the Exhaution mod.
(my tweak are after ----X lines)
-------------------------
if(Player.IsVarsCurrentItemCBox()) then
else
----X added lifecheck
if (vars.playerLife < 1500 and bit.band(PlayerVars.scannedButtonsDirect,PlayerPad.ACTION)==PlayerPad.ACTION)then
if (Time.GetRawElapsedTimeSinceStartUp() - e.hold_pressed3 > 1)then
----X check added to avoid activation in helicopter
if InfMain.IsSafeSpace(vars.missionCode) then
e.hold_pressed3 = Time.GetRawElapsedTimeSinceStartUp()
else
---Player.SetForceInjury{type=math.random(1,3)}
Player.SetForceInjury{type=math.random(3,3)}
----X added health to avoid injury spam
vars.playerLife=vars.playerLife + 3000
----X force exhausted time
vars.passageSecondsSinceOutMB=vars.passageSecondsSinceOutMB + 25000
--TppUiCommand.AnnounceLogView(vars.ammoStockCounts[TppDefine.WEAPONSLOT.PRIMARY_HIP])
e.hold_pressed3 = Time.GetRawElapsedTimeSinceStartUp()
end
end
else
e.hold_pressed3 = Time.GetRawElapsedTimeSinceStartUp()
end
end
end
function e.OnTerminate()end
return e</p>
----------------------
I thought about a medkit possibilities, : if you want to add some kind of medkit use, you could add a check for a "medkit usage" variable refilled when you use a cardbox for exemple. Not perfect, but that could do the trick.
The scripts added for Infinite Heaven are located in \MGS_TPP\mod\modules.
Could you tell me which script you changed to force the First Aid Spray? Your instructions are pretty straightforward, but I couldn't see any instructions related to forcing the First Aid Spray only. I'm assuming it's this one:
Player.SetForceInjury{type=math.random(3,3)}
Sorry, I have no idea how all this works, just guesswork for me... I simply want to get the HP Check and First Aid Spray only animation. I think I understand what to change for the HP Check, but again, not for the First Aid Spray...
Edit: Oh I guess it's a default game effect)
Using action (3s) conflicts with fulton often.
This mod is great, this was the final piece I needed to MGSV to be the perfect arcadey stealth action roguelite