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 Thu Mar 28, 2024 9:12 am
All times are UTC + 0
Comupter doesn't use some mod units
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
wiwimax
Soldier


Joined: 13 Dec 2016

PostPosted: Wed Oct 17, 2018 12:22 am    Post subject:  Comupter doesn't use some mod units
Subject description: How to Enable all units for AI / Computer player
Reply with quote  Mark this post and the followings unread

AI / Computer player doesn't use some of my mod units.

Example:

Yuri side doesn't train dogs at all. My guess is that Yuri side doesn't have dogs by default in original RA2YR, so obvious miss some AI strategy to build and use them.

Yuri also doesn't have airport, so if airport is a custom building, computer player don't built it.
I've force it to build the airport with replacing the default Psychic Radar building [YAPSIS] with the Airport code, but now Yuri don't build aircrafts, and I want not just AI to build them but also to use them, to attack me or another player.

Soviets doesn't have sniper by default, so that sniper behavior of using British sniper cannot be use by anyone else even if British sniper is made available for all countries.

Yuri also doesn't have a refinery, but when I made it, AI use it, and also makes specific miners for it, and works without any problem.

I don't remember exactly but I think that is skirmish AI don't build Boomers and Dreadnoughts, and finally if boomer sub is created then is never used to attack ground targets.

Grinder technology also is not used by the computer player not by Yuri not by anyone else that have some 3rd party grinder building available.
Also in Ares in particular I'm interested if somehow AI build grinder can be forced to use to grind vehicles and with ReverseEngineersVictims flag enabled finally to build the ReverseEngineersVictims.

If cosmonauts are made available then computer player with Soviet side (default) never create a teem to attack me.

I don't remember exactly does AI build Medic in TS, but I'm sure that it doesn't build it now.


So, is there some in-game logic how I can enable all this for AI / Computer player?

Back to top
View user's profile Send private message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Wed Oct 17, 2018 1:14 am    Post subject: Reply with quote  Mark this post and the followings unread

You should modify the aimd.ini and put all of your new units there.

For instance, my code on Yuri aircraft:
Code:
[TaskForces]
XX=0A6E9Y0Y-Y

[0A6E9Y0Y-Y]
Name=Yuri Aircraft - Yuri
0=4,STINGER
Group=-1

[TeamTypes]
XX=0CB1CDYC-Y

[0CB1CDYC-Y]
Name=Yuri Air Attack - Yuri
VeteranLevel=1
MindControlDecision=0
Loadable=no
Full=no
Annoyance=yes
GuardSlower=no
House=<none>
Recruiter=no
Autocreate=yes
Prebuild=no
Reinforce=yes
Droppod=no
UseTransportOrigin=no
Whiner=no
LooseRecruit=yes
Aggressive=yes
Suicide=no
Priority=5
Max=1
TechLevel=0
Group=-1
OnTransOnly=no
AvoidThreats=yes
IonImmune=no
TransportsReturnOnUnload=no
AreTeamMembersRecruitable=no
IsBaseDefense=no
OnlyTargetHouseEnemy=no
Script=0CB13B4C-G
TaskForce=0A6E9Y0Y-Y

[AITriggerTypes]
0C8C645Y-Y=Yuri Air Power,0CB1CDYC-Y,YuriCountry,3,4,<none>,0000000003000000000000000000000000000000000000000000000000000000,500.000000,10.000000,500.000000,1,0,3,0,<none>,1,1,1


By this, Yuri will build aircraft and use them against its enemies as long as your Yuri faction has Airfield and appropriate codes such as Dock=, PadAircraft=, etc.

Of course, you need to list your new triggers under [TaskForces] and [TeamTypes] lists. And if you made new scripts, you should list it also under [ScriptTypes].

Just try to study the aimd.ini and everything related to AI programming here and you'll be able to learn how to put new stuffs there.

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


Joined: 13 Dec 2016

PostPosted: Wed Oct 17, 2018 9:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Thank you for your detailed explanation.
I've found this aiedit as an amazing AI editor.

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Oct 17, 2018 9:16 am    Post subject: Reply with quote  Mark this post and the followings unread

Off-topic, but still related:

Why the 0A6E9Y0Y-Y, 0CB1CDYC-Y and 0C8C645Y-Y for IDs?
Does the game only accept seemingly random values like that or do they have some sort of meaning?

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Wed Oct 17, 2018 9:22 am    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
Off-topic, but still related:

