Need help with Injury counting, dynamic abilities, and spawning Champions.

By on July 10, 2014 4:28:56 AM from Elemental Forums Elemental Forums

Replicators

Join Date 05/2006
+7

I would like to spawn two champions at the start of the game instead of spearmen.

 

Code: xml
  1.   
  2. <GameModifier InternalName="GameModifier 2617">
  3.    <ModType>Map</ModType>
  4.    <Attribute>SummonUnit</Attribute>
  5.    <UnitClass>Champion_Name</UnitClass>
  6.   </GameModifier>

 

I tried this code, and while it does spawn the units at the start of the game like spearmen, it however does not count as a champion, despite the fact that the unit data IS a champion.

 

I tried using vanilla champions and resulted the same. No inventory, no skill tree.

 

Secondly, I have a global resource called "Sanity", it essentially work like Mana.

 

What I want to do with it is this:

 

If (Specific_Champion has no wounds)

{

   Then increase Sanity by 1 per turn

}

 

Else

{

   Decrease sanity by 1 OR by the number of wounds per turn.

}

 

The only two ways I could think of this working is, every turn, add a passive ability that decreases Sanity by 1 per turn with a requirement of a specific Wound, then the same for every Wound individually.

 

Problem is, how do I remove the passive Abilities in every turn? Is there a way to have a passive ability that grants a stat ONLY when a requirement is met?

 

The other method is to have a passive ability that decreases Sanity by "Getting" the number of wounds as a variable on that champion. Again, I have not found any code that can do this.

 

Is there another way? Or is there a way to do the above?

 

Thanks in advance

Locked Post 10 Replies +1
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
July 10, 2014 8:54:02 AM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
July 10, 2014 9:05:49 AM from Elemental Forums Elemental Forums

Quoting Primal_Savage,
Add this to champions (Or create an ability that does this and add the ability to champions):

 

Thanks a bunch!

 

My only concern now is this:

 

I want to have the sanity system only apply to One Champion in particular. All other champions when recruited, should they get injuries, should have no impact on the sanity resource.

 

I was thinking of having a duplicate set of injuries that require the unit type to match that of the champion, but as far as I know, there isn't a way to have an Override feature like in Java. So it mean that one champion could still get the vanilla injuries too.

 

Is there a way to do this? Maybe an antirequisite tag?

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
July 10, 2014 9:41:31 AM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
July 10, 2014 9:46:40 AM from Elemental Forums Elemental Forums

Quoting Primal_Savage,
RestrictedAbilityBonusOption

 

I love you! Thank you very much!!!

Reason for Karma (Optional)
Successfully updated karma reason!
July 10, 2014 10:28:55 AM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
October 5, 2014 10:52:08 AM from Elemental Forums Elemental Forums

Hello all! I need in your help.

I have this code:

/*some code*/

<GameModifier>
<ModType>CityTrainingBonus</ModType>
<Attribute>TrainingBonus_ApplyAbilityBonus</Attribute>
<StrVal>MyAbility</StrVal>
<Provides>Test</Provides>
</GameModifier>

/*some code*/

 

It work fine, when I have a building in city. But I want remove this ability when I have other building. How it may make?

Looks like at:

<GameModifier>
<ModType>CityTrainingBonus</ModType>
<Attribute>TrainingBonus_RemoveAbilityBonus</Attribute>
<StrVal>MyAbility</StrVal>
<Provides>Test</Provides>
</GameModifier>

Reason for Karma (Optional)
Successfully updated karma reason!
October 5, 2014 11:05:52 AM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
October 5, 2014 12:24:34 PM from Elemental Forums Elemental Forums
I thought about this. But i want remove it, if it possible...
Reason for Karma (Optional)
Successfully updated karma reason!
October 5, 2014 2:04:25 PM from Elemental Forums Elemental Forums

N/A

Reason for Karma (Optional)
Successfully updated karma reason!
October 5, 2014 3:04:44 PM from Elemental Forums Elemental Forums

I'll test it. Thank you!

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108433  walnut3   Server Load Time: 00:00:00.0000375   Page Render Time: