Question for you guys, does anyone know how to make the AI attack more and various targets. Because right now only in the beginning do they attack but towards the end they stop attacking and idle around the map. Also sometimes they only attack one enemy base and completely ignore the other enemies.
AI Q & A
#101
Posted 21 March 2013 - 03:40 AM
#102
Posted 19 September 2015 - 04:57 AM
I've been working extensively on upgrading the AI with my work on Shadow and Flame, and I've come to one roadblock I cannot seem to understand. No matter what I try, I cannot get the Nazgul Heroes to mount their horses via the AI. I noticed even that none of the heroes in the Vanilla AI actually mount horses, but I have seen other mods do it successfully. I've attempted to mimic the scripts of TEA and TDH which both have heroes mounting via AI.
I have the mount toggle code working properly for the hero I assure you, so I won't bother posting the code for that.
Here is my current configuration for just one of my new Heroes:
Question for you guys, does anyone know how to make the AI attack more and various targets. Because right now only in the beginning do they attack but towards the end they stop attacking and idle around the map. Also sometimes they only attack one enemy base and completely ignore the other enemies.
I have also seen this happen, and I wonder why after a prolonged game the AI does seem to cease to function. Granted in my case it's not particularly common, but I've seen it happen and I would like to understand why.
Edited by Kwen, 19 September 2015 - 05:06 AM.
https://www.twitch.tv/vileartist - Yes shameless self-promotion
----------------------------------------------------------------------------------------------------------------------
"Old modders never die, they just fade away" ~ Hostile
#104
Posted 19 September 2015 - 02:22 PM
For some mind boggling reason, if I include the "be_Hero - Toggle Mounted Once - Uvatha" script in the team, the AI will build but no longer use the hero. He just stands at the citadel creation point indefinitely. If I remove that script, he functions again but does not mount.
https://www.twitch.tv/vileartist - Yes shameless self-promotion
----------------------------------------------------------------------------------------------------------------------
"Old modders never die, they just fade away" ~ Hostile
#105
Posted 19 September 2015 - 09:35 PM
I managed to fix the issue, but I honestly cannot say exactly what I did to fix it. I did forget to include the MordorUvathaCavalry object in object lists, but that wasn't the immediate fix for the issue. I was simply messing around in the generic tab and applying various behavior scripts to make the heroes function better, and all of a sudden it started working. I did confirm though if you add the "be_Hero - Toggle Mounted Once - Uvatha" script the hero does indeed break and fail to function. So the only needed scripts are the mount re-enable and the regular b_Hero Toggle one.
- Mathijs likes this
https://www.twitch.tv/vileartist - Yes shameless self-promotion
----------------------------------------------------------------------------------------------------------------------
"Old modders never die, they just fade away" ~ Hostile
#106
Posted 01 March 2019 - 12:55 PM
I hope this question fits in here...
The AI-Entmoot is summoning free Ents randomly over time. Where do I find this behavior and how can I prevent it? I searched for it in the Entmoot object code and the ai_rohan and ai_rohanskirmish map files, but without success so far.
#108
Posted 08 March 2019 - 01:51 PM
I only had to remove the condition in the Ent Moot Starters Team and now there are no automatic Ents over time anymore. Not exactly what you said, but still thank you
Edit: Maybe not... just saw some automatically created Ents again...
Edited by Super Hippo, 10 March 2019 - 05:38 PM.
#109
Posted 07 May 2019 - 03:56 PM
On page 2, there is the suggestion to
remove the "NOT_AUTOACQUIRABLE" from the KindOf list in the "IsengardDeployedExplosiveMine" object
to make the AI react to deployed mines. However, this also makes the AI set the deployed mines on fire by themselves. And the player controlled fire arrow units attack mines by themselves as well. Is there any way to prevent anything which would set the mine on fire to attack it automatically but still give the AI the possibility to set them (own or friendly deployed mines) on fire when they want?
I tried to add "-IsengardDeployedExplosiveMine" at the end of the "AutoAcquireEnemiesWhenIdle" line in the "HordeAIUpdate" module of archers. But apparently it isn't allowed to exclude objects there because it gives me an error when I try to start the game: "you may not mix normal and +- ops in bitstring lists".
My next guess was to do it via priority lists and set the priority of the deployed mine for archers to 0 or -1 or something. But I don't believe that it would work because that only influences the AI and not the player controlled units which would still attack it. (And I don't know if a priority of 0 or -1 means that it would never be attacked or only that it has the lowest priority, so it will still be attacked when nothing else is around.)
So right now, it seems like the best way would be to stop the AI building any mines and keep the NOT_AUTOACQUIRABLE KindOf… But maybe you have an idea how this could be fixed.
#110
Posted 15 May 2019 - 12:08 AM
Another AI related question...
Is it possible to let the AI replace killed workers in the mill they "belonged" to?
I was able to fix the replace worker code in ai_economy_execution.map (enabling Mk2 from Mk1 and splitting Mk3 into two scripts), so the AI will replace a worker when one is killed (and sometimes builds them and I don't know why yet), but they are build somewhere and not in the correct mill. So for example if the AI has two mills and I kill off four workers of one mill, he will build four new workers but maybe in the wrong mill so he has 8 in one and 0 in the other which isn't really helpful.
So I am looking for something like:
for each owned mill
-- if the number of workers in that mill is less than 4
-- -- build a worker in that mill
#111
Posted 17 May 2019 - 10:02 PM
In case anyone is still reading this
How can I force the AI to instantly start reviving a hero when it dies? Nazgûls don't cost money to revive them. So it is pretty logically to revive them as soon as possible. However, the AI seems to have the same condition to revive a hero as it has to build the hero in the first place. So for example the Mordor AI builds a Nazgûl for 5000, sends it to the fight and it dies. Now he won't revive it. When he gets another 5000, he will build the second Nazgûl instead of reviving the first one for free. I guess this is the same for all heroes but it is pretty obvious in my mod with all 9. Just watched it in spectator mode.
(Unrelated question: Can I somehow use the spectator mode without using a second computer?)
Changing "AutoSpawn" in the "RespawnUpdate" module to "Yes" doesn't change anything. I thought it may work, but I can't even see what it does at all.
I just created 8 identical teams (Nazgul 1-8) with maximum number of 1 instead of one team which can be there 8 times but it didn't change anything either.
Does anyone have an idea how this problem could be solved?
Edit: If this can be achieved, the reviving should not prevent other ones from building. So I want the AI to revive all 9 together if they all die instead of reviving them one by one. Or in other words: when reviving one, the AI should not have to wait the 5 minutes before it can build/revive another one.
Edited by Super Hippo, 17 May 2019 - 10:06 PM.
#112
Posted 31 May 2019 - 01:34 AM
In case anyone is still reading this
How can I force the AI to instantly start reviving a hero when it dies? Nazgûls don't cost money to revive them. So it is pretty logically to revive them as soon as possible. However, the AI seems to have the same condition to revive a hero as it has to build the hero in the first place. So for example the Mordor AI builds a Nazgûl for 5000, sends it to the fight and it dies. Now he won't revive it. When he gets another 5000, he will build the second Nazgûl instead of reviving the first one for free. I guess this is the same for all heroes but it is pretty obvious in my mod with all 9. Just watched it in spectator mode.
(Unrelated question: Can I somehow use the spectator mode without using a second computer?)
Changing "AutoSpawn" in the "RespawnUpdate" module to "Yes" doesn't change anything. I thought it may work, but I can't even see what it does at all.
I just created 8 identical teams (Nazgul 1-8) with maximum number of 1 instead of one team which can be there 8 times but it didn't change anything either.
Does anyone have an idea how this problem could be solved?
Edit: If this can be achieved, the reviving should not prevent other ones from building. So I want the AI to revive all 9 together if they all die instead of reviving them one by one. Or in other words: when reviving one, the AI should not have to wait the 5 minutes before it can build/revive another one.
In the Dwarf Holds mod after purchasing 1-3 fellbeasts from the upgraded Mordor citadel they revive for free.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users