-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mint-arena: Example for player model damage skins
Load up to 10 shaders for each mesh from .skin files. Use first shader at full health and later shaders as health decreases. If there are only two shaders, then first is for health 51+ and second is for 0 to 50. Put baseq3/doom-damage-skin.pk3dir in your baseq3 directory, use 'model doom/damage' and cg_forceModel 1 so bots use it too. Based on unused code I wrote for Turtle Arena (removed in TA 0.7).
- Loading branch information
1 parent
21d91ce
commit c52a18b
Showing
12 changed files
with
276 additions
and
32 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
baseq3/doom-damage-skin.pk3dir/models/players/doom/head_damage.skin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
h_helmet,models/players/doom/doom01,models/players/doom/doom02,models/players/doom/doom03,models/players/doom/doom04,models/players/doom/doom05,models/players/doom/doom06,models/players/doom/doom07,models/players/doom/doom08,models/players/doom/doom09,models/players/doom/doom10 | ||
h_visor,models/players/doom/doom_f00 | ||
tag_head, |
2 changes: 2 additions & 0 deletions
2
baseq3/doom-damage-skin.pk3dir/models/players/doom/lower_damage.skin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
l_legs,models/players/doom/doom01,models/players/doom/doom02,models/players/doom/doom03,models/players/doom/doom04,models/players/doom/doom05,models/players/doom/doom06,models/players/doom/doom07,models/players/doom/doom08,models/players/doom/doom09,models/players/doom/doom10 | ||
tag_torso, |
6 changes: 6 additions & 0 deletions
6
baseq3/doom-damage-skin.pk3dir/models/players/doom/upper_damage.skin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
u_torso,models/players/doom/doom01,models/players/doom/doom02,models/players/doom/doom03,models/players/doom/doom04,models/players/doom/doom05,models/players/doom/doom06,models/players/doom/doom07,models/players/doom/doom08,models/players/doom/doom09,models/players/doom/doom10 | ||
tag_head, | ||
tag_torso, | ||
tag_weapon, | ||
u_larm,models/players/doom/doom01,models/players/doom/doom02,models/players/doom/doom03,models/players/doom/doom04,models/players/doom/doom05,models/players/doom/doom06,models/players/doom/doom07,models/players/doom/doom08,models/players/doom/doom09,models/players/doom/doom10 | ||
u_rarm,models/players/doom/doom01,models/players/doom/doom02,models/players/doom/doom03,models/players/doom/doom04,models/players/doom/doom05,models/players/doom/doom06,models/players/doom/doom07,models/players/doom/doom08,models/players/doom/doom09,models/players/doom/doom10 |
158 changes: 158 additions & 0 deletions
158
baseq3/doom-damage-skin.pk3dir/scripts/doom-damage-skin.shader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
// Doom damage skins | ||
|
||
// Single shader damage skin (entity alpha) | ||
// mesh,models/players/doom/doom00 | ||
|
||
models/players/doom/doom00 | ||
{ | ||
{ | ||
map models/players/doom/doom.tga | ||
rgbGen lightingDiffuse | ||
} | ||
{ | ||
map models/players/doom/doom_statue.tga | ||
alphaGen entity | ||
blendFunc blend | ||
} | ||
} | ||
|
||
models/players/doom/doom_f00 | ||
{ | ||
{ | ||
map models/players/doom/doom_f.tga | ||
rgbGen lightingDiffuse | ||
} | ||
{ | ||
map models/players/doom/doom_f_statue.tga | ||
alphaGen entity | ||
blendFunc blend | ||
} | ||
} | ||
|
||
// Multi-shader damage skin: | ||
// mesh,models/players/doom/doom01,models/players/doom/doom02,models/players/doom/doom03,models/players/doom/doom04,models/players/doom/doom05,models/players/doom/doom06,models/players/doom/doom07,models/players/doom/doom08,models/players/doom/doom09,models/players/doom/doom10 | ||
|
||
// 91+ health | ||
models/players/doom/doom01 | ||
{ | ||
{ | ||
map models/players/doom/doom.tga | ||
rgbGen lightingDiffuse | ||
} | ||
} | ||
|
||
// 81 - 90 health | ||
models/players/doom/doom02 | ||
{ | ||
{ | ||
map models/players/doom/doom.tga | ||
rgbGen lightingDiffuse | ||
} | ||
{ | ||
map models/players/doom/red.tga | ||
alphaGen const 0.3 | ||
blendFunc blend | ||
} | ||
} | ||
|
||
// 71 - 80 health | ||
models/players/doom/doom03 | ||
{ | ||
{ | ||
map models/players/doom/doom.tga | ||
rgbGen lightingDiffuse | ||
} | ||
{ | ||
map models/players/doom/red.tga | ||
alphaGen const 0.4 | ||
blendFunc blend | ||
} | ||
} | ||
|
||
// 61 - 70 health | ||
models/players/doom/doom04 | ||
{ | ||
{ | ||
map models/players/doom/doom.tga | ||
rgbGen lightingDiffuse | ||
} | ||
{ | ||
map models/players/doom/red.tga | ||
alphaGen const 0.6 | ||
blendFunc blend | ||
} | ||
} | ||
|
||
// 51 - 60 health | ||
models/players/doom/doom05 | ||
{ | ||
{ | ||
map models/players/doom/doom.tga | ||
rgbGen lightingDiffuse | ||
} | ||
{ | ||
map models/players/doom/red.tga | ||
alphaGen const 0.8 | ||
blendFunc blend | ||
} | ||
} | ||
|
||
// 41 - 50 health | ||
models/players/doom/doom06 | ||
{ | ||
{ | ||
map models/players/doom/red.tga | ||
rgbGen lightingDiffuse | ||
} | ||
} | ||
|
||
// 31 - 40 health | ||
models/players/doom/doom07 | ||
{ | ||
{ | ||
map models/players/doom/red.tga | ||
rgbGen lightingDiffuse | ||
} | ||
{ | ||
map models/players/doom/doom_statue.tga | ||
alphaGen const 0.25 | ||
blendFunc blend | ||
} | ||
} | ||
|
||
// 21 - 30 health | ||
models/players/doom/doom08 | ||
{ | ||
{ | ||
map models/players/doom/red.tga | ||
rgbGen lightingDiffuse | ||
} | ||
{ | ||
map models/players/doom/doom_statue.tga | ||
alphaGen const 0.5 | ||
blendFunc blend | ||
} | ||
} | ||
|
||
// 11 - 20 health | ||
models/players/doom/doom09 | ||
{ | ||
{ | ||
map models/players/doom/red.tga | ||
rgbGen lightingDiffuse | ||
} | ||
{ | ||
map models/players/doom/doom_statue.tga | ||
alphaGen const 0.75 | ||
blendFunc blend | ||
} | ||
} | ||
|
||
// 0 - 10 health | ||
models/players/doom/doom10 | ||
{ | ||
{ | ||
map models/players/doom/doom_statue.tga | ||
rgbGen lightingDiffuse | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.