Certainly less work I would say. Needs a few triggers to cover coming of age, adopting and man of the hour.
I have made ancillaries for faction leaders and faction heirs in a mod I am currently working on. Everything works appropriately, however when the the faction leader dies off the heir inherits the faction leader ancillary but retains the heir ancillary. This is not a problem for the player since the heir ancillary can be given the the new heir manually. For the rest of the ai factions though the heir always retains both heir and faction leader ancillaries.
Is there a method for using the faction_leader trait when it is given to the heir after the initial faction leader dies, on whatever turn to initiate the console_command remove_ancillary <name of faction heir ancillary> either in the export_descr_character_traits file or scripting something in the campaign_script? Any thoughts or ideas would be helpful, it is not a gamebreaker as far as I am concerned but I would like to get these ancillaries to the appropriate characters if at all possible and to work as they should. Thank you.
Last edited by MIKE GOLF; February 25, 2014 at 07:48 PM.
Ah, you want it for AI as well. I don't think it is possible.For the rest of the ai factions
Using "this" avoids the need for knowing his name, so will work on any character. But "this" only works on the selected character and non-player characters cannot be selected (even with script).
Therefore, this...
...will work but for the player faction only.Code:monitor_event BecomesFactionLeader TrueCondition e_select_character console_command remove_ancillary this {heir_ancillary_name} end_monitor
e_select_character selects the character that the monitor is firing on, in this case the new faction leader. It, like select_character, does not select AI characters unfortunately, even during their own turns. Which means that "this" COULD instead be referring to whichever of the player's characters is currently selected, i.e. it would remove the ancillary from the wrong guy, if the selected player character happened to have the same anc.
I tested that last part. I gave the anc to the heir of England and to my France general, then used that general to conquer the England settlement that contained their leader. That triggered the BecomesFactionLeader monitor and I expected it to remove the anc from my general - because he was selected when I initiated the attack. However, it did not. Both characters still had the anc. I know the monitor fired because the log said "err: character not found" for my remove_ancillary line. This suggests that my character was not still selected at the time of the monitor firing, but in other scenarios he still might be - field battles? multi-army sieges? - so there could still be an element of risk in this approach.
EDIT: For AI you can of course remove the ancs from characters by their name. The problem is that you don't know his name. One solution would be to call remove_ancillary on every possible name in the faction during, say PreFactionTurnStart and then, during CharacterTurnStart, re-give the heir anc to the heir.
Aside from the lack of the ability to remove ancillaries via triggers, the limit of 8 is also a headache. Chances are that the heir anc will not even be received by some heirs because they are already loaded up with 8 ancillaries. Traits are a better way to go: they CAN be removed via triggers and there is no (known?) limit on how many a character may have.
Last edited by Withwnar; February 25, 2014 at 10:50 PM.
Thank you for the quick response. There is always much to ponder when you speak. But even if it only worked for the player, I could live with that. Now that I have an idea of where to start I can start experimenting a bit.
You're welcome Mike. I enjoy these kinds of problems.
If the purpose of this anc is for giving certain effects then you could create a trait that has those effects instead. i.e. An "heir" trait that is given only to heirs and removed from anybody who is not (i.e. leader: the only (?) person who could possibly have an heir trait who is not an heir). You could still have the anc as well if you still wanted it (with no effects, visual only) but make sure that only player faction characters can receive it.
This way even AI heirs can still get the effects while avoiding the problem of not being able to remove the anc from them. It also means that if a player heir can't get the anc due to no anc slots remaining then at least they do not miss out on the effects, and they still have a visible "Heir" trait (if you choose to make it non-hidden).
You could still hand out the ancs for all factions in descr_strat and then, when campaign starts (at which time you know which one is the player - or players if hotseat), use script to remove it from the AI characters. No problem there: you know their names at this time.
e.g.
Code:monitor_event FactionTurnStart TrueCondition if I_IsFactionAIControlled england console_command remove_ancillary {england heir's name} {anc name} end_if if I_IsFactionAIControlled france console_command remove_ancillary {france heir's name} {anc name} end_if ...and so on for all factions... terminate_monitor end_monitor
What is the maximum value you can assign through an ancillary or trait? (ie + 8 Authority, or what not)
I've been having an issue trying to manually get my own version of NHA for a vanilla game. Under ancillaries I put this
;-------------------------------------------
Ancillary heir_crown
Type Item
Transferable 1
Image knight_chivalrous.tga
ExcludeCultures mesoamerican
Description heir_crown_desc
EffectsDescription heir_crown_effects_desc
Effect Authority 10
Effect Loyalty 2
Effect Law 2
Hitpoints 2
Under triggers
Trigger heir_crown
WhenToTest BecomesFactionLeader
Condition IsGeneral
and not FactionwideAncillaryExists
AquireAncillary heir_crown chance 100
In the string bin I used a geomod bin editor and added the
heir_crown
heir_crown_desc
heir_crown_effects_desc
and their approprate descriptions
So I go start a campaign game to test it. I use give_ancillary "this" heir_crown on my faction prince and it says error- could not find this ancillary in the data base.
Im sorry to trouble you guys, but by any chance do you know how to fix this issue?
Have you got a mod folder set up? For modified files to take effect you require the file_first entry in a CFG file and a BAT file to start the mod. I recommend to install my basic mod folder and then do the changes in there.
"Effect Hitpoints 2"
Did you check the log for errors?
By the way, where can I find this log for errors? I think i'd be quite helpful for me
{M2TW install folder}\logs
I looked in the folder but nothing was there. Ill probably take the time this weekend to get my mod folder working, hopefully it'll work then. Thanks for the help so far!
Much apprecitated, traits and ancillaries have been giving me a headache
Hi mates
I've been searching for some time around and I couldn't find the answer about ancillaries types. What is it about ? It is the second line of all the ancillaries. Is there a list of them (the Item, Armour, Court, King ... etc) and what is the effect ?
Thanks
It defines the group they belong to. Type names are arbitrary and you can invent your own.
The groups themselves are pointless AFAIK but there are other things that can refer to them. e.g. The HasAncType condition which means "has any ancillary of this type" which can be useful if, for example, you don't wish him to receive a particular "court" type anc if he already has any of the "court" type ancs. There is also a mission type that uses anc type.
Ok thanks a lot for that ! It is not the answer I was expecting, but at least I know what to do with them now !
I have found the type entry particularly useful when it comes to giving ancillaries related to regions, like 'Baron of Nottingham' - one would obviously want to avoid a single character mopping up eight of those regional titles, so using the 'not HasANCType' condition comes very handy.
Well I'm into creating governor titles for the Faerun mod I'm working in. Thanks for the type tip ! I had not seen the interest of it, but now I see it !
Can you simply create any type or does it have to be listed somewhere ? I intend to use 3 types as we need Royal Insigna for the faction leader, then Government title for the factions important characters and finally the Governor title, for each settlement. So can I list them in : king, government, court ? king and court already exist, but government does not ... Will it work ?
Will this work :
Ancillary spokesman_of_bryn_shanders
Type court
Transferable 1
Image placeholder.tga
ExcludedAncillaries spokesman_of_bryn_shanders, {.... all the regions of the map}
Description spokesman_of_bryn_shanders_desc
EffectsDescription spokesman_of_bryn_shanders_effects_desc
Effect Loyalty 1
;------------------------------------------
Trigger spokesman_of_bryn_shanders
WhenToTest CharacterTurnEnd
Condition EndedInSettlement
and SettlementName Settlement_001
and not I_WorldwideAncillaryExists spokesman_of_bryn_shanders
and IsGeneral
and not HasANCType court
AcquireAncillary spokesman_of_bryn_shanders
I hope it is fine ... And my only problem is : what if a region is given by a faction to another ... The previous governor will keep his title until he dies ... Is there any way to remove it ?