Page 1 of 4 1234 LastLast
Results 1 to 20 of 73

Thread: Problem with "add_settlement_turmoil" command

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Problem with "add_settlement_turmoil" command

    Hello everyone. In the preparation of a campaign, I used this command in scripts to provoke rebellions in settlements. But now I have problems depending on the percentage of religion or buildings are exists in the city.

    In theory the number of the "add_settlement_turmoil" command is the number of turns.

    Code:
    Identifier:    add_settlement_turmoil
    Parameters:    settlement_name, num_turns
    Description:    Adds turmoil to the settlement, will decrease per turn.
    Sample use:    add_settlement_turmoil London 5
    Class:    ADD_SETTLEMENT_TURMOIL
    But in practice it's different and the script don't works me. Example:

    Code:
    add_settlement_turmoil Leon 5
    Spoiler Alert, click show to read: 

    Code:
    add_settlement_turmoil Leon 10
    Spoiler Alert, click show to read: 

    Code:
    add_settlement_turmoil Leon 50
    and
    Code:
    add_settlement_turmoil Leon 75
    Spoiler Alert, click show to read: 

    Code:
    add_settlement_turmoil Leon 99


    Code:
    change_population_religion spain heretic 15 catholic
    add_settlement_turmoil Leon 99

    Voilą!

    Code:
    change_population_religion spain heretic 15 catholic
    add_settlement_turmoil Leon 99

    But, not so fast. With buildings in city not "voilą"

    And with reducing the rate of tax, less still...
    Spoiler Alert, click show to read: 



    Besides I don't understand why no rebellion with 80% of unrest, I can't allow to modify both religion.

    Does anyone have any suggestion with this command? Thanks
    Last edited by Miguel_80; August 23, 2015 at 10:46 PM.

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Problem with "add_settlement_turmoil" command

    In my experience the number is for the level of turmoil and it maxes out at 80 (see your pic), never checked how long the turmoil lasts. It doesn't cause a riot on it's own, it merely reduces the existing order. It has to be a total figure low enough - if you have too many bonuses (garrison, governor, low taxes) then it will obviously not riot.

    Reducing the taxes increases order. (normal 80% --> low 110% in your pics)










  3. #3

    Default Re: Problem with "add_settlement_turmoil" command

    Ok Gigantus, thanks for the information. Then I should add more factors to cause the rebellion. I think, think, think, this will not be so. From hidden resources causing unique traits and appearances of disruptive characters... Or appearance of temporary religious monuments (clones with heretical religion), modified disasters, etc... I am afraid that I will have to do a "Spanish botched job", but my strategy will prevail.
    Last edited by Miguel_80; August 23, 2015 at 11:42 PM.

  4. #4
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Problem with "add_settlement_turmoil" command

    Never used add_settlement_turmoil myself but I have heard that it lasts for 5 turns. The docudemons might simply be wrong there about num_turns being the second parameter. It would be interesting to test that, to see if the turmoil does indeed hang around (though decreasingly so) for the number of turns that was used for the num_turns value.

    One option is to script-build a special building that has some negative bonuses...

    law_bonus bonus -20
    population_health_bonus bonus -20
    happiness_bonus bonus -20

    These will reduce these bonuses (back toward zero) that are gained from traits, ancs and other buildings. I don't know of any way to counter the public order bonus received from garrison size. i.e. add_settlement_turmoil will decrease public order and this building will reduce some of the things that increase public order. Net result is even less public order but only if the settlement had any bonuses from law, population_health and happiness in the first place. e.g. If it had no Law bonus then "law_bonus bonus -20" will do nothing because Law can only go as low as zero, not into the negatives.

    Of course, you will also need to destroy the building when it is no longer needed.

    If you wish to always provoke rebellion (not just decrease public order with a chance of it provoking rebellion) then you could instead switch the settlement ownership to the slave faction, maybe spawning some slave units in there afterward as well (so it is not ungarrisoned).

  5. #5
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,568

    Default Re: Problem with "add_settlement_turmoil" command

    If I'm correct rebellion after adding turmoil may be called only after combination with provoke_rebellion. I studied this question for my submod, added 250 points of turmoil with no effects at current turn and 2-3 next turns. Or when I added 5-10 turmoil points to settlement each turn, I got rebellion after 6-8 turns. Combination with provoke_rebellion command solved my problem.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  6. #6
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Problem with "add_settlement_turmoil" command

    Ah yes, provoke_rebellion. I haven't used that either but found this: http://www.twcenter.net/forums/showt...n-script-works

    Looks like provoke_rebellion only works if public order is low, so reducing public order (via add_settlement_turmoil and/or other means) is still needed. But still not guaranteed to work, I assume, i.e. if the settlement had such high public order to begin with that those public order reductions aren't enough to take the total to below 70%. So in summary, if the settlement has low public order then without provoke_rebellion it might rebel and with provoke_rebellion it will rebel (?).

  7. #7

    Default Re: Problem with "add_settlement_turmoil" command

    Exactly Withwnar, I had thought about the possibility of a building. It's a fairly logical choice. The problem is that the buildings are already established in the mod. I'm the scripter and should seek a solution without altering other factors of the mod. I had originally thought of invisible heretics, as the invisible princesses using by Gigantus for named stone forts. But the heretics affect enough the religion? I could put several beside the city (3, 4 or 5). It's temporal, as buildings.

    In other scripts you only have to change the main religion of the faction until it loses all cities and convert in nomads and return to their main religion.


    P.S: The command "provoke_rebellion" doesn't work me. Neither, I can't depend on how the situation is in the city, if it acts that way. However I will try it.


    EDIT: Don't works.

    Code:
    monitor_event FactionTurnEnd FactionType slave
        and I_TurnNumber > 1
    
        add_settlement_turmoil Leon 75
    
        terminate_monitor
    end_monitor
    
    monitor_event FactionTurnEnd FactionType slave
        and I_TurnNumber > 2
    
        provoke_rebellion Leon
        log always PR
    
        terminate_monitor
    end_monitor
    Code:
    12:50:55.575 [data.missing] [warning] Cannot find the portrait path: data/ui/eastern_european/portraits/portraits/young/princesses/039.tga, using the default culture path if it exists
    12:51:09.348 [game.script] [always] PR
    12:52:00.831 [system.io] [warning] open: mods/Bare_Geomod/data/world/maps/campaign/imperial_campaign/radar_map_background.tga is missing
    Last edited by Miguel_80; August 24, 2015 at 06:56 AM.

  8. #8
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Problem with "add_settlement_turmoil" command

    How much public order did Leon have at the time?

  9. #9
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,568

    Default Re: Problem with "add_settlement_turmoil" command

    You should use add_settlement_turmoil and provoke_rebellion in one monitor.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  10. #10

    Default Re: Problem with "add_settlement_turmoil" command

    Quote Originally Posted by Withwnar View Post
    How much public order did Leon have at the time?
    Do you mean the "unrest"? 80%

    By the way, I did not remember, in buildings don't exist negative bonus. It serves to counteract the positive, but never be lower than 0.


    Quote Originally Posted by bitterhowl View Post
    You should use add_settlement_turmoil and provoke_rebellion in one monitor.
    I have tried it in all ways; alone, together, to the next turn... I think that command only works in Rome 1.

  11. #11
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Problem with "add_settlement_turmoil" command

    Quote Originally Posted by Miguel_80 View Post
    Do you mean the "unrest"? 80%
    No, the public order:

    Click image for larger version. 

