items in the inventroy changing to food every days morning? PROBLEM SOLVED

Users who are viewing this thread

Diabelica

Knight
After some time of play testing my mod the items in in the inventory (not in the weapon slots)changes to food.Where would be the problem?

If I lose a combat the items in my inventroy goes and comes the fish meat and wheat. :cool:

I am using the official module system.
 
An information upgrade.

I founded that I get 15-20 food item every days morning.So my inventory menagement was too low that my items disseppear and the food welcome.

New question what I have done in the module to get 20 food item every morning.I am not sure.

I will be glsd ifsomeone helps me to find.
 
My guess, in the triggers that refresh merchant inventory you might have one of them pointing to the player's troop ID by accident.
 
Janus can you check this if there is a problem.

Code:
# Refresh Merchants
  (0.0, 0, 24.0, [], [
                      (reset_item_probabilities,100),
                      (set_merchandise_modifier_quality,120),


                      (reset_item_probabilities,100),(set_item_probability_in_merchandise,"itm_tools",700),
                      (troop_add_merchandise,"trp_zendar_merchant",itp_type_goods,num_merchandise_goods),
                      (reset_item_probabilities,100),(set_item_probability_in_merchandise,"itm_salt",700),
                      (troop_add_merchandise,"trp_salt_mine_merchant",itp_type_goods,num_merchandise_goods),

                      # Add trade goods to merchant inventories
                      (try_for_range,reg(2),towns_begin,towns_end),
                      (reset_item_probabilities,100),
                      (party_get_slot,reg(6),reg(2),slot_town_export_good),
                      (party_get_slot,reg(8),reg(2),slot_town_export_good_2),
                      (party_get_slot,reg(10),reg(2),slot_town_merchant),
                      (set_item_probability_in_merchandise,reg(6),700),
                      (set_item_probability_in_merchandise,reg(8),700),
                      (troop_add_merchandise,reg(10),itp_type_goods,num_merchandise_goods),

#                      (assign,"$pin_town",reg(2)),
#                      (call_script,"script_get_town_properties"),
#                      (assign,reg(3),4000000),
#                      (val_div,reg(3),"$pout_export_rate"),
#                      (val_div,reg(3),"$pout_export_rate"),
#                      (set_item_probability_in_merchandise,"$pout_export_good",700),
#                      (troop_add_merchandise,"$pout_trp_merchant",itp_type_goods,num_merchandise_goods),
                      (end_try,0),

                      # Add horsess to merchant inventories
                      (reset_item_probabilities,100),
                      (try_for_range,reg(2),goods_merchants_begin,goods_merchants_end),
                      (troop_add_merchandise,reg(2),itp_type_horse,8),
                      (troop_ensure_inventory_space,reg(2),merchant_inventory_space),
                      (store_troop_gold, reg(6),reg(2)),
                      (lt,reg(6),800),
                      (store_random,reg(8),100),
                      (val_add,reg(8),200),
                      (troop_add_gold,reg(2),reg(8)),
                      (end_try,0),
                     ]),
 
Do you have slot_town_merchant set on each town? If it were left unset for a town, the "0" would point to the player.
 
I have added a new city to my map but it has nothing at the moment.Only an abondened area.

Could this be the problem
 
I'm guessing that's it, yep. Check for where that slot is set, I believe towards the top of the triggers (don't remember exactly though).
 
Thanks for your help.

Problem solved.

I have added this new cities merchants armorers and ther townsmen in the troops.py.And the problem is solved.I don't get extra food any more.
 
Back
Top Bottom