Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sat Apr 11, 2026 2:58 pm
All times are UTC + 0
AI doesnt doesnt Attack Oo
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: 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... :(
Reply with quote  Mark this post and the followings unread

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 <.<

Code:
[AITriggerTypes]
00000000-G=NOD-Infantry-Attack-001,0000001-G,Nod,2,-1,BARRACKS,0100000003000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,1,0,<none>,1,1,1
00000006-G=GDI-Infantry-Attack-001,00000005-G,GDI,2,-1,BARRACKS,0100000003000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,1,0,<none>,1,1,1

[Digest]
1=BbJIty5u4ThhOvlxvCOCN0Jwl+Y=


[0000003-G]
Name=5 Light Infantry and 5 Rockets
0=5,E1
1=5,E3
Group=-1

[00000004-G]
Name=5 Light Infantry and 5 Grenaders
0=5,E1
1=5,E2
Group=-1

[TeamTypes]
1=0000001-G
2=00000005-G

[0000001-G]
Name=NOD-Infantriy-attack 001
VeteranLevel=1
Loadable=no
Full=no
Annoyance=no
GuardSlower=no
House=NOD
Recruiter=no
Autocreate=no
Prebuild=no
Reinforce=no
Droppod=no
Whiner=no
LooseRecruit=no
Aggressive=yes
Suicide=no
Priority=8
Max=2
TechLevel=2
Group=-1
OnTransOnly=no
AvoidThreats=yes
IonImmune=no
TransportsReturnOnUnload=no
AreTeamMembersRecruitable=yes
IsBaseDefense=no
OnlyTargetHouseEnemy=yes
Script=00000002-G
TaskForce=0000003-G


[00000005-G]
Name=GDI-Infantriy-attack 001
VeteranLevel=1
Loadable=no
Full=no
Annoyance=no
GuardSlower=no
House=GDI
Recruiter=no
Autocreate=no
Prebuild=no
Reinforce=no
Droppod=no
Whiner=no
LooseRecruit=no
Aggressive=yes
Suicide=no
Priority=8
Max=2
TechLevel=2
Group=-1
OnTransOnly=no
AvoidThreats=yes
IonImmune=no
TransportsReturnOnUnload=no
AreTeamMembersRecruitable=yes
IsBaseDefense=no
OnlyTargetHouseEnemy=yes
Script=00000002-G
TaskForce=00000004-G

[ScriptTypes]
0=00000002-G

[00000002-G]
Name=Attack Anything
0=0,1

[TaskForces]
0=0000003-G
1=00000004-G

Back to top
View user's profile Send private message
OmegaBolt
President


Joined: 21 Mar 2005
Location: York, England

PostPosted: Mon Apr 01, 2013 5:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message Send e-mail
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Tue Apr 02, 2013 6:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Look here for more details about triggers.

Here are your triggers that I've adjusted with the changes:

Code:

00000000-G=NOD-Infantry-Attack-001,0000001-G,Nod,2,1,NAHAND,0100000003000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,2,0,<none>,1,1,1

00000006-G=GDI-Infantry-Attack-001,00000005-G,GDI,2,1,GAPILE,0100000003000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,1,0,<none>,1,1,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.

_________________

Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Wed Apr 03, 2013 2:22 am    Post subject: Reply with quote  Mark this post and the followings unread

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... Smile

This "House=NOD" worse Written by DCoders AI-Editor xD... hmm the AI Editor doenst Save Comments in the AI.ini =/

EDIT:

i have changed it to there Regular Unique Names sure is sure <.< xD



Unbenannt.jpg
 Description:
 Filesize:  191.84 KB
 Viewed:  2090 Time(s)

Unbenannt.jpg



Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Wed Apr 03, 2013 5:43 am    Post subject: Reply with quote  Mark this post and the followings unread

MrTweek wrote:
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... Smile


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.

_________________

Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Fri Apr 05, 2013 6:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hmm okay... but i had changed it to

"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" =( ????



Code:

; Techlevel 2
00000000-G=Nod-Infantry-Defense-001,00000001-G,Nod,2,1,NAHAND,0100000003000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,2,1,<none>,1,1,1
00000006-G=GDI-Infantry-Defense_001,00000005-G,GDI,2,1,GAPILE,0100000003000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,1,1,<none>,1,1,1
00000007-G=Nod-Infantry-Attack-001,0000000a-G,Nod,2,1,NAHAND,0100000003000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,2,0,<none>,1,1,1
0000000b-G=GDI-Infantry-Attack-001,00000008-G,GDI,2,1,GAPILE,0100000003000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,1,0,<none>,1,1,1
0000000c-G=Nod-Vehicle-Defense-001,0000000e-G,Nod,2,1,NAWEAP,0100000002000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,2,1,<none>,1,1,1
00000012-G=GDI-Vehicle-Defense-001,00000011-G,GDI,2,1,GAWEAP,0100000002000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,1,1,<none>,1,1,1
00000013-G=Nod-Vehicle-Attack-001,00000015-G,Nod,2,1,NAWEAP,0100000002000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,2,0,<none>,1,1,1
00000014-G=GDI-Vehicle-Attack-001,00000016-G,GDI,2,1,GAWEAP,0100000002000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,1,0,<none>,1,1,1
; Techlevel 3
0000002d-G=Nod-Vehicle-Defense-002,0000002e-G,Nod,3,1,NAWEAP,0100000004000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,2,1,<none>,1,1,1
00000026-G=GDI-Vehicle-Defense-002,0000002f-G,GDI,3,1,GAWEAP,0100000004000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,1,1,<none>,1,1,1
0000002b-G=Nod-Vehicle-Attack-002,00000018-G,Nod,3,1,NAWEAP,0100000004000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,2,0,<none>,1,1,1
0000002c-G=GDI-Vehicle-Attack-002,00000019-G,GDI,3,1,GAWEAP,0100000004000000000000000000000000000000000000000000000000000000,100.000000,50.000000,500.000000,1,0,1,0,<none>,1,1,1

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Fri Apr 05, 2013 7:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

MrTweek wrote:
Hmm okay... but i had changed it to

"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.

_________________

Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Fri Apr 05, 2013 7:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

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 =/

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Apr 06, 2013 1:03 am    Post subject: Reply with quote  Mark this post and the followings unread

MrTweek wrote:
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 Smile

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Sat Apr 06, 2013 2:13 am    Post subject: Reply with quote  Mark this post and the followings unread

MrTweek wrote:
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.

_________________

Back to top
View user's profile Send private message
MrTweek
Cyborg Soldier


Joined: 18 Jul 2012
Location: Germany

PostPosted: Sat Apr 06, 2013 2:21 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
that is probably the most important, yet underrated asset every elaborate mod has and most modder use. The silent hero behind the scenes


Hmm i tested  my changes everytime in skirmish =/... maybe is that the reason, that of the Errors are "invisible" for me =(....

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.2390s ][ Queries: 14 (0.0118s) ][ Debug on ]