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 Fri Apr 19, 2024 12:29 am
All times are UTC + 0
How to make AI not cheat?
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [27 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Miqueltozzz
Civilian


Joined: 15 Jan 2011
Location: Finland

PostPosted: Sat Jan 15, 2011 12:15 pm    Post subject:  How to make AI not cheat?
Subject description: How to make AI not cheat?
Reply with quote  Mark this post and the followings unread

I have started to make my own AI mod (got annoyed by the cheating hard AI (which was still fairly easy to defeat), but I can't find how to make the AI not cheat.
The AI seems to build super fast and have lots of extra money, when i get war factory built, it already has tech center and lots of tanks.
Only options related to that what I have found are

[Difficult]
Groundspeed=1.0
Airspeed=1.0
BuildTime=1.0
Armor=1
ROF=1
Cost=1.0
RepairDelay=.01
BuildDelay=.05
BuildSlowdown=yes
DestroyWalls=yes
ContentScan=yes

So how can I make the AI not cheat at all?

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


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sat Jan 15, 2011 12:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

AI just builds much more efficient then a real player ever can #Tongue Also, an AI without cheating results in a rather boring AI imho...

Back to top
View user's profile Send private message Send e-mail Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Jan 15, 2011 12:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

Miqueltozzz wrote:
Only options related to that what I have found are

There's a lot more than that. Search for [AI] and you'll find a whole section for the AI behaviour.

In addition you can find under the [General] section the keys MultiplayerAICM, which gives the AI a money bonus at the start of the game and TeamDelays, AIHateDelays, AIAlternateProductionCreditCutoff, FillEarliestTeamProbability, MinimumAIDefensiveTeams, MaximumAIDefensiveTeams, TotalAITeamCap etc etc.

And finally you have to edit the ai.ini to change the attack and defense teams the ai builds.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

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


Joined: 07 Mar 2009

PostPosted: Sat Jan 15, 2011 2:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Play Contra, then appreciate TS' retarded AI.

_________________
Victory!

Back to top
View user's profile Send private message
Miqueltozzz
Civilian


Joined: 15 Jan 2011
Location: Finland

PostPosted: Sat Jan 15, 2011 5:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Oh I had no explanation for MultiplayerAICM in my rules.ini, I think that'll do the trick. Thanks a lot Smile
I think I'll have to experiment with that value, but I really don't want the AI to cheat at least that much. Does MultiplayerAICM value 250 mean that all the money AI gets is multiplied by 2.5?

And Dutchygamer, I'm trying to test if I can make a challenging AI even if it does not cheat, maybe u can try it too when i get it somewhat done Wink

Back to top
View user's profile Send private message Skype Account
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Sat Jan 15, 2011 6:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

Miqueltozzz wrote:
Does MultiplayerAICM value 250 mean that all the money AI gets is multiplied by 2.5?

No, it's a starting money multiplier, and doesn't affect the income given by harvesters. For example, with a MultiplayerAICM of 250, if you start with 10000 credits, the AI starts with 10000 * (100% + 250%) = 35000 credits. However, when the AI gets 800 credits from a full harvester, it'll get only 800.

_________________
CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered


Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sun Jan 16, 2011 12:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Only RA2 has a constant income multiplier, in the form of AIVirtualOrePurifiers (or something named similar, been ages since I modded RA2 properly) Wink

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


Joined: 24 Jul 2010
Location: Liyue

PostPosted: Sun Jan 16, 2011 5:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Tiberian Sun blows. It doesn't have AIVirtualPurifiers. #Tongue

_________________
KGR | AT
AZUR
Discord: theastronomer1836
Steam

Back to top
View user's profile Send private message Skype Account
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Sun Jan 16, 2011 5:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

It will soon.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Jan 16, 2011 6:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code:
[DUMMYAIMONEYBUILDING]
AIBuildThis=yes
Cost=-1000 ;give the AI some money when build
Strength=0 ;destroy itself when build
Techlevel=1
Prerequisite=CABHUT ;don't allow the player to build this

Wink

You could do the same with a unit and add a new team in ai.ini that builds this unit.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Sun Jan 16, 2011 7:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

I haven't tested that, but I imagine it could interfere with the AI's normal building of buildings. When the AI builds that dummy building, it gets destroyed immediately, and when the AI decides what building to build next it could choose that same building again since it doesn't have one of those in its base.

_________________
CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered


Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
ruptioner
Disk Thrower


Joined: 25 Nov 2005
Location: wales

PostPosted: Tue Jan 25, 2011 8:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

I know that the AI builds at a faster rate, and it is possible to change this. The build speed of the AI is 1.25 x the human player. Also, you can change the under power speed's (minimum production speed) and the wall/pavement speeds too.

MultipleFactory=0 ; factory bonus for multiples [1=full bonus, 0=no bonus] (def=1)
MinProductionSpeed=.5 ; minimum production speed as result of low power (def=.5)
WallBuildSpeedCoefficient=.5 ; how much faster than normal objects do walls build?
WorstLowPowerBuildRateCoefficient=.3 ; what is the lowest the build rate can get for being low on power?
BestLowPowerBuildRateCoefficient=.75 ; what is the highest the build rate can get when in a low power condition?

Im trying to look for the an AI snipet, the code that tells the computer how much faster or slower to build than the human player, give me a min unless someone can find it before me #Tongue.

O.K this code tells the computer whether or not to build faster or slower than the human player, however it's not the actual build rate code I was talking about.

BuildSlowdown= ; the default is no, typing yes would mean ti will build slower than the human player

_________________
If you don't eat, you don't poo, if you don't poo, you die.

Back to top
View user's profile Send private message Send e-mail Skype Account
GameMaster0000
Missile Trooper


Joined: 23 Mar 2006
Location: Thailand

PostPosted: Wed Jan 26, 2011 1:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
Code:
[DUMMYAIMONEYBUILDING]
AIBuildThis=yes
Cost=-1000 ;give the AI some money when build
Strength=0 ;destroy itself when build
Techlevel=1
Prerequisite=CABHUT ;don't allow the player to build this

Wink

You could do the same with a unit and add a new team in ai.ini that builds this unit.


Hmm...AFAIK AI ignored tech level but not Prerequisite, Or does I miss remember with RA2/YR?

Quote:
MultipleFactory=0 ; factory bonus for multiples [1=full bonus, 0=no bonus] (def=1)


This tag is not about AI. It is tag that make owner that has multiple factory build faster.

_________________

Tiberian Sun : True Power - Reality Power Of 5 Factions...

Back to top
View user's profile Send private message Skype Account
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Wed Jan 26, 2011 3:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

GameMaster0000 wrote:
Hmm...AFAIK AI ignored tech level but not Prerequisite, Or does I miss remember with RA2/YR?

I don't know how it's in RA2, but in TS the AI ignores both.

_________________
CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered


Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Wed Jan 26, 2011 4:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

^Rampastein wrote:
Lin Kuei Ominae wrote:
Code:
[DUMMYAIMONEYBUILDING]
AIBuildThis=yes
Cost=-1000 ;give the AI some money when build
Strength=0 ;destroy itself when build
Techlevel=1
Prerequisite=CABHUT ;don't allow the player to build this

Wink

You could do the same with a unit and add a new team in ai.ini that builds this unit.
I haven't tested that, but I imagine it could interfere with the AI's normal building of buildings. When the AI builds that dummy building, it gets destroyed immediately, and when the AI decides what building to build next it could choose that same building again since it doesn't have one of those in its base.

You wouldn't hve that problem if you make the building which has Cost=-1000 an (possibly invisible) upgrade which is only available for the AI. It then wouldn't have to destroy itself and the AI would only be able to produce as many upgrades as it has buildings to place it on.

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
Regulus
Commander


Joined: 16 Feb 2008
Location: The Lone Star State

PostPosted: Wed Jan 26, 2011 7:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

At least the Tiberian Sun AI isn't as omnipotent as the Tiberium Wars AI. Dear god that thing was full of shit.

_________________
You come for the modding but you stay for the Crap Forum.

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


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Wed Jan 26, 2011 8:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Regulus wrote:
At least the Tiberian Sun AI isn't as omnipotent as the Tiberium Wars AI. Dear god that thing was full of shit.

Care to explain to me how the AI can fire its Ion Cannon directly at your cloaked structures then, or will build more Devil's Tongues when you have a lot of inf #Tongue
AI is always all-seeing. It's the way the AI works Wink

Back to top
View user's profile Send private message Send e-mail Skype Account
Regulus
Commander


Joined: 16 Feb 2008
Location: The Lone Star State

PostPosted: Wed Jan 26, 2011 9:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

I said isn't AS omnipotent. At least in Tiberian Sun when you build an Engineer, a raider buggy shows up out of no where to kill it.

_________________
You come for the modding but you stay for the Crap Forum.

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


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Wed Jan 26, 2011 9:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Regulus wrote:
I said isn't AS omnipotent. At least in Tiberian Sun when you build an Engineer, a raider buggy shows up out of no where to kill it.

Even that can be done in TS, but I get what you mean. I always wait with training Engies in TW until I have some anti-vehicle units or anti-inf against Scrin (bloody Buzzers) #Tongue

Back to top
View user's profile Send private message Send e-mail Skype Account
ruptioner
Disk Thrower


Joined: 25 Nov 2005
Location: wales

PostPosted: Wed Jan 26, 2011 11:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you change the [Cost=-1000] or any value with a (-) the computer/human player will get that exact value in extra money.

If you build a power plant that has -1000 cost, you will receive 1000 funds. Also, if you do not deploy the building, but buy units/vehicles/aircraft and your funds reach 0, and you cancel the building, you are now in an invisible debt. It will show 0, but the game knows you owe 1000. If a harvester docs and deposits tiberium, you will still have 0 until the dept is paid back.

Now I just had an amazing idea. Create a new building, like the component tower 2, And create another building, that is an upgrade Called "HSBC Finance". Make the HSBC Finance building an add on to the componnent tower 2, but make the component tower 2 not buildable. Yet making both objects with the same prequest structure, preferably a refinery or barracks. This will allow you to build it, but not deploy it.

And walloah! you can now take out loans on tiberiansun if your stuck lmao.



hsbc.mpr
 Description:
Here we go! Just tested it and it works perfectly!

Download
 Filename:  hsbc.mpr
 Filesize:  3.47 KB
 Downloaded:  78 Time(s)


_________________
If you don't eat, you don't poo, if you don't poo, you die.

Last edited by ruptioner on Thu Jan 27, 2011 12:41 am; edited 1 time in total

Back to top
View user's profile Send private message Send e-mail Skype Account
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Thu Jan 27, 2011 12:40 am    Post subject: Reply with quote  Mark this post and the followings unread

HSBC, but what about LloydsTSB, im sure they have some type of texting system when you get low on funds...

Back to top
View user's profile Send private message
ruptioner
Disk Thrower


Joined: 25 Nov 2005
Location: wales

PostPosted: Thu Jan 27, 2011 12:59 am    Post subject: Reply with quote  Mark this post and the followings unread

I guess in the game we could include several loan buildings, a basic one at techlvl1, and and intermediate at teclvl 5 and advance loan at techlvl 9, each with a bank name. The higher the tech requirements, the bigger the loan!

_________________
If you don't eat, you don't poo, if you don't poo, you die.

Back to top
View user's profile Send private message Send e-mail Skype Account
Regulus
Commander


Joined: 16 Feb 2008
Location: The Lone Star State

PostPosted: Thu Jan 27, 2011 2:34 am    Post subject: Reply with quote  Mark this post and the followings unread

LMAO That's some awesum logic.

_________________
You come for the modding but you stay for the Crap Forum.

Back to top
View user's profile Send private message Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Jan 27, 2011 10:27 am    Post subject: Reply with quote  Mark this post and the followings unread

You don't need the unbuildable base.
Just create an Upgrade for e.g. CABHUT, a civil building that is never owned by the player.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

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


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Tue Feb 01, 2011 11:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Making the AI not cheat is pretty pointless in default engine because

1. AI ignores prerequisites, build limits, etc
2. AI has full map and sees through stealth
3. AI can't build extra factories due to cloning issue
4. AI attack forces use scripts which are based on events and thus are limited. It is not dynamic or learning.

Also due to wierd WW logic [Easy] is actually modifiers for a difficult AI and [Difficult] are modifiers for a hard ai.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Wed Feb 02, 2011 1:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

Allied General wrote:
2. AI sees through stealth

Not entirely in my experience. If you have all of your units and structures hidden, the AI's units won't attack you, they'll only move to your base and wait there until something is revealed (in most cases the AI's units will reveal your some base while moving next to your structures though). It doesn't care about stealth when targeting SWs though. And if you have almost everything stealthed but only a few units visible, the AI's attack teams will attack the few visible units instead of their scripts' targets.

In my opinion the TS AI handles attacking against stealthed stuff pretty nicely, in such a way that it's able to kill stealthed players but stealth isn't entirely useless against it.

_________________
CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered


Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Feb 02, 2011 2:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

^^correct. In TI i often build very fast a stealthgen to cloak my base and this way hide from the AI. If this AI is then attacked by another player, it will also stop sending its forces into my base and attack the other player instead. Since it then has another enemy, it will also stop firing its superweapons at my cloaked base.
Though one mistake (one of my units firing on the AI-player) and the AI will attack me again and it takes a while before another player can take its attention away from me.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

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