Garux / netradiant-custom

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

(Feature request) Add support for skin parameter for rendering entities in the 3D view #151

Open RazielZnot opened 1 year ago

RazielZnot commented 1 year ago

The official KPRadiant for Kingpin has the ability to set skin for the entities so they wouldn't look the same if they share the model. NetRadiant really needs something like this, it would help in differentiating entities by their look.

In kingpin.def it looks like this:

model="models\props\tablesets\set.mdx"
skin="models\props\tablesets\card_skin.pcx"

This is especially relevant for Quake 2.

Garux commented 1 year ago

Yeah, this would be cool, most likely for Q2 only.

SirYodaJedi commented 1 year ago

Speaking of Quake II, the remaster's misc_model (which didn't make it into the official FGD) doesn't even use the skin KV. This is mostly how it seems to work, based on discord conversations with Paril (see https://github.com/q2community/quake2-rerelease-dll/issues/13 for screenshots of the main convo):

@PointClass base() size(16 16 16) studio() = misc_model : "A point entity for displaying static models."
[
    model(studio) : "Model" :  : "The model to display. Can be of type MD2, SP2(?)."
    rgba(integer) : "Skin" : 0 : "Which skin of the model to display (can be blank, will use default). Default 0."
    alpha(float) : "Alpha" :  :  "How visible is the model? Default 1.0 (100%)"
    angles(angle) : "Pitch Roll Yaw" : "0 0 0" : "up/down, angle, tilt left/right"
    scale(float)   : "Scale" : "1.0" : "Scale of model. Default 1.0 (100%)."
    frame(integer) : "frame" : 0 : "Which frame to display. Default 0."
]

Half-Life uses an integer for choosing skins as well, although it's sane and uses the skin KV. I'm not familiar with how NRC handles game configurations, but this should be handled in a game configuration file, rather than hardcoded to specific KVs.