EDB Skeleton

  1. Tsarsies
    Tsarsies
    hidden_resources sword armor catapult horse pike bow jousting_field

    This is a list of EDB-BUILDINGS. EDB-EVENTS will be detailed later... (edb-events are buildings too)
    NOTE I: Most of the below buildings will be PRE-Constructed at game start. Leaving most building construction in game to EDB-Events.
    NOTE II: Major regions will be city settlements, Minor regions will primarily be castle settlements with the option available for the player to make them city settlements.
    NOTE III: currently in use are 42 trees. Leaving 82 trees.

    This is a work in progress...

    Walls-Upgrades
    Will act the same as vanilla, except population levels will be altered and special requirements will be required for anything above stone wall/castle. Note that huge_stone_wall and citadel have been removed.
    levels wooden_pallisade wooden_wall stone_wall large_stone_wall
    levels motte_and_bailey wooden_castle castle fortress

    Tower
    Only the 1st tier towers will be used. May add additional levels in the form of EDB-Events... Possibly only York and London will have access to tower usage.
    levels ballista_towers
    levels c_ballista_towers

    Equestrian
    1-3 tiers vanilla only. Remaining tiers will be EDB-Events.
    levels stables knights_stables barons_stables

    Barracks
    This tree uses 7 tiers in vanilla (5 for castle). DotC will only use 4(3), with the 4th tier only being available to york and london and prebuilt in london at game start.
    levels town_watch town_guard city_watch militia_drill_square
    levels mustering_hall garrison_quarters drill_square

    Professional Military
    Most likely only available in London.
    levels military_academy

    Missiles
    Building dependant on Resource placement. Special conditions being met for tier 3 availablity. Possibly via events.
    levels bowyer practice_range archery_range

    Siege
    Same as Missile buildings.
    levels ballista_range catapult_range
    levels c_ballista_range c_catapult_range

    Smith
    As per Missile buildings.
    levels leather_tanner blacksmith armourer heavy_armourer
    levels c_leather_tanner c_blacksmith c_armourer c_heavy_armourer

    Port
    Castle regions will not be coastal. These buildings will be pre-built on game start and unavailable as to create a strategical objective.
    levels port shipwright dockyard
    levels c_port c_shipwright c_dockyard

    Sea_trade
    As per Port building. EDB-Events will dominate this area of gameplay.
    levels merchants_wharf warehouse

    Market
    Markets, Fairs, Monthly Markets will all be heavily scripted EDB_Events. These buildings will be more or less pre-placed with possible options to expand.
    levels corn_exchange market fairground great_market

    Roads
    Pre-Built. Additional trees will be set up in the form of EDB-Events to include road improvements such as road patrols and increase trade caravans etc. Which can affect the updated immigration script.
    levels roads paved_roads
    levels c_roads c_paved_roads

    Farms
    As per Roads
    levels farms farms+1 farms+2 farms+3

    Mines
    Mines = Jousting Lists etc!. Heavily scripted. Additional buildings will be added to this tree (upto 9).
    levels mines mines+1
    levels c_mines c_mines+1

    Churches
    ... EDB-Events will be created around these buildings. I have combined the two castle and city trees into one tree. I am contemplating adding a 'priory' before the abbey.
    levels small_church church abbey cathedral

    Taverns
    As per Churches.
    levels brothel inn tavern

    City_hall
    Pre-Built and unavailable. Only 3rd tier constructed in London.
    levels town_hall council_chambers city_hall

    Bank
    This tree will be modified based on what is done with the story around Isaac of York. I am thinking of using GED's roving buildings idea (with permission). Isaac of York is a jewish money-lender from the novel Ivanhoe.
    levels merchant_bank merchant_vault

    Music
    If the idea of Minstrels are used, then this tree will be used. Priests will be recruited through these buildings (Minstrels).
    levels theatre conservatorium

    Academic
    I have combined the alchemist line with the academic line to create a school tree. I may add technological advances in between the tiers. Like upgrades in current economic and military advances.
    levels school library academy university

    Tourney
    The tourney tree has been revamped to 9 tiers. There are 3 major tiers and 6 tournaments. Each tournament increases the fame of the settlement, boosting economy and also provides a place for knights to practice. the 3 major tiers will provide the training of more experienced knights. When one of the 6 Tournaments are held an interactive event will take place. the details of which are yet to be figured out. the building tree is set up.
    levels jousting_lists joust_tourney_1 joust_tourney_2 joust_tourney_3 tourney_fields joust_tourney_4 joust_tourney_5 joust_tourney_6 tournament_pavilion

    Templars_chapter_house
    Will be pre constructed in London alone.
    levels templars_minor_ch templars_major_ch templars_hq

    Woodsmens_guild
    Available after robin used 3 times?
    levels woodsmens_guild m_woodsmens_guild gm_woodsmens_guild

    Assassins_guild
    levels assassins_guild m_assassins_guild gm_assassins_guild

    Masons_guild
    levels masons_guild m_masons_guild gm_masons_guild

    Theologians_guild
    levels theologians_guild m_theologians_guild gm_theologians_guild

    Merchants_guild
    This may yet be converted to a regular building for use with the Trade and Supply mod. Treated as a guild via script.
    levels merchants_guild m_merchants_guild gm_merchants_guild

    Thiefs_guild
    levels thieves_guild m_thieves_guild gm_thieves_guild

    Explorers_guild
    levels explorers_guild m_explorers_guild gm_explorers_guild

    Swordsmiths_guild
    levels swordsmiths_guild m_swordsmiths_guild gm_swordsmiths_guild

    Horse_breeders_guild
    This may be converted to a regular building as per the Trade and Supply script.
    levels horse_breeders_guild m_horse_breeders_guild gm_horse_breeders_guild

    Convert_to_castle
    Convert_To_City
    These will be treated as normal.
    levels village_to_wooden_castle small_town_to_stone_keep large_town_to_castle
    levels wooden_castle_to_village stone_keep_to_small_town castle_to_large_town large_castle_to_city fortress_to_city

    Pagan Temple
    levels high_temple
  2. Tsarsies
    Tsarsies
    The EDB can have 128 building Trees with 9 buildings per tree for a total of 1152 buildings... Currently we have 37 Trees.
    Available Trees: 91 (79)

    What is an EDB Event?

    It is (will be) an Event in game that is controllable by the player and AI. The Event itself can range from a 1 off thing to something that can be done over and over again. Some Events will be demolished every turn (Enabling them to be rebuilt) others will never be demolished. Below is a list of EDB-Events to expect in game. This list will be ever growing and reorganized.

    NOTE: Some events will grant bonuses to the AI alone just to make them more likely to construct. Health or happiness bonuses most likely.

    Requesting Aid from Robin - Added as building
    - This enables the settlement to recruit 3 units of Sherwood Archers in the settlement.

    Recruiting Hero Units -Added as building
    - Aethelstane
    - Ivanhoe
    Will use a Tree each. Could possibly grant upgrades and Traits/Ancs to the hero with the 8 remaining buildings per tree. Such as training swordplay, jousting, educating etc.

    Rescue a Maiden - Added as building
    - Only available under special conditions. Depending on game-play events you may be offered the opportunity to rescue a maiden from a Saxon castle. Once constructed you will be given an interactive event and then offered to hire an assassin character (the character is actually your champion). You can then use him to 'sabotage' the settlement which is detailed in the interactive event. if you succeed you will rescue the maiden.
    Effects Renown/Chivalry
    < Will be available via interactive event and the use of a Raiding Party (Spy)

    Raid a Castle - Added as building
    - Tied to script that takes into account faction Leaders swordplay stat. You can do this whenever you choose to. You will use your champion (aka Assassin) to raid (sabotage) any settlement. Depending on ur degree of success you will gain an amount of florins.
    Effects Renown/Chivalry
    < Players can recruit at max 1 Raiding Party (Spy). A successful spy mission will be a successful raid mission. Player can Raid as often as they like, characters and/or settlements. The spies subterfuge will be affected by the faction leaders stats and can be improved.

    Archery Contests - Added as building
    - A scripted event. Boosts income for a period of time. Winner gains a lump sum of gold.
    If a settlement holds enough of these then special units can become available.
    Effects Renown/Chivalry

    Hold Jousting Tournament
    - Dependant on Mine level and availability. Increases income. Possible additional scripted events.
    If a settlement holds enough of these then special units can become available.
    Effects Renown/Chivalry
    < has been merged with the tourney tree.

    Hold Fair - Added as building
    - Requires Market
    - Increases Happiness, Migration, Income, Corruption
    - Not available in Castle settlements.
    - Lasts 2 weeks

    Hold Market - Added as building
    - Require Fairground
    - Same as Holding a Fair but higher return.
    - Not available in Castle settlements.
    - Lasts 4 weeks

    Hold Banquet - Added as building
    - Available in Castle settlements
    - Requires Wooden Castle.
    - Increase Happiness, Health, Loyalty of generals present. Costly.
    - Lasts 4 weeks

    Hunting - Added as building
    - Decrease income, happiness, Increase corruption and Governors Stats. Costly.
    - Lasts 2 weeks
    NOTES: Due to scripting limitations only a select few settlements will be able to hold hunting trips. As poaching was generally subjected to severe punishment this restriction will work perfectly. When a hunting trip is held in the region an event will pop up the following turn detailing the hunt. I would like to add Ancs/Traits to the general that hunts.
    The following regions can hold hunting trips: (M) = Major Region. (m) = Minor Region
    Lancashire(M), Hampshire(M), North Riding(M), Gloucestershire(M), Buckingham(m), Essex(M), Nottinghamshire(M), Knaresborough_Castle(m)


    Increase Road Patrols
    - Increases Trade, Happiness and migration, Decreases corruption. Decreases immediate Income.
    - Lasts 4 weeks

    Decrease Road Patrols
    - Increases Corruption, decreases happiness, trade. Increases immediate income.
    - Lasts 4 weeks
  3. Tsarsies
    Tsarsies
    EDB-Buildings

    Increase Farmland
    - Same as Farms, cheaper but smaller returns.

    Trade Goods Guild - Added as Building
    - This building is offered when you sign a trade agreement. It will increase trade with the various factions you have trade agreements with as well as boost happiness, health, population growth and corruption, your law will take a hit and require other buildings/events to increase. The additional tiers of the building will allow additional trade options and spawn in-game events. Such as trading actual goods for the supply and demand script. With the use of event counters your trade network will expand and increase your income. this building can be constructed in all settlements starting with small towns.
    - It will be a regular building but set up similar to that of a guild. In that once constructed you will earn 'trade' points from that settlement, this value will not be shown. Once the trade value is high enough the next tier will be offered. Gaining additional trade agreements or forming alliances will drastically boost the trade value. One trade agreement allows one building, two agreements allow two buildings etc. One alliance allows 3 buildings, two alliances allow 6 buildings etc. This is faction wide. The trade value points you earn will be scripted and allow the additional tiers. similar to guilds (100, 250, 500 as an example)
    - In addition, it should be possible to spawn events off of this building and it will tie in with the trade and supply script.


    NOTE: the following buildings are place holders until i get my gaming computer sent over. As it has all the information for this system fleshed out. and it will work perfectly with the Trade Goods building and is already set up for the Trade and Supply script.

    These will act as GUILDS as per vanilla. - Added as Building
    Merchant Gild - as per vanilla
    - 3 tiers. Merchant Gild - Master - Headquarters
    - Must have Trade Goods Guild
    - Not available in castle settlements
    -

    Craft Gild - Added as Building
    - 3 tiers. Craft Gild - Master - Headquarters
    - Must have Trade Goods Guild
    - Not available in castle settlements

    The Guildhall - Added as Building
    - 1 tier.
    - must have either the masters guild of either Merchant Gild or Craft Gild.
    - Will boost relations with all factions.
    - Only one Guildhall per Faction.

    NOTE: Triggers and scripts still need to be set up...
  4. Keyser Soze
    Keyser Soze
    - "NOTE II: Major regions will be city settlements, Minor regions will primarily be castle settlements with the option available for the player to make them city settlements."

    the castles were build long time and they were builded on any strategic place with function be castles. therefore if you want to have this in mod, I think only some of them could be changed to settlements (maybe the ones with Cathedrals - as Eely castle?).

    - "levels wooden_pallisade wooden_wall stone_wall large_stone_wall huge_stone_wall"

    maybe without huge_stone_wall? much castles/walls were build up sometimes in mod era or later.

    - "levels motte_and_bailey wooden_castle castle fortress citadel"

    without citadel? during first times after Normans conquered England they build motte_and_bailey and than they upgrade castles. but upgrade castle take much time...

    - "levels bowyer practice_range archery_range"

    maybe only castles could have the last level?

    - "levels corn_exchange market fairground"

    do you think with any market building also in castles? they could have any.

    - "Roads"

    do you think about old Roman roads? there could be regions with them and in this regions could be roads builded faster because good base...

    - "Farms"

    maybe there could be used model of vanilla villages model only as strat_map resource to represent farms. (I like idea from RusichiTW - they also have small regions with villages which belongs to castle and can build farms.) also some regions (lowlands) are better for farming so only these regions could build higher level of famrs and could have more village models...?

    - "levels small_church church abbey cathedral"

    it needs research, but cathedrals could be builded (pre-builded) by historic accuracy. also what about Dioceses/Archdiocese?

    - "levels small_chapel chapel"

    hm, I think that castles could have also higher level of churches... maybe also Cathedrals?

    - "Taverns"

    what about to recruit any mercenaries or agents here? different mercenaries, assassins, brigands spent long time in taverns. or if not maybe tie any trait for agents to tavern?

    - "Bank"

    is possible to do (as Robinīs help) lend money (one times) when faction is in bankruptcy???

    - "GUILDS..."

    when I good remember (I long time did not play M2TW) if player build one Guild than he can not build second in settlements. maybe forgot Guilds as buildings and made them events - if player will (for character in settlement?) choose one event the others will be not possible to use - and this could change characterīs way of life...

    - "Convert_to_castle", "NOTE II: Major regions will be city settlements, Minor regions will primarily be castle settlements with the option available for the player to make them city settlements."

    hm, o.k. but only lower levels of settlements/castles or only if higher level of walls are not builded. why? as I wrote building the Castle took much time and castles were build as castles...

    the truth is that much of important cities were build around castle/fortress. (the capitals in RusichiTW mod are made as city and castle together, where castle is from three sides surrounded by river and is accessible (possible to attack castle) only after city is captured. if you do not know RusichiTW later I could post pictures)
  5. Tsarsies
    Tsarsies
    The huge stone walls and citadel will not be available to construct. But i believe they are hardcoded into the game and must be included. But there are ways via script to to make it impossible to have the option of their construction. But yes, they will not be built in game.

    As with a lot of the buildings in the first post they will pretty much be pre-built at game start. Only under certain circumstances will any of them become available to settlements that do not have them. Making the EDB events and minor buildings more a priority.

    Buildings like the cathedrals ect will hopefully be placed historically. That is the general idea for most of the buildings. Some of them will of course be placed just for game play purposes. Quite a bit of research required there.

    Your idea about taverns is very MTW1, but i do like it and i also think that's how taverns should be used.

    I want to set the Bank buildings up as GED's roving building idea, based around the character Isaac of York (Jewish Money-lender). His appearance in game will be different to the way he was in the novel. Basically, he will roam the map (via script) from settlement to settlement. He will appear as a building constructed whilst he is present. He will move on to another random settlement after a few turns and the building will then be demolished. While he is present, the settlement will have access to the bank buildings which they can construct (these wont demolish when he moves on).If he never enters a settlement, those buildings will never become available. The bank buildings will allow the player/AI to take a loan.

    Guilds are set up so that only one is present in a settlement. Which is why i was thinking of creating an entirely new system to allow multiple guilds. They are just special buildings, and only special because of the guild point system, which can be duplicated in a script and tailored to our own liking. It would be a lot of scripting dependant on number of guilds and how they become available, but something could be set up...

    Do you have a link to this RusichiTW mod? i do not wish to use their village idea without permission.
  6. Keyser Soze
    Keyser Soze
    oh, MTW1 I played it long long time ago. and it is impossible to run it on my new notebook...

    I like yours Isaac idea. I do not know if possibility to construct Bank building when Isaac is in settlement is good and historical. these Jews only visited Kingīs/Lordīs court and loaned the money.
    so is possible to code that if Isaac is in settlement player will get possibility - loan money - yes/no?
    and how will be loan capital paid up with usura?
    maybe when Isaac is in settlement there could growth corruption?

    link to RusichiTW. but it looks that authors do not visit page often
    http://www.twcenter.net/forums/forumdisplay.php?f=1117
  7. Tsarsies
    Tsarsies
    so is possible to code that if Isaac is in settlement player will get possibility - loan money - yes/no?
    That would be possible. Isaac will just be a building, but i will set up a series of events to make it feel like he isnt a building. If u have ever heard of GED's roving building idea you would know what i was trying to do. The whole concept is scripted and can actually be quite a large script.

    I have not put any thought into how the loan should be repaid. It will likely be offered to the player in amounts, 1000, 5000, 10,000... And then every 4 turns (once a month) a collector would come calling requesting a specified amount...

    I dont know... but i assume it will be similar in the way that Friar Tuck will be handled. He will travel from faction to faction collecting the 160,000 ransom to free king richard. (this would not start until 1194). Once the entire 160k was collected it would be a number of turns until King Richard arrives in game.
  8. Tsarsies
    Tsarsies
    I have an idea which will be possible to pull off for this mod due to its small size (limited settlements and factions). Faction Specific Trade Buildings... Possibly even Settlement Specific...

    When you sign a trade agreement with any faction (norman or saxon) then each settlement you own gains access to special trade buildings regarding that faction (this will work for AI-AI aswell). For sake of argument lets just call this building a 'Trade Goods Building'. Once constructed it increases trade with the faction in question (every faction will have one of these building trees available once trade relations have been set up through diplomacy). These buildings will increase relations. If at any point the trade agreement is cancelled OR war is declared, the buildings are demolished faction wide and u lose all benefits...

    That is the basic idea...

    Keep in mind that each building tree can have 9 branches and keeping in mind the basic idea behind EDB-Events. Therefore we can set up some kind of trade agreement mission kind of thing with each faction.

    This could include but is not limited to the trading of specific resources to and from other factions.

    The way resources will work in this mod is if u do not have access to the catapult resource the catapults are not able to be recruited, this makes specific regions strategic options to hold. But if you have a trade agreement set up with Faction A you can then construct a Trade Goods building in one of ur settlements to 'import' said goods. This then allows that specific settlement to begin building and recruiting catapult units.

    If you go to war, you lose all related buildings and benefits.

    The original idea will require 8 building trees. and we currently have 79 available...
  9. Keyser Soze
    Keyser Soze
    intersting idea...

    I do not know if is the best to tie military special units to trade agreement. nobody get you its best know-how . I try to explain what I think about this:

    1, could be some trade resource (or do this through EDB - if there will be not enough resorces for strat_map) extra (something like "monopoly")?

    2, so could we do each faction strong in some trade? one could have monopoly for wool, another for tin, next for glass, next for fabric...

    3, and if trade agreement will be sign the faction A gain access to "monopoly" of faction B and vice versa?

    the military extra units from faction A for faction B could be available maybe only if aliance and trade agreement are sign?
  10. Tsarsies
    Tsarsies
    It would also be costly, just setting up the trade goods building wouldn't allow u to build endless catapults, Additional tiers of the building would be u actually conducting trade, receiving the goods to construct said unit. So u would be limited in how many u could train. These units would also have higher upkeep then if u actually owned the resource urself. A delayed time for it to be recieved as well.

    The AI would take advantage of it cause it would see the building as granting additional trade, and whatever bonuses we give it. When the AI takes ur trade item (catapult) u would lose its benefit for a short period...

    So there would be a pro and con to both sides...

    I guess its just a matter of how it is set up. with a bit of thought i think it would work fine.
    the military extra units from faction A for faction B could be available maybe only if aliance and trade agreement are sign?
    I like that, and the building available with just trade agreement, giving just bonus to trade. Keep in mind we do not have regular merchants, so a new income would be nice to create to take its place. Maybe we can think of a few inventive ways to add trade missions.
  11. Keyser Soze
    Keyser Soze
    I do not know original DotC game, but what do you think about to add to each faction one extra unit?
    one could have longbowman, another any better cavalry unit, next double handed axe, next longspears (bonus against cavalry)...

    my idea is to do each faction different for player (as in trade "monopoly") also in military unique. most of the regional mods have the same factionīs units. could we do that player will have another feeleng with each faction?

    and these unique units could be available after aliance and trade agreement is sign?
  12. TNZ
    TNZ
    Tsarsies: I actually have written a script that allows the player to borrow money and repay it. The script also charges interest based on much has been borrowed. The player can borrow up to 60,000. With some minor alterations, it should do the trick.

    campaign_script:
    Spoiler Alert, click show to read: 
    Code:
    ;################################## PLAYER BORROW AND REPAY MONEY SCRIPT #############################
    
    declare_counter player_borrow_money
    
    	;Ask if the player want to borrow/repay or exit script;
    
    	monitor_event RequestBuildingAdvice I_TurnNumber >= 1
    		add_events
    		event	counter	ask_player_borrow_or_repay_accepted
    		event	counter	ask_player_borrow_or_repay_declined
    	 	date	0
    	 	end_add_events
    		historic_event ask_player_borrow_or_repay true
    	end_monitor
    
    	;Player wants to borrow/repay;
    
    	monitor_conditions I_EventCounter ask_player_borrow_or_repay_accepted = 1
    		add_events
    		event	counter	player_borrow_or_repay_accepted
    		event	counter	player_borrow_or_repay_declined
    	 	date	0
    	 	end_add_events
    		historic_event player_borrow_or_repay true
    		set_event_counter ask_player_borrow_or_repay_accepted 0
    	end_monitor
    
    	;Player wants to exit script;
    
    	monitor_conditions I_EventCounter ask_player_borrow_or_repay_declined = 1
    		set_event_counter ask_player_borrow_or_repay_declined 0
    	end_monitor
    
    ;################################## PLAYER WANTS TO RAISE A LOAN #############################
    
    	;Player wants to borrow;
    
    	monitor_conditions I_EventCounter player_borrow_or_repay_accepted = 1
    		if I_CompareCounter player_borrow_money <= 24
    		add_events
    		event	counter	player_need_loan_accepted
    		event	counter	player_need_loan_declined
    	 	date	0
    	 	end_add_events
    		historic_event player_need_loan true
    		set_event_counter player_borrow_or_repay_accepted 0
    	end_if
    
    	;Player wants to borrow but has a loan more than 60,000 florins;
    
    		if I_CompareCounter player_borrow_money >= 25
    		historic_event failed_to_raise_a_loan
    		set_event_counter player_borrow_or_repay_accepted 0
    	end_if
    	end_monitor
    
    	;Player wants to borrow 10,000;
    
    	monitor_conditions I_EventCounter player_need_loan_accepted = 1
    		if I_LocalFaction sicily
    		add_money sicily 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction england
    		add_money england 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction france
    		add_money france 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice 10000
    		inc_counter player_borrow_money 4
    		set_event_counter player_need_loan_accepted 0
    	end_if
    	end_monitor
    
    	;Player wants to borrow 5,000;
    
    	monitor_conditions I_EventCounter player_need_loan_declined = 1
    		if I_LocalFaction sicily
    		add_money sicily 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction england
    		add_money england 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction france
    		add_money france 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice 5000
    		inc_counter player_borrow_money 2
    		set_event_counter player_need_loan_declined 0
    	end_if
    	end_monitor
    
    ;################################## PLAYER WANTS TO RETIRE A LOAN #############################
    
    	;Player wants to repay;
    
    	monitor_conditions I_EventCounter player_borrow_or_repay_declined = 1
    		if I_CompareCounter player_borrow_money >= 1
    		add_events
    		event	counter	player_amount_repay_accepted
    		event	counter	player_amount_repay_declined
    	 	date	0
    	 	end_add_events
    		historic_event player_amount_repay true
    		set_event_counter player_borrow_or_repay_declined 0
    	end_if
    
    	;Player wants to repay but has no loan;
    
    		if I_CompareCounter player_borrow_money <= 0
    		historic_event no_loan_to_repay
    		set_event_counter player_borrow_or_repay_declined 0
    	end_if
    	end_monitor
    
    	;Player wants to repay 10,000;
    
    	monitor_conditions I_EventCounter player_amount_repay_accepted = 1
    		and I_CompareCounter player_borrow_money >= 4
    		if I_LocalFaction sicily
    		add_money sicily -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction england
    		add_money england -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction france
    		add_money france -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -10000
    		inc_counter player_borrow_money -4
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    	end_monitor
    
    	;Player wants to repay 10,000 but only owes 5,000;
    
    	monitor_conditions I_EventCounter player_amount_repay_accepted = 1	
    		and I_CompareCounter player_borrow_money <= 2
    		if I_LocalFaction sicily
    		add_money sicily -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction england
    		add_money england -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction france
    		add_money france -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_accepted 0
    	end_if
    	end_monitor
    
    	;Player wants to repay 5,000;
    
    	monitor_conditions I_EventCounter player_amount_repay_declined = 1
    		if I_LocalFaction sicily
    		add_money sicily -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction england
    		add_money england -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction france
    		add_money france -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -5000
    		inc_counter player_borrow_money -2
    		set_event_counter player_amount_repay_declined 0
    	end_if
    	end_monitor
    
    ;################################## PLAYER DEBT LEVEL #############################
    
    declare_counter player_debt_level
    
    	monitor_event PreFactionTurnStart FactionIsLocal
    		if I_CompareCounter player_borrow_money = 0
    		set_counter player_debt_level 0
    	end_if
    
    		if I_CompareCounter player_borrow_money >= 1
    		and I_CompareCounter player_borrow_money <= 2
    		set_counter player_debt_level 1
    		historic_event player_debt_level_1
    	end_if
    	
    		if I_CompareCounter player_borrow_money >= 3
    		and I_CompareCounter player_borrow_money <= 4
    		set_counter player_debt_level 2
    		historic_event player_debt_level_2
    	end_if
    	
    		if I_CompareCounter player_borrow_money >= 5
    		and I_CompareCounter player_borrow_money <= 6
    		set_counter player_debt_level 3
    		historic_event player_debt_level_3
    	end_if
    	
    		if I_CompareCounter player_borrow_money >= 7
    		and I_CompareCounter player_borrow_money <= 8
    		set_counter player_debt_level 4
    		historic_event player_debt_level_4
    	end_if
    
    		if I_CompareCounter player_borrow_money >= 9
    		and I_CompareCounter player_borrow_money <= 10
    		set_counter player_debt_level 5
    		historic_event player_debt_level_5
    	end_if
    	
    		if I_CompareCounter player_borrow_money >= 11
    		and I_CompareCounter player_borrow_money <= 12
    		set_counter player_debt_level 6
    		historic_event player_debt_level_6
    	end_if
    	
    		if I_CompareCounter player_borrow_money >= 13
    		and I_CompareCounter player_borrow_money <= 14
    		set_counter player_debt_level 7
    		historic_event player_debt_level_7
    	end_if
    	
    		if I_CompareCounter player_borrow_money >= 15
    		and I_CompareCounter player_borrow_money <= 16
    		set_counter player_debt_level 8
    		historic_event player_debt_level_8
    	end_if
    	
    		if I_CompareCounter player_borrow_money >= 17
    		and I_CompareCounter player_borrow_money <= 18
    		set_counter player_debt_level 9
    		historic_event player_debt_level_9
    	end_if
    
    		if I_CompareCounter player_borrow_money >= 19
    		and I_CompareCounter player_borrow_money <= 20
    		set_counter player_debt_level 10
    		historic_event player_debt_level_10
    	end_if
    
    		if I_CompareCounter player_borrow_money >= 21
    		and I_CompareCounter player_borrow_money <= 22
    		set_counter player_debt_level 11
    		historic_event player_debt_level_11
    	end_if
    
    		if I_CompareCounter player_borrow_money >= 23
    		and I_CompareCounter player_borrow_money <= 24
    		set_counter player_debt_level 12
    		historic_event player_debt_level_12
    	end_if
    
    		if I_CompareCounter player_borrow_money >= 25
    		set_counter player_debt_level 13
    		historic_event player_debt_level_13
    	end_if
    	end_monitor
    
    ;################################## PLAYER INTEREST FEE #############################
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 1
    		if I_LocalFaction sicily
    		add_money sicily -500
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -500
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -500
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -500
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -500
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -500
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -500
    	end_if
    
    		if I_LocalFaction england
    		add_money england -500
    	end_if
    
    		if I_LocalFaction france
    		add_money france -500
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -500
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -500
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -500
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 2
    		if I_LocalFaction sicily
    		add_money sicily -1000
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -1000
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -1000
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -1000
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -1000
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -1000
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -1000
    	end_if
    
    		if I_LocalFaction england
    		add_money england -1000
    	end_if
    
    		if I_LocalFaction france
    		add_money france -1000
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -1000
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -1000
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -1000
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 3
    		if I_LocalFaction sicily
    		add_money sicily -1500
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -1500
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -1500
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -1500
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -1500
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -1500
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -1500
    	end_if
    
    		if I_LocalFaction england
    		add_money england -1500
    	end_if
    
    		if I_LocalFaction france
    		add_money france -1500
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -1500
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -1500
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -1500
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 4
    		if I_LocalFaction sicily
    		add_money sicily -2000
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -2000
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -2000
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -2000
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -2000
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -2000
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -2000
    	end_if
    
    		if I_LocalFaction england
    		add_money england -2000
    	end_if
    
    		if I_LocalFaction france
    		add_money france -2000
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -2000
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -2000
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -2000
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 5
    		if I_LocalFaction sicily
    		add_money sicily -2500
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -2500
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -2500
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -2500
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -2500
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -2500
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -2500
    	end_if
    
    		if I_LocalFaction england
    		add_money england -2500
    	end_if
    
    		if I_LocalFaction france
    		add_money france -2500
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -2500
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -2500
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -2500
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 6
    		if I_LocalFaction sicily
    		add_money sicily -3000
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -3000
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -3000
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -3000
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -3000
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -3000
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -3000
    	end_if
    
    		if I_LocalFaction england
    		add_money england -3000
    	end_if
    
    		if I_LocalFaction france
    		add_money france -3000
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -3000
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -3000
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -3000
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 7
    		if I_LocalFaction sicily
    		add_money sicily -3500
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -3500
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -3500
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -3500
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -3500
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -3500
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -3500
    	end_if
    
    		if I_LocalFaction england
    		add_money england -3500
    	end_if
    
    		if I_LocalFaction france
    		add_money france -3500
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -3500
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -3500
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -3500
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 8
    		if I_LocalFaction sicily
    		add_money sicily -4000
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -4000
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -4000
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -4000
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -4000
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -4000
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -4000
    	end_if
    
    		if I_LocalFaction england
    		add_money england -4000
    	end_if
    
    		if I_LocalFaction france
    		add_money france -4000
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -4000
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -4000
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -4000
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 9
    		if I_LocalFaction sicily
    		add_money sicily -4500
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -4500
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -4500
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -4500
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -4500
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -4500
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -4500
    	end_if
    
    		if I_LocalFaction england
    		add_money england -4500
    	end_if
    
    		if I_LocalFaction france
    		add_money france -4500
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -4500
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -4500
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -4500
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 10
    		if I_LocalFaction sicily
    		add_money sicily -5000
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -5000
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -5000
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -5000
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -5000
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -5000
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -5000
    	end_if
    
    		if I_LocalFaction england
    		add_money england -5000
    	end_if
    
    		if I_LocalFaction france
    		add_money france -5000
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -5000
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -5000
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -5000
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 11
    		if I_LocalFaction sicily
    		add_money sicily -5500
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -5500
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -5500
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -5500
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -5500
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -5500
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -5500
    	end_if
    
    		if I_LocalFaction england
    		add_money england -5500
    	end_if
    
    		if I_LocalFaction france
    		add_money france -5500
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -5500
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -5500
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -5500
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 12
    		if I_LocalFaction sicily
    		add_money sicily -6000
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -6000
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -6000
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -6000
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -6000
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -6000
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -6000
    	end_if
    
    		if I_LocalFaction england
    		add_money england -6000
    	end_if
    
    		if I_LocalFaction france
    		add_money france -6000
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -6000
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -6000
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -6000
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal 
    		and I_CompareCounter player_debt_level = 13
    		if I_LocalFaction sicily
    		add_money sicily -6500
    	end_if
    
    		if I_LocalFaction milan
    		add_money milan -6500
    	end_if
    
    		if I_LocalFaction scotland
    		add_money scotland -6500
    	end_if
    
    		if I_LocalFaction moors
    		add_money moors -6500
    	end_if
    
    		if I_LocalFaction turks
    		add_money turks -6500
    	end_if
    
    		if I_LocalFaction egypt
    		add_money egypt -6500
    	end_if
    
    		if I_LocalFaction mongols
    		add_money mongols -6500
    	end_if
    
    		if I_LocalFaction england
    		add_money england -6500
    	end_if
    
    		if I_LocalFaction france
    		add_money france -6500
    	end_if
    
    		if I_LocalFaction hre
    		add_money hre -6500
    	end_if
    
    		if I_LocalFaction spain
    		add_money spain -6500
    	end_if
    
    		if I_LocalFaction venice
    		add_money venice -6500
    	end_if
    	end_monitor

    historic_events:
    Spoiler Alert, click show to read: 
    Code:
    {ASK_PLAYER_BORROW_OR_REPAY_BODY}My Lord, do you wish to send for a banker?\n\nThe interest rate is 10% a turn. If you raise a loan and repay it on the same turn no interest is charged. If you have borrowed more than 60,000 florins, you will not be allowed to borrow any more.\n\nAccept: Send for a Banker.\n\nDecline: Do not Send for a Banker.
    {ASK_PLAYER_BORROW_OR_REPAY_TITLE}Send for a Banker?
    
    {PLAYER_BORROW_OR_REPAY_BODY}My Lord, do you wish to raise a loan or make a repayment on an existing loan?\n\nAccept: Raise a Loan.\n\nDecline: Make a Repayment.
    {PLAYER_BORROW_OR_REPAY_TITLE}Borrow or Repay?
    
    {PLAYER_NEED_LOAN_BODY}My Lord, Do you wish to borrow 10,000 or 5,000 florins?\n\nAccept: Borrow 10,000 florins.\n\nDecline: Borrow 5,000 florins.
    {PLAYER_NEED_LOAN_TITLE}Size of Loan
    
    {PLAYER_AMOUNT_REPAY_BODY}My Lord, Do you wish to make a repayment of 10,000 or 5,000 florins?\n\nAccept: Repay 10,000 florins.\n\nDecline: Repay 5,000 florins.
    {PLAYER_AMOUNT_REPAY_TITLE}Size of Loan Repayment
    
    {FAILED_TO_RAISE_A_LOAN_BODY}My Lord, attempts to raise a loan have failed, because you have borrowed more than 60,000 florins.
    {FAILED_TO_RAISE_A_LOAN_TITLE}Failed to Raise a Loan
    
    {NO_LOAN_TO_REPAY_BODY}My Lord, you have no loan to repay.
    {NO_LOAN_TO_REPAY_TITLE}No Loan to Repay
    
    {PLAYER_DEBT_LEVEL_1_BODY}My Lord, the interest on your loan has cost your Treasury 500 florins.	
    {PLAYER_DEBT_LEVEL_1_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_2_BODY}My Lord, the interest on your loan has cost your Treasury 1,000 florins.
    {PLAYER_DEBT_LEVEL_2_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_3_BODY}My Lord, the interest on your loan has cost your Treasury 1,500 florins.
    {PLAYER_DEBT_LEVEL_3_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_4_BODY}My Lord, the interest on your loan has cost your Treasury 2,000 florins.
    {PLAYER_DEBT_LEVEL_4_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_5_BODY}My Lord, the interest on your loan has cost your Treasury 2,500 florins.
    {PLAYER_DEBT_LEVEL_5_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_6_BODY}My Lord, the interest on your loan has cost your Treasury 3,000 florins.
    {PLAYER_DEBT_LEVEL_6_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_7_BODY}My Lord, the interest on your loan has cost your Treasury 3,500 florins.
    {PLAYER_DEBT_LEVEL_7_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_8_BODY}My Lord, the interest on your loan has cost your Treasury 4,000 florins.
    {PLAYER_DEBT_LEVEL_8_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_9_BODY}My Lord, the interest on your loan has cost your Treasury 4,500 florins.
    {PLAYER_DEBT_LEVEL_9_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_10_BODY}My Lord, the interest on your loan has cost your Treasury 5,000 florins.
    {PLAYER_DEBT_LEVEL_10_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_11_BODY}My Lord, the interest on your loan has cost your Treasury 5,500 florins.
    {PLAYER_DEBT_LEVEL_11_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_12_BODY}My Lord, the interest on your loan has cost your Treasury 6,000 florins.
    {PLAYER_DEBT_LEVEL_12_TITLE}The Expense of Borrowing
    
    {PLAYER_DEBT_LEVEL_13_BODY}My Lord, the interest on your loan has cost your Treasury 6,500 florins.
    {PLAYER_DEBT_LEVEL_13_TITLE}The Expense of Borrowing
  13. Tsarsies
    Tsarsies
    @Keyser Soze
    Thats kinda the idea behind the strategic resources, they will be placed in areas where one faction will have the advantage. e.g Longbows will be available in wales. Knights and cavalry mainly in the south (I have not decided on faction starting locations but the Norman factions will start in the south, with Saxons in the north, more or less.), Catapults will be evenly spread around the map.

    Absinthia and i also talked about additional units becoming available after a series of events were completed. Those events would differ for each unit. If you hold enough local tournaments then a knight unit can be trained, hold enough archery tournaments and better bow unit is available, raid enough castles and better melee etc. These would be a lot better then the already available units (like Archers compared to sherwood archers). Once trained then u would have to complete the series of events again to gain access to another. This limits the high quality units availability.

    We could still give each faction a unique unit as u suggest. OR even just a unique unit for Normans and one for Saxons. (Cavalry and Bow)

    @TNZ
    Thats a great script which i think would work great. If u dont mind i would like to edit it a little to have it work around Isaac and him roving from settlement to settlement.
  14. TNZ
    TNZ
    @TNZ
    Thats a great script which i think would work great. If u dont mind i would like to edit it a little to have it work around Isaac and him roving from settlement to settlement.
    Edit away.
  15. TNZ
    TNZ
    Tsarsies: I think your approach to the castle raiding script should work quite well. The only other idea I have is to have a building in each of the settlement that would represent a settlement wealth level (poor, prosperous, wealthy). The higher the settlement wealth, the greater the random chance of getting a big sum of money.
  16. Keyser Soze
    Keyser Soze
    Tsarsies, could you a little show me your idea that only if Major region and its Minor region is held you can have all trade acces? I mean how you can code it in EDB.

    I work on my own mod for RTW/BI and I think to add there vassalage system. so also your vassalage idea is interesting me a lot. therefore your help will be great.
  17. Tsarsies
    Tsarsies
    Its a script i have not completley thought out, but the limited regions will make it possible as i know the script will be quite lengthy. Each major settlement (about 40) will have a script that checks to see if it is owned by a specific faction, inside the same monitor will be if statements for each of the minor settlements. If they are also owned by the same faction as the major region then a special event counter will be increased. This counter will be reset to 0 at turn end and the monitors will be read each prefaction turn start.
    - there will be a unique counter for each faction for each settlement along that will also set an event counter which is used universally (one for each bonus in the EDB). 40 major settlements and 7 factions = 280 counters + an event counter for each bonus (happiness, law, trade, tax etc).
    - These event counters will then be read by the EDB. As an example, lets say London has 3 minor regions, but only 2 of them are owned. That will increase the counter to 2 and set the associated event counter to 1. In the EDB where u have the capabilities for a building you can have things like happiness, law, tradebonus etc. These will be set depending on the number of minor regions (some major regions will only have 1 minor and others none, only a few will have multiples).

    Basically, all the script will do is increase the bonus given by trade, happiness, law or whatever. This can be set in every single building and will not drag the end turn itself. Depending on how the script plays, it may be possible to have it only affect the player.

    The script will be versatile at the same time and allow other scripts/ideas to play off of it. Including Events. If a specific minor region was not held a script can simply check to see if event counter = 0 (or 1) and an event could be triggered.
    As an example, you hold london, but not the tower of london, we can use that to spawn a rebel force loyal to prince john every 25 turns or until the tower has been taken ... or whatever...
    Another example would be if the minor region (region C) is between major regions A and B, and both major regions are owned by the same faction, and major region B has access to catapults. We run a script that checks to see if event counter = 0 and then settlement A is unable to construct catapults as access has been cut off.

    This system will then be like webbed trade networks. All your settlements will need to be linked through these minor regions, at any point in the network web that u dont hold a minor region then that major region, along with any other major regions bordering it will lose access to any supplies that would otherwise come through that minor region.

    With proper play testing it will become a very detailed trade network that has player involvment down to the finest detail. It will take some time to properly place the strategic resources in positions that will make the most of this trade network idea.

    The down side to this idea is that only small mods can take advantage of it. The larger ones will just be turn lag from hell... Take Stainless Steel, 31 factions times 199 regions is a crap load of monitors just to get the event counters set up EVERY turn...

    I am not sure how many minor regions we have yet to add for the map to be at a stage to begin testing some of these ideas... As far as i know a few more need to be placed.
  18. Keyser Soze
    Keyser Soze
    thanks. sounds interesting. and as huge work of codding...
  19. Tsarsies
    Tsarsies
    Updated 1st and 2nd posts.
  20. Tsarsies
    Tsarsies
    When i first started putting together the Trade and Supply mod i did quite a bit of research into medieval guilds. All that research is on my other computer which i still have not had sent to me. But below is a general idea of how i wish to bring guilds to life with the Trade and Supply script...

    First, the basic idea behind the Trade and Supply script is that each faction would stockpile a number of resources (food, stone, wood, tools, weapons, ale etc). These resources would be shown on the map just like resources in vanilla (not to be confused with Strategic resources which are primarily to restrict recruitment). Holding a region with wood resource would increase your wood production for example and that region would also have access to a woodcutters hut to boost the production (Stonemason for stone, Mill or Baker for grain etc). Any building or unit (e.g archer) that requires wood requires this resource and your stockpile of it must be sufficient before the building/unit becomes available.

    That is the basic idea. But it delves a lot deeper than that. Depending on the final list of resources we wish to use (textiles, tools, luxury goods etc...) The benefits a building provides can be increased/decreased. If you lack Ale then your Inn will not provide the happiness it would if it was fully stocked. Churches require candles, books etc. The stockpiles are faction wide but produced from settlement to settlement. Some regions may cost more than they produce (like a newly controlled and undeveloped castle) and other regions will become your major resource gathering places. All in all, it creates strategic and tactical game-play elements.

    Of course the AI won't know how to organize itself half as well as a human player, it wont know that holding Cornwall will increase its stock of stone. But that is fine, cause it already doesn't know what its doing anyway in regard to anything (it doesn't know that constructing a stable will grant access to a knights stable which in turn grants access to better cavalry then say, hobilars), it is just like any other AI file where the AI is granted bonuses. Scripts will be put in place to ensure the AI can take and hold such resources. I anticipate the AI handling this new system just as well as it handles pre-set engine systems (like merchant trade).

    In addition to all this your trade agreements and alliances become much more important. The buildings below will be affected by your trade agreements.

    Trade Goods Guild -This is a regular building and not treated like a guild as per vanilla guilds. It is construct-able in any of your settlements (including castles). It is only available once you have set up a trade agreement. 1 agreement will allow you to construct 1 of these buildings faction-wide. 2 trade agreements will allow you to construct 2 of these faction-wide. 1 Alliance will grant 3 buildings faction-wide (so with the trade agreement, that would allow 4 buildings). Once constructed it will boost trade and increase your income. The settlement with this building will start to accumulate Trade Points (scripted in the campaign_script). Once you reach a certain value of Trade Points you will then be offered the 2nd tier of the building (improved goods building). And then continue to accumulate points for the following tiers. The additional tiers will grant you access to increased resource production (you might not have any stone, so setting up a trade agreement with a faction who does and constructing this building will then grant you access to stone production). I do not know how many tiers this building will have, at least 3. And it will affect every trade agreement. So one building will gain the bonuses granted by multiple agreements. This building will also grant your faction access to the 3 guilds listed below.

    Merchant Gild - This is the vanilla merchant guild. But will primarily be your economic guild granting resource bonuses and trade income. Better merchants etc. As it is a guild, you can only have one per settlement, 1 master guild per faction and 1 grandmaster guild between all factions. You will not be offered this until you have a Trade Goods Guild constructed in the settlement. So here you are limited as to where you can be offered this guild based on where you have constructed the Trade Goods Guild which is determined by your trade agreements and alliances. You can not have this guild and the 2 guilds below in the one settlement.

    Trade Gild - This will be primarily your strategic guild. This will boost your strategic recruitment options. Allowing recruitment of other factions units whether you hold the required economic or strategic resources. this is also a guild and will act as per the Merchant Gild.

    Guildhall - This will work as both a Trade Gild and Merchant Gild and do exactly what the above 2 guilds do except in the one settlement. You will only be offered this once you have built a Master Merchant or Master Trade Gild. You can only have one of these per faction.

    As you can probably tell, it will be quite detailed and offer many benefits. But may cause some headaches as you will be limited as to where to construct them. You will have to decide where you would require the building to make the most benefit. Where ever you construct the Trade Goods Guild is where the other 3 will be offered. to be offered the Guildhall you will require at minimum of 1 alliance or 3 trade agreements as well as 3 city settlements just to have the required settlements to support the infrastructure for a Guildhall... and if you happen to construct a Trade Goods Guild in a castle settlement you will require an additional trade agreement to ensure you have one built in a city settlement.

    Other Vanilla guilds i may yet use to the same (similar?) affect as above are as follows:
    masons_guild - Decreased Construction Costs and provides building tools as a resource.
    theologians_guild - ???
    explorers_guild - ???
    swordsmiths_guild - For Strategic resource 'sword'. Will grant the Sword resource faction wide whether you control the resource or not.
    horse_breeders_guild - as per mason guild but for horses and grant cavalry experience.

    The other guilds i plan to use, but will not be included in the above.
    templars_chapter_house - This guild will be pre-constructed in a Norman Settlement.
    woodsmens_guild - Offered after ALL 3 aids from Robin have been used. Increases Archer exp when trained in this settlement. the player can never recruit Sherwood Archers, only via requesting Robins Aid. Sherwood Archers will be available to Robin Hood when he is spawned as a general in King Richards faction.
Results 1 to 20 of 20