Posted: 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
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? QUICK_EDIT
[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. QUICK_EDIT
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? QUICK_EDIT
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. QUICK_EDIT
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?
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. QUICK_EDIT
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. 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