Editing production of cities

Users who are viewing this thread

In WFAS, if you do ModSys editing (https://forums.taleworlds.com/index.php/topic,240255.0.html) then production is assigned to cities in module_scripts.py. Presumably it's the same for Warband. It looks like this:

Code:
	  #Pskov
      (party_set_slot,"p_town_9", slot_town_arena_melee_1_num_teams,   2),
      (party_set_slot,"p_town_9", slot_town_arena_melee_1_team_size,   2),
      (party_set_slot,"p_town_9", slot_town_arena_melee_2_num_teams,   2),
      (party_set_slot,"p_town_9", slot_town_arena_melee_2_team_size,   5),
      (party_set_slot,"p_town_9", slot_town_arena_melee_3_num_teams,   2),
      (party_set_slot,"p_town_9", slot_town_arena_melee_3_team_size,   8),
      (call_script, "script_center_change_trade_good_production", "p_town_9", "itm_furs", 80, 0), #primary production
	  (call_script, "script_center_change_trade_good_production", "p_town_9", "itm_oim_alcohol", 50, 0), #secondary production	  
	  (call_script, "script_center_change_trade_good_production", "p_town_9", "itm_raw_dyes", 60, 0), #third production
	  (call_script, "script_center_change_trade_good_production", "p_town_9", "itm_dried_meat", 120, 0), #from Smolensk primary 
	  (call_script, "script_center_change_trade_good_production", "p_town_9", "itm_pottery", 60, 0), #from Reval secondary (primary/smoked_fish needs sea)

itm_furs is the name of an item that they produce. So, change that for instance, and then rebuild the module. No idea if it will be save compatible.

This also suggests that it is in scripts.txt in the compiled module (what is already in the game folder), that would be harder to figure out but you could change it without rebuilding the module.
 
so i can in case u dont have the modsys this is how u do

go to script.txt under

initialize_economic_information -1


find the code equivalent of the city/village you want to change, for this you must know the code of the player main party (remember the cities are actually under parties.txt) who is "648518346341351424" by default, and add the number equivalent of the city/village you want to change, so for example i want to change the city number "40"

you will add "40" to "648518346341351424" and the result will be the scripting code of the city 648518346341351464


now you must find the flag of the product the city produce and you want to change, fo example the flag of velvet is 226 and for raw silk is "217"


now you must know that there is differences btw velvet and raw silk, velvet is a product and raw silk is a raw material, this mean that the production is different cause raw material are produced in acres wich major is the number more will produce, the velvet is a product wich have a limit in number wich is 30 for every product that is NOT raw

for example

648518346341351464 226 30 501 3

in this code the city will produce the maximum amount of velvet, wich will take a LOT of raw material


648518346341351464 226 30 501 3 1224979098644774912 217 15000 501 3


in this code the city will produce the maximum amount of velvet and wil produce raw silk too, as you can see the raw silk have a number of production of 15000 beacuse is calculated in acres, major is the number major is the production (i dont know if there is a limit) same would be for grain or fruits

remember the " 501 3 " close the lanes of codes, but this change in case the production is the last one before starts the production off villages, in this case the last code will be closed with " 6 3 "

648518346341351464 226 30 501 3 1224979098644774912 217 15000 6 3



remember if you add a production in a city or village you must to add a number in the begining of the script right under initialize_economic_information -1

initialize_economic_information -1
*number + 1* 6 3 .....................................



take in mind the economy in warband take several and several others factors like caravans, quantity of products, prices etc etc, so for example your town produce too much but dont have raw material your citie will stay poor, but if produce too much raw material the prices will go down and the city will still stay poor


i just start to learning script and i am quite sure there is several other factors of this kind of changes in the script that i dont have knowledge, maybe a more experienced modder can say more :iamamoron:


hope i helped  :lol:
 
Back
Top Bottom