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 Thu Apr 25, 2024 9:00 pm
All times are UTC + 0
Using upgrades as prerequisites.
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [28 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Death Cultist
Scorpion Sniper


Joined: 28 Apr 2009
Location: Auckland, New Zealand

PostPosted: Wed Jun 01, 2011 9:12 am    Post subject:  Using upgrades as prerequisites.
Subject description: Simple as it sounds
Reply with quote  Mark this post and the followings unread

Is it possible to use an upgrade eg. the Ion cannon uplink, as a prerequisite for specific units. I was tinkering with the idea of creating a mod where after building a GDI command centre, you could select your "war doctrine" by adding an upgrade to it. This would unlock specific units to you etc.

_________________
Beta Tester for Mental Omega 3.0


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


Joined: 30 Jan 2010
Location: Malaysia

PostPosted: Wed Jun 01, 2011 9:30 am    Post subject: Reply with quote  Mark this post and the followings unread

No.

_________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!

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


Joined: 11 Jul 2008
Location: New Zealand

PostPosted: Wed Jun 01, 2011 9:35 am    Post subject: Reply with quote  Mark this post and the followings unread

I remember the tinkering in this which has gone on in the past in regards to buildings

You can use an upgrade as a prerequisite for a building, but only if you build the upgrade directly after the upgradeable building (IE, you build the PP, then the Turbine rather than the PP, then the Barracks then the Turbine). If you build something in between then the upgrade won't work as hoped. It will work if you build another PP and then place a Turbine on it.
I believe the same is true of units.

So in general, not without some glaringly evident bugs.

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Jun 01, 2011 10:01 am    Post subject: Reply with quote  Mark this post and the followings unread

Orac hit the nail on the head.

Here's my tibweb research about the same idea.

The result is: it can work quite perfect, if you give the conyard an upgrade and before anything else can be build, you let the player decide which subfaction he wants to use. Then, after he placed the subfaction upgrade on his conyard, he gets one powerplant for faction A and another one for faction B. So that now these powerplants serve as prerequisites for future buildings/units, because the upgrade lost its prereq ability due to the construction of the powerplant.

_________________
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
Death Cultist
Scorpion Sniper


Joined: 28 Apr 2009
Location: Auckland, New Zealand

PostPosted: Wed Jun 01, 2011 10:08 am    Post subject: Reply with quote  Mark this post and the followings unread

So in order for it to be a prerequisite building, the upgrades must have the "Command Centre" as their prerequisite and be buildable straight away?

What if i made it "Build Command Centre => Build upgrade (I'm thinking heavy armour general, airforce general and experimental weapons general) => ANOTHER building (Ie Airforce Command, Armoured Command, Experimental Command) => Upgrade specific units" Would this theoretically work, nothing in between each?

_________________
Beta Tester for Mental Omega 3.0


Last edited by Death Cultist on Wed Jun 01, 2011 10:12 am; edited 1 time in total

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Jun 01, 2011 10:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Not really. For it to work, you have to make sure the player can't build anything else than the upgrade, after he build the Command Centre. If he builds something else, the upgrade looses its ability to work as prerequisite.
And i'm quite sure your Command Centre is a high tech building where a lot of other buildings are already available. In your case the player could still build a powerplant or something else right after the Command Centre and from this point on, the upgrade can't work as prerequisite anymore.

Thus only very early in a game, where the player can't build anything else than the upgrade, the upgrade as prerequisite works quite reliable.

_________________
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
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Wed Jun 01, 2011 10:33 am    Post subject: Reply with quote  Mark this post and the followings unread

IIRC, in YR and I guess then in TS as well, only the last built building is checked if it has the prerequisited upgrade.

You can use this for anything, just remember this point.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Jun 01, 2011 10:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for this much shorter and better understandable explanation Graion Dilach.

_________________
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
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Wed Jun 01, 2011 11:08 am    Post subject: Reply with quote  Mark this post and the followings unread

No problem... I've learnt many factoids like this from DCoder since I started testing Ares. Glad it's helpful.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Team Black
Defense Minister


Joined: 25 Sep 2006
Location: Teamblackistan Posts: Over 9000

PostPosted: Wed Jun 01, 2011 4:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

If the upgrade is placed on the barracks itself, wouldn't that solve the problem?

_________________
The Fall of Hammerfest - Epic Tiberian chain story

Tiberian Odyssey mapping department. Discord
The Team Black Index

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Wed Jun 01, 2011 5:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, I usually build 2 barracks late-game to speed up training... but it can work.

The best way would be putting the upgrade to a BuildLimit=1 building.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Jun 01, 2011 10:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

And how should that prevent the player from building a powerplant or anything else after the BuildLimit=1 building?

_________________
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
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Thu Jun 02, 2011 12:17 am    Post subject: Reply with quote  Mark this post and the followings unread

I mean if the building which is meant to be upgraded has BuildLimit=1, then the player is forced to build the upgrade to all incarnations of the building, since (s)he can't have the building twice, and the modder thereby prevented this bug to kick in.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Death Cultist
Scorpion Sniper


Joined: 28 Apr 2009
Location: Auckland, New Zealand

PostPosted: Thu Jun 02, 2011 2:29 am    Post subject: Reply with quote  Mark this post and the followings unread

Okay, I'll start mucking about with the ini. see what happens. Kepp my wirk posted.

_________________
Beta Tester for Mental Omega 3.0


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


Joined: 03 Sep 2009

PostPosted: Thu Jun 02, 2011 4:21 am    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
Orac hit the nail on the head.

Here's my tibweb research about the same idea.

The result is: it can work quite perfect, if you give the conyard an upgrade and before anything else can be build, you let the player decide which subfaction he wants to use. Then, after he placed the subfaction upgrade on his conyard, he gets one powerplant for faction A and another one for faction B. So that now these powerplants serve as prerequisites for future buildings/units, because the upgrade lost its prereq ability due to the construction of the powerplant.


Can it cause problems if the player starts building faction upgrade A, but then cancels it and builds upgrade B instead? Or cancel both of them a few times, then build one?

_________________

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Jun 02, 2011 8:12 am    Post subject: Reply with quote  Mark this post and the followings unread

Graion Dilach wrote:
I mean if the building which is meant to be upgraded has BuildLimit=1, then the player is forced to build the upgrade to all incarnations of the building, since (s)he can't have the building twice, and the modder thereby prevented this bug to kick in.

No, because if he builds the BuildLimit=1 building, then a powerplant or refinery and then the upgrade, the upgrade doesn't work as prerequisite anymore. Because the last built building was a powerplant/refinery and not the buildlimit=1 building.

SuperJoe wrote:
Can it cause problems if the player starts building faction upgrade A, but then cancels it and builds upgrade B instead? Or cancel both of them a few times, then build one?

No, that's not a problem at all.
The only thing you have to make sure is, that the upgrade is build right after the upgraded building.

_________________
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
Ordosherrscher
Commander


Joined: 20 Nov 2007
Location: Germany, Berlin

PostPosted: Thu Jun 02, 2011 11:23 am    Post subject: Reply with quote  Mark this post and the followings unread

A problem would be buildable MCVs, actually. They wont be able to give the same tech w/o duplicating everything ...

Well, I know a bit OT xD

_________________

Think of me as Nordos, 'cause Banshee wouldn't rename me

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


Joined: 11 Jul 2008
Location: New Zealand

PostPosted: Thu Jun 02, 2011 11:24 am    Post subject: Reply with quote  Mark this post and the followings unread

The simple fact is that it gets to be a headache really, really fast.

Back to top
View user's profile Send private message
[TiberianFuture]
Scrin Overlord


Joined: 30 Apr 2009
Location: The Mothership

PostPosted: Fri Jun 03, 2011 8:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
The result is: it can work quite perfect, if you give the conyard an upgrade and before anything else can be build, you let the player decide which subfaction he wants to use. Then, after he placed the subfaction upgrade on his conyard, he gets one powerplant for faction A and another one for faction B. So that now these powerplants serve as prerequisites for future buildings/units, because the upgrade lost its prereq ability due to the construction of the powerplant.


That's excactly what I had done in CL quite a while ago. It worked perfect, but
Quote:
A problem would be buildable MCVs, actually.

due to this problem, I abandoned it.


I don't recommend using upgrades as prerequisites, it really just creates lots of trouble and headache.

_________________
Check out some TF Kane's Wrath action:
Tournament 3rd place.
Vs. bikeRushOwnz in tournament.
Ladder wars vs. bikeRushOwnz.

Back to top
View user's profile Send private message Skype Account
Morpher
General


Joined: 28 Jan 2005

PostPosted: Sun Jun 05, 2011 10:46 am    Post subject: Reply with quote  Mark this post and the followings unread

There really is little point in trying to make an upgrade work as a prerequisite, on one hand it can fully work but on the other it's complicated and messy and can easily be prone to failure by user error, the nearest I got to making something like this was by trying to emulate an upgrade. In my case I made a new building with foundation=0x0 and adjacent=0 / 1 (can't remember). I could build the "upgrade" and it could only be placed by selecting one of my buildings though there was no foundation square for it, just the standard cursor. Worked fine as a prerequisite but was a weirder way of doing it.

