Page 2 of 2 FirstFirst 12
Results 21 to 26 of 26

Thread: Creating unique custom Lords

  1. #21

    Default Re: Creating unique custom Lords

    Quote Originally Posted by Razjiel View Post
    Gentlemen, can anyone confirm that he indeed succeeded in bringing his own lord into game?
    What table editions are necessary?
    For :
    a) Leader selection lord during start (what tables, what editions in startpos, maybe u used lua?)
    b) Making lord recruitable during campaign?
    I would also like to know. I’ve been making a minor faction mod and need to make a custom faction leader using the dreadlord assets.

  2. #22

    Default Re: Creating unique custom Lords

    very new to modding myself (first post on this site as it were), but i'm making a roster for caledor atm, i HAVE succeeded in getting a nearly entirely custom lord into the game, some bugs still being resistant to weedkiller, but Im muddling along, unit is in game, has working skill tree with personal additions, including custom skills.


    so far it is still in basic high elf faction, but i'm still mudding the lords bugs out, i'll worry about startpos editing at a later date

    also another thing of note is that about ALL of this was done with only PFM(which is probably why my minor bugs exist)
    the list of tables needing to be modified so far have been LONG but here it is

    agent_subtype_tables
    agent_uniforms_tables
    ancillaries_included_agent_subtypes_tables
    ancillaries_required_skills_tables
    ancillaries_tables
    ancillary_to_effects_tables
    ancillary_to_included_agents_tables
    battle_entities_tables
    campaign_character_art_sets_tables
    campaign_character_arts_tables
    campaign_map_attrition_unit_immunities_tables
    campaign_mount_animation_set_overrides_tables
    cdir_military_generator_unit_qualities_tables
    character_skill_level_details_tables
    character_skill_level_to_ancillaries_junctions_tables
    character_skill_level_to_effects_junctions_tables
    character_skill_node_links_tables
    character_skill_node_sets_tables
    character_skill_nodes_tables
    character_skills_tables
    character_skills_to_quest_ancillaries_tables
    culture_to_battle_animation_tables_tables
    effect_bonus_value_unit_ability_junctions_tables
    effects_tables
    faction_agent_permitted_subtypes_tables
    land_units_tables
    land_units_to_unit_abilites_junctions_tables
    main_units_tables
    melee_weapons_tablesmissile_weapons_tables
    names_tables
    projectiles_tables
    special_ability_phase_attribute_effects_tables
    special_ability_phase_stat_effects_tables
    special_ability_phases_tables
    special_ability_to_special_ability_phase_junctions_tables
    ui_unit_bullet_point_unit_overrides_tables
    unique_agent_component_junctions_tables
    unit_abilities_tables
    unit_abilities_to_additional_ui_effects_juncs_tables
    unit_description_short_texts_tables
    unit_set_to_unit_junctions_tables
    unit_special_abilities_tables
    unit_variants_tables
    units_custom_battle_mounts_tables
    units_custom_battle_permissions_tables
    units_to_groupings_military_permissions_tables
    variants_tables

    the following are the text files to go with the above database files

    abilities__loc
    agent_subtypes__loc
    ancillaries__loc
    character_skills__loc
    custom_battle_mounts__loc
    effects__loc
    land_units__loc
    names__loc
    unit_abilities__loc
    unit_description_historical_texts__loc
    unit_description_short_texts__loc



    uknown if there are any more tables i would need to modify to get this show on the road, just a point in the direction of the files i would need to modify would be enough for me to muddle through it on my own.

  3. #23

    Default Re: Creating unique custom Lords

    After countless hours of reverse engineering, I finally managed to get my custom lord working. From what I have learned I'd say your tables look fine, but you might need a lua script containing something like this:

    Code:
    events = get_events();
    
    events.FirstTickAfterWorldCreated[#events.FirstTickAfterWorldCreated+1] = 
    function(context) 
        spawn_HERO();
        return true;
    end;
    
    
    function spawn_HERO()
        if cm:is_new_game() then
            if not cm:get_saved_value("HERO_unlocked") then 
                cm:spawn_character_to_pool("FACTION", "names_name_NAMEID", "", "", "", 18, true, "AGENTTYPE", "AGENT", true, "");    
                cm:set_saved_value("HERO_unlocked", true);
            end;    
        end;
    end;
    This will make your custom hero appear in recruitment panel of the specified faction right from the start.
    Now here's what you have to do:

    1. name your script something like "export_helpers_YOURMODNAME.lua"
    2. replace all uppdercase words with your IDs and values but dont delete any of these: ""
    3. deactivate "auto_generate" in agent_subtypes_tables

    HERO: name of your hero (not required, but you should do it anyways)
    FACTION: go to factions_table and pick the one you want your hero to be available for
    NAMEID: the ID you entered in names_tables (numerical)
    AGENTTYPE: type of your agent (general, spy, wizard etc.)
    AGENT: ID of your agent subtype from agent_subtypes_tables

    This is the first time I have used scripting in a TW2 mod and for some reason it did NOT work for every faction I have tried, even when adding that faction to faction_agent_permitted_subtypes_tables.
    I hope this helps you and anyone else who is having problems with getting his custom hero to appear in recruitment panel.

  4. #24

    Default Re: Creating unique custom Lords

    I'm also trying to create a Lord (Making the a Depth Guard Lord choice for the Vampire Coast), and I've got it to appear in game, though it instantly freezes the game when selected. A few questions:

    Is it necessary to put in all the Ancillaries tables if we're not doing a mount?
    Can I get away with just using another Lords' models for the world map? If not, is there an easy way to make a model of the Depth Guard on the world map?

    Any help would be greatly appreciated, thanks.

  5. #25

    Default Re: Creating unique custom Lords

    I'm trying to add a new legendary lord to Vampire Counts. I made this script but nothig happens:
    function norsca_dhampir_script()
    out("-------- SCRIPT DHAMPIR START ---------");
    end;

    function NorVamp_Custom_Listeners()
    out("-------- LISTENER DHAMPIR START ---------");
    core:add_listener(
    "add_Lord_to_Character_Pool",
    "BuildingCompleted",
    function(context)
    local faction = context:garrison_residence():faction();
    out("local faction:"..tostring(faction)));
    return faction:name() == "wh_main_vmp_vampire_counts";
    end,
    function(context)
    local building_name = context:building():name();
    local faction_name = context:garrison_residence():faction():name();
    out("local building faction:"..tostring(building_name;
    out("local faction:"..tostring(faction_name)));

    if (building_name == "wh_main_vmp_forest_1") and not (cm:get_saved_value("lord_spawn_only_one")) then
    cm:spawn_character_to_pool("wh_main_vmp_vampire_counts", "names_name_999888777", "", "", "", 18, true, "general", "wh_main_vmp_blood_ritual_great_sorcerer", true, "");
    cm:set_saved_value("lord_spawn_only_one", true);
    end;
    end,
    true
    );
    end;
    How can I debug it?

  6. #26

    Default Re: Creating unique custom Lords

    Try the mod "Script Debug Activator"

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •