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 Nov 03, 2026 1:01 pm
All times are UTC + 0
Extended AI
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Rayne
Cyborg Soldier


Joined: 13 Dec 2008

PostPosted: Mon Oct 26, 2009 9:18 pm    Post subject:  Extended AI
Subject description: A way to get better AI
Reply with quote  Mark this post and the followings unread

(This applies to TS/FS too, but I believe they got better ai than RA/YR, so RA/YR needs it more)

So, I've been thinking.

I noticed that you're able to interact with different waypoints through AI. This is not often used, as the map usually only consist of the 8 waypoints of the players and maybe some more.
If you did add several waypoints to all of the maps, you could add some ai possibilities. For example, the AI could be set to always patrol a path, set in the map!
For example;
Waypoint...
20-23 The four corners of the map.
24 The middle of the map.
25-29 Strategical points (Good to hold)
30-39 Ambush points (Places where small forces could hide)
40/41 Small patrol spot 1 (you patrol between them)
42/43 Small patrol spot 2
44/45 Small patrol spot 3
46/47 Small patrol spot 4
48/49 Small patrol spot 5

This would really extend the AI's capabilities.

Discuss;
Is my list good? Any changed? Any additions? Any deletions?
Is my whole idea good? Discuss!

_________________
Hallå hallå!
sluta knuffas!
Check out that link! I'm making my own RTS, and you can support me with suggestions!
VV
http://ppmsite.com/forum/viewtopic.php?t=25048

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


Joined: 01 Feb 2007
Location: Las Vegas, Nevada, USA

PostPosted: Mon Oct 26, 2009 10:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

it is most likley best to have special ai for each map. some maps really dont have things like that... like tournament maps and stuff... idea is good though.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rayne
Cyborg Soldier


Joined: 13 Dec 2008

PostPosted: Mon Oct 26, 2009 10:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hmm...
If the ai is ordered to move to a waypoint that doesn't exist, will an error occur, or will it just not move?

_________________
Hallå hallå!
sluta knuffas!
Check out that link! I'm making my own RTS, and you can support me with suggestions!
VV
http://ppmsite.com/forum/viewtopic.php?t=25048

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


Joined: 01 Feb 2007
Location: Las Vegas, Nevada, USA

PostPosted: Mon Oct 26, 2009 11:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

dont know.... thats why i think its best to keep the main ai simple and not complex like this.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Vefbl4
General


Joined: 07 Feb 2007

PostPosted: Mon Oct 26, 2009 11:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Had the same idea.

_________________
Lost Relic[mod]
Lost Relic[game]

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


Joined: 13 Dec 2008

PostPosted: Mon Oct 26, 2009 11:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

@vefbl4: mine, or wardeathfun's?

_________________
Hallå hallå!
sluta knuffas!
Check out that link! I'm making my own RTS, and you can support me with suggestions!
VV
http://ppmsite.com/forum/viewtopic.php?t=25048

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


Joined: 23 Jun 2008
Location: Wandering Time

PostPosted: Tue Oct 27, 2009 12:03 am    Post subject: Reply with quote  Mark this post and the followings unread

Using the waypoints of a map for AI scripts like this is not a new idea. It was even mentioned a bit in the AI file of Deezire's editing guide, which was made years ago.

However making these scripts in the global AI will require editing of many/all (depending, you could use a few already in) stock maps, as wdf hinted at, for the AI to work on them, or putting the scripts in every map you make, which will still result in only some maps having the AI.

As editing the many stock maps is some work and also brings the mod's size up, this has not been used in many mods.

In mods that may be replacing about every map anyways, an more advanced, map-specific AI like this would be much more reasonable.

Back to top
View user's profile Send private message
Dark Templar X
Commander


Joined: 26 Feb 2009

PostPosted: Tue Oct 27, 2009 1:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Learn to ai(md). All I'm gonna say.

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


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Tue Oct 27, 2009 10:04 am    Post subject: Reply with quote  Mark this post and the followings unread

Dark Templar X wrote:
Learn to ai(md). All I'm gonna say.

This.

Back to top
View user's profile Send private message Send e-mail Skype Account
Nikademis Von Hisson
General


Joined: 05 Sep 2007
Location: Wilkes Barre PA

