Total War: WARHAMMER

Total War: WARHAMMER

Legendary Lord Morgan Bernhardt
shaky_rivers  [developer] 9 Sep, 2017 @ 4:21pm
LL Spawn - Modder Help Needed
-I want it so the LL spawns with his army and I know how to spawn an army but one with a general I'm finding tricky, I found this from the Chaos Invasion Script

cm:create_force_with_general(
ci_chaos_faction_string,
unit_str,
ci_chaos_home_region,
x,
y,
"general",
char_details["agent_subtype"],
char_details["forename"],
"",
char_details["family_name"],
"",
char_details["id"],
char_details["faction_leader"],
if char_details["agent_subtype"] == "chs_lord_of_change" then cm:force_add_trait(char_str, "wh_main_trait_name_dummy_the_ever-watcher", true) end;
cm:apply_effect_bundle_to_characters_force("wh_main_bundle_military_upkeep_free_force", cqi, -1, true);
cm:set_character_immortality(char_str, true);
cm:set_character_unique(char_str, true);
local char = get_character_by_cqi(cqi);
local mf_cqi = char:military_force():command_queue_index();
cm:add_building_to_force(mf_cqi, ci_chaos_horde_buildings);
end
);

- These are the details I beleive I need to add;

["id"] = "emp_elspeth_von_draken",
["agent_subtype"] = "emp_elspeth_von_draken",
["forename"] = "names_name_1237345124",
["family_name"] = "names_name_1237343895",
["faction_leader"] = false
["force"] = "grudgebringer_units"

But I'm unsure how to insert the data, should it be;

char_details["agent_subtype"] = "emp_elspeth_von_draken",
or
char_details["emp_elspeth_von_draken"],

I've tried both and neither work and I'm wondering if I have to add; "cm:spawn_unique_agent(faction_cqi, "emp_elspeth_von_draken", true" somewhere but when I do it crashes in game.




< >
Showing 1-1 of 1 comments
Apex 15 Sep, 2017 @ 5:58am 
I do not think that the chaos script is the right way to go. Open the database exporter and look at the start_pos_characters tables. This may sort you out.
< >
Showing 1-1 of 1 comments
Per page: 1530 50