Page 5 of 8 FirstFirst 12345678 LastLast
Results 81 to 100 of 160

Thread: A Guide for Missions

  1. #81
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Also, one important piece of test knowledge that I forgot about, which I suppose go against our theory.. When I had issues with AI stacking armies around the dungeons, I tried to resolve it by putting each dungeon tile into some foreign far region (so it was never directly in lands of AI), we could call it "dungeon region". However, the missions were then never assigned. Hard to say, if perhaps somehow the acessibility of the region capital matters somehow as well, because it was supposed to give the mission as it still was a "neighbor" region... (BTW I fixed AI by descr_campaign_ai_db)

  2. #82
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: A Guide for Missions

    Thanks for sharing your descr_missions file, I'm sure that will come in handy soon. I've currently gutted mine - removed all of the generic 'random' missions. My mod will only use missions tied to scripts or guilds, the idea being that it's easier to keep track of your script objectives if they're available in the missions scroll.

    Quote Originally Posted by Jadli View Post
    If assassins had 0 MPs, no missions either (that you did too).
    I was actually referring to the movement points of the mission target. If I give him 0 MovementPoints, the game will never pick him as the target. Good to know this also applies to the assassin agent. For my purposes, I'm not trying to enable 'random' assassination missions. Assassins are not available to any faction but I still want to leverage the mission type to get the game to reveal a target with a unique ancillary and tell the player to "go kill that guy" regardless of where he is on the map. If the mission does depend on distance from assassin to target, then I would potentially need to spawn assassins all over the map.


    As for the send_emissary mission, that is being used for a completely different script. The mission definitely depends on the distance from the diplomat to the target faction's regions. The exact math is still mysterious to me, but by experimentation I've managed to find the needed coordinates to spawn the diplomat to get the correct target faction for the mission every time (at least on turn 1 when the state of the map is known). Sometimes, if you spawn the diplomat right next to a faction's capital, the mission will pick a neighboring faction as the target instead. It seems to depend on what region the diplomat is in more than the actual number of turns to the target settlement.

  3. #83
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: A Guide for Missions

    I still can't get assassinate_general missions to be created unless the target is within my faction's regions or in a bordering rebel region. Here is the mission:

    Spoiler Alert, click show to read: 

    Code:
    mission    assassinate_general custom_mission
    {
        FACTION_MISSION
        duration 20
        factions { england, }
        paybacks
        {
            payback_id empty_payback
        }
        own_region_modifier    0.0
        attribute_type    Magic
        attribute_min_threshold    10
        killed_by_any_means
        expire_on_hide_disabled
    }
    There is a unique ancillary (only one on the map) that has 10 Magic.


    I tried spawning the assassin inside my faction's borders with the target beyond the borders - mission was not created. I tried spawning the assassin and the target right next to each other in a random rebel region on the map (well beyond the assassin faction's borders) - mission was not created. I tried moving the target inside my faction's borders and putting my assassin in the corner of the map - mission was not created. I tried moving the target inside my faction's borders and moving my assassin inside my faction borders as well - mission was created on the next turn.

    I tried spawning a uniquely named assassin so I could give him a trait with max Subterfuge and MovementPoints - this did not change the above results. I tried spawning the assassin once and disabling the script for killing and respawning him so that the original assassin remained on the map - this did not change the above results.

    These results indicate that the assassin's agent skill and movement points do not affect the chance of the mission being created when the difficulty_threshold param isn't used. They also indicate that the distance between the assassin and the target is only relevant when both are inside the faction's borders.

  4. #84
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Good job with testing, eventhough the results are not pleasant There doesnt seem to be anything wrong with your mission. I assume only youneuoy can help us with parameters limitations.

    Quote Originally Posted by Callistonian View Post
    I was actually referring to the movement points of the mission target. If I give him 0 MovementPoints, the game will never pick him as the target. Good to know this also applies to the assassin agent. For my purposes, I'm not trying to enable 'random' assassination missions.
    Ah, thats weird... Well, its interesting that despite your find the mechanics in my mod still allows to pick dungeon characters , who dont move at all and are freezed. (but stil have MPs which is what matters I suppose)

    Quote Originally Posted by Callistonian View Post
    For my purposes, I'm not trying to enable 'random' assassination missions. Assassins are not available to any faction but I still want to leverage the mission type to get the game to reveal a target with a unique ancillary and tell the player to "go kill that guy" regardless of where he is on the map. If the mission does depend on distance from assassin to target, then I would potentially need to spawn assassins all over the map.
    Well, if its somewhat a unique missions, it wouldnt be that hard to create script to assign it based on some requirements of yours, which is probably the only way then. Thinking of it, it wouldnt have to bery complex, and would work probably more realiably anyway. The bad part about scripting it is, that you would have to make a copy of the script for each faction, as in the command you always have to specify a receiving faction.

    BTW, I suppose it would be good to share a "full code" on how to make a proper expanded missions, including using paybacks/rewards in scripts, traits, recruitment and so on, as its not relly properly shown in the OP or anywhere afaik, and is not exactly simple to do (as I said, when I have time I will make a proper guide...). Might also be useful for your mission.

    So if we take the fighers guild dungeon missions as example, its set like this in descr_missions
    Spoiler Alert, click show to read: 
    Code:
    mission  assassinate_general fighters_dungeon{
        FIGHTERS_GUILD_MISSION
        duration 10
        exclude_duration 15
        score_modifier 1.6
        difficulty_threshold 0.01
        factions { england, scotland, venice, mongols, byzantium, altmer, russia, spain, moors, poland, france, timurids, milan, sicily, hungary, turks, egypt, aztecs, sharn, skyrim, colovia, ever, denmark, }
        paybacks
        {
             random 0.4 payback_id guild_fighters_min1
             random 0.4 payback_id guild_fighters_min2
                        payback_id guild_fighters_min3
        }
        neutral_modifier    100.0
        enemy_modifier    100.0
        killed_by_any_means
        expire_on_hide_disabled
        character_type    named_character
        attribute_type    Magic
        attribute_min_threshold    1
        attribute_type    Piety
        attribute_min_threshold    7
        target_religion        heretic
        target_faction    papal_states
        guild_handles    fighters_guild            ; what guilds are required for this mission
        guild_score_modifier    1.0
    }
    
    
    mission  assassinate_general fighters_dungeon_m
    {
        FIGHTERS_GUILD_MISSION
        duration 10
        exclude_duration 15
        score_modifier 1.4
        difficulty_threshold 0.01
        turn_start 25
        factions { england, scotland, venice, mongols, byzantium, altmer, russia, spain, moors, poland, france, timurids, milan, sicily, hungary, turks, egypt, aztecs, sharn, skyrim, colovia, ever, denmark, }
        paybacks
        {
             random 0.4 payback_id guild_fighters_mod1
             random 0.4 payback_id guild_fighters_mod2
                        payback_id guild_fighters_mod3
        }
        killed_by_any_means
        expire_on_hide_disabled
        neutral_modifier    100.0
        enemy_modifier    100.0
        character_type    named_character
        attribute_type    Magic
        attribute_min_threshold    3
        attribute_type    Piety
        attribute_min_threshold    2
        target_religion        heretic
        target_faction    papal_states
        guild_handles    fighters_guild                ; what guilds are required for this mission
        guild_score_modifier    2.0
    }
    
    
    mission  assassinate_general fighters_dungeon_gm
    {
        FIGHTERS_GUILD_MISSION
        duration 15
        exclude_duration 15
        score_modifier 1.2
        difficulty_threshold 0.01
        turn_start 50
        factions { england, scotland, venice, mongols, byzantium, altmer, russia, spain, moors, poland, france, timurids, milan, sicily, hungary, turks, egypt, aztecs, sharn, skyrim, colovia, ever, denmark, }
        paybacks
        {
             random 0.4 payback_id guild_fighters_major1
             random 0.4 payback_id guild_fighters_major2
                        payback_id guild_fighters_major3
        }
        killed_by_any_means
        expire_on_hide_disabled
        neutral_modifier    100.0
        enemy_modifier    100.0
        character_type    named_character
        attribute_type    Magic
        attribute_min_threshold    5
        target_religion        heretic
        target_faction    papal_states
        guild_handles    fighters_guild        ; what guilds are required for this mission
        guild_score_modifier    3.0
    }


    I made different starting turns to pretend your are increasing your rank with the guild, and hence receive beter missions later. Eventhough as we discussed before its not possible to tie the missions to any "rank" or your guild level (unless you script it)

    I could have probably made only one payback, but I suppose its more interesting if things are not always the same, hence:

    Spoiler Alert, click show to read: 
    Code:
    ;;;;;;; FIGHTERS
    
    payback_list guild_fighters_min1
    {
        reward
        {
            null_payback    MIN_FIGHTERS_GUILD_POINTS_REWARD            ;ADD TEXT, GUILD POINTS
            buildable_unit         600    1
            guild_money    100    fighters_guild
        }
        penalty
        {
            null_payback    MIN_FIGHTERS_GUILD_POINTS_PENALTY            ;ADD TEXT, GUILD POINTS
        }
    }
    
    
    payback_list guild_fighters_min2
    {
        reward
        {
            null_payback    MIN_FIGHTERS_GUILD_POINTS_REWARD            ;ADD TEXT, GUILD POINTS
            buildable_unit         600    2
            guild_money    500    fighters_guild
        }
        penalty
        {
            null_payback    MIN_FIGHTERS_GUILD_POINTS_PENALTY            ;ADD TEXT, GUILD POINTS
        }
    }
    
    
    payback_list guild_fighters_min3
    {
        reward
        {
            null_payback    MIN_FIGHTERS_GUILD_POINTS_REWARD            ;ADD TEXT, GUILD POINTS
            buildable_unit         600    3
            guild_money    1000    fighters_guild
        }
        penalty
        {
            null_payback    MIN_FIGHTERS_GUILD_POINTS_PENALTY            ;ADD TEXT, GUILD POINTS
        }
    }
    
    
    payback_list guild_fighters_mod1
    {
        reward
        {
            null_payback    MOD_FIGHTERS_GUILD_POINTS_REWARD            ;ADD TEXT, GUILD POINTS
            best_buildable_unit         800    1
            guild_money    1000    fighters_guild
        }
        penalty
        {
            null_payback    MOD_FIGHTERS_GUILD_POINTS_PENALTY            ;ADD TEXT, GUILD POINTS
        }
    }
    
    
    payback_list guild_fighters_mod2
    {
        reward
        {
            null_payback    MOD_FIGHTERS_GUILD_POINTS_REWARD            ;ADD TEXT, GUILD POINTS
            best_buildable_unit         800    2
            guild_money    1500    fighters_guild
        }
        penalty
        {
            null_payback    MOD_FIGHTERS_GUILD_POINTS_PENALTY            ;ADD TEXT, GUILD POINTS
        }
    }
    
    
    payback_list guild_fighters_mod3
    {
        reward
        {
            null_payback    MOD_FIGHTERS_GUILD_POINTS_REWARD            ;ADD TEXT, GUILD POINTS
            best_buildable_unit         800    3
            guild_money    2000    fighters_guild
        }
        penalty
        {
            null_payback    MOD_FIGHTERS_GUILD_POINTS_PENALTY            ;ADD TEXT, GUILD POINTS
        }
    }
    
    
    payback_list guild_fighters_major1
    {
        reward
        {
            null_payback    MAJOR_FIGHTERS_GUILD_POINTS_REWARD            ;ADD TEXT, GUILD POINTS
            best_exotic_unit 1200 1
            guild_money    2000    fighters_guild
        }
        penalty
        {
            null_payback    MAX_FIGHTERS_GUILD_POINTS_PENALTY            ;ADD TEXT, GUILD POINTS
        }
    }
    
    
    payback_list guild_fighters_major2
    {
        reward
        {
            null_payback    MAJOR_FIGHTERS_GUILD_POINTS_REWARD            ;ADD TEXT, GUILD POINTS
            best_exotic_unit 1200 2
            guild_money    2500    fighters_guild
        }
        penalty
        {
            null_payback    MAJOR_FIGHTERS_GUILD_POINTS_PENALTY            ;ADD TEXT, GUILD POINTS
        }
    }
    
    
    payback_list guild_fighters_major3
    {
        reward
        {
            null_payback    MAJOR_FIGHTERS_GUILD_POINTS_REWARD            ;ADD TEXT, GUILD POINTS
            best_exotic_unit 1200 3
            guild_money    3000    fighters_guild
        }
        penalty
        {
            null_payback    MAJOR_FIGHTERS_GUILD_POINTS_PENALTY            ;ADD TEXT, GUILD POINTS
        }
    }


    As I also said before, it seems that guild modifier except increasing the score also somewhat increase the guild money rewards (perhaps multiplies it) but havent had time to properly confirm it yet.

    Then there are the guild points rewards in EDG

    Spoiler Alert, click show to read: 
    Code:
    ;------------------------------------------Trigger FIGHTERS_Mission_Success_Payback1
     WhenToTest LeaderMissionSuccess
    
    
     Condition PaybackID guild_fighters_min
    
    
     Guild fighters_guild a 33
    
    
    ;------------------------------------------
    Trigger FIGHTERS_Mission_Fail_Payback1
     WhenToTest LeaderMissionFailed
    
    
     Condition PaybackID guild_fighters_min
    
    
     Guild fighters_guild a -33
     
    ;------------------------------------------
    Trigger FIGHTERS_Mission_Success_Payback2
     WhenToTest LeaderMissionSuccess
    
    
     Condition PaybackID guild_fighters_mod
    
    
     Guild fighters_guild a 66
    
    
    ;------------------------------------------
    Trigger FIGHTERS_Mission_Fail_Payback2
     WhenToTest LeaderMissionFailed
    
    
     Condition PaybackID guild_fighters_mod
    
    
     Guild fighters_guild a -66
     
    ;------------------------------------------
    Trigger FIGHTERS_Mission_Success_Payback3
     WhenToTest LeaderMissionSuccess
    
    
     Condition PaybackID guild_fighters_major
    
    
     Guild fighters_guild a 100
    
    
    ;------------------------------------------
    Trigger FIGHTERS_Mission_Fail_Payback3
     WhenToTest LeaderMissionFailed
    
    
     Condition PaybackID guild_fighters_major
    
    
     Guild fighters_guild a -100

    Its supposed to be separately for each payback variant (1,2,3), like this its not doing anything. Or simpler is to use "Condition MissionID fighters_dungeon" for example I suppose.

    Now comes the more interesting part, such as connecting the paybacks to recruitment or triggers...

    So, for the recruitment my idea is, that for accomplishing the mission you are rewarded with guild units (or some special units) but you cant do that via best_buildable_unit, unless you perhaps changed the price of the unit to some high number no other unit has and used that value... but the unit would still have to be availible at the moment. You could possibly also just spawn them, but I didnt want to make things that easy on player and make it more interesting, so what I have done is that I used event counters to enable and disable recruitment when you fulfill missions... And I also wanted to tie to the level of the guild you have

    So the script part:

    Spoiler Alert, click show to read: 
    Code:
    monitor_event FactionTurnStart    
            add_events
                event counter fighters_guild_minor
                event counter fighters_guild_mod
                event counter fighters_guild_major
                event counter fighters_guild_minor_timer
                event counter fighters_guild_mod_timer
                event counter fighters_guild_major_timer
                date    0
            end_add_events
            
            terminate_monitor
        
        end_monitor
        
        ;MIN REWARD
        monitor_event MissionFinished MissionID fighters_dungeon
            and PaybackID guild_fighters_min1
            
            set_event_counter fighters_guild_minor 1
            inc_event_counter fighters_guild_minor_timer 1
            
        end_monitor
        
        monitor_event MissionFinished MissionID fighters_dungeon
            and PaybackID guild_fighters_min2
            
            set_event_counter fighters_guild_minor 1
            inc_event_counter fighters_guild_minor_timer 1
            
        end_monitor
        
        monitor_event MissionFinished MissionID fighters_dungeon
            and PaybackID guild_fighters_min3
            
            set_event_counter fighters_guild_minor 1
            inc_event_counter fighters_guild_minor_timer 1
            
        end_monitor
        
        monitor_event FactionTurnStart FactionIsLocal
            and I_EventCounter fighters_guild_minor = 1
        
            inc_event_counter fighters_guild_minor_timer 1
            
        end_monitor
        
        monitor_event FactionTurnStart I_EventCounter fighters_guild_minor_timer = 2
            and I_EventCounter fighters_guild_minor = 1
        
            set_event_counter fighters_guild_minor 0
            set_event_counter fighters_guild_minor_timer 0
            
        end_monitor
        
        ;MOD REWARD
        monitor_event MissionFinished MissionID fighters_dungeon_m
            and PaybackID guild_fighters_mod1
            
            set_event_counter fighters_guild_mod 1
            inc_event_counter fighters_guild_mod_timer 1
            
        end_monitor
        
        monitor_event MissionFinished MissionID fighters_dungeon_m
            and PaybackID guild_fighters_mod2
            
            set_event_counter fighters_guild_mod 1
            inc_event_counter fighters_guild_mod_timer 1
            
        end_monitor
        
        monitor_event MissionFinished MissionID fighters_dungeon_m
            and PaybackID guild_fighters_mod3
            
            set_event_counter fighters_guild_mod 1
            inc_event_counter fighters_guild_mod_timer 1
            
        end_monitor
        
        monitor_event FactionTurnStart FactionIsLocal
            and I_EventCounter fighters_guild_mod = 1
        
            inc_event_counter fighters_guild_mod_timer 1
            
        end_monitor
        
        monitor_event FactionTurnStart I_EventCounter fighters_guild_mod_timer = 2
            and I_EventCounter fighters_guild_mod = 1
        
            set_event_counter fighters_guild_mod 0
            set_event_counter fighters_guild_mod_timer 0
            
        end_monitor
        
        
        ;MAJOR REWARD
        monitor_event MissionFinished MissionID fighters_dungeon_gm
            and PaybackID guild_fighters_major1
            
            set_event_counter fighters_guild_major 1
            inc_event_counter fighters_guild_major_timer 1
            
        end_monitor
        
        monitor_event MissionFinished MissionID fighters_dungeon_gm
            and PaybackID guild_fighters_major2
            
            set_event_counter fighters_guild_major 1
            inc_event_counter fighters_guild_major_timer 1
            
        end_monitor
        
        monitor_event MissionFinished MissionID fighters_dungeon_gm
            and PaybackID guild_fighters_major3
            
            set_event_counter fighters_guild_major 1
            inc_event_counter fighters_guild_major_timer 1
            
        end_monitor
        
        monitor_event FactionTurnStart FactionIsLocal
            and I_EventCounter fighters_guild_major = 1
        
            inc_event_counter fighters_guild_major_timer 1
            
        end_monitor
        
        monitor_event FactionTurnStart I_EventCounter fighters_guild_major_timer = 2
            and I_EventCounter fighters_guild_major = 1
        
            set_event_counter fighters_guild_major 0
            set_event_counter fighters_guild_major_timer 0
            
        end_monitor

    you need at least one full turn to recruit the unit, as eventhough the counter enables at the moment the mission is finished, it doesnt take effect in recruitment till next turn. And my guild units take two turns to recruit, hence I let the timer go to 2. I Could have tied it to the paybacks and not missions IDs, but that would have taken three times more space, and also I want this to depend mainly on the guild level...

    The EDB part

    Spoiler Alert, click show to read: 
    Code:
    building guild_fighters_guild{
        levels fighters_guild m_fighters_guild gm_fighters_guild 
        {
            fighters_guild requires factions { england, scotland, venice, mongols, byzantium, altmer, russia, spain, moors, poland, france, timurids, milan, sicily, hungary, turks, egypt, aztecs, sharn, skyrim, colovia, ever, denmark, }
            {
                capability
                {
                    recruit_pool "Fighters Guild"  1   1.0  1  0  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, france, aztecs, sharn, colovia, } and event_counter fighters_guild_minor 1
                    recruit_pool "Fighters Guild"  1   1.0  1  2  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, france, aztecs, sharn, colovia, } and event_counter fighters_guild_mod 1
                    recruit_pool "Fighters Guild"  1   1.0  1  4  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, france, aztecs, sharn, colovia, } and event_counter fighters_guild_major 1
                    law_bonus bonus 1
                    population_health_bonus bonus 1
                     weapon_melee_blade 1
                }
                material wooden
                construction  1 
                cost  2500 
                settlement_min large_town
                upgrades
                {
                    m_fighters_guild
                }
            }
            m_fighters_guild requires factions { england, scotland, venice, mongols, byzantium, altmer, russia, spain, moors, poland, france, timurids, milan, sicily, hungary, turks, egypt, aztecs, sharn, skyrim, colovia, ever, denmark, }
            {
                capability
                {
                    recruit_pool "Fighters Guild Heavy"  1   1.0  1  0  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, france, aztecs, sharn, colovia, } and event_counter fighters_guild_minor 1
                    recruit_pool "Fighters Guild Heavy"  1   1.0  1  2  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, france, aztecs, sharn, colovia, } and event_counter fighters_guild_mod 1
                    recruit_pool "Fighters Guild Heavy"  1   1.0  1  4  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, france, aztecs, sharn, colovia, } and event_counter fighters_guild_major 1
                    law_bonus bonus 2
                    population_health_bonus bonus 1
                    weapon_melee_blade 2
                }
                material wooden
                construction  1 
                cost  4500 
                settlement_min city
                upgrades
                {
                    gm_fighters_guild
                }
            }
            gm_fighters_guild requires factions { england, scotland, venice, mongols, byzantium, altmer, russia, spain, moors, poland, france, timurids, milan, sicily, hungary, turks, egypt, aztecs, sharn, skyrim, colovia, ever, denmark, }
            {
                capability
                {
                    recruit_pool "Fighters Guild"  1   1.0  1  0  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, france, aztecs, sharn, colovia, } and event_counter fighters_guild_minor 1
                    recruit_pool "Fighters Guild Heavy"  1   1.0   1  0  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, aztecs, france, sharn, colovia, } and event_counter fighters_guild_minor 1
                    recruit_pool "Fighters Guild"  1   1.0  1  2  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, france, aztecs, sharn, colovia, } and event_counter fighters_guild_mod 1
                    recruit_pool "Fighters Guild Heavy"  1   1.0   1  2  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, aztecs, france, sharn, colovia, } and event_counter fighters_guild_mod 1
                    recruit_pool "Fighters Guild"  1   1.0  1  4  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, france, aztecs, sharn, colovia, } and event_counter fighters_guild_major 1
                    recruit_pool "Fighters Guild Heavy"  1   1.0   1  4  requires factions { england, scotland, skyrim,  moors, spain, venice, ever, mongols, denmark, byzantium, altmer, russia, egypt, turks, sicily, poland, hungary, milan, timurids, aztecs, france, sharn, colovia, } and event_counter fighters_guild_major 1
                    law_bonus bonus 3
                    population_health_bonus bonus 2
                    weapon_melee_blade 3
                }
                material wooden
                construction  1 
                cost  6500 
                settlement_min large_city
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }


    And I was able to differentiate between what level of mission you have at least by the starting experience of the units... could have of course made more of them availible...

    And the most intereresting part to do (and the hardest to figure out) were ancillary rewards. This is actually from mages guild, not fighters guild, but the system is the same. My intent was to give ancillary rewards to the characters (generals) who accomplished the missions, which turned out not easy at all (could have been easy for a FL I suppose tho). Mainly because triggers conditions that you need for when you finish missions cant be combined with the ones when general fought a battle, as it tests the conditions at different moments - WhenTotTest PostBattle vs LeaderMissionSuccess or alike... tried to use other variants, like CharacterTurnEnd etc. So had to use the counters and hidden traits to get this done.

    The hidden trait to "mark" the character who accomplished the missions (it doesnt specify the one, but any who fought the faction, but in my setting its a risk worth taking, as the players dont fight this dungeon faction very often)
    Spoiler Alert, click show to read: 
    Code:
    ;------------------------------------------
    Trait FoughtDungeon
      Characters family
      Hidden
        
        Level FoughtDungeon
            Description FoughtDungeon_desc
            EffectsDescription no_effects_desc
            Threshold  1
    ;------------------------------------------    Trigger dungeon1
        WhenToTest PostBattle
        Condition IsGeneral
            and WonBattle
            and GeneralFoughtFaction papal_states
               
         Affects FoughtDungeon 1 Chance 100
         
    ;------------------------------------------    
    Trigger dungeon2
        WhenToTest CharacterTurnStart
        Condition IsGeneral
            and Trait FoughtDungeon = 1
               
         Affects FoughtDungeon -1 Chance 100


    It takes away the trait from the character next turn, so he doesnt receive any more rewards afterwards, while he receives the ancillary at the end of turn.

    And the final potion (ancillary) reward part:

    Spoiler Alert, click show to read: 
    Code:
    ;------------------------------------------
    Trigger potion_reward_mages_hitpoints1
     WhenToTest CharacterTurnEnd
    
    
     Condition IsGeneral
         and I_EventCounter mages_guild_minor = 1
         and Trait FoughtDungeon = 1
    
    
    AcquireAncillary potion_hitpoints_1 chance  50
    
    
    ;------------------------------------------
    Trigger potion_reward_mages_hitpoints2
     WhenToTest CharacterTurnEnd
    
    
     Condition IsGeneral
         and I_EventCounter mages_guild_mod = 1
         and Trait FoughtDungeon = 1
    
    
    AcquireAncillary potion_hitpoints_2 chance  50
    
    
    ;------------------------------------------
    Trigger potion_reward_mages_hitpoints3
     WhenToTest CharacterTurnEnd
    
    
     Condition IsGeneral
         and I_EventCounter mages_guild_major = 1
         and Trait FoughtDungeon = 1
    
    
    AcquireAncillary potion_hitpoints_3 chance  50


    There is of course more potions etc, but that would be just repetition.

    Apart from this, of course its needed to create or change various texts in /data/text/missions.txt and you can give a special mission pics in the /data/ui/culture...
    Last edited by Jadli; January 02, 2021 at 07:15 AM.

  5. #85
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: A Guide for Missions

    Quote Originally Posted by Jadli View Post
    Well, if its somewhat a unique missions, it wouldnt be that hard to create script to assign it based on some requirements of yours, which is probably the only way then. Thinking of it, it wouldnt have to bery complex, and would work probably more realiably anyway. The bad part about scripting it is, that you would have to make a copy of the script for each faction, as in the command you always have to specify a receiving faction.
    The problem with using create_mission in CS isn't specifying the faction (as shown in my mission, only england should get this mission), it's specifying the target character. The create_mission command requires the target's label as a parameter which is completely incompatible with the idea of targeting anything with 10 Magic from a trait/ancillary.

    Thanks for sharing your setup with guild missions. I notice that in your campaign_script portion, you're using a lot of FactionTurnStart monitors which can be easily combined into a single monitor with multiple if-blocks to improve performance. This is what I was recommending in the other thread you posted - reducing number of monitors will improve your mod's AI turn times.

    Doesn't LeaderMissionSuccess export the character ID of the character who completed the mission (and not the leader ID)? If so, couldn't you just use a single ancillary trigger:

    Spoiler Alert, click show to read: 

    Code:
    Trigger potion_reward_mages_hitpoints1
    WhenToTest LeaderMissionSuccess
    Condition MissionID fighters_dungeon   ;not sure this is the correct mission ID
       and IsGeneral
       AcquireAncillary potion_hitpoints_1 chance 50


    If LeaderMissionSuccess exports the faction leader's ID then this obviously doesn't work. The AssassinationMission event also exports character record, maybe it exports the character who completes the mission even if they're a named character? Another thing you could do is use the LeaderOrderedAssassination event to set an event_counter to 1 indicating that the event is active, then only grant that shadow trait FoughtDungeon when the the event counter == 1, this still wouldn't guarantee that the shadow trait is given to the correct character, but it gets you closer if none of the other assassination-events export the correct character data. You could use MissionFinished to set the counter to 0.

    Another way you could expand this script is by using the SufferAssassinationAttempt event which fires for the assassination target when the attempt fails. You could use this to send out messages or add more units to the target's army (making it harder next time around) or replenish his units or etc. etc.

  6. #86
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Quote Originally Posted by Callistonian View Post
    The problem with using create_mission in CS isn't specifying the faction (as shown in my mission, only england should get this mission), it's specifying the target character. The create_mission command requires the target's label as a parameter which is completely incompatible with the idea of targeting anything with 10 Magic from a trait/ancillary.
    Well, youneuoy's tool would solve this issue for you. You can give labels based on traits, ancillaries, etc. You could also also reuse the same label multiple times, more characters can have the same one, etc...

    Quote Originally Posted by Callistonian View Post
    Thanks for sharing your setup with guild missions. I notice that in your campaign_script portion, you're using a lot of FactionTurnStart monitors which can be easily combined into a single monitor with multiple if-blocks to improve performance. This is what I was recommending in the other thread you posted - reducing number of monitors will improve your mod's AI turn times.
    Yes, I need to reduce my monitor conditions indeed

    Quote Originally Posted by Callistonian View Post
    Doesn't LeaderMissionSuccess export the character ID of the character who completed the mission (and not the leader ID)? If so, couldn't you just use a single ancillary trigger:

    Spoiler Alert, click show to read: 

    Code:
    Trigger potion_reward_mages_hitpoints1
    WhenToTest LeaderMissionSuccess
    Condition MissionID fighters_dungeon   ;not sure this is the correct mission ID
       and IsGeneral
       AcquireAncillary potion_hitpoints_1 chance 50


    If LeaderMissionSuccess exports the faction leader's ID then this obviously doesn't work. The AssassinationMission event also exports character record, maybe it exports the character who completes the mission even if they're a named character? Another thing you could do is use the LeaderOrderedAssassination event to set an event_counter to 1 indicating that the event is active, then only grant that shadow trait FoughtDungeon when the the event counter == 1, this still wouldn't guarantee that the shadow trait is given to the correct character, but it gets you closer if none of the other assassination-events export the correct character data. You could use MissionFinished to set the counter to 0.

    Another way you could expand this script is by using the SufferAssassinationAttempt event which fires for the assassination target when the attempt fails. You could use this to send out messages or add more units to the target's army (making it harder next time around) or replenish his units or etc. etc.

    Well, the one you had shown might work if you used MissionFinished, Im pretty sure that LeaderMissionSuccess exports the leader's ID, but as I said, I wanted to reward the general(s) that accomplished the missions, not every general.

    LeaderMissionSuccess exports the leaderID so you can give him an anc/traits through this ...eventhough most of times its used for something else, such as in EDG. Anyway, all the "WhenToTest" and "Conditions" for the actual missions can be very confusing, because word "mission" is also used for when assassin assassinates, or when a spy enters a city, (or for diplomacy missions),... and with (some of ) those is used condition "MissionSuceeded" and if I remember correctly from my tests, that one doesnt have anything to do with actual missions as well, it didnt work (succeeded in its context means the assassin managed to assassinate, etc...). And afaik I believe I tried those and it doesnt work for named charactrs, because its simply about assassination mechanic.

    So the availible events ("WhenTotTest") directly for actual missions is only only LeaderMissionSucess, LeaderMissionFailed and MissionFinished afaik. I tried all the various things with MissionFinished as well, but its still the same answer. If you would want to give it to any general randomly, it would likely work somehow, but as I needed to label the general that accomplished the missions (who took the dugeon) I had to use GeneralFoughtFaction and that simply cant work with this, as that one works only with WhenToTestPostBattle

    Well, your idea with LeaderOrderedAssassination (when and what for does it exactly fire anyway?) seems to be doing pretty much the same as my solution with the reward counters, but it wouldn work with the "assassination" events and conditions anyways afaik.

    Hm, well SufferAssassinationAttempt would def not fire unless you truly use assassin and make an attempt, which is not what we want.. Though, I havent even known this one event existed so should first test it I suppose. Though, I would bet all the events and conditions that have "assassin" in its name are tied only to assassins doing their assassin stuff. Nice idea with replenishment and events, but would require a huge amount of work probably... and mainly I cant spawn units inside forts . However you just gave a me a good idea to give high battlesurgery to the dungeon leaders, so in case you fail to take them out in the battle, more of the garison shall survive
    Last edited by Jadli; January 02, 2021 at 09:41 AM.

  7. #87
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: A Guide for Missions

    Quote Originally Posted by Jadli View Post
    [...]"mission" is also used for when assassin assassinates, or when a spy enters a city, (or for diplomacy missions),... and with (some of ) those is used condition "MissionSuceeded" and if I remember correctly from my tests, that one doesnt have anything to do with actual missions as well, it didnt work (succeeded in its context means the assassin managed to assassinate, etc...). And afaik I believe I tried those and it doesnt work for named charactrs, because its simply about assassination mechanic.
    I was afraid that might be the case. I know it works this way for princess "missions" and I recently did something similar with inquisitor "missions" and they behave the same way - denouncing anyone with an inquisitor is considered a "DenouncementMission" and there isn't even a mission type (in descr_missions) for denouncements.

    Quote Originally Posted by Jadli View Post
    Well, your idea with LeaderOrderedAssassination (when and what for does it exactly fire anyway?) seems to be doing pretty much the same as my solution with the reward counters, but it wouldn work with the "assassination" events and conditions anyways afaik.
    Ya, if the AssassinationMission event fires for any assassination, then LeaderOrderedAssassination probably fires when you press the button on an assassin's scroll to attempt an assassination.

    Quote Originally Posted by Jadli View Post
    Hm, well SufferAssassinationAttempt would def not fire unless you truly use assassin and make an attempt, which is not what we want..
    Yep, you're right. I was probably thinking of how I used the inquisitors. Well, I tried to help, took some swings and got some misses. What can I say? I'll let myself out with your trademarked emoji:

  8. #88
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    BTW, anyother bad news...

    I expected that "link_mission_id" (the one that gives you a specified mission immediately once you finish the first mission) would logically work for every mission, because it doesnt really touch anything with the mechanics of missions itself, but unsurprisingly, it doesnt work for every mission... Dont remember which one I tried right now, but yea...

    But I suppose it at least somewhat assures us that whether some of the parameters work with some type of missions depends clearly simply on which parameters were assigned to which missions by the devs... So perhaps once some day someone (such as youneoy) digs into this, it might perhaps not be difficult to make more parameters work with more missions.

  9. #89
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Quote Originally Posted by Callistonian View Post
    I'm want the mission to target any character with a particular attribute level (10 Magic). This works, but only if the character with the attribute level is within the mission faction's regions or in a rebel bordering region. I tried adding the 'target_faction' parameter to the mission, but it still wouldn't grant the mission unless the target was within the mission faction's regions or bordering them.
    Im still not sure what exact kind of mission you wanted to make, whether it was supposed to be totally generic one (pretty much the same as vanilla kill generals ones, but with increased proximity) or a more unique one, like when a characters gets a ring and you want everyone to to hunt him down.

    If its the later to some extent, you are in luck (or simply you are also in luck if you can just make sure that the possible targets are only starting or spawned characters. So if I go with ring assumption, in ring triggers/scripts include condition for checking if its a starting/spawned general - via another trait/anc given to all the starting/spawned generals).

    This would do it

    Code:
    monitor_event CharacterTurnEnd CharacterIsLocal
        and IsGeneral
        and Trait character_1  = 1         ;(or "and HasAncType character_1") unique per each starting/spawned general
        and I_CharacterExists character_label1  ; character's label that you set in accordance with the personal trait/anc for every starting/spawned possible target genera
        and Trait Magic = 10 ; the unique attribute you are using... I assume its caused by an anc/trait so you could also check that instead
        
            if not I_IsFactionAIControlled england
                   create_mission assassinate_general england character_label1
            end_if
    
            if not I_IsFactionAIControlled denmark
                   create_mission assassinate_general denmark character_label1
            end_if
    
    ...
    
    end_monitor
    
    ; you can of course also check for you guild/building, etc
    Though, simply using EOP would make your life easier (you can just assign labels based on traits/ancs, such as simply based on the ownership of the ring).

    Kinda got back to these thoughts, because I found out I might have to assign dungeon missions manually, as I cant get AI to completely ignore the dungeon forts (they dont attack it all, just keep larger garisons around, which slows their expansion a lot). Though the solution seems to be to put the tiles of dungeons into a neutral region, that has its settlement inacessible, tho gotta test that properly to confirm (possibly it will work as well if the region is inaccessible player controlled region, which would likely still allow for automatic missions). Then the mission wouldnt trigger on its own, hence the need for manual. Just gonna post how would that work, if anyone is dealing with a similar issue.

    EDCT triggers
    Code:
    Trigger Local_generals
     WhenToTest CharacterTurnEnd
    
    
     Condition and CharacterIsLocal
             and IsGeneral
    
              
     Affects Im_the_local_faction1 1 Chance 100 ; the trait giving all player's faction generals Magic = 10
    
    
    ;------------------------------------------
    Trigger Suitable_target_for_England_level_1 
     WhenToTest CharacterTurnEnd
    
    
     Condition Trait DungeonLevel = 1 ; (the level reflects guild level that the faction has, could be also 2 or 3) 
           and I_EventCounter England_has_the_guild = 1 ; (or 2 and 3 based on guild level that the faction has, checked by monitor_event)
           and I_CharacterTypeNearCharacterType dungeon_faction named_character 30 england named_character ; checking if the faction armies are close to a dungeon. Think that one doesnt work as it probaby doesnt export the characters, then lets use: (tho why not have both to make sure)
           and HighestAttAdjacentChar Magic named_character = 10  ; some unique value of an unused atrribute that was given the generals of a local faction, such as Magic. Not sure at what exact distance doesi it work tho
           and FactionType papal_states
           and Trait dungeon_character_1 ; a trait specific to a dungeon character, coud be an ancillary as well (instead could be also used I_CharacterTypeNearTile for england with coords of that dungeon I guess)
              
     Affects dungeon_character_1_suitable 1 Chance 100
    
    ;------------------------------------------
    and then similar things like the one I suggested for you

    Code:
    monitor_event CharacterTurnEnd CharacterIsLocal
        and IsGeneral
        and Trait dungeon_character_1_suitable  = 1         ;(or "and HasAncType character_1")
        and I_CharacterExists dungeon_label1  ; dungeon character's label, they are all starting inactive characters
        and Trait DungeonLevel = 1 ; Again, could be also 2 or 3  
        and FactionType papal_states ;redundant, as only dungeon characters have DungeonLevels
        and HighestAttAdjacentChar Magic named_character >= 10 
        
            if not I_IsFactionAIControlled england
                 and I_EventCounter England_has_the_guild = 1
                   create_mission assassinate_general england dungeon_label1 ; first level of mission
            end_if
    
           if not I_IsFactionAIControlled england
                 and I_EventCounter England_has_the_guild = 2
                   create_mission m_assassinate_general england dungeon_label1 ; second level of mission
            end_if
    
           if not I_IsFactionAIControlled england
                 and I_EventCounter England_has_the_guild = 3
                   create_mission gm_assassinate_general england dungeon_label1 ; third level of mission
            end_if
    
            if not I_IsFactionAIControlled denmark
                 and I_EventCounter denmark_has_the_guild = 1
                   create_mission assassinate_general denmark dungeon_label1 ; first level of mission
            end_if
    
    ...
    
    end_monitor
    Though, if I truly end up going this way, Im gonna use EOP for this, which would make it much easier - give trait dungeon_character_1_suitable in a similar way and then easily assign labels to dungeon characters near to the local player faction, without the need for specific label and trait/anc for each specific dungeon general, which would otherwise make the scripting pretty long.


    EDIT

    The tiles under dungeons worked, missions are assigned normally, so thankfully I dont have to script this
    Last edited by Jadli; January 30, 2021 at 10:20 AM.

  10. #90
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    BTW, I suppose an interesting missions behavior is the one I used in the latest version of my mod.

    All targets (dungeons) are in 1 tile area from Dungeon Region, which is given to player in the first turn via "capture_settlement" command. But what is interesting that I made a hotseat compatible version of this, so that i the beginning of each turn the "capture_settlement" is used, so all factions would have access to those dungeons missions (as if they are not in their region, there would be no missions), and it surprisingly works with no flaw.

    To summarize, factions receives the Dungeon Region (which includes the viable mission targets) at the beginning of their turn (FactionTurnStart) and in the same turn they may receive a mission for one of those targets. I find it interesting, thats its possible to receive missions for targets that you technically wouldnt have been able to receive at the initial beginning of your turn.

  11. #91
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: A Guide for Missions

    If you're using assassinate_general to target the forts, then this is not surprising. It's exactly the same behavior that I was describing when I couldn't get that mission to be given unless the assassination target was inside the faction's territory.

  12. #92
    Miszel's Avatar Domesticus
    Join Date
    Aug 2012
    Location
    Warsaw, Poland
    Posts
    2,295

    Default Re: A Guide for Missions

    So in the lastest build of Tsardoms there is a weird bug with mission rewards: you get best units of faction that is not yours, for example as Bavaria i would get what i assume were Tatar units. Has anyone ever had a similar problem? Best buildable unit is just linked to the EDU and your barracks level or is there anything else?

  13. #93
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    isnt in the files actually "best_exotic_unit"? That gives you a unit from your roster that is not (yet) availible to recruit

  14. #94
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Well, jojo on disc told me how does the "income" payback works, Of course, as the files say, its supposed to give you money reward based on your income (a fraction/multiplication of it), instead of a given amount, like when using "(guild)_money" payback.

    The reason I couldnt get it working was because the files are actually wrong. Its not "income", but "income_percent". So you just write into your payback this:

    "income_percent 1.0" (or other number of course)

    Jojo thinks the formula for determing the amount should be something like this: "(((turnnumber-1)x2+turnnumber-1)+someIncome)x thatFactor "
    Last edited by Jadli; February 22, 2021 at 03:14 AM.

  15. #95
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Alright, I have done lot of testing today, regarding which missions can be given via create_mission command.

    Missions that can be given via create_mission and their formulae (tested):
    Code:
    ; create_mission council_take_settlement receiving_faction ; (works also for guild_take_settlement and council_take_rebel_settlement)
    ; create_mission council_blockade_port receiving_faction
    ; create_mission send_emissary receiving_faction
    ; create_mission reinforce_region receiving_faction
    ; create_mission send_emissary receiving_faction
    ; create_mission give_ancillary receiving_faction
    ; create_mission gift_from_council receiving_faction ; (gift_from_pope also works) 
    ; create_mission council_marry_princess receiving_faction
    ; create_mission assassinate_witch_heretic receiving_faction (pope_mission)
    ; create_mission assassinate_general receiving_faction target_character_label
    ; create_mission adventure_crusader receiving_faction character_label
    
    EDIT
    ; create_mission papal_build_church receiving_faction settlement (pope_mission) - Works, but maybe not for all levels of buildings?
    (of course, it works for mission variants as well)

    Of course, lot of them are not easy to receive, if some of the mission parameters are not met. The notes from SEGA claims that papal_build_church works like this, but I havent managed to get it working. Only thing that I got from it was a CTD, when I changed settlement name to region name.




    And the ones below I didnt manage to get working...
    Code:
    ; guild_build
    ; guild_trade_agreement
    ; guild_recruit_agent
    ; guild_acquisition
    ; regicide
    ; annex_settlement 
    ; recruit_priest (pope_mission)
    ; give_cash (pope_mission)
    ; convert (pope_mission)
    ; break_alliance (pope_mission)
    ; papal_blockade_port (pope_mission)
    ; assassinate_cardinal (pope_mission)
    ; cease_hostilities (pope_mission)
    ; return_papal_settlement (pope_mission)
    ; give_settlement
    Im willing to believe that several of them work, I just havent managed to meet the parameters, as some of them have relatively complex ones... But pretty sure some of them simply cant be given via create_missions, such as the guild ones, as Im pretty sure I met all the requirements for those...

    So, it looks pretty good, compared to what we though was possible before, cca half of them works. And at least I managed to put it together finally

    (BTW, based on our idea Callistonian, jojo is lookin into the game to see, if its possible to use give_settlement to transfer settlements somehow )

    EDIT
    Also, as I said like 3 pages back, good information is, that the parameter "non_pope_mission" can be used for types of missions "convert", "break_alliance", "assassinate_witch_heretic" and "papal_build_church". That means there is likely some way to to use them not only for papal purposes. "convert" is already used in teutonic DLC as part of teutonic_capture and convert missions.

    EDIT 2

    link_mission_id seems to be more powerful than create_mission in some way, it gives you a new specified mission the moment you finish the given mission. Its a parameter that can be used only for "council_take_settlement" it seems, but it can give you almost any mission the moment you finish the _take_settlement mission.
    I was able to receive several missions that I werent able via create_mission. The confirmed for now are: give_settlement, convert, council_take_settlement, gift_from_council, give_cash, convert, recruit_priest, send_emissary, reinforce_region (many more likely, it seems to override the mission parameters to some extent)
    I wasnt able to get assassinate_general type, but perhaps I didnt meet some criteria. Anad again wasn able to get papal_build
    Last edited by Jadli; March 13, 2021 at 06:31 AM.

  16. #96
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: A Guide for Missions

    Quote Originally Posted by Jadli View Post
    Of course, lot of them are not easy to receive, if some of the mission parameters are not met. The notes from SEGA claims that papal_build_church works like this, but I havent managed to get it working. Only thing that I got from it was a CTD, when I changed settlement name to region name.
    I thought your first list was a list of all mission types you have successfully created using create_mission. Are there any others on the list that you haven't been able to create but are just relying on the notes?

    There are some specific conditions that must be met for missions to be created. I have a note in my file that the guild_take_settlement mission (and presumably all other guild mission types) can only be created if the faction has a guild building (presumably any guild). I think the pope mission types can only be created for factions with the same religion as the papal_faction but I haven't tested this.

    I haven't managed to create any of the ones you were unable to. I'm inclined to agree that we just don't know the necessary conditions for creating those.

    Quote Originally Posted by Jadli View Post
    (BTW, based on our idea Callistonian, jojo is lookin into the game to see, if its possible to use give_settlement to transfer settlements somehow )
    Have you managed to get the give_settlement mission to be created normally (without create_mission)? Can it only be given when linked to by a council_take_settlement mission? Can other missions link like this? If the give_settlement mission can be granted independently of any other linked mission and it can accept parameters other than only target_faction and it can be created using create_mission and AI factions receive and act on missions, then we might be on to something as far as a script for transferring regions. But it seems like the stars would have to align for all that.

  17. #97
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Quote Originally Posted by Callistonian View Post
    I thought your first list was a list of all mission types you have successfully created using create_mission. Are there any others on the list that you haven't been able to create but are just relying on the notes?
    What do you mean? Those are missions that I tested and worked for me (didnt test give_ancillary tho, but that one has been proven for years)


    Quote Originally Posted by Callistonian View Post
    There are some specific conditions that must be met for missions to be created. I have a note in my file that the guild_take_settlement mission (and presumably all other guild mission types) can only be created if the faction has a guild building (presumably any guild). I think the pope mission types can only be created for factions with the same religion as the papal_faction but I haven't tested this.
    Yea, and also the settlement must be a neigboring settlement and so on. (interestingly, the resource_type can be both. hidden resource and trade resource)

    The parameters in descr_missions of the mission type must fullfilled, otherwise you cant create those missions. The only create_mission that doesnt care about it seems to be "assassinate_general" (which is why we like this one the most anyway)


    Quote Originally Posted by Callistonian View Post

    I haven't managed to create any of the ones you were unable to. I'm inclined to agree that we just don't know the necessary conditions for creating those.
    Well, I would say most of them follow the the same 2-words create_mission formula (mission_name + faction), its just not simple to fullfil the parameters etc, or some of them simply dont work like that.


    Quote Originally Posted by Callistonian View Post
    Have you managed to get the give_settlement mission to be created normally (without create_mission)? Can it only be given when linked to by a council_take_settlement mission? Can other missions link like this? If the give_settlement mission can be granted independently of any other linked mission and it can accept parameters other than only target_faction and it can be created using create_mission and AI factions receive and act on missions, then we might be on to something as far as a script for transferring regions. But it seems like the stars would have to align for all that.
    Yea, I use it regularly in my mod, also easily imported it into bare geomod.

    It has no parameters, so there is probably no way to assign it "randomly" via the missions without being linked... Though I havent actually tried giving it some parameters, so will try.

    As we talked months back, I believed that link_mission_id could be used for any mission, because why not, but it cant . Disappointing indeed... would have been nice to create some "storyline" via mission... though I guess you still can, but via checking paybacks. Though perhaps we can at least link _take_settlement to each other.

    Those are lot of ifs . The note to this mission in descr_missions seem to suggest the AI can have this mission, and decide to keep or give the settlement somehow... Though, I think only useful think would be, if jojo managed to see insides of this mission, and perhaps discovered some new command to transfer settlements (as there is no actual easy way to do it). The mission might have something in common with return_papal_settlement tho, where you can specify a settlement.... not sure

    Also, due the way its used in british isles I have still been a bit confused how it worked there (and am lazy to stat a britanny campaign) due to the "only_dead_source_factions" which is somehow supposed to give you the mission when barons alliance is dead, or I assume dont have any settlements, so perhaps this is an interesing way to re emerge factions as well. In my mod, I removed the parameter, as otherwise the missions werent given. The way Im using is that that two rival (alive) factions task their neighbors with taking the other one's settlements


    EDIT, also forgot that you can link council_take_settlement to convert missions (such as the very good teutonic captureconvert missions). Maybe you can link any mission, but you can use the parameter only for this take_settlement mission... will check
    Last edited by Jadli; March 12, 2021 at 02:45 PM.

  18. #98
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Yes, testing link_mission_id turned out actually pretty well.

    I edited the post 95 with some more info on pope missions and link_mission_id

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

    Default Re: A Guide for Missions

    The notes from SEGA claims that papal_build_church works like this, but I havent managed to get it working. Only thing that I got from it was a CTD, when I changed settlement name to region name.
    I have this in my notes...

    This gives a "could not create mission" error:
    create_mission papal_build_church france Paris (when Paris has small_church)
    …but this works…
    create_mission city_small_church france Paris (when Paris has no small_church)

    Which suggests that papal_build_church doesn't work but variations of that mission type do.

  20. #100
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Ah, I see, thanks for the info. Tested it and got the same result, weird indeed .... though I couldnt get city_abbey working when Paris has church either... perhaps there is some required papal standing or something...

    Anyway, as I said this mission can use "non_pope_mission" parameter (hence it doesnt need a papal faction), so its entirely suitable to use in mods, and the easiest to import. So when you need a player to build some special building for some event, etc, this is a very nice way to do it


    EDIT

    Aand a very interesting result.

    If you give the barons alliance mission to take a settlement from England and give it to them (the subsequent mission) to an AI, it works! I knew which was the settlement that would get selected and the AI gave the settlement to Barons alliance, didnt keep it!
    Last edited by Jadli; March 13, 2021 at 03:00 PM.

Page 5 of 8 FirstFirst 12345678 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
  •