Total War: MEDIEVAL II - Definitive Edition

Total War: MEDIEVAL II - Definitive Edition

Upsilon Sep 21, 2024 @ 7:50pm
Trouble adding a custom trait to Saruman Nazgul DAC EUR
I've obtained the ring as Saruman and have gotten 2 of (what I assume are) my first Nazgul. I decided to create a custom trait (increases bodyguard unit size) however when I attempt to use the give_trait console command, nothing seems to happen. I can add the custom trait to other generals and it works fine. I also tested adding regular traits to the Nazgul and got the same result (nothing happened). It doesn't give me the "Could not find this trait" either, it's simply like the command activated successfully, yet no new trait appeared. I've tried both "give_trait this" and using the character's name (Nazgule and so on). I was even able to remove existing traits from the Nazgul with remove_trait, but could not add those same traits back. The same seems to be true for ancillaries.

So I can only conclude that DAC EUR has something in place that somehow blocks adding new traits to the Nazgul, but I cannot determine what that is, or if it is possible to bypass it.
Last edited by Upsilon; Sep 21, 2024 @ 7:58pm
< >
Showing 1-10 of 10 comments
Gigantus Sep 21, 2024 @ 8:44pm 
There is nothing special blocking you from giving the trait.
You simply don't know the correct internal name the nazgul has. If memory serves the nazgul can get 'resurrected' which is only possible by spawning another with a slightly different internal name (but the same name displayed in game). I believe they rotate them by appending letters to the base internal name, eg nazgula, nazgulb
You could find out the details by searching the campaign_script file in the imperial_campaign folder and then try those names.
Upsilon Sep 21, 2024 @ 9:12pm 
So I already did this and confirmed that I had the correct ID by using remove_trait Nazgule (one of the 2 Nazguls I got) to remove several traits successfully. Could not add those same exact traits back however. Even doing just "remove_trait this" to remove all traits also worked but I still couldn't add any traits afterwards.

Unless I'm mistaken, the remove_trait could have only worked if I had the correct ID, right? Not to mention "remove_trait this" also works. Unless give_trait differs from remove_trait somehow in this regard?
Last edited by Upsilon; Sep 21, 2024 @ 9:19pm
Gigantus Sep 21, 2024 @ 11:47pm 
give_trait requires to specify the level name whereas remove works by just using the trait name.

Example:
Trait GoodCommander
Level Promising_Commander
Level Aspiring_Commander

Should be easy to trace in EDCT as you do seem to have the trait name, again note the coded level name vs displayed level name

Append: it's actually easier to trace coded names by simply searching for the displayed name in data\text\names.txt - the curly brackets next to it is the coded name.
Get's difficult if the character has an epithet like 'the strong' which replaces the surname
Last edited by Gigantus; Sep 21, 2024 @ 11:52pm
Upsilon Sep 22, 2024 @ 12:32pm 
My apologies, I am unsure as to what EDCT refers to.

But as far as having the correct name, I'll reiterate that I already had found the correct name and successfully used it to remove traits from the Nazgul. Even so, I double checked in data\text\names.txt as suggested and I believe it indeed confirmed that I have the correct name. So as a specific example:

One of the 2 Nazgul I have is Lagoren of the Neck. I had already identified that the name I need to use, i.e. the coded name (if I understand you correctly), which is "Nazgule". As I mentioned above, data\text\names.txt confirms this with "{Nazgule}Lagoren". Tyring to give Lagoren a trait using "give_trait Nazgule TraitName" does not give the "err: character not found" or any other error, so it seems like the command was successful. However checking Lagoren's traits shows that there are no new traits. I can further confirm that I have the correct name by removing a trait. For example, one of the traits he came with is "Cold Commander". I used "remove_trait Nazgule BattleFear 2" and successfully removed the Cold Commander trait. However when I try "give_trait Nazgule BattleFear 2" after removing it, the trait does not reappear. Indeed, whatever trait, including the custom trait, that I try to add, I get the same result.

I also know that it isn't some sort of bug that makes it so the trait is there but just not being shown because I can test whether the trait is present by retraining the general's unit and seeing if the bodyguard's numbers increase. I know that this should work because I've tested it on every single other general, including Saruman, and it has worked. The trait appeared and the bodyguard size increased upon retraining.

In other words, these 2 Nazgul characters are the ONLY characters that I'm having this problem with. I tested that I can easily add traits to everyone else. Not a single other character in my faction has behaved like this, which is why I've concluded there is something about them that is preventing me from adding a trait.

I see you mentioned something about how it get's more difficult if a character has an epithet, which Lagoren does (of the Neck), but once again I don't see how I could have the incorrect name if I successfully used it to remove traits from him.

I'll admit I may still be missing something here, and I apologize If I've not picked it up from your responses. I do appreciate the help.
Upsilon Sep 22, 2024 @ 9:01pm 
I've also tried making a custom trigger to no avail:

;----------------------------------------------------------
Trigger Saruman_Nazgul_Custom_trait
WhenToTest CharacterTurnEnd

Condition FactionType france
and IsGeneral
and Trait NazgulRace = 1

Affects CustomTrait 1 Chance 100
;----------------------------------------------------------

Once again when I tried testing if it works with all generals by removing the "and Trait NazgulRace = 1", so like:

;----------------------------------------------------------
Trigger Saruman_Nazgul_Custom_trait
WhenToTest CharacterTurnEnd

Condition FactionType france
and IsGeneral

Affects CustomTrait 1 Chance 100
;----------------------------------------------------------

I see that every general receives the trait after I let a turn pass, except for both of the Nazgul.
Gigantus Sep 22, 2024 @ 9:10pm 
EDCT - export_descr_character_traits
I am talking about the name of the trait level when giving a trait, not the character's name - that we sorted already.

Example using the GoodCommander details from earlier :
give_trait [character's code name] [trait level name]
give_trait Nazgule Promising_Commander

PS - as far as I know the nazguls are english, not french. At least in the original Third Age mod.
spawn_army faction england character Nazgula, etc
Last edited by Gigantus; Sep 22, 2024 @ 9:16pm
Upsilon Sep 22, 2024 @ 9:54pm 
I see, ty. In my experience if you don't specify a trait level when there is only one, it still works. Case in point, this is how I added my custom trait to all the other generals in my faction. Regardless, to double check I did try:

give_trait Nazgule Custom_Trait 1

And got the same effect (that is the trait did not appear for Lagoren).

The faction is France because I'm playing as Isengard. I believe England is Mordor. As I understand, there is a script that allows you to gain the Nazgul as Isengard, which is what is occurring for me. I believe I must have the right faction because it added the trait to all my other generals. So if these Nazgul are in my faction as generals, then they should have also received the trait, right?

Edit: Ah, I think I missed part of what you're saying. I believe if I wanted a higher level of a trait I would have to use the trait name, and then the number corresponding to it's level. So if I wanted Aspiring Commander for example, I would have to do:
    give_trait [character's code name] GoodCommander 2

Trying this (or any of the specific names for each trait level like Promising_Commander and so on):
    give_trait [character's code name] Aspiring_Commander
gives the "err: Could not find this trait in the database"
Last edited by Upsilon; Sep 22, 2024 @ 10:07pm
Gigantus Sep 22, 2024 @ 10:12pm 
That would explain why they are available for france.
His epithet did not distort the 'code' name as he apparently only has a first name - epithets replace the surname.
'give trait' does not require the level value (1) but I guess you might be right that single level traits will work also when using the trait name instead of the trait level name.

That makes all of this strange as you managed to remove a trait from the Nazgul earlier - which rules out name issues.
The tested trait shows on your generals so that rules out accidentally using the 'hidden' trait line.
I am afraid I have no idea what could cause this - there is no secret handshake that could prevent named characters from obtaining traits, be it via triggers or console.
Upsilon Sep 22, 2024 @ 10:20pm 
I see, well thanks for the input. It at least tells me this isn't a common occurrence. Perhaps it is some weird bug specific to the mod? I guess it doesn't ruin the playthrough or anything but it is a little frustrating seeing it work with every character but the ones I created the trait for :(.
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Sep 21, 2024 @ 7:50pm
Posts: 10