Unit categories

Unit 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

Post by Forboding Angel »

Funky thing that needs fixing... I mentioned it to Lurker last night...

For a hovercraft to actually function as a hovercraft, in the moveinfo the name must start with HOVER.

That is really dumb, and it needs to rely on canhover=1; for that. COuld you un-hardcode that pls?

Another thing:
toairweapon=1: <works great, even if it just uses a hardcoded category.

Culd you please add a tag:
togroundweapon=1:

Please! THe category stuff in spring only works when it feels like it. It is old and antequated and a better system needs to be incorporated.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

Unit FBIs are read by the pathfinder (which is what uses moveinfo), so canhover=1 is meaningless if the pathfinding class it uses is only set up to pathfind on land. I agree that there should be a better way than hardcoding the names, I'm just saying canhover=1 is unrelated here.

Also, suggesting another hardcoded tag to replace an open system? Right... sure, onlytargetcategory needs some fixing, but an array of dumb hardcoded tags isn't the way to go. Toairweapon is only even supported because it was in OTA and at the time onlytargetcategory didn't exist.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

What I'd like to see is boolean operators for category tags or if that's too hard at least defining a whole bitmask and being able to say what operation should be performed between that and the unit's categories. So we could say onlyTargetCategory="AIR LIGHT"; onlyTargetCategoryOperation=AND; or badTagetCategory="INF BUILDING"; badTargetCategoryOperation=OR;
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

Another quibble...

Smoth posted a script long ago on how to check if a unit is on land or sea, and change upright=1; to upright=0; back and forth.

Ok, it's cool, but it's a band aid. Could hovercraft be hardcoded to have upright=0; on land and upright=1; on sea? The script is good, but it's quirky and sometimes doesn't work correctly (most notably after morphing), so it wiould be nice if it was natively supported.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

The one before the last was something that needed to be fixed.

The categories have never been all that reliable.
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post by tombom »

What's wrong with them?
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

yea

Post by rcdraco »

I'll agree, hovercrafts should respond to terrain, it kinda messes up units in my mod that board the hover chassis. The hovercraft stutters uphill, and I sometimes have to unload the unit to make it get up.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

This is all pointless. Trepans new lua based definitions make a mockery of this thread.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

AF
Care to explain what you mean?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

trepan wrote:AF
Care to explain what you mean?
units/arm_commander.fbi

versus

units/arm_commander.lua
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

I'm well aware of what the luadefs change provides.
What I'd like explained is how you justify saying that
this new backwards compatible feature makes a
mockery of this thread.
This is all pointless. Trepans new lua based definitions make a mockery of this thread.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Because lua can change the categories into something else more meaningful to the modders with a little lua code magic.

Afterall the same thing is done to prevent modders having to type in compiled C++ classes complete with all their sub structures and padding, instead of typing plain text into a nice text editor. Layering!
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Split from pending stuff for 0.76 because it's not about release blocking bugs and just clutters up the thread.
Post Reply

Return to “Engine”