Total War: WARHAMMER II

Total War: WARHAMMER II

Legendary Surtha Ek and Marauder Chieftain skill tree update
19 Comments
funni monki 12 Sep, 2021 @ 3:16pm 
Hey there,

I've used your code rearrangement, and it indeed is working! For me, in fact, it seems to be picking the correct model... minus the chariot, which as you pointed out is inherent.

I was fruitlessly working on a subtype clone for Surtha Ek, but it ended up being a mess and I could not get it to work, so I'm going to stop working on that because I don't quite understand why it has to be that complicated... and as for the scripting portion, I'm not certain that is something I can do, given my inexperience. The current guides that exist also aren't very helpful, I found.

I would say - if you wish to continue to work on this, you totally can. I'm not very fond of modding this game because it requires way too much effort to accomplish very minute things, and so I'll be stopping here. Thanks for your patience and effort through all of this - if I can help out further or test something, let me know.
medusa0  [author] 12 Sep, 2021 @ 2:55pm 
@ 🐔︻气デ 一 一一一一一一一一一一一😲一一

Here is a link to the screenshot of the codeblock to get the script working with the identical agent type and name as described:
https://i.imgur.com/oNJW7BT.png

I hope you find it useful.
medusa0  [author] 12 Sep, 2021 @ 2:47pm 
Re-ordering the code blocks worked! Basically all you have to do is change the order carried out in the script, you can have the removal of the original lord come before the newly defined lord spawns in. However, the new lord does not have an innate skill assigned by default, so you will still need to add it in, and as he is a generic lord, his portrait and model is random (in my case he is using the helmet-less 01 model which resembles Felman Ingersson.). Giving his chariot mount and associated skill back at rank 1 will require more scripting.
medusa0  [author] 12 Sep, 2021 @ 2:33pm 
I went back to test the script with the default agent type, and you are right! This script will not work if the character spawned and the one to be replaced has the exact same name and agent type, for me it deleted the original character and spawned an invisible replacement that cannot be interacted with.

It has worked for me before as I was testing it with Wulfrik who has another agent type, which makes sense as the script has to spawn the replacement first and then delete the original, and if the original and the new character has the same type and name, both will be deleted, leaving a broken, randomly spawned character in the ether as the new leader.

A way around would be to create a cloned agent subtype only for the faction leaders, but that is a whole other can of worms. Perhaps there is a better way to write the script to delete the original and then spawn in the new character.
funni monki 12 Sep, 2021 @ 1:45pm 
So I decided to create a brand new agent subtype ("nor_marauder_chieftain_varg") and replaced the subtype in the script with that - it seemed to work fine, except I did not finish the model assigning and all of that crap, so Surtha Ek showed up as Drycha (or whatever)...

I'm trying to follow these guides but if I'm honest they're terribly written and presume waaaay too much. I remember now why I quit working on mods for this game.

In theory, if all the loose ends get squared away there, this will resolve all the problems - just need to make an individual subtype along with their respective details thereafter, and that should be that.

Thanks for all your help with this!
funni monki 12 Sep, 2021 @ 12:21pm 
Thanks Medusa,

That is my other theory - I'm triple-checking the syntax against the original version the script author created on the website you linked, but I'm finding hardly any difference...

Thank you! Don't feel obligated to make anything if you don't have time or motivation! I appreciate it either way, however :-)
medusa0  [author] 12 Sep, 2021 @ 12:15pm 
It could be something trivial like a missing line or, more infuriatingly a missing semicolon somewhere that is breaking your version. I might be able to cook up a submod for your mod to address it.
funni monki 12 Sep, 2021 @ 12:06pm 
Thanks for the suggestion! I was looking into doing that but wasn't sure what the originals were - I went ahead and did that and tried again, same thing unfortunately.

I have a feeling it's not the script's fault since it's working perfectly fine in your mod... like you said, it sounds like something CA does differently versus what is available to modders. What else is new :\
medusa0  [author] 12 Sep, 2021 @ 11:50am 
Did you change his starting unit as well? I had him start with a modded Gorebeast Chariot in his army, if that is not present in your mod, it may break the script yield unintended effects.

Try this line:
unit_list = "wh_dlc08_nor_mon_war_mammoth_1,wh_main_nor_cav_chaos_chariot,wh_main_nor_cav_chaos_chariot,wh_main_nor_cav_marauder_horsemen_0,wh_main_nor_inf_chaos_marauders_0,wh_main_nor_inf_chaos_marauders_0,wh_main_nor_inf_chaos_marauders_1,wh_main_nor_inf_chaos_marauders_1"; This should revert his starting army to 2 Marauder Chariots, 2 Chaos Marauders, 2 Chaos Marauders (Great Weapons), 1 Marauder Horsemen, and 1 War Mammoth as it was originally.
medusa0  [author] 12 Sep, 2021 @ 11:42am 
Not sure how CA did the original version of the lord to possess his chariot ancillary, you will likely have to script to add the ancillary "wh_dlc10_anc_mount_nor_surtha_ek_marauder_chariot", to his clone character as he does not start with the chariot mount skill, and then get the clone to equip it on campaign start via the included wh_mod_campaign_mount_upgrades.lua file.

