Removing factions

Users who are viewing this thread

Status
Not open for further replies.
Ok, so i have removed 3 of the factions for a mod. So, i removed the factions and the troops related to them. And obviously, I'm getting a lot troop related errors that i need to sort out.
Ive fixed some of them, but i can't figure out where it tries to read these:

Code:
Error: Unable to find object:trp_knight_5_1_wife
ERROR: Illegal Identifier:trp_knight_5_1_wife
Error: Unable to find object:trp_knight_4_9
ERROR: Illegal Identifier:trp_knight_4_9
Error: Unable to find object:trp_nord_archer
ERROR: Illegal Identifier:trp_nord_archer
Error: Unable to find object:trp_nord_archer
ERROR: Illegal Identifier:trp_nord_archer
Error: Unable to find object:trp_nord_champion
ERROR: Illegal Identifier:trp_nord_champion
Error: Unable to find object:trp_nord_veteran
ERROR: Illegal Identifier:trp_nord_veteran
Error: Unable to find object:trp_nord_warrior
ERROR: Illegal Identifier:trp_nord_warrior
Error: Unable to find object:trp_nord_trained_footman
ERROR: Illegal Identifier:trp_nord_trained_footman
Error: Unable to find object:fac_kingdom_3
ERROR: Illegal Identifier:fac_kingdom_3
Error: Unable to find object:fac_kingdom_4
ERROR: Illegal Identifier:fac_kingdom_4
And
Code:
Error with upgrade def: Unable to find troop1-id: khergit_tribesman
Error with upgrade def: Unable to find troop1-id: khergit_skirmisher
Error with upgrade2 def: Unable to find troop1-id: khergit_horseman
Error with upgrade def: Unable to find troop1-id: khergit_horse_archer
Error with upgrade2 def: Unable to find troop1-id: nord_recruit
Error with upgrade def: Unable to find troop1-id: nord_footman
Error with upgrade def: Unable to find troop1-id: nord_trained_footman
Error with upgrade def: Unable to find troop1-id: nord_warrior
Error with upgrade def: Unable to find troop1-id: nord_veteran
Error with upgrade def: Unable to find troop1-id: nord_huntsman
Error with upgrade def: Unable to find troop1-id: nord_archer
Error with upgrade2 def: Unable to find troop1-id: rhodok_tribesman
Error with upgrade def: Unable to find troop1-id: rhodok_spearman
Error with upgrade def: Unable to find troop1-id: rhodok_trained_spearman
Error with upgrade def: Unable to find troop1-id: rhodok_veteran_spearman
Error with upgrade def: Unable to find troop1-id: rhodok_crossbowman
Error with upgrade def: Unable to find troop1-id: rhodok_trained_crossbowman
They come after almost every file.
 
why do you need to remove them..? why not give their cities to another faction, or modify them to a new faction?

edit: if you need to remove some lords, make a faction in module_faction.py called "kingdom_0" and assign the lords you need to get rid of to this faction
 
Because the mod only uses 2 factions and i want the mod to be clean, leaving as little remains behind from the native as possible. (Easier to work with).

Anyway, i figured out the upgrade errors, still looking for the Illegal identifier
 
sorry, but in my opinion is removing them stupid (no offense), just remove their culture and remove their
(faction_set_slot, "fac_kingdom_1",  slot_faction_culture, "fac_culture_1"),
      (faction_set_slot, "fac_kingdom_1",  slot_faction_leader, "trp_kingdom_1_lord"),

and assign the lords to "kingdom_0"

getting rid of all their troops is completely unnecesary aswell, just let them be, they dont bite..
 
Anyway(too late), i have removed most of the script errors and have this left:
Code:
Error: Unable to find object:fac_kingdom_3
ERROR: Illegal Identifier:fac_kingdom_3

Which is found here:
Code:
# Troops:
      
      # Assign banners and renown.
      # We assume there are enough banners for all kingdom heroes.
      (assign, ":num_khergit_lords_assigned", 0),
      
      (try_for_range, ":kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end),
        (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
        (try_begin),
          (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Khergit Khanate
          (store_add, ":kingdom_3_banners_begin", banner_scene_props_begin, khergit_banners_begin_offset),
          (store_add, ":banner_id", ":kingdom_3_banners_begin", ":num_khergit_lords_assigned"),
          (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
          (val_add, ":num_khergit_lords_assigned", 1),
        (else_try),
          (store_sub, ":hero_offset", ":kingdom_hero", kingdom_heroes_begin),
          (val_sub, ":hero_offset", ":num_khergit_lords_assigned"),#Remove khergits from offset since their banners are assigned above here
          (try_begin),
            (gt, ":hero_offset", khergit_banners_begin_offset),#Do not add khergit banners to non-khergit lords
            (val_add, ":hero_offset", khergit_banners_end_offset),
            (val_sub, ":hero_offset", khergit_banners_begin_offset),
          (try_end),
          (store_add, ":banner_id", banner_scene_props_begin, ":hero_offset"),
          (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
        (try_end),
        (store_character_level, ":level", ":kingdom_hero"),
        (store_mul, ":renown", ":level", ":level"),
        (val_div, ":renown", 2),
        (try_begin),
          (faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
          (troop_set_slot, ":kingdom_hero", slot_troop_loyalty, 100),
          (store_random_in_range, ":random_renown", 250, 400),
        (else_try),
          (store_random_in_range, ":random_loyalty", 50, 100),
          (troop_set_slot, ":kingdom_hero", slot_troop_loyalty, ":random_loyalty"),
          (store_random_in_range, ":random_renown", 100, 200),
        (try_end),
        (val_add, ":renown", ":random_renown"),
        (troop_set_slot, ":kingdom_hero", slot_troop_renown, ":renown"),
        (store_random_in_range, ":random_readiness", 0, 100),
        (troop_set_slot, ":kingdom_hero", slot_troop_readiness_to_join_army, ":random_readiness"),
        (troop_set_slot, ":kingdom_hero", slot_troop_readiness_to_follow_orders, 100),
        (troop_set_slot, ":kingdom_hero", slot_troop_player_order_state, spai_undefined),
        (troop_set_slot, ":kingdom_hero", slot_troop_player_order_object, -1),
      (try_end),
[quote author=excerpt]
(try_begin),
          (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Khergit Khanate
[/quote]
But i'm unsure what to do about it.

I don't understand it because of:
Code:
# Troops:
     
      # Assign banners and renown.
      # We assume there are enough banners for all kingdom heroes.
Yet i only see references to khergits in there, and i have removed the faction overall.

Edit: Oh, silly me, i just noticed the (else).
Just to confirm before i do it, i should remove:
Code:
(eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Khergit Khanate
          (store_add, ":kingdom_3_banners_begin", banner_scene_props_begin, khergit_banners_begin_offset),
          (store_add, ":banner_id", ":kingdom_3_banners_begin", ":num_khergit_lords_assigned"),
          (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
          (val_add, ":num_khergit_lords_assigned", 1),
        (else_try),
Right?
 
basically, you have to go through every script that reference fac_kingdom_3 and remove that reference. You get errors because the game is trying to find somethign that doesn't exist.

I don;t think anyone is going to check everywhere that you need to delete for you, THis looks like a solo job- but in can be done. THough there are better ways.
 
I never asked anyone to do it for me, i was just unsure where to find some of them. But i figured it out.
I was also wondering what to do about a specific code. But i have figured it all out myself.

Thread locked.
(Although, if you do know any certain issues about what i have done, PLEASE pm it)
 
Status
Not open for further replies.
Back
Top Bottom