From: LegendaryGuard Date: Mon, 18 Apr 2022 22:14:35 +0000 (+0000) Subject: Add material and texture guide before exporting X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=fef44d8694ca81a0b11b0acdd19cf88e8d53a229;p=xonotic%2Fxonotic.wiki.git Add material and texture guide before exporting --- diff --git a/Exporting-a-weapon-for-Xonotic.md b/Exporting-a-weapon-for-Xonotic.md index b95da1a..02fce8f 100644 --- a/Exporting-a-weapon-for-Xonotic.md +++ b/Exporting-a-weapon-for-Xonotic.md @@ -70,7 +70,29 @@ Moreover, watch out about position and rotation. `h_*.iqm` alterates the positio `g_*` and `v_*` MUST contain one bone. The animations can't be included. It isn't like `h_*`. -The required animations are `fire`, `fire2`, `idle` and `reload`. +Required animations: +- `fire` +- `fire2` +- `idle` +- `reload` + +Please note that before exporting, about textures and materials, you have to assign the same as the script like this example shader file (`crylink.shader` file): +``` +crylink_new // your material/texture name +{ + dpreflectcube cubemaps/default/sky + { + map textures/crylink_new.tga // your attached texture from Blender + rgbgen lightingDiffuse + } +} +``` +Note: `crylink_new` must appear in the material and texture. +

Material:
+crylinkblendermaterialsample +

Texture:
+crylinkblendertexturesample +
# New methodology @@ -104,7 +126,7 @@ Use dpmodel tool to generate `h_myweapon.dpm` and `h_myweapon.dpm.framegroups`, Save those compiled model files into `models/weapons/` folder where they belong. -**Conclusion**: Sometimes, renaming formats can be useful to save effort. Note: it's a kind of weird way to do stuff, the issue of model resources was found here: https://gitlab.com/xonotic/xonotic-data.pk3dir/-/issues/2629#note_686988936 +**Conclusion**: Sometimes, renaming formats can be useful to save effort. Note: it's a kind of weird way to do stuff, file formats are hardcoded in the gamecode rather than dynamically obtained. The issue of model resources was found here: https://gitlab.com/xonotic/xonotic-data.pk3dir/-/issues/2629#note_686988936 If you received spamming errors like that:
spammingerrorstagweapon