Page 3 of 7 FirstFirst 1234567 LastLast
Results 41 to 60 of 122

Thread: descr_rebel_factions

  1. #41
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: descr_rebel_factions

    Not sure to be honest - ages ago shortly after 1648's release. But knowing me I would guess it was script, I did the screen shot as proof of concept for the banner symbols.

    Edit: must have been descr_strat. I used the following code for these fresh spawns (top row descr_strat, bottom row script):



    descr_strat, slave faction's section - note that omission of sub faction was acceptable, banner symbol reverted to culture of region's owner (moors - ME) in that case. Anyone noticed the different directions the armies face? strat=straight, script=left
    Code:
    character    random name, general, male, age 26, x 102, y 43 
    army
    unit        Spear Militia                exp 0 armour 0 weapon_lvl 0
    
    
    character    sub_faction england, random name, general, male, age 26, x 104, y 43 
    army
    unit        Spear Militia                exp 0 armour 0 weapon_lvl 0
    
    
    character    sub_faction sicily, random name, general, male, age 26, x 106, y 43 
    army
    unit        Spear Militia                exp 0 armour 0 weapon_lvl 0
    script - all armies use the banner symbol based on the region owner's culture. Brigand spawns do the same.
    Code:
    monitor_event FactionTurnStart FactionIsLocal
            spawn_army 
                faction slave
                character    random_name, general, age 30, x 102, y 41
                unit        Mongol Bodyguard        exp 6 armour 0 weapon_lvl 0
            end
            spawn_army 
                faction slave, sub_faction england
                character    random_name, general, age 30, x 104, y 41
                unit        Mongol Bodyguard        exp 6 armour 0 weapon_lvl 0
            end
            spawn_army 
                faction slave, sub_faction sicily
                character    random_name, general, age 30, x 106, y 41
                unit        Mongol Bodyguard        exp 6 armour 0 weapon_lvl 0
            end
    end_monitor
    Note: I changed the sub_faction entries to hre and scotland respectively in both codes - it only effected a change in accent with the descr_strat entry (given the previous observation rather obviously).

    Should the region be owned by the slaves then the 'creator' entry defines the banner symbol used, see the settlements and slave army below, Breslau is Polish\EE, rest is German\NE:

    Last edited by Gigantus; March 07, 2019 at 12:15 PM.










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

    Default Re: descr_rebel_factions

    Thanks for testing. That confirms what I thought you were saying in the link I posted. Ergo, sub_faction does nothing in script. No harm but no point in using it.

  3. #43
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: descr_rebel_factions

    Yeah thanks for confirming, it will help me A LOT ! I will not have to change it in my script ! Got 197 settlements to add, so I just need to amend the SettlementName !

    Thanks guys !

  4. #44
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: descr_rebel_factions

    Quote Originally Posted by Gigantus View Post
    The second version (still missing that comma) has an added IF section which is not really needed, it can be included in the original one, else it's otherwise the same. I am guessing that the 'GeneralCaptureSettlement' essentially tests for a change in settlement ownership and is not dependent on a preceding battle as the phrase suggests. The 'wait' makes sure that the takeover is completed and hence the following test (the IF sequence owner condition) is then testing for that new owner.
    Hence my suggestion to simply test for the 'attacker' - eg the new owner.
    Code:
    monitor_event GeneralCaptureSettlement SettlementName Settlement_017
            and FactionType slave         ; faction of new owner
            destroy_units slave sea_faring
            spawn_army 
                faction slave, sub_faction portugal
                character    random_name, named character, age 25, x 87, y 187
                traits GoodCommander 1
                unit        Bodyguard Knights            exp 0 armour 0 weapon_lvl 0
                unit        Waterdhavian Bowmen            exp 0 armour 0 weapon_lvl 0
                unit        Waterdhavian Swordsmen        exp 0 armour 0 weapon_lvl 0
                unit        Knights Samular                exp 0 armour 0 weapon_lvl 0
            end
            terminate_monitor
    end_monitor
    What do you think of Quintus' post in the other topic ? Won't this destroy_unit kill ALL the slave units around the map ? Or will it only affect that particular settlement ? If it kills all the units worldwide, is there another way of cleaning a settlement before spawning the units I want ? How about kill_unit ?
    Last edited by Titus le Chmakus; March 08, 2019 at 05:10 AM.

  5. #45
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: descr_rebel_factions

    destroy_unit will only kill the units with the seafaring attribute - all over the map for the defined faction.

    There normally is no way to 'clean' an existing garrison, in this case however I had the impression that you were creating an army that occupies the city? If not then it's not really a problem - creating a garrison via script will simply 'top up' the existing units. Any 'overflow' (beyond 20) will be disregarded, so it makes sense to give thought to the sequence and quantity of the script lines that add the garrison.










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

    Default Re: descr_rebel_factions

    Quote Originally Posted by Gigantus View Post
    Anyone noticed the different directions the armies face? strat=straight, script=left
    Hehe, yeah. You can face them any direction you like though...

    Code:
            spawn_army 
                faction slave
                character    random_name, named character, age 30, x 102, y 41, direction S
                unit        Mongol Bodyguard        exp 6 armour 0 weapon_lvl 0
            end
    Quote Originally Posted by Titus le Chmakus View Post
    What do you think of Quintus' post in the other topic ? Won't this destroy_unit kill ALL the slave units around the map ? Or will it only affect that particular settlement ? If it kills all the units worldwide, is there another way of cleaning a settlement before spawning the units I want ? How about kill_unit ?
    All slave units that have that attribute. Everywhere. destroy_units doesn't have a "where" parameter (just faction and unit type/attribute) - this is a big clue that "where" is not something you have control over. How would it know where you want them destroyed? Because it happens to be inside a monitor that is dealing with a settlement? The destroy_units command (or any command) wouldn't know that.

    This is the only way I know to clear a settlement, by giving the settlement to the faction that already owns it. It is mentioned in there. The current units exit the settlement. They aren't killed.

    Do you really need to empty the settlement though? Does it matter that there might a few units in there beyond the ones you're scripting into it? It would be much much easier if you just let them stay.

    Also, do you really need a general (named character) to be spawned? If not then instead of spawn_army you could simply create units directly into the settlement...

    Code:
    console_command create_unit Settlement_017 "Waterdhavian Bowmen" 1 0 0 0
    console_command create_unit Settlement_017 "Waterdhavian Swordsmen" 1 0 0 0
    console_command create_unit Settlement_017 "Knights Samular" 1 0 0 0

  7. #47
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: descr_rebel_factions

    Quote Originally Posted by Withwnar View Post
    Hehe, yeah. You can face them any direction you like though...
    I know - it was just weird that the default entry had them facing different directions.

    Quote Originally Posted by Withwnar View Post
    Also, do you really need a general (named character) to be spawned? If not then instead of spawn_army you could simply create units directly into the settlement...

    Code:
    console_command create_unit Settlement_017 "Waterdhavian Bowmen" 1 0 0 0
    console_command create_unit Settlement_017 "Waterdhavian Swordsmen" 1 0 0 0
    console_command create_unit Settlement_017 "Knights Samular" 1 0 0 0
    That's what I had meant with 'sequence and quantity of script lines' - thanks for detailing, I really shouldn't get this lazy.










  8. #48
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: descr_rebel_factions

    What I would like to do is having rebels spawning in the country side to be different from the one spawning when a city rebels.

    When a city rebels the game takes the units from descr_rebel_factions. But it does not fit to my mod. Example I want orcs to act as brigands but the city tp have humans when it rebels. Is this possible ?

  9. #49

    Default Re: descr_rebel_factions

    Quote Originally Posted by Titus le Chmakus View Post
    What I would like to do is having rebels spawning in the country side to be different from the one spawning when a city rebels.

    When a city rebels the game takes the units from descr_rebel_factions. But it does not fit to my mod. Example I want orcs to act as brigands but the city tp have humans when it rebels. Is this possible ?
    Yes, but not in the way you're trying to do it. Set the revolt-appropriate units in the descr_rebel_factions, because you're never going to get city revolts working with the script. Set the brigand-spawning chance in the descr_strat to as low as it will go, or zero if it will let you (as an aside, how do you do that? Is there a value that stops them altogether?).

    Then you need a "brigand" script, which spawns your orcs and other monsters in the countryside. This can be done in a single monitor, something like this:

    Code:
        monitor_events PreFactionTurnStart FactionType slave
            generate_random_counter BanditSpawn 1 4 ; generating a random number between 1 and 4
            if I_EventCounter BanditSpawn < 2 ; 25% chance of triggering every turn
                ; add loops for Settlement_001 to Settlement_016
                ; Settlement_017
                generate_random_counter Settlement_017_Bandits 1 5 ; generating a random number between 1 and 5
                if I_EventCounter Settlement_017_Bandits < 2 ; 20% change of triggering
                    spawn_army
                        character	random_name, named character, age 30, x nnn, y nnn
                        traits	Whatever 1
                        unit	OrcDudes	exp 0 armour 0 weapon_lvl 0
                        unit	OrcDudes	exp 0 armour 0 weapon_lvl 0
                        unit	OrcDudes	exp 0 armour 0 weapon_lvl 0
                        unit	OrcDudes	exp 0 armour 0 weapon_lvl 0
                    end
                end_if
                ; add loops for Settlement_018 to Settlement_199
            end_if
        end_monitor
    Last edited by QuintusSertorius; March 09, 2019 at 05:27 AM.

  10. #50
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: descr_rebel_factions

    Hi Quintus and thanks for thaty but it is a bit over my modding skills ! So can you please detail it a bit more ?

    Code:
     monitor_events PreFactionTurnStart FactionType slave ok that one is easy
            generate_random_counter BanditSpawn 1 4 ; generating a random number between 1 and 4 got that one too
            if I_EventCounter BanditSpawn < 2 ; 25% chance of triggering every turn ok
                ; add loops for Settlement_001 to Settlement_016 I don't understand this comment. Do I need to replace it with something ? 
                ; Settlement_017 same
                generate_random_counter Settlement_017_Bandits 1 5 ; generating a random number between 1 and 5 ok 
                if I_EventCounter Settlement_017_Bandits < 2 ; 20% change of triggering ok but why making a second counter ? What is the difference with the one above (BanditSpawn) ?
                    spawn_army
                        character	random_name, named character, age 30, x nnn, y nnn
                        traits	Whatever 1
                        unit	OrcDudes	exp 0 armour 0 weapon_lvl 0
                        unit	OrcDudes	exp 0 armour 0 weapon_lvl 0
                        unit	OrcDudes	exp 0 armour 0 weapon_lvl 0
                        unit	OrcDudes	exp 0 armour 0 weapon_lvl 0
                    end
                end_if
                ; add loops for Settlement_018 to Settlement_199 what here ?
            end_if
        end_monitor
    Sorry to be a pain ! That sample you gave is for Settlement_017. What would it be for Settlement_001 and Settlement_002 ? So that I understand the logic !

    Thanks a lot

  11. #51

    Default Re: descr_rebel_factions

    It means you need to replicate a loop like I've done for Settlement_017 for every other settlement. Each settlement needs it's own IF loop with it's own random_counter (so for Settlement_001 it would be Settlement_001_Bandits), spawn location, and mix of units.

    The line ; Settlement_017 is a label to break up what will be a very long column of code, so you can identify each settlement.

    The purpose of two random counters is to break up the frequency. You could dispense with the first one altogether and just have the individual ones, normally I'd have used a seasonal counter for the first, but I don't know if you're using them.

  12. #52
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: descr_rebel_factions

    The first two plain commented lines are just that - comments, eg describing what is following: a loop for settlement_017.
    Which then makes the bottom commented line self explanatory: 'add the same loop (adjusted for different settlement names) here.

    Rule of thumb:

    commented sections at the end of a line explain the line's functioning
    commented lines on their own refer to the coming script section, either to explain or as a simple header

    technically Quintus should have used boxed brackets for the last comment as that normally indicates variables to placed

    Edit: and ninja'ed










  13. #53
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: descr_rebel_factions

    Quote Originally Posted by QuintusSertorius View Post
    It means you need to replicate a loop like I've done for Settlement_017 for every other settlement. Each settlement needs it's own IF loop with it's own random_counter (so for Settlement_001 it would be Settlement_001_Bandits), spawn location, and mix of units.
    Ok this makes sense !


    The line ; Settlement_017 is a label to break up what will be a very long column of code, so you can identify each settlement.
    Allright

    The purpose of two random counters is to break up the frequency. You could dispense with the first one altogether and just have the individual ones, normally I'd have used a seasonal counter for the first, but I don't know if you're using them.
    That is where I'm lost ... What does the first random_counter does ? Does it add more "chances" factor ?
    I mean, you have 25% chances of fireing that trigger and if it fires, then there is another 20% chances of fireing the second trigger (which is the one spawning) ? Is this right ? So in total, that is 5% chances of triggerning ... Why not then

    Code:
    monitor_events PreFactionTurnStart FactionType slave
                generate_random_counter Settlement_017_Bandits 1 20
                if I_EventCounter Settlement_017_Bandits < 2
                    spawn_army
                        character    random_name, named character, age 30, x nnn, y nnn
                        traits    Whatever 1
                        unit    OrcDudes    exp 0 armour 0 weapon_lvl 0
                        unit    OrcDudes    exp 0 armour 0 weapon_lvl 0
                        unit    OrcDudes    exp 0 armour 0 weapon_lvl 0
                        unit    OrcDudes    exp 0 armour 0 weapon_lvl 0
                    end
                end_if
        end_monitor
    Is it possible to do this in a random location inside a set region, instead of a precise location ?


    Sorry, I forgot to answwer your question. The % chances of spawning bandits randomly are delt by a multiplier between descr_strat and descr_rebel_faction. In descr_rebel_faction, the "chance line" is multiplied by the value on the line "brigands_spawn_value", few lines under the timescale line.
    Last edited by Titus le Chmakus; March 11, 2019 at 05:12 AM.

  14. #54

    Default Re: descr_rebel_factions

    The first one isn't really necessary, you could do it as you've posted. Though 5% chance of each one triggering every round averages out at something like 10 bandit spawns a turn, every turn.

  15. #55
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: descr_rebel_factions

    Thanks

    How about spawning the brigands anywhere in a Region, rather than in a precise location ?

  16. #56

    Default Re: descr_rebel_factions

    Not possible. You can't randomise co-ordinates in the script, you have to choose somewhere.

    In the version of this I'm going to do (disabling the hardcoded bandit spawns), I'm going to have three spawns per region, with the smallest most likely, the largest least likely, different locations for all three.

  17. #57
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: descr_rebel_factions

    Lol did I give you any idea ?

    Thansk for that anyway !

  18. #58

    Default Re: descr_rebel_factions

    We're already using defined peasant_revolt in EBII with undefined bandit - it means the bandit spawns are rubbish. Sometimes it'll be 3 levy skirmishers, which are just an annoyance and aren't a balanced army. Not to mention that they're always Captain-led, which is pointless.
    Last edited by QuintusSertorius; March 11, 2019 at 12:53 PM.

  19. #59
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: descr_rebel_factions

    Depends on what is set in the descr_rebel_factions. Code them with only Heavy elite units instead of levy skirmishers and it won't be that pointless

  20. #60

    Default Re: descr_rebel_factions

    Quote Originally Posted by Titus le Chmakus View Post
    Depends on what is set in the descr_rebel_factions. Code them with only Heavy elite units instead of levy skirmishers and it won't be that pointless
    Nothing to do with it. There's nothing coded for bandits in the descr_rebel_factions - because peasant_revolt is defined. As you discovered upthread, you can only choose one of them.

    It appears to do some sort of random selection from the peasant_revolt list.

Page 3 of 7 FirstFirst 1234567 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
  •