Diplomacy + allow fief trading + PBOD for 1.143

Does this work??

  • Yes, and it's save compatible

    Votes: 25 83.3%
  • Yes but it's not save compatible

    Votes: 5 16.7%
  • No

    Votes: 0 0.0%

  • Total voters
    30

Users who are viewing this thread

Pejot

Sergeant Knight
WBVC
Ok mates it's ready (for tests :razz:)

Diplomacy 3.3.2 + allow fief trading + PBOD for 1.143 FINAL

06.09.11
FIX ADDED

Link

http://www.mbrepository.com/file.php?id=3205

Module files included.

Zerilius fixes implemented. (thanks for your hard work :wink: )

Should be save compatible but make backups of your saves just in case.

Thanks to Waihti and zParsifal for creating the mod :wink:

06.09.11
FIX


Changes the time that merchant inventory refreshes from 7 days to 24 hours

http://www.mbrepository.com/file.php?id=3217


Older version:

Diplomacy 3.3.2 + allow fief trading + PBOD final (beta)

Hope it will work (works for me) but it needs tests

http://www.mbrepository.com/file.php?id=3197

and module files

http://www.mbrepository.com/file.php?id=3198
 

Zerilius

Knight at Arms
Nice work I would say if you really removed the missing items bug. I don't have the 1.143 version so I can't test it.

Atleast the diplomacy board appears to be a bit alive now.

Keep up the good work. :grin:
 

Pejot

Sergeant Knight
WBVC
now i'm working on implementing diplomacy+ features cause i was working on older diplomacy :wink:
 

Vangar

