Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
bardcat

player view height, translucent color

Recommended Posts

after looking through the zdoom wiki for awhile, i finally found a way to alter the players view height via the decorate lump, but i can't find an example anywhere, and i'm sortof lost without one. also, in the textures lump, how do i specify which color to draw translucent when using high resolution textures, the same way cyan is drawn in the standard 256 color palette?

Share this post


Link to post
bardcat said:

the same way cyan is drawn in the standard 256 color palette?



There is no cyan in the standard palette. Color 247 is actually black. Transparent areas in patches have no color at all. Cyan is just used as a placeholder by XWE etc.


For PNG textures you have to set the transparent color with the tools you use to create the textures. There is no color which is transparent by default and aside from setting one in the graphic itself no way to set one.

Share this post


Link to post

ah, awesome. worked perfectly. way more flexible, too.. now about player view height... heh.

Share this post


Link to post

Here's what I used - a KEYCONF lump containing the following lines-

clearplayerclasses
addplayerclass DoomGuy
and in the DECORATE lump-
ACTOR DoomGuy : PlayerPawn
{
  Player.DisplayName "Marine"
  Player.StartItem "Pistol"
  Player.StartItem "Fist"
  Player.StartItem "clip", 50
  Player.Viewheight 41 // or whatever you want
}

Share this post


Link to post
GreyGhost said:

and in the DECORATE lump-

ACTOR DoomGuy : PlayerPawn

I'd recommend "ACTOR DoomGuy : DoomPlayer" instead. That way you keep all the things from the normal doom guy that you did not redefine to be different. If all you want to change is the viewheight, your actor definition can be a single line:

ACTOR DoomGuy : DoomPlayer { Player.Viewheight 50 }
This actor is exactly the same as the normal doom player, but with a camera height that's in its head rather than its torso.

Inheritance, people. It's a very useful thing in DECORATE.

Share this post


Link to post

Gez, yours seems to work much better. The other code didn't allow me to switch between weapons. (?) however, the players weapons still aim low, (obviously) since it's only altering the view height. any way to remedy that?

EDIT: off topic, but will gzdoom recognize multiple "TEXTURES" entries if they are contained in serperate wad files? say i ran "-file brick.wad wood.wad prop.wad map.wad" with each wadfile containing different textures with their own texture definition lump.

Share this post


Link to post

You could create variants of the rocket launcher, plasma rifle and BFG 9000 which would use A_FireCustomMissile with a modified spawnheight parameter instead of the hardcoded Doom functions A_FireMissile, A_FirePlasma and A_FireBFG; but this wouldn't do anything for the melee and hitscan weapons.


I'm pretty sure TEXTURES lumps are cumulative. They don't have a reason not to be.

Share this post


Link to post

The viewheight of 50 is still a touch low IMO. If the doomguy is 56 units tall, 6 units are just under 11% of his height. If he's a six footer, then that places his eyes at a little over 7 1/2 inches below the top of his head.

FWIW, I usually go for viewheight 52 and a Player.AttackZOffset of 24. That seems to make the crosshair and the actual point of impact from hitscans line up just about perfectly and projectiles look fine too IMO.

Share this post


Link to post
Enjay said:

The viewheight of 50 is still a touch low IMO. If the doomguy is 56 units tall, 6 units are just under 11% of his height. If he's a six footer, then that places his eyes at a little over 7 1/2 inches below the top of his head.


If you look on PLAYA1, 6 pixels down from the top is in the middle of the visor.

Enjay said:

Player.AttackZOffset

I had forgotten about that one. Much better than messing with the weapons.

Share this post


Link to post

what would like look like in decorate, using gez's method? i can't ever understand the zdoom wiki's instructions, heh.

Share this post


Link to post

ACTOR DoomGuy : DoomPlayer
{
   Player.Viewheight 50 // or 52, whatever you want
   Player.AttackZOffset 24
}
Hardly rocket science.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×