Xonotic Forums
Simple items - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Development (https://forums.xonotic.org/forumdisplay.php?fid=12)
+--- Thread: Simple items (/showthread.php?tid=2766)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


RE: Simple items - nifrek - 11-26-2012

They all use the same model, it's a simple plane with skin file to tell engine which texture to use. To create a new one all you need (besides creating the actual texture) is a text editor, you don't need to mess around with 3d editors and such. It's very simple (!).

Without going into details, for reference:

All necessary files are in data/models/items or data/models/weapons.

someitem.md3 - the existing 3d model used in game

someitem_simple.iqm - the plane model, they are all the same, you can copy any existing one and rename to something else as long as it matches an existing item (ie: someitem.md3 --> someitem_simple.iqm).

someitem_simple.iqm_0.skin - this file tells which texture to use, simply copy/rename an existing one then edit in text editor to point to a new texture (without extension iirc).

someitem_simple.tga - the texture that the .skin file points to.

So, someitem.md3 --> someitem_simple.iqm --> someitem_simple.iqm_0.skin --> someitem_simple.tga

Simple items also need to be added to shaders, look in script/simpleitems.shader, again copy/paste an existing one and edit model/texture name to what you want. It has been months so I might be wrong but iirc I added all items to shaders file already, I just didn't have placeholder textures for all of them. So you might not even have to add shaders.

glhf


RE: Simple items - Mr. Bougo - 11-26-2012

Hey nifrek, I mailed you about this a while ago! Did I get spamfiltered or something? Tongue

It was on the email address that you use on this forum, on Oct. 30.


RE: Simple items - nifrek - 11-26-2012

aw sorry about that, I rarely check that email.

I don't have git anymore, so I can't really help atm except explain a few things if somebody else can push changes. But well, basically what I explained in previous post, it's just copying/renaming 2 files then editing the skin file to match the model intended to add simple item for. If the texture is also there with correct name, then it'll work.

I'll check back here later if machine or somebody else need help, but I won't be able to add anything to git, sorry Sad


RE: Simple items - Mr. Bougo - 11-26-2012

Thanks for your explanations though, it's nice to have them. I thought the texture paths were hardcoded and I didn't think of making a diff of the models. They are indeed all the same. Thanks for your help


RE: Simple items - machine! - 11-27-2012

Thanks a lot nifrek! Smile


RE: Simple items - nifrek - 11-27-2012

np Smile

And yeah, I decided on using skin files instead of hardcoded textures to make it easy for anyone to make simple items and also in preparation that maybe someday somebody might code a feature to allow multiple simple items sets. Seemed logical to me, skin files would make it easy to switch between them while in-game. I'd imagine a cvar like cl_simpleitems_skin and changing the value to different numbers would select the set you want, 0 being xxx.iqm_0.skin (default), setting to 1 would use iqm_1.skin etc. Actually I always wondered if/hoped that engine would allow something else than just numbers as value, that would make it even more easy since people could release their simple item packs and name them what they want, ie: cl_simpleitems_skin "machine" would use xxx.iqm_machine.skin files, causing no incompatibilities between sets using same number. But anyway, that feature (to change item set) doesn't exist, it was just an idea.


RE: Simple items - kojn^ - 12-13-2012

Is there a .pk3 file.for simple items and will they work in Xonotic 0.6? Want them again for a video style I am testing, last piece of the puzzle!


RE: Simple items - rafallus - 12-13-2012

This one works after setting cl_simple_items to 1. But only contains core set (armors, healths, standard weapons, ammos, strength and defense).


RE: Simple items - kojn^ - 12-13-2012

Core set is all I nees rafallus, pretty sure of that anyway.

Thankyou very much, can't wait to try it with my video/movie config file I am testing!