Page 8 of 8 FirstFirst 12345678
Results 141 to 160 of 160

Thread: A Guide for Missions

  1. #141

    Default Re: A Guide for Missions

    Quote Originally Posted by bitterhowl View Post
    Well, yes, I'm using outlive parameters in my CAI TrueGeneral and give some instructions such as restricted peace, alliance and protectorates treatment between this factions. I also add invade_priority and desire_points to outlive_target. This way AI behaviour could simulate victory conditions achieving.
    Please post a usage example for descr_campaign_ai_db.xml, I'm interested to see how this looks.

    Quote Originally Posted by bitterhowl View Post
    But you're right - let's speak those who saw engine machinery from inside. My question is just how to use missions mechanics in-game.
    Jojo or youneuoy may know this by now.

    Quote Originally Posted by bitterhowl View Post
    And another question from me - do the mission parameters hardcoded to mission types, for example - assassination_chance working only for assassins_guild? Or I can use it in every mission I lke as a penalty?
    This I can answer and the answer is 'no'. In general, you can't mix and match parameters with different mission types. Sometimes it works, but usually not. Jadli and I discussed this earlier in this thread - he might have a definitive list of which parameters work with each mission type by now. I'll ask him.

  2. #142
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: A Guide for Missions

    Code:
                <decision_entry>
                    <min_entry    target_human="true" is_faction_to_outlive_target="true" />
                    <max_entry    stance="Neutral" military_balance_plus_enemies="0.55" has_alliance_against="false"/>
                    <faction_attitude    invade="invade_buildup" invade_priority="20000" want_peace="false" pts_invasion="400" can_force_invade="false"/>
                </decision_entry>
                
                <decision_entry>
                    <min_entry    target_human="true" is_faction_to_outlive_target="true" has_alliance_against="true"/>
                    <max_entry    stance="Neutral" alliance_military_balance="5.55"/>
                    <faction_attitude    invade="invade_buildup" invade_priority="15000" want_peace="false" pts_invasion="400" can_force_invade="false"/>
                </decision_entry>
            
                <decision_entry>
                    <min_entry    target_human="true" is_neighbour="true" is_faction_to_outlive_target="true" has_alliance_against="true"/>
                    <max_entry    stance="Neutral" rand="0.777"/>
                    <faction_attitude    invade="invade_opportunistic" invade_priority="10000" want_peace="false" pts_invasion="1000" can_force_invade="true"/>
                </decision_entry>
                
                <decision_entry>
                    <min_entry    target_human="true" is_faction_to_outlive_target="true" has_alliance_against="true"/>
                    <max_entry    stance="Neutral" rand="0.777" is_neighbour="false" />
                    <faction_attitude    invade="invade_opportunistic" invade_priority="10000" want_peace="false" pts_invasion="1000" can_force_invade="false"/>
                </decision_entry>

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

  3. #143
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: A Guide for Missions

    Can't make assassination mission working.

    Code:
    mission    assassinate_general
    {
        COUNCIL_MISSION
        duration 10
        exclude_duration 25
        score_modifier 1.2
        ;difficulty_threshold 0.4        ; assassination mission marked as too difficult if chance of success <= 40%
        turn_start        0
        paybacks
        {
        random 0.33    payback_id council_mod_income
        random 0.5    payback_id council_mod_unit
        payback_id council_mod_unit_best
        }
       
        enemy_modifier    30.0
        own_region_modifier    50.0
        per_unit_modifier    4.0
        character_type    named_character
        attribute_type    Command
        attribute_min_threshold    5
    
    }
    
    mission    assassinate_general assassinate_king
    {
        COUNCIL_MISSION
        duration 12
        exclude_duration 25
        score_modifier 1.2
        ;difficulty_threshold 0.4        ; assassination mission marked as too difficult if chance of success <= 40%
        turn_start        1
        factions { england, scotland, venice, spain, moors, france, milan, }
        paybacks
        {
        random 0.11    payback_id council_mod_income
        random 0.33    payback_id council_mod_unit
        payback_id council_major_unit
        }
       
        neutral_modifier    100.0
        enemy_modifier    100.0
        killed_by_any_means
        expire_on_hide_disabled
        character_type    leader
        }
    Declaring war on faction Bolton (venice) at turn 0, their king is in my region.

    Code:
    monitor_event FactionTurnStart not IsFactionAIControlled
    and I_TurnNumber = 0
    console_command create_mission assassinate_king scotland bolton1
    end_monitor
    
    monitor_event FactionTurnStart not IsFactionAIControlled
    and I_TurnNumber = 1
    console_command create_mission assassinate_general scotland bolton1
    end_monitor
    Got couldn't create mission message in log.

    Upd. Added this to first mission entry - same result.
    killed_by_any_means
    expire_on_hide_disabled
    Last edited by bitterhowl; January 28, 2024 at 09:13 PM.

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

  4. #144

    Default Re: A Guide for Missions

    Thanks for the usage example. That may come in useful at some point.

    I know for a fact that it's possible to create the assassinate_general mission type in script. Have you tried using the character name instead of the label? Have you tried using the script command version of create_mission instead of the console command? I would also recommend making a new custom mission subtype for this and removing as many parameters as you can (they aren't needed if you're creating the mission in script).

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

    Default Re: A Guide for Missions

    I could create mission for take_settlement for another script and it works fine with console_command.

    I want to script enemy general assassination mission for devastating tile event when it occurred in player's region. Want to script it in CS, I thought that engine will match this general as a valid target because he will be close enough to my settlements/characters.

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

  6. #146
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: A Guide for Missions

    Ok, I got assassination mission working for general
    Code:
    mission    assassinate_general
    {
        COUNCIL_MISSION
        duration 10
        exclude_duration 25
        score_modifier 1.2
        ;difficulty_threshold 0.4        ; assassination mission marked as too difficult if chance of success <= 40%
        turn_start        0
        paybacks
        {
        random 0.33    payback_id council_mod_income
        random 0.5    payback_id council_mod_unit
        payback_id council_mod_unit_best
        }
       
        enemy_modifier    30.0
        own_region_modifier    50.0
        per_unit_modifier    4.0
        character_type    named_character
        attribute_type    Command
        attribute_min_threshold    0
        killed_by_any_means
        expire_on_hide_disabled
    
    }
    But for leader - log says that can't create it.

    Also log rejects to create assassination mission scripted for general without label. So my idea to punish devastators by script seems not to be working.

    Interesting finding - whan I ask to take settlement engine rejects but give another settlement which is a bit closer to my borders.

    [game.script] [error] Script execution error for <console_command>, at line 341, in mods/KingofRiverandHills/data/world/maps/campaign/imperial_campaign/campaign_script.txt:
    create_mission council_take_rebel_settlement scotland Sisterton
    Successfully created mission council_take_rebel_settlement for faction >@>;L 0 >@A:>< "@>=5
    It says me to capture Bear Keep instead of Sisterton.

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

  7. #147
    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, great to see some other people are also interested in missions and can use the knowledge

    Answers for almost all your questions are answered in my posts at the last few pages, so I recommend to re read those... I believe I tested and tried everything possible with missions (and I also dare to stay that my mod is likely the one that expands on missions the most), and have a pretty consistent knowlege about them... so feel free to ask more questions... The probably only part that I werent able to explore fully were papal missions, but I plan to do so at some point...

    in regards to a few specific questions:

    Quote Originally Posted by bitterhowl View Post
    I saw mention about "AI chance to mission modifier" or something like that, so I decided that AI use missions too.
    Im fairly sure AI is not supposed to have (regular) missions. There are many ways to check, such as simply take over factions during campaign... you willl see they never have any (except maybe stuff like crusade and some papal missions related to papal standing etc).

    Furthermore, I tested what happens if you force them a mission (via console command or script, for example council take settlement). It was clear from my tests, that even if they have no missions, it doesnt affect AI decisions at all, it just doesnt do anything for them.

    The note that you saw could be possibly instead related to diplomacy_missions for AI, which are also quite an undiscovered territory http://www.twcenter.net/forums/showthread.php?642934 . Or, its also entirely possible, there is a line like this, but it doesnt do anything, or is just redundant. We have found many such examples in this old game...


    Quote Originally Posted by bitterhowl View Post
    And another question from me - do the mission parameters hardcoded to mission types, for example - assassination_chance working only for assassins_guild? Or I can use it in every mission I lke as a penalty?
    I discussed and eplored this in a great detail, see my post 105 for example.

    Unfortunately, missions and their parameters are pretty much hardcoded (and if one somehow manages to add a parameter to another mission without a crash, it doesnt usually do anything). So you just find the templates from the vanilla game, and go with that However, make sure to use vanilla DLCs descr missions as a base (I added a link for them in one of the first pages... you can also check missions in my mod). Some missions were expanded (such as as council take settlement) or added (such as adventurous crusader).

    Basically the only ones that are possible to "modify" in some extent are the three ones mentioned in the post 105 - assassinate_general, council_take_settlement and guild_take_settlement. The parameters that they are possible to be used with are described in that post, so check it out.

    Quote Originally Posted by bitterhowl View Post
    Can't make assassination mission working.
    Well, assassinate missions is the one that is probably the most useful in scripts, the command can definitely work. If I remember correctly, when giving it via command it can also override most of the mission requirements.

    However, one of the main things to keep in mind, if I remember correctly, is that this mission will not be created if the faction dont have an assassin? Or maybe that was just for the cases when its not given by a command... Also, there is a hashashin mission crusaders (or also vanilla?) to kill a leader, so check that out I guess

    Quote Originally Posted by bitterhowl View Post
    Interesting finding - whan I ask to take settlement engine rejects but give another settlement which is a bit closer to my borders.
    Well, this one is easy Check my list of missions that work with console command on previous page (that list is complete and correct).

    Syntax is "console_command council_take_settlement faction", not "console_command council_take_settlement faction settlement". You cant specify a target settlement (if you write something after a command, it simply is not read by the game... as it the case for all commands). Which is why this mission is essentially useless, in regards to giving it via script. It just selects a settlement based on the mission parameters in descr_missions.

    The only direct way is to use guild_take_settlement and use a hidden resource (and parameters need to be met I guess, such as the guild, the ratios, etc).

    Or you can put a character that cant move into the settlement, use assassinate mission (which almost always works) and mask it as a mission to take a settlement.

    So yea, missions are pretty limited... though a lot of stuff can still be done, as you can change mission description to whatever you want.
    Last edited by Jadli; January 29, 2024 at 12:33 PM.

  8. #148
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: A Guide for Missions

    Quote Originally Posted by Jadli View Post
    Well, going back to missions, I suppose using this type of mission, but without the link_mission_id would also be very interesting. One could replace the "mythical" Council of nobles with other factions asking you to take this and that (via source_faction), and they would reward and increase your relations... or decrease when you fail.
    By the way - I didn't find triggers in faction standings file for that, but relations are changed after mission result. Looks like it's hardcoded in engine.

    Also, in post #105 I didn't find information about assassination chance as penalty from assassin's guild explanation.

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

  9. #149

    Default Re: A Guide for Missions

    Quote Originally Posted by bitterhowl View Post
    I want to script enemy general assassination mission for devastating tile event when it occurred in player's region. Want to script it in CS, I thought that engine will match this general as a valid target because he will be close enough to my settlements/characters.
    You can't use create_mission for this because there's no way to get the devastating general's label (he might not even have one). However, the game is very good about creating this mission type when all conditions are met for characters on your territory or on neighboring territory. This is what I would suggest:

    EDCT
    Code:
    Trait DevastationID
     Characters all
     Hidden
     Level DevastationID
      Description empty
      EffectsDescription empty
      Threshold 1
      Effect Magic 100
    
    ;[...]
    
    Trigger DevastationAssignment
    WhenToTest GeneralDevastatesTile ;this fires at the end of the region-owner's turn
    Condition not Trait DevastationID > 0
    Affects DevastationID 1 Chance 100
    
    Trigger DevastationRemove
    WhenToTest CharacterTurnEnd
    Condition Trait DevastationID > 0
     and TimeInRegion > 1
    Affects DevastationID -1 Chance 100


    descr_missions.txt
    Code:
    mission assassinate_general assassinate_devastator
    {
     CUSTOM_MISSION_SOURCE
     duration 10
     exclude_duration 25
     turn_start 0
     paybacks
     {
      ;whatever
     }
     attribute_type Magic 
     attribute_min_threshold 99
     own_region_modifier 100.0 ;don't target devastating generals on neighboring regions
     character_type named_character
    }


    campaign_script.txt - this is optional, just ensures there's always an assassin present to create the mission
    Code:
    monitor_event FactionTurnEnd not IsFactionAIControlled
     spawn_army
      faction scripts
      character AgentSpawnCover, named character, age 20, x 1, y 1
      traits
      unit Whatever exp 0 armour 0 weapon_lvl 0
     end
     spawn_character scripts, ScriptAssassin, assassin, age 20, x 2, y 2
     console_command give_trait ScriptAssassin PerfectAssassin 1
     give_everything_to_faction scripts your_faction false
     kill_character AgentSpawnCover
    end_monitor
    
    monitor_event FactionTurnStart FactionType your_faction
     kill_character ScriptAssassin
    end_monitor


    I haven't tested this. It hinges on the mission not being cancelled if the assassination target no longer has the requisit Magic attribute.

  10. #150
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: A Guide for Missions

    Great idea! I suppose we don't need assassin's presence check if we'll set kill_by_any_means parameter.

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

  11. #151
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: A Guide for Missions

    As for assassination_chance as a penalty I decided to rename muslim_assassins_guild to mercenary_gulid so if this penalty is hardcoded to thst guild I think I still will be able to use it for their mission's penalty. I'd like to set it high enough, near 0.1-0.15.

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

  12. #152
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Sorry, forgot to respond.Yea, Im fairly sure you can freely use and change assassination_chance as a penalty (you just gotta add it to the payback list). If you set it to 1.0, then I guess it should kill all your generals, hence the faction is destroyed.I will add it to the post later I guess,as its not very common and ppl mostlu dislike it...

  13. #153
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: A Guide for Missions

    Thanks for the answer.

    My idea is to show that it's not so easy to rule the kingdom. If Mercenaries Guild is strong enough, had 3 tier building, and FL lost his authority, then Guild force him to start wars. If mission fails - they'll kill some generals. I think It's a good feature for the spirit of Westeros.

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

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

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Yea I mean I like it as well, the use can be interesting, for some special missions... I use it for advanced Dark Brotherhood missions for example Though seems like some players just rather avoid having the guild to avoid these missions... tho up to them I guess

  15. #155
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: A Guide for Missions

    I think I will give sensitive advantage for guild owners so player will have a hard decision to make.

    Merchants guild will dramatically increase the income. But will have some similar effects on FL with low authority.

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

  16. #156
    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, it would be ideal if one could always choose to accept or reject a mission if offered (such as the give settlement mission from Barons Alliance type of mission) instead of being unable to stop such a mision being triggered, especially when connected to guilds. Would make the whole guild system more interesting, as one could actively support some guilds etc...



    Now the only option is to basically let some missions expire if you dont want them... but then you cant have another mission generated for its duration (but you can have multiple missions if given by console command)... of course, there are all the triggers for guild points, but a player cant directly see how that works... Anyway, that is why I made the guild window in building browser with EOP, for players to be able to see

    Last edited by Jadli; February 22, 2024 at 02:29 AM.

  17. #157
    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, when characters die through the assassination_chance payback, are there the usual generic anouncements about the characters dying or not? If I remember correctly, there is none, right (which is a bit anti climatic and confusing for players)? ... or maybe I remember wrong and confuse this with EOP kill command, which also doesnt have thesem messages

  18. #158
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: A Guide for Missions

    I haven't finished this part of code yet, I'm finishing CAI for DaC 4.6 by local forum request (and made it too much variable, so elves started to fight dwarfs after relationships decreased, so they've asked me to fix the code).

    I think I'll make a special character who will be an "avatar" of Mercenaries Guild, and if he'll get negative traits such as anger or greed the guild will give FL some missions just like a blackmailing.

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

  19. #159
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: A Guide for Missions

    Hmm that sounds as a nice idea, you could connect the triggers for guild points to the traits of the character...

    Though of course, it will be difficult to fully connect this to the missions being triggered, as once a guild is built, it seem like the amount of guild points does matter but not sure how much... (I guess guild_score_modifier should be dealing with how much it matters)

  20. #160
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: A Guide for Missions

    I'm going to give some notorious missions directly by console command.

    Also - I had an Idea for Stark/Bolton struggling, made an event if Boltons kill particular Stark FL, but if player doesn't forced to do this event will not happen. So now I'll create a mission and this way event will be highlighted.

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

Page 8 of 8 FirstFirst 12345678

Posting Permissions

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