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 Mar 19, 2024 9:31 am
All times are UTC + 0
Fixing Component Tower Bug
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Jul 03, 2003 5:05 pm    Post subject:  Fixing Component Tower Bug Reply with quote  Mark this post and the followings unread

:: Fixing The Component Tower Problem Of GDI AI::


The component tower problem consists on having GDI AI building a very high number of useless Component Towers without upgrade. It doesnt happens in the majority of the mods, but when it happens, people usually take ages until they found out how to fix it. This tutorial will teach you a quite fast way to solve it.


GDI AI Base Defense Building:

Due to hard-coded issues, the GDI AI was programmed to build one component tower and one defense structure on it. The component tower is defined in the line WallTower= (in the hack section at the beggining of the rules.ini) and the defense structures are all those who have the line IsBaseDefense=yes and are owned by GDI. All these defense structures require the line PowersUpBuilding= set to the component tower to work properly at an AI base. So, AI build the component tower and upgrades on component towers for all their defensive structures. If you have defensive structures that isn't an upgrade from Component Tower but has the line IsBaseDefense=yes, AI will fail when it tries to build it and it will retry the operation by building another component tower for it and will fail again, and will retry, fail, etc.


The Recommended Solution:

If you still want to have a defensive structure that doesn't depends on component tower, remove the line IsBaseDefense=yes and AIBuildThis=yes. This might fix your problem, but AI won't build it.


Key Words: #Tutorials #Modding #TiberianSun #Firestorm #Rules.INI 

Last edited by Banshee on Tue Nov 08, 2016 5:22 am; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website Skype Account
Mike430
Soldier


Joined: 11 Jul 2003
Location: Following everyone else

PostPosted: Fri Jul 18, 2003 5:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

this could help me; tired of AI wasting space #Mad

_________________
Visit the new TS Forums at http://members.lycos.co.uk/dewmank/forums/index.php

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


Joined: 26 Apr 2003
Location: Somewhere in Germany

PostPosted: Mon Nov 17, 2003 3:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

@ Banshee: hm, did you test it? for me the GDI AI still builds those towers... I've tried so many things to fix it, but nothing did work... I even tried to disable the upgrades by taking out their buildingtypes entry... no effect.

then I tried to just replace the gfx, which did work for both vulcantower and RPG upgrade, but when the AI tries to build the SAM upgrade it fails, even if I restore all the settings of the SAM upgrade. the problem is that the upgrades need to have a techlevel of -1, since they should not be buildable by the player... maybe that's the cause. but then I still need a solution for it...

Back to top
View user's profile Send private message Send e-mail
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Mon Nov 17, 2003 3:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

I tested it 3 years ago and it worked very well.

Back to top
View user's profile Send private message Visit poster's website Skype Account
The DvD
TiberiumWeb.com Webmaster


Joined: 30 Dec 2002
Location: Netherlands

PostPosted: Mon Nov 17, 2003 7:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

make sure no other GDI buildings with IsBAseDefense=yes are buildable for GDI..

Back to top
View user's profile Send private message Visit poster's website Skype Account
Reaperrr
Commander


Joined: 26 Apr 2003
Location: Somewhere in Germany

PostPosted: Tue Nov 18, 2003 10:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

The DvD wrote:
make sure no other GDI buildings with IsBAseDefense=yes are buildable for GDI..

stupid me Rolling Eyes
yes, that was the problem, thx a lot

Banshee wrote:
I tested it 3 years ago and it worked very well.

sorry, my mistake. works very well for me now, too Smile

Back to top
View user's profile Send private message Send e-mail
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sun Aug 05, 2007 7:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

I was just browsing through the tutorials and found that this one doesn't really solve the problem, so I thought I'd just bump this topic and post the same method I've been using myself.

All you have to do is change "WallTower=" to an upgrade which doesn't have to be buildable to the player (if this upgrade is specified after "WallTower=", the AI will simply ignore TechLevel=-1 and build it anyway). If this upgrade isn't buildable to the player, just make it invisible (with Image=none) so you won't notice them.
Do make sure the building specified after "PowersUpBuilding=" exists and isn't too high up the tech tree (I'd suggest you either use the Construction Yard, Power Plant or Barracks).

If the GDI powerplant is still upgradeable with the power turbines as normal in your mod, just changing whatever is after "WallTower=" to the power turbine should fix this problem as well.

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Mon Aug 06, 2007 5:49 am    Post subject: Reply with quote  Mark this post and the followings unread

This may be off the topic, but I tested what the "AIBuildsWalls" and "NodAIBuildsWalls" lines do by activating them. The results were that the GDI AI (I forgot to look over Nod AI) builds tons of wall pieces to nowhere, and after a while, places an empty component tower onto each and every piece of wall. Strange, huh?

_________________


Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Mon Aug 06, 2007 2:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yuri o07 wrote:
This may be off the topic, but I tested what the "AIBuildsWalls" and "NodAIBuildsWalls" lines do by activating them. The results were that the GDI AI (I forgot to look over Nod AI) builds tons of wall pieces to nowhere, and after a while, places an empty component tower onto each and every piece of wall. Strange, huh?

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

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Mon Aug 06, 2007 6:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

