Healing a Starbase

Goal:  I am working on a mod around starbase hitpoints being augmented through modules.

Current Implementation:  To add health to a starbase I am using "HitPointsCap" and then adding say +50.

Problem:  When I add hitpioints in this manner it raises the cap, but not the current value.  So my starbase now has 200 / 250 health and has to slowly use strategic repair and heal up to 250.  This kinda sucks.  Anyone know of a good way to set or augment the current value?

 

- Manii Names

5,978 views 6 replies
Reply #1 Top

There does appear to be a trigger for  <OnEvent>OnConstructModule</OnEvent>, I lifted that from the Mercenary which adds the big influence module to a starbase.  However I can't seem to get this trigger to fire.  Any thoughts?



Reply #2 Top

<Stats>
<EffectType>StrategicRepair</EffectType>
<Target>
<TargetType>Shipyard</TargetType>
</Target>
<BonusType>Instant</BonusType>
<Value>50</Value>
</Stats>

 

try adding this to your module that adds hit points. should repair the lost value up to the target

Reply #3 Top

I thought about strategic repair but had not considered the "instant" tag.  That should make it instantly heal, but only the one time.  Yes?

Reply #4 Top

Experimented a bunch more, the "Instant" tag doesn't work in this instance.  What I will probably end up doing is modding the Starbase modules with something like:

<Stats>
<EffectType>StrategicRepair</EffectType>
<Target>
<TargetType>Starbase</TargetType>
</Target>
<BonusType>Flat</BonusType>
<Value>25</Value>
</Stats>
 
This won't instantly heal them, but it will do so over a few turns.  Stylistically it reflects that you made this super-spiffy addition, but it'll take a few turns before the Death Star can achieve full operation.
Reply #5 Top

try this:

 

<Triggers>
<OnEvent>OnConstructModule</OnEvent>
<Target>
<TargetType>Starbase</TargetType>
</Target>
<Lifetime>Instant</Lifetime>
<Modifier>
<EffectType>HitPoints</EffectType>
<BonusType>Flat</BonusType>
<Value>50</Value>
</Modifier>
</Triggers>

Reply #6 Top

The above code looks like it adds a flat value on each module build but does not seem to stop at the hit point cap - couldn't the same be done by adding a regeneration or self repair module to the build list for starbases. Remembering that fleet repair/rebuild options could also apply to starbases if a suitably equipted base ship was within area effect of the starbase.

Regards Colin