Page 1 of 4 1234 LastLast
Results 1 to 20 of 85

Thread: Know how about invasions and Ai-horde-mode behavior (for advanced users)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Icon4 Know how about invasions and Ai-horde-mode behavior (for advanced users)

    This information about hording & invasions is outdated! Please use the following Tutorial-link only ...

    [Tutorial] Know how about invasions and Ai-horde-mode behavior (for advanced users)

    ________________________________________________________________________________
    UPDATED POST since post #63

    >Updates are marked in RED<

    Okay, i'll try to explain in a few words (from what is possible) and with my poor english, what i have found out so far, in many hours of testing until now, about the ai-invasion mode behavior of hordes. The following text is not about the basics of invasions and nearly useless for beginners. But advanced users must admit that such post like this, containing all fundamental know-how about invasions and important answers to never answered questions, has never been written in this complexity.

    When we're talking about the invasions in modding therms, so the invasion begins here:
    A
    fter emerging a "spawned_on_event" marked faction (in descr_sm_factions.txt), with the "faction_emerge" command (in campaign_script.txt), they begin to act in horde-mode. They remain in this solely horde-mode, until they conquered at least one settlement. After successfully conquering their first horde target settlement (horde_target in descr_regions.txt), they are leaving their horde mode and become a normal faction. Only from this point we can finally influence them by the assigned Ai-script-section (in descr_campaign_ai_db.xml) and by their faction standings (in descr_strat.txt).

    Optimal horde-mode behavior sequence:
    1. Horde leader spawned after "faction_emerge" command...
    2. ... in outer east coord. for the east map border regions-outer north for north map border regions etc...
    2b. or at random coord. in the other middle map regions
    3. immediately decides for a valid horde-target settlement and move towards this
    4. horde reinforcement spawning
    5. horde reinforcement and Horde leader move on to meet each other
    6. together they move towards the previous selected horde target
    7. they change route and move towards each army in sight they want to attack. Then returning to point #5
    8. they attack and sack settlements (no conquer) on their way (sometimes even not on their straight route)
    9. finally, after many of those above distractions (when they are still alive), they arrive at the horde-target and give their best (...and rest) to occupy this settlement
    10. after successfully conquerring this settlement, they settle down and begin to act as a normal faction

    Influences points for the AI-Horde-mode behavior in order of relevance:
    1a. Valid horde target = distance, position, accessibility is fundamental.
    1b. horde settings in descr_campaign_db is fundamental, too.
    2. When using vanilla-invasion-structure (what i suggest) in campaign_script.txt, than spawn points (Horde leader & reinforcements), reposition_character command and I_CharacterTypeNearTile condition distance must be adapted to your map.
    3. horde settings in descr_sm_factions = horde strenght must be adapted to the goals and to the enemy strenght present in campaign.
    4. Ai pathfinding due to terrain and rivercrossing consistency of the given map.
    5. spotting range of generals and horde-leader

    A little side note; the last 2 influence point mentioned above, are also important for the non-horde factions.

    Horde-mode side notes:
    A.
    The distance between a horde-target-settlement to the first horde spawn point, from where the horde leader spawn, must (very important) be within around maximal 75 tiles to be valid. (Not good for big maps)
    B. new spawned horde reinforcements and faction leader will be moved immediately to meet each other
    C.
    new spawned horde faction leader, never considers to attack the settlement in the spawning region in the first rounds!? = (depends definitely on horde settings in descr_campaign_db)
    D. ATM it seems that ai-horde selects the nearest horde target from their spawning point!? = (this depends on horde settings in descr_campaign_db, too)
    E. new spawned horde faction leader, who is not moving in his first and second round, seems to had encountered issues which remain (not valid horde target) more or less for the rest of their campaign (or horde-mode existence) and for their later reinforcements, too!
    F. once a horde target settlement has been conquered and the horde settled down to become a normal faction, the other horde targets has no more relevancy for them, because they're no more a horde.
    G. inital faction standings seems not to influence horde
    H. victory conditions seems not to influence horde


    The secret key of the Ai-horde-mode-behavior is for sure the right mix-up of all this components adapted to every single given strategy map.

    I've found out that there was a scripted possibilty to let spawn our self made named-character within the 'faction_emerge' command as horde-leader! So we can make use of him in scripts, as we would like do with the other named characters.

    I've worked and tweaked a bit the
    descr_campaign_db, too. Some entries are not, what their names are supposed to be, and some are not, what comments suggested in some other threads.

    The Mongols invasion is working perfectly now. In about more than 200 testing games, only 1 time i've observed the horde doing nothing, but this one seems to be caused by the famous normal Ai issue.

    Sample of good working
    horde settings in my descr_campaign_db.xml:
    <hordes>
    <end_target_faction_bonus int="-300"/>
    <start_target_faction_bonus int="-500"/>
    <farming_level_bonus int="-50"/>
    <shared_target_bonus int="-1000"/>
    <disbanding_horde_bonus int="-500"/>
    <starting_region_bonus int="300"/>
    <horde_target_resource_bonus int="1000"/>
    </hordes>


    At this point i've successfully reached my mission goal to make the horde working nearly perfect and sharing my knowledge with you, because i'm a good guy ... who wanna earn some reps.

    BASICS: to mark a region as horde target you must add the line horde_target under the hidden resource line in the >descr_regions.txt<
    .....................................................................................................................................................


    PREVIOUS POST

    I hope i've managed the mongols (AI) problem, that they stands there and attack none and nothing.
    Please everyone firmed in the basics of modding, try out this one and then feedback please.
    Must restart campaign to take effect!
    There was no changes made for the other factions. Only the Mongols was modified.
    Last edited by Userpro; January 12, 2010 at 11:40 AM. Reason: UPDATED
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  2. #2

    Default Re: Mongols-Fix KGCM(3.4) to TRY-OUT

    Good stuff userprobe I'll start a new campaign and report back once the hordes arrive.

  3. #3
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: Mongols-Fix KGCM(3.4) to TRY-OUT

    I would really appreciate it!
    Last edited by Userpro; December 03, 2008 at 09:35 AM.
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  4. #4

    Default Re: Mongols(AI)-Fix KGCM(3.4) for TESTING only!

    Thanks userprobe! I won't have time to test this out until later tonight. But I will take a quick peek over this file before I go to work..

    Dave

  5. #5
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: Mongols(AI)-Fix KGCM(3.4) for TESTING only!

    Have to say, i prefer the Mongols as horde faction. Can you tell me quickly, what needs to be done to do it this way?
    Last edited by Userpro; August 12, 2008 at 07:34 AM.
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  6. #6

    Default Re: Mongols(AI)-Fix KGCM(3.4) for TESTING only!

    I have just fixed an error in your descr_campaign_ai_db.XML. The mongol label name was missing. This should work now.

    Dave

  7. #7
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: Mongols(AI)-Fix KGCM(3.4) for TESTING only!

    P.S horde behaviour is not controlled in the descr_campaign_ai_db.XML. Disabling the mongol label will not improve it. For the horde settings look in descr_campaign_ai_db under hordes.
    What file it is to look for "hordes"?
    ADDED: Okay - i've found them in "descr_campaign_db.xml"!
    Last edited by Userpro; August 11, 2008 at 06:13 AM.
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  8. #8
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: Mongols(AI)-Fix KGCM(3.4) for TESTING only!

    :hmmm: Now the Mongols, i think after the invasion-script, are moving a little bit in another way (strange)! At which round was the first invasion?
    Okay, i will follow up and report...

    Actually at turn #124:


    I've observe the movement of the mongols. They want to go southward, but there are so many unit-stacks around there (sadly also to many 1-unit-stacks), that they can't move in a normal manner. But it seems they want to move on.

    By the way, give look at the mini-map. Especially at England, Mailand and Byzant. This campaign contains our new enhanced garrison script.


    ADDED: Turn #178: The horde is about to continue moving southward. Due to the missing space to stack and to move, the march is a really slowly undertaking. What's more when the Mongols-AI is moving, it takes really very, very, very long.....
    Last edited by Userpro; August 11, 2008 at 04:07 PM.
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  9. #9
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: Mongols(AI)-Fix KGCM(3.4) for TESTING only!

    Turn #200: After another scripted mongol invasion, the first group has stopped going southward and do nothings more. Now there are so many one-unit-stacks that it is impossible for the AI making some right move.
    My conclusion: Since the mongols starting with one settlement, as any normal faction, invasion script must be removed, or the Mongols must return as horde-faction!!!!!!!

    I think this is the end for me to testing this f.... AI-campaign-script. Need to relax now....
    Last edited by Userpro; August 11, 2008 at 06:38 AM.
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  10. #10

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    @userprobe,

    I am sorry to see your disappointment in these results, but thanks again for trying. I did try to keep your hopes down earlier on today because I did not believe this would fix the troublesome mongols. It is going to take a lot more to get this faction like we want them to finally be.

    My conclusion: Since the mongols starting with one settlement, as any normal faction, invasion script must be removed, or the Mongols must return as horde-faction!!!!!!!
    The Mongols will be remaining a playable faction at the start. But I will be giving them more regions and many armies. The mongol invasion scripts were barely adequate for the small map in vanilla. And will now be entirely removed from the much bigger campaign in Kingdoms Grand Campaign Mod.

    regards,
    Dave

  11. #11
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    The mongol invasion scripts were barely adequate for the small map in vanilla. And will now be entirely removed from the much bigger campaign in Kingdoms Grand Campaign Mod.
    I totally agree with removing invasion
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  12. #12
    MiiKLL's Avatar Semisalis
    Join Date
    May 2006
    Location
    Spokane, Washington
    Posts
    451

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    Hello, this is just a thought...Could you script it so that the Mongol armies appear in Different provinces instead of just grouped into one big mass of stacks?

    If my memory serves me correctly...Mongol armies were highly mobile, but never " Huge ", they would send out contingents and then converge in a " Concentration of Force " when needed. While these contingents were powerful in and of themselves, they gave the appearence to the Western Factions that they were much more numerous than they actually were, thus the " Mongol Hordes " term.

    If when the Mongol invasion started in the game, why not have them pop-up more spread out in 2 to 3 stack groups to represent these contingents that were sent out. The AI could then maybe be given a set of really aggressive Invade decisions along with maybe making all the " Powerbase " cities and castles in the garrison script " Horde " targets.

    Anyway...just my thoughts, feel free to to tear them apart....lol.

    Thank you for the wonder mod.

    "Nothing is more destructive than the charge of artillery on a crowd."
    Napoleon Bonaparte

  13. #13

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    proceeds to tear apart Miikll's post...

  14. #14

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    What about a radical change in mongol Ai, just simplify it to

    <faction_attitude invade="invade_immediate" continue="true"/>

    for most of their invasion decisions? worth a try I guess.

    also defend_frontline for their defend decisions makes them more in your face agressive.
    Last edited by bodkin; August 12, 2008 at 04:45 AM.

  15. #15
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    Hi guys, it's not so simple to change the mongols behaviour. The first thing is to decide if the mongol remains a horde-faction or a faction like any other. When they have to be modified as any other faction it is simple, because the change i've made, remain the first thing to do so. The second is to remove mongol invasion scripts, horde section and Mongols "spawned_on_event" in "descr_sm_factions.txt", is to remove, too.

    What about a radical change in mongol Ai, just simplify it to
    <faction_attitude invade="invade_immediate" continue="true"/>
    for most of their invasion decisions? worth a try I guess.
    also defend_frontline for their defend decisions makes them more in your face agressive.
    Yes it worth a try, but if Mongols remain a horde faction only. I've read in some other threads about, if they start with a settlement in posses, they don't count any longer as a horde faction!?!
    Last edited by Userpro; August 12, 2008 at 09:28 AM.
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  16. #16

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    I dont know if it will help, but it seemed to make the other civs a bit more aggressive by cutting down on the number of Hold city and outlive targets in win-conditions.txt for me.(side note, mongols have the most right now, at 14? or so hold targets.. is there a un documented max allowed?) Mayhap there is a conflict between "horde target" and the hold provience aspects.

    it also seems like the AI is re-arranging armies to fit the balanced/smith aspects - so when new hordes appear, they attempt to regroup. - the hordes start to move on the first wave, the second wave show's up, they turn back to regroup, the newly reformed armies start to move, the next wave show's up.. and they turn back to regroup again, ad nauseum. Perhaps simply delaying each wave by a few turns might help the AI make better decisions.

    i do like the Invade imediate idea as well, but unsure if the AI will take advantage without changing some of the Defensive ratio's as well (set em all to defend minimum or whatever its nomenclature is)

  17. #17
    Stylix's Avatar MOS Team Member
    Join Date
    Apr 2008
    Location
    Alabama, U.S.A.
    Posts
    2,263

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    Encouraging news! I changed my descr_campaign_db.xml to match settings from a link that dave posted. The changes are:

    <hordes>
    <end_target_faction_bonus int="500"/>
    <start_target_faction_bonus int="400"/>
    <farming_level_bonus int="50"/>
    <shared_target_bonus int="0"/>
    <disbanding_horde_bonus int="-300"/>
    <starting_region_bonus int="910"/>
    <horde_target_resource_bonus int="990"/>
    </hordes>

    The hordes seem to be attacking and although it is still early in the game, have already doubled the number of regions under their control compared to my last three campaigns. I will continue with this campaign and watch the Mongols with great anticipation and high hopes!
    Last edited by Stylix; August 20, 2008 at 08:00 AM. Reason: Removed image due to storage constraints.

  18. #18
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    I dont want to demoralize you, but in my test game until round #80 ca., it seems to proceed all at the best, too. I hope your settings could help making the AI smarter. Good Luck
    Last edited by Userpro; August 13, 2008 at 12:27 PM.
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  19. #19
    Stylix's Avatar MOS Team Member
    Join Date
    Apr 2008
    Location
    Alabama, U.S.A.
    Posts
    2,263

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    A little further along and the Mongols have grabbed 2 more regions! I just hope that this continues. There is still no sign of the old 'bunch all armies together and wait behavior' but all the invasion armies may not be accounted for yet. I will just keep hoping!
    Last edited by Stylix; August 20, 2008 at 08:01 AM. Reason: Removed image due to storage constraints.

  20. #20

    Default Re: Mongols(AI)Fix KGCM(3.4) for TESTING purpose only!

    Wow very nice job so far with the ai. I'm looking forward to the full results. Keep playing!

Page 1 of 4 1234 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
  •