Implement mic's ammo crate damage formula thing
Ilya-torshov opened this issue ยท 9 comments
(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)
Marking this for 1-month timeline. If no resolve from folks, ticket gets wontdoed and closed.
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)
These were the constants I ended up settling on myself, there is a tool that can be used to test them if further desired.
@conman180 this all done now?