Recruit
Played a bit, the missing item bug seems to be gone and the new trading system which comes with 1.143 is also implemented :smile: (You'll notice a change in goods available at cities and villages. Establishing Enterprises is harder now).

Would love to see the whole package Diplo+ and PBOD 1.143 ready :grin:

Great work so far :smile:

I'm curious, although I'm not that adept in coding issues: What did you do to port the mod to the recent version?
 

Pejot

Sergeant Knight
WBVC
Run through whole code of modules files and look for changes between 1.134 - diplo - 1.143 :wink:
 

Pejot

Sergeant Knight
WBVC
For those who want to know how to fix no arrows problem

You have to add this at the end of module_scripts.py
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"),
      (lt,":cur_gold",1500),
      (store_random_in_range,":new_gold",500,1000),
      (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
    (try_end), 	
  ]), 

  # script_refresh_center_armories
  ("refresh_center_armories",
  [
    (reset_item_probabilities, 100),
	(set_merchandise_modifier_quality, 150),    
	(try_for_range, ":cur_merchant", armor_merchants_begin, armor_merchants_end),    
	  (store_sub, ":cur_town", ":cur_merchant", armor_merchants_begin),
	  (val_add, ":cur_town", towns_begin),
	  (troop_clear_inventory, ":cur_merchant"),
	  (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),    
	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_body_armor, 16),
	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_head_armor, 16),
	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_foot_armor, 8),
	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_hand_armor, 4),
	  (troop_ensure_inventory_space, ":cur_merchant", merchant_inventory_space),
	  (troop_sort_inventory, ":cur_merchant"),
	  (store_troop_gold, reg6, ":cur_merchant"),
	  (lt, reg6, 1000),
	  (store_random_in_range, ":new_gold", 250, 500),
	  (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
    (end_try),
  ]),

  # script_refresh_center_weaponsmiths
  ("refresh_center_weaponsmiths",
  [
    (reset_item_probabilities, 100),
    (set_merchandise_modifier_quality, 150),
    (try_for_range, ":cur_merchant", weapon_merchants_begin, weapon_merchants_end),
	  (store_sub, ":cur_town", ":cur_merchant", weapon_merchants_begin),
      (val_add, ":cur_town", towns_begin), 
	  (troop_clear_inventory, ":cur_merchant"),
      (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_one_handed_wpn, 5),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_two_handed_wpn, 5),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_polearm, 5),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_shield, 6),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_bow, 4),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_crossbow, 3),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_thrown, 5),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_arrows, 2),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_bolts, 2),
      (troop_ensure_inventory_space, ":cur_merchant", merchant_inventory_space),
      (troop_sort_inventory, ":cur_merchant"), 
      (store_troop_gold, reg6, ":cur_merchant"),
      (lt, reg6, 1000),
      (store_random_in_range, ":new_gold", 250, 500),
      (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
    (try_end),
  ]),

  # script_refresh_center_stables
  ("refresh_center_stables",
  [
    (reset_item_probabilities, 100),
    (set_merchandise_modifier_quality, 150),
    (try_for_range, ":cur_merchant", horse_merchants_begin, horse_merchants_end),
	  (troop_clear_inventory, ":cur_merchant"),
      (store_sub, ":cur_town", ":cur_merchant", horse_merchants_begin),
      (val_add, ":cur_town", towns_begin),
      (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_horse, 5),
      (troop_ensure_inventory_space, ":cur_merchant", 65),
      (troop_sort_inventory, ":cur_merchant"),
      (store_troop_gold, ":cur_gold", ":cur_merchant"),
      (lt, ":cur_gold", 600),
      (store_random_in_range, ":new_gold", 250, 500),
      (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
    (try_end),
  ]),

And change this
Code:
 (0.0, 0, 24.0, [], [
                      (reset_item_probabilities,100),
                      (set_merchandise_modifier_quality,150),


                      (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
#                      (store_sub, ":item_to_production_slot", slot_town_trade_good_productions_begin, trade_goods_begin),
                      (store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, trade_goods_begin),

                      (try_for_range,":cur_center",towns_begin,towns_end),
                        (party_get_slot,":cur_merchant",":cur_center",slot_town_merchant),
                        (reset_item_probabilities,100),
                        (try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end),
#                          (store_add, ":cur_production_slot", ":cur_goods", ":item_to_production_slot"),
                          (store_add, ":cur_price_slot", ":cur_goods", ":item_to_price_slot"),
#                          (party_get_slot, ":cur_production", ":cur_center", ":cur_production_slot"),
                          (party_get_slot, ":cur_price", ":cur_center", ":cur_price_slot"),
                      
#                          (assign, ":cur_probability", 100),
#                          (store_add, ":cur_production", 100, ":cur_production"),
#                          (val_mul, ":cur_probability", ":cur_production"),
#                          (val_div, ":cur_probability", 100),
#                          (try_begin),
#                            (gt, ":cur_probability", 100),
#                            (store_sub, ":temp_dif", ":cur_probability", 100),
#                            (val_mul, ":temp_dif", 4),
#                            (val_add, ":cur_probability", ":temp_dif"),
#                          (try_end),
#                          (store_sub, ":temp_dif", average_price_factor, ":cur_price"),
#                          (val_div, ":temp_dif", 2),
#                          (val_add, ":cur_price", ":temp_dif"),

						  (call_script, "script_center_get_production", ":cur_center", ":cur_goods"),
						  (assign, ":cur_probability", reg0),
						  (call_script, "script_center_get_consumption", ":cur_center", ":cur_goods"),
						  (val_add, ":cur_probability", reg0),
						  
						  (val_mul, ":cur_probability", 4),


                          (val_mul, ":cur_probability", average_price_factor),
                          (val_div, ":cur_probability", ":cur_price"),
                          (val_mul, ":cur_probability", average_price_factor),
                          (val_div, ":cur_probability", ":cur_price"),
                          (val_mul, ":cur_probability", average_price_factor),
                          (val_div, ":cur_probability", ":cur_price"),
#                          (val_mul, ":cur_probability", average_price_factor),
#                          (val_div, ":cur_probability", ":cur_price"),
                          (set_item_probability_in_merchandise,":cur_goods",":cur_probability"),
                        (try_end),
                        (troop_add_merchandise,":cur_merchant",itp_type_goods,num_merchandise_goods),

                        (troop_ensure_inventory_space,":cur_merchant",merchant_inventory_space),
                        (troop_sort_inventory, ":cur_merchant"),
                        (store_troop_gold, ":cur_gold",":cur_merchant"),


Code:
# Refresh Armor sellers
  (0.0, 0, 24.0, [], [
                      (reset_item_probabilities,100),
                      (set_merchandise_modifier_quality,150),
                      (try_for_range,reg(2),armor_merchants_begin,armor_merchants_end),
                        (store_sub, ":cur_town", reg2, armor_merchants_begin),
                        (val_add, ":cur_town", towns_begin),
                        (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_body_armor,16),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_head_armor,16),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_foot_armor,8),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_hand_armor,4),
                        (troop_ensure_inventory_space,reg(2),merchant_inventory_space),
                        (troop_sort_inventory, reg(2)),
                        (store_troop_gold, reg(6),reg(2)),


Code:
# Refresh Weapon sellers
  (0.0, 0, 24.0, [], [
                      (reset_item_probabilities,100),
                      (set_merchandise_modifier_quality,150),
                      (try_for_range,reg(2),weapon_merchants_begin,weapon_merchants_end),
                        (store_sub, ":cur_town", reg2, weapon_merchants_begin),
                        (val_add, ":cur_town", towns_begin),
                        (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_one_handed_wpn,5),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_two_handed_wpn,5),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_polearm,5),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_shield,6),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_bow,4),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_crossbow,3),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_thrown,5),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_arrows,2),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_bolts,2),
                        (troop_ensure_inventory_space,reg(2),merchant_inventory_space),
                        (troop_sort_inventory, reg(2)),
                        (store_troop_gold, reg(6),reg(2)),

