Results 1 to 24 of 24

Thread: Influence Development topic

  1. #1
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Influence Development topic

    This topic is about our possibly most innovative and important feature, the influence system.

    I'd like to encourage you to read the Influence preview that was created earlier for some additional information.
    Here's what it's about anyways:

    One of our main aims is to design the mod in a way that makes the AI actually competitive. That is, the gameplay we want is not a challenge to survive (as usual when you increase the difficulty setting) but a challenge to win!
    The main problem with this is that in vanilla or any mods you can see right now, the AI is simply not up to the task of expanding to anywhere near a level where it could win the game; in fact a lot of the time it doesn't even seem to be aware of its victory conditions.
    Our solution to this problem was partly inspired by MTW's system of using so-called glorious achievements to determine the game winner. This in itself still won't make the AI try to win but I believe if we milk the system properly we'll be able to get to a state where it actually is strong enough to win (at least sometimes).

    After the short motivational passage, let me describe what we have at the moment. I devised (and am in the process of devising) a point system called Influence; Influence points are gained and lost through certain game events.
    Basically, anything I can trigger on is possible, but for the simplest system we want to award the player (or the AI) for owning certain key provinces for his faction. These points will flow in continuously and increase your realm's influence rating.
    Other examples include having allies, getting royal marriages with other factions (which will also boost your faction standing), building certain structures, winning battles or simply buying them with gold (after all you can bribe a lot of people; I'm not yet sure about how to implement this though).
    In addition to being responsible for who wins the game, influence points play another role as a kind of currency. Some of the more advanced buildings will cost Influence as well as recruiting a larger army through the levy script. In general, you will either sacrifice it for either a short-term or a long-term advantage and in both cases you should only do it if you think that it'll pay in the end by returning some revenue on your investment.

    As of yet I'm not quite sure whether it makes more sense to have a set upper threshold for Influence (and if one faction reaches that it'll win) or if we should let players play through the whole campaign and count points in the end. The second option is probably more difficult to implement but either of these fosters a certain set of different strategies (with the first you'll just try to race to the line, the second will make long-term investments more calculable).

    The second point why we chose to use this system instead of the traditional victory conditions is that we want to allow factions to win without even having to wage an aggressive campaign. You can win through diplomacy, trade and wit instead of just stupidly bashing your opponent over the head.

    So how can you help with this? Easy: Suggest possible conditions for awarding Influence points (either faction-specific or general), or suggest possible things that you could spend influence on.
    Help with the implementation is always welcome, too.

    -----------------------------------------------------------------------------------------------------------------------

    Ok since I somehow can't properly work on traits (don't ask me, they just annoy me after looking at the traits file for some minutes, maybe I need a break :P) I decided to do a bit more work on Influence.

    I'll write some detailed lists of how much influence certain things give, let's call it a documentation. It's mainly a list for reference to see what has already been implemented. I'll add ideas later


    Generic Influence

    These conditions are valid for all factions.

    Name: Alliances
    Description: This gives a few points for each ally you have
    Conditions: Be allied to a faction at turn start
    Points: 0.05 per ally
    Frequency: once per turn
    Implemented: all

    Name: Sign alliance
    Description: Gives you points for signing an alliance
    Conditions: Sign an alliance with another faction
    Points: 0.33
    Frequency: once per alliance agreement
    Implemented: all

    Name: Marriages
    Description: Similar to alliances, rewards the player for having marriages
    Conditions: Have a marriage alliance with a faction
    Points: 0.1 per marriage
    Frequency: once per turn
    Implemented: all (except muslim)

    Name: Sign marriage agreement
    Description: Gives you points for an inter-faction marriage
    Conditions: Marry one member of your family to the ruling dynasty of another faction
    Points: 1
    Frequency: once per marriage
    Implemented: all (except muslim)

    Name: Settlement reward (low control)
    Description: Gives a few points for controlling settlements
    Conditions: Control a settlement with a low control level
    Points: 0.02 per settlement
    Frequency: once per turn
    Implemented: all

    Name: Settlement reward (high control)
    Description: Gives a few points for controlling settlements
    Conditions: Control a settlement with a high control level
    Points: 0.06 per settlement
    Frequency: once per turn
    Implemented: all

    Name: Battle victory
    Description: Rewards you for winning battles
    Conditions: Win a battle with at least 300 men on each side
    Points: 0.3
    Frequency: once per battle
    Implemented: all

    Name: Battle defeat
    Description: Punishes the player for losing a battle
    Conditions: Be local faction and lose a battle with at least 300 men on each side
    Points: -0.15
    Frequency: once per battle
    Implemented: all

    Name: Conquest
    Description: Rewards you for taking a settlement (applies to being gifted or sold one)
    Conditions: Take a settlement
    Points: 1
    Frequency: once per conquest
    Implemented: all

    Name: Settlement lost
    Description: Punishes you for losing a settlement (applies to settlements being gifted)
    Conditions: Lose a settlement
    Points: -1
    Frequency: once per loss
    Implemented: all

    Name: Core settlements
    Description: Rewards you for controlling certain core settlements. This will probably change over time
    Conditions: Control a certain settlement
    Points: Varies (used for balancing smaller factions)
    Frequency: once per turn
    Implemented: Pisa (to some extent)
    Last edited by alpaca; 09-30-2007 at 20:52.

  2. #2
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Influence Development topic

    Updated first post with a bit of info.

  3. #3
    EB annoying hornet Member bovi's Avatar
    Join Date
    Jan 2007
    Location
    Norway
    Posts
    11,792

    Default Re: Influence Development topic

    How about a per-turn decay of influence, based on empire size, in the order of 0.01 per turn for a tiny faction and 1 for one dominating the world with over 50 settlements (effectively cancelling out the per-turn region gain)? It would balance out the inherent advantage of factions that start out big, and make them have to keep being crafty in diplomacy and war, while a tiny faction needs less activity to keep up. My thought is no faction should be able to stagnate/rest on its laurels and still harvest nearly as much as a smaller faction making headway.

    Also, riots and revolts could reduce influence more than losing a settlement to war, as it would be seen as particular weakness to not be able to control one's own populace.

    I'm influenced by EU3's prestige here . I'm not sure if it suits your vision though.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  4. #4
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Influence Development topic

    Quote Originally Posted by bovi
    How about a per-turn decay of influence, based on empire size, in the order of 0.01 per turn for a tiny faction and 1 for one dominating the world with over 50 settlements (effectively cancelling out the per-turn region gain)? It would balance out the inherent advantage of factions that start out big, and make them have to keep being crafty in diplomacy and war, while a tiny faction needs less activity to keep up. My thought is no faction should be able to stagnate/rest on its laurels and still harvest nearly as much as a smaller faction making headway.

    Also, riots and revolts could reduce influence more than losing a settlement to war, as it would be seen as particular weakness to not be able to control one's own populace.

    I'm influenced by EU3's prestige here . I'm not sure if it suits your vision though.
    The problem is that I do want to reward the player for having a big empire. It just shouldn't be the only way to win.
    I agree that factions which are large from the start (in our case maybe the two empires) have to be counter-balanced though, so maybe I should somehow balance the influence gain between what you start with and what you gained during the game.
    I could for example code something like only half the Influence gain for settlements you controlled from the start (removing the bonus altogether would underhand large factions and be over-compensation in my opinion). Actually I think that might be what you meant in the first place.
    Another way to balance them is to give smaller factions more Influence for certain things, such as gaining settlements or for their core regions.

  5. #5
    EB annoying hornet Member bovi's Avatar
    Join Date
    Jan 2007
    Location
    Norway
    Posts
    11,792

    Default Re: Influence Development topic

    I could for example code something like only half the Influence gain for settlements you controlled from the start (removing the bonus altogether would underhand large factions and be over-compensation in my opinion). Actually I think that might be what you meant in the first place.
    A more detailed but still not exact explanation: My thought was to have a monitor on faction turn start, reducing influence. Sample figures are fuzzy due to the authority limiting the control, but they could be
    *if the empire have 5 or less settlements, it decays by 0.01 (leaving 0.05-0.29 of the settlement bonus)
    *if the empire have 5 < settlements < 15, it decays by 0.1 (leaving roughly 0.2-0.6 of the settlement bonus)
    ...
    *if the empire have more than 50 settlements, it decays by 1 (leaving roughly 0.2-0.4 of the settlement bonus, plus 0.02 per settlement above 50)

    So it complements the settlement bonus, really, and leaves the profound effect the authority has through firmer control over more settlements. Without any form of check, the big empire would gain as much just sitting still as a smaller one which gains a settlement and wins a major battle too. I would think the latter would get the more publicity in that time . But your other suggestions would make sense as well. Just a suggestion, and would of course require tweaking of the values .
    Last edited by bovi; 10-07-2007 at 19:47.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  6. #6
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Influence Development topic

    Quote Originally Posted by bovi
    A more detailed but still not exact explanation: My thought was to have a monitor on faction turn start, reducing influence. Sample figures are fuzzy due to the authority limiting the control, but they could be
    *if the empire have 5 or less settlements, it decays by 0.01 (leaving 0.05-0.29 of the settlement bonus)
    *if the empire have 5 < settlements < 15, it decays by 0.1 (leaving roughly 0.2-0.6 of the settlement bonus)
    ...
    *if the empire have more than 50 settlements, it decays by 1 (leaving roughly 0.2-0.4 of the settlement bonus, plus 0.02 per settlement above 50)

    So it complements the settlement bonus, really, and leaves the profound effect the authority has through firmer control over more settlements. Without any form of check, the big empire would gain as much just sitting still as a smaller one which gains a settlement and wins a major battle too. I would think the latter would get the more publicity in that time . But your other suggestions would make sense as well. Just a suggestion, and would of course require tweaking of the values .
    What would this actually have to do with authority? Do you mean that for the decay only cities with a low LOC (level of control) should be considered?

  7. #7
    EB annoying hornet Member bovi's Avatar
    Join Date
    Jan 2007
    Location
    Norway
    Posts
    11,792

    Default Re: Influence Development topic

    High authority => more cities with high control => more influence gain from settlements. I can't remember the amount of cities controlled. Or have I misunderstood the authority/control system? It's some time since I read it.

    For instance, a low authority would mean a 50 settlement giant would have few with high control and gain few 0.06s, let's say 3 as an arbitrary number, but mostly 0.02s, giving in total 0.18+0.94=1.12. This way, a reduction of 1 each turn would leave only 0.12. The same empire with 70 settlements would gain 0.02*20 more, leaving 0.52.

    A high authority means more settlements are under high control, lets say 10 as an arbitrary number. That means 0.6+0.8=1.4 for the 50 settlement giant, leaving 0.4. The same with 70 would gain a net of 0.8.

    To clarify, the decay I suggest is a per-turn reduction, not a per-settlement function, but it would take into account the total number of settlements the faction possesses in order to even out the playing field. Again, the values are pulled from the sky and should be tweaked.
    Last edited by bovi; 10-11-2007 at 08:49.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  8. #8
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Influence Development topic

    Quote Originally Posted by bovi
    High authority => more cities with high control => more influence gain from settlements. I can't remember the amount of cities controlled. Or have I misunderstood the authority/control system? It's some time since I read it.

    For instance, a low authority would mean a 50 settlement giant would have few with high control and gain few 0.06s, let's say 3 as an arbitrary number, but mostly 0.02s, giving in total 0.18+0.94=1.12. This way, a reduction of 1 each turn would leave only 0.12. The same empire with 70 settlements would gain 0.02*20 more, leaving 0.32.

    A high authority means more settlements are under high control, lets say 10 as an arbitrary number. That means 0.6+0.8=1.4 for the 50 settlement giant, leaving 0.4. The same with 70 would gain a net of 0.6.

    To clarify, the decay I suggest is a per-turn reduction, not a per-settlement function, but it would take into account the total number of settlements the faction possesses in order to even out the playing field. Again, the values are pulled from the sky and should be tweaked.
    Yes of course, the above post fell under the category "posting while tired" I'm afraid

    I'm not quite sure which way I want to go here, both your and my suggestion sound good so I think I'll test them both once I am actually able to test things in a running campaign

  9. #9

    Default Re: Influence Development topic

    You obviously thought this system out very well, so if any of my ideas have crossed your mind then ignore them, (unless they spark a different interest ofcourse :)

    1. Major battle victory, winning a battle where you were outnumbered. or just base the points on the victory/defeat type. clear victory, draw, crushing defeat etc...

    2. Not gaining ANY points for using the 'auto-resolve' button. or losing points for using that button.

    3. I presume your faction leader would (should) have an effect on gaining/losing influence points. therefore the death of your faction leader could be a good thing or a bad thing. a faction leader who was poor in gaining such points could be seen as good that he finally died because now his heir can reforge the name of the empire...

    4. A trait that could be gained (either through gameplay or inherited) that effects the influence gained from such actions. good or bad.

    5. Building certain buildings. im sure this crossed your mind already. i was thinking more along the lines of building the last building in the queue (grand cathedral or what have you), gaining a new technological standard.

    6. I presume this system would not be biased towards any single type of strategy. meaning if i wanted to be a tyrant leader i could still gain points via exterminating populace as to looting and such. or by assination. i personally love using my assassins to thin the family tree of my rivals, especially after i marry off my princess into there ranks. So i hope this influece system allows for both evil strategies and chivalrous strategies.


    As for the Spending of influence points, although not exactly historically possible, gameplay wise im sure the following would be cool. as for the cost of the following, some would have to be rather high. Ofourse, i realise not all these may be possible due to hard coded limitations.

    1. gain a level for a character (assasins/spies subtefurge, priests piety, generals piety/loyalty, merchants trade skill etc)

    2. Hurry the building queue/training queue

    3. Show an area of map

    4. Immobolise a rivals character/army for 1 turn.

    5. Refresh the movement points for a character/army.
    "Crom, I have never prayed to you before. I have no tongue for it. No one, not even you, will remember if we were good men or bad. Why we fought, and why we died. All that matters is that today, two stood against many. Valor pleases you, so grant me this one request. Grant me revenge!
    And if you do not listen, the HELL with you
    !"

    Conan, "Conan The Barbarian"

  10. #10
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Influence Development topic

    Quote Originally Posted by Tsarsies
    You obviously thought this system out very well, so if any of my ideas have crossed your mind then ignore them, (unless they spark a different interest ofcourse :)

    1. Major battle victory, winning a battle where you were outnumbered. or just base the points on the victory/defeat type. clear victory, draw, crushing defeat etc...

    2. Not gaining ANY points for using the 'auto-resolve' button. or losing points for using that button.

    3. I presume your faction leader would (should) have an effect on gaining/losing influence points. therefore the death of your faction leader could be a good thing or a bad thing. a faction leader who was poor in gaining such points could be seen as good that he finally died because now his heir can reforge the name of the empire...

    4. A trait that could be gained (either through gameplay or inherited) that effects the influence gained from such actions. good or bad.

    5. Building certain buildings. im sure this crossed your mind already. i was thinking more along the lines of building the last building in the queue (grand cathedral or what have you), gaining a new technological standard.

    6. I presume this system would not be biased towards any single type of strategy. meaning if i wanted to be a tyrant leader i could still gain points via exterminating populace as to looting and such. or by assination. i personally love using my assassins to thin the family tree of my rivals, especially after i marry off my princess into there ranks. So i hope this influece system allows for both evil strategies and chivalrous strategies.


    As for the Spending of influence points, although not exactly historically possible, gameplay wise im sure the following would be cool. as for the cost of the following, some would have to be rather high. Ofourse, i realise not all these may be possible due to hard coded limitations.

    1. gain a level for a character (assasins/spies subtefurge, priests piety, generals piety/loyalty, merchants trade skill etc)

    2. Hurry the building queue/training queue

    3. Show an area of map

    4. Immobolise a rivals character/army for 1 turn.

    5. Refresh the movement points for a character/army.
    Some good and some not so good suggestions here, let's see:

    1., 3., 5., yeah, I planned to do all of that to some extent. Bovi suggested to indirectly link Influence to Authority via the control levels and I think that might work.

    2. Not quite sure about that. It looks nice on paper but too exploitable. It will force the player to play battles he will probably win anyways (because otherwise he won't gain Influence) and be exploited to auto-resolve battles he will lose anyways (because he won't lose influence). I know it's annoying to lose a battle to the bugged auto-resolve mechanisms but I think I'd rather have that than the above two problems.

    4. I'm not quite sure what you mean there? A kind of amplifier trait for good/bad actions?

    6. Yes definitely. The main aim is to allow a even very chivalrous and defensive players to win the game instead of having to go on a carnage through all of Italy. The points you get for settlements can still be major for large factions though, so conquering the peninsula is probably a way to win.
    I'm also thinking about leaving in a number of settlements requirement as an additional victory condition, but it'd be pretty high (about the same as in vanilla M2TW probably). Think of it like in Civ: You can win through diplomacy, conquest, culture or science. Such a system is probably a sure winner for gameplay and suits a lot of different playing styles.

    I don't like the idea to level up an agent, but I could see the option to recruit a better agent instead by dishing out some influence. Hurrying the building queue or force-marching an army are nice ideas but would probably be tied to conditions (for example I'd do it for rural settlements and it'd represent forced labor/serfdom and therefore be tied to some unhappiness penalty). For armies I'll probably try to implement some support system like in Byg's Grim Reality and force-marching would then cost more food, etc.

    Revealing parts of the map is something I won't do, it just feels too arcade. Immobilizing an army could make sense but would also require some bribery in addition to the Influence cost (and I'm also not sure about a good interface).

  11. #11

    Default Re: Influence Development topic

    A Sid Meier's Civilization idea I always thought would be prominent in a TW environment. If these influence points are included you could use them to create levels of unrest for neighboring settlements. Of course this would take remarkable numbers of influence but influential states would definitely cause civil unrest to those it neighbored. This could possible make bribe costs lowered for border states as well. And this could also be comparative so you would have to have accumulated a vast superior number of influence compared to the other state. I'm not sure on your exact #s but yeah.
    I'm Batman!

  12. #12
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Influence Development topic

    Quote Originally Posted by skuzzy
    A Sid Meier's Civilization idea I always thought would be prominent in a TW environment. If these influence points are included you could use them to create levels of unrest for neighboring settlements. Of course this would take remarkable numbers of influence but influential states would definitely cause civil unrest to those it neighbored. This could possible make bribe costs lowered for border states as well. And this could also be comparative so you would have to have accumulated a vast superior number of influence compared to the other state. I'm not sure on your exact #s but yeah.
    Very nice ideas, but unfortunately I don't think a lot of what you'd like to see here is possible because of the game's restrictions. Interpreting influence a bit like the culture in Civ is a cool idea though, we could have buildings like theaters or operas later on that pump out large amounts of influence each turn.
    Regional stuff is very hard to implement in M2TW so I don't think introducing unrest in neighboring settlements would work. We could maybe have an influence on character traits: "admiring the enemy, eh?"

    Keep the suggestions coming. The system isn't very far-fledged so far, so anything can still happen if it's implementable.

  13. #13

    Default Re: Influence Development topic

    I notice you can create resources like in the previous topic. Is there anyway to make an invisible resource layer on the map that is paired with conditional statements with a global influence variable suggested here? So there would be a resource for each civilization that would store what other civilizations it bordered. If a resource only hold a variable like AMOUNT= then you could use binary or hex flags to interpret each civilization that the state you want is bordering. That way you could parse and monitor that on a per turn basis. I know I'm throwing this out here but if I actually learned the scripting language I would be far less inventive, one of my most discerning problems with programming. You could also couple this with an invisible building maybe that has like +10% corruption, etc... that is built and destroyed per turn without player's knowledge according to the resource. One problem already thought of if a merchant randomly wanders onto this invisible resource and starts making 101101101011 gold per turn :)
    I'm Batman!

  14. #14
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Influence Development topic

    Whoa if you throw out wild ideas please take a bit more time to explain what you mean. I don't have the time to decipher cryptic posts

  15. #15

    Default Re: Influence Development topic

    Put me in the right direction to the files that hold resources, buildings, and tell me what you were going to use to store the influence variable on the game engine and then I will try to come up with a less abstract idea. But for now I have class!
    I'm Batman!

  16. #16
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Influence Development topic

    Quote Originally Posted by skuzzy
    Put me in the right direction to the files that hold resources, buildings, and tell me what you were going to use to store the influence variable on the game engine and then I will try to come up with a less abstract idea. But for now I have class!
    First of all, resources are static during the game. They can't be changed later on. We can't destroy buildings, either.

    The files are export_descr_buildings.txt, descr_sm_resources.txt, world/maps/base/descr_regions.txt (to assign the hidden resources), world/maps/campaign/imperial_campaign/descr_strat.txt (to assign normal resources) and campaign_script.txt in the same folder.
    I'm using campaign_script counters to store the influence value for each faction.

  17. #17

    Default Re: Influence Development topic

    I've come up with an idea that may or may not be feasible. How much latency do you think would be created by every turn running tons of nested if statements using I_SettlementOwner. So basically you start from a central settlement and run a radial test spawning from that one settlement to all the adjacent settlements and testing the owner of that settlement until you run to the end of the map in each direction. Use a counter to store flags for each faction and make increment adjustments every turn to change the flags. It is possible but the only thing I fear is huge amounts of lag from like 1000'sconditional statements running every turn. Also on khevlan's packet monitoring there was a destroy_building command called by the executable, does that not work as create_building? I won't progress farther if it's not plausible to use that many if statements as I saw no other identifier that would work except maybe using SettlementIsLocal and only monitor the borders for the player's faction and decrease the conditional statements by the amount of factions disqualified from the feature. This of course is only for checking border states of destroy_building command does not work like you stated earlier I would still have to find a way to add corruption to the border settlements directly.
    Last edited by skuzzy; 10-24-2007 at 21:59.
    I'm Batman!

  18. #18
    EB annoying hornet Member bovi's Avatar
    Join Date
    Jan 2007
    Location
    Norway
    Posts
    11,792

    Default Re: Influence Development topic

    Umm... Perhaps it's doable, I get confused by what you're saying. What do you want to accomplish by it? Have the culture of settlements affected by their neighbours? You may want to present your ideas in a somewhat more structured way so people can understand what you mean.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  19. #19

    Default Re: Influence Development topic

    Code:
    ; Notes:
    ; FactionsThatBordersPlayer = 000 (100 = Byzantine, 010 = Pisa, 001 = Sicily) (alphabetical) doesn't work without the ability to multiply/divide/mod
    ; if multiple territories border territory in check
    ;
    ; SettlementBuildingExists, create_building, and destroy_building(?)
    ;
    ; SettlementIsLocal to minimize conditions to only human player's faction?
    ;
    ; a building may be built and destroyed several times a turn depending on how many borders
    
    script
    
    declare_counter PisaInfluence
    declare_counter ByzantineInfluence
    declare_counter SicilyInfluence
    
    set_counter PisaInfluence 100
    set_counter ByzantineInfluence 10000
    set_counter SicilyInfluence 1000
    
    declare_counter PisaBordersSicily
    set_counter PisaBordersSicily 0
    declare_counter ByzantineBordersSicily
    set_counter ByzantineBordersSicily 0
    
    select_settlement Messina
    if I_SettlementOwner Messina = Sicily ;or if SettlementIsLocal if you just want to use player faction
    	if I_CompareCounter ByzantineBordersSicily = 0
    	and SettlementBuildingExists = border_corrupter
    		console_command destroy_building Messina border_corrupter
    	end_if
    	if I_CompareCounter PisaBordersSicily = 0 ; oh how I wish there were ORs
    	and SettlementBuildingExists = border_corrupter
    		console_command destroy_building Messina border_corrupter
    	end_if
    	if I_SettlementOwner Reggio = Pisa
    		if I_CompareCounter PisaBordersSicily = 0 ;could just keep setting to one for each border city whichever is faster
    			set_counter PisaBordersSicily 1
    		end_if
    
    		if I_CompareCounter PisaInfluence > SicilyInfluence	
    		;need I_CompareCounter for both counters on the line?
    		and not SettlementBuildingExists = border_corrupter
    			console_command create_building Messina border_corrupter
    		end_if
    	end_if
    	if I_SettlementOwner Reggio = Byzantine
    		set_counter ByzantineBordersSicily 1 ;like this
    		
    		if I_CompareCounter ByzantineInfluence > SicilyInfluence
    		and not SettlementBuildingExists = border_corrupter
    			console_command create_building Messina border_corrupter
    		end_if
    	end_if
    
    	;*******DO EVERY OTHER TERRITORY THAT BORDERS MESSINA*****
    end_if
    
    ;*********DO EVERY OTHER FACTION FOR MESSINA************
    
    ;*********AND IF YOU DON'T WANT TO CRY YET DO EVERY OTHER TERRITORY
    
    end_script
    this is very redundant code due to some missing functionality from the scripting language but would work assuming destroy_building works like in khevlan's post which he said was not tested or I have to come up with another way to attribute corruption to a region
    Last edited by skuzzy; 10-25-2007 at 03:57.
    I'm Batman!

  20. #20
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Influence Development topic

    Yeah unfortunately there is no destroy_building command in M2TW that I know of. There is one in kingdoms but it works faction-wide.

    You could tie an event counter requirement to the core building, however the scripting language is worse than you think because all conditions that have a trigger requirement specified in the docudemons can not be called in ifs, but have to be specified as conditions in the monitor head.

    So it would probably be theoretically possible but it's a lot of work for an in my opinion fairly small gain - judging from your script you'd just want to increase unrest in settlements bordering another faction that has more influence than you. In general that'd be an interesting thing but because of the annoying shortcomings of the scripting language I don't think it's very cost-effective (both in performance and dev time).

  21. #21

    Default Re: Influence Development topic

    Quote Originally Posted by alpaca
    You could tie an event counter requirement to the core building, however the scripting language is worse than you think because all conditions that have a trigger requirement specified in the docudemons can not be called in ifs, but have to be specified as conditions in the monitor head.
    Could you elaborate on that by pointing out in the sample code what you're referring to, I think I know what you're saying but want to verify? Also, is there a post for Kingdom's docudemons that you could link me to because the latest I found was called BI_docs.zip but was under the M2TW docudemons? And I do agree it is a lot of code which is why I tried to prevent writing it initially by stating the many many conditions involved :)

    On a side note the idea that you can only add and subtract irks me, has anyone ever tried to run a separate process that feeds simple packets of integers to a counter returning a result that used counters with*/% being performed in a lowkey exe?
    I'm Batman!

  22. #22
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Influence Development topic

    What I mean is you can't use things like SettlementBuildingExists as a boolean expression in an if:

    Code:
    if I_CompareCounter ByzantineBordersSicily = 0
    	and SettlementBuildingExists = border_corrupter
    And no, I don't think anybody seriously tried to do that yet. I'm not sure if people would actually want to install an external program for a mod, but I guess you could do that. I don't know a lot about memory hacking so I didn't attempt to write something myself (had half of a look at the game's memory but it just confused me, it's really messy). If you can figure out which values are which that'd be pretty useful I guess.

  23. #23

    Default Re: Influence Development topic

    I don't think an external program for a mod would be a bad thing as long as you used it as a base/launcher so that it opens up the the game's exe itself with all the mod arguments. But yeah... on one hand I want to continue learning the fundamentals of the language and all the file components so not to be defeated but on the other hand the scripting language is so poor it really is a deterrent so I give you extra admiration for persevering with it. Also thanks for the help and patience allowing me to abstract a possible idea in your thread.
    I'm Batman!

  24. #24

    Default Re: Influence Development topic

    Neat idea--i miss glorious achievement mode. Some ideas...

    1. Control of the "x" trade. Need control of set of regions that contain a particular resource.

    2. Expansion of the "artist's studio" building idea where in certain regions it could be upgraded to "Botticelli's studio" or "DaVinci's studio". To make it more interesting though you'd need to somehow do more to make it buildable--something to do with traits. So somehow you'd need to perform a set of actions that got a general a "patron of the arts" trait and that somehow could be used to allow a particular building. Might need a set of artistic type buildings.

    3. Control of the papacy. Rusty on the history but IIRC at various times various Italian dynasties had control over who became Pope. Some way of implementing that idea would be a good "influence earner.

    4. General renaissance style ideas to do with culture, art and education. Maybe some of the good influence earners might also have a downside vis a vis the church.

    5. Using religions as faction influence and priests acting as agents of your faction's influence. The building's that produced your "priests" could have strict agent limits so as your influence increased you could upgrade the building and produce more. Also if the base unrest was set high the "priests" bringing enemy regions more to your side might be enough to make them rebel.
    Last edited by nikolai1962; 11-06-2007 at 05:56.
    It's not a map.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO