:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sun Nov 19, 2017 8:55 am
All times are UTC + 0
 Forum index » Modding Central » Red Alert 2 Editing Forum » Ares (Unofficial Forum)
AI won't rebuild the upgrade
Moderators: Ares Support Team at PPM, Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [10 Posts] View previous topic :: View next topic
Author Message
Frank123
Medic


Joined: 19 Sep 2016
Location: Somewhere in Asia

PostPosted: Wed Sep 28, 2016 6:06 am    Post subject:   AI won't rebuild the upgrade
Subject description: Does anyone get this problem?
Reply with quote

Today I made an upgrade (with animation) for the Soviet Battle Lab. I can build it without any problem and so can the AI for the first time, but after the AI's upgraded Battle Lab was destroyed, AI rebuilt it without rebuilding the upgrade. I've tested this several times, waiting for AI to build all structures but the problem is still the same.
I've checked the debug.log, nothing is special except this line repeating:
"Abandoning production of Tech Upgrade"
Here is the code of my upgrade:

[NAUPGRADE]
UIName=NOSTR:Tech Upgrade
Name=Tech Upgrade
Prerequisite=NACNST,NATECH
BuildCat=Combat
Armor=wood
TechLevel=7
AIBasePlanningSide=1
Sight=1
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs,YuriCountry
Cost=300
Power=-15
Points=10
AIBuildThis=yes
PowersUpBuilding=NATECH
PowersUpToLevel=-1
ThreatPosed=0
Capturable=no
Crewed=no

Back to top
View user's profile Send private message
E1 Elite
Laser Commando


Joined: 28 May 2013

PostPosted: Wed Sep 28, 2016 7:43 am    Post subject: Reply with quote

Tech building could be the problem. It works on other buildings.

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


Joined: 19 Nov 2003

PostPosted: Wed Sep 28, 2016 8:40 am    Post subject: Reply with quote

Oh I misread... But yes, AI only applies usually the upgrade once and the other same building won't get it to my recall.
TS had some extra logic to this with power plant but the extra logic is gone.

Back to top
View user's profile Send private message
Frank123
Medic


Joined: 19 Sep 2016
Location: Somewhere in Asia

PostPosted: Wed Sep 28, 2016 9:50 am    Post subject: Reply with quote

@E1Elite: No, It's not a tech building, "Tech Upgrade" is just the name of my upgrade for the Soviet Battle Lab.
@ApolloTD: So it's some kind of bug and has no way to fix?

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Sep 28, 2016 10:22 am    Post subject: Reply with quote

You could give the AI a cloned version of the lab which is build already equipped with the upgrade by default (with the upgrade animation set as normal ActiveAnim to the cloned version of the lab).
After all your upgrade is just an animation and the AI doesn't care about prerequisites anyways, so it doesn't matter for the AI if it has the upgrade or not.
_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

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

Tools
TMP Shop
C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
Laser Commando


Joined: 28 May 2013

PostPosted: Wed Sep 28, 2016 10:38 am    Post subject: Reply with quote

Soviet Battle Lab is Tech building, it is in BuildTech=NATECH. Game has bug with
Tech building, when destroyed, its abilities still remain. Put the upgrade on some
other building and try.

There is no problem for me with other buildings like powerplants etc. for AI when
destroyed and rebuilt. It builds the upgrade also.

Back to top
View user's profile Send private message
Frank123
Medic


Joined: 19 Sep 2016
Location: Somewhere in Asia

PostPosted: Wed Sep 28, 2016 10:42 am    Post subject: Reply with quote

Thank you for your advices!  Smile

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


Joined: 11 Jun 2016

PostPosted: Wed Sep 28, 2016 8:12 pm    Post subject: Reply with quote

E1 Elite wrote:
Soviet Battle Lab is Tech building, it is in BuildTech=NATECH. Game has bug with
Tech building, when destroyed, its abilities still remain. Put the upgrade on some
other building and try.

There is no problem for me with other buildings like powerplants etc. for AI when
destroyed and rebuilt. It builds the upgrade also.


Is this really the case?

The game decides tech buildings based on NeutralTechBuildings=. BuildTech= denotes the 'tech center' buildings, i.e. battle labs, which are not the same as tech buildings.

IIRC there aren't any special logics tied to that tag other than the base distribution.

IF there is really such a bug related to that flag, then I suggest getting around it by simply omitting NATECH from that list, and depending on AIBuildThis to make the AI build it as a normal building. .

Back to top
View user's profile Send private message
E1 Elite
Laser Commando


Joined: 28 May 2013

PostPosted: Thu Sep 29, 2016 2:47 am    Post subject: Reply with quote

Tested and found out that my Tech building assumption was wrong. Actually the
AI builds the upgrades properly when the building has +ve power.

In the above case it could be,

[NATECH]
Power=1

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


Joined: 03 Sep 2004
Location: Sydney, Australia

PostPosted: Thu Sep 29, 2016 8:37 am    Post subject: Reply with quote

My AI always builds upgrades whether or not the building has +/- power as long as the upgrade is listed under AI.PowerPlants=.. it's weird I know but for some reason it works.

Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Red Alert 2 Editing Forum » Ares (Unofficial Forum)
Jump to:  
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

Wildcard SSL Certificates
[ Time: 0.1210s ][ Queries: 12 (0.0054s) ][ Debug on ]