It will probably look something like this:
["nor_marauder_chieftain"] = {
skill = "wh_dlc08_skill_node_nor_marauder_chieftan_unique_02",
ancillary = "wh_dlc10_anc_mount_nor_surtha_ek_marauder_chariot"
}

I got the feeling it may give every single Marauder Chieftain lord a chariot on campaign start instead.
funni monki 12 Sep, 2021 @ 11:42am 
I have a bad feeling that this will likely require each of them to be made into their own LL's, much like what you did here with your mod... I've never really done that before so I don't know if I can take up this work now, but that is something I will be trying to do next.
funni monki 12 Sep, 2021 @ 11:38am 
Hey there,

Yeah, I've done that ahead of time... unfortunately, it still spawns him with a different name. I looked closer and realized (after toggling Fog of War off) that the respawn never actually happens. The leader changes, but the units he is meant to respawn with are gone, and he has to be re-recruited by the AI upon next turn.

For example:

https://gtm.steamproxy.vip/ugc/1698409547910825947/57F02ED68D4332B2ED81906D7F226895EB599FEA/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false

https://gtm.steamproxy.vip/ugc/1698409547910828574/A9D96713A42E02DB057F6784F4C69112BB0FC7CB/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false

Voicelines are still working as intended, at least...
medusa0  [author] 12 Sep, 2021 @ 11:32am 
Hi 🐔︻气デ 一 一一一一一一一一一一一😲一一, you will need to change the following lines to get Surtha Ek to spawn as the original agent type:

Find the line called "subtype" between "region_key" and "forename" and add "-- " to the front of:
subtype = "mod_nor_surtha_ek", -- From agent_subtypes_tables
And remove the "-- " from the line:
-- subtype = "nor_marauder_chieftain", -- From agent_subtypes_tables
This will revert the spawned character back to the original type from the base game.

The "-- " is a "comment" for the lua format, basically something that we use in coding to keep the game (the compiler) from reading a line of code so it is useful for marking a line to let us know what it does or in this case, dummy out a line.
funni monki 12 Sep, 2021 @ 10:23am 
Ah, turns out I overlooked something... I see that Surtha Ek's name isn't retained when I launch it on its own without making him an LL (?). It changed to another name - but otherwise is working as intended.

There's probably a way to get around that, though... need to test a bit more.
funni monki 12 Sep, 2021 @ 10:19am 
Thanks Medusa,

Cool! Best of luck with that! No problem at all, I'm glad someone was able to take the time to find a better solution to the one I've provided. This is definitely much, MUCH better than what I've posted.

I have taken a look at your script and tested it on a stand-alone basis (I integrated it into my current copy of my mod, removed the startpos.esf files and added your script) and have found it to be working flawlessly.

I'm currently trying to research what units each chief spawns with (I'm having the hardest time finding this in the WH2 database - do you happen to know what file defines this?), and I'll be rewriting the script for each of them and see if having individual scripts in one mod is sensible (probably not - I have a feeling it'll turn script heavy and might cause stability problems), or otherwise seeing if they can all be merged into one script (which also sounds dubious to do).
medusa0  [author] 12 Sep, 2021 @ 10:15am 
@ 🐔︻气デ 一 一一一一一一一一一一一😲一一, you are most welcome! Thank you for restoring the original voice lines in the first place!

The only other original lord that I remembered is Felman Ingersson for the Skaeling, who starts at war with the World Walker so things may get crowded in central Norsca. I will have to do a bit more research on checking multiple factions and spawning multiple leaders for the script.

The three horse cavalry units that Ingresson could specialise in are pretty similar to each others, and could probably use a bit of flavour to be interesting.
funni monki 12 Sep, 2021 @ 8:07am 
Woohoo! Tested it out this morning - working like a charm. This is great! Thanks for uploading this.

Do you have any plans on working on the other remaining Norscan chiefs?

Either way, thank you for doing this, again!
Green Ramirez 12 Sep, 2021 @ 7:04am 
BEYOND YOUR COMPREHENSION!

ARE YOU A GOD!?!

For real, I have been waiting for this mod.
unless specifically stated 12 Sep, 2021 @ 4:35am 
ASININE MORTAL!!!