Staredit Network > Forums > Modding Assistance > Topic: Unit Building Restrictions
Unit Building Restrictions
Feb 2 2017, 9:58 pm
By: tehkain  

Feb 2 2017, 9:58 pm tehkain Post #1



Hello, all. In a mod on which I am working, I wanted to add some hero units of which you can only build one.

Unfortunately, FireGraft's dat requirements do not have a 'Not' operand, and I cannot really think of a way to do it in a reasonable 'hacky' way.
Is it necessary to mess with it using plugins? Any ideas?



Master of something, master of not all.
-George H.W. Washington

"Ah, what beautiful bunker defenses I have here."
A wild 20 hydralisks appeared!

Feb 15 2017, 8:07 pm DirectShift Post #2



Hey, I thought of a partial solution for your problem if you haven't solved it yet.

Make the heroes belong to another race. So for instance, you play as a terran and then your available heroes are only 2: one zerg and one protoss, but make them occupy 200 of unit supply.

Yes, you can only make two...

Ugh, sorry, not a great solution now that I think about it.

However, have you managed to solve it? I will keep thinking about it.



None.

Feb 15 2017, 8:13 pm Corbo Post #3

ALL PRAISE YOUR SUPREME LORD CORBO

Oh, there's just so many ways.
And I could probably write up a quick plug in for you to use but before answering I want to know a few things:

Is your unit creation instant? If it isn't do you want to prevent them from starting to being built or you just do not want 2 of that unit in the map at the same time?

The first one (not even being allowed to click the button) might be harder but I could see a solution if the unit required certain upgrade and then it's just a matter of unresearching said upgrade so you cannot build the unit anymore. The supply thing is also a nice solution but I assume you're using all three races.

The latter option, it's very easy, you can just use triggers to remove the last created duplicate unit and refund the player the minerals, or a solution via plug in would be fairly easy too.



fuck you all

Mar 26 2017, 5:41 am tehkain Post #4



This is super late but...
Quote from DirectShift
Hey, I thought of a partial solution for your problem if you haven't solved it yet.

Make the heroes belong to another race. So for instance, you play as a terran and then your available heroes are only 2: one zerg and one protoss, but make them occupy 200 of unit supply.

Yes, you can only make two...

Ugh, sorry, not a great solution now that I think about it.

However, have you managed to solve it? I will keep thinking about it.
Causes reeeeeeal big problems when you get Dark Archons involved. Also, no, and I'm not really sure it IS possible at all.

Quote from Corbo
Oh, there's just so many ways.
And I could probably write up a quick plug in for you to use but before answering I want to know a few things:

Is your unit creation instant? If it isn't do you want to prevent them from starting to being built or you just do not want 2 of that unit in the map at the same time?

The first one (not even being allowed to click the button) might be harder but I could see a solution if the unit required certain upgrade and then it's just a matter of unresearching said upgrade so you cannot build the unit anymore. The supply thing is also a nice solution but I assume you're using all three races.

The latter option, it's very easy, you can just use triggers to remove the last created duplicate unit and refund the player the minerals, or a solution via plug in would be fairly easy too.
The idea was that only one unit could possibly be made at any time. It'd be sort of like the merc compound in that the units would instantly be built. Triggers wouldn't work in any case, because it's intended for a mod and not a single map (or small set of maps). The upgrade thing could be possible, but I haven't yet delved into plugins and I'm not entirely sure of their capabilities.



Master of something, master of not all.
-George H.W. Washington

"Ah, what beautiful bunker defenses I have here."
A wild 20 hydralisks appeared!

Mar 27 2017, 12:49 am Corbo Post #5

ALL PRAISE YOUR SUPREME LORD CORBO

Quote from tehkain
The idea was that only one unit could possibly be made at any time. It'd be sort of like the merc compound in that the units would instantly be built. Triggers wouldn't work in any case, because it's intended for a mod and not a single map (or small set of maps). The upgrade thing could be possible, but I haven't yet delved into plugins and I'm not entirely sure of their capabilities.

You can use triggers, that is how map modes are done (melee, ctf, etc) what you cannot use is locations but even so there is a trigger enabler and a location unlocker for mods. They were some old plug ins but I think they are in our DB.



fuck you all

May 8 2020, 2:43 pm razorback9423 Post #6

C.I.S. Conversion Mod creator

Resurrecting this old topic, I have a problem where I built more than one super unit. Can't find the source code to restrict building the same type of unit.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Ultraviolet