_________________


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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Jun 05, 2011 12:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

That's an interesting way Morpher. The only problem i see is, that this 0x0 building can't be destroyed anymore. So maybe at one point the AI is trying to destroy this dummy building (making it ingame look like the AI is shooting on an empty cell) and it might also make the player unable to lose.

But i really like the idea that the adjacent=0 thing makes it look/work like an upgrade. It would be nice to make it restricted to one type of building though.

\EDIT
Adjacent=0 still allows the building to be placed right next to another player building and not only on top of it (works exactly like Adjacent=1 from what i've seen/tested).
Foundation=1x1 and PlaceAnywhere=yes also didn't make it look like an upgrade, even if it has a visible foundation cursor and can still be placed on top of other buildings.

however Insignificant=yes, allows the player to lose, even if he has one of these 0x0 foundation buildings, so this isn't a problem as assumed before.

_________________
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
m7
Commander


Joined: 17 Apr 2009

PostPosted: Sun Jun 05, 2011 6:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

The 0x0 foundation building 'upgrade' is an older idea in the RA2 modding loop. This is used in several mods such as Robot Storm, Project Phantom, AG's Shattered Alliances, and Final War. The AI will not have issues with this building.

Find it here, credit for AG's posting the tutorial.

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


Joined: 03 Sep 2009

PostPosted: Sat Jun 25, 2011 7:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Was thinking of an alternative way to implement sub-factions, though this idea might be an old one. After deploying a con.yard, you'd have access to only 1 building, a warfactory. From there you could build eg. 3 different vehicles (maybe called sub-faction command vehicles?). The ProductionAnim would then self-destruct the warfactory, so you can only build one of the said vehicles. Then deploy it and use it as prerequisite for the sub-faction specific stuff. This would work even for the AI, it would randomly choose between the triggers to create one of the sub-faction vehicles. Though you'd have to use the condition part of the AI scripts to check that the sub-faction command vehicle is present.

The command vehicle would also have to be Immune=yes and Insignificant=yes. Dunno if any of the generic prerequisites could be used so that stuff that is shared between all factions is available no matter which sub-faction you chose, and only sub-faction specific stuff has the command vehicle as prerequisite.

_________________

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


Joined: 20 Nov 2007
Location: Germany, Berlin

PostPosted: Sat Jun 25, 2011 8:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

you could still build the warfactory more often then one time, allowing you to create from each sub faction a vehicle, giving you acsess to all technology.
If you would destroy the conyard AND the WF, the player would loose the game when short game is on ...
Wink

_________________

Think of me as Nordos, 'cause Banshee wouldn't rename me

Back to top
View user's profile Send private message Skype Account
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Sat Jun 25, 2011 8:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ordosherrscher wrote:
you could still build the warfactory more often then one time, allowing you to create from each sub faction a vehicle, giving you acsess to all technology.
If you would destroy the conyard AND the WF, the player would loose the game when short game is on ...
Wink


BuildLimit=-1 should allow it to be built only once.

_________________

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


Joined: 20 Nov 2007
Location: Germany, Berlin

PostPosted: Sun Jun 26, 2011 10:25 am    Post subject: Reply with quote  Mark this post and the followings unread

OK, didnt thought of that ...

_________________

Think of me as Nordos, 'cause Banshee wouldn't rename me

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


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Sun Jun 26, 2011 10:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

One issue in TS is that currently their is no hack/DLL enhancement which allows Negative Prerequisite i.e. if you build one BuildLimit=-1 0x0 building, you can't build the other BuildLimit=-1 0x0 building

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
Death Cultist
Scorpion Sniper


Joined: 28 Apr 2009
Location: Auckland, New Zealand

PostPosted: Fri Jul 01, 2011 11:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

Okay I have encountered numerous bugs with this idea. It truly a headache, I'm attempting to make a mod with sub-factions and and now simply tinkering with the idea of just making six extra factions (nightmare coding here I come). I've mostly had trouble with adding a new MCV. Is there anyway to code a new faction without it having CABAL as the default EVA?

_________________
Beta Tester for Mental Omega 3.0


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