Pages

Custom Ship OGame

 [TUT] How to create a custom ship

Hello, this tutorial wasn't made by me but after finding this I thought I would translate it and edit it so I could share it with you! This is a tutorial on how to create your own ships.

Accepted Versions
2Moons 1.5
xNova Revolution - Requires the "norio" space
2Moons 1.4
2Moons 1.3.5

Try to found in $resource = array(
202 => "small_ship_cargo",203 => "big_ship_cargo",204 => "light_hunter",205 => "heavy_hunter",206 => "crusher",207 => "battle_ship",208 => "colonizer",209 => "recycler",210 => "spy_sonde",211 => "bomber_ship",212 => "solar_satelit",213 => "destructor",214 => "dearth_star",215 => "battleship",216 => "lune_noir",217 => "ev_transporter",218 => "star_crasher",219 => "giga_recykler",220 => "dm_ship",  
And Add
221 => "ship",  
Try to Found in $requeriments = array(
202 => array( 21 => 2115 => 2),203 => array( 21 => 4115 => 6),204 => array( 21 => 1115 => 1),205 => array( 21 => 3111 => 2117 => 2),206 => array( 21 => 5117 => 4121 => 2),207 => array( 21 => 7118 => 4),208 => array( 21 => 4117 => 3),209 => array( 21 => 4115 => 6110 => 2),210 => array( 21 => 3115 => 3106 => 2),211 => array( 117 => 621 => 8122 => 5),212 => array( 21 => 1),213 => array( 21 => 9118 => 6114 => 5),214 => array( 21 => 12118 => 7114 => 6199 => 1),215 => array( 114 => 5120 => 12118 => 521 => 8),216 => array( 106 => 1221 => 15109 => 14110 => 14111 => 15114 => 10120 => 20199 => 3),217 => array( 111 => 1021 => 14114 => 10110 => 14117 => 15),218 => array( 21 => 18109 => 20110 => 20111 => 20114 => 15118 => 20120 => 25199 => 8),219 => array( 21 => 15109 => 15110 => 15111 => 15118 => 8),220 => array( 21 => 9114 => 5118 => 6),  
And Add
221 => array( 21 => 20),  

There is the Requirements of Ships... Legend:

The common requires is :
21 => "hangar",106 => "spy_tech",108 => "computer_tech",109 => "military_tech",110 => "defence_tech",111 => "shield_tech",113 => "energy_tech",114 => "hyperspace_tech",115 => "combustion_tech",117 => "impulse_motor_tech",118 => "hyperspace_motor_tech",120 => "laser_tech",121 => "ionic_tech",122 => "buster_tech",123 => "intergalactic_tech",124 => "expedition_tech",131 => "metal_proc_tech",132 => "crystal_proc_tech",133 => "deuterium_proc_tech",199 => "graviton_tech",  

Try to found in $pricelist = array(
202 => array('metal' => 2000'crystal' => 2000'deuterium' => 0'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 10'consumption2' => 20 'speed' => 5000'speed2' => 10000'capacity' => 5000'tech' => 4),203 => array('metal' => 6000'crystal' => 6000'deuterium' => 0'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 50'consumption2' => 50 'speed' => 7500'speed2' => 7500'capacity' => 25000'tech' => 1),204 => array('metal' => 3000'crystal' => 1000'deuterium' => 0'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 20'consumption2' => 20 'speed' => 12500'speed2' => 12500'capacity' => 50'tech' => 1),205 => array('metal' => 6000'crystal' => 4000'deuterium' => 0'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 75'consumption2' => 75 'speed' => 10000'speed2' => 15000'capacity' => 100'tech' => 2),206 => array('metal' => 20000'crystal' => 7000'deuterium' => 2000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 300'consumption2' => 300 'speed' => 15000'speed2' => 15000'capacity' => 800'tech' => 2),207 => array('metal' => 45000'crystal' => 15000'deuterium' => 0'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 250'consumption2' => 250 'speed' => 10000'speed2' => 10000'capacity' => 1500'tech' => 3),208 => array('metal' => 10000'crystal' => 20000'deuterium' => 10000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 1000'consumption2' => 1000'speed' => 2500'speed2' => 2500'capacity' => 7500'tech' => 2),209 => array('metal' => 10000'crystal' => 6000'deuterium' => 2000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 300'consumption2' => 300 'speed' => 2000'speed2' => 2000'capacity' => 20000'tech' => 1),210 => array('metal' => 0'crystal' => 1000'deuterium' => 0'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 1'consumption2' => 'speed' => 100000000'speed2' => 100000000'capacity' => 5'tech' => 1),211 => array('metal' => 50000'crystal' => 25000'deuterium' => 15000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 1000'consumption2' => 1000'speed' => 4000'speed2' => 5000'capacity' => 500'tech' => 5),212 => array('metal' => 0'crystal' => 2000'deuterium' => 500'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 0'consumption2' => 'speed' => 0'speed2' => 0'capacity' => 0'tech' => 0),213 => array('metal' => 60000'crystal' => 50000'deuterium' => 15000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 1000'consumption2' => 1000'speed' => 5000'speed2' => 5000'capacity' => 2000'tech' => 3),214 => array('metal' => 5000000'crystal' => 4000000'deuterium' => 1000000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 1'consumption2' => 'speed' => 200'speed2' => 200'capacity' => 1000000'tech' => 3),215 => array('metal' => 30000'crystal' => 40000'deuterium' => 15000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 250'consumption2' => 250 'speed' => 10000'speed2' => 10000'capacity' => 750'tech' => 3),216 => array('metal' => 8000000'crystal' => 2000000'deuterium' => 1500000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 250'consumption2' => 250 'speed' => 900'speed2' => 900'capacity' => 15000000'tech' => 3),217 => array('metal' => 35000'crystal' => 20000'deuterium' => 1500'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 90'consumption2' => 90'speed' => 6000'speed2' => 6000'capacity' => 400000000'tech' => 3),218 => array('metal' => 275000000'crystal' => 130000000'deuterium' => 60000000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 10000'consumption2' => 10000'speed' => 10'speed2' => 10'capacity' => 50000000'tech' => 3),219 => array('metal' => 1000000'crystal' => 600000'deuterium' => 200000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 300'consumption2' => 300'speed' => 7500'speed2' => 7500'capacity' => 200000000'tech' => 3),220 => array('metal' => 6000000'crystal' => 7000000'deuterium' => 3000000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 100000'consumption2' => 100000'speed' => 100'speed2' => 100'capacity' => 6000000'tech' => 3),  

And Add:
221 => array('metal' => 1000000'crystal' => 1000000'deuterium' => 1000000'energy_max' => 0'darkmatter' => 0'factor' => 1'consumption' => 100000'consumption2' => 100000'speed' => 100'speed2' => 100'capacity' => 6000000'tech' => 3),  

There is the price of Ships ... Legend:
You can change this!Factor nº of multiplication of prices... When is 2 or + , every building of this ship is 2x like buildings (or +)Consumption Dark Matter Spends
Speed 
Fleet Speed
Speed2 
Minimum Fleet Speed
Capacity 
The Resources can transport  

Try to found in $CombatCaps = array(
202 => array('shield' => 10'attack' => 5'sd' => array (210 => 5212 => 5)),203 => array('shield' => 25'attack' => 5'sd' => array (210 => 5212 => 5)),204 => array('shield' => 10'attack' => 50'sd' => array (210 => 5212 => 5)),205 => array('shield' => 25'attack' => 150'sd' => array (202 => 3210 => 5212 => 5)),206 => array('shield' => 50'attack' => 400'sd' => array (204 => 6401 => 10210 => 5212 => 5)),207 => array('shield' => 200'attack' => 1000'sd' => array (210 => 5212 => 5)),208 => array('shield' => 100'attack' => 50'sd' => array (210 => 5212 => 5)),209 => array('shield' => 10'attack' => 1'sd' => array (210 => 5212 => 5)),210 => array('shield' => .001'attack' => .001'sd' => array ()),211 => array('shield' => 500'attack' => 1000'sd' => array (210 => 5212 => 5401 => 20402 => 20403 => 10405 => 10)),212 => array('shield' => .001'attack' => .001'sd' => array ()),213 => array('shield' => 500'attack' => 2000'sd' => array (210 => 5212 => 5215 => 2402 => 10)),214 => array('shield' => 50000'attack' => 200000'sd' => array (210 => 1250212 => 1250202 => 250203 => 250208 => 250209 => 250204 => 200205 => 100206 => 33207 => 30211 => 25215 => 15213 => 5401 => 200402 => 200403 => 100404 => 50405 => 100)),215 => array('shield' => 400'attack' => 700'sd' => array (202 => 3203 => 3205 => 4206 => 4207 => 10210 => 5212 => 5)),216 => array('shield' => 70000'attack' => 150000'sd' => array (210 => 1250212 => 1250202 => 250203 => 250204 => 200205 => 100206 => 33207 => 30208 => 250209 => 250211 => 25213 => 5214 => 1215 => 15401 => 400402 => 200403 => 100404 => 50405 => 100)),217 => array('shield' => 120'attack' => 50'sd' => array (210 => 5212 => 5)),218 => array('shield' => 2000000'attack' => 35000000'sd' => array (210 => 1250212 => 1250202 => 250203 => 250204 => 200205 => 100206 => 33207 => 30208 => 250209 => 250211 => 25213 => 5215 => 15401 => 400402 => 200403 => 100404 => 50405 => 100)),219 => array('shield' => 1000'attack' => 1'sd' => array (210 => 5212 => 5)),220 => array('shield' => 50000'attack' => 5'sd' => array (210 => 5212 => 5)),  

And add :
221 => array('shield' => 1000000'attack' => 1000000'sd' => array ()),  

There is Combat Skills of ships ... Legend :
You can change this!Shield Shield Power
Attack 
Attack Power
sd 
=> array ())) = The Rapid Fire of the ships  

For the last try to found this :
$reslist['fleet'] = array(202203204205206207208209210211212213214215216217218219220);  

 And replace to:
$reslist['fleet'] = array(202203204205206207208209210211212213214215216217218219220221);  

Don't forget to add a query into the database.
ALTER TABLE `(your game database prefix)_planetsADD `shipbigint(20unsigned NOT NULL DEFAULT '0';  

Thank you for reading, if you have any issues with this tutorial or anything else either post a reply or pm me with the issue.

WARNING - This requires some knowledge of PHP and how to work yourself around the 2Moons files, if you mess this up then you could prevent the system from working correctly, so always make a backup.

Dynaxo
Ragezone