Closed Spike29 closed 3 months ago
Point and miscmodel are separate entity types inside radiant, there is no smooth way to toggle type depending on keyvalue content. Model key presence in entity definition defines miscmodel entity type. This is feature to give ent def creators power to have arbitrarily named entities with adjustable models. From the diff ic that all of these entities have model ingame. You can just set default model value and have correct preview with either default or altered model key. Or if boxes are preferred over ingame appearance, you can change key type to string.
Seems like a NR specific change you guys made, because since q3radiant days, items have always had to have a model defined or you get the null model iirc.
Oh I see, thank you both for the clarification.
In NR (at least with the Xonotic gamepack), no models are displayed for item entities, even when the model
key is set. Models are displayed for misc_model
entities though, so it could be a bug in NR.
I've changed the key type to string and that seems to do the trick, thanks! The items now look like boxes in NRC, but the model key is still respected in-game.
Since Xonotic mappers are used to items looking like boxes in Radiant, this is probably the best thing to do for now. I'll update our entity definitions with this trick.
If you declare model key default, this will be box in NR and full fashioned preview in NRC :)
Yes, I've thought about it, but the default models in question are probably to be found in the xonotic-data pk3dir, which is one of our forbidden paths.
I'm not sure why this path is forbidden and I'd rather not touch it for now :D
Yes, I've thought about it, but the default models in question are probably to be found in the xonotic-data pk3dir, which is one of our forbidden paths.
I'm not sure why this path is forbidden and I'd rather not touch it for now :D
Curious why you would have the base game assets excluded from your mapping sdk though. It's kinda important for rendering things like that.
Curious why you would have the base game assets excluded from your mapping sdk though. It's kinda important for rendering things like that.
Probably because data files are subject to change, and our armor models were renamed at some point. The main mapping assets are located in xonotic-maps.pk3dir, which isn't one of the forbidden paths.
Xonotic is an old project but hasn't hit a stable version yet so this is to be expected I guess.
And we would need to edit our models first so they look correct in Radiant:
Hello,
A new key was recently added to several Xonotic item definitions (among other changes):
<model key="model" name="model">model to use, leave blank to use the item's regular model</model>
Item entities look wrong in NRC with this change and when the key is left blank: In NR, the the entity box is shown instead, as expected:
Is it possible to ignore this key for item entities, at least when it's left blank, and draw the box instead?
The size of the box in our entity definitions is the same as the size of the entity's bbox in the game, so it's very useful to draw it.