Discord: RyBack#4239
fb: https://www.facebook.com/mohabhassan312
Alright, I've checked in the modifications to the decompiler repository. It puts all the static models into "static_model" entities. I recompiled mohdm4 and it looked like it worked fine, and they were showing up in mohradiant, though they were keeping the static_model classname.
Oh, well. Hope it works okay, I'll be keeping an eye out here for feedback.
Maybe 'static_model' already exists so the classname stays the same and their bounding box is in the shape of a static_model object too?
Edit:
I tried changing it to other stuff in your static extensions class but it still didn't work. The attributes aren't correct either when looking in the editor (source not found).
Oddly, if I add them manually by editing the .map it sometimes works... Giving them the right classname always works. I added an entity with the right classname and an invalid tiki, and the bounding box rendered fine (with the right attributes) but the model didn't. Hmmm...
Last edited by 1337Smithy; July 20th, 2018 at 07:47 AM.
Which attributes aren't correct?
A little disappointing that it's not quite working right though, but not exactly unexpected. I can use the map file uploaded earlier to generate a mapping of models to their proper entity class, but that wouldn't support any custom ones people might have made.
It seams that the only reliable thing to to would be to read the quaked entry from the tiki ?
Well I'd rather not depend on any files other than the BSP, since people might be decompiling it from anywhere on their hard drive. Trying to find these files all over the place isn't really an attractive option. I think I'll just write a program to build a list of these like I originally planned. The .map file provided earlier is amazing, I can't believe how much work that must have been. But it's still missing some things. It shouldn't be too hard to do.
By attributes I mean it doesn't recognise them as valid static entities inside the editor. Yeah, I agree that external files shouldn't be part of the decompiler's remit if it's at all possible. The .map took me about 30 mins haha, not too bad but my mouse hand ached lol.
P.S. Sorry, Ley0k, for not listening lol
So in digging through the Tiki files, I found this neat little comment.
Anyway I've almost got this thing figured out, it's gonna be... a pretty big list. I'm glad I can automatically generate it.// The name in the QUAKED section is particularly important for static models.
// It needs to be all lowercase, and have underscores to mark sub-directories.
// I hope this name is acceptable tothe level designers.
Bump. I got that whole mess committed. Static models should have the proper entity names now. Unless it's some kinda custom map with custom static models. Then you're on your own.
I guess next is the LoD terrain thingy. Hopefully that'll be pretty easy now I know the format of the data. I wasn't expecting it to be so massive. :|
Looking good so far! Thanks for this.
Btw, I've noticed all decompilers don't keep the texture coordinates on brushes (but do for patches and terrain), is this something that is intrinsic to brushes?