Prerequisite=UNITNAME;

Prerequisite=UNITNAME;

Requests for features in the spring code.

Moderator: Moderators

SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Prerequisite=UNITNAME;

Post by SpikedHelmet »

This would be a simple tag to tell a unit it can only be built if a certain other unit is built as well. Ie, you can only build a moho-metal-maker if you have a fusion, etc. IMO it would have very far-reaching uses. It was brought up a long time ago but I couldn't for the life of me find the original thread...

So, at this stage in Spring's development, how possible is this?

I vaguely see a way this could be accomplished via script -- a combination of checking UNIT_IDs and such, so factories could A) tell which unit they're building, B) check if the prerequisite unit is in existance, C) throw in some sort of construction-stopping loop (or firing a weapon to destroy the unit on the pad) to stop it being built.

But seriously, a prerequisite=; tag would be so much easier. And like I said, it could be used a lot.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

I made the same proposal on a different board to be honest, so yeah, it's a fast solution and I'd like to see some sort of techtrees (and buildlimits perhaps) in Spring. A minor addition to it:

Prerequisite = LIST, OF, UNITS, ...;
PrereqAmount = 10, 3, 5, ...;

OR

Prerequisite = UnitA 2, UnitB 3, UnitC 5;

The number determines how many buildings/units of type x needs prerequisite y.


PS: There are people working on a more advanced concept (AF, smoth) for techtrees. No idea how far they are though, haven't seen any concept yet.
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Post by SpikedHelmet »

Hm, seems to me having multiple prerequisite units is a tad overboard. But I also like the idea of the limit. A simple addition of NumberLimit= and Prerequisite= should be just perfect!
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Yeah, I guess so, may be a good idea to keep nubs from rapidly trying to spend all their resources on things they can't pay for >.>
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I like the idea. Allows for more dynamic control of what can be built instead of having to use different factories to make units available earlier/later.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

nice idea!
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

It's important that there is some way of linking the unbuildability with some sort of GUI change, such as a greyed-out unclickable buildpic.
User avatar
Soulless1
Posts: 444
Joined: 07 Mar 2006, 03:29

Post by Soulless1 »

this would also be a good time to enable putting a global unit limit a unit's tags - since it could be part of the same code

e.g. something specifying you could only have one flagship or whatever, or only up to 5 nuke bombers (just examples, don't freak ;)) etc etc
User avatar
Fanger
Expand & Exterminate Developer
Posts: 1509
Joined: 22 Nov 2005, 22:58

Post by Fanger »

If your gonna throw this out there.. We need unit limits too, they would be an intergal part in making this work Im sure.. besides for a accurate WW2 mod, you cant have the germans building 56 tiger 2 tanks every battle... (thats just not realistic)..
User avatar
Soulless1
Posts: 444
Joined: 07 Mar 2006, 03:29

Post by Soulless1 »

I would propose 5 tags then (some have been mentioned in this thread), to cover all of the features proposed so far - they're all pretty much linked really:

1) prerequisiteunits = unit1, unit2, unit3 etc
2) prerequisitenumbers = 1, 5, 10 etc
3) unitlimit = 5 etc
4) ratiolimitunits = unit4, unit5, unit6 etc
5) ratiolimitnumbers = 2, 7, 10 etc

(the ratio limits mean that you can only build one of the unit per X of the ratiolimitunits)
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

If your gonna throw this out there.. We need unit limits too, they would be an intergal part in making this work Im sure.. besides for a accurate WW2 mod, you cant have the germans building 56 tiger 2 tanks every battle... (thats just not realistic)..
Well, that would be up to balance rather then some sort of limitation. From a game design point of view, I'd rather have Tiger tanks be prohibitively expensive so that you would be extremely unlikely to see more then one or two; I'd prefer to allow players the potential of seeing more tigers if that's how they feel, rather then including a glass ceiling. (Not intended as 1944 discussion, just a hypothetical example).

I'd rather see more interesting uses of such a system, like creating build tree forks that actually block off routes. Perhaps 1944 could have an "axis" and "allies" side, and then the player decides in-game which way he wants to go by picking a 'US' or 'UK' construction unit, which blocks off all the others.
Or, you could give the player a choice of 3 late-game routes, (or 3 super weapons), the choice of one rules out the other two, etc.

Be good for SWS in terms of keeping the amount of Sith on a map to one, among other things.

I just hope people don't fall into the old prerequisite building system design, like in AOE, if this becomes available (ie: can't build swordsmen until yuo have a blacksmith, etc).
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Post by SpikedHelmet »

Were prerequisites included? I don't remember.

I don't plan on wanting to use it much; but for some integral things, I think it'd be helpful. For instance, having special high-level engineers only buildable after such-and-such has been built; also, it allows explorations of limitations that simply aren't possible no matter how much balancing one does. We could make rare units have massive buildtimes and resource costs, for instance, but then we'd find that they take so long to build that they're never bothered with 99% of the time (like the Krog in OTA). And even then the Krog had the upper hand as you can porc almost indefinately in OTA whereas there are no defenses in S44.

Anyway, was this ever done? I know limitations were done but what about prerequisite units (ie needing unit Y to be built before you can build unit X)?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

The request is pointless. We already have the ability to do this in 0.75 via lua mod rules
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

But there's no engine-sanctioned way to tell AIs about it.

Slightly OT, probably anything a modder would want is possible with some kind of LuaRules/LuaCOB hackery; the problem is that it's code, and AIs need data. I see a great need for a protocol that AIs and mods could use to talk with each other.
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

The more LUA overhead the slower the game gets, too.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

That's not very demanding LUA, though.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

There are lots of lua things that AI cant handle, its a given nowadays, and one that nobodies addressing, what harm is another one going to do?
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

AF wrote:There are lots of lua things that AI cant handle, its a given nowadays, and one that nobodies addressing, what harm is another one going to do?
It makes single-player play testing pretty lame to say the least. LUA this. LUA that. Simple scripting languages are no wonder fix-all.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I am the oldest spring skirmish AI coder afterall, who has played mostly singleplayer games for at the least 10 years in numerous RTS engines.....
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Don't you agree it is better to do it in LUA rather than not doing it at all?
Post Reply

Return to “Feature Requests”