PostPosted: Thu Oct 29, 2009 11:24 am    Post subject: AI Reply with quote  Mark this post and the followings unread

If I read this post right you want a better AI. This is something I found on the AI some time ago. I am not sure who wrote it or which site I found it on. I just copied the info to a text file. I did not write it, I am just passing it on.

Quote:




Joined: 26 Oct 2004
Posts: 246


AI Tutorial
QUICK_EDIT

Attach signature (signatures can be changed in profile) close
I wrote a "little" AI Rules Tutorial. I also posted it to ModEnc. It descripts most Rulesmd.ini AI tags and I'll propably update it soon.
Sorry for mispelling, I'm not very good in English. Here it is:

CloseEnough=If your big taskforces get stuck, increase this.

Stray= ;If you want to use bigger TaskForces, increase this. ;Recommended:4-5.

RelaxedStray= ;Increasing this prevens big TaskForces to get stuck at regroup and gather command. ;Recommended:5-7.

GuardModeStray= ;Again, if you want to use bigger TaskForces, increase this. ;Recommended:3-4.

TeamDelays= ;This number says how often the AI checks for creating a TeamType in frames. Decreasing it is maybe the best thing you can ever do for the AI. Brutal, Medium, Easy. Recommended: Under 100. (I use 1,1,1 Twisted Evil )
AIHateDelays= ;Delay in frames before AI chooses an enemy. Keep it low.

MultiplayerAICM= ;Percent of addition money for AI. If you want your AI to have plenty of money, increase, but have more dogs guarding AI bases becouse if player's spy gets into an AI refinery, he gets a LOT of money. Brutal, Medium, Easy.

AIVirtualPurifiers= Same as above. 1 gives 25% bonus to money. Brutal, Medium, Easy.

AISlaveMinerNumber= Can be changed, but I recommend to leave it as it is.

HarvestersPerRefinery= Do not edit this. Only one AI will build additional harvesters and others will get stuck.

AIExtraRefineries= Same as above, but decreasing this can give AI more free space in base, and AI can replace a refinery fast. (but it also has less harvesters then, and less money) If you have big TaskForces and need space in base, decrease to 0,0,0 and increase AICM or VirtualPurifiers.
Probably can be increased on 2 player maps safely.


MinimumAIDefensiveTeams= Minimum number of IsBaseDefense=yes TeamTypes AI will build. If it is higher than max number of IsBaseDefense=yes TeamTypes AI can build, it will get stuck causing Soviet (But if high enough, also Allied and Yuri) dead AI issue. To prevent this, just make more IsBaseDefense=yes Teamtypes or increase their Max=. Recommended:3-5.

MaximumAIDefensiveTeams= Maximum number of IsBaseDefense=yes TeamTypes AI will build. Should be higher than minimum.
Recomennded:5-7.

TotalAITeamCap= Maximum of teams used by AI. Good idea to increase, but not too much if you haven't done something to give the AI more free space.

AIIonCannonxxxValue= Absolute ordering of targets when AI fires Weather Storm or Nuke.
Descripion:

AIIonCannonConYardValue= Value of buildings with ConstructionYard=yes
AIIonCannonWarFactoryValue= Value of buildings with WeaponsFactory=yes
AIIonCannonPowerValue= Value of buildings with Power= above 0
AIIonCannonTechCenterValue= Value of BattleLabs
AIIonCannonEngineerValue= Value of Engineers
AIIonCannonThiefValue= Value of Thiefs (Logic still present in RA2)
AIIonCannonHarvesterValue= Value of Harvesters
AIIonCannonMCVValue= Value of MCVs
AIIonCannonAPCValue= Value of Transporters
AIIonCannonBaseDefenseValue=Value of buildings with IsBaseDefense=yes
AIIonCannonPlugValue= Value of buildings with IsPlug=yes-if you give IsPlug=Yes to for example, SWs,this is their value. Of course, you must delete the comment first, or you get an IE.
AIIonCannonHelipadValue= Value of buildings with HoverPad=yes. Deleting the comment fixes HoverPad SW targeting IE.
AIIonCannonTempleValue= Value of buildings with IsTemple=yes. Same as with Plug. Tip- use for SWs,refineries or with Purifiers/Vats/Plants.

AISafeDistance= Distance from enemy/own base at which AI will execute the gather/regroup command. If your AI builds large bases, increase.

