Log in

View Full Version : How to add new ancillaries ?



Spendios
06-22-2006, 19:10
Hi, everybody I'm currently trying to add new ancillaries, more exactly factions specific ancillaries.

Let's say for axample I want a specific bodyguard for greek and another for roman with different portraits, effects, etc...

So, in my export_descr_ancillaries, I put this :


;------------------------------------------
;Ancillary: bodyguard_greek
; o bodyguard : <PersonalSecurity> 2, <BodyguardValour> 2

Ancillary bodyguard_greek
Image 109.tga
Description bodyguard_greek_desc
EffectsDescription bodyguard_greek_effects_desc
Effect PersonalSecurity 2
Effect BodyguardValour 2

;------------------------------------------
Ancillary bodyguard_roman
; o bodyguard : <PersonalSecurity> 2, <BodyguardValour> 2

Ancillary bodyguard_roman
Image 401.tga
Description bodyguard_roman_desc
EffectsDescription bodyguard_roman_effects_desc
Effect PersonalSecurity 2
Effect BodyguardValour 2


and this :


;------------------------------------------
Trigger trigger_bodyguard_greek
WhenToTest CharacterTurnStart
Condition Trait AcquireBodyguard_Greek > 0
and FactionType greek_cities

AcquireAncillary bodyguard_greek chance 100

;------------------------------------------
Trigger trigger_bodyguard_roman
WhenToTest CharacterTurnStart
Condition Trait AcquireBodyguard_Roman > 0
and FactionType romans_julii

AcquireAncillary bodyguard_roman chance 100


Then in my export_descr_ancillary_enums I add this :

bodyguard_greek
bodyguard_greek_desc
bodyguard_roman
bodyguard_roman_desc

Then in my export_ancillaries I add this :


¬---------------

{bodyguard_greek} Bodyguard

{bodyguard_greek_desc}
Personal security never has too high a price.

{bodyguard_greek_effects_desc}
+2 to personal security (improves the chances of detecting and foiling assassination attempts), +2 to the valour of your general's bodyguards

¬---------------

{bodyguard_roman} Bodyguard

{bodyguard_roman_desc}
Personal security never has too high a price.

{bodyguard_roman_effects_desc}
+2 to personal security (improves the chances of detecting and foiling assassination attempts), +2 to the valour of your general's bodyguards

¬---------------
And finally in my export_descr_character_traits :

;------------------------------------------
Trait AcquireBodyguard_Greek
Characters family
Hidden
AntiTraits Bodyguard_GreekAcquired

Level Acquire_Bodyguard_Greek
Description Acquire_Bodyguard_Greek_desc
EffectsDescription Acquire_Bodyguard_Greek_effects_desc
Threshold 1

;------------------------------------------
Trait Bodyguard_GreekAcquired
Characters family
Hidden
NoGoingBackLevel 1
AntiTraits AcquireBodyguard_Greek

Level Bodyguard_Greek_Acquired
Description Bodyguard_Greek_Acquired_desc
EffectsDescription Bodyguard_Greek_Acquired_effects_desc
Threshold 1


;------------------------------------------
Trait AcquireBodyguard_Roman
Characters family
Hidden
AntiTraits Bodyguard_RomanAcquired

Level Acquire_Bodyguard_Roman
Description Acquire_Bodyguard_Roman_desc
EffectsDescription Acquire_Bodyguard_Roman_effects_desc
Threshold 1

;------------------------------------------
Trait Bodyguard_RomanAcquired
Characters family
Hidden
NoGoingBackLevel 1
AntiTraits AcquireBodyguard_Roman

Level Bodyguard_Roman_Acquired
Description Bodyguard_Roman_Acquired_desc
EffectsDescription Bodyguard_Roman_Acquired_effects_desc
Threshold 1



Problem is that campaign doesn't lauch with this...what is the correct thing to do to have this kind of thing working ? :help:

Thanks a lot

Stuie
06-23-2006, 14:19
What version of RTW are you using? If you're using 1.3+, then export_descr_ancillary_enums is not necessary, but if you're using 1.2 then you need this in that file:


bodyguard_greek
bodyguard_greek_desc
bodyguard_greek_effects_desc
bodyguard_roman
bodyguard_roman_desc
bodyguard_roman_effects_desc

You have a problem here:


;------------------------------------------
Ancillary bodyguard_roman
; o bodyguard : <PersonalSecurity> 2, <BodyguardValour> 2

Ancillary bodyguard_roman
Image 401.tga
Description bodyguard_roman_desc
EffectsDescription bodyguard_roman_effects_desc
Effect PersonalSecurity 2
Effect BodyguardValour 2

You need a semi-colon before the first instance of "Ancillary bodyguard_roman".

Also, you are referencing new traits in your triggers (AcquireBodyguard_Greek and AcquireBodyguard_Roman). Did you add those to your trait files?

Finally... are you using a RTW shortcut with -show_err on the target line? That should catch any other problems.

Spendios
06-23-2006, 15:07
Thanks a lot Stuie, the problem was this stupid semi-colon missing...:wall:


EDIT : How can I restrict the acquisition, for example it is possible to restrict an ancillary to a culture or a faction, but if for example I want an ancillary for romans_julii and romans_brutii but not available to romans_scipii, how can I make that ?

Dol Guldur
06-23-2006, 21:59
Have a look at how FactionType is used in the files.

Stuie
06-24-2006, 04:17
Thanks a lot Stuie, the problem was this stupid semi-colon missing...:wall:

EDIT : How can I restrict the acquisition, for example it is possible to restrict an ancillary to a culture or a faction, but if for example I want an ancillary for romans_julii and romans_brutii but not available to romans_scipii, how can I make that ?

Restrict by faction:


and FactionType romans_brutii

Restrict by culture:


and CultureType roman

To do the reverse, just add the word "not" after the "and".