Results 1 to 12 of 12

Thread: Taksashila angry Mauryans never arriving

Hybrid View

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

    Default Taksashila angry Mauryans never arriving

    Hey guys,

    I noticed in my 2.05a campaign that after rejecting Mauryan control, I never got the invading rebel armies. I see the turn count for the first one is 20 turns, and the random chance is 50%. Someone else in my Taksashila tips thread mentioned they never got invaded either, though it was on an earlier edition. As far as I can tell, 2.05c has the same Taksashila script. I don't know monitors that well, but look at this:

    Code:
    monitor_event PreFactionTurnStart FactionType f_gandhara
            and I_LocalFaction f_gandhara
            and I_EventCounter ecGandharaEra > 0
            and I_CompareCounter ecGenerateMauryan1 = 0
            and not I_CharacterExists mauryan1
            
            if I_TurnNumber > 20
                and RandomPercent < 50
                historic_event HE_MAURYAN_ARMY_ARRIVE factions { f_gandhara, }
                set_counter ecGenerateMauryan1 1
                spawn_army
                    faction slave, sub_faction f_gandhara
                    character random_name, named character, age 32, x 509, y 167, direction W, battle_model indian_general, label mauryan1
                    traits CommandExperience 3 , GandharaWarriorC 1 , GandharaMagadha 1, HardToBribe 1 , HighPersonalSecurity 4
                    unit        indian chariot archers            exp 1 armour 0 weapon_lvl 0
                    unit        indian elephant standard        exp 1 armour 0 weapon_lvl 0
                    unit        indian cavalry light            exp 1 armour 0 weapon_lvl 0
                    unit        indian cavalry light            exp 0 armour 0 weapon_lvl 0
                    unit        indian infantry macemen            exp 1 armour 0 weapon_lvl 0
                    unit        indian infantry swordsmen        exp 1 armour 0 weapon_lvl 0
                    unit        indian infantry spearmen        exp 0 armour 0 weapon_lvl 0
                    unit        indian infantry spearmen        exp 0 armour 0 weapon_lvl 0
                    unit        indian infantry spearmen        exp 0 armour 0 weapon_lvl 0
                    unit        indian infantry longbowmen        exp 1 armour 0 weapon_lvl 0
                    unit        indian infantry longbowmen        exp 1 armour 0 weapon_lvl 0
                    unit        indian infantry longbowmen        exp 0 armour 0 weapon_lvl 0
                end
        end_if
        terminate_monitor
       end_monitor

    It looks like after your initial conditions, the spawning stuff happens inside the if I_TurnNumber > 20 and RandomPercent < 50 if. But then, AFTER the end_if, there is a terminate_monitor. So once the ecGandharaEra goes > 0, if the turn number is < 20 (which is true, since you are offered this decision on turn 16 iirc), then the if fails to spawn the army. Then regardless of whether it matches the if, it terminates the monitor so it stops checking. The other events chain off the first one having fired, so they never fire either.

    Compare to the other method of staying loyal and getting helper armies spawned for you:

    Code:
    monitor_event PreFactionTurnStart FactionType f_gandhara
            
            if I_EventCounter ecGandharaEra = 0
                and I_CompareCounter ecGenerateMauryanHelp = 1
                and RandomPercent > 60
                spawn_army
                    faction f_gandhara
                    character random_name, general, age 25, x 509, y 160, direction W
                    unit        indian cavalry light            exp 0 armour 0 weapon_lvl 0
                    unit        indian cavalry light            exp 0 armour 0 weapon_lvl 0
                    unit        indian infantry swordsmen        exp 0 armour 0 weapon_lvl 0
                    unit        indian infantry spearmen        exp 0 armour 0 weapon_lvl 0
                    unit        indian infantry spearmen        exp 0 armour 0 weapon_lvl 0
                    unit        indian infantry spearmen        exp 0 armour 0 weapon_lvl 0
                    unit        indian infantry longbowmen        exp 0 armour 0 weapon_lvl 0
                end
                set_counter ecGenerateMauryanHelp 0
            end_if
            
            if I_EventCounter ecGandharaEra > 0
                terminate_monitor
            end_if
        end_monitor
    See how the terminate only happens if you've declared independence?

    It looks like you need to move the terminate_monitor line up before the end_if for the three army-spawning counter-rebellion events.

    I'll try this on my next campaign and report back.
    Last edited by myarta; October 20, 2015 at 11:52 AM.

  2. #2

    Default Re: Taksashila angry Mauryans never arriving

    To be honest, all the triggers in that script need re-writing. Instead of a random chance after a particular turn, it should be a random turn between a particular range of dates (but guaranteed).

    I seem to remember having that terminate_monitor higher up before - it stopped the script working. I think it would be safer to use a similar one to the later ones - that if Taksashila is independent, it's turned off.

  3. #3

    Default Re: Taksashila angry Mauryans never arriving

    Right. What I mean is that the script isn't working now. The Mauryan stacks never spawn. And I think the reason is that the terminate is outside the if, so the very first turn after you declare independence, if all the conditions aren't met to spawn the army, it stops trying forever and you're SOL.
    And they're not met, because it offers you independence sooner than turn 20. And even if that was matched up with the declare independence turn, if you got randompercent wrong, you'd be screwed forever from completing the test.

    My fix should let the script try again each turn and guarantee that the reform moves to completion as intended. I just started a campaign so I will let you know if I can actually complete the independence reforms this time.

  4. #4

    Default Re: Taksashila angry Mauryans never arriving

    No, I mean when I put the terminate in there, it stopped the entire script from working, not just this section on the Gandharan Independence.

  5. #5

    Default Re: Taksashila angry Mauryans never arriving

    Right. It must have been in the wrong spot? I just got to turn 22, and the first Mauryan army arrived!

    Success

    Fixed part looks like:

    Part 1:

    Code:
    monitor_event PreFactionTurnStart FactionType f_gandhara
    		and I_LocalFaction f_gandhara
            and I_EventCounter ecGandharaEra > 0
            and I_CompareCounter ecGenerateMauryan1 = 0
            and not I_CharacterExists mauryan1
            
            if I_TurnNumber > 20
    			and RandomPercent < 50
    			historic_event HE_MAURYAN_ARMY_ARRIVE factions { f_gandhara, }
                set_counter ecGenerateMauryan1 1
                spawn_army
                    faction slave, sub_faction f_gandhara
                    character random_name, named character, age 32, x 509, y 167, direction W, battle_model indian_general, label mauryan1
                    traits CommandExperience 3 , GandharaWarriorC 1 , GandharaMagadha 1, HardToBribe 1 , HighPersonalSecurity 4
                    unit		indian chariot archers			exp 1 armour 0 weapon_lvl 0
                    unit		indian elephant standard		exp 1 armour 0 weapon_lvl 0
                    unit		indian cavalry light			exp 1 armour 0 weapon_lvl 0
                    unit		indian cavalry light			exp 0 armour 0 weapon_lvl 0
                    unit		indian infantry macemen			exp 1 armour 0 weapon_lvl 0
                    unit		indian infantry swordsmen		exp 1 armour 0 weapon_lvl 0
                    unit		indian infantry spearmen		exp 0 armour 0 weapon_lvl 0
                    unit		indian infantry spearmen		exp 0 armour 0 weapon_lvl 0
                    unit		indian infantry spearmen		exp 0 armour 0 weapon_lvl 0
                    unit		indian infantry longbowmen		exp 1 armour 0 weapon_lvl 0
                    unit		indian infantry longbowmen		exp 1 armour 0 weapon_lvl 0
                    unit		indian infantry longbowmen		exp 0 armour 0 weapon_lvl 0
                end
    	    terminate_monitor
    	end_if
        end_monitor
    You can see the only difference is:

    Before:
    Code:
                     unit        indian infantry longbowmen        exp 0 armour 0 weapon_lvl 0
                end
        end_if
        terminate_monitor
       end_monitor
    After:
    Code:
                     unit		indian infantry longbowmen		exp 0 armour 0 weapon_lvl 0
                end
    	    terminate_monitor
    	end_if
        end_monitor

    Applied to all three events in a row. (label mauryan1, 2, and 3 spawn_army sections)

  6. #6

    Default Re: Taksashila angry Mauryans never arriving

    Excellent work - that's in 2.05c.

  7. #7

    Default Re: Taksashila angry Mauryans never arriving

    Yeah, there it is. Turn 60 I noticed it because I got the Maharaja trait gained dialog. Mauryan Urban Center is now available in Taksashila, etc. "Picture missing" warning is on it, though.

  8. #8

    Default Re: Taksashila angry Mauryans never arriving

    Hmm, next problem. I just defeated the third army. It's been 3 more turns since then, but I'm not seeing my new gov't options.

    I see from the script that it will just be silent, not giving any warning:

    Code:
    if I_LocalFaction f_gandhara
                and I_EventCounter ecGandharaEra = 1
                and I_NumberOfSettlements f_gandhara > 6
                and I_CompareCounter mauryans_defeated > 2
                set_event_counter ecGandharaIndependence 1
                terminate_monitor
    end_if
    ecGandharaEra is known to be 1, because it's been needed to spawn the invading Mauryan armies.
    Number of settlements on my Overview page is 7. 6 cities, 1 camp. Not sure if that matters and I just need another city.

    mauryans_defeated should be 3. Let's take a look:

    I see you did a declare_counter mauryans_defeated without a set_counter to 0. I'm not sure if that matters. In C, it would be a problem since you'd adding 1 to an unknown starting value. But maybe in m2tw you can assume it's zero?. Then you increment it if you're on ecGenerateMauryan1 but mauryan1 doesn't exist, and for some reason you also make RandomPercent > 80, suggesting that the mauryans defeated only ticks up 20% of the time after mauryan1 are gone.

    Actually the last check for mauryan3 is > 90, meaning only 10% of rolls will land it. So maybe my problem is I only defeated them 3 turns ago, but it will take on average 5 turns for a 10% chance to fire, easily as many as 10 turns, unlikely to take longer than 15. I guess this was part of an attempt to push the reform date back across a random spread instead of immediately after you killed the third army? I'll cross my fingers and report back if I finally do get the reform buildings in a few turns.

  9. #9

    Default Re: Taksashila angry Mauryans never arriving

    That'll be due to the change in religion - which we may end up changing back again...

  10. #10

    Default Re: Taksashila angry Mauryans never arriving

    Ah, alright. Well, with the change to the three spawning events and the location of terminate_monitor vs end_if detailed above, people who play as Taksashila can at least go through the independence movement which allows better factional troops and government effects again. So yay to playing as the Great King of the Punjabi.

  11. #11

    Default Re: Taksashila angry Mauryans never arriving

    Those two tribal units previewed recently on Twitter means the Tribal government is actually different to the Urban one in the autumn release. Allied Governments are much changed, too.

  12. #12

    Default Re: Taksashila angry Mauryans never arriving

    Cool. I haven't tried the tribal govts yet. I knew I wanted to go towards the full Mauryan rule, so I built that kind.

Posting Permissions

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