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 Tue Apr 16, 2024 9:49 am
All times are UTC + 0
Strange problem with the AI
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
TiberFCSL
Cyborg Artillery


Joined: 10 Nov 2006

PostPosted: Thu Oct 18, 2012 4:37 pm    Post subject:  Strange problem with the AI Reply with quote  Mark this post and the followings unread

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:
Code:
CAHARVGDI=Cyborgs Attacking GDI Harvs,CAHARVATK,<all>,1,0,GHARV,0200000003000000000000000000000000000000000000000000000000000000,100.000000,80.000000,100.000000,1,0,3,0,<none>,0,1,1
CAINFGCY=Cyborgs Attacking GDI CY,EARLYCAGDICY,<all>,1,0,GARADR,0100000003000000000000000000000000000000000000000000000000000000,100.000000,80.000000,100.000000,1,0,3,0,<none>,0,1,1
CAPOWRGDI=Cyborgs Attacking GDI PPs,CAPOWRATK,<all>,1,0,GARADR,0100000003000000000000000000000000000000000000000000000000000000,100.000000,80.000000,100.000000,1,0,3,0,<none>,0,1,1
CAINFGDI=Cyborgs Attacking GDI Infantry,CAINFATK,<all>,1,0,E1,0A00000003000000000000000000000000000000000000000000000000000000,100.000000,80.000000,100.000000,1,0,3,0,<none>,0,1,1
CAVEHGDI=Cyborgs Attacking GDI Vehicles,CAVEHATK,<all>,1,0,GAWEAP,0100000003000000000000000000000000000000000000000000000000000000,100.000000,80.000000,100.000000,1,0,3,0,<none>,0,1,1

I've checked that all teams have "House=CABALAI".

The Houses and Sides are listed in rules.ini as here:
Code:
[Houses]
0=GDI
1=NodAI
2=CABALAI
3=Nod
4=CABAL
5=Forg
6=Scrin
7=Neutral
8=Special

[Sides]
GDI=GDI
NodAI=NodAI
CABALAI=CABALAI
Nod=Nod
CABAL=CABAL
Forg=Forg
Scrin=Scrin
Civilian=Neutral
Mutant=Special

_________________
Inactive Projects >> Tiberian Sun: Tech Level War http://www.ppmsite.com/forum/index.php?f=843
Download the latest beta: http://www.moddb.com/mods/cc-tiberian-sun-tech-level-war

Last edited by TiberFCSL on Thu Oct 18, 2012 7:47 pm; edited 2 times in total

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


Joined: 21 May 2004
Location: New Zealand

PostPosted: Thu Oct 18, 2012 7:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message Yahoo Messenger Account
TiberFCSL
Cyborg Artillery


Joined: 10 Nov 2006

PostPosted: Thu Oct 18, 2012 7:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

_________________
Inactive Projects >> Tiberian Sun: Tech Level War http://www.ppmsite.com/forum/index.php?f=843
Download the latest beta: http://www.moddb.com/mods/cc-tiberian-sun-tech-level-war

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


Joined: 21 May 2004
Location: New Zealand

PostPosted: Thu Oct 18, 2012 7:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

TiberFCSL wrote:
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

Back to top
View user's profile Send private message Yahoo Messenger Account
TiberFCSL
Cyborg Artillery


Joined: 10 Nov 2006

PostPosted: Fri Oct 19, 2012 1:30 am    Post subject: Reply with quote  Mark this post and the followings unread

I don't fully get it. So I add Special and Mutant to "Owner=" in rules.ini and also do this?
[CABAL]
Side=CABAL,Mutant,Special

_________________
Inactive Projects >> Tiberian Sun: Tech Level War http://www.ppmsite.com/forum/index.php?f=843
Download the latest beta: http://www.moddb.com/mods/cc-tiberian-sun-tech-level-war

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


Joined: 17 Apr 2009

PostPosted: Fri Oct 19, 2012 3:21 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
TiberFCSL
Cyborg Artillery


Joined: 10 Nov 2006

PostPosted: Fri Oct 19, 2012 4:21 am    Post subject: Reply with quote  Mark this post and the followings unread

If that was correct, GDI would also build cyborgs.

_________________
Inactive Projects >> Tiberian Sun: Tech Level War http://www.ppmsite.com/forum/index.php?f=843
Download the latest beta: http://www.moddb.com/mods/cc-tiberian-sun-tech-level-war

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


Joined: 17 Apr 2009

PostPosted: Fri Oct 19, 2012 5:59 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
TiberFCSL
Cyborg Artillery


Joined: 10 Nov 2006

PostPosted: Fri Oct 19, 2012 12:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

None of the Nod taskforces in ai.ini has cyborgs on it.

_________________
Inactive Projects >> Tiberian Sun: Tech Level War http://www.ppmsite.com/forum/index.php?f=843
Download the latest beta: http://www.moddb.com/mods/cc-tiberian-sun-tech-level-war

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


Joined: 03 Sep 2009

PostPosted: Fri Oct 19, 2012 3:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

_________________

Back to top
View user's profile Send private message
TiberFCSL
Cyborg Artillery


Joined: 10 Nov 2006

