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

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Fri Sep 30, 2022 7:53 pm
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum
CnCNet5 AI issue
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
hlidskialf
Vehicle Driver


Joined: 06 Jan 2014
Location: Germany

PostPosted: Wed Aug 24, 2022 8:06 pm    Post subject:  CnCNet5 AI issue
Subject description: AI spams harvester units
Reply with quote  Mark this post and the followings unread

I have made a strange discovery with one of the modded AI's from this page.
Maybe you can remember the user midnightgreen:

https://ppmforums.com/viewtopic.php?highlight=droppod&t=18734

I have copied the files for his AI to my cncnet folder, where Tiberian Sun is installed and played multiple games versus AI.

In AI.INI there is a trigger, which tells the AI to produce new harvesters until it has a specific amount of them. But at some point, it seems to ignore the trigger conditions (i. e. if x < 12 -> build harvester, x ... amount of HARV).
So I looked into the AI.INI and RULES.INI, tried changing some AI related flags/Trigger conditions and thats what I have found:

(i) Spectator mode, only one AI present, nothing changed:
AI builds harvesters as it is intended by the trigger

(ii) Spectator mode, two AI's versus each other, nothing changed:
After some time of base build, both AI's begin to spam harvesters, ignoring the x < 12 condition

(iii) Spectator mode, change the TaskForce from 1 HARV to 1 BGGY:
AI only builds 12 buggies and don't spam them.

(iv) Set a lower value for y=DissolveUnfilledTeamDelay (value is 99999 for the mod), i. e. 9000:
The AI ignores the condition again, but not as much as with the 99999 value (spams less harvesters). The lower the value the closer it comes to the x < 12 condition. Downside: The AI cancels big attack teams.

(v) Let every value unchanged (with y=99999), copy the mod-files to a vanilla CD-installation:
Everything works. The AI don't spam harvesters.

Conclusion:
IIRC, the ts-spawn.exe is hacked to let harvesters auto-harvest tiberium after they exit a factory. So that seems to be the reason, why it happens in CnCNet but not through a vanilla installation.

I guess thats some minor issue and no one bothers about it, but maybe somebody else have encountered this strange AI behavior through modding.

Back to top
View user's profile Send private message
blackhand1001
Medic


Joined: 30 Oct 2005

PostPosted: Thu Aug 25, 2022 12:31 am    Post subject: Reply with quote  Mark this post and the followings unread

You can actually fix this by adding Recruitable=yes to [Harvest] in rules.ini. I added it to Hunt, Area Guard and Harvest. It also fixes the spamming of MCVs if you add it to hunt. Also low dissolveUnfilledTeamDelays won't prevent large teams. As long as atleast one unit is in production or already exists it will complete the team.

Also you will need to make your taskforce have the total number of harvesters you want it to build as it will recruit ones on the map already into the team. So I recommend setting the taskforce to 12 harvesters as well. It will never build more than 12 since it will recruit the ones on the map first. The script on the teamtype should just have no actions at all.



But yeah I had a similar issue to you a few weeks back and adding those recruitable lines fixed it completely. I also have tested the DissolveUnfilledTeamDelay extensively and found that values between 2500-3000 work the best.

Back to top
View user's profile Send private message
hlidskialf
Vehicle Driver


Joined: 06 Jan 2014
Location: Germany

PostPosted: Thu Aug 25, 2022 5:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

So I have to thank you, that you had similar issues weeks ago and could solve the problem! Very Happy
I will test it with the changes as advised by you.
This unit spamming got me headaches ... -.-

EDIT:
Runs like a charm. Smile
I added "Script=0" to the involved TeamType.
Thanks again!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum
Jump to:  
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.1406s ][ Queries: 11 (0.0089s) ][ Debug on ]