What is the exact meaning of pf_disabled

Users who are viewing this thread

For my mod I'm planing on having only a few settlements and came to think of the pf_disabled flag.
I'm planning to apply this flag to all the settlements that I don't need.
The settlements I plan to disable are, all the villages and castles, leaving only the cities left.


So my questions are:

What does the pf_disabled flag mean exactly?

What will happen to all the quests related to the villages and castles?

What will happen to the lords owning the settlements?

Will the game crash?

Etc


I would be glad if someone with knowledge about this flag would just brainstorm about the meaning of it.
 
It disables the town in game, while it still is in the mod. It's good to use when you don't want to hunt down all the codes related to that town if you want to remove it.
 
Yepp, just like Zendar is in the latest version, but not on the world map.  It just disables it on the world map, you can do the same with the bridges if you plan on making a new map and dont need so many.
~Spiritwind~
 
The thing is that I don't want it to: show up on the map, be used by anyone or anything.

It's ok if it's still in the game but it should no be used at all, by anyone.
I'm trying to make a desolate landscape, and then I can't just have villages and stuff all over the map.

Well it sounds like the best solution to add pf_disabled to the settlements. But I'm gonna wait and see if there will be more responses.

Thanks Sheriff-murder

spiritwind said:
Yepp, just like Zendar is in the latest version, but not on the world map.  It just disables it on the world map, you can do the same with the bridges if you plan on making a new map and dont need so many.
~Spiritwind~

So what will happen to all the lords that have the castles and villages assigned to them?
I mean, the game assigns the settlements to the characters in the begining. What will happen when the settlement isn't there?
 
I added the flag pf_disabled to all the castles and villages but...

All that happened was that they became invisible. Lords still travelled to them and patrolled around them.
Farmers still travelled from village to village etc.


So what is the meaning of pf_disabled? To make a settlement invisible to the player?
 
If you look though the first (long) script, I beleive it's the one that deals out the towns/castles/villages to the various lords.  You will need to go through this and comment/delete that stuff.

Best to do this early on in the mod and try it out.  From what you are doing you will have to work that script over pretty good (I too must do the same) as well as the lords and faction leaders.  If you get rid of the specifically named parties from that script, you can delete all but the first and last town, castle and village with, what I believe) minimal damage to the way the game works.  I know for a fact that some castles are specifically assigned to specific lords in the first script.
 
I guess commenting out will be safest, for starters.

I found this while looking thou the scripts.py

# Towns:
      (try_for_range, ":item_no", trade_goods_begin, trade_goods_end),
        (store_sub, ":eek:ffset", ":item_no", trade_goods_begin),
        (val_add, ":eek:ffset", slot_town_trade_good_prices_begin),
        (try_for_range, ":center_no", centers_begin, centers_end),
          (party_set_slot, ":center_no", ":eek:ffset", average_price_factor),
        (try_end),
