:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: 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 Mon Jul 13, 2020 5:49 pm
All times are UTC + 0
 Forum index » Modding Central » Red Alert 2 Editing Forum
BuildLimit wired between two unit types?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
Author Message
suffle19
Cyborg Soldier


Joined: 27 Jun 2019

PostPosted: Thu Feb 06, 2020 1:30 pm    Post subject:  BuildLimit wired between two unit types? Reply with quote

Is there way to make something like build limit that will comprise two units?
or maybe something like prerequisite.neagtive but for unit Very Happy

I have comando unit and have upgrade plugin building, but if unupgraded comando was built before plugin then upgraded comando is still able to be trained.

...I made two different infantry types for this system.

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


Joined: 03 Sep 2004
Location: Sydney, Australia

PostPosted: Thu Feb 06, 2020 1:37 pm    Post subject: Reply with quote

You can create a Alternate Prereqs for a unit then use that tag on the upgraded unit. This is fairly buggy though, I tested it years back and it yielded subpar results on unlimited build units, might be better on limited units though.

PrerequisiteAihaxreqAlternate=AIHAXTNK

Or Custom GenericPrerequisites maybe?

AIHAXREQ=AIHAXDEP;,AIHAXTNK
_________________

ayylmao on Discord

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


Joined: 27 Jun 2019

PostPosted: Thu Feb 06, 2020 6:38 pm    Post subject: Reply with quote

XxpeddyxX wrote:
You can create a Alternate Prereqs for a unit then use that tag on the upgraded unit. This is fairly buggy though, I tested it years back and it yielded subpar results on unlimited build units, might be better on limited units though.

PrerequisiteAihaxreqAlternate=AIHAXTNK

Or Custom GenericPrerequisites maybe?

AIHAXREQ=AIHAXDEP;,AIHAXTNK


Sorry don't get it... how it can help me? Im not familiar with such hacks.

I mean I have usual comando, i built him, then i build upgrade plugin which gives me access to upgraded one... that upgrade plugin disable default comando also, and replace it with upgraded.
my problem is - the presence of normal commando does not block ability to train upgraded one cuz of diffirent unit types.

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


Joined: 11 Jun 2016

PostPosted: Sun Feb 09, 2020 4:32 pm    Post subject: Reply with quote

http://ares-developers.github.io/Ares-docs/new/prerequisites.html#alternate-prerequisites-with-non-buildings

[GenericPrerequisites]
COMMANDO=DUMMY ;Defining this key, so that the below key works.

[General]
PrerequisiteCommandoAlternate=CMDO ;pre-upgrade commando unit. This key allows you to use non-buildings, similar to the Slave Miner.

[CMDOUP] ;upgraded commando
Prerequisite.Negative=COMMANDO ;this unit is unavailable if anthing from the COMMANDO prerequisite group is owned by the player.

That should do the trick.

An issue you'll find with this method is that the Cameo won't be greyed out - it'll disappear completely, until the default commando dies/leaves the map. Basically, if you have already build a commando unit, the 'upgrade plugin' will remove both the default and the upgraded unit from the side bar until that unit dies. Not really a bit deal, and something players will get used to if you use negative prerequisites a lot.

Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sun Feb 09, 2020 7:32 pm    Post subject: Reply with quote

It does not necessarily have a huge impact but I figured I'd share a small detail related to this topic just in case.

The expanded AlternateXPrerequisite in Ares comes with a small quirk - namely that the prerequisite can be satisfied before unit physically exists on the map (for units you can train/build, this happens when you queue them, can't recall if whether or not there were objects queued already affected this). This behaviour did not apply to Slave Miner in original YR and is introduced likely as a consequence of expanding it to work with other TechnoTypes besides VehicleTypes. This hypothesis is further supported by the fact that the map trigger events checking existence of TechTypes have this exact same quirk even in vanilla YR.
_________________
Project Phantom

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
suffle19
Cyborg Soldier


Joined: 27 Jun 2019

PostPosted: Wed Feb 12, 2020 10:06 pm    Post subject: Reply with quote

Thx, it works.

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