Posted: Thu Oct 18, 2012 4:37 pm Post subject:
Strange problem with the AI
I have this strange problem in my mod, somehow Nod uses CABAL AI triggers too (CABAL uses its AI triggers with no problems). BTW, Nod has no cyborgs but builds them as well.
(I've omitted the corresponding triggers against Nod and CABAL to avoid confusion)
Here they are:
Do both sides you the same cyborg? if so you make need to make a clone cyborg to counter the AI errors.
I had a problem like nthis a while ago. damn TS errors, pain in the arse. _________________ Link to a document to see what mods i have and/or working on or working with
Click QUICK_EDIT
Even when Nod can't build cyborgs (they're not in their Owner tag nor in any ai.ini tags), the Nod AI builds them.
I know. you need to add existing sides that are redundant in TS like civilian and mutant. to Cabal side on the unit its self and country. it would take too long to explain
basically it forces AI to make the cabal units as a different side and should in theory stop the bug.
Also delete any AI tags that allow Nod the build the cyborgs. that should help.
BTW when i said tags i mean delete all reference form Nod faction in AI about cyborg's that's triggers and everything related. i think there is alot of triggers for cyborgs just replace it with your new unit. that should plug up the problem. Else i have no flaming idea. _________________ Link to a document to see what mods i have and/or working on or working with
Click QUICK_EDIT
The AI can build anything to fulfill a TaskForce, regardless of any other condition if I remember correctly. The Nod AI is using a trigger that contains the Cyborg. QUICK_EDIT
Not necessarily. You should double-check your Taskforces and make sure Nod taskforces (either from TS or FS) don't use the Cyborgs. I made the YR Allied AI build a Rhino Tank (on an unmodified YR rulesmd.ini if I remember correctly) so that's why I suggested the above. QUICK_EDIT
Send me your ai.ini and I will take a look. You've used this trick to make the AI play as the 3 first factions? Also, why do you have seperate NodAI and Nod? To give the human Nod a unique MCV / con.yard? Dunno if the game is picky and wants the first 2 factions to be called GDI and Nod, never tried to alter them.
EDIT: Did you adjust ai.ini or aifs.ini? Adjust only one of them, remove everything from the other one. _________________ QUICK_EDIT
I don't know what trick TiberianFuture used to make the AI play as the 3 first factions nor why there's separate NodAI and Nod.
I've edited aifs.ini and deleted everything but kept the digest section to make the game to ignore the original aifs.ini inside mix files.
BTW, I partially avoided the problem by changing every trigger to depend on what the AI builds instead of the enemy (replaced the 0 by 1) and saved it on a new file.
Anyway, here's the file.
Should probably put the house into the aitrigger instead of try make do with the house number which probably won't work past original houses despite adds. QUICK_EDIT
Should probably put the house into the aitrigger instead of try make do with the house number which probably won't work past original houses despite adds.
The extra numbering (3, 4, etc) does work for extra factions, I've never had to use the house in the trigger. But if nothing else works for you TiberFCSL, this is worth a try. Though I suspect the problem is elsewhere.
Take a look at the exe with the instructions linked in my last post. Make sure the value was changed to 02.
One thing I noticed by going over the ai.ini is that Nod has 9 base defense teams, GDI roughly 20, and Cabal 3. What are the values for MinimumAIDefensiveTeams and MaximumAIDefensiveTeams in rules.ini? And is UseMinDefenseRule set as no? Actually none of the Triggers are using the base defense property, it is only defined for the TeamTypes. Base defense teams should have it set for both TeamTypes and Triggers I think.
One more thing I can think of is setting PreBuild to no, WW didn't use it for any of the TeamTypes and I've never used it either. Dunno if it could cause problems for extra factions, so try setting it to no for the cyborg teams. _________________ QUICK_EDIT
The "IsBaseDefense" tag in the teamtypes, to me, has been for ages the only way to make the AI build a pool team, that's why I use it in every one of them. If you have proof of the opposite, please tell me because it has always worked to me that way.
I used the exact same TeamType and Trigger as the cyborgs in your ai.ini and I can't make my Nod build my 3rd faction (Forgotten) units. So I can't even force this bug to happen, at least not in ai.ini.
I also noticed that AI actually does care about Owner key when building units, I couldn't make my Forgotten build Nod or Civilian units. Always thought the AI would just build anything, guess I never tried cross ownership teams. They care about TechLevel too, it can't be -1, but this probably isn't news to anyone.
Another thing, enabling the Base Defense property for the trigger (the last 0 after the trigger weights) causes the trigger condition to become irrelevant. At least if you give the trigger an impossible condition, the AI will still go on and build the team. Dunno if the Base Defense property in the trigger is absolutely required for the AI to consider the team towards the Maximum and MinimumAIDefensiveTeams, or if it is enough to just use IsBaseDefense=yes on the TeamType.
TiberFCSL wrote:
Thank you mates, but I think you don't get the "partial" solution, it's about changing this:
If you go this route, you should try what ApolloTD said. You shouldn't "waste" the trigger condition check to get rid of this bug.
TiberFCSL wrote:
The "IsBaseDefense" tag in the teamtypes, to me, has been for ages the only way to make the AI build a pool team, that's why I use it in every one of them. If you have proof of the opposite, please tell me because it has always worked to me that way.
The reason I brought the IsBaseDefense up is because Cabal has only 3 teams with this, and if rules.ini has e.g. MinimumAIDefensiveTeams=4, it could cause problems for the AI as it can't build enough defensive teams.
Anyway I think the problem has to lie in rules.ini. The problem might be having 2 extra factions (NodAI, CABALAI). Since both of those extra factions rely on having Special in the Owner key it could mess something up. I never went beyond 1 extra faction so can't tell if it causes problems or not. Does the mod still have starting units? Is the Nod AI actually building the cyborgs or maybe it just starts out with them? Is the cyborg the only unit from Cabal's side that it builds? What if you add another Cabal unit to the taskforce of the bugged team, will it still build the team?
EDIT: Can you post the code for the bugged cyborg unit and the barracks that the NodAI uses. Technically that cyborg should not be able to be built from a barracks that doesn't have the same Owner. Do they both have Special as the owner? _________________ QUICK_EDIT
There's no starting unit as bases must be set to 'no'.
The Nod builds it's own units normally, then occasionally makes the cyborg teams too (which are, so far, only teams for CABAL ai).
I've added the AI factions to allow players have separate MCV and CY for each faction. At least I think that was the reason. _________________ Check out some TF Kane's Wrath action:
Tournament 3rd place. Vs. bikeRushOwnz in tournament. Ladder wars vs. bikeRushOwnz. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum