Sauerworld Forum

How to add new weapons?

captainblo

  • *
  • 1
  • +0/-0
How to add new weapons?
« on: April 29, 2017, 07:25:17 AM »
Hello! I'm having a lot of fun with this project and i've decided to create new weapons for it. I'm an artist so i don't have a lot of knowledge about modding the source. I have a few questions and i would love to get more info on them. Thanks in advance!

  • In order to add a new weapon, i just have to change the fpsgame/game.h file and add a new line on the guninfo struct?
  • What is the coordinate system that Sauerbraten uses? Also, what's the scale so i can adjust my models in Blender?
  • What is the preferred method of exporting from Blender to Sauerbraten? MD5? IQM?
  • I've started by replacing the hudgun/rifle model with my own, but i can't get it to show. Maybe i'm using the wrong scale or something? Is there a way to debug this? How do i know if the hudgun model was loaded correctly?
  • How can i remove the default arms?
  • How can i add a magazine reload system to the weapons?

star

  • *****
  • 310
  • +19/-5
Re: How to add new weapons?
« Reply #1 on: April 29, 2017, 07:46:59 AM »

Timakrov_Gunn

  • *
  • 23
  • +2/-0
  • A living gun
Re: How to add new weapons?
« Reply #2 on: May 04, 2017, 01:23:00 AM »
From what I know, IQM was technically meant to replace MD5.  http://sauerbraten.org/iqm/

You can also have a look at the model reference. http://sauerbraten.org/docs/models.html
You can also look at the old hudguns' md5.cfg files and see how the model is set up from there.

Noesis is a good tool to have in the matter of models. You can export one of the md5 hudguns as obj and look at the models in Blender to get the idea of what they're positioned and scaled to, although you'll still need a proper configuration file for it. http://richwhitehouse.com/index.php?content=inc_projects.php

One thing I will mention if you intend to replace something. Make sure you rename the old config file to something else like md5_copy.cfg or something, just anything but md5.cfg. Otherwise, the game will STILL use it even if you use a different format like md3.cfg.

Alu

  • *
  • 43
  • +2/-0
Re: How to add new weapons?
« Reply #3 on: May 05, 2017, 02:18:16 AM »
I want a sword
Such as halo 2