Garux / netradiant-custom

The open-source, cross-platform level editor for id Tech based games.
https://garux.github.io/NRC/
Other
299 stars 52 forks source link

Feature request: draw connection lines for any custom <target> type keys, not just "target", "target#" and "killtarget" #80

Open Kinnuu opened 3 years ago

Kinnuu commented 3 years ago

The entity definition syntax lets you use the <target> xml tags - to define target type keys - but connecting lines between entities are only drawn for the specific key names of "target", "target#" and "killtarget".

I have lots of custom keys that link entities in different ways, that can't really be renamed with the above conventions, but I would really like to have them draw connecting lines in the editor, and it feels like the <target> xml tags should give this behaviour.

Garux commented 3 years ago

I guess this would be cool to have it configurable this way, but it's very specific to be 1st priority. So, to rephrase the idea, <target> adding a key to global target keys dictionary, working for any entity, and targeting visually to respective key value of targetname key, right?

Kinnuu commented 3 years ago

Exactly yes. These custom <target> type keys would still always point to targetname of the other entity.

stoofphen commented 1 year ago

With entities that take multiple target# keys, such as waypoints in Jedi Academy, I wonder if there is a way to also connect entities, perhaps with modifier keys to the usual Ctrl+K for 'Connect Entities' to allow for connecting entities via target2, target3, and target4? Currently it's a manual process of naming waypoints, then manually assigning up to four target# keys.

The 'Duplicate, Make Unique' function has helped a lot though, as you can just name a single entity as waypoint1, for example, then duplicated as unique and it will automatically renumber to waypoint2 and so forth. I wonder if there would be a way to batch automate naming of all selected entities based on this (i.e. their classname+#, or possibly custom naming convention)?

Garux commented 1 year ago

Let's clarify what result is wanted... Is it entity with target, target2, target3, target4 entity with targetname = target entity with targetname = target2 entity with targetname = target3 entity with targetname = target4 ? Possible implementation ic is connection command, using target/targetN keys, depending on which are free.

stoofphen commented 1 year ago

Should be based on connecting first entity to the second, setting target2/3/4 of that first entity to the targetname of the second entity. Though if the targetname of the second entity isn't defined, I would guess the automatic naming would need to be applied?

Garux commented 1 year ago

Automatic, ye, like it is done in connect command. So do i get wanted entity structure right? It's a bit vague from the problem description.

stoofphen commented 1 year ago

Yeah, kind of just needs to be as simple as providing the ability to connect via target2..3..4 keys rather than the default target key.