Code:
# Refresh Horse sellers
  (0.0, 0, 24.0, [], [
                      (reset_item_probabilities,100),
                      (set_merchandise_modifier_quality,150),
                      (try_for_range,":cur_merchant",horse_merchants_begin,horse_merchants_end),
                        (store_sub, ":cur_town", ":cur_merchant", horse_merchants_begin),
                        (val_add, ":cur_town", towns_begin),
                        (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
                        (troop_add_merchandise_with_faction,":cur_merchant", ":cur_faction",itp_type_horse,5),
                        (troop_ensure_inventory_space,":cur_merchant",65),
                        (troop_sort_inventory, ":cur_merchant"),
                        (store_troop_gold, ":cur_gold",":cur_merchant"),

to this

Code:
  # Refresh Merchants
  (0.0, 0, 168.0, [],
  [    
    (call_script, "script_refresh_center_inventories"),
  ]),

# Refresh Armor sellers
  (0.0, 0, 168.0, [],
  [    
    (call_script, "script_refresh_center_armories"),
  ]),

# Refresh Weapon sellers
  (0.0, 0, 168.0, [],
  [
    (call_script, "script_refresh_center_weaponsmiths"),
  ]),

# Refresh Horse sellers
  (0.0, 0, 168.0, [],
  [
    (call_script, "script_refresh_center_stables"),
  ]),

in module_triggers_py


However if the mod changes something in trade/production system this may brake the game.

I forgot:
Changes are save compatible but you have to wait 1 or 2 weeks to see results. :grin:
 

Pejot

Sergeant Knight
WBVC
Still working on final version cause i found some bugs caused by porting :wink:



I have the final version but i still have some problems with it. If someone want to help PM me :grin:
 

Jackkyl

Recruit
Hey I'm new to the forums.

I'm very interested in trying out this mod. I installed the files above but it says I need the originals.

Can someone give me the links to the original downloads?

Very much appreciated!
 

Lynch

Regular
Jackkyl said:
Hey I'm new to the forums.

I'm very interested in trying out this mod. I installed the files above but it says I need the originals.

Can someone give me the links to the original downloads?

Very much appreciated!

1- Original Diplomacy 3.32 mod: http://www.mbrepository.com/file.php?id=1887

2- PBOD: http://www.mbrepository.com/file.php?id=2468

3- PBOD Hotfix: http://www.mediafire.com/file/linfck9dnhbzh42/Diplo+PBODv88-HotfixB.zip

4- Diplomacy +: http://www.mbrepository.com/file.php?id=2688

Install them in order and then Pejot´s great fix over them.
 

Jackkyl

Recruit
Hey Lynch,

Thanks for the links.

It looks like PBOD and Diplomacy create two different mods. Do I install PBOD into the diplomacy folder to make them one mod?
 

Jackkyl

Recruit
First of all. Love the mod. Working great (thanks for the help earlier).

1) It seems that my income is at "0" on the new diplomacy NPC (chamberlain). I'm still earning money weekly from my two castles and 1 fief. Is this because I already owned these areas in native before I applied the mod? Tax rate is set to low.

2) What's the point of the treasury? Is this for money for training troops through the new mod?

3) What's the difference between manage household and storage

Thanks for the help.
 

Pejot

Sergeant Knight
WBVC
1. All your income goes to treasury you can take it from chambarlain in one of your castles.
2. Treasury is made to make the game more realistic cause it's based on medieval age and at that time they couldn't send money to somone travelling who knows where :smile:
So they kept it in treasury
3. It' the same but you speak differently about it with wife and chambarlain
 
Top Bottom