Hmm... the error says it doesn't recognize that ancillary. Not completely sure, but I'm guessing you didn't go and add the name of the ancillary to export_descr_ancillary_enums.txt
I believe the game uses that file as a link between text references and sequential entries in the file w/ the triggers, basically as a lookup table to reference the actual ancillary file. So, be sure to add the new entry in the exact position you've added the text in the ancillary file (i.e. between the same entries, or at the bottom if its there).
Some other things to look at:
- Probably a bad idea to use the same name for two triggers. I don't know for sure that it causes a problem, but it could.
- Have you added the actual text descriptions for the new ancillary and trait you've put into the files? If not, you'll need to do so in export_ancillaries.txt and Export_VnVs.txt respectively. Both are in data/text. Again it's one of those that I'm not certain causes crashes, but you'll want to have the in-game descriptions (you know, the ones that appear when you hover the mouse over something) in either case.
- You can't really use "IsFactionLeader" like you have. What you have basically asks the trained unit if it is the factionleader of your faciton... which it never will be. This works like this because all the conditions use the info sent to them from the event used for that trigger. The bad news is, to do what you want done actually looks impossible from what I'm seeing. There's just no event that involves the faction leader of a unit that's been completed, and so no way to give the leader traits when a unit completes. About the closest you can come is to use:
Code:
---------------------------------------------------
Identifier: GovernorUnitTrained
Event: A unit has been trained
Exports: nc_character_record, character_record, faction, region_id, character_type, settlement, resource_description, unit
Class: ET_GOVERNOR_UNIT_TRAINED
Author: Lee
---------------------------------------------------
This would allow you to setup triggers to give the ancillary to a governor if his settlement builds pirate ships. To achieve the desired effect you may have to raise the chance he gets it, as a given settlement will certainly make less pirate ships than the whole faction would have... though come to think of it your only requirement is that someone in the faction has the ancillary, which the same odds should continue to do the same amount of the time (just not on the faction leader alone now). The new triggers might look like this:
Code:
;------------------------------------------
Trigger letters_of_marque_vnv_trigger1
WhenToTest GovernorUnitTrained
Condition UnitType Pirate Ship
and not I_WorldwideAncillaryExists letters_of_marque
AcquireAncillary letters_of_marque chance 5
;------------------------------------------
Trigger letters_of_marque_vnv_trigger2
WhenToTest GovernorUnitTrained
Condition UnitType Privateer
and not I_WorldwideAncillaryExists letters_of_marque
AcquireAncillary letters_of_marque chance 10
So the triggers were largely correct, it's just that a few things don't work quite like you'd think. You do seem to have a pretty good handle on things though.
Hope that helps.
Bookmarks