Change the weapon FOV, I mean (Offset, or Weapon Viemodel)

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Cataflexia
Posts: 56
Joined: Mon Oct 01, 2012 8:45 pm

Change the weapon FOV, I mean (Offset, or Weapon Viemodel)

Post by Cataflexia »

Hi to all,

I want to change the X coordinate of the weapons in GZDoom (I want to see more of the weapon sprite).
I know that the sprite is not a 3D objet, so, this have a cut limit of the image.

BUT, I'm using the "Universal-Weapon-Sway mod with Brutal Heretic mod.
And when Weapon Sway are loaded, the view weapon X offset are sligh changed, causing that weapon look lees on screen.

Weapon Sway: https://github.com/Boondorl/Universal-Weapon-Sway
Brutal Heretic: viewtopic.php?f=45&t=68735&start=30
Brutal Heretic functional download (with PBR textures): https://www.moddb.com/mods/heretic-hd-pbr

I know that the 3D weapon models in other games have an integrated with commands to change the weapon offset (weapon fov), for example:

Quake 3:

Code: Select all

cg_gunx
cg_guny
cg_gunz
On Unreal is:

Code: Select all

set weapon playerviewoffset (x=100)
set weapon playerviewoffset (y=100)
set weapon playerviewoffset (z=100)
For Doom 3 is:

Code: Select all

model viewmodel_pistol {
mesh models/md5/weapons/pistol_view/viewpistol.md5mesh
offset ( -2 0 0 ) //where values are x y z coordinates
}
And so on, in many other games with different implementations.

I've searching some similar for GZDoom but I can't find any console command that do something similar.
I know that GZDoom in the mayority of cases only uses sprites for weapons hud view.

So, I've found a documentation about this here:
https://zdoom.org/wiki/A_WeaponOffset

Code: Select all

WOF_KEEPX
WOF_KEEPY
But I can't understand how I can implement this to make a MOD???
Sorry, I'm not an expert with scripting for making mods.

But if anybody can tell me if GZDoom have a console command to do this, it will be grat, really.
If not, any help/suggestion will be great to me too.

Thanks! I hope anybody can help me.
Post Reply

Return to “Scripting”