PostPosted: Sat Oct 20, 2012 3:55 am    Post subject: Reply with quote  Mark this post and the followings unread

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.



CABAL's Legacy ai.ini
 Description:

Download
 Filename:  CABAL's Legacy ai.ini
 Filesize:  78.66 KB
 Downloaded:  71 Time(s)


_________________
Inactive Projects >> Tiberian Sun: Tech Level War http://www.ppmsite.com/forum/index.php?f=843
Download the latest beta: http://www.moddb.com/mods/cc-tiberian-sun-tech-level-war

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


Joined: 19 Nov 2003

PostPosted: Sat Oct 20, 2012 5:51 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

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


Joined: 03 Sep 2009

PostPosted: Sat Oct 20, 2012 3:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

_________________

Back to top
View user's profile Send private message
TiberFCSL
Cyborg Artillery


Joined: 10 Nov 2006

PostPosted: Sat Oct 20, 2012 11:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thank you mates, but I think you don't get the "partial" solution, it's about changing this:
Code:
CAHARVGDI=Cyborgs Attacking GDI Harvs,CAHARVATK,<all>,1,0,GHARV,0200000003000000000000000000000000000000000000000000000000000000,100.000000,80.000000,100.000000,1,0,3,0,<none>,0,1,1

into this:
Code:
CAHARVGDI=Cyborgs Attacking GDI Harvs,CAHARVATK,<all>,1,1(AI BUILDS),(ANY CABAL STRUCTURE),0100000003000000000000000000000000000000000000000000000000000000,100.000000,80.000000,100.000000,1,0,3,0,<none>,0,1,1


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.

Anyway I'll try the other things that you've pointed out, thank you.

_________________
Inactive Projects >> Tiberian Sun: Tech Level War http://www.ppmsite.com/forum/index.php?f=843
Download the latest beta: http://www.moddb.com/mods/cc-tiberian-sun-tech-level-war

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


Joined: 03 Sep 2009

PostPosted: Sun Oct 21, 2012 11:44 am    Post subject: Reply with quote  Mark this post and the followings unread

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:
Code:
CAHARVGDI=Cyborgs Attacking GDI Harvs,CAHARVATK,<all>,1,0,GHARV,0200000003000000000000000000000000000000000000000000000000000000,100.000000,80.000000,100.000000,1,0,3,0,<none>,0,1,1

into this:
Code:
CAHARVGDI=Cyborgs Attacking GDI Harvs,CAHARVATK,<all>,1,1(AI BUILDS),(ANY CABAL STRUCTURE),0100000003000000000000000000000000000000000000000000000000000000,100.000000,80.000000,100.000000,1,0,3,0,<none>,0,1,1


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?

_________________

Back to top
View user's profile Send private message
[TiberianFuture]
Scrin Overlord


Joined: 30 Apr 2009
Location: The Mothership

PostPosted: Sun Oct 21, 2012 8:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

I can provide these information:

There's three cyborgs coded for the AI so far, and the Nod builds them all too. Here's one's code-
Code:
[CYPRCR]
Name=Piercer
Category=Soldier
Prerequisite=CABARR
Primary=LaserCannon
Crushable=no
TiberiumProof=yes
TiberiumHeal=yes
Fearless=yes
Cyborg=yes
Pip=white
Strength=467
Armor=none
TechLevel=2
Sight=5
Speed=4
Owner=CABAL,CABALAI,Special
Cost=500
Points=5
Nominal=yes
AllowedToStartInMultiplayer=no
VoiceSelect=PRCRSEL1,PRCRSEL2,PRCRSEL3,PRCRSEL4
VoiceMove=PRCRMOV1,PRCRMOV2,PRCRMOV3,PRCRMOV4,PRCRMOV5
VoiceAttack=PRCRATT1,PRCRATT2,PRCRATT3,PRCRATT4,PRCRATT5
VoiceFeedback=
VoiceDie=PRCRDMG1,PRCRDMG2
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
DamageParticleSystems=SparkSys
ThreatPosed=15
VeteranAbilities=FIREPOWER,STRONGER
EliteAbilities=AREA_GUARD,FASTER,SIGHT
Elite=ELaserCannon
ImmuneToVeins=yes
IsWebImmune=true


Code:
[NAHAND]
Name=Hand Of Nod
Prerequisite=NAPOWR
Strength=600
Armor=wood
TechLevel=1
Adjacent=3
Sight=5
Owner=Nod,NodAI,Special
Cost=300
Points=30
Power=-20
Factory=InfantryType
Crewed=yes
Capturable=true
Nominal=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=4
ThreatPosed=0
ExitCoord=0,0,0
NODBarracks=yes
DamageParticleSystems=SparkSys,SmallGreySmokeSys,BigGreySmokeSys
DamageSmokeOffset=480,96,125
AIBuildThis=yes


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

_________________
Check out some TF Kane's Wrath action:
Tournament 3rd place.
Vs. bikeRushOwnz in tournament.
Ladder wars vs. bikeRushOwnz.

Back to top
View user's profile Send private message Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 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.1756s ][ Queries: 13 (0.0110s) ][ Debug on ]