Results 1 to 30 of 30

Thread: A way to make the AI build up provinces better!

  1. #1
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    After modding and testing, modding and testing, i've come up with a way to make the AI build up some of its provinces a little better.

    The one thing i've noticed in VI is that the AI very often tends to specialise certain buildings to certain provinces and on occasions this seems related to the provincial bonuses to units. Take for example Cyrencia (sp?), otherwise known as ID_LIBYA in the txt files. This region gives a +1 to Saharan Cavalry. The AI Almohad will simply build horse breeders to produce saharan cavalry and will not develop the province further.

    The same occurs in Granada, where the Almos will gain a +1 to AUM produced there. The AI will develop the necessary buildings to produce AUM. Quite ingenious really

    The same happens in Denmark and Wessex, where the AI will focus on shipbuilding only I once tried to throw in a spearmaker to Wessex and the game turn times really slowed down? The AI seemed to be having difficulty with this confusion of priorities?

    While for these provinces this seems very logical, there are examples of when the AI doesn't quite get it correct. Take Egypt as a perfect example of when it works, but could be better. If i can remember correctly, Egypt gives a +1 to Mamuluk Cavalry and if playing GAs the AI will get 5 points if it manages to build a Grand Mosque there in the Early period.

    Now, under the standard setting the AI build order for Egypt always seems to be +20% Farmland, Horse Farmer, Horse Breeder and i think Horse Breeder's Guild. Then the Egyptians permanently stop improving Egypt. Based on my theory this is because they are now able to produce the Mamluk Cavalry?? The only time Egypt might get improved further is if another faction captures it? Maybe this is because they are not restrained to building up to getting Mamluk Cavalry (+1)? For the Egyptians, a similar build pattern happens in Antioch (which incidently gives +1 to Turcopoles), except Antioch builds the horse breeder up to a Master, thereby gaining the +1 valour for all horse units (+2 turcopoles).

    So there definitely seems to be a correlation between unit bonuses and AI teching. However, the Egyptians won't build Egypt up further to get the GA points, or potentially other useful cavalry units like the Ghulams (horse breeder3, spearmaker3).

    Whilst this Horse Breeder specialisation is quite a good idea, in theory, unfortunately it tends to limit the province upgrading, since horse breeders can be teched up without needing corresponding castle upgrades.

    I was trying everything to get Egypt out of this awful build pattern without success until i stumbled on a excellent thought

    What about making the upgrades for the Horse Farmer require the upgraded castles?, as the Horse Breeder is the only troop producer that doesn't require upgraded castles to complete its tech line.

    This hit the jackpot and all of a sudden the Egyptians were developing Egypt, at least up a point where it could produce the Ghulam Cavalry. Once it completed the horse farmer, it had to upgrade the castle to produce the horse breeder and it did. Then instead of immediately going up another level, it upgraded the spearmaker first Bingo This continued to the castle level, where i didn't test further due to it being 2.30 am

    The original pattern wasn't restricted to the Egyptians obviously and every faction was guilty of building to Master Horse Breeder in provinces with only a Fort and then leaving it there.

    Sorry if this is a little long-winded, but seems to have improved the game as obviously provinces with only Master Horse Breeders and a Fort aren't of much use unless all you wish for are valour +1 hobilars, saharan cavalry or other light cavalry. +2 if it's a bonus province for that unit.

    For those interested, the finer details of the change are:
    {CASTLE,IMPROVED_FARMLAND},{HORSE_BREEDER},{HORSE_BREEDER2}, {HORSE_BREEDER3}

    To this:
    {CASTLE,IMPROVED_FARMLAND},{CASTLE4,HORSE_BREEDER},{CASTLE7,HORSE_BREEDER2}, {CASTLE10,HORSE_BREEDER3}

    If any of you try it, let me know how you get along.

    Regards

    Doc



    =MizuDoc=

  2. #2
    The Lordz Modding Collective Senior Member Lord Of Storms's Avatar
    Join Date
    Jan 2003
    Location
    Paisley,Florida
    Posts
    2,302

    Cool

    Very interesting theory DOC, and if your testing proves true a nice discovery it will be one of the main problems the AI seems to have is "teching up its provinces" you may have indeed stumbled onto something good work This info may prove useful in the Napoleonic Mod Thanks
    Taking life one day at a time!

  3. #3
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    Nae probs mate, let me know how you get along if you try it out.
    =MizuDoc=

  4. #4
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    Well, just a little update for any would be potential modders out there.

    It's a definite fact that by sticking a provincial bonus for a unit in a province, you'll limit or direct the AI's building priorities.

    For example, the +1 cog bonus in Wessex means the AI will go straight for the buildings that'll enable cogs to be built. Then, once this has been achieved the AI more often than not seems content not building the province up any further. Hence Denmark and Wessex with their provincial bonuses for ships, remain fairly underdeveloped other than the necessary ship buildings. A bit of a shame for the English really when they should be using their most developed starting province to get some good units out. In this case i moved the bonus to Normandy, as it doesn't have trade good and is beside the French. This way the English will still try to get ships out fast, but not with Wessex.

    If you experiment with ther Region ID bonuses, one can see very interesting results with AI build strategies. For instance, by taking off the +1 bonus for dhows in Tunisia, one will finally get the Almohad AI to build the gold mine and gold mine complex, which for some reason it never did in the past?

    Why doesn't the AI ever seem to build up Constantinople to a great extent, especially to the stage of getting Varangian guard?? Simple.... because of the +1 bonus to Kataphraktoi there. You see, the AI focuses on them only and builds up Constaninople to get them..... then it stops...

    A somewhat clever idea to get the AI to build them, however, everyone knows the human player will build Constantinople further in addition to getting the most out of the +1 Kataphraktoi. Therefore i moved this bonus to Anatolia to try to encourage the building up of Constantinople on all fronts

    Regards
    =MizuDoc=

  5. #5
    Member Member Westland's Avatar
    Join Date
    Feb 2003
    Location
    Holland
    Posts
    71

    Default

    If this all correct, than I suppose it´s better for the AI to remove all provincial bonuses.

  6. #6

    Default

    Which raises the question - how does the AI handle provinces with no bonuses? And can you also link certain buildings to economic improvements to get them to develop them economically - like require 40% farms for horse breeders, 65% for master horse breeders, etc. to get them to build up better.

    What gets me is putting together a build que shouldn't be that hard it seems to me. I'm certain getting the AI to prioritize between provinces can be hard, and getting it to decide between economic vs military ques could be hard, but I'd think CA should have done a better job here than just having them stop as noted.

    Grifman

  7. #7
    Member Member A_B's Avatar
    Join Date
    Oct 2002
    Location
    San Jose, CA USA
    Posts
    148

    Default

    Quote Originally Posted by [b
    Quote[/b] (Grifman @ June 08 2003,10:44)]Which raises the question - how does the AI handle provinces with no bonuses? And can you also link certain buildings to economic improvements to get them to develop them economically - like require 40% farms for horse breeders, 65% for master horse breeders, etc. to get them to build up better.
    It may be possible to use the build bonus as a driver for the AI. A new unit can be created which requires the largest trade building, and 80% farming, which has it's bonus in Egypt. The unit itself isn't importent - it could be a copy of another. It's purpose is only to help the AI.

    On another point, i'm about to restart the new Interregnum campaign. I've deleted all of the province bonuses. I'll let you know what i discover.

  8. #8
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    Westland, yes and no, i think.

    For some units it might be advantageous to get the AI to specialise. For instance, it might be a beneficial for the Italians to have a province that specialises in Italian Infantry for example.... just to get them to build them

    Likewise, to promote shipbuilding in certain provinces it might be an idea to have a provincial bonus there, as when a province is specialised there's more of a chance that they'll build the units you want as there won't be such a choice, e.g. ships from Venice and Denmark.

    One word of caution with this:

    When provincial bonuses for ships are applied to a province with no starting buildings the AI seesm to get stuck at a port and fort and doesn't go further than that. This is what happens with the original Tunisia, which has +1 dhows. The Almos build a port and a fort and then no more, not even the gold mines.

    EDIT:
    By removing all bonuses the AI will simply follow the normal building priorities as dictated by the Build_prod file. I assume it'll also follow any special build combos from column K?



    =MizuDoc=

  9. #9
    Member Member Westland's Avatar
    Join Date
    Feb 2003
    Location
    Holland
    Posts
    71

    Default

    Quote Originally Posted by [b
    Citaat[/b] (+DOC+ @ Juni 08 2003,11:00)]For some units it might be advantageous to get the AI to specialise. For instance, it might be a beneficial for the Italians to have a province that specialises in Italian Infantry for example.... just to get them to build them
    True. But maybe there are other ways to do this. In the unit and building prod files the priorities are set for the AI. I don´t know exactly how this system works but maybe it´s a good idea to raise the priority for faction unique units like Italian Infantry. This is of course more difficult than changing the provincial bonuses.
    Anyway, your idea of removing the bonus from main provinces like Constantinople and Wessex is very good and may help the AI a lot.

  10. #10
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    I did a little more testing last night, and one can get some quite interesting results from playing around with the provincial bonuses.

    I'm not totally certain, but it appears that if you put a bonus for more than one unit type to a province the AI will attempt to build the buildings necessary for both I tried this in Scotland, where i gave a provincial bonus for the celtic warriors in addition to the highland clansmen. Lo and behold after building the castle the AI did eventually build the necessary swordsmith for the celtic warriors.

    One thing i didn't try, but would love to see the results of, is to combine a province bonus for a land unit and ship unit in the same province? Due to the shipyard requiring a castle4 (in addition to port), the AI seems to have a problem with bonuses for ships in provinces which start completely undeveloped. In the native game that includes Tunisia if Muslim and Portugal if caravel-building Catholic. However, if these ship bonuses were coupled with a bonus for a land unit, then one might see the AI coping better?. Certainly one to try.

    One interesting point is that if another faction takes over a province in which it cannot build the unit with the bonus, then the AI simply builds up the province normally.

    It's still difficult to decide what is more advantageous for the AI in the long run, as everything isn't crystal clear. Norway has a +1 for vikings, but the AI Danes will build it up further as the game progresses. Cyrenacia has a bonus to Saharan cav and Morocco Berber camels and the Almos will stay very specialised in these provinces. By removing many of the Almos province bonuses i've got them to build gold mines in all 3 of the N Africa provinces.

    By sticking a bonus for Swabian swordsmen in Swabia, i can get the HRE to start building them very quickly indeed By adding bonuses to provinces for units that require a lot of tech, one can focus the AI to build certian unit types much quicker than before. They'll also get the benefits of all the other units that are able to be built from the same buildings lower down in the tech tree. Chivalric knights automatically spring to mind as a good example for the Christians and Faris/Ghulam cav for the Muslims.

    One thing is for sure and that is one can definitely get an improved AI build strategy with a few strategic alterations here and there. Egypt, Tunisia, Morocco, Portugal, Wessex, Mercia, Tuscany, Constantinople and Castile are obvious targets, where the bonus impart poor AI build strategies. By removing the ship bonus in Wessex thereby focusing Wessex away from immediately building ships, one can somewhat prolong the existence of the English as they'll initially build more troop producers.

    Next to try:

    Provinces with bonuses to ships and units, e.g. Venice with Italian infantry and Galleys.

    Regards
    =MizuDoc=

  11. #11
    karoshi Senior Member solypsist's Avatar
    Join Date
    Oct 2000
    Location
    New York New York
    Posts
    9,020

    Post

    A very useful piece of information

    This has been moved to the Dungeon, since it involves modding the game.

    edit by KukriKhan to add: Thanks Soly




  12. #12
    Creator of the Medmod for M:TW Member WesW's Avatar
    Join Date
    Nov 2002
    Location
    Florence, Al., USA
    Posts
    662

    Default

    This is a very big find, Doc. It *may* explain why a few units were tied to more than one province, and vice-versa, in the original game file.

    I seem to recall that there was a bonus applied to the priority of buildings needed to construct a unit, for the province that gave the unit its valour bonus. I thought it was one of the unit text tabs, but I can't find it, either there or in the buildings text.

    Anyway, what it surprising is your finding that the AI stops developing the province after it can build the unit. I wonder if CA was aware of this, since it gave Venice a bonus for Galleys, which is historically sound, but awful for gameplay given your findings.

    The fact that the AI will produce the buildings needed for a second unit may be the biggest thing to come out of this, since it means that we could tack on multiple provinces to Gothic Knights, for example, and the AI would shoot for the necessary buildings in all of those provinces.
    This would't even affect the Knights, since the game would only recognise the first province in the list, and only if that province is not taken by another unit higher in the text.
    EDIT: I may be wrong about that, and the game *may* recognise the first province in the Kinght's list *not* already taken, but this is a relatively minor thing.

    In this way, you could have the more developed provinces of multiple factions all aim for the highest-quality units available to them, while the lesser developed ones stopped when they got to some of the lesser units.

    A thought just occurred, though I guess it is similar to one already stated. In my mod, I had already tied higher-level castles to the horse farm line, but if you tied certain land improvements, or even merchants, to units, and then tied those units to certain provinces, you could in effect control the extent that the AI developed its economic infrastructure.
    This would be good for the Constans and Venice's, but perhaps even better for fertile, undeveloped provinces. You could tie them to certain lower-level units, and those units to higher-level land improvements.
    You would have to sit down and chart this all out, but it may prove useful.

    This may be a boon to my uncoming mod, where I plan to deny or economically penalize factions in regards to certain troop types. I could use this technique to have certain factions favor certain types, or even individual structures. It could also be used to have the AI build certain buildings, which gave penalized or denied units, only so it could get the more advanced structures which gave it good units.

    I know I am rambling here, but some of the rest of you may get some ideas that you could use in your mods as well.

    For instance, Egypt could be tied to one unit from each culture that requires a high-level land improvement. Thus, if a Catholic faction took control of it, they would focus on developing its economy just to get at that unit, which of course wouldn't receive the bonus, but that isn't the point.
    Same thing with Armenia and Merchants.

    Doc, you may want to test this next- tie a landlocked province to a ship which requires a high-level merchant, and see if the AI tries to get it.
    Wes Whitaker's Total Modification site:

  13. #13
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    Ahh, good man Wes. Some good ideas there. Before i answer some of your queries i'll just update you a little further with some testing i did last night.

    I was attempting to put a bonus for a ship together with a bonus for a specific land unit. I tried this in Venice, where i had a bonus for galleys and Italian Infantry. Unfortunately the AI just went straight for the shipping buildings and didn't try for the Italian Inf.

    I also tried this in Mercia with billmen and cogs, but the AI just build a port and a fort and stopped there. Giving the AI bonuses to ships in provinces that don't start with a fort means that the AI will only ever build a fort and port and get stuck. This is because the shipyard requires a Castle4 and, if you were to replace that with a fort, it then builds up fine from scratch. Therefore, unless you are going to allow shipyards to be build with basic forts then i would abandon this strat.

    However, for provinces like Wessex and Venice, the AI can cope with the bonus to ships since they have basic infrastructure from the get-go. I am interested to see your ideas on linking Merchants to various ships or buildings and then giving the province the bonus for the ship to get it to build the Merchants This would be great for Venice and Wessex in the native version, since the Italians and English (who can build galleys and cogs respectively) never build merchants there.

    So far my way round this has simply been to give them merchants from the start.

    Maybe by making Venice go for gungalleys (they are further up the tech than galleys), Wessex for cogs and then make the gungalley/cog require a Merchant3, one could get the AI to tech up on Merchants as it progresses the shipping tech tree? Certainly worth a try

    I do believe this is better than removing the bonus completely, which then results in the AI simply building everything and anything in Venice. That can be a terrible waste of money for the AI if it's doing it in too many of its provinces. At least with the specialisation, we are getting the AI to spend its money more wisely and more specifically.

    More later
    =MizuDoc=

  14. #14
    The Lordz Modding Collective Senior Member Lord Of Storms's Avatar
    Join Date
    Jan 2003
    Location
    Paisley,Florida
    Posts
    2,302

    Thumbs up

    I am really impressed with the progress you are making on this DOC . It has alot of potential, and we are looking into this for use in the Napoleonic Mod which involves many specialised units that the AI is not accustomed to as they are totally new units. So by applying this theory we should be able to aid the AI in creating the Nap. units for use in its campaigns. Keep up the good work , I will be following your progress with great interest. I think this info should be stickied as it is a very important development for modders. LOS
    Taking life one day at a time!

  15. #15
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    Thanks LOS, and i agree, this is great information for anybody wanting to mod MTW, from the casual gamer wanting a tougher test, to a fully fledged modder like yourself and Wes.

    Anyway,

    I forgot to answer some of Wes' statements, so i will do that now.

    In the data files, you notice that Berber camels get province bonuses in two different Almo provinces, ID_MOROCCO and ID_ALGERIA. Now, even though the in-game writing doesn't appear on ID_ALGERIA, it DOES give the +1 bonus to both provinces However, i'm not totally sure on this but i think that Algeria doesn't suffer the same AI building restraints as Morocco, maybe because it's the second province in the list for Berbers? Something to test obviously.

    The same goes for provinces with more than 1 bonus, all units will actually get their +1 bonus. As i mentioned earlier, i tried this in Scotland by giving both clansmen and celtic warriors a bonus there. The AI build the relative buildings and both units got the +1, although the province mentioned nothing about the +1 celtic warriors in the game text.

    Secondly, although in some provinces it would appear that having a provincial bonus retrains the AI's building, it doesn't always seem to be the case. It does seem for instance that Morocco, which has a +1 to Berbers (BOWYER2), will continue to upgrade the Bowyer past the Bowyer2 stage. Maybe the aim for the AI is to get the +1 bonus for building a Master Bowyer, which on top of the provincial bonus for Berbers, will give them a +2? Something again to test.

    Regards



    =MizuDoc=

  16. #16

    Default

    Good job, Doc

    Grifman

  17. #17
    Member Member A_B's Avatar
    Join Date
    Oct 2002
    Location
    San Jose, CA USA
    Posts
    148

    Default

    Quote Originally Posted by [b
    Quote[/b] (A_B @ June 08 2003,10:51)]On another point, i'm about to restart the new Interregnum campaign. I've deleted all of the province bonuses. I'll let you know what i discover.
    Well, i must say i'm quite impressed with the AI's unit selection, since i've turned off the province bonuses. In the Interregnum campaign, the provinces start quite built up, so it isn't as objective as a test as it otherwise might be. The AI is building HUGE fleets and vastly improving it's land though. I think there is a lot of potential here...

  18. #18
    Member Member Turbo's Avatar
    Join Date
    Oct 2002
    Location
    New Jersey
    Posts
    414

    Default

    My understanding is that regional advantages only provide a build discount, they do not provide any additional building priorities.

    What you are looking for is in collumn 16 in the Crusader_Unit_Prod text file. This allows you to add building bonuses which tie back to the regional advantage (collumn 13). Collumn 16 ties back to collumn 13, but only one region by the way and they do not look at which factions can actually build the unit or any other type building restrictions.
    When you decide that servicing your core niche is no longer important, you might as well put a gun to your corporate temple. - Red Harvest -

  19. #19
    Member Member Turbo's Avatar
    Join Date
    Oct 2002
    Location
    New Jersey
    Posts
    414

    Default

    Quote Originally Posted by [b
    Quote[/b] (+DOC+ @ June 10 2003,11:04)]Thanks LOS, and i agree, this is great information for anybody wanting to mod MTW, from the casual gamer wanting a tougher test, to a fully fledged modder like yourself and Wes.

    Anyway,

    I forgot to answer some of Wes' statements, so i will do that now.

    In the data files, you notice that Berber camels get province bonuses in two different Almo provinces, ID_MOROCCO and ID_ALGERIA. Now, even though the in-game writing doesn't appear on ID_ALGERIA, it DOES give the +1 bonus to both provinces However, i'm not totally sure on this but i think that Algeria doesn't suffer the same AI building restraints as Morocco, maybe because it's the second province in the list for Berbers? Something to test obviously.

    The same goes for provinces with more than 1 bonus, all units will actually get their +1 bonus. As i mentioned earlier, i tried this in Scotland by giving both clansmen and celtic warriors a bonus there. The AI build the relative buildings and both units got the +1, although the province mentioned nothing about the +1 celtic warriors in the game text.

    Secondly, although in some provinces it would appear that having a provincial bonus retrains the AI's building, it doesn't always seem to be the case. It does seem for instance that Morocco, which has a +1 to Berbers (BOWYER2), will continue to upgrade the Bowyer past the Bowyer2 stage. Maybe the aim for the AI is to get the +1 bonus for building a Master Bowyer, which on top of the provincial bonus for Berbers, will give them a +2? Something again to test.

    Regards
    DOC,

    What +1 bonus are you referring to? Valor, morale? My understanding was that province bonuses provide build cost discounts not modifiers.

    I know from previous posts that MTW only uses one regional for bonus per unit. The second region is ignored. One region can provide multiple bonuses for different units.
    When you decide that servicing your core niche is no longer important, you might as well put a gun to your corporate temple. - Red Harvest -

  20. #20
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    Hi Turbo,

    In answer to your questions:

    Column L refers to unit discounts and is applicable to a whole faction as opposed to a region.

    Column K refers to bonuses for units in specific regions and these provide a +1 valour to the unit if built in the region.

    ALL regions specified in column K WILL impose the +1 bonus to the unit, even if one unit has more than one region. However, the other regions specified for any one unit will, however, not be shown on the strategy map (only the first is written on the parchment). The AI will follow the path to producing the unit in only the first stated province. All others will follow normal building patterns, but still imply the +1 bonus if the unit is built there.

    If a region has bonuses to more than one unit type only one path to producing one unit is followed (i think it's the one furthest down in the list, but don't quote me...?&#33, however, ALL units will receive the bonus. In contrast i think the highest up on the list will be actually be written in the parchment?

    Beware, the AI can run into major problems developing provinces with unit bonuses.

    In VI, bare starting provinces (no initial improvements), get totally stuck and the AI doesn;t develop the province. Probably due to one to many castle upgrades in the way? The only provinces that appear to benefit in VI are the ones that have good starting improvements in place. This include West Seaxe, Mierce and Dal Riada.

    In MTW the AI copes better with the land bonuses, but will specialise in developing the buildings necesaary to produce that unit, often at the expense of other essential buildings. Take the Italians not building a merchant in Venice, because they are focusing on Galleys, as a prime example. Egyptians not building up Egypt, because of the Mamluk cav bonus is another prime example.

    If another faction takes over the province and cannot build the unit with the bonus, they'll develop the province in the normal, unspecialised way.

    If you read through all the other posts in this topic it should explain it all very well....hopefully

    Cheers



    =MizuDoc=

  21. #21
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    Actually Turbo, i think you're right regarding units with multiple region bonuses. Only the first region gets the bonus.

    In VI, one needs to have at least a castle2 in provinces that start with no improvements for the AI to start building the required buildings to build units with the regional bonus. Otherwise all the AI seems to build is a warrior hold and an abbey?

    Therefore the way the current VI is set out with the capitals of each faction being the only provinces starting with improvements, it's best to simply remove all regional unit bonuses. IF you apply them to the capitals (which have buildings already) then the AI will proceed to build the stated units, however, it only seems to hamper the AI from teching up further.



    =MizuDoc=

  22. #22
    Unpatched Member hrvojej's Avatar
    Join Date
    Sep 2002
    Location
    It depends...
    Posts
    2,070

    Default

    Quote Originally Posted by [b
    Quote[/b] (+DOC @ +June 06 2003,07:21)]For those interested, the finer details of the change are:
    {CASTLE,IMPROVED_FARMLAND},{HORSE_BREEDER},{HORSE_BREEDER2}, {HORSE_BREEDER3}

    To this:
    {CASTLE,IMPROVED_FARMLAND},{CASTLE4,HORSE_BREEDER},{CASTLE7,HORSE_BREEDER2}, {CASTLE10,HORSE_BREEDER3}

    If any of you try it, let me know how you get along.
    Don't know if this is still current, but I've tried doing this for my present campaign. I modded the requirements for horse breeder, I started on high, and the AI Almos didn't build up Cyrenacia at all, and didn't even build Saharans in 50 years (they did build 80% farmland, though ). Could possible reason for this be that Cyr. already starts with horse breeder, but no fort, therefore the building requirements are violated, and the AI doesn't know what to do?
    I am going to try changing it to:
    {IMPROVED_FARMLAND},{CASTLE,HORSE_BREEDER},{CASTLE4,HORSE_BREEDER2}, {CASTLE7,HORSE_BREEDER3}
    for my next campaign, and see what is that going to do. I don't like the fact that master HB can be reached so early in the castle upgrades, but then again, it didn't require any before. Another option is to add fort to all starting provinces (which might not be all that unreasonable for high period after all). I've also fiddled with the region bonuses, as suggested here, but it's still to early to tell how the AI responds to that, since I'm actually playing the campaign, and not just letting it run.



    Some people get by with a little understanding
    Some people get by with a whole lot more - A. Eldritch

  23. #23
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    Yes, i would almost certainly say it's because they start with a horse breeder in the high period, as they seem to do perfectly well starting with nothing in the early period. The upgrade path is very sensitive to major changes and some changes can result in the AI getting stuck.

    VI is a prime example where actually the native setup is not conducive to smooth AI play. All the provinces with +1 unit bonuses that contain NO starting improvements, i.e. all provinces bar the capitals, will get stuck and the AI will never build the bonus units

    Actually your upgrade path looks good and is probably slightly better than the one i suggested, although i'd have to see whether it was compatible in the early period in provinces starting with nothing.

    Let me know how you get along.
    =MizuDoc=

  24. #24
    Unpatched Member hrvojej's Avatar
    Join Date
    Sep 2002
    Location
    It depends...
    Posts
    2,070

    Default

    I just took Cyrenacia from the Almos. You cannot build Saharans without a fort even though you have a horse breeder. Same applies for everything else - though you might have the buildings, without a basic fort there's no recruitment (unless there's an inn). So, the point is to get the AI to build the fort in the first place, but it doesn't since it already has the building that it wants to have - a HB. So, we're back at the start - get them to upgrade castles. I think it's best to add forts (or villages for VI) to all provinces, and will definitively do that next time around.
    Some people get by with a little understanding
    Some people get by with a whole lot more - A. Eldritch

  25. #25
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    If you were to simply remove the horse_breeder then you would probably be ok?
    =MizuDoc=

  26. #26
    Unpatched Member hrvojej's Avatar
    Join Date
    Sep 2002
    Location
    It depends...
    Posts
    2,070

    Default

    Could be, but I'm not adverse to giving the game a kick start, as this would mean that I'll be (presumably) facing more and better opposition. And it's easier just to add forts/villages than to think about whether this or that troop producing building should be there or not. At least in my opinion.
    Some people get by with a little understanding
    Some people get by with a whole lot more - A. Eldritch

  27. #27
    Creator of the Medmod for M:TW Member WesW's Avatar
    Join Date
    Nov 2002
    Location
    Florence, Al., USA
    Posts
    662

    Default

    Just a note about the columns 13 and 16 suggestion a while back; I skimmed through the units text, and the building priority bonus is not used at all. Since there seems to be something hard-coded that produces the same effect, abeit with some unfortunate side effects, I would guess that either this function doesn't work, or has been disabled.

    Also, DOC, would you re-state your current findings, please? I know this is very hard to keep straight in one's head, at least it is for me, and you seem to be both intentionally and unintentionally contradicting some of your earlier statements.

    You have said that it now appears that if a unit has more than one region listed in its bonus slot, ala the Camels, then only the first region grants the bonus.

    What I am getting confused about is the AI behavior in situations where a region is listed in the bonus slot of more than one unit. Does it still seem that the AI will pursue the buildings needed to construct both units?

    Also, am I right in thinking that you have observed that, if a province starts out with the buildings required to produce its bonus unit, ala Venice, that it will pursue a normal building pattern? This is one area where you may have inadvertantly contridicted yourself.

    Thanks for your work and for sharing this with us.
    Wes Whitaker's Total Modification site:

  28. #28
    Member Member Turbo's Avatar
    Join Date
    Oct 2002
    Location
    New Jersey
    Posts
    414

    Default

    I tried the following experiment to see if I could duplicate the theory that the valor region drives AI build priorities.

    I decreased the building AI priority for Townwatch2 for the Almohad Urban Militia in Granada. I observed the AI building pattern using an emissary parked in the region. The AI never built a townwatch level 2. I cycled through about 30 turns.

    I then increased the building priority for the town_watch2 and decreased the AUM unit build priority. Again, the AI would not build an AUM.

    What this seems to indicate is that the building priorities govern the AI building practices and that unit valor regions have minimal impact.
    When you decide that servicing your core niche is no longer important, you might as well put a gun to your corporate temple. - Red Harvest -

  29. #29
    Member Member Turbo's Avatar
    Join Date
    Oct 2002
    Location
    New Jersey
    Posts
    414

    Default

    Quote Originally Posted by [b
    Quote[/b] (WesW @ June 26 2003,13:43)]Just a note about the columns 13 and 16 suggestion a while back; I skimmed through the units text, and the building priority bonus is not used at all. Since there seems to be something hard-coded that produces the same effect, abeit with some unfortunate side effects, I would guess that either this function doesn't work, or has been disabled.

    Also, DOC, would you re-state your current findings, please? I know this is very hard to keep straight in one's head, at least it is for me, and you seem to be both intentionally and unintentionally contradicting some of your earlier statements.

    You have said that it now appears that if a unit has more than one region listed in its bonus slot, ala the Camels, then only the first region grants the bonus.

    What I am getting confused about is the AI behavior in situations where a region is listed in the bonus slot of more than one unit. Does it still seem that the AI will pursue the buildings needed to construct both units?

    Also, am I right in thinking that you have observed that, if a province starts out with the buildings required to produce its bonus unit, ala Venice, that it will pursue a normal building pattern? This is one area where you may have inadvertantly contridicted yourself.

    Thanks for your work and for sharing this with us.
    Wes,

    Collumn 16 is unused in the spreadsheet however its functionality is there. The AI does appear to be influenced by entries.

    I suspect the reason it isn't enabled is that the unit mix in MTW is specialized and non-generic. Certain building structures are a waste for some factions. The problem with the collumn is that the building will be built regardless of whether it is of any use to the faction controlling the region.
    When you decide that servicing your core niche is no longer important, you might as well put a gun to your corporate temple. - Red Harvest -

  30. #30
    Senior Member Senior Member +DOC+'s Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    514

    Default

    Quote Originally Posted by [b
    Quote[/b] (Turbo @ June 26 2003,20:36)]I tried the following experiment to see if I could duplicate the theory that the valor region drives AI build priorities.

    I decreased the building AI priority for Townwatch2 for the Almohad Urban Militia in Granada. I observed the AI building pattern using an emissary parked in the region. The AI never built a townwatch level 2. I cycled through about 30 turns.

    I then increased the building priority for the town_watch2 and decreased the AUM unit build priority. Again, the AI would not build an AUM.

    What this seems to indicate is that the building priorities govern the AI building practices and that unit valor regions have minimal impact.
    No, i totally disagree.

    Firstly Turbo, may i suggest you play your campaign using the -ian command and enable the following options with the keys:

    s for seeing no computer moves (takes too long otherwise)
    # to allow the AI to control your faction
    a to auto-move the game forward turn after turn
    g for seeing the whole map

    This is best way to learn the game's mechanics and see how the AI works... believe me.

    Secondly, you didn't play the game for long enough. The AI as the Almohads has many other provinces with building requirements and only a limited amount of florins. So it's quite conceivable they spent the florins elsewhere. They have a +1 Berbers in Morocco for instance and a +1 Saharan Cav in Cyrenacia.

    I have extensively tested this and with the regional bonus for AUM in Granada the AI will build the second town watch (remember it requires an expensive castle4) regardless of what build values you have given to the town watch. In contrast to what you said, regional bonuses have the biggest impact on AI province development

    Try typing in .deadringer. with the ALmos picked to give them plenty of cash and then press # and a, have Granada selected and watch what the AI builds.

    Wes,

    My take on the regional bonuses is this:

    If one unit type has many regional bonuses, only the first appears to receive it (Turbo was right here). The AI builds up the other provinces as if they had no regional bonus.

    If a region has several different unit bonuses they all appear to get the +1, however, it's difficult to predict which unit the AI will target towards. In Scotland, i set both Celtic Warriors and Highland Clansmen to get a +1 and Scotland built the buildings necessary for both. However, to get CW (Swordsmith) they have to build the Fort on the way, which obviously enables the HC. MY guess is that it targets the unit furthest down the list, which incidently seems to be the one which isn't listed on the strategy map parchment.

    The best way for getting the most out of provinces with multiple unit bonuses, is to make sure the unit the AI guns for is the unit highest up in the tech tree and which require buildings to be built that enable the other units on the way. For example, like the HC and CW in Scotland.

    After they've reached the target building, the AI doesn't seem so preoccupied with progressing further as quickly. It may tech up in the castle levels and progress further in the specific tech line. For instance, go for the Master level of the building required for the targeted unit, e.g. Master bowyer for the Morocco and the +1 Berbers.

    In some instances they do seem to diversify. When i gave Anatolia a +1 for Byzant Inf the AI built the buildings necessary for them, but later on they also diversified, presumably because to get a swordsmith one needs a spearmaker. Who knows? I'm speculating now.

    With ships, however, the AI seems very focused In Venice, Denmark and Wessex the AI never seems to build any unit producing buildings and the AI, somewhat stupidly, is very reluctant to build a merchant. Constantinople also seems to have problems building a merchant as it focuses on building +1 Kataphraktoi from the get-go. Nevertheless if these provinces change hands to a faction that cannot build the unit/ship, the AI follows a build pattern as if the province had no unit bonus.

    I have made the shipyard3 and 4 require a merchant3 and 4, respectively, which helps Venice and Denmark look after their trade as long as they are given regional bonuses for ships that require a shipyard3 or 4 (e.g. Gungalley, Carrack). As a result, they now build merchants on their way up the tech tree whereas in the past they didn't. In actual fact i have Venice with a bonus for Galley and Gungalleys and because Gungalleys are lower in the list they target them, but will apparently receive the +1 bonuses for both ship types.

    A word of warning, be careful with provinces with no initial starting buildings and ship bonuses. The fact that a shipyard needs a castle4 instead of a castle to build a shipyard seems to result in the AI getting stuck and never reaching the target. By making the shipyard require a castle instead and the AI has no problems. Take Tunisia (Almos) and Portugal (if controlled by a catholic faction) as prime examples with their +1 for dhows and caravels respectively. Regional bonuses in VI don't work very well at all, which seems to be due to the many castle levels (tech integers) one has to build (climb) before one can build the useful units.

    Wes, provinces that already start off with buildings are a little bit harder to predict as they have buildings that the AI would not have built to reach their bonus unit.

    Anyways,

    I have reached a very happy medium in my moddded MTW and VI campaigns, which have been very extensively tested and optimised for the AI with the help of the aforementioned key commands. I now have a very challenging experience and actually lost my Sicilian campaign to the Danes and (re-emerged) Poles on GAs By the end, my once great Empire was in decline and collapsing at all sides and 1453 couldn't come quick enough Highly enjoyable.

    IF anyone is interested in seeing my modded Excel sheets (CA's easy to use ones) and campaign files, i will gladly forward them via email.

    Regards
    =MizuDoc=

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO