(Coder question) wich files to change weapons in


(twt_thunder) #1

just to save some time…
trying myself at the code
and to change a weapon… in wich files do i need to change?

cg_weapons
-and so on?


(Indloon) #2

[QUOTE=thunderpwn;435402]just to save some time…
trying myself at the code
and to change a weapon… in wich files do i need to change?

cg_weapons
-and so on?[/QUOTE]

Depends on what you want. But here are files where are weapon code located.

[ul]
[li]bg_public.h - Adding weapon to table called ( weapon_t ) and for IS_AUTORELOAD_WEAPON define[/li][li]bg_misc.c - Adding weapon to bank ( e. press 4 for grenade ), weapon model, sound, icon, [/li][li]bg_pmove.c - Animations thing, recoil[/li][li]bg_stats.c - Weapon stats[/li][li]g_clients.c - Ammo thing[/li][li]g_items.c - Weapon switching?[/li][li]g_weapon.c - Weapon spread, damage. ( and recoil? )[/li][li]cg_event.c - For kill feed weapon display name[/li][li]cg_players.c - Weapon table[/li][li]cg_weapons.c - Bullets, gun model movement, smoke puffs … [/li][li]If touching any sniper weapon: cg_view.c - Zoom in[/li][li]If touching any sniper weapon: cg_draw.c - Weapon reticle on HUD[/li][/ul]


(twt_thunder) #3

[QUOTE=Indloon;435406]Depends on what you want. But here are files where are weapon code located.

[ul]
[li]bg_public.h - Adding weapon to table called ( weapon_t ) and for IS_AUTORELOAD_WEAPON define[/li][li]bg_misc.c - Adding weapon to bank ( e. press 4 for grenade ), weapon model, sound, icon, [/li][li]bg_pmove.c - Animations thing, recoil[/li][li]bg_stats.c - Weapon stats[/li][li]g_clients.c - Ammo thing[/li][li]g_items.c - Weapon switching?[/li][li]g_weapon.c - Weapon spread, damage. ( and recoil? )[/li][li]cg_event.c - For kill feed weapon display name[/li][li]cg_players.c - Weapon table[/li][li]cg_weapons.c - Bullets, gun model movement, smoke puffs … [/li][li]If touching any sniper weapon: cg_view.c - Zoom in[/li][li]If touching any sniper weapon: cg_draw.c - Weapon reticle on HUD[/li][/ul][/QUOTE]

Thanx this was actually just the thing I wanted :smiley: … Great!
just hope I actually can manage this as I do not know **** about programming :slight_smile:

edit: cg_playerstate also


(Micha) #4

bacon did a tutorial to add mauser :slight_smile:

http://forums.warchest.com/showthread.php/7084-code-Mauser?highlight=bacon+weapon


(twt_thunder) #5

[QUOTE=Micha;435414]bacon did a tutorial to add mauser :slight_smile:

http://forums.warchest.com/showthread.php/7084-code-Mauser?highlight=bacon+weapon[/QUOTE]

thanx
if I only can figure out where visual express put files after compile :slight_smile:


(Micha) #6

I use mircrosoft visual c++ 2010 express and it always put it in \mod runk\src\Release
(Windows compile and Release Lua compiled).

Search function? :smiley:


(eQuilibrium) #7

You should set the program to build ‘Release’ files and not ‘Debug’ ones.

They will output to the folder that Micha was talking about earlier.


(twt_thunder) #8

Thanx guys, found it… But doesnt seem to have changed a thing… Will try again tonight when i get home


(eQuilibrium) #9

What do you mean ‘doesn’t seem to have changed a thing’? What are you trying to do? Also, start out simple by trying to edit the amount of ammo a weapon has.


(twt_thunder) #10

tried to change the MP40 to an AK74, but I guess I might forgot the client if that matters… will test now.

And another thing is it usual with a lot of errors on compile?


(eQuilibrium) #11

There’s a difference between warnings and errors. If you get any error(s) when compiling and it won’t actually compile anything. With warnings it can still compile. Maybe this is why you cannot find any files?


(twt_thunder) #12

probably you’re right… went trough all errors and cleaned them out and now it compiled solution… but what files goes where. I probably need a pk3 with models and stuff in, and I guess the cgame and that **** goes there too.
I am using visual studio 2013 and it seems its making .so files to … Is this right?

EDIT: wooow, something happend :slight_smile:

ERROR: BG_IndexForString: unknown token 'MP40': (animations/scripts/human_base.script, line 21)

(eQuilibrium) #13

.so files are used for linux… You should be getting .DLL files?


(twt_thunder) #14

yep finally found where to find the files :slight_smile:

But getting this error:

ERROR: BG_IndexForString: unknown token 'MP40': (animations/scripts/human_base.script, line 21)

And yes of course I’ve changed the animation.cfg too but still comes up with this…


(eQuilibrium) #15

[QUOTE=thunderpwn;435586]yep finally found where to find the files :slight_smile:

But getting this error:

ERROR: BG_IndexForString: unknown token 'MP40': (animations/scripts/human_base.script, line 21)

And yes of course I’ve changed the animation.cfg too but still comes up with this…[/QUOTE]

You need to go into that .script file and change the name to AK74 or whatever you renamed the MP40 to :slight_smile: This should be located within the pak0.pk3 file.

The file can be opened with notepad. Don’t edit the original file though. Take a copy of it then put it your own PK3.


(twt_thunder) #16

[QUOTE=eQuilibrium;435592]You need to go into that .script file and change the name to AK74 or whatever you renamed the MP40 to :slight_smile: This should be located within the pak0.pk3 file.

The file can be opened with notepad. Don’t edit the original file though. Take a copy of it then put it your own PK3.[/QUOTE]

I have done this, but it seems etpub loads both etpub and etmain for some reason look here:

ET 2.60b win-x86 May  8 2006
----- FS_Startup -----
Current search path:
C:\Program Files\Wolfenstein - Enemy Territory/etpub
C:\Program Files\Wolfenstein - Enemy Territory\etmain\z_et_mor2_night_final_voice.pk3 (16 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\w_barrels.pk3 (9 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\vs_radar_camp_b4.pk3 (41 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\UJE_ambush_b3.pk3 (89 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain	ransmitter.pk3 (143 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain	rail_alpha.pk3 (153 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain	rail.pk3 (110 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain	m_Jungle_b2.pk3 (65 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\streetlight.pk3 (6 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\rhineland_bridge_4.pk3 (103 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\qkq_cigs.pk3 (5 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\pak2.pk3 (22 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\pak1.pk3 (10 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\pak0.pk3 (3725 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\OB_DMS.pk3 (36 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\mp_bin.pk3 (6 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\mlb_temple.pk3 (83 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\mlb_bergheim_09.pk3 (215 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\mgs_ver4.pk3 (47 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\metal_beds.pk3 (6 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\md3-multiplant2.pk3 (46 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\md3-multiplant.pk3 (27 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\mapmedia.pk3 (10 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\lights.pk3 (51 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\Ia_drang.pk3 (173 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\glider_302.pk3 (52 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\fueldump_nam.pk3 (106 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\etdo_b6fix1.pk3 (17 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\etdo_b6.pk3 (135 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\dt_aa_mm.pk3 (71 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\desertrats.pk3 (109 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\Desertfortress_beta.pk3 (80 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\CountryRoad_JP.pk3 (66 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\common.pk3 (43 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\capuzzo_b1.pk3 (215 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\astro-skies.pk3 (11 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\1944_Nordwind2.pk3 (129 files)
C:\Program Files\Wolfenstein - Enemy Territory/etmain

----------------------
6231 files in pk3 files
execing default.cfg
couldn't exec language.cfg
execing profiles/-=PWN=-Thunder/etconfig.cfg
execing autoexec.cfg
Hunk_Clear: reset the hunk ok
...detecting CPU, found Intel Pentium III
Bypassing CD checks
--- Common Initialization Complete ---
Winsock Initialized
Opening IP socket: localhost:27960
Hostname: blackbird
IP: 10.0.0.4
Working directory: C:\Program Files\Wolfenstein - Enemy Territory
execing server
execing campaigncycle.cfg
------ Server Initialization ------
Server: oasis
Hunk_Clear: reset the hunk ok
----- FS_Startup -----
Current search path:
C:\Program Files\Wolfenstein - Enemy Territory/etpub
C:\Program Files\Wolfenstein - Enemy Territory\etmain\z_et_mor2_night_final_voice.pk3 (16 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\w_barrels.pk3 (9 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\vs_radar_camp_b4.pk3 (41 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\UJE_ambush_b3.pk3 (89 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain	ransmitter.pk3 (143 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain	rail_alpha.pk3 (153 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain	rail.pk3 (110 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain	m_Jungle_b2.pk3 (65 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\streetlight.pk3 (6 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\rhineland_bridge_4.pk3 (103 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\qkq_cigs.pk3 (5 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\pak2.pk3 (22 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\pak1.pk3 (10 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\pak0.pk3 (3725 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\OB_DMS.pk3 (36 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\mp_bin.pk3 (6 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\mlb_temple.pk3 (83 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\mlb_bergheim_09.pk3 (215 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\mgs_ver4.pk3 (47 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\metal_beds.pk3 (6 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\md3-multiplant2.pk3 (46 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\md3-multiplant.pk3 (27 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\mapmedia.pk3 (10 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\lights.pk3 (51 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\Ia_drang.pk3 (173 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\glider_302.pk3 (52 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\fueldump_nam.pk3 (106 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\etdo_b6fix1.pk3 (17 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\etdo_b6.pk3 (135 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\dt_aa_mm.pk3 (71 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\desertrats.pk3 (109 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\Desertfortress_beta.pk3 (80 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\CountryRoad_JP.pk3 (66 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\common.pk3 (43 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\capuzzo_b1.pk3 (215 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\astro-skies.pk3 (11 files)
C:\Program Files\Wolfenstein - Enemy Territory\etmain\1944_Nordwind2.pk3 (129 files)
C:\Program Files\Wolfenstein - Enemy Territory/etmain

----------------------
12462 files in pk3 files
------- Game Initialization -------
gamename: etpub
gamedate: Mar 18 2013
412 cvars in use.
------------------------------------------------------------
InitGame: \omnibot_playing\0\mod_url\http://etpub.org\mod_version\0.9.1\g_damageXPLevel\50\g_damageXP\0\g_tyranny\0\voteFlags\0\g_balancedteams\0\g_bluelimbotime\20000\g_redlimbotime\30000\gamename\etpub\g_gametype\4\g_voteFlags\0\g_alliedmaxlives\0\g_axismaxlives\0\g_minGameClients\8\g_needpass\0\sv_allowAnonymous\0\sv_privateClients\4\mapname\oasis\protocol\84\version\ET 2.60b win-x86 May  8 2006\omnibot_enable\1\g_heavyWeaponRestriction\100\g_antilag\1\g_maxlives\0\g_friendlyFire\1\sv_floodProtect\1\sv_maxPing\0\sv_minPing\0\sv_maxRate\13000\sv_minguidage\0\sv_punkbuster\0\sv_hostname\ETHost	imelimit\30\sv_maxclients\20\g_maxGameClients\0\g_maxlivesRespawnPenalty\0\g_antilagDelay\0\g_maxConnsPerIP\4
Start of warmup. 
Gametype changed, clearing session data.
Enable spawning!
Disable spawning!
0 teams with 0 entities
-----------------------------------
********************
ERROR: BG_IndexForString: unknown token 'MP40': (animations/scripts/human_base.script, line 21)
********************
----- Server Shutdown -----
Resolving etmaster.idsoftware.com
etmaster.idsoftware.com resolved to 192.246.40.60:27950
Sending heartbeat to etmaster.idsoftware.com
==== ShutdownGame ====
ShutdownGame:
------------------------------------------------------------
---------------------------
Hunk_Clear: reset the hunk ok
Hitch warning: 6027 msec frame time
Hitch warning: 2253 msec frame time


(Indloon) #17

Did you actually follow up this tutorial by Paul: http://forums.warchest.com/showthread.php/18357-Compiling-and-running-a-mod-under-Windows ?

It’s not the best idea to start changing files directly at pak0 file, well at least at start.


(twt_thunder) #18

[QUOTE=Indloon;435597]Did you actually follow up this tutorial by Paul: http://forums.warchest.com/showthread.php/18357-Compiling-and-running-a-mod-under-Windows ?

It’s not the best idea to start changing files directly at pak0 file, well at least at start.[/QUOTE]

No not really… downloaded the etpub source and just started there with proj file


(eQuilibrium) #19

This error might also occur when the .DLL files are not correctly installed.
They should be put in a .pk3 file, as well as in the mod directory along with the qagame.dll
qagame.dll shouldn’t be put into the .pk3 file.


(twt_thunder) #20

yep… but still doesnt work… doesnt read the pk3 in etpub folder…
maybe I should give a **** and leave it to smurfer…