Results 1 to 9 of 9

Thread: Anyone could help me with this trigger?

Hybrid View

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

    Default Anyone could help me with this trigger?

    I want to add a new morale punish system into M2TW, once a character executed prisoners he will get a terrible morale punishment and bad trait,
    this will keep players from pointless prisoner slaughtering without thinking, so i made up a trigger and a trait then added them into export_descr_character_traits.txt(i also added the new descriptions into file export_vnvs.txt for new trait), but when i start a brand new campaign to test this trigger, it seems no working:hmmm:.
    trait likes below:
    Code:
    Trait MoralePunish
        Characters family
        
        Level Prisoner_murder
            Description Prisoner_murder_desc
            EffectsDescription Prisoner_murder_effects_desc
            Threshold  1 
            Effect TroopMorale  -1 
            Effect MovementPoints  -5
        Level Prisoner_killer
            Description Prisoner_killer_desc
            EffectsDescription Prisoner_killer_effects_desc
            Threshold  2
            Effect TroopMorale  -4 
            Effect Unrest  2 
            Effect MovementPoints  -10
        Level Prisoner_slaughterer
            Description Prisoner_slaughterer_desc
            EffectsDescription Prisoner_slaughterer_effects_desc
            Threshold  3 
            Effect TroopMorale  -8 
            Effect Unrest  6 
            Effect MovementPoints  -12
        Level Unforgivable_sinner
            Description Unforgivable_sinner_desc
            EffectsDescription Unforgivable_sinner_effects_desc
            Threshold  4
            Effect TroopMorale  -100 
            Effect Unrest  100 
            Effect MovementPoints  -20
    And here is the trigger:
    Code:
    Trigger morale_punish1
        WhenToTest FactionLeaderPrisonersRansomedCaptor
        Condition RansomType execute
        and NumCapturedSoldiers < 400
        and Trait MoralePunish = 0
        
        Affects MoralePunish  1  Chance  100
    Trigger morale_punish2
        WhenToTest FactionLeaderPrisonersRansomedCaptor
        Condition RansomType execute
        and NumCapturedSoldiers >= 400
        and NumCapturedSoldiers < 1000
        and Trait MoralePunish = 0
        
        Affects MoralePunish  2  Chance  100
        
    Trigger morale_punish3
        WhenToTest FactionLeaderPrisonersRansomedCaptor
        Condition RansomType execute
        and NumCapturedSoldiers >= 400
        and NumCapturedSoldiers < 1000
        and Trait MoralePunish >= 1
        and Trait MoralePunish < 4
        
        Affects MoralePunish  1  Chance  100
    Trigger morale_punish4
        WhenToTest FactionLeaderPrisonersRansomedCaptor
        Condition RansomType execute
        and NumCapturedSoldiers >= 1000
        and NumCapturedSoldiers < 1500
        and Trait MoralePunish = 0
        
        Affects MoralePunish  3  Chance  100
        
    Trigger morale_punish5
        WhenToTest FactionLeaderPrisonersRansomedCaptor
        Condition RansomType execute
        and NumCapturedSoldiers >= 1000
        and NumCapturedSoldiers < 1500
        and Trait MoralePunish = 1
        
        Affects MoralePunish  2  Chance  100    
        
    Trigger morale_punish6
        WhenToTest FactionLeaderPrisonersRansomedCaptor
        Condition RansomType execute
        and NumCapturedSoldiers >= 1000
        and NumCapturedSoldiers < 1500
        and Trait MoralePunish >= 2
        and Trait MoralePunish < 4
        
        Affects MoralePunish  1  Chance  100     
        
    Trigger morale_punish7
        WhenToTest FactionLeaderPrisonersRansomedCaptor
        Condition RansomType execute
        and NumCapturedSoldiers >= 1500
        and Trait MoralePunish = 0
        
        Affects MoralePunish  4  Chance  100
    Trigger morale_punish8
        WhenToTest FactionLeaderPrisonersRansomedCaptor
        Condition RansomType execute
        and NumCapturedSoldiers >= 1500
        and Trait MoralePunish = 1
        
        Affects MoralePunish  3  Chance  100
        
    Trigger morale_punish9
        WhenToTest FactionLeaderPrisonersRansomedCaptor
        Condition RansomType execute
        and NumCapturedSoldiers >= 1500
        and Trait MoralePunish = 2
        
        Affects MoralePunish  2  Chance  100 
    Trigger morale_punish10
        WhenToTest FactionLeaderPrisonersRansomedCaptor
        Condition RansomType execute
        and NumCapturedSoldiers >= 1500
        and Trait MoralePunish = 3
        
        Affects MoralePunish  1  Chance  100
    Is there any thing wrong with my script??

  2. #2

    Default Re: Anyone could help me with this trigger?

    The 'FactionLeaderPrisonersRansomedCaptor' trigger only activates when the Faction's Leader captures prisoners. It does not active when anyone else chooses to release, ransom, or kill prisoners.
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  3. #3

    Default Re: Anyone could help me with this trigger?

    Quote Originally Posted by uanime5 View Post
    The 'FactionLeaderPrisonersRansomedCaptor' trigger only activates when the Faction's Leader captures prisoners. It does not active when anyone else chooses to release, ransom, or kill prisoners.
    thanks, i just figured that out, i used 'GeneralPrisonersRansomedCaptor' instead and it works
    becoz CA's docudemon got me misunderstanding
    Code:
    Identifier:         FactionLeaderPrisonersRansomedCaptor 
    Event:             A captor faction has made a ransom decision
    Exports:            nc_character_record, character_record, faction, region_id, character_type, religion, target_faction, target_religion, captured_faction_info, ransom_type
    Class:              ET_FACTION_LEADER_PRISONERS_RANSOMED_CAPTOR
    Author:             ScottL

  4. #4
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Anyone could help me with this trigger?

    Hey this here is actually a nice idea. I assume that MoralePunish is your own custom Trait which penalizes battle morale? What do you do to prevent it from staying permanently?


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  5. #5

    Default Re: Anyone could help me with this trigger?

    Quote Originally Posted by SigniferOne View Post
    Hey this here is actually a nice idea. I assume that MoralePunish is your own custom Trait which penalizes battle morale? What do you do to prevent it from staying permanently?
    I just want it staying permanently
    That means you can execute prisoners when it's number is lesser than 400 and you only get a slight negative effect from doing that(-1 TroopMorale) so it's absolutely acceptable, but once it's greater than 400, more you did more severe permanently and unforgivable punishment you will get, this will turn your general to a totally badass, no one will follow him

  6. #6

    Default Re: Anyone could help me with this trigger?

    Just pointing out here that in the triggers section, having "effect PunishMorale 4" adds four points towards gaining the PunishMorale trait. It does not put you at the 4th level for PunishMorale.

    Coder on Dark Ages: Roman Revival, the alternate history mod for BI.

    Under the Patronage of Augustus Lucifer, member of the House of Ward.

  7. #7

    Default Re: Anyone could help me with this trigger?

    Quote Originally Posted by Mythic_Commodore View Post
    Just pointing out here that in the triggers section, having "effect PunishMorale 4" adds four points towards gaining the PunishMorale trait. It does not put you at the 4th level for PunishMorale.
    Really? I guess i need to try it again

  8. #8
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Anyone could help me with this trigger?

    Wasn't there found a way to keep traits temporary? How does EB do it?


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  9. #9
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Anyone could help me with this trigger?

    I'd assume using antitraits and additional triggers.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

Posting Permissions

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