Load Ship Data
From PlanetsWiki
This is psuedo code detailing the order of events when a ship is loaded into the VCR
' Stormer Glory Device
If Glory Device is armed
If Ship is hull 42 or 43
If Ship is owned by Stormer
Ship set to enter combat at 30000
' Combat Speed
v = 6 - hull mass / 100
v minimum of 0
v increased by hull max speed / 40
If Ship is alien hull
v reduced to 70%
Combat Speed set to v
Set part modifiers
If Ship is alien hull
Modlife doubled (0 = 100)
Modsys doubled (0 = 100)
Modparts doubled (0 = 100)
Modparts doubled (0 = 100)
Powerlimit reduced to 70%
Softspot = 2x + 1
Powerlimit max of 30,000
' IMT bonus for Ram setting
If Ship is owned by IMT
If Ship is set to Ram
Ship Attack increased by 40
' Alien hulls
If Ship is Alien Hull
Ship Attack set to 60%
Ship Evasion set to 60%
' Exotic Tech Boni
If Ship is NOT alien hull
Ship Attack increased by sum of Battle Computer ET
Ship Evasion increased by sum of Jammer ECM ET
Player SOvercharge set to sum of Small Weapon Overcharger ET
Player SMagnum set to sum of Small Weapon Magnum ET
Player LOvercharge set to sum of Large Weapon Overcharger ET
Player LMagnum set to sum of Large Weapon Magnum ET
Ion Deflector Checked
PD Boost Checked
' Shield Limit and Scotty Bonus
Shield limit set to Hull Shield limit
If Ship is not owned by Fed
Shield limit set to Ship Shield limit.
Load Crew, Troop, Colonists and HG
Load Weapons
' Disable 40% PD on Alien hulls
For each PD
If Ship is alien hull
If RND < .4
Weapon is removed for length of combat
' Disable 40% Large Weapons on Alien hulls and all that are too heavy
For each Large Weapon on Ship
If Ship is Alien Hull
If RND < .4
Weapon is removed for length of combat
If Weapon is heavier than Ship maximum
Weapon is removed for length of combat
' Disable 40% Small Weapons on Alien hulls
For each Small Weapon
If Ship is alien hull
If RND < .4
Weapon is removed for length of combat
Load Generator
Load SuperWeapon
' Lack of Crew -> Disable some Weapons
If Ship has < 1/2 Crew
Odds = 0.5 - Crew / (Crewsize + 1)
For each PD on Ship
If RND < Odds
Weapon is removed for length of combat
For each Small Weapon on Ship
If RND < Odds
Weapon is removed for length of combat
For each Large Weapon on Ship
If RND < Odds
Weapon is removed for length of combat
For each Generator on Ship
If RND < Odds
Generator is removed for length of combat
SuperWeapon is removed for length of combat
' Disable Super Weapon on Alien hulls (40% chance)
If Ship is alien hull
If RND < .4
SuperWeapon is removed for length of combat
Load Fuel
Load Ord
Load Repair
Load HyperDrive
Load Engines
Load existing Damage (in 1/10 units, 1000 = 100%)
Load Armor
Load Hull Plans
Load Command Codes
Some Reg Key Error check that seriously damages hull and shield (Old Tim Continuum?!)
' Raise Shields
If System damage < 90% AND Shield damage < 100%
Shield set to Ship max Shield
Shield reduced by Shield % damage
Shield maximum of Shield limit
If Ship is alien hull
Shield reduced to 70%.
If Ship is owned by Evil Empire
If Ship is Evil Empire hull
v = Shield / 2 (will be used to give 1.5x bonus)
If Ship is Gorbie
v = Shield * 2 (will be used to give 3x bonus)
If Ship is NOT alien hull
v is increased by sum of Agnonic Emitter ET
If Ship Fuel < 2
If Ship Tank > 1
Shield set to 0
' Captured Lizard hull
If Ship is Lizard hull
If Ship is NOT owned by Lizards
Modparts increased by 100 (after alien hull doubling)
' Captured Evil Empire hull
If Ship is EE hull
If Ship is NOT owned by EE
Shield and Shield Limit reduced to 25%
//Stormer Ill Wind
If Ship is hull 38
If Ship is owned by Stormer
modParts maximum of 30
AttackMod minimum of 251
' Aczanny Evasive Bonus
If Ship is owned by Aczanny
Evasion increased by (Engine / 5) + ((1 + hull mass) / 200)^2
//Aczanny alien hull penalty
If Ship is NOT Aczanny Hull
Shield and Shield Limit reduced to 1
Armor reduced to 1
modParts = 500
' Chunnel reduces Shields
If Ship Chunneled this turn
Shield reduced to 50%
Load Happy, Skill, Experience
Load Targets and Attack Settings
Load Badstuff (Such as Holodeck Accidents, Bionock Leeches, etc; no effect, as of yet)
' Current Badstuff is Holodeck Accidents, Bionock Leeches, Computer Virus, Destructive Nanites
' Rygillian Fever, Plasma Fire, Alien Monsters and Implants
' These currently have no effect.
' Scavenger Specials
If Player has Scavenger Special bit on.
Turn on Junk collection
Turn on Small Weapon Overcharge (+100% Shield drain)
' Crystal Specials
If Ship owned by Crystal
If Ship is Crystal hull
Crystal shield set to take special Shield Drain.
' Fed High Guard
If Ship is owned by Feds
If Ship High Guard > 0
Fed High Guard Powers activated
' Cloaking Bonus
If Ship can Cloak
If Ship has Stealth < 60
' This looks like it is checking the hull stat, and not the current Sensor Image
Cloaker Bonus energy boost activated.
' Stormer and UEA modifications
If Ship is owned by Stormer
If Ship is Stormer Hull
Stormer Boost Active (+300 Armor Arc, +3 LW Blast)
If Ship is owned by UEA
UEA weapon modifications
' Coalition Target Enhancers
If Ship is Hull 520, 521, 523, 524, 525 (Coalition Target Enhancer)
If Ship is NOT alien hull
If Ship Fuel > 40
Target Enhancer active
Fuel reduced by 30
' Privateer Ship
If Ship is Privateer Hull (not including Freighters)
If Ship is in Combat at the start
' I don't think this applies to Second Wave ships
Ship flagged to deal bonus Privateer damage
' Coalition Bio Computer
IF Ship owned by Coalition
If Ship is Lotus Class Pursuit Ship
If Ship Med Units >= 4
If Ship High Guard > 0
Ship Attack increased by 100
Ship Evasion increased by 50
If Ship is in Combat at the start
' I don't think these apply to Second Wave ships
' Hive Mind
If Ship is X. 240 Comb Class Escort (518)
Hivemind count increased by 1
If Ship is X. 1260 Royal Class Heavy Cruiser (519)
Hivemind count increased by 1
' Hivemind is a single total for all players
Hivemind maximum of 10
' SuperWeapon Jammer
If Ship is Aurora Class Flagship (525)
SuperJam bit set
' Solar Gamma Ray
If Ship has Solar Gamma Ray
Solar Gamma Ray source set to this Ship
' Could be misreading this. What happens when more than one Player has this device?
' Diamond Flame If Ship is Diamond Flame (58) Armor set to 550 Armor Limit set to 850