AIMinorSuperReadyPercent= If Iron Cortain or ChronoSphere is this charged, AI will start preparing teams which make use of it. Decrease if you have long-building Chrono or Curtain teams.

AlliedBaseDefenseCounts=
SovietBaseDefenseCounts=
ThirdBaseDefenseCounts=
Brutal, Medium, Easy. Number of defense builddings the AI will build for each side. If too high, AI just builds defenses and somehow forgets other buildings, also it then builds defense "chains". If you get total control of what AI builds when, then set defenses to be build later, increase this number to a very high number like 100, and you have nice ring of defenses around the AI base. If you want AI to have many defenses, but it always builds those chains, you can simply disable defenses and use tons of cloned buildings, that allows you to control when AI builds each building including defenses and things like sending SHK to all TESLA thanks to different building IDs.

AISuperDefenseProbability= Propability that AI will use ForceShield when attacked by major
SWs. Recommended:99

AISuperDefenseFrames= If ForceShield is not ready when AI is attacked by major SWs, it can wait maximally this long or it will not fire. Set to as high as is the shortest delay before nuke hits, storm starts etc.

NodRegularPower=
GDIPowerPlant=
ThirdPowerPlant=
Power plants that is built by the AI when it needs more power All powerplants AI builds are this, except first one) It is a good idea to set this to the powerplant with highest Power= your mod has for that side, even for the Soviets (having NANRCT is risky, but it saves much space) If you want AI to have more space, make high output powerplant for every side and set this to it.

A note to [BuildingTypes]:
As jkraska discovered, AI goes down trough the building type list building buildings as they are listed here. If it can't build next building, it starts again checking for its Prerequisites=. This means, that if you have GAWEAT higher in list than GACSPH, like:

17=GAWEAT
...
22=GACSPH

,it will build Weather Conrol first and Chronosphere later. Of course it builds only buildings with AIBuildThis=yes. Trough playing with building clones, changing positions of buildings in this list, and Prerequisites, you can get pretty good control of what AI builds when, but you will mess up ScriptTypes and have to fix them.




BuildXXX:All of these read only 1 building per side including ConcreteWalls.
BuildConst= ;Have all your Construction Yards here.
BuildPower= ;This is the first powerplant AI builds. You can have NANRCT here if you want,
but it will look strange. Also, this reads only one power plant per side so having here both NAPOWR and NANRCT just builds NAPOWR.

BuildRefinery= ;Have all your refineries here, even if they use Slave Miner logic.
BuildBarracks= ;Have all your barracks here.
BuildTech= ;Have all your Battle Labs here.
BuildWeapons= ;Have all your War Factories here
BuildRadar= ;Have all your Radars here
ConcreteWalls= ;Have all your walls here. These will be built around ProtectWithWall buildings, so if you replace GAWALL by GAPILL, it will build pillboxes around those buildings (And AI will be slower than ever before)

BuildNavalYard=;Have all your Naval Yards here.
BuildDefense= ;Used for standard defenses, but obsolete in YR
BuildPDefense= ;Used for power consuming defenses, obsolete in YR
BuildAA= ;Used for AA defenses, obsolete in YR
AlliedBaseDefenses=
SovietBaseDefenses=
ThirdBaseDefenses=
Have your defense buildings here. This can take unlimited number of these buildings, buildings listed here ignore BuildLimit and if you set it for country specific buildings like GTGCAN, it will build them for the whole side, that is why some modders prefer to clone Grand Cannon. Maximum of these buildings built is specified by XXXBaseDefenseCounts=, numbers of specific buildings built change with AIForcePredictionFudge and their AntiXXXValue.

AIForcePredictionFudge= AI chooses its defenses by analyzing units of player it chose as its enemy, and make weighted distribution of defense based on their AntiXXXValue. It is good to try to experiment with this value, sometimes lower can be better than higher, and combine this with extreme changes in defenses AntiXXXValues.

MaximumBaseDefenseValue= Comments in Rulesmd say it is obsolete, but changing this to very high values (like 4000) can have interesting results, but it will make AI concentrate on building defenses only and so you need again more control of what AI builds when.

CreditReserve= ;AI will repair building only if it has more than this credits.

PowerSurplus= ;AI will build power plants until it has this surplus.

