Files
barotrauma-gamefiles/cooksecurity.sh
2025-03-27 16:43:54 +01:00

168 lines
8.6 KiB
Bash

bigmodifier=2
smallmodifier=1.5
modify '<Talent identifier="buff">!anyvalue="(?<duration>!num)"!anyvalue!anyvalue="(?<resistance>!num)"!anyvalue!anyvalue="(?<durationv>!num)"!anymultiplier="(?<resistancev>!num)"' \
"duration=round(duration*$bigmodifier, 2)
resistance=round(resistance*$bigmodifier, 2)
durationv=duration
resistancev=1-round(resistance/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="firstaidtraining">!anyvalue="(?<skillbonus>!num)"!anyvalue!anyvalue="(?<potency>!num)"!anyvalue="(?<skillbonusv>!num)"!anyvalue="(?<potencyv>!num)"' \
"skillbonus=round(skillbonus*$bigmodifier, 2)
potency=round(potency*$bigmodifier, 2)
skillbonusv=skillbonus
potencyv=round(potency/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="physicalconditioning">!anyvalue="(?<movementspeed>!num)"!anyvalue!anyvalue="(?<oxygenlowresistance>!num)"!anyvalue!anyvalue="(?<movementspeedv>!num)"!anymultiplier="(?<oxygenlowresistancev>!num)"' \
"movementspeed=round(movementspeed*$bigmodifier, 2)
oxygenlowresistance=round(oxygenlowresistance*$bigmodifier, 2)
movementspeedv=round(movementspeed/100, 2)
oxygenlowresistancev=1-round(oxygenlowresistance/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="protectandserve">!anyvalue="(?<xpbonus>!num)"!anyvalue="(?<reputationbonus>!num)"!anymultiplyvalue="(?<xpbonusv>!num)"!anyaddedvalue="(?<reputationbonusv>!num)"' \
"xpbonus=round(xpbonus*$bigmodifier, 2)
xpbonusv=round(1+xpbonus/100, 2)
reputationbonus=round(reputationbonus*$bigmodifier, 2)
reputationbonusv=round(1+reputationbonus/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="swole">!anyvalue="(?<maxhp>!num)"!anyvalue!anyvalue="(?<meleepower>!num)"!anyvalue!anyvalue="(?<maxhpv>!num)"!anyvalue="(?<meleepowerv>!num)"' \
"maxhp=round(maxhp*$bigmodifier, 2)
meleepower=round(meleepower*$bigmodifier, 2)
maxhpv=round(maxhp/100, 2)
meleepowerv=round(meleepower/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="bootcamp">!anyvalue="(?<bonusxp>!num)"!anyvalue="(?<levelthreshold>!num)"!anyvalue="(?<skillbonus>!num)"!anyminlevel="(?<levelthresholdv>!num)"!anyvalue="(?<skillbonusv>!num)"!anymaxlevel="(?<maxlevel>!num)"!anymultiplyvalue="(?<bonusxpv>!num)"' \
"bonusxp=round(bonusxp*$bigmodifier, 2)
levelthreshold=round(levelthreshold*$bigmodifier, 0)
skillbonus=round(skillbonus*$bigmodifier, 2)
levelthresholdv=levelthreshold
skillbonusv=skillbonus
maxlevel=levelthreshold-1
bonusxpv=round(1+bonusxp/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="bythebook">!anyvalue="(?<money>!num)"!anyvalue="(?<xp>!num)"!anyvalue="(?<moneymax>!num)"!anyvalue="(?<xpmax>!num)"' \
"money=round(money*$smallmodifier, 0)
xp=round(xp*$smallmodifier, 0)
moneymax=money*8
xpmax=xp*8" \
**/TalentsSecurity.xml
modify '<Talent identifier="weaponsmith">!anyvalue="(?<qualitybonus>!num)"!anyvalue!anyvalue="(?<qualitybonusv>!num)"' \
"qualitybonus=round(qualitybonus*$bigmodifier, 0)
qualitybonusv=qualitybonus" \
**/TalentsSecurity.xml
modify '<Talent identifier="scavenger">!anyvalue="(?<chance>!num)"!anyrandomchance="(?<chancev>!num)"!anyPerItem="(?<chancev2>!num)"' \
"chance=round(chance*$bigmodifier, 2)
chancev=round(chance/100, 2)
chancev2=round(chancev2*$bigmodifier, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="slayer">!anyvalue="(?<attackpower>!num)"!anyvalue="(?<attackpower2>!num)"!anyaddeddamagemultiplier="(?<attackpowerv>!num)"!anyaddeddamagemultiplier="(?<attackpowerv2>!num)"' \
"attackpower=round(attackpower*$bigmodifier, 2)
attackpower2=round(attackpower2*$bigmodifier, 2)
attackpowerv=round(attackpower/100, 2)
-- The other 25%, in the sea, are added on top of the first 25%
-- To result in 50% which is in the tooltip
-- So to maintain accuracy of the tooltip we have to increase this one by only half of our multiplier
attackpowerv2=round(attackpower2/2/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="daringdolphin">!anyvalue="(?<swimmingspeed>!num)"!anyvalue!anyvalue="(?<swimmingspeedv>!num)"' \
"swimmingspeed=round(swimmingspeed*$bigmodifier, 2)
swimmingspeedv=round(swimmingspeed/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="easyturtle">!anyvalue="(?<resistance>!num)"!anymultiplier="(?<resistancev>!num)"' \
"resistance=round(resistance*$bigmodifier, 2)
resistancev=round(1-resistance/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="specops">!anyaddeddamagemultiplier="(?<addeddamagemultiplier>!num)"' \
"addeddamagemultiplier=round(addeddamagemultiplier*$bigmodifier, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="beatcop">!anyvalue="(?<stunpower>!num)"!anyaddedmultiplier="(?<stunpowerv>!num)"!anyaddedmultiplier="(?<stunpowerv2>!num)"' \
"stunpower=round(stunpower*$bigmodifier, 2)
-- Here it's again fucking weird, the first modifier is 2x the value
-- So we respect that too
stunpowerv=round(stunpower*2/100, 2)
stunpowerv2=round(stunpower/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="stonewall">!anyvalue="(?<physicaldamagereduction>!num)"!anyvalue="(?<stunresistance>!num)"!anyvalue="(?<duration>!num)"!anyamount="(?<durationv>!num)"' \
"physicaldamagereduction=round(physicaldamagereduction*$bigmodifier, 2)
stunresistance=round(stunresistance*$bigmodifier, 2)
duration=round(duration*$bigmodifier, 0)
durationv=duration" \
**/TalentsSecurity.xml
modify '<Affliction!anyidentifier="stonewall"!anymaxstrength="(?<durationv>!num)"!anymaxstrength="(?<durationv2>!num)"!anyminresistance="(?<stunresistancev>!num)"!anymaxresistance="(?<stunresistancev2>!num)"' \
"durationv=round(durationv*$bigmodifier, 0)
durationv2=round(durationv2*$bigmodifier, 0)
stunresistancev=round(stunresistancev*$bigmodifier, 2)
stunresistancev2=round(stunresistancev2*$bigmodifier, 2)" \
**/AfflictionsSecurity.xml
Crusty Seaman
modify '<Talent identifier="inordinateexsanguination">!anyvalue="(?<damagebonus>!num)"!anymultiplier="(?<damagebonusv>!num)"' \
"damagebonus=round(damagebonus*$bigmodifier, 2)
damagebonusv=round(damagebonus/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="implacable">!anyvalue="(?<powerincrease>!num)"!anyvalue="(?<duration>!num)"' \
"powerincrease=round(powerincrease*$bigmodifier, 2)
duration=round(duration*$bigmodifier, 0)" \
**/TalentsSecurity.xml
modify '<Affliction!anyidentifier="implacable"!anyduration="(?<durationv>!num)"!anyvalue="(?<powerincreasev>!num)"' \
"durationv=round(durationv*$bigmodifier, 0)
powerincreasev=round(powerincreasev*$bigmodifier, 2)" \
**/AfflictionsSecurity.xml
modify '<Talent identifier="rifleman">!anyvalue="(?<damagebonus>!num)"!anymultiplier="(?<damagebonusv>!num)"' \
"damagebonus=round(damagebonus*$bigmodifier, 2)
damagebonusv=round(damagebonus/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="commando">!anyvalue="(?<spreadreduction>!num)"!anyvalue="(?<powerincrease>!num)"!anymultiplier="(?<powerincreasev>!num)"!anyvalue="(?<spreadreductionv>!num)"' \
"spreadreduction=round(spreadreduction*$bigmodifier, 2)
powerincrease=round(powerincrease*$bigmodifier, 2)
powerincreasev=round(powerincrease/100, 2)
spreadreductionv=round(spreadreduction/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="tandemfire">!anyvalue="(?<damagebonus>!num)"' \
"damagebonus=round(damagebonus*$bigmodifier, 2)" \
**/TalentsSecurity.xml
modify '<Affliction!anyidentifier="tandemfire"!anyvalue="(?<damagebonusv>!num)"' \
"damagebonusv=round(damagebonusv*$bigmodifier, 2)" \
**/AfflictionsSecurity.xml
modify '<Talent identifier="extrapowder">!anyvalue="(?<radius>!num)"!anyvalue="(?<damagebonus>!num)"!anyvalue="(?<qualitybonus>!num)"!anyvalue="(?<radiusv>!num)"!anyvalue="(?<damagebonusv>!num)"!anyvalue="(?<qualitybonusv>!num)"' \
"radius=round(radius*$bigmodifier*1.5, 2)
damagebonus=round(damagebonus*$bigmodifier, 2)
qualitybonus=round(qualitybonus*$bigmodifier, 0)
radiusv=round(radius/100, 2)
damagebonusv=round(damagebonus/100, 2)
qualitybonusv=qualitybonus" \
**/TalentsSecurity.xml
modify '<Talent identifier="gunrunner">!anyvalue="(?<movementspeedcarry>!num)"!anyvalue="(?<movementspeedaim>!num)"!anyvalue="(?<movementspeedaimv>!num)"!anyvalue="(?<movementspeedcarryv>!num)"' \
"movementspeedcarry=round(movementspeedcarry*$bigmodifier, 2)
movementspeedaim=round(movementspeedaim*$bigmodifier, 2)
movementspeedaimv=round(movementspeedaim/100, 2)
movementspeedcarryv=round(movementspeedcarry/100, 2)" \
**/TalentsSecurity.xml
modify '<Talent identifier="warlord">!anyvalue="(?<damagebonus>!num)"!anyvalue="(?<damagebonusmax>!num)"!anymultiplier="(?<damagebonusv>!num)"!anyaddeddamagemultiplier="(?<damagebonusmaxv>!num)"' \
"damagebonus=round(damagebonus*$bigmodifier, 2)
damagebonusmax=round(damagebonus*5, 2)
damagebonusv=round(damagebonus/100, 2)
damagebonusmaxv=round(damagebonusmax/100, 2)" \
**/TalentsSecurity.xml