Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

Implement mic's ammo crate damage formula thing

Ilya-torshov opened this issue ยท 9 comments

commented

(this is what he wrote, plz ask him about it if anything is problematic)

blowoutpanel1 = (input("blowoutpanel? (True/False)"))
if blowoutpanel1 == "True":
blowoutpanel = bool(True)
else:
blowoutpanel = bool(False)
shelltraitexplosive1 = (input("is the shell explosive? (True/False)"))
if shelltraitexplosive1 == "True":
blastStrength = float(input("magnitude of the HE content explosion?"))
shelltraitexplosive = bool(True)
else:
shelltraitexplosive = bool(False)
shellDiameter = float(input("shell diameter in mm?"))
caseLength = float(input("case length in mm?"))
stackQuantity = float(input("number of stacks?"))
stackSize = float(input("rounds in each stack?"))
itemSize = float(input("rounds in each ammo item?"))
ammorackDetonationStrength = float(0)

if blowoutpanel == True:
shellDetonationStrength = 0
elif shelltraitexplosive == True:
if blowoutpanel == False:
shellDetonationStrength = float(((0.0000025 * (shellDiameter * caseLength)) + (0.1*blastStrength))
ammorackDetonationStrength = float((0.5) * (shellDetonationStrength) * (stackQuantity) * (itemSize) * (stackSize) // 1) #where ammosize means the amount of rounds per single ammo item
else:
if blowoutpanel == False:
shellDetonationStrength = float((0.0000025 * ( shellDiameter * caseLength)))
ammorackDetonationStrength = float((0.5) * (shellDetonationStrength) * (stackQuantity) * (itemSize) * (stackSize) // 1) #where ammosize means the amount of rounds per single ammo item

if blowoutpanel == False:
if ammorackDetonationStrength!=0:
vehicleDamage = float(100 * ammorackDetonationStrength)
elif openroof == True:
vehicleDamage = vehicleDamage * 0.5
ammorackDetonationStrength = ammorackDetonationStrength * 0.5
else:
vehicleDamage = 0

print (ammorackDetonationStrength)
print (vehicleDamage)

commented

Time of posting, outdated constants, actual ones are in the thread

commented

Will wait until final approval is posted here before implementing.

commented

Marking this for 1-month timeline. If no resolve from folks, ticket gets wontdoed and closed.

commented

Time of posting, outdated constants, actual ones are in the thread

Where is the thread at with new constants? I believe don was asking for those along with approval here in order to implement this.

image
This comment seems to say this no longer should be implemented due to lack of interest

commented

Not so

commented

blowoutpanel1 = (input("blowoutpanel? (True/False)"))
if blowoutpanel1 == "True":
blowoutpanel = bool(True)
else:
blowoutpanel = bool(False)
shelltraitexplosive1 = (input("is the shell explosive? (True/False)"))
if shelltraitexplosive1 == "True":
blastStrength = float(input("magnitude of the HE content explosion?"))
shelltraitexplosive = bool(True)
else:
shelltraitexplosive = bool(False)
shellDiameter = float(input("shell diameter in mm?"))
caseLength = float(input("case length in mm?"))
stackQuantity = float(input("number of stacks?"))
stackSize = float(input("items in each stack?"))
itemSize = float(input("rounds in each ammo item?"))
ammorackDetonationStrength = float(0)

if blowoutpanel == True:
shellDetonationStrength = 0
elif shelltraitexplosive == True:
if blowoutpanel == False:
shellDetonationStrength = float((0.000004 * (shellDiameter * caseLength)) + (0.05*blastStrength))
ammorackDetonationStrength = float((0.5) * (shellDetonationStrength) * (stackQuantity) * (itemSize) * (stackSize) // 1) #where ammosize means the amount of rounds per single ammo item
else:
if blowoutpanel == False:
shellDetonationStrength = float((0.000004 * ( shellDiameter * caseLength)))
ammorackDetonationStrength = float((0.5) * (shellDetonationStrength) * (stackQuantity) * (itemSize) * (stackSize) // 1) #where ammosize means the amount of rounds per single ammo item

if blowoutpanel == False:
if ammorackDetonationStrength!=0:
vehicleDamage = float(100 * ammorackDetonationStrength)
elif openroof == True:
vehicleDamage = vehicleDamage * 0.5
ammorackDetonationStrength = ammorackDetonationStrength * 0.5
else:
vehicleDamage = 0

print (ammorackDetonationStrength)
print (vehicleDamage)

commented

These were the constants I ended up settling on myself, there is a tool that can be used to test them if further desired.

commented

@conman180 this all done now?

commented

Implemented in V22.6.0.