Unit spells + Items = AI Issues

The main catch now that I have looked at it is figuring out the PROPER weight value for each of them. The weights are all so radically varied through the files that it might be a bit tricky learning what values will get the computer to actually do things.

Also, there is no guarantee that the AI is looking at the unit's weight value to decide if it should upgrade, so this might not work in the main mod where the AI cannot directly build the upper level magical units.


(And as for not liking Mod-Mods, I don't like them myself because I feel it leads to people giving feedback based on the mod-mod instead of the main game. But if the mod-mod finds issues in the main game--like this just did-- then suddenly they are justified ;) Which was the line of thought that lead me to finally making a mod-mod of my own, but keeping it modular. The majority of what I do will actually be fixes/tweaks which I hope will eventually find their way into the actual game in some form)
 
Possibly. Tarquelne was playing around with xienwolf's modular modmod and found that when they could build mages (well, wizards as it was the Amurite civ) directly they still greatly preferred adepts. He reduced the Adept weight to 4 and found that it made them start building wizards. The same may be true of upgrading. (Although I'm sure that lowering the level requirement would likely help them too)

so it works in all ffh2 games, I think the opposite direction would be needed, i would assume that kael set the aiweight high for adepts to get the AI to build them over other units so they could get the xp and promotions going asap, getting them promoted is the key and doubling the aiweight of mages/conjurers and doubling again with archmages/summoners is hopefully the way to go.
 
Aye, so far I have bumped up the AI weight on the cheater AI units so that they will build those instead of adepts. But the question is if they will build normal units enough still, or waste too much time on magic?

I tested by granting all techs to all civs on turn 1, and everyone built a worker like normal, except for 1 guy who started to build a Conjurer (not summoner oddly). I passed a couple dozen turns and it seems everyone likes Conjurers now, but there were still some other units that weren't magical.


Being as nobody had more than 2 cities when I ended the test, it wasn't AMAZING, but it was enough to tell me that they do build T3 summoners at the least, and still build other units (I think that they only compare the weights against similar AI declares, or Flavor markings. Thus a high weight arcane shouldn't interfere with normal production of non-arcane units too much)
 
We just found that the AIweight for adepts is 300 but for mages/conjurers is only 8, and for Archmages/Summoners is only 16; the AI considers adepts to be more valuable than their upgrades, and so won't upgrade them. The AI loves adepts and would rather keep them adepts than upgrade them to something more useful.

Pardon, but where are these AI weights stored (folder/file)? It seems like an easy thing to modify manually until the FfH devs get around to tweaking it.

For that matter, if I wanted to add a value to increase the xp growth rate of AI spell casters, how would I do so? Its probably too much to hope that this particular feature is also an easy to reach text value sitting in an XML file... :)
 
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Fall from Heaven 2 030\Assets\XML\Units\CIV4UnitInfos.xml contains a <iAIWeight>0</iAIWeight> tag for every unit.


C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Fall from Heaven 2 030\Assets\XML\Units\CIV4PromotionInfos.xml contains a <iSpellCasterXP>0</iSpellCasterXP> tag, whihc I believe determines the chance that a (arcane or disciple) unit will gain 1 xp each turn. You could create a new promotion for all the casters and set this value to whatever you want (probably only integers between 0 and 100)
 
Gracias Magister. (and Xienwolf)

Personal fixes: I think I will probably leave the upgrades the same, but increase the AI weight for higher level casters. I will also increase the xp gain for spell casters. Not an ideal fix, but it should allow the AI to build and replace casters relatively quickly.

(the 64k question is: do changes to the XML files get added in when I restart the program or when I start a new game?)
 
Yes please. All the feedback I can get would be lovely. You will need to remind me what changes you made at the time though of course :) (Just changing the Weight function of the upper tier units, not letting them cheat and build them directly right?)
 
Yes please. All the feedback I can get would be lovely. You will need to remind me what changes you made at the time though of course :) (Just changing the Weight function of the upper tier units, not letting them cheat and build them directly right?)

Yep, I'll recap whatever changes I made when I report back. For now, I just increased the xp gain due to the arcane promotion, and increased the AI weight for Mages, Wizards, Archmages, Conjurers, Summoners, Puppeteers, Illusionists, and Eaters of Dreams. 350 for tier 2, 400 for tier 3. That aught to light a fire under the AI's bottom.
 
Heh heh. Makes the 800 and 1600 that I set them to look quite excessive ;)

i made mine 800/1600 like you too, but you still need xp levels and the buildings. I am in turn 255 of a normal speed game and i am now seeing conjurers but no mages on the map. It is a start. Might need a better way to differentiate mages from conjurers for the AI.
 
EDIT: Tested the <iSpellCasterXP> and at 100 it does give you a point every turn, but occasionally doesn't give a point for the turn once you get up around 40 or so.

Which promotions did you change??? Looking at the files <iSpellCasterXP> is set @ 10 for Arcane @ 20 for Channeling I @ 30 for Channeling II @ 40 for Channeling III and @ 0 for Divine/Sorcery/Summoning.
 
could someone post a copy of the increased weights file? programming isn't my best forte, last time I fiddled with one of these files I broke it.
 
I had changed channeling 1 just to test out an Adept. Personally I would make Arcane about 30 and add 10 to each of the Channeling promotions if I wanted to tweak this for myself. But since I often play at longer gamespeeds I don't think it is a chance that would work well for me.

Dora190: You can download Modular FfH and just keep the AI cheater Module if you want a quick and easy fix. It not only bumps up the weight, but also allows the AI to build upper tier magic users directly.
 
Alright I tried a few changes last night. Mages/Conjurers AIWeight 400 Archmages/Summoners AIWeight 500 and Channeling I 25, Arcane 25 , Sorcery 10 and Summoning 10. By the year 300 in a normal speed game the AI was upgrading some of its Adepts into Conjurers, but I never saw a mage.
I saw Mahala with 3 Conjurers two who had earth2/shadow2 and one with earth2/sun2 all three had a few other promotion like enchantment&body but none of them had any combat promotions. I did see a few adepts in Mahala's land with combat 5.
Also Alexis had 5 Conjurers all had death2 some had law2 some had shadow2 2 of them had combat 1 the other three had no combat promotions. Alexis had 2 Adepts inland with combat 5 and death. Alexis Had a huge force of skeletons, anyone capable of casting raise skeleton did so every turn.
also the AI seemed to use the conjurers to summon the level 2 summons alot more often than they needed to. I know Alexis had Strength of Will when I quit but not Soul Debt and I know that Mahala had neither.
 
Ok, here's what I've seen so far. Game as Grigori, Nikis Knight's huge map, Epic, Monarch, No AI building reqs, Turn 340~. Custom mods: AI weight on all T2 casters = 350, AI weight on all T3 = 400. Arcane Promotion = 30 +exp, Channelling 1/2/3 = +10 +exp each.

It's still early enough that most civs haven't had adepts for that long a time, but I can see several civs using them: Perpentach, Falamar, and Varn Gosam in small numbers, Valledia the Even in moderate amounts, Tebryn Arbadi in larger amounts. The Amurites have upgraded several adepts into Wizards. The Sheam have upgraded several into Conjurers. Changing the AI weight seems to work.

I've only been able to see the Sheam use casters in battle. They like to have 1-3 adepts accompany stacks of melee units and use Dance of Blades. I saw this some time before Tebryn had T2 casters.

I'm curious about how many adepts the AI will build once he's got higher tech units.
 
This is all quite exciting! Could the cure for magic malaise be so close to reality? What a concept... FfH AI with magic users. Yikes!
 
Back
Top Bottom