Results 1 to 21 of 21

Thread: [II] Feature Preview 2: Degrees of Independence

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

    Default [II] Feature Preview 2: Degrees of Independence

    Italia Invicta Feature Preview #2: Degrees of Independence

    Welcome to our second preview. I will try to make these previews a more regular appearance, so that you have a nice read now and then to build up your expectations.

    You might ask yourself: What the heck does he mean with "Degrees of Independence"? The answer is quite simple: A ruler is never able to directly govern every city he controls. In fact most of the time he will have to restrict himself to a few core provinces and leave the rest to his subordinates or vassals. In II we will represent this by limiting the influence you have on a lot of your cities, in respect to both buildings and armies.
    In our current planning we differentiate between four basic levels of independence:

    1. Nominal Dependence

    The highest level of independence. A settlement that is nominally dependent will have a lot of freedoms, which means you won't have a say in most of what's going on there. In gameplay terms this means you can't build anything (some buildings will possibly be created by the city population, but we're not sure about that yet) and you can only recruit insofar as you can ask the settlement for help, which will usually be granted to some extent. If the settlement doesn't support you at all, you get to choose whether to let that slight pass, or to declare them to be rebels, in which case they will become just that.
    Furthermore, you don't get much income from this settlement as a lot of the money will naturally end up in the pockets of the local rulers.
    On the upside however, these settlements will on average have a higher public order than their more dependent counterparts.
    Examples for this will be a lot of the Ottonian's settlements that are nominally vassals to the Empire, but enjoy a lot of freedom.

    2. Indefinite Dependence

    The name hints to it: The next lower level of independence is a bit of a grayzone in your empire. You already have a good deal of influence on this region, possibly because the local ruler is weak, or because the city's power is too limited to really stand up against you. This LOI will unlock a few buildings and give you better recruitment capabilites, or at least make sure you get more support should you call for it.
    You will also get more tribute from this settlement.

    3. Reliance

    The third level of independence is a settlement that relies heavily on your leader's direct interference into things. You will get to build a majority of the available structures in these settlements, and you get to finally have a large say as to which units are recruited here, which comes at the cost of having less units available and recruitment taking more time. Furthermore, you will get nearly full income in these settlements. Public order is more of a problem as people expect you to care for their demands to a larger extent.

    4. Royal Demesne

    Directly controlled by your dynasty, a settlement of this kind will give you full control over what goes and what doesn't, both building- and unit-wise. However this also means that you'll have to carefully cater for your population's needs and it will often be hard to maintain good order in times of turbulence. The increased income and completely free development are usually worth it, however.


    So as it looks now, you will want to have as many cities as dependent on your leader as possible, right?
    Wrong. You have to nurture a good balance between more self-sufficient settlements and those that rely heavily on your influence. This has multiple reasons which I don't want to disclose just now, but you will see them in our future previews (which as I said I hope will become a more regular entity now).


    Until next time

    alpaca



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

    [II] Feature Preview 1: View City
    Last edited by alpaca; 06-13-2007 at 19:03.

  2. #2

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Does this work anything like the government system in EB?

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

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Quote Originally Posted by Kongeslask
    Does this work anything like the government system in EB?
    Well it's a bit similar, I can't really tell you how similar because I don't remember EB's system en detail, but the DOI will have a huge influence on what you can and can't do with the settlement.

  4. #4
    Member Member Herkus's Avatar
    Join Date
    Feb 2006
    Location
    Latvia, Riga
    Posts
    173

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Very great ideas and innovations, though I have few questions.

    Quote Originally Posted by alpaca
    A settlement that is nominally dependent will have a lot of freedoms, which means you won't have a say in most of what's going on there. In gameplay terms this means you can't build anything (some buildings will possibly be created by the city population, but we're not sure about that yet) and you can only recruit insofar as you can ask the settlement for help, which will usually be granted to some extent.
    I guess settlements with nominal nominal dependence will use your own faction's budget to built those random buildings?
    And what will determine the granting of troops - settlement's loyalty or governor's traits?
    Last edited by Herkus; 06-17-2007 at 19:06.

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

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Quote Originally Posted by Herkus
    Very great ideas and innovations, though I have few questions.


    I guess settlements with nominal nominal dependence will use your own faction's budget to built those random buildings?
    And what will determine the granting of troops - settlement's loyalty of governor's traits?
    No actually, if we implement that feature (since we can't upgrade buildings by script it could only be certain things), the city will pay for that stuff itself.
    As for the troops: There's quite a few factors that'll determine this, we will try to make the system as sensible as possible, and usually most cities are going to give you armies. There will be some special cases like excommunication where they might refuse to help you though.

  6. #6

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Just to get into the technical nitty-gritty of this, how do you plan to regulate independence, and what can and cannot be built? By a special building, "Control Building", which if you upgrade you increase in influence over the city?

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

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Yeah that's the way I'm doing it. I'm also storing the value away in an event_counter though so that I have an indy condition to check.
    Also keep in mind that these restrictions are mostly a player-only feature. The AI simply couldn't handle it.

  8. #8

    Default Re: [II] Feature Preview 2: Degrees of Independence

    That's fine if AI simply gets imposed a choice, who really cares if it goes through the same steps as a human, right? It's just for the human, to keep it interesting whatever faction he plays; his enemies will get automatic pre-coded choices of some kind, and no one'll be at a loss.


    EDIT: How do you limit what level of control building the person can build? So that not all provinces are 100% controlled?
    Last edited by SigniferOne; 08-23-2007 at 03:44.

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

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Quote Originally Posted by SigniferOne
    That's fine if AI simply gets imposed a choice, who really cares if it goes through the same steps as a human, right? It's just for the human, to keep it interesting whatever faction he plays; his enemies will get automatic pre-coded choices of some kind, and no one'll be at a loss.


    EDIT: How do you limit what level of control building the person can build? So that not all provinces are 100% controlled?
    I disable the settlement commands if the player doesn't have enough authority points left, except for the destroy building command. He can still play if he wants but he can't recruit or build until he destroys some control buildings (in which case they will be replaced by the lvl 1 building which doesn't cost anything)

  10. #10

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Oh snap (excuse my very mature expression). That's fricking genius! So, you intercept the SettlementSelected, and if such and such conditions exist (user's authority variable is too low) then you disable the build and recruit buttons. Makes sense to me now, I'm just impressed you thought of it!

    And then, on the next turn, scan through all settlements and add up all control buildings, if there's a few short, all less-controlled settlements are allowed to build the next control building! Sorry if I'm spilling all your secrets here, I'm just very impressed with this whole idea, someone finally putting the persistent script to good use.


    EDIT: I think you should really emphasize the disabled building and recruitment, since it's so new and different, and people will be really impressed by it.
    Last edited by SigniferOne; 08-23-2007 at 18:43.

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

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Quote Originally Posted by SigniferOne
    Oh snap (excuse my very mature expression). That's fricking genius! So, you intercept the SettlementSelected, and if such and such conditions exist (user's authority variable is too low) then you disable the build and recruit buttons. Makes sense to me now, I'm just impressed you thought of it!

    And then, on the next turn, scan through all settlements and add up all control buildings, if there's a few short, all less-controlled settlements are allowed to build the next control building! Sorry if I'm spilling all your secrets here, I'm just very impressed with this whole idea, someone finally putting the persistent script to good use.


    EDIT: I think you should really emphasize the disabled building and recruitment, since it's so new and different, and people will be really impressed by it.
    Well there's a few details that differ but that's the jist of it, yes.
    I'm using filter_settlement_commands to disable the commands, I don't disable ui buttons.
    And I don't check it at every turn start because I fear it might slow down the game somewhat (I only check the leader authority for changes at turn start). What I do is catch possible cases that change the amount of Authority points used: Settlements being captured/lost, rebelling or given via diplomacy, and buildings being created or destroyed. I'm not 100% sure everything works as it should because things such as rebellions and stuff are hard to test, but I'm fairly confident it's good. Otherwise it'll be thrown up via beta testing.

    And don't worry about spilling my secrets, there's enough pure awesomeness in my campaign_script file that I can afford giving out a bit of it - the most important being the influence system (and I don't mind people using my scripts anyways if they give credit for II/AD). Here's the complete code if you're interested (it also contains a kind of "function" setup I use that is triggered by an event counter being changed and does a certain thing so I don't have to write the same code twenty times). Although I would encourage you not to directly take it and implement it somewhere, it should first of all serve as an example for scripting techniques:
    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;; 5. Authority-Dependent Control levels ;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ; The leader's authority is stored in a counter. It's checked at the start of each turn and updated if needed
    ; The building interaction is realised by an event counter storing what's left of the authority points, which will be
    ; decreased for each high DOI settlement (1,2,4 pts). Each Authority attribute is worth 2 pts and you have a minimum
    ; of 8 points
    ; The number of used authority points are stored in another counter which is updated whenever you build a control building
    ; or conquer a settlement
    ; This is a player-only feature!
    
    declare_counter leader_authority_points
    
    ; Update authority
    
    monitor_event EventCounter EventCounterType update_authority
    	and EventCounter = 1
    	
    	ui_indicator 0 circle 500 400 colour 180 0 0 scale 1.0 period 2.0 loop
    	
    	if I_CompareCounter leader_authority_points == 8
    		if I_CompareCounter used_authority_points <= 4
    			set_event_counter authority_available 4
    		end_if
    		if I_CompareCounter used_authority_points == 5
    			set_event_counter authority_available 3
    		end_if
    		if I_CompareCounter used_authority_points == 6
    			set_event_counter authority_available 2
    		end_if
    		if I_CompareCounter used_authority_points == 7
    			set_event_counter authority_available 1
    		end_if
    		if I_CompareCounter used_authority_points == 8
    			set_event_counter authority_available 0
    		end_if
    		if I_CompareCounter used_authority_points > 8
    			set_event_counter authority_available -1
    		end_if
    	end_if
    	if I_CompareCounter leader_authority_points == 10
    		if I_CompareCounter used_authority_points <= 6
    			set_event_counter authority_available 4
    		end_if
    		if I_CompareCounter used_authority_points == 7
    			set_event_counter authority_available 3
    		end_if
    		if I_CompareCounter used_authority_points == 8
    			set_event_counter authority_available 2
    		end_if
    		if I_CompareCounter used_authority_points == 9
    			set_event_counter authority_available 1
    		end_if
    		if I_CompareCounter used_authority_points == 10
    			set_event_counter authority_available 0
    		end_if
    		if I_CompareCounter used_authority_points > 10
    			set_event_counter authority_available -1
    		end_if
    	end_if
    	if I_CompareCounter leader_authority_points == 12
    		if I_CompareCounter used_authority_points <= 8
    			set_event_counter authority_available 4
    		end_if
    		if I_CompareCounter used_authority_points == 9
    			set_event_counter authority_available 3
    		end_if
    		if I_CompareCounter used_authority_points == 10
    			set_event_counter authority_available 2
    		end_if
    		if I_CompareCounter used_authority_points == 11
    			set_event_counter authority_available 1
    		end_if
    		if I_CompareCounter used_authority_points == 12
    			set_event_counter authority_available 0
    		end_if
    		if I_CompareCounter used_authority_points > 12
    			set_event_counter authority_available -1
    		end_if
    	end_if
    	if I_CompareCounter leader_authority_points == 14
    		if I_CompareCounter used_authority_points <= 10
    			set_event_counter authority_available 4
    		end_if
    		if I_CompareCounter used_authority_points == 11
    			set_event_counter authority_available 3
    		end_if
    		if I_CompareCounter used_authority_points == 12
    			set_event_counter authority_available 2
    		end_if
    		if I_CompareCounter used_authority_points == 13
    			set_event_counter authority_available 1
    		end_if
    		if I_CompareCounter used_authority_points == 14
    			set_event_counter authority_available 0
    		end_if
    		if I_CompareCounter used_authority_points > 14
    			set_event_counter authority_available -1
    		end_if
    	end_if
    	if I_CompareCounter leader_authority_points == 16
    		if I_CompareCounter used_authority_points <= 12
    			set_event_counter authority_available 4
    		end_if
    		if I_CompareCounter used_authority_points == 13
    			set_event_counter authority_available 3
    		end_if
    		if I_CompareCounter used_authority_points == 14
    			set_event_counter authority_available 2
    		end_if
    		if I_CompareCounter used_authority_points == 15
    			set_event_counter authority_available 1
    		end_if
    		if I_CompareCounter used_authority_points == 16
    			set_event_counter authority_available 0
    		end_if
    		if I_CompareCounter used_authority_points > 17
    			set_event_counter authority_available -1
    		end_if
    	end_if
    	if I_CompareCounter leader_authority_points == 18
    		if I_CompareCounter used_authority_points <= 14
    			set_event_counter authority_available 4
    		end_if
    		if I_CompareCounter used_authority_points == 15
    			set_event_counter authority_available 3
    		end_if
    		if I_CompareCounter used_authority_points == 16
    			set_event_counter authority_available 2
    		end_if
    		if I_CompareCounter used_authority_points == 17
    			set_event_counter authority_available 1
    		end_if
    		if I_CompareCounter used_authority_points == 18
    			set_event_counter authority_available 0
    		end_if
    		if I_CompareCounter used_authority_points > 18
    			set_event_counter authority_available -1
    		end_if
    	end_if
    	if I_CompareCounter leader_authority_points == 20
    		if I_CompareCounter used_authority_points <= 16
    			set_event_counter authority_available 4
    		end_if
    		if I_CompareCounter used_authority_points == 17
    			set_event_counter authority_available 3
    		end_if
    		if I_CompareCounter used_authority_points == 18
    			set_event_counter authority_available 2
    		end_if
    		if I_CompareCounter used_authority_points == 19
    			set_event_counter authority_available 1
    		end_if
    		if I_CompareCounter used_authority_points == 20
    			set_event_counter authority_available 0
    		end_if
    		if I_CompareCounter used_authority_points > 20
    			set_event_counter authority_available -1
    		end_if
    	end_if
    	
    	ui_indicator_remove 0
    	
    	if I_EventCounter authority_available < 0
    		add_events
        		event historic not_enough_authority
       		 	date	0 0
    		end_add_events
    		filter_settlement_commands off
    		filter_settlement_commands on all destroy_building
    		set_counter settlement_commands_disabled 1
    	end_if
    	if I_EventCounter authority_available > 0
    		filter_settlement_commands on
    		set_counter settlement_commands_disabled 0
    	end_if
    	set_event_counter update_authority 0
    end_monitor
    
    ; Start of turn update to check for possible changes of the leader's authority.
    monitor_event FactionTurnStart FactionIsLocal
    	
    	if I_FactionLeaderAttribute Authority <= 4
    		set_counter leader_authority_points 8
    	end_if
    	if I_FactionLeaderAttribute Authority == 5
    		set_counter leader_authority_points 10
    	end_if
    	if I_FactionLeaderAttribute Authority == 6
    		set_counter leader_authority_points 12
    	end_if
    	if I_FactionLeaderAttribute Authority == 7
    		set_counter leader_authority_points 14
    	end_if
    	if I_FactionLeaderAttribute Authority == 8
    		set_counter leader_authority_points 16
    	end_if
    	if I_FactionLeaderAttribute Authority == 9
    		set_counter leader_authority_points 18
    	end_if
    	if I_FactionLeaderAttribute Authority == 10
    		set_counter leader_authority_points 20
    	end_if
    		
    	while I_EventCounter update_authority != 0
    	end_while
    	set_event_counter update_authority 1
    end_monitor
    
    
    ; BuildingCompleted update
    
    monitor_event BuildingCompleted SettlementBuildingFinished control2
    	inc_counter used_authority_points 1
    
    	set_event_counter update_authority 1
    end_monitor
    
    monitor_event BuildingCompleted SettlementBuildingFinished control3
    	inc_counter used_authority_points 1
    	
    	set_event_counter update_authority 1
    end_monitor
    
    monitor_event BuildingCompleted SettlementBuildingFinished control4
    	inc_counter used_authority_points 2
    	
    	set_event_counter update_authority 1
    end_monitor
    
    ; BuildingDestroyed update
    monitor_event BuildingDestroyed BuildingName control4
    	inc_counter used_authority_points -2
    	
    	if I_SettlementSelected Florence
    		console_command create_building Florence control1
    	end_if
    	set_event_counter update_authority 1
    end_monitor
    monitor_event BuildingDestroyed BuildingName control3
    	inc_counter used_authority_points -1
    	
    	if I_SettlementSelected Florence
    		console_command create_building Florence control1
    	end_if
    	set_event_counter update_authority 1
    end_monitor
    monitor_event BuildingDestroyed BuildingName control2
    	inc_counter used_authority_points -1
    	
    	if I_SettlementSelected Florence
    		console_command create_building Florence control1
    	end_if
    	set_event_counter update_authority 1
    end_monitor
    
    
    ; Settlement capture update
    
    monitor_event GeneralCaptureSettlement SettlementBuildingExists control2
    	and CharacterIsLocal
    	
    	inc_counter used_authority_points 1
    	set_event_counter update_authority 1
    end_monitor
    monitor_event GeneralCaptureSettlement SettlementBuildingExists control3
    	and CharacterIsLocal
    	
    	inc_counter used_authority_points 2
    	set_event_counter update_authority 1
    end_monitor
    monitor_event GeneralCaptureSettlement SettlementBuildingExists control4
    	and CharacterIsLocal
    	
    	inc_counter used_authority_points 4
    	set_event_counter update_authority 1
    end_monitor
    
    
    ; Settlement loss update.
    
    monitor_event GeneralCaptureSettlement SettlementBuildingExists control2
    	and not FactionIsLocal
    	and TargetSettlementIsLocal
    	
    	inc_counter used_authority_points -1
    	set_event_counter update_authority 1
    end_monitor
    monitor_event GeneralCaptureSettlement SettlementBuildingExists control3
    	and not FactionIsLocal
    	and TargetSettlementIsLocal
    	
    	inc_counter used_authority_points -2
    	set_event_counter update_authority 1
    end_monitor
    monitor_event GeneralCaptureSettlement SettlementBuildingExists control4
    	and not FactionIsLocal
    	and TargetSettlementIsLocal
    	
    	inc_counter used_authority_points -4
    	set_event_counter update_authority 1
    end_monitor
    
    
    ; Settlement gifted
    
    monitor_event GiveSettlement SettlementBuildingExists control2
    	and FactionIsLocal
    	
    	inc_counter used_authority_points -1
    	set_event_counter update_authority 1
    end_monitor
    monitor_event GiveSettlement SettlementBuildingExists control3
    	and FactionIsLocal
    	
    	inc_counter used_authority_points -2
    	set_event_counter update_authority 1
    end_monitor
    monitor_event GiveSettlement SettlementBuildingExists control4
    	and FactionIsLocal
    	
    	inc_counter used_authority_points -4
    	set_event_counter update_authority 1
    end_monitor
    
    ; Settlement bought
    monitor_event GiveSettlement SettlementBuildingExists control2
    	and TargetFactionIsLocal
    	
    	inc_counter used_authority_points 1
    	set_event_counter update_authority 1
    end_monitor
    monitor_event GiveSettlement SettlementBuildingExists control3
    	and TargetFactionIsLocal
    	
    	inc_counter used_authority_points 2
    	set_event_counter update_authority 1
    end_monitor
    monitor_event GiveSettlement SettlementBuildingExists control4
    	and TargetFactionIsLocal
    	
    	inc_counter used_authority_points 4
    	set_event_counter update_authority 1
    end_monitor
    
    
    ; Settlement rebels
    
    monitor_event CityRebels SettlementBuildingExists control2
    	and FactionIsLocal
    	
    	inc_counter used_authority_points -1
    	set_event_counter update_authority 1
    end_monitor
    monitor_event CityRebels SettlementBuildingExists control3
    	and FactionIsLocal
    	
    	inc_counter used_authority_points -2
    	set_event_counter update_authority 1
    end_monitor
    monitor_event CityRebels SettlementBuildingExists control4
    	and FactionIsLocal
    	
    	inc_counter used_authority_points -4
    	set_event_counter update_authority 1
    end_monitor
    Code:
    ; Control level buildings. These determine the degree of independence of your settlement
    
    building control_level
    {
    	levels control1 control2 control3 control4
    	{
    	
    		control1 requires factions { all, } and event_counter authority_available 0
    		{
    			capability
    			{
    			}
    			material wooden
    			construction  1
    			cost  1
    			settlement_min village
    			upgrades
    			{
    				control2
    			}
    		}
    		
    		control2 requires factions { all, } and event_counter authority_available 1
    		{
    			capability
    			{
    			}
    			material wooden
    			construction  1
    			cost  1
    			settlement_min village
    			upgrades
    			{
    				control3
    			}
    		}
    		
    		control3 requires factions { all, } and event_counter authority_available 1
    		{
    			capability
    			{
    			}
    			material wooden
    			construction  1
    			cost  1
    			settlement_min village
    			upgrades
    			{
    				control4
    			}
    		}
    		
    		control4 requires factions { all, } and event_counter authority_available 2
    		{
    			capability
    			{
    			}
    			material wooden
    			construction  1
    			cost  1
    			settlement_min village
    			upgrades
    			{
    			}
    		}
    	}
    	plugins
    	{
    	}
    }
    Last edited by alpaca; 08-23-2007 at 22:26.

  12. #12
    EB Traitor Member BozosLiveHere's Avatar
    Join Date
    Jan 2006
    Location
    Uqbar, Tlön
    Posts
    3,662

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Wow, This filter_settlement_commands command fits so well with a system we've developed recently, I can't believe we missed it. That's awesome alpaca. I should probably be hiding this from my team, otherwise they'll just keep asking for features and never let us move on to M2TW.

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

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Or leverage it to speed up the process .

    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

  14. #14

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Quote Originally Posted by alpaca
    Well there's a few details that differ but that's the jist of it, yes.
    I'm using filter_settlement_commands to disable the commands, I don't disable ui buttons.
    And I don't check it at every turn start because I fear it might slow down the game somewhat (I only check the leader authority for changes at turn start). What I do is catch possible cases that change the amount of Authority points used: Settlements being captured/lost, rebelling or given via diplomacy, and buildings being created or destroyed.
    How does filter_settlement_commands play into this? The description says it only filters shell commands (or seems to). Does it somehow filter out the building and recruitment ability on the strat map, and does this mean the game sends itself "commands" to enable various features, and it is those commands that you can conveniently filter out here?


    Also, I like your "function" setup; might try to find a way to use it for my scripts to streamline things up. Problem is with passing parameters as always, but I suppose there can never be too many counters :)

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

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Yeah, having more than one argument can be a bit annoying though. In another part of the file (levy script) I'm using a function with an argument and return value (both counters obviously) and it works well.

    I'd suggest simply trying filter_settlement_commands yourself: It disables the whole settlement (you think you can change the taxes but it doesn't do anything). You can't recruit, you can't build, you can't destroy or do anything else. So the shell is the UI.
    I'm not sure what happens to the AI if the settlement is disabled though (it will probably be able to issue orders).

    It's often worth to check out scripting commands or events despite of some stuff the docudemon says. For example, it's possible to use RandomPercent in an if statement although it doesn't have the I_ before the name that usually flags independent conditions (but it works because it doesn't have a trigger requirement and contrary to what the CA guys wrote at the top of their docudemon).

  16. #16

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Code:
    monitor_event EventCounter EventCounterType update_authority
    	and EventCounter = 1
    What's the advantage of using the event counter over a regular counter, if you won't be invoking it in export_descr_buildings.txt?

    Also, I tried out filter_settlement_commands -- very neat. Hopefully someone can do tests of whether the AI is limited by this command, or only human. Have you considered disabling the 'build' and 'recruit' buttons as an alternative? I know it won't stop AI, but I think it would look really striking on the campaign map, when the game says you own the settlement, but you cannot click on anything in it.


    ===================================================================================

    EDIT: I hear your point about documented commands not working as described. Sometimes the proper syntax defies all of the (already convoluted) convention, it's ridiculous. For instance, some person was suggesting this use for launching a script on a button being pressed:


    Code:
    monitor_event ButtonPressed ButtonPressed character_info_zoom_to_button
    ...
    end_monitor
    which makes all kinds of sense (once you get past the convoluted word conventions), because there actually is a ButtonPressed condition, and so it should work. But it doesn't. I even tried

    Code:
    monitor_event ButtonPressed ButtonPressed character_info_zoom_to_button TrueCondition
    but no luck. Finally, I ridiculously tried

    Code:
    monitor_event ButtonPressed character_info_zoom_to_button
    ...
    end_monitor
    and it worked. Although it shouldn't. Because character_info_zoom_to_button is not a condition. Argh!!

    We should really release a proper docudemons, with the commands properly documented with examples, because no one except the most diehard fans will want to wade through all this to implement scripts in their favorite game.
    Last edited by SigniferOne; 08-27-2007 at 02:31.

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

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Quote Originally Posted by SigniferOne
    Code:
    monitor_event EventCounter EventCounterType update_authority
    	and EventCounter = 1
    What's the advantage of using the event counter over a regular counter, if you won't be invoking it in export_descr_buildings.txt?

    Also, I tried out filter_settlement_commands -- very neat. Hopefully someone can do tests of whether the AI is limited by this command, or only human. Have you considered disabling the 'build' and 'recruit' buttons as an alternative? I know it won't stop AI, but I think it would look really striking on the campaign map, when the game says you own the settlement, but you cannot click on anything in it.


    ===================================================================================

    EDIT: I hear your point about documented commands not working as described. Sometimes the proper syntax defies all of the (already convoluted) convention, it's ridiculous. For instance, some person was suggesting this use for launching a script on a button being pressed:


    Code:
    monitor_event ButtonPressed ButtonPressed character_info_zoom_to_button
    ...
    end_monitor
    which makes all kinds of sense (once you get past the convoluted word conventions), because there actually is a ButtonPressed condition, and so it should work. But it doesn't. I even tried

    Code:
    monitor_event ButtonPressed ButtonPressed character_info_zoom_to_button TrueCondition
    but no luck. Finally, I ridiculously tried

    Code:
    monitor_event ButtonPressed character_info_zoom_to_button
    ...
    end_monitor
    and it worked. Although it shouldn't. Because character_info_zoom_to_button is not a condition. Argh!!

    We should really release a proper docudemons, with the commands properly documented with examples, because no one except the most diehard fans will want to wade through all this to implement scripts in their favorite game.
    The advantage is that I hate monitor_conditions with it's heartbeat.
    If I change an event counter it'll throw an event that I can use a monitor_event on - which I prefer.

    Code:
    monitor_event ButtonPressed character_info_zoom_to_button
    ...
    end_monitor
    That code won't work as you intend it to, any condition the game doesn't know is treated as true and therefore yes, your monitor will trigger on the zoom button. But it'll also trigger on every other button that's being pressed.
    As some research I just conducted returned, the thing with character_info_zoom_to_button is that it's actually linked to garrison_info_zoom_to_button probably by oversight from the devs. This means that you should use something like this:
    Code:
    monitor_event ButtonPressed ButtonPressed garrison_info_zoom_to_button
    	and not I_ScrollOpen own_settlement_info_scroll
    
    	console_command add_money 40000
    end_monitor
    There is already an "Ultimate Docudemon"-or-whatever-it's-called project by GrnEyedDvl, you might want to participate in that. As for me, I simply don't have the time to invest it into such a project in addition to real life and modding.

  18. #18
    EB2 Baseless Conjecturer Member blacksnail's Avatar
    Join Date
    Jan 2006
    Posts
    3,074

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Quote Originally Posted by BozosLiveHere
    Wow, This filter_settlement_commands command fits so well with a system we've developed recently, I can't believe we missed it. That's awesome alpaca. I should probably be hiding this from my team, otherwise they'll just keep asking for features and never let us move on to M2TW.
    ...Whoa.

    Um, agreed, this stays under the hat.

  19. #19
    EB Traitor Member BozosLiveHere's Avatar
    Join Date
    Jan 2006
    Location
    Uqbar, Tlön
    Posts
    3,662

    Default Re: [II] Feature Preview 2: Degrees of Independence

    The best thing is that it doesn't work right in RTW, so if they want it, they'll have to accept the port. Yay!

    Sorry for the threadjack alpaca.

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

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Quote Originally Posted by BozosLiveHere
    The best thing is that it doesn't work right in RTW, so if they want it, they'll have to accept the port. Yay!

    Sorry for the threadjack alpaca.
    Yeah no prob, we can live with it

    Besides, to get it to work with RTW... mmph! hmph! arrrgh!
    Last edited by alpaca; 09-13-2007 at 08:20.

  21. #21

    Default Re: [II] Feature Preview 2: Degrees of Independence

    Alpaca more features? What are you cooking up now :)

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