##        (party_set_slot, "p_zendar", ":eek:ffset", average_price_factor),
##        (party_set_slot, "p_salt_mine", ":eek:ffset", average_price_factor),
##        (party_set_slot, "p_four_ways_inn", ":eek:ffset", average_price_factor),

      (try_end),

      (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_2"),
      (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_4"),
      (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_8"),
      (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_9"),
      (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_11"),
      (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_12"),
      (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_13"),
      (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_15"),
      (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_16"),

      (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_4"),
      (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_6"),
      (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_8"),
      (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_12"),
      (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_13"),
      (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_15"),
      (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_16"),

      (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_4"),
      (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_5"),
      (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_6"),
      (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_7"),
      (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_14"),
      (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_15"),
      (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_18"),

      (call_script, "script_set_trade_route_between_centers", "p_town_4", "p_town_6"),
      (call_script, "script_set_trade_route_between_centers", "p_town_4", "p_town_12"),
      (call_script, "script_set_trade_route_between_centers", "p_town_4", "p_town_13"),
      (call_script, "script_set_trade_route_between_centers", "p_town_4", "p_town_15"),
      (call_script, "script_set_trade_route_between_centers", "p_town_4", "p_town_16"),
     
      (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_6"),
      (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_7"),
      (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_14"),
      (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_15"),
      (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_17"),
      (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_18"),
     
      (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_7"),
      (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_11"),
      (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_13"),
      (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_15"),
      (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_16"),
      (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_17"),

      (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_10"),
      (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_11"),
      (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_13"),
      (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_14"),
      (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_15"),
      (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_16"),
      (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_17"),
      (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_18"),

      (call_script, "script_set_trade_route_between_centers", "p_town_8", "p_town_9"),
      (call_script, "script_set_trade_route_between_centers", "p_town_8", "p_town_11"),
      (call_script, "script_set_trade_route_between_centers", "p_town_8", "p_town_12"),
      (call_script, "script_set_trade_route_between_centers", "p_town_8", "p_town_13"),
      (call_script, "script_set_trade_route_between_centers", "p_town_8", "p_town_16"),

      (call_script, "script_set_trade_route_between_centers", "p_town_9", "p_town_11"),
      (call_script, "script_set_trade_route_between_centers", "p_town_9", "p_town_12"),
      (call_script, "script_set_trade_route_between_centers", "p_town_9", "p_town_13"),
      (call_script, "script_set_trade_route_between_centers", "p_town_9", "p_town_16"),

      (call_script, "script_set_trade_route_between_centers", "p_town_10", "p_town_11"),
      (call_script, "script_set_trade_route_between_centers", "p_town_10", "p_town_14"),
      (call_script, "script_set_trade_route_between_centers", "p_town_10", "p_town_17"),
      (call_script, "script_set_trade_route_between_centers", "p_town_10", "p_town_18"),

      (call_script, "script_set_trade_route_between_centers", "p_town_11", "p_town_12"),
      (call_script, "script_set_trade_route_between_centers", "p_town_11", "p_town_13"),
      (call_script, "script_set_trade_route_between_centers", "p_town_11", "p_town_14"),
      (call_script, "script_set_trade_route_between_centers", "p_town_11", "p_town_16"),
      (call_script, "script_set_trade_route_between_centers", "p_town_11", "p_town_17"),
     
      (call_script, "script_set_trade_route_between_centers", "p_town_12", "p_town_13"),
      (call_script, "script_set_trade_route_between_centers", "p_town_12", "p_town_16"),

      (call_script, "script_set_trade_route_between_centers", "p_town_13", "p_town_16"),
      (call_script, "script_set_trade_route_between_centers", "p_town_13", "p_town_17"),

      (call_script, "script_set_trade_route_between_centers", "p_town_14", "p_town_17"),
      (call_script, "script_set_trade_route_between_centers", "p_town_14", "p_town_18"),

      (call_script, "script_set_trade_route_between_centers", "p_town_15", "p_town_16"),
      (call_script, "script_set_trade_route_between_centers", "p_town_16", "p_town_17"),
      (call_script, "script_set_trade_route_between_centers", "p_town_17", "p_town_18"),

      (try_for_range, ":town_no", towns_begin, towns_end),
        (party_set_slot, ":town_no", slot_town_tournament_max_teams, 4),
        (party_set_slot, ":town_no", slot_town_tournament_max_team_size, :cool:,
      (try_end),
      (party_set_slot, "p_town_6", slot_town_tournament_max_team_size, 2),

#Correcting banners according to the player banner
      (troop_get_slot, ":selected_banner_spr", "trp_player", slot_troop_banner_scene_prop),
      (assign, ":end_cond", kingdom_heroes_end),
      (try_for_range, ":cur_troop", kingdom_heroes_begin, ":end_cond"),
        (troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"),
        (troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one),
        (assign, ":end_cond", 0),
      (try_end),


      (call_script, "script_give_center_to_lord", "p_town_1",  "trp_kingdom_4_lord", 0),
      (call_script, "script_give_center_to_lord", "p_town_2",  "trp_knight_4_1", 0),
      (call_script, "script_give_center_to_lord", "p_town_3",  "trp_knight_5_1", 0),
      (call_script, "script_give_center_to_lord", "p_town_4",  "trp_knight_1_1", 0),
      (call_script, "script_give_center_to_lord", "p_town_5",  "trp_kingdom_5_lord", 0),
      (call_script, "script_give_center_to_lord", "p_town_6",  "trp_kingdom_1_lord", 0),
      (call_script, "script_give_center_to_lord", "p_town_7",  "trp_knight_1_2", 0),
     
      (call_script, "script_give_center_to_lord", "p_town_8",  "trp_kingdom_2_lord", 0),
      (call_script, "script_give_center_to_lord", "p_town_9",  "trp_knight_2_1", 0),
      (call_script, "script_give_center_to_lord", "p_town_10", "trp_kingdom_3_lord", 0),
      (call_script, "script_give_center_to_lord", "p_town_11", "trp_knight_2_2", 0),
      (call_script, "script_give_center_to_lord", "p_town_12", "trp_knight_4_2", 0),
      (call_script, "script_give_center_to_lord", "p_town_13", "trp_knight_2_3", 0),
      (call_script, "script_give_center_to_lord", "p_town_14", "trp_knight_3_1", 0),

      (call_script, "script_give_center_to_lord", "p_town_15", "trp_knight_5_2", 0),
      (call_script, "script_give_center_to_lord", "p_town_16", "trp_knight_1_3", 0),
      (call_script, "script_give_center_to_lord", "p_town_17", "trp_knight_3_2", 0),
      (call_script, "script_give_center_to_lord", "p_town_18", "trp_knight_3_3", 0),


      (call_script, "script_give_center_to_faction_aux", "p_castle_1", "fac_kingdom_5"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_2", "fac_kingdom_3"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_3", "fac_kingdom_2"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_4", "fac_kingdom_2"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_5", "fac_kingdom_4"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_6", "fac_kingdom_2"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_7", "fac_kingdom_3"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_8", "fac_kingdom_2"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_9", "fac_kingdom_5"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_10", "fac_kingdom_4"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_11", "fac_kingdom_4"),

      (call_script, "script_give_center_to_faction_aux", "p_castle_12", "fac_kingdom_4"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_13", "fac_kingdom_1"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_14", "fac_kingdom_5"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_15", "fac_kingdom_5"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_16", "fac_kingdom_5"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_17", "fac_kingdom_3"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_18", "fac_kingdom_2"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_19", "fac_kingdom_2"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_20", "fac_kingdom_1"),

      (call_script, "script_give_center_to_faction_aux", "p_castle_21", "fac_kingdom_5"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_22", "fac_kingdom_3"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_23", "fac_kingdom_1"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_24", "fac_kingdom_1"),

      (call_script, "script_give_center_to_faction_aux", "p_castle_25", "fac_kingdom_1"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_26", "fac_kingdom_1"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_27", "fac_kingdom_1"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_28", "fac_kingdom_5"),

      (call_script, "script_give_center_to_faction_aux", "p_castle_29", "fac_kingdom_2"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_30", "fac_kingdom_3"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_31", "fac_kingdom_1"),

      (call_script, "script_give_center_to_faction_aux", "p_castle_32", "fac_kingdom_4"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_33", "fac_kingdom_5"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_34", "fac_kingdom_4"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_35", "fac_kingdom_1"),
     
     
      (call_script, "script_give_center_to_faction_aux", "p_castle_36", "fac_kingdom_4"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_37", "fac_kingdom_2"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_38", "fac_kingdom_3"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_39", "fac_kingdom_2"),
      (call_script, "script_give_center_to_faction_aux", "p_castle_40", "fac_kingdom_3"),

     


  # fill_village_bound_centers
    #pass 1: Give one village to each castle

      (try_for_range, ":cur_center", castles_begin, castles_end),
        (assign, ":min_dist", 999999),
        (assign, ":min_dist_village", -1),
        (try_for_range, ":cur_village", villages_begin, villages_end),
          (neg|party_slot_ge, ":cur_village", slot_village_bound_center, 1), #skip villages which are already bound.
          (store_distance_to_party_from_party, ":cur_dist", ":cur_village", ":cur_center"),
          (lt, ":cur_dist", ":min_dist"),
          (assign, ":min_dist", ":cur_dist"),
          (assign, ":min_dist_village", ":cur_village"),
        (try_end),
        (party_set_slot, ":min_dist_village", slot_village_bound_center, ":cur_center"),
        (store_faction_of_party, ":town_faction", ":cur_center"),
        (call_script, "script_give_center_to_faction_aux", ":min_dist_village", ":town_faction"),
      (try_end),

  # Give family castles to certain nobles.
      (call_script, "script_give_center_to_lord", "p_castle_29", "trp_knight_2_10", 0), #Nelag_Castle
      (call_script, "script_give_center_to_lord", "p_castle_30", "trp_knight_3_4", 0), #Asugan_Castle
      (call_script, "script_give_center_to_lord", "p_castle_35", "trp_knight_1_15", 0), #Haringoth_Castle
     
    #pass 2: Give other villages to closest town.
      (try_for_range, ":cur_village", villages_begin, villages_end),
        (neg|party_slot_ge, ":cur_village", slot_village_bound_center, 1), #skip villages which are already bound.
        (assign, ":min_dist", 999999),
        (assign, ":min_dist_town", -1),
        (try_for_range, ":cur_town", towns_begin, towns_end),
          (store_distance_to_party_from_party, ":cur_dist", ":cur_village", ":cur_town"),
          (lt, ":cur_dist", ":min_dist"),
          (assign, ":min_dist", ":cur_dist"),
          (assign, ":min_dist_town", ":cur_town"),
        (try_end),
        (party_set_slot, ":cur_village", slot_village_bound_center, ":min_dist_town"),
        (store_faction_of_party, ":town_faction", ":min_dist_town"),
        (call_script, "script_give_center_to_faction_aux", ":cur_village", ":town_faction"),
      (try_end),

      (try_for_range, ":center_no", centers_begin, centers_end),
        (store_faction_of_party, ":eek:riginal_faction", ":center_no"),
        (faction_get_slot, ":culture", ":eek:riginal_faction", slot_faction_culture),
        (party_set_slot, ":center_no", slot_center_culture,  ":culture"),
        (party_set_slot, ":center_no", slot_center_original_faction,  ":eek:riginal_faction"),
        (party_set_slot, ":center_no", slot_center_ex_faction,  ":eek:riginal_faction"),
      (try_end),
     
      (call_script, "script_update_village_market_towns"),

I think that the lines in red are the ones I should comment out, right?
Either way, I guess this is what I should go throu then?
 
I commented out all the cities from the code except the 5 capitals, and it worked.

But there is a slight problem.
The towns become neutral and are assigned to ME instead.

This must be fixable.
How should I go on from here?
 
NaglFaar said:
I commented out all the cities from the code except the 5 capitals, and it worked.

But there is a slight problem.
The towns become neutral and are assigned to ME instead.

This must be fixable.
How should I go on from here?

no matter what, each town or city needs to be assigned to someone.  If not it's slot for the lord is set to 0 (which is the player).  What you can do is make a "dummy" troop to assign all the towns to.  Or the lead of a faction.
 
I assigned them to fac_neutral but that only made all the cities mine.
Then I tried fac_no_faction. The same thing here.

I came to think of zendar. Did it have a lord?
I mean, it was neutral, right?

Or should I make a new kingdom that doesn't have any followers or vassals and then assign the settlement to it?
I could call the kingdom "Deserted" or something.
 
So, can thay be assigned to a lord that won't be ingame?

If I make a new lord but don't put him in-game, could that work?
There has to be a way to make the towns "deserted".
Or I'll just make a new kingdom with no troops in it.
 
Yes, the lord doesn't have to be in game, he does have to be defined in the troops though. As of this moment, 2132 has all the "towns" are assigned to lords who aren't in scenes as of yet.

I still need to comment out the stuff related to parties travelling back and forth between them though...
 
octoburn said:
Yes, the lord doesn't have to be in game, he does have to be defined in the troops though. As of this moment, 2132 has all the "towns" are assigned to lords who aren't in scenes as of yet.

I still need to comment out the stuff related to parties travelling back and forth between them though...

If you knew where that tuple is and have some spare time you are more then welcome to tell me.
As for the lord creating. Do I just add no_scene to it?

Here is an example of a lord that "doesn't exist"
 
Code:
["knight_6_6", "Lord Death", "knight_1_1", tf_hero,no_scene, 0, reserved,  fac_kingdom_6, [itm_courtly_outfit,   itm_nomad_boots,   itm_sword_medieval_c,  itm_scale_gauntlets,  itm_tab_shield_heater_cav_a], knight_attrib_1,wp(130),knight_skills_1|knows_trainer_1|knows_trainer_3, 0x0000000c3e08601414ab4dc6e39296b200000000001e231b0000000000000000, swadian_face_middle_2],

Am I right here?
 
close.  Look at my code, I have a dead king:

  ["king_dead",  "The Dead King",  "Kingdom 1 Lord",  tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_charger,  itm_rich_outfit,        itm_blue_hose,                  itm_iron_greaves,              itm_plate_armor, itm_gauntlets,    itm_bastard_sword_b,      itm_tab_shield_heater_cav_b,      itm_great_helmet],          knight_attrib_5,wp(220),knight_skills_5|knows_trainer_5, 0x0000000f45041105241acd2b5a66a86900000000001e98310000000000000000,swadian_face_older_2],

The items are not really needed, but I just took the basic tuple from one of the lords.  Never cleaned it up, but it doesn't matter.  He is inactive.
 
jik said:
close.  Look at my code, I have a dead king:

  ["king_dead",  "The Dead King",  "Kingdom 1 Lord",  tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_charger,  itm_rich_outfit,        itm_blue_hose,                  itm_iron_greaves,              itm_plate_armor, itm_gauntlets,    itm_bastard_sword_b,      itm_tab_shield_heater_cav_b,      itm_great_helmet],          knight_attrib_5,wp(220),knight_skills_5|knows_trainer_5, 0x0000000f45041105241acd2b5a66a86900000000001e98310000000000000000,swadian_face_older_2],

The items are not really needed, but I just took the basic tuple from one of the lords.  Never cleaned it up, but it doesn't matter.  He is inactive.

I see. This will help alot.
Because if I got this right, it will mean that:

The towns will not be mine.
All the peasants won't "travel to NaglFaar"
 
Back
Top Bottom