How come I've missed that one :/ But still, that doesn't help, I don't want to have TD-style one-side concrete walls, but side-specific instead.

_________________


Back to top
View user's profile Send private message
bonzy_buddy
Shrapnel Sniper


Joined: 31 Oct 2006

PostPosted: Fri Sep 07, 2007 1:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

I've fixed the component tower upgrade bug in a more simple way (as much simple actually but more logic as this way AI won't build invisible buildings). It's principle is quite obvious : lets have a set of defence working on component tower that the player cannot build (techlevel = -1) and a set for the player that the AI won't build (AiBUildThis=no + IsBaseDefence=no). I've tested it it's fully working.

The code follow for the lazy ones.

In rules.ini
Code:

WallTower=GACTWR ; unchanged

; GDI Component Tower
[GACTWR]
***
TechLevel=-1    ; HERE IS THE CHANGE
***

; Vulcan cannon add-on for component tower
[GAVULC]
***
TechLevel=-1 ;HERE IS THE CHANGE - DO THE SAME WITH OTER
***

Declare a new building GAVULC2 (GAROCK2, GASAM2 or wathever you like) in the building list.
Code:

[GAVULC2]
Name=Vulcan Cannon
Strength=400
Armor=concrete
TechLevel=2
Sight=8
Adjacent=10
Owner=GDI
Cost=200
Points=60
Power=0
Sensors=yes
BaseNormal=no
Crewed=no
ROT=12
Turret=yes
TurretAnimZAdjust=-45
Primary=VulcanTower
Powered=yes
TurretAnim=GACTWR_B
TurretAnimIsVoxel=false
TurretAnimX=0
TurretAnimY=0
MaxDebris=6
Explosion=TWLT070,S_BRNL58,S_CLSN58,S_TUMU60
DamageParticleSystems=BuildingSparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=500, 500, 400
IsBase=no
ThreatPosed=5   ; This value MUST be 0 for all building addons
HasStupidGuardMode=false
IsBaseDefense=no
AIBuildThis=no ; THE AI DON'T NEED TO BUILD THAT ONE - BEWARE TO [i]NOT[/i] ADD IsBaseDefence=yes


in art.ini :

Code:
[GAVULC2]
Cameo=TWR1ICON
Image=GACTWR
Remapable=yes
Normalized=yes
Foundation=1x1
Buildup=GACTWRMK
DemandLoadBuildup=true
FreeBuildup=true
NewTheater=yes
ActiveAnim=GACTWR_A
ActiveAnimZAdjust=-39
PrimaryFireFLH=162,30,90
SecondaryFireFLH=162,-30,90


It works perfectly. If you want defence that are not based at all on component tower it' than just a graphic matter (create a blank cptwr for the ia set of defence).

I don't know if that helps as the other technique seems to work well but this way people have the choice Wink

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sat Sep 08, 2007 12:48 am    Post subject: Reply with quote  Mark this post and the followings unread

Actually IsBaseDefence=no should already solve the problem, but it causes another problem as well... Now the AI won't build this defense structure anymore, which seems rather pointless to me.

With the solution I described the AI will merely upgrade buildings with invisible upgrades, which shouldn't affect the game in any way (and shouldn't be noticeable to the player).

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
bonzy_buddy
Shrapnel Sniper


Joined: 31 Oct 2006

PostPosted: Sat Sep 08, 2007 12:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

I reckon you've misunderstood what I did.
The AI won't build the structure from the "player's set" but they build the defence from the "ai's set" and if they are the same there is no problem.I tried it, it's fully working as you can see on this screenshot.

By the way, I assume your method works too. Isn't there a problem thought when there are no more space for upgrades it can happen depending on the ratio defence structure/ normal buildings) ? (I'm unsure about that point, feel free to tell me if it's totally absurd).



ctwr bug fix.jpg
 Description:
 Filesize:  124.5 KB
 Viewed:  15537 Time(s)

ctwr bug fix.jpg



Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sun Sep 09, 2007 12:28 am    Post subject: Reply with quote  Mark this post and the followings unread

Oh, I see what you mean now. It won't work when someone decides to completely scrap the component tower from his mod (you'd still have the AI building component towers, which 'd look wrong) however #Tongue
bonzy_buddy wrote:
By the way, I assume your method works too. Isn't there a problem thought when there are no more space for upgrades it can happen depending on the ratio defence structure/ normal buildings) ? (I'm unsure about that point, feel free to tell me if it's totally absurd).

Nope, I'm using it in my own mod and it has proven to be flawless Wink

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
bonzy_buddy
Shrapnel Sniper


Joined: 31 Oct 2006

PostPosted: Sun Sep 09, 2007 11:45 am    Post subject: Reply with quote  Mark this post and the followings unread

[quote="Bittah Commander"] It won't work when someone decides to completely scrap the component tower from his mod (you'd still have the AI building component towers, which 'd look wrong) /quote]
Re-read the end of my first post. It's only necessary to create an invisible comp tower for the IA's set.

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