This small mod will greatly improve your trading experience in the world of Calradia.
More than a dozen various item modifiers are enabled for trade goods and food items, directly affecting their prices and morale values.
As most modifiers noticeably increase item prices, average profit per inventory slot grows proportionally, turning trading into a very lucrative business.
Amount of money available to general merchants in the world has been buffed up as well, so they can actually buy all those goodies you bring to them.
Food morale values are also affected - stuff your inventory with exquisite foods to make your men happy! If you can afford the price of course.
Finally, there's also a slight tweak to the "Deliver grain to village" quest. Trust me - if you bring those peasants large bags of grain instead of regular ones, they will be grateful!
Download URL #1: http://www.nexusmods.com/mountandblade/mods/3108
Download URL #2: http://www.mbrepository.com/file.php?id=3108
Both TXT and source files are included in the download, see readme.txt for details. Mod is tested for savegame compatibility with Native.
Code extracts follow:
More than a dozen various item modifiers are enabled for trade goods and food items, directly affecting their prices and morale values.
As most modifiers noticeably increase item prices, average profit per inventory slot grows proportionally, turning trading into a very lucrative business.
Amount of money available to general merchants in the world has been buffed up as well, so they can actually buy all those goodies you bring to them.
Food morale values are also affected - stuff your inventory with exquisite foods to make your men happy! If you can afford the price of course.
Finally, there's also a slight tweak to the "Deliver grain to village" quest. Trust me - if you bring those peasants large bags of grain instead of regular ones, they will be grateful!
Download URL #1: http://www.nexusmods.com/mountandblade/mods/3108
Download URL #2: http://www.mbrepository.com/file.php?id=3108
Both TXT and source files are included in the download, see readme.txt for details. Mod is tested for savegame compatibility with Native.
Code extracts follow:
Code:
# Common trade goods
["spice","Spice", [("spice_sack",0)], itp_merchandise|itp_type_goods|itp_consumable, 0, 880,weight(40)|abundance(25)|max_ammo(50),imodbit_fine|imodbit_large_bag|imodbit_exquisite],
["salt","Salt", [("salt_sack",0)], itp_merchandise|itp_type_goods, 0, 255,weight(50)|abundance(120),imodbit_fine|imodbit_large_bag],
["oil","Oil", [("oil",0)], itp_merchandise|itp_type_goods|itp_consumable, 0, 450,weight(50)|abundance(60)|max_ammo(50),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite],
["pottery","Pottery", [("jug",0)], itp_merchandise|itp_type_goods, 0, 100,weight(50)|abundance(90),imodbit_cracked|imodbit_crude|imodbit_old|imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite|imodbit_masterwork|imodbit_rough|imodbit_sturdy],
["raw_flax","Flax Bundle", [("raw_flax",0)], itp_merchandise|itp_type_goods, 0, 150,weight(40)|abundance(90),imodbit_fine|imodbit_exquisite],
["linen","Linen", [("linen",0)], itp_merchandise|itp_type_goods, 0, 250,weight(40)|abundance(90),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite|imodbit_masterwork|imodbit_tattered|imodbit_ragged|imodbit_rough|imodbit_sturdy],
["wool","Wool", [("wool_sack",0)], itp_merchandise|itp_type_goods, 0, 130,weight(40)|abundance(90),imodbit_fine|imodbit_exquisite],
["wool_cloth","Wool Cloth", [("wool_cloth",0)], itp_merchandise|itp_type_goods, 0, 250,weight(40)|abundance(90),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite|imodbit_masterwork|imodbit_tattered|imodbit_ragged|imodbit_rough|imodbit_sturdy],
["raw_silk","Raw Silk", [("raw_silk_bundle",0)], itp_merchandise|itp_type_goods, 0, 600,weight(30)|abundance(90),imodbit_fine|imodbit_exquisite],
["raw_dyes","Dyes", [("dyes",0)], itp_merchandise|itp_type_goods, 0, 200,weight(10)|abundance(90),imodbit_fine|imodbit_well_made|imodbit_exquisite|imodbit_masterwork],
["velvet","Velvet", [("velvet",0)], itp_merchandise|itp_type_goods, 0, 1025,weight(40)|abundance(30),imodbit_fine|imodbit_well_made|imodbit_exquisite|imodbit_masterwork],
["iron","Iron", [("iron",0)], itp_merchandise|itp_type_goods, 0,264,weight(60)|abundance(60),imodbit_rusty|imodbit_poor|imodbit_well_made|imodbit_tempered|imodbit_hardened],
["tools","Tools", [("iron_hammer",0)], itp_merchandise|itp_type_goods, 0, 410,weight(50)|abundance(90),imodbit_rusty|imodbit_crude|imodbit_old|imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite|imodbit_masterwork|imodbit_sturdy|imodbit_hardened],
["raw_leather","Hides", [("leatherwork_inventory",0)], itp_merchandise|itp_type_goods, 0, 120,weight(40)|abundance(90),imodbit_fine|imodbit_exquisite|imodbit_tattered|imodbit_ragged|imodbit_sturdy|imodbit_thick],
["leatherwork","Leatherwork", [("leatherwork_frame",0)], itp_merchandise|itp_type_goods, 0, 220,weight(40)|abundance(90),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite|imodbit_masterwork|imodbit_tattered|imodbit_ragged|imodbit_rough|imodbit_sturdy|imodbit_thick],
["raw_date_fruit","Date Fruit", [("date_inventory",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 120,weight(40)|food_quality(10)|max_ammo(10),imodbit_cheap|imodbit_fine|imodbit_exquisite],
["furs","Furs", [("fur_pack",0)], itp_merchandise|itp_type_goods, 0, 391,weight(40)|abundance(90),imodbit_cheap|imodbit_fine|imodbit_exquisite|imodbit_tattered|imodbit_ragged|imodbit_sturdy|imodbit_thick],
# Drinking consumables
["wine","Wine", [("amphora_slim",0)], itp_merchandise|itp_type_goods|itp_consumable, 0, 220,weight(30)|abundance(60)|max_ammo(50),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite|imodbit_strong],
["ale","Ale", [("ale_barrel",0)], itp_merchandise|itp_type_goods|itp_consumable, 0, 120,weight(30)|abundance(70)|max_ammo(50),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite|imodbit_strong|imodbit_lordly],
# Food consumables
["smoked_fish","Smoked Fish", [("smoked_fish",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 65,weight(15)|abundance(110)|food_quality(50)|max_ammo(50),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite],
["cheese","Cheese", [("cheese_b",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 75,weight(6)|abundance(110)|food_quality(40)|max_ammo(30),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite],
["honey","Honey", [("honey_pot",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 220,weight(5)|abundance(110)|food_quality(40)|max_ammo(30),imodbit_cheap|imodbit_fine|imodbit_exquisite],
["sausages","Sausages", [("sausages",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 85,weight(10)|abundance(110)|food_quality(40)|max_ammo(40),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite],
["cabbages","Cabbages", [("cabbage",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 30,weight(15)|abundance(110)|food_quality(40)|max_ammo(50),imodbit_cheap|imodbit_fine|imodbit_exquisite],
["dried_meat","Dried Meat", [("smoked_meat",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 85,weight(15)|abundance(100)|food_quality(70)|max_ammo(50),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite],
["apples","Fruit", [("apple_basket",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 44,weight(20)|abundance(110)|food_quality(40)|max_ammo(50),imodbit_cheap|imodbit_fine|imodbit_exquisite],
["raw_grapes","Grapes", [("grapes_inventory",0)], itp_merchandise|itp_consumable|itp_type_goods, 0, 75,weight(40)|abundance(90)|food_quality(10)|max_ammo(10),imodbits_none], #x2 for imodbit_cheap|imodbit_fine|imodbit_exquisite
["raw_olives","Olives", [("olive_inventory",0)], itp_merchandise|itp_consumable|itp_type_goods, 0, 100,weight(40)|abundance(90)|food_quality(10)|max_ammo(10),imodbits_none], #x3 for imodbit_cheap|imodbit_fine|imodbit_exquisite
["grain","Grain", [("wheat_sack",0)], itp_merchandise|itp_type_goods|itp_consumable, 0, 30,weight(30)|abundance(110)|food_quality(40)|max_ammo(50),imodbit_cheap|imodbit_fine|imodbit_exquisite|imodbit_large_bag],
["cattle_meat","Beef", [("raw_meat",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 80,weight(20)|abundance(100)|food_quality(80)|max_ammo(50),imodbits_none],
["bread","Bread", [("bread_a",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 50,weight(30)|abundance(110)|food_quality(40)|max_ammo(50),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite],
["chicken","Chicken", [("chicken",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 95,weight(10)|abundance(110)|food_quality(40)|max_ammo(50),imodbits_none],
["pork","Pork", [("pork",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 75,weight(15)|abundance(100)|food_quality(70)|max_ammo(50),imodbits_none],
["butter","Butter", [("butter_pot",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 150,weight(6)|abundance(110)|food_quality(40)|max_ammo(30),imodbit_cheap|imodbit_fine|imodbit_well_made|imodbit_exquisite],
Code:
#script_game_get_item_extra_text:
# This script is called from the game engine when an item's properties are displayed.
# INPUT: arg1 = item_no, arg2 = extra_text_id (this can be between 0-7 (7 included)), arg3 = item_modifier
# OUTPUT: result_string = item extra text, trigger_result = text color (0 for default)
("game_get_item_extra_text",
[
(store_script_param, ":item_no", 1),
(store_script_param, ":extra_text_id", 2),
(store_script_param, ":item_modifier", 3),
(try_begin),
(is_between, ":item_no", food_begin, food_end),
(try_begin),
(eq, ":extra_text_id", 0),
(assign, ":continue", 1),
(try_begin),
(this_or_next|eq, ":item_no", "itm_cattle_meat"),
(this_or_next|eq, ":item_no", "itm_pork"),
(eq, ":item_no", "itm_chicken"),
(eq, ":item_modifier", imod_rotten),
(assign, ":continue", 0),
(try_end),
(eq, ":continue", 1),
(item_get_slot, ":food_bonus", ":item_no", slot_item_food_bonus),
########################################################################################################################
# LAV MODIFICATIONS START (TRADE GOODS MOD)
########################################################################################################################
(try_begin),
(eq, ":item_modifier", imod_cheap),
(val_sub, ":food_bonus", 2),
(else_try),
(eq, ":item_modifier", imod_fine),
(val_add, ":food_bonus", 1),
(else_try),
(eq, ":item_modifier", imod_well_made),
(val_add, ":food_bonus", 2),
(else_try),
(eq, ":item_modifier", imod_strong),
(val_add, ":food_bonus", 3),
(else_try),
(eq, ":item_modifier", imod_lordly),
(val_add, ":food_bonus", 5),
(else_try),
(eq, ":item_modifier", imod_exquisite),
(val_add, ":food_bonus", 6),
(try_end),
########################################################################################################################
# LAV MODIFICATIONS END (TRADE GOODS MOD)
########################################################################################################################
(assign, reg1, ":food_bonus"),
(set_result_string, "@+{reg1} to party morale"),
(set_trigger_result, 0x4444FF),
# ATTENTION!
# If you do not need savegame compatibility with Native, comment previous two lines of code and uncomment this:
# (try_begin),
# (ge, reg1, 0),
# (set_result_string, "@+{reg1} to party morale"),
# (set_trigger_result, 0x4444FF),
# (else_try),
# (set_result_string, "@{reg1} to party morale"),
# (set_trigger_result, 0xFF4444),
# (try_end),
(try_end),
(else_try),
(is_between, ":item_no", readable_books_begin, readable_books_end),
(try_begin),
(eq, ":extra_text_id", 0),
(item_get_slot, reg1, ":item_no", slot_item_intelligence_requirement),
(set_result_string, "@Requires {reg1} intelligence to read"),
(set_trigger_result, 0xFFEEDD),
(else_try),
(eq, ":extra_text_id", 1),
(item_get_slot, ":progress", ":item_no", slot_item_book_reading_progress),
(val_div, ":progress", 10),
(assign, reg1, ":progress"),
(set_result_string, "@Reading Progress: {reg1}%"),
(set_trigger_result, 0xFFEEDD),
(try_end),
(else_try),
(is_between, ":item_no", reference_books_begin, reference_books_end),
(try_begin),
(eq, ":extra_text_id", 0),
(try_begin),
(eq, ":item_no", "itm_book_wound_treatment_reference"),
(str_store_string, s1, "@wound treament"),
(else_try),
(eq, ":item_no", "itm_book_training_reference"),
(str_store_string, s1, "@trainer"),
(else_try),
(eq, ":item_no", "itm_book_surgery_reference"),
(str_store_string, s1, "@surgery"),
(try_end),
(set_result_string, "@+1 to {s1} while in inventory"),
(set_trigger_result, 0xFFEEDD),
(try_end),
(try_end),
]),
Code:
# Input: arg1 = item_id, arg2 = modifier
# Output: reg0 = item_modifier_if_found (can_fail)
("cf_player_has_item_without_modifier",
[
(store_script_param, ":item_id", 1),
(store_script_param, ":modifier", 2),
(player_has_item, ":item_id"),
#checking if any of the meat is not rotten
(assign, ":has_without_modifier", 0),
(troop_get_inventory_capacity, ":inv_size", "trp_player"),
(try_for_range, ":i_slot", 0, ":inv_size"),
(troop_get_inventory_slot, ":cur_item", "trp_player", ":i_slot"),
(eq, ":cur_item", ":item_id"),
(troop_get_inventory_slot_modifier, ":cur_modifier", "trp_player", ":i_slot"),
(neq, ":cur_modifier", ":modifier"),
(assign, ":has_without_modifier", 1),
########################################################################################################################
# LAV MODIFICATIONS START (TRADE GOODS MOD)
########################################################################################################################
(assign, reg0, ":cur_modifier"),
########################################################################################################################
# LAV MODIFICATIONS END (TRADE GOODS MOD)
########################################################################################################################
(assign, ":inv_size", 0), #break
(try_end),
(eq, ":has_without_modifier", 1),
]),
Code:
# script_get_player_party_morale_values
# Output: reg0 = player_party_morale_target
("get_player_party_morale_values",
[
(party_get_num_companion_stacks, ":num_stacks","p_main_party"),
(assign, ":num_men", 0),
(try_for_range, ":i_stack", 1, ":num_stacks"),
(party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"),
(try_begin),
(troop_is_hero, ":stack_troop"),
(val_add, ":num_men", 1), #it was 3 in "Mount&Blade", now it is 1 in Warband
(else_try),
(party_stack_get_size, ":stack_size","p_main_party",":i_stack"),
(val_add, ":num_men", ":stack_size"),
(try_end),
(try_end),
(assign, "$g_player_party_morale_modifier_party_size", ":num_men"),
(store_skill_level, ":player_leadership", "skl_leadership", "trp_player"),
(try_begin),
(eq, "$players_kingdom", "fac_player_supporters_faction"),
(faction_get_slot, ":cur_faction_king", "$players_kingdom", slot_faction_leader),
(eq, ":cur_faction_king", "trp_player"),
(store_mul, "$g_player_party_morale_modifier_leadership", ":player_leadership", 15),
(else_try),
(store_mul, "$g_player_party_morale_modifier_leadership", ":player_leadership", 12),
(try_end),
(assign, ":new_morale", "$g_player_party_morale_modifier_leadership"),
(val_sub, ":new_morale", "$g_player_party_morale_modifier_party_size"),
(val_add, ":new_morale", 50),
(assign, "$g_player_party_morale_modifier_food", 0),
(try_for_range, ":cur_edible", food_begin, food_end),
(call_script, "script_cf_player_has_item_without_modifier", ":cur_edible", imod_rotten),
(item_get_slot, ":food_bonus", ":cur_edible", slot_item_food_bonus),
########################################################################################################################
# LAV MODIFICATIONS START (TRADE GOODS MOD)
########################################################################################################################
(try_begin),
(eq, reg0, imod_cheap),
(val_sub, ":food_bonus", 2),
(else_try),
(eq, reg0, imod_fine),
(val_add, ":food_bonus", 1),
(else_try),
(eq, reg0, imod_well_made),
(val_add, ":food_bonus", 2),
(else_try),
(eq, reg0, imod_strong),
(val_add, ":food_bonus", 3),
(else_try),
(eq, reg0, imod_lordly),
(val_add, ":food_bonus", 5),
(else_try),
(eq, reg0, imod_exquisite),
(val_add, ":food_bonus", 6),
(try_end),
########################################################################################################################
# LAV MODIFICATIONS END (TRADE GOODS MOD)
########################################################################################################################
(val_mul, ":food_bonus", 3),
(val_div, ":food_bonus", 2),
(val_add, "$g_player_party_morale_modifier_food", ":food_bonus"),
(try_end),
(val_add, ":new_morale", "$g_player_party_morale_modifier_food"),
(try_begin),
(eq, "$g_player_party_morale_modifier_food", 0),
(assign, "$g_player_party_morale_modifier_no_food", 30),
(val_sub, ":new_morale", "$g_player_party_morale_modifier_no_food"),
(else_try),
(assign, "$g_player_party_morale_modifier_no_food", 0),
(try_end),
(assign, "$g_player_party_morale_modifier_debt", 0),
(try_begin),
(gt, "$g_player_debt_to_party_members", 0),
(call_script, "script_calculate_player_faction_wage"),
(assign, ":total_wages", reg0),
(store_mul, "$g_player_party_morale_modifier_debt", "$g_player_debt_to_party_members", 10),
(val_max, ":total_wages", 1),
(val_div, "$g_player_party_morale_modifier_debt", ":total_wages"),
(val_clamp, "$g_player_party_morale_modifier_debt", 1, 31),
(val_sub, ":new_morale", "$g_player_party_morale_modifier_debt"),
(try_end),
(val_clamp, ":new_morale", 0, 100),
(assign, reg0, ":new_morale"),
]),
Code:
# script_refresh_center_inventories
("refresh_center_inventories",
[
(set_merchandise_modifier_quality,150),
(reset_item_probabilities,100),
# Add trade goods to merchant inventories
(try_for_range,":cur_center",towns_begin, towns_end),
(party_get_slot,":cur_merchant",":cur_center",slot_town_merchant),
(reset_item_probabilities,100),
(assign, ":total_production", 0),
(try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end),
(call_script, "script_center_get_production", ":cur_center", ":cur_goods"),
(assign, ":cur_production", reg0),
(try_for_range, ":cur_village", villages_begin, villages_end),
(party_slot_eq, ":cur_village", slot_village_bound_center, ":cur_center"),
(call_script, "script_center_get_production", ":cur_village", ":cur_goods"),
(val_div, reg0, 3),
(val_add, ":cur_production", reg0),
(try_end),
(val_max, ":cur_production", 1),
(val_mul, ":cur_production", 4),
(val_add, ":total_production", ":cur_production"),
(try_end),
(party_get_slot, ":town_prosperity", ":cur_center", slot_town_prosperity),
(assign, ":number_of_items_in_town", 25),
(try_begin), #1.0x - 2.0x (50 - 100 prosperity)
(ge, ":town_prosperity", 50),
(store_sub, ":ratio", ":town_prosperity", 50),
(val_mul, ":ratio", 2),
(val_add, ":ratio", 100),
(val_mul, ":number_of_items_in_town", ":ratio"),
(val_div, ":number_of_items_in_town", 100),
(else_try), #0.5x - 1.0x (0 - 50 prosperity)
(store_sub, ":ratio", ":town_prosperity", 50),
(val_add, ":ratio", 100),
(val_mul, ":number_of_items_in_town", ":ratio"),
(val_div, ":number_of_items_in_town", 100),
(try_end),
(val_clamp, ":number_of_items_in_town", 10, 40),
(try_begin),
(is_between, ":cur_center", castles_begin, castles_end),
(val_div, ":number_of_items_in_town", 2),
(try_end),
(try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end),
(call_script, "script_center_get_production", ":cur_center", ":cur_goods"),
(assign, ":cur_production", reg0),
(try_for_range, ":cur_village", villages_begin, villages_end),
(party_slot_eq, ":cur_village", slot_village_bound_center, ":cur_center"),
(call_script, "script_center_get_production", ":cur_village", ":cur_goods"),
(val_div, reg0, 3),
(val_add, ":cur_production", reg0),
(try_end),
(val_max, ":cur_production", 1),
(val_mul, ":cur_production", 4),
(val_mul, ":cur_production", ":number_of_items_in_town"),
(val_mul, ":cur_production", 100),
(val_div, ":cur_production", ":total_production"),
(set_item_probability_in_merchandise, ":cur_goods", ":cur_production"),
(try_end),
(troop_clear_inventory, ":cur_merchant"),
(troop_add_merchandise, ":cur_merchant", itp_type_goods, ":number_of_items_in_town"),
(troop_ensure_inventory_space, ":cur_merchant", 20),
(troop_sort_inventory, ":cur_merchant"),
(store_troop_gold, ":cur_gold",":cur_merchant"),
########################################################################################################################
# LAV MODIFICATIONS START (TRADE GOODS MOD)
########################################################################################################################
(lt,":cur_gold",15000),
(store_random_in_range,":new_gold",5000,10000),
########################################################################################################################
# LAV MODIFICATIONS END (TRADE GOODS MOD)
########################################################################################################################
(call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
(try_end),
]),
Code:
[anyone,"village_elder_deliver_grain_thank", [(str_store_party_name, s13, "$current_town")],
"My good {lord/lady}. You have saved us from hunger and desperation. We cannot thank you enough, but you'll always be in our prayers.\
The village of {s13} will not forget what you have done for us.", "village_elder_deliver_grain_thank_2",
[(quest_get_slot, ":quest_target_amount", "qst_deliver_grain", slot_quest_target_amount),
########################################################################################################################
# LAV MODIFICATIONS START (TRADE GOODS MOD)
########################################################################################################################
#(troop_remove_items, "trp_player", "itm_grain", ":quest_target_amount"),
(troop_get_inventory_capacity, ":inv_size", "trp_player"),
(assign, ":result_xp_reward", 300), # Was 400
(assign, ":result_prosperity", 3), # Was 4
(assign, ":result_relation", 4), # Was 5
(try_for_range, ":i_slot", 0, ":inv_size"),
(troop_get_inventory_slot, ":cur_item", "trp_player", ":i_slot"),
(eq, ":cur_item", "itm_grain"),
(troop_get_inventory_slot_modifier, ":cur_modifier", "trp_player", ":i_slot"),
(try_begin),
(eq, ":cur_modifier", imod_large_bag), # These men are starving, they only care about quantity, so no bonus or penalty for quality
(val_add, ":result_xp_reward", 50),
(val_add, ":result_prosperity", 1),
(val_add, ":result_relation", 1),
(try_end),
(troop_remove_item, "itm_grain", 1),
(val_sub, ":quest_target_amount", 1),
(lt, ":quest_target_amount", 1),
(assign, ":inv_size", 0), #break
(try_end),
(add_xp_as_reward, ":result_xp_reward"),
(call_script, "script_change_center_prosperity", "$current_town", ":result_prosperity"),
(call_script, "script_change_player_relation_with_center", "$current_town", ":result_relation"),
########################################################################################################################
# LAV MODIFICATIONS END (TRADE GOODS MOD)
########################################################################################################################
(call_script, "script_end_quest", "qst_deliver_grain"),
#Troop commentaries begin
(call_script, "script_add_log_entry", logent_helped_peasants, "trp_player", "$current_town", -1, -1),
#Troop commentaries end
]],