Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 2:32 am
All times are UTC + 0
Units that begin with experience levels
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [7 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Tetra Xiphos
Soldier


Joined: 05 Mar 2008

PostPosted: Sun Nov 01, 2009 4:56 am    Post subject:  Units that begin with experience levels Reply with quote  Mark this post and the followings unread

How might I edit a unit to begin with a level of veterancy? I've been looking through the code but cannot find the correct module tag. The ones I've used returned no error when compiling but were ineffective.

This question is actually two-fold since the reason for the veterancy is the autoheal ability of the 'Heroic' rank. Is there a way to give this as an innate ability to a unit so it autoheals BEFORE the veterancy is achieved? I am aware that veterancy will increase the amount healed, I just want to know the tag that enables this.

Thanks yas

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sun Nov 01, 2009 12:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

For your first question: the units that start as veteran (from support powers) are separate from the normal units.

As for your second question: I know it's possible to give units selfheal, but I dunno how I did it. I remember each unit already has the selfheal logic, but it's restricted to Heroic Rank only.

Back to top
View user's profile Send private message Send e-mail Skype Account
Stygs
Cyborg Cannon


Joined: 27 Nov 2005
Location: Germany

PostPosted: Sun Nov 01, 2009 1:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

1) You can use the same way as EA used for their support powers:

<GrantUpgradeCreate
id="ModuleTag_GrantUpgradeCreate"
UpgradeToGrant="Upgrade_CallSupportUpgrade"
/>
<LevelUpUpgrade
id="ModuleTag_LevelUpUpgrade"
LevelCap="4"
DoFlash="false"
LevelsToGain="1">
<TriggeredBy>Upgrade_CallSupportUpgrade</TriggeredBy>
</LevelUpUpgrade>

LevelsToGain defines how many level they gain by this upgrade.
LevelCap is the maximum level they can reach with this. If you set it to 1 and the unit was allready promoted once, the upgrade will have no effect.

2)

<AutoHealBehavior
id="AutoHealBehavior_1"
InitiallyActive="true"
HealOnlyIfNotInCombat="true"
HealOnlyIfNotUnderAttack="true"
StartHealingDelay="8s"
HealingAmount="10"
HealingDelay=".5s" />

theres a couple more settings for this Behaviour, sou can find them in \MOD SDK\Schemas\xsd\Modules\AutoHealBehavior.xsd

_________________

Back to top
View user's profile Send private message Skype Account
Tetra Xiphos
Soldier


Joined: 05 Mar 2008

PostPosted: Sun Nov 01, 2009 4:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

The tag I used was AutoHealBehavior. I didn't specify that it shoud StartInitially though. Thanks guys....

Back to top
View user's profile Send private message
Tetra Xiphos
Soldier


Joined: 05 Mar 2008

PostPosted: Sun Nov 01, 2009 7:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Adding the tag ''AutoHealBehavior'' had no effect. The unit doesn't build with the ability.

Where did you find the id= 'AutoHealBehavior_1'? Don't those modules have to begin with Module_XXXXX? Something like, ''ModuleTag_AutoHealBehavior'', right?

Back to top
View user's profile Send private message
Stygs
Cyborg Cannon


Joined: 27 Nov 2005
Location: Germany

PostPosted: Sun Nov 01, 2009 8:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

The Id does not matter, its only used to make them unique so they can overwriten or removed (usefull for modmaps).
You can use any Id you want, just make sure that you dont use it twice in the same unit.

Note that my example had a StartHealingDelay of 8s, meaning it takes 8 seconds after the unit was damaged before it starts healing.
If you are sure that the compiler works and still no changes ingame, simply post your unit codes here or attach the mod.

_________________

Back to top
View user's profile Send private message Skype Account
Tetra Xiphos
Soldier


Joined: 05 Mar 2008

PostPosted: Mon Nov 02, 2009 5:02 am    Post subject: Figured it... Reply with quote  Mark this post and the followings unread

Hey Stygs,

Yea, I tried ammending the tag with the prefix 'ModuleTag_' and it worked. The reference CAN be found in the schema file 'AutoHealBehavior'. As it is a module, correct structure is ModuleTag_AuotHealBehavior for the id.

Working code looks like this:

AutoHealBehavior
id="ModuleTag_AutoHealBehavior"
InitiallyActive="true"
HealOnlyIfNotInCombat="true"
HealOnlyIfNotUnderAttack="true"
StartHealingDelay="0s"
HealingAmount="30"
HealingDelay=".5s"

edit: forgot the brackets to open and close the data but you get the point...

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1708s ][ Queries: 11 (0.0078s) ][ Debug on ]