PDA

View Full Version : Help with linking ancillaries needed



Dave1984
12-07-2006, 17:17
I'm not sure if you can create epithets from Ancillaries, and I'm having some trouble linking a unique ancillary to the relevent trait without the game crashing on me.

Here is my test ancillary entry and trigger

;------------------------------------------
Ancillary earl_of_warwick
Type Title
Transferable 0
Image item_documents.tga
ExcludeCultures mesoamerican
Description earl_of_warwick_desc
EffectsDescription earl_of_warwick_effects_desc
Effect EarlofWarwick 1
;------------------------------------------

;------------------------------------------
Trigger earl_of_warwick_vnv_trigger
WhenToTest CharacterTurnEnd
Condition CharFactionType england
and not IsFactionHeir
and I_SettlementOwner Warwick = england
and not FactionwideAncillaryExists
and not FatherTrait KingofEngland >= 1

AcquireAncillary earl_of_warwick chance 100

;------------------------------------------

The Earl of Warwick trait is entered like this and does work as a stand alone trait with separate triggers

;------------------------------------------
Trait EarlofWarwick
Characters family

Level Earl_of_Warwick
Description Earl_of_Warwick_desc
EffectsDescription Earl_of_Warwick_effects_desc
GainMessage Earl_of_Warwick_gain_desc
Epithet Earl_of_Warwick_epithet_desc
Threshold 1

Effect Command 1
;------------------------------------------


and the trigger is


;------------------------------------------
Trigger EarlofWarwick
WhenToTest CharacterTurnEnd

Condition CharFactionType england
and IsGeneral
and I_SettlementOwner Warwick = england
and not FatherTrait FactionLeader >= 1
and not IsFactionHeir

Affects EarlofWarwick 1 Chance 100

;------------------------------------------

Now the game does not run with all these as they are- the logfile shows this error

15:08:23.953 [system.rpt] [always] CPU: SSE2
15:08:23.953 [system.rpt] [always] ==== system log start, build date: Oct 5 2006 version bld-medieval2-final-52 (29455) ===
15:08:23.953 [system.io] [always] mounted pack packs/data_0.pack
15:08:23.953 [system.io] [always] mounted pack packs/data_1.pack
15:08:23.968 [system.io] [always] mounted pack packs/data_2.pack
15:08:23.968 [system.io] [always] mounted pack packs/data_3.pack
15:08:23.968 [system.io] [always] mounted pack packs/data_4.pack
15:08:23.968 [system.io] [always] mounted pack packs/localized.pack
15:08:28.265 [script.err] [error] Script Error in mymod/data/export_descr_ancillaries.txt, at line 15, column 12
Unknown attribute type(EarlofWarwick).

changing the entry in the line with the error from EarlofWarwick to Command allows the game to run but it then seems that the ancillary and trait are issues independently of each other.

How can I get this all to correctly link up?

Any help would be much appreciated.


EDIT: I should add that I added Warwick as a province, so it's not that before anyone says anything!

Re Berengario I
12-07-2006, 18:13
Hmmm at first glance there's a some errors here and there



;------------------------------------------
Ancillary earl_of_warwick
Type Title
Transferable 0
Image item_documents.tga
ExcludeCultures mesoamerican
Description earl_of_warwick_desc
EffectsDescription earl_of_warwick_effects_desc
Effect EarlofWarwick 1
;------------------------------------------

;------------------------------------------
Trigger earl_of_warwick_vnv_trigger
WhenToTest CharacterTurnEnd
Condition CharFactionType england
and not IsFactionHeir
and I_SettlementOwner Warwick = england
and not FactionwideAncillaryExists
and not FatherTrait KingofEngland >= 1

AcquireAncillary earl_of_warwick chance 100

;------------------------------------------


That trigger gives the ancillary to the first english character the game processes at the end of the turn, maybe a priest or a princess or a diplomat or an admiral... was it intented to work this way? I doubt it.




The Earl of Warwick trait is entered like this and does work as a stand alone trait with separate triggers

;------------------------------------------
Trait EarlofWarwick
Characters family

Level Earl_of_Warwick
Description Earl_of_Warwick_desc
EffectsDescription Earl_of_Warwick_effects_desc
GainMessage Earl_of_Warwick_gain_desc
Epithet Earl_of_Warwick_epithet_desc
Threshold 1

Effect Command 1
;------------------------------------------


and the trigger is


;------------------------------------------
Trigger EarlofWarwick
WhenToTest CharacterTurnEnd

Condition CharFactionType england
and IsGeneral
and I_SettlementOwner Warwick = england
and not FatherTrait FactionLeader >= 1
and not IsFactionHeir

Affects EarlofWarwick 1 Chance 100

;------------------------------------------


That trigger will also give the trait to the first english general (maybe not a named char though) the game processes at the end of EVERY turn.
Was it also intented to work this way? Same doubts as above. Plus the trait and the trigger have the same name, I think this is the cause of the error traced in the log.

Please explain how your title system should work.

Dave1984
12-07-2006, 18:30
Hmmm at first glance there's a some errors here and there



That trigger gives the ancillary to the first english character the game processes at the end of the turn, maybe a priest or a princess or a diplomat or an admiral... was it intented to work this way? I doubt it.



That trigger will also give the trait to the first english general (maybe not a named char though) the game processes at the end of EVERY turn.
Was it also intented to work this way? Same doubts as above. Plus the trait and the trigger have the same name, I think this is the cause of the error traced in the log.

Please explain how your title system should work.


Hi, yeah, forgot to include the IsGeneral condition in my previous post which I do have in the files, sorry.

For the trigger in the traits it does give it to the first named general that appears although this trigger is a remnant of before I began to try with ancilliaries and I wanted to know whether it messed with the ancilliary trigger.

Is there a way to put in a condition on the trait trigger of having the relevent ancilliary?


Currently my system works as follows, aiming for a kind of "visible titles" mod-

The King has King of England trait (a temporary fix with no effects so there is an epithet to overwrite the Prince of Wales epithet which does not remove when he becomes king, even though I have scripted it so the trait does and gets passed on to the new heir)

The heir recieves the trait Prince of Wales on becoming heir and this has the epithet Prince of Wales. Only the heir can recieve this trait once wales has been occupied.
All this works up until this point.

I then have the traits Duke of York and Earl of Warwick. Both of these require ownership of the relevent regions and I played with making the Duke of York trait only accesible to a son of the King but not the heir.

The problem with having these last two as traits is that as you can see they get issued to every eligible character instead of just one, and I can't see a condition for something like FactionwideTraitExists, or similar.

This is why I tried using the ancillaries to trigger the trait and therefore the epithet, but I cannot see how to ensure there is only one of the ancillary at once and how indeed to get it to trigger the relevent trait.

Thanks!