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 2:33 pm
All times are UTC + 0
AI base defense
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
tekka warrior
Stealth Laser Trooper


Joined: 21 May 2012
Location: Beirut,Lebanon

PostPosted: Sat Nov 23, 2013 9:17 pm    Post subject:  AI base defense Reply with quote  Mark this post and the followings unread

Hello.

Some of you already know i added a guard tower for the soviet faction, which can be garrisoned.

However, the AI seems to build only 1 guard tower, instead of treating it like a sentry gun (or an original base defense)

Building code:

; Soviet Guard Tower
[NATOWR]
UIName=Name:NATOWR
Name=Soviet Guard Tower
BuildCat=combat
Strength=800
Armor=Steel
Prerequisite=NACNST,NAHAND
TechLevel=1
Adjacent=4
ROT=15
Sight=15
DetectDisguise=yes
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs,YuriCountry
AIBasePlanningSide=1
Cost=800
BaseNormal=no
Points=30
Power=0
Crewed=yes
Capturable=true
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
DebrisAnims=DBRIS4LG,DBRIS4SM,DBRIS6LG
MinDebris=5
MaxDebris=10
ThreatPosed=30 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,LGSparkSys
IsBaseDefense=yes
HasStupidGuardMode=false
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
CanBeOccupied=yes
Trainable=yes
AIBuildThis=yes
MaxNumberOccupants=4
CanOccupyFire=yes

Is there anything i need to modify/add, in order to make the AI build this defense like all others?

Thank you.

Back to top
View user's profile Send private message
gameaddict11707
Grenadier


Joined: 15 Jul 2011

PostPosted: Sat Nov 23, 2013 9:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Add NATOWR to the SovietBaseDefenses= list.

_________________
aka SavebearingBoss

Back to top
View user's profile Send private message
tekka warrior
Stealth Laser Trooper


Joined: 21 May 2012
Location: Beirut,Lebanon

PostPosted: Sat Nov 23, 2013 9:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

I did , the AI still builds 1 only.

What else?

Back to top
View user's profile Send private message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Sat Nov 23, 2013 10:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

I suspect you need those:
AntiInfantryValue=
AntiArmorValue=
AntiAirValue=
Sentry gun uses 25, 10 and 0

Rulesmd wrote:

These three are in abstract units and just help the AI pick the right base defense.

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


Joined: 28 Sep 2013
Location: Plovdiv, Bulgaria.

PostPosted: Sat Nov 23, 2013 10:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

Agent Z wrote:
I suspect you need those:
AntiInfantryValue=
AntiArmorValue=
AntiAirValue=
Sentry gun uses 25, 10 and 0

Rulesmd wrote:

These three are in abstract units and just help the AI pick the right base defense.



I think that these help the AI picking the right target. If you set:
AntiInfantryValue=25
AntiArmorValue=10

It will fire first on infantry, if there are vehicles and infantry.

Back to top
View user's profile Send private message Visit poster's website YouTube User URL Skype Account
mevitar
Missile Trooper


Joined: 31 Dec 2010

PostPosted: Sat Nov 23, 2013 10:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

AI will build only one building of this type when it has AIBuildThis=yes.

Back to top
View user's profile Send private message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Sat Nov 23, 2013 10:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

PillBox20 wrote:

I think that these help the AI picking the right target. If you set:
AntiInfantryValue=25
AntiArmorValue=10

It will fire first on infantry, if there are vehicles and infantry.


This is written in rulesmd:
Rulesmd wrote:
These three are in abstract units and just help the AI pick the right base defense. (see AIForcePredictionFudge)


Then up next to the mentioned (see AIForcePredictionFudge):
Rulesmd wrote:

AlliedBaseDefenses=GAPILL,ATESLA,NASAM
SovietBaseDefenses=NALASR,NABNKR,TESLA,NAFLAK
ThirdBaseDefenses=YAGGUN,YAPSYT,NATBNK
AIForcePredictionFudge=5,25,80
;gs To decide what base defense to use, since all of our new ones do not
;do conventional damage, the AI will analyze the Enemy's force (in money terms)
;and pick Air Armor or Infantry.  This analysis will be fudged by difficulty level by
;the above percent (+/- n%).  Once the pick is made, all currently buildable base
;defenses will be made into a weighted distribution based on their AntiXXXValue numbers.
;PS, It knows to consider Rocketeer as Air, as well as Blimps and V3s


I think this means it help AI calculate which defence to build, by telling it how effective they are supposed to be vs the different targets.
The probable default of 0, would make AI consider this useless as a base defence I suppose.

Back to top
View user's profile Send private message
tekka warrior
Stealth Laser Trooper


Joined: 21 May 2012
Location: Beirut,Lebanon

PostPosted: Sun Nov 24, 2013 10:19 am    Post subject: Reply with quote  Mark this post and the followings unread

It worked flawlessly!

Thank you guys so much .

Back to top
View user's profile Send private message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Sun Nov 24, 2013 12:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Was it the AiBuildThis or the Anti...Values?
Would be good to know for future which one was causing this.

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


Joined: 24 Jul 2010
Location: Liyue

PostPosted: Sun Nov 24, 2013 4:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

AIBuildThis. The stock base defenses don't have this tag. The AI treats them differently based up the XDefensesList tag.

_________________
KGR | AT
AZUR
Discord: theastronomer1836
Steam

Back to top
View user's profile Send private message Skype Account
tekka warrior
Stealth Laser Trooper


Joined: 21 May 2012
Location: Beirut,Lebanon

PostPosted: Mon Nov 25, 2013 2:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

The cause was , that the anti infantry,armor,and air values were missing.It needs the 'AIBuildThis' tag, and these values i think.

Adding them fixed the issue

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