Self-Repairing Armor


#1

For my first modded module, I tried to branch out a little bit and make self-repairing armor. Complete failure; either it doesn’t heal or it doesn’t armor. Is this actually possible? Here’s my code:

[code]
[config]
unlockcost = 0
lockable = 0
classname = “SIM_RepairModule”
category = “DEFENSES”
size = “CRUISER”
name = “nanocapsule_armor”
guiname = “Nanocapsule Armor”
description = “Built-in nanotube capsules contain tiny bots that when broken, meld themselves to heal the breach. Reflect on their sacrifices and win, soldier.”
weight = 140
hitpoints = 0
maxdamageabsorbable = 110
cost = 245
icon = module_armour_v5.dds
crew_required = 6
peace_interval = 100
repair_rate = 0.15
powerconsumed = 1.5
slot_type = STANDARD
repair_type = ARMOR
stack_effectiveness = 0.95
maxrepairsupplies = 250
uisortpos = 5550

[dataitems]
0 = cost,DECIMAL
1 = weight,DECIMAL
2 = hitpoints,DECIMAL
3 = powerconsumed,DECIMAL
4 = crew_required,INTEGER
5 = repair_rate,DECIMAL
6 = maxrepairsupplies,INTEGER
7 = maxdamageabsorbable,DECIMAL[/code]


#2

this would require to mix a sim.armourmodule and a sim.repairmodule, which is not possible.

sorry. i cant think of any way to do what youre trying to do. :frowning:


#3

Sorry its impossible to combine different modules, as you cant make a weapon with a engine, you cant make a armor with autorepair.


#4

It’s possible to make a repair module that only repairs armor. You would use one of these for each armor module on your ship. If you want an unshielded ship with armor that behaves like a shield (regenerates and goes down once destroyed) you would just use an armor repair module and give it a repair rate that makes it similar to shield recharge rates. Btw, I’m really glad you posted this. You just gave me an idea on how to handle armor for my Homeworld Cataclysm mod. I’ve been having trouble blancing armor vs repair rates for multiple repair and armor modules. You just solved this for me. I’m going to use one armor module and one armor repair module with a fast repair rate on each ship.

here’s the official GSB armor repair module:

[config]
unlockcost = 4000
lockable = 1
classname = "SIM_RepairModule"
category = "OTHER"
size = "CRUISER"
name = "cruiser_repair_armor2"
guiname = "Advanced Armor Repair"
description = "Only slightly faster and lighter than the standard dedicated-armor repair system, but sometimes in battle that extra weld is what saves your galactic bacon."
weight = 82
hitpoints = 110
cost = 162
icon = module_repair_armor_2.dds
crew_required = 20
peace_interval = 65
repair_rate = 0.08
powerconsumed = 8.4
slot_type = STANDARD
repair_type = ARMOR
stack_effectiveness = 0.9
maxrepairsupplies = 410
uisortpos = 4140

[dataitems]
0 = cost,DECIMAL
1 = weight,DECIMAL
2 = hitpoints,DECIMAL
3 = powerconsumed,DECIMAL
4 = crew_required,INTEGER
5 = repair_rate,DECIMAL
6 = maxrepairsupplies,INTEGER

For example, if you wanted your armor module to regenerate at the same rate as a cruiser_shield_fastrecharge, you would change the armor module’s repair_rate to 0.08, maxrepairsupplies to 10000 (virtually unlimited), and peace_interval to 0. You would also need to mess with the armor’s maxdamageabsorbable value and maybe use multiple armor slots to get the ship’s average armor value to match the shield resistance value of the fast recharge shield, which is 24. This way your armor will reflect some of the damage like the shield module would. You can see this value in the ship design menu by clicking on the bar graph icon to the upper-right of the ship image.

Make sure that you put one armor repair module on you ship for each armor slot it is using, or not all of the armor slots will repair at the same time. Also, If you do go with multiple armor slots, set your armor repair module’s stack_effectiveness to 1.0, or you will also lower the repair rate.


#5

Glad to have inspired you. As it was, I was using the armor repairer as a template, but thanks for the suggestion. Interesting on turning armor into shields though.


#6

hmmm…
I sense something I could do for the Tribe in m own tinkerings…

“Polarize the hull plating!”