Why the 0A6E9Y0Y-Y, 0CB1CDYC-Y and 0C8C645Y-Y for IDs?
Does the game only accept seemingly random values like that or do they have some sort of meaning?


Apparently, yes. It seems the engine doesn't care about it since they're all working. Because of that, I just did all of my AI edits via notepad and put some random values for me to easy to tell which faction is which, like, if it has "Y" then this AI stuff is for Yuri. I only use AIEdit for checking possible errors and making ScriptTypes.

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Oct 17, 2018 9:38 am    Post subject: Reply with quote  Mark this post and the followings unread

chr0nicz420 wrote:
TAK02 wrote:
Off-topic, but still related:

Why the 0A6E9Y0Y-Y, 0CB1CDYC-Y and 0C8C645Y-Y for IDs?
Does the game only accept seemingly random values like that or do they have some sort of meaning?


Apparently, yes. It seems the engine doesn't care about it since they're all working.

Confusing answer is confusing.

How about this: if I were to create a new team/script, etc., would these work?
If not, is there a link/tutorial on where/how to get valid Hexadecimal codes from?

Code:
[Taskforces]
XX=TskFrc1-Y

[TeamTypes]
XX=TemTyp1-Y

[AITriggerTypes]
AITrig-Y=...

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Oct 17, 2018 9:52 am    Post subject: Reply with quote  Mark this post and the followings unread

By using AIBuildThis=yes on a building, AI will typically build one instance of that building. AI also uses Build* category under [AI] section, only the first building for a side from that list is built. Commented ones like BuildAA are not used in YR. YR also uses AlliedBaseDefenses and the similar for base defense buildings. Game limitedly uses unit deploying into building (like mcv to conyard).

Ares adds AIBuildCounts and AIExtraCounts so that the number of instances of a building when using AIBuildThis can be specified. Ares also provides AI.BaseDefenses and AI.BaseDefenseCounts for the side sections.

Computer player uses ai(md).ini for creating units and teams in skirmish, updated AIEditor tool is available which comes with an offline AI Guide for reference. Basically you create TaskForces for units and ScriptTypes for what to do and then refer those in TeamTypes. When an AITrigger is triggered by the game it will create the referred TeamType(s). For testing you could keep the weights at 5000 so that that team is created as soon as possible and then when testing is over the weights could be reduced comparable to others.

In single payer maps, teams could be created with create team map actions or with reinforcements etc.. Refer the ModEnc's maps section where Actions, Events, Triggers and Tag sections can be used to make teams for specific houses.

There are game limitations where an AI water unit may not be able to acquire and fire at land targets. In vanilla TS also, AI medics are not created, even if it did, it has hardcoded healing limitations.

@TAK02: You can use like TskFrc1-Y, no problems. You can use any alphanumeric, underscore, hyphen etc. to make the IDs. There is an internal length for those, may be 24 or 48 characters etc., after that it will truncate and could result in the game considering those as duplicate IDs if the non truncated values turn out to be the same.

Back to top
View user's profile Send private message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Wed Oct 17, 2018 10:13 am    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
chr0nicz420 wrote:
TAK02 wrote:
Off-topic, but still related:

Why the 0A6E9Y0Y-Y, 0CB1CDYC-Y and 0C8C645Y-Y for IDs?
Does the game only accept seemingly random values like that or do they have some sort of meaning?


Apparently, yes. It seems the engine doesn't care about it since they're all working.

Confusing answer is confusing.

How about this: if I were to create a new team/script, etc., would these work?
If not, is there a link/tutorial on where/how to get valid Hexadecimal codes from?

Code:
[Taskforces]
XX=TskFrc1-Y

[TeamTypes]
XX=TemTyp1-Y

[AITriggerTypes]
AITrig-Y=...


I apologize for the confusing answer. I mean, it seems they accept random values since all my of IDs have random values and they're working fine.

As for your example, yes I believe that works. I've seen one with a very long ID IIRC, something like [IDONTGIVEAFCK]. I've always been studying all AI-related stuffs here on PPMForums and have seen some people using weird IDs and that's how I assumed any kind of ID will work. (My main concern anyway is how to make AI attacks very early and constantly and I've yet to find the answer but that's just my personal problem and irrelevant here)

As for valid hexadecimal codes, I believe they're from FA2? Honestly, I never used any programs to make AI... I only used AIEdit for checking if the AI that I made has no errors such as having duplicates in TaskForces, etc.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 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.1459s ][ Queries: 11 (0.0083s) ][ Debug on ]