Author Topic: items in the inventroy changing to food every days morning? PROBLEM SOLVED  (Read 1174 times)

0 Members and 1 Guest are viewing this topic.

Diabelica

  • Knight
  • *
    • View Profile
  • Faction: Vaegir
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. 8-)

I am using the official module system.
« Last Edit: June 25, 2006, 03:30:09 pm by Diabelica »
One look in her lusting eyes
Savage fear in you will rise
Teeth of terror sinking in
The bite of the she-wolf

Diabelica

  • Knight
  • *
    • View Profile
  • Faction: Vaegir
Re: items in the inventroy changing to food?
« Reply #1 on: June 25, 2006, 02:26:38 pm »
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.
One look in her lusting eyes
Savage fear in you will rise
Teeth of terror sinking in
The bite of the she-wolf

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
Re: items in the inventroy changing to food every days morning?
« Reply #2 on: June 25, 2006, 02:35:51 pm »
My guess, in the triggers that refresh merchant inventory you might have one of them pointing to the player's troop ID by accident.
Tomas asked Dolgan, "What place is this?"
The dwarf puffed on his pipe. "It is a glory hole, laddie. When my people mined this area, we fashioned many such areas."
     - Raymond E. Feist, Magician: Apprentice  (Riftwar Saga)

Diabelica

  • Knight
  • *
    • View Profile
  • Faction: Vaegir
Re: items in the inventroy changing to food every days morning?
« Reply #3 on: June 25, 2006, 02:41:31 pm »
Janus can you check this if there is a problem.

Code: [Select]
# 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),
                     ]),
« Last Edit: June 25, 2006, 02:42:53 pm by Janus »
One look in her lusting eyes
Savage fear in you will rise
Teeth of terror sinking in
The bite of the she-wolf

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
Re: items in the inventroy changing to food every days morning?
« Reply #4 on: June 25, 2006, 02:45:05 pm »
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.
Tomas asked Dolgan, "What place is this?"
The dwarf puffed on his pipe. "It is a glory hole, laddie. When my people mined this area, we fashioned many such areas."
     - Raymond E. Feist, Magician: Apprentice  (Riftwar Saga)

Diabelica

  • Knight
  • *
    • View Profile
  • Faction: Vaegir
Re: items in the inventroy changing to food every days morning?
« Reply #5 on: June 25, 2006, 02:47:37 pm »
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
One look in her lusting eyes
Savage fear in you will rise
Teeth of terror sinking in
The bite of the she-wolf

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
Re: items in the inventroy changing to food every days morning?
« Reply #6 on: June 25, 2006, 03:21:08 pm »
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).
Tomas asked Dolgan, "What place is this?"
The dwarf puffed on his pipe. "It is a glory hole, laddie. When my people mined this area, we fashioned many such areas."
     - Raymond E. Feist, Magician: Apprentice  (Riftwar Saga)

Diabelica

  • Knight
  • *
    • View Profile
  • Faction: Vaegir
Re: items in the inventroy changing to food every days morning?
« Reply #7 on: June 25, 2006, 03:29:54 pm »
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.
One look in her lusting eyes
Savage fear in you will rise
Teeth of terror sinking in
The bite of the she-wolf