Posted: Mon Apr 01, 2013 4:39 pm Post subject:
AI doesnt doesnt Attack Oo
Subject description: ... The Teams are created... and produced... but doesnt attack... :(
Hello i have a problem with my new (from scratpad) written AI.ini file for my Mod... The Problem is, The AI builds the Specified Unit-Teams but doesnt send them out to my Base for attack <.<
If that is all you have then you should first code the defensive teams. The AI needs at least the number of team types with IsBaseDefense=yes set as the number under MinimumAIDefensiveTeams in rules.ini QUICK_EDIT
At least the trigger condition is wrong. BARRACKS can't be used as a condition, it should be a proper building ID (BARRACKS is one of the OR prerequisites). So for GDI use GAPILE, for Nod use NAHAND. Also the trigger condition type is set at -1, which makes it a pool team. I'd personally recommend not using pool teams. Set it to 1 (AI owns) and fix the building ID. Also you are using the same side identifier for both triggers. The Nod one needs to be 2 instead of 1.
On the TeamType the Nod team should have House=Nod, not House=NOD. I'm not absolutely sure whether or not these are case sensitive but I'd recommend using the same everywhere. I'd also suggest using more descriptive identifiers for everything, your ai.ini will become a complete mess if you add alot more stuff with random numbers as IDs. _________________ QUICK_EDIT
Mhmmm the Misstake worse on another Position... now it works.... and the "BARRACKS" does also work =/... my triggers are for Example:
When a Side has more than One Factory (Weaponfactory) then send 4 Mammoth Tanks to Its Base and Attack any BuildingType =/
Generic Things like BARRACkS and FACTORY, RADAR, AA and so on works also well...
That's because you have them as pool teams (-1 before trigger condition). Pool teams ignore the trigger condition altogether. I just even confirmed it by giving an AI trigger a condition where it owns 9 structures it can't even build, and it happily used the trigger. Hell the trigger condition can be a structure that does not even exist and the trigger is still used. When the trigger isn't a pool team, generic prerequisites do not work (confirmed this too).
I still advice against pool teams, they don't let you use the trigger condition and overall they don't follow any logic. Other than Westwood logic, which usually isn't very good. _________________ QUICK_EDIT
"Owning house own number of TECHTYPE"... now the AI is Attacking me
before i have barracks =( ... or must i use
"Enemy House owns number of Techtype" =( ????
Uhh, it really depends what you want. Right now the AI builds the infantry teams when it has a barracks, and the vehicle teams when it has a warfactory. That makes sense to me. How can the AI attack you before you have a barracks? Shouldn't it take the same time for them to build a barracks as it takes you?
If you really want the AI to not attack this early, you could increase the AIHateDelays value (delay in frames before the computer chooses an enemy, by difficulty level). Or just set UseMinDefenseRule=yes and adjust MinimumAIDefensiveTeams and create some defensive teams. There must be at least as many defensive teams in ai.ini (for both GDI and Nod) as you've listed in MinimumAIDefensiveTeams. _________________ QUICK_EDIT
I had take a look in the ai.ini from TI and there is the Solution in the Situation... for my idea i must use "0" instead of 1 (for attack) but "-1" for defense =)
i had also readed, that the Game has Hardcoded ... Triggers is that confirmed? =/
another solution is to build a test-mao with final-Sun and reveal the Map... to show what the KI is doing =/ QUICK_EDIT
build a test-mao with final-Sun and reveal the Map... to show what the KI is doing =/
that is probably the most important, yet underrated asset every elaborate mod has and most modder use. The silent hero behind the scenes _________________ SHP Artist of Twisted Insurrection: Nod buildings
I had take a look in the ai.ini from TI and there is the Solution in the Situation... for my idea i must use "0" instead of 1 (for attack) but "-1" for defense =)
i had also readed, that the Game has Hardcoded ... Triggers is that confirmed? =/
If you use 0 (enemy owns) for the attack triggers, that can be quite exploitable by human players. E.g. you are being overrun by AI, so you intentionally sell your warfactory, stopping the AI from attacking you with vehicles. Then just mass anti-inf defences and you're pretty much safe. If you do use pool teams, you should make sure there are other teams that recruit their members, as I don't think pool teams follow pretty much any rules. The AI just periodically builds them, regardless of trigger conditions or trigger weights, and possibly even ignoring the Max property on the team. _________________ 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