Categories

Categories

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Categories

Post by Forboding Angel »

While we're on the subject of improving things, would someone be interested in fixing up the category tags?

I.E. Category, OnlyTargetCategory, BadTargetCategory, etc?

It would be nice to have proper subtables for these items, like:

Category = {
Air,
Ground,
}

Any takers?

Currently there are a lot of inconsistencies. For example, badtargetcategory only pays attention to the first item, so badtargetcategory = "AIR GROUND", will only take effect for "AIR", not "GROUND".

Other silly things.
Last edited by Forboding Angel on 03 Apr 2012, 06:52, edited 1 time in total.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Categories

Post by smoth »

change your unitdef luas and you can have that.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Categories

Post by Forboding Angel »

Forboding Angel wrote: Currently there are a lot of inconsistencies. For example, badtargetcategory only pays attention to the first item, so badtargetcategory = "AIR GROUND", will only take effect for "AIR", not "Ground".

Other silly things.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Categories

Post by FLOZi »

mantis it with links to mod and maybe even a replay :P
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Categories

Post by Forboding Angel »

So I should break the game, so someone can do some bugtesting. Yeah no.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Categories

Post by FLOZi »

Just tell them what changes to make then or make a teeny tiny mutator
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Categories

Post by knorke »

For example, badtargetcategory only pays attention to the first item, so badtargetcategory = "AIR GROUND", will only take effect for "AIR", not "Ground".
Do you mean that
a) "GROUND" != "Ground" (case sensitive) or
b) that only the first category is ever used, even with correct spelling?

a) with a few lines of lua it is possible to warn about misspelled categories/correct them
b) would be a bug (imo, if its true) and belongs on mantis.

Or do you mean
c) that "AIR GROUND" is less nice than "AIR", "GROUND"?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Categories

Post by Forboding Angel »

You can safely take all of your scenarios and chuck them out the window.

The C one makes a good point for it though, even though it's obvious that

category = "AIR GROUND",

is much less nice than

category = {
"AIR",
"GROUND",
}

I have corrected the non capitalized Ground. That was a typed up example, not a copy pasted one.

Try to set two categories as a badtargetcategory. Only the first one will be obeyed.

Edit: re-read your post (It's kind of confusing) and yes: "b) that only the first category is ever used, even with correct spelling?"
Post Reply

Return to “Engine”