BaseSizeAdd= ;Increasing this to very high numbers can make AI build huge bases, but only increases number of power plants and defenses as it cannot build more factories or refineries. You should increase it if you increased XXXBaseDefenseCounts=.

PowerEmergency= ;AI will sell buildings if it has less than this percent of power.

AIBaseSpacing= ;This is average space AI will leave between its buildings. Increase only if you have only few buildings or replaced maps with some that have more space for bases,or in map files.

[AIGenerals] ;This section was supposed for TS, but never finished. To make use of it, you must get AI.TLB file from TS and if you are modding YR, rename it to AIMD.TLB . You must place it into RA2 directory and then you can uncomment it with no IE. This section are actoally 5 Generals, different behaviours AI can have, something like bots. You need to use TriggerType (I'm not talking about TeamType here) BaseDefense and then you will find a new problem. Allies are attacking Soviets and vice versa, but Allies vs Allies is one really boring match, as they are doing almost nothing. To fix this bug, you must write MANY triggers attacking specific sides (not Attack Factories, but Attack Enemy NACNST for Soviets etc.) an if you do this, you can have better and more unpredictable AI, but Yuri is unchanged, as this was meant for GDI and Nod. This section could maybe also have something with unknown part of TriggerTypes, where Deeyire says, that it could specify which General uses this Trigger. Anyway, this section is a really hard work and you need to be really sure you want to do this. Still, if you thik you are an AI expert, you can try. I think Deezire used it in his mod, but I'm not sure.




AI Tips: By increasing RepairPercent= and lowering RepairRate= you'll get faster but more costly structure repair, with cost that is propably still no harm for AI and it makes AI much more annoying as it repairs everything under attack if it has enough money.


AI(MD).INI TIPS:
1:AI wont deploy Siege Chopper.
If you want to make AI use it, you must make it fire from air and use normal attacking script.

2:If you have a transport in your TaskForce, you can have ONLY 1 with transporting scripts.
If you have more, the AI will get stuck with it. Also, other units must exactly fit to the transport, so:
0 = 1 , HTK
1 = 4 , IVAN -or 6
doesnt work.
but 5 does as IVAN has Size=1 and HTK has Passengers=5
You can have max of 2 transport by using TeamType 2 in the trigger.

3:If you use both teamtypes 1+2 to double your TaskForce, check Max= of them if AI builds only one.

_________________
I am authorized to send out the TMP Studio, PM ME IF YOU WANT IT And check this out, these were sent to me for help with terrain and zdata help along with TMP Studio/Builder

http://www.ppmsite.com/forum/viewtopic.php?t=27714

Back to top
View user's profile Send private message Send e-mail Skype Account
Nikademis Von Hisson
General


Joined: 05 Sep 2007
Location: Wilkes Barre PA

PostPosted: Thu Oct 29, 2009 11:28 am    Post subject: AI Part 2 Reply with quote  Mark this post and the followings unread

This was something I found awhile ago on creating the AI. It helps a bit, it explains task/script/team/triggers.



AI.rar
 Description:

Download
 Filename:  AI.rar
 Filesize:  25.15 KB
 Downloaded:  262 Time(s)


_________________
I am authorized to send out the TMP Studio, PM ME IF YOU WANT IT And check this out, these were sent to me for help with terrain and zdata help along with TMP Studio/Builder

http://www.ppmsite.com/forum/viewtopic.php?t=27714

Back to top
View user's profile Send private message Send e-mail Skype Account
Rayne
Cyborg Soldier


Joined: 13 Dec 2008

PostPosted: Thu Oct 29, 2009 1:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

My point with this topic was to ask if it is a good idea to edit maps and give them some waypoints (see list in first post), so when you're making an AI for your mod, you can use them to make ambushes/similar.

I've read those AI tutorials. I'm not trying to make this AI, just wondering if it's a good idea?

_________________
Hallå hallå!
sluta knuffas!
Check out that link! I'm making my own RTS, and you can support me with suggestions!
VV
http://ppmsite.com/forum/viewtopic.php?t=25048

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


Joined: 21 Mar 2005
Location: York, England

PostPosted: Thu Oct 29, 2009 3:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

IMO it would be pretty useful and allow you to make the AI do other things than charge across the map.

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