Name:	33c66uq.jpg 
Views:	14 
Size:	10.0 KB 
ID:	329093

    The thread I linked to said that provoke_rebellion only works if that number is below 70%.

    Quote Originally Posted by Miguel_80 View Post
    ...in buildings don't exist negative bonus. It serves to counteract the positive, but never be lower than 0.
    That's what I'm saying in my first post. Turmoil (unrest) gives negative public order, and to help (maybe) reduce public order further you can take away (reduce to zero) some of the things that give positive public order.

    However, in your Leon example there does not seem to be any of the bonuses present that a building can reduce; the main thing keeping your total public order high is garrison and there's no way to reduce that. Add population maybe?

  12. #12

    Default Re: Problem with "add_settlement_turmoil" command

    you mean something like this in export_buildings ;
    Code:
    happiness_bonus bonus -2 requires factions { spain, } and event_counter civil_war_spain_going_on 1
    law_bonus bonus -1 requires factions { antioch, } and event_counter civil_war_antioch_going_on 1
    religion_level bonus -10 requires factions { saxons, } and event_counter civil_war_saxons_going_on 1
    Last edited by stevietheconquer; August 24, 2015 at 11:59 AM.

  13. #13

    Default Re: Problem with "add_settlement_turmoil" command

    Yes, more or less. What I meant is that the negative bonus does not work, it will never go down of 0. It is used to counteract other bonuses.


    EDIT: We should increase the heretic religion (for example), but is that doing such things, I will wreck the organization chart of the mod and don't think the other members seems them very funny
    Last edited by Miguel_80; August 24, 2015 at 12:26 PM.

  14. #14

    Default Re: Problem with "add_settlement_turmoil" command

    Quote Originally Posted by Withwnar View Post
    No, the public order:
    Ok. This is the public order, but Leon (an Spain faction) it's only an example for test the command



    Quote Originally Posted by Withwnar View Post
    The thread I linked to said that provoke_rebellion only works if that number is below 70%.


    If you're referring to the percentage of "unrest", I have tested it with various percentages and orders (25%, 45%, and 50%) and it doesn't work. If it refers the percentage of "public order", then the command doesn't serve me. Because I can't guess how will be the city once started the game. The objective is that a "conflictive" character in the region between and his while inside, the city must revolt yes or yes.

    MY POSSIBLE SOLUTION:

    export_descr_character_traits.txt
    Code:
    ;------------------------------------------
    Trait RebelLeonese
        Characters family
        Hidden
    
        Level Rebel_Leonese
            Description Rebel_Leonese_desc
            EffectsDescription Rebel_Leonese_effects_desc
            Threshold  1 
     
            Effect Command  1 
    
    ;------------------------------------------
    descr_character.txt
    Code:
    type			heretic
    
    actions			moving_normal
    wage_base		0
    starting_action_points	80
    
    faction			slave
    dictionary		2
    strat_model		heretic
    
    faction			russia
    dictionary		2
    strat_model		heretic
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    descr_model_strat.txt
    Code:
    type				heretic
    skeleton			strat_diplomat
    scale				0.7
    indiv_range			40
    texture				slave, models_strat/textures/heretic_christian_rebels.tga
    texture				russia, models_strat/textures/heretic_christian_england.tga
    model_flexi_m			models_strat/heretic.cas, max
    shadow_model_flexi		models_strat/shadow_staff.CAS, max
    campaign_script.txt
    Code:
    	monitor_event FactionTurnStart FactionType slave
    		and I_TurnNumber > 1
    
    		spawn_army 
    			faction slave
    			character	Isaac, named character, age 36, x 67, y 103, label leoneserebel, direction E
    			traits LoyaltyStarter 1 , RebelLeonese 1 , ReligionStarter 1 
    			unit		NE Bodyguard		exp 3 armour 0 weapon_lvl 0
    			unit		Mailed Knights		exp 0 armour 0 weapon_lvl 0
    			unit		Mailed Knights		exp 0 armour 0 weapon_lvl 0
    			unit		Mailed Knights		exp 0 armour 0 weapon_lvl 0
    			unit		Spear Militia			exp 0 armour 0 weapon_lvl 0
    			unit		Spear Militia			exp 0 armour 0 weapon_lvl 0
    			unit		Spear Militia		exp 0 armour 0 weapon_lvl 0
    		end
    
    		historic_event world_is_round   ;;;(sorry, I didn't have time to write a message)
    
    		terminate_monitor
    	end_monitor
    
    	monitor_event CharacterTurnStart FactionType slave
    		and AgentType = named character
    		and Trait RebelLeonese > 0
    		and IsRegionOneOf Leon_Province
    		and I_LocalFaction spain
    
    		add_settlement_turmoil Leon 50
    		spawn_character russia random_name, heretic, age 30, x 73, y 105
    		spawn_character russia random_name, heretic, age 32, x 73, y 103
    		spawn_character russia random_name, heretic, age 34, x 74, y 103
    		spawn_character russia random_name, heretic, age 36, x 74, y 105   ;;;(The fourth is optional)
    	end_monitor
    SAMPLE:
    Spoiler Alert, click show to read: 
























    AND NOW... THE FINAL BLOW. THE TRICK OF GIGANTUS.

    Transparent texture and this code in "descr_models_strat.txt"
    Code:
    type				heretic
    skeleton			strat_diplomat
    scale				0.7
    indiv_range			40
    texture				slave, models_strat/textures/heretic_christian_rebels.tga
    texture				russia, models_strat/textures/heretic_christian_england.tga
    model_flexi_m			models_strat/heretic.cas, max
    shadow_model_flexi		models_strat/shadow_staff.CAS, max
    Spoiler Alert, click show to read: 
    Out of sight, out of mind...


    Until not die the rebellious character, will not disappear the heretics (interesting challenge for me)... At the moment it is the best option I can think.
    Last edited by Miguel_80; August 25, 2015 at 06:13 AM.

  15. #15
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Problem with "add_settlement_turmoil" command

    If it refers the percentage of "public order", then the command doesn't serve me.
    Public order, yes, not unrest.

    Because I can't guess how will be the city once started the game.
    Exactly. No matter what you do there is no guarantee that you will get the total public order down low enough to be certain that provoke_rebellion will work. Because the public order might be really high at the time that you're trying to do this thing.

    If you have a free faction slot then I highly recommend using the region switcher. (Link in my first post.) I use it all of the time, and have used it for transferring a settlement to the slave faction. And as a bonus that faction (the "spawnpool" one the thread mentions) can also be used for other fancy tricks, like Unique Names (another scripting trick that I rely on a lot for all kinds of problems).
    Last edited by Withwnar; August 25, 2015 at 08:05 AM.

  16. #16

    Default Re: Problem with "add_settlement_turmoil" command

    The "spawnpool" is a good method. If you take imagination, you can create very interesting things. I've also seen other interesting scripts. I must admit that you have a great talent for make scripts.

  17. #17

    Default Re: Problem with "add_settlement_turmoil" command

    I think that at the end it will be more effective to use a "trap" building with transparent card and build it by script at the time that is needed.

    Building:
    Code:
    building revolution
    {
        religion heretic
        levels revolution 
        {
            revolution requires factions { slave, } 
            {
                convert_to 0
                capability
                {
                    religion_level bonus 100
    		law_bonus bonus -20
    		population_health_bonus bonus -20
    		happiness_bonus bonus -20
                }
                material wooden
                construction  4 
                cost  2000 
                settlement_min town
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    Script:
    Code:
    	monitor_event SettlementTurnStart SettlementName Cordoba
    		and I_SettlementOwner Cordoba = moors
    		and SettlementBuildingExists = revolution
    		and I_TurnNumber > 1
    
    		add_settlement_turmoil Cordoba 75
    		provoke_rebellion Cordoba
    	end_monitor
    
    	monitor_event SettlementTurnStart SettlementName Cordoba
    		and I_SettlementOwner Cordoba = moors
    		and not SettlementBuildingExists = revolution
    		and I_TurnNumber > 1
    
    		console_command create_building Cordoba revolution
    	end_monitor
    
    	monitor_event SettlementTurnStart SettlementName Cordoba
    		and I_SettlementOwner Cordoba = slave
    		and SettlementBuildingExists = revolution
    		and I_TurnNumber > 1
    
    		destroy_buildings slave revolution true
    	end_monitor
    Sample:
    Spoiler Alert, click show to read: 





    Curiously, without the "provoke_rebellion" command it takes one more turn to convert in a rebel city.

  18. #18
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Problem with "add_settlement_turmoil" command

    Maybe you can satisfy my curiosity if you still have that test set up: if you set that region to a difference faction in descr_regions (other then the faction owning it at the event) will it revolt to that faction?
    Don't forget to delete map.rwm if you do the change.










  19. #19

    Default Re: Problem with "add_settlement_turmoil" command

    Are you referring to this?

    Code:
    Cordoba_Province
    	Cordoba
    	moors
    	Iberian_Rebels
    	17 13 198
    	atlantic, explorers_guild, knights_of_santiago_chapter_house
    	5
    	5
    	religions { catholic 25 orthodox 0 islam 65 pagan 5 heretic 5 }
    Spoiler Alert, click show to read: 



    Code:
    Cordoba_Province
    	Cordoba
    	aztecs
    	Native_Rebels
    	17 13 198
    	atlantic, explorers_guild, knights_of_santiago_chapter_house
    	5
    	5
    	religions { catholic 25 orthodox 0 islam 65 pagan 5 heretic 5 }
    Spoiler Alert, click show to read: 



    Code:
    Cordoba_Province
    	Cordoba
    	aztecs
    	French_Rebels
    	17 13 198
    	atlantic, explorers_guild, knights_of_santiago_chapter_house
    	5
    	5
    	religions { catholic 25 orthodox 0 islam 65 pagan 5 heretic 5 }
    Spoiler Alert, click show to read: 


    Last edited by Miguel_80; February 25, 2016 at 04:45 AM.

  20. #20
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Problem with "add_settlement_turmoil" command

    Yes, that's the entry.
    If that faction entry (line 3) is not the same as the current owner and when a revolt happens it reverts to that faction. I still remember that WTF moment in RTW when Central Anatolia revolted to the Gauls in one of my campaigns. Have seen it in M2TW a few times as well.










Page 1 of 4 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •