Welcome

Please register for Total War Access to use the forums. If you're an existing user, your forum details will be merged with Total War Access if you register with the same email or username. For more information please read our FAQ’s here.

Categories

Change Army Position

gridviewgridview Registered Users Posts: 1
Hi. I'm going to create a historic video based on the Three Kingdom gameplay. For that purpose, I need to place some armies(different factions) to one region, near the town. I guess it is possible to move it through EditSF, but I can't find arrays or variables that keep coordinates on the campaign map.
Any help? Thank you.

Comments

  • HavieHavie Registered Users Posts: 1,474
    edited July 18
    Well,

    You can get yourself started with lua editing.

    Although its not going to be an easy jump off point.

    You can use this listener to tell you x/y locs of armies

    function DebuggMovementLocs()
    core:remove_listener("DebuggMovementLocs") -- prevent duplicates
    core:add_listener(
    "DebuggMovementLocs",
    "CharacterFinishedMovingEvent",
    function(context)
    local qgeneral = context:query_character();
    if qgeneral:faction():is_human() then
    ModLog(qgeneral:generation_template_key().." .... In region:"..tostring(qgeneral:region():name()).." at L POS:"..tostring(qgeneral:logical_position_x().." , "..tostring(qgeneral:logical_position_y())))
    elseif qgeneral:faction():name() == "3k_main_faction_liu_bei" then
    ModLog(qgeneral:generation_template_key().." .... In region:"..tostring(qgeneral:region():name()).." at L POS:"..tostring(qgeneral:logical_position_x().." , "..tostring(qgeneral:logical_position_y())))
    end

    return false
    end,
    function(context)

    end,
    true
    )
    end



    Then use the teleport function for AI armies (cant tp player armies)

    local query_character = cm:query_model():character_for_template("3k_main_template_historical_commander_name_hero_color")
    cm:modify_model():get_modify_character(query_character):teleport_to(x,y)



    Here's how to get started with lua :

Sign In or Register to comment.