Skip to content

Commit

Permalink
feat: add weapon offsets for Block-Quake mod
Browse files Browse the repository at this point in the history
  • Loading branch information
codeflorist committed Mar 6, 2024
1 parent 33751d9 commit 7b91702
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Quake/vr.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,17 @@ void InitAllWeaponCVars()
InitWeaponCVars(i++, "progs/v_multi2.mdl", "-7.2", "4", "18.2", "0.32"); //multirocket - same as rocket
InitWeaponCVars(i++, "progs/v_plasma.mdl", "-3.1", "4.4", "14.2", "0.37"); //plasma - same as lightning
}
// Block Quake models (https://kebby-quake.itch.io/block-quake)
else if (vr_gunmodeloffsets.value == VR_GUNMODELOFFSETS_BLOCKQUAKE) {
InitWeaponCVars(i++, "progs/v_axe.mdl", "-9", "38", "45", "0.2"); //axe
InitWeaponCVars(i++, "progs/v_shot.mdl", "-7", "6.8", "35.5", "0.2"); //shotgun
InitWeaponCVars(i++, "progs/v_shot2.mdl", "-5.6", "10.2", "42", "0.2"); //supershotgun
InitWeaponCVars(i++, "progs/v_nail.mdl", "-9", "15", "40", "0.2"); //nailgun
InitWeaponCVars(i++, "progs/v_nail2.mdl", "-6", "13.5", "39", "0.2"); //supernailgun
InitWeaponCVars(i++, "progs/v_rock.mdl", "0", "11.8", "72", "0.2"); //grenade
InitWeaponCVars(i++, "progs/v_rock2.mdl", "26", "13.8", "69", "0.2"); //rocket
InitWeaponCVars(i++, "progs/v_light.mdl", "-9", "13.5", "51", "0.2"); //lightning
}
// Vanilla models
else {
//vanilla weapons
Expand Down
3 changes: 2 additions & 1 deletion Quake/vr.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
#define VR_GUNMODELOFFSETS_ENHANCED 1 // Gun model offset defaults for enhanced models pack (https://quakeone.com/forum/quake-mod-releases/finished-works/283295-osjc-s-enhanced-quake1-model-conversions-pack-v1)
#define VR_GUNMODELOFFSETS_AUTHENTIC 2 // Gun model offset defaults for authentic models pack (https://github.com/NightFright2k19/quake_authmdl)
#define VR_GUNMODELOFFSETS_PLAGUE 3 // Gun model offset defaults for plague's models pack (https://github.com/NightFright2k19/quake_authmdl)
#define VR_MAX_GUNMODELOFFSETS VR_GUNMODELOFFSETS_PLAGUE
#define VR_GUNMODELOFFSETS_BLOCKQUAKE 4 // Gun model offset defaults for Block Quake's model pack (https://kebby-quake.itch.io/block-quake)
#define VR_MAX_GUNMODELOFFSETS VR_GUNMODELOFFSETS_BLOCKQUAKE

void VID_VR_Init();
void VID_VR_Shutdown();
Expand Down
1 change: 1 addition & 0 deletions Quake/vr_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ static void VR_MenuPrintOptionValue(int cx, int cy, int option)
case VR_GUNMODELOFFSETS_ENHANCED: value_string = "Enhanced"; break;
case VR_GUNMODELOFFSETS_AUTHENTIC: value_string = "Authentic"; break;
case VR_GUNMODELOFFSETS_PLAGUE: value_string = "Plague"; break;
case VR_GUNMODELOFFSETS_BLOCKQUAKE: value_string = "Block-Quake"; break;
}
break;
case VR_OPTION_GUNANGLE: printAsStr(vr_gunangle); break;
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ There are also 3 mods available containing enhanced models for enemies and weapo

This pack contains considerably more models as the one above - including converted ones from the Re-Release, but some weapons look worse than Plague's Weapon Pack and the Enhanced Model Conversion Pack linked above. To use them with QuakeSpasm-OpenVR, extract it into your `Quake` folder and rename the `pakz.pak` files by changing the `z` to a number higher then the highest existing `pak`-file inside your `id1`, `hipnotic`, and `rogue` folders. You will notice, that the weapon offsets and scaling will be off. To switch to the correct offsets, access the `VR Options` in Quake's main menu and switch `Gun Model Offsets` from `Vanilla` to `Authentic`. (Note that you will have to do that for each expansion/add-on you load, since Quake writes separate configs per mod.)

- [__Block-Quake__](https://kebby-quake.itch.io/block-quake):

A total conversion mod for Quake featuring familiar plastic blocks.

To use them with QuakeSpasm-OpenVR, extract `blockquake_vanilla.pak` into your `id1` (or any mod) subfolder and rename it to a number higher then the highest existing `pak`-file inside your `id1` folder. If you are using `pak` files from vanilla Quake this will be `pak2.pak`, and if you're using the Re-Release, it will be `pak1.pak`.

You will notice, that the weapon offsets and scaling will be off. To switch to the correct offsets, access the `VR Options` in Quake's main menu and switch `Gun Model Offsets` to `Block-Quake`. (Note that you will have to do that for each expansion/add-on you load, since Quake writes separate configs per mod.)

You can also use multiple MODs in conjunction. E.g. load the Authentic pack first as e.g. `pak1.pak` to get the wide arrange of models and then the Plague's Weapon Pack second e.g. as `pak2.pak` to get the better VR-optimized weapon models. Of course you have to set `Gun Model Offsets` to `Plague` in this case.

### Controls
Expand Down Expand Up @@ -120,6 +128,7 @@ All mission packs, add-ons and mods (supported by QuakeSpasm) should work out of
- Arcane Dimensions (be sure to place it in a `ad` subfolder)
- [Alkaline](https://alkalinequake.wordpress.com/) (be sure to place it in a `alk` subfolder)
- [Slave Zero X: Episode Enyo](https://poppyworks.itch.io/episode-enyo) (be sure to place it in a `enyo` subfolder)
- [Block-Quake](https://kebby-quake.itch.io/block-quake) (be sure to set `Gun Model Offsets` in the `VR Options` to `Block-Quake`)
- etc.

As usual, expansion packs and mods are placed inside subfolders and then launched by stating the subfolder via the `game` parameter (e.g. `quakespasm-openvr.exe -game hipnotic`).
Expand Down Expand Up @@ -166,6 +175,7 @@ Quake's weapons don't seem to be particularly consistently sized or offset. To w
- Vanilla Quake, Scourge of Armagon and Dissolution of Eternity weapons (including the VR versions of Plague's weapon pack and Enhanced and Authentic Model Packs - [see info above for details](#enhanced-models)!)
- Arcane Dimensions weapons (be sure to use folder-name `ad` and start game with `-game ad` to have them applied, [see info above for use of VR weapons](#enhanced-models))
- Alkaline weapons (be sure to use folder-name `alk` and start game with `-game alk` to have them applied, [see info above for use of VR weapons](#enhanced-models))
- Weapons for [Block-Quake](https://kebby-quake.itch.io/block-quake) (set `Gun Model Offsets` in the `VR Options` to `Block-Quake`).
- Weapons for Slave Zero X: Episode Enyo (be sure to use folder-name `enyo` and start game with `-game enyo` to have them applied).
- Underdark Overbright's axe (be sure to use folder-name `udob` and start game with `-game udob` to have them applied)
- The Spiritworld's and axe (be sure to use folder-name `spiritworld` and start game with `-game spiritworld` to have them applied)
Expand Down

0 comments on commit 7b91702

Please sign in to comment.