ETMods.net

N!tmod, a Wolfenstein: Enemy Territory Modification!

You are not logged in.

Announcement

You can donate to help us keeping services online.

#1 26-Oct-12 11:59:37

wildes
Member
Registered: 26-Oct-12
Posts: 5

Weapon script

Hi,

I´d like to write an team/class/ weapon script including 2ndary weapons for nitmod. Where do i find the proper values for the weapons? I noticed my classscript doesnt work properly as compared to etpro and NQ bec mp40 and thompson are available for medics for example. Especially i cant choose the rifle as engi bec of the 2nd smg available.

From etpro it worked like this: "team b 1 8 7;echo You will spawn as ^4Allied^7 Medic with a Thompson and Colt"

teams are: r b s

Classes: 1 2 3 ... NQ: m f e c s

Weaponsnumbers: ...?

If anybody can tell me where to look it up/or post it.... also i offer to publish the script so anybody can use it.

Regards

Last edited by wildes (26-Oct-12 12:09:01)

Offline

#2 26-Oct-12 14:17:45

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,092

Re: Weapon script

N!tmod's "class" command doesn't support secondary weapons (could be added in a few minutes if somebody needs it), but "team" command does.

Here's a class selector script for N!tmod:

bind "PGUP" "vstr engi"
set engi vstr eng1
set eng1 "class e 1 ; vsay_team iamengineer ^0Engi ^7@ ^0SMG ; set engi vstr eng2"
set eng2 "class e 2 ; vsay_team iamengineer ^0Engi ^7@ ^0SMG2 ; set engi vstr eng3"
set eng3 "class e 3 ; vsay_team iamengineer ^0Engi ^7@ ^0Rifle ; set engi vstr eng1"

bind "PGDN" "vstr covi"
set covi vstr cov1
set cov1 "class c 1 ; vsay_team iamcovertops ^0Cover ^7@ ^0Sten ; set covi vstr cov2"
set cov2 "class c 2 ; vsay_team iamcovertops ^0Cover ^7@ ^0FG42 ; set covi vstr cov3"
set cov3 "class c 3 ; vsay_team iamcovertops ^0Cover ^7@ ^0Sniper ; set covi vstr cov1"

bind "DEL" "vstr soldier"
set soldier vstr soldier1
set soldier1 "class s 1 ; vsay_team iamsoldier ^0soldier ^7@ ^0SMG ; set soldier vstr soldier2"
set soldier2 "class s 2 ; vsay_team iamsoldier ^0soldier ^7@ ^0Mobile MG42 ; set soldier vstr soldier3"
set soldier3 "class s 3 ; vsay_team iamsoldier ^0soldier ^7@ ^0Flamer ; set soldier vstr soldier4"
set soldier4 "class s 4 ; vsay_team iamsoldier ^0soldier ^7@ ^0Panzer ; set soldier vstr soldier5"
set soldier5 "class s 5 ; vsay_team iamsoldier ^0soldier ^7@ ^0Mortar ; set soldier vstr soldier1"

bind "HOME" "vstr med"
set med vstr med1
set med1 "class m 1 ; vsay_team iammedic ^0Medic ^7@ ^0SMG ; set med vstr med2"
set med2 "class m 2 ; vsay_team iammedic ^0Medic ^7@ ^0SMG2 ; set med vstr med3"
set med3 "class m 3 ; vsay_team iammedic ^0Medic ^7@ ^0Sten ; set med vstr med1" //If g_weapons flag 512 is set on the server

bind "END" "vstr fo"
set fo vstr fo1
set fo1 "class f 1 ; vsay_team iamfieldops ^0Field ^7@ ^0SMG ; set fo vstr fo2"
set fo2 "class f 2 ; vsay_team iamfieldops ^0Field ^7@ ^0SMG2 ; set fo vstr fo3"
set fo3 "class f 3 ; vsay_team iamfieldops ^0Field ^7@ ^0Sten ; set fo vstr fo1" //If g_weapons flag 512 is set on the server

Weapon index:

typedef enum weapon_s
{
	WP_NONE, 			//  0
	WP_KNIFE, 			//  1
	WP_LUGER, 			//  2
	WP_MP40, 			//  3
	WP_GRENADE_LAUNCHER, 		//  4
	WP_PANZERFAUST,			//  5
	WP_FLAMETHROWER,		//  6
	WP_COLT, 			//  7
	WP_THOMPSON,			//  8
	WP_GRENADE_PINEAPPLE, 		//  9
	WP_STEN, 			// 10
	WP_MEDIC_SYRINGE,		// 11
	WP_AMMO, 			// 12
	WP_ARTY, 			// 13
	WP_SILENCER,			// 14
	WP_DYNAMITE,			// 15
	WP_SMOKETRAIL,			// 16
	VERYBIGEXPLOSION,		// 17
	WP_MEDKIT,			// 18
	WP_BINOCULARS,			// 19
	WP_PLIERS,			// 20
	WP_SMOKE_MARKER,		// 21
	WP_KAR98,			// 22
	WP_CARBINE,			// 23
	WP_GARAND,			// 24
	WP_LANDMINE,			// 25
	WP_SATCHEL,			// 26
	WP_SATCHEL_DET,			// 27
	WP_SMOKE_BOMB,			// 28
	WP_MOBILE_MG42,			// 29
	WP_K43,				// 30
	WP_FG42, 			// 31
	WP_DUMMY_MG42, 			// 32
	WP_MORTAR, 			// 33
	WP_AKIMBO_COLT,			// 34
	WP_AKIMBO_LUGER,		// 35
	WP_GPG40,			// 36
	WP_M7,				// 37
	WP_SILENCED_COLT,		// 38
	WP_GARAND_SCOPE,		// 39
	WP_K43_SCOPE,			// 40
	WP_FG42SCOPE,			// 41
	WP_MORTAR_SET,			// 42
	WP_MEDIC_ADRENALINE,		// 43
	WP_AKIMBO_SILENCEDCOLT, 	// 44
	WP_AKIMBO_SILENCEDLUGER, 	// 45
	WP_MOBILE_MG42_SET,		// 46
	WP_POISON_SYRINGE,		// 47
	WP_BOMB,			// 48
	WP_TRIPMINE,			// 49
	WP_POISON_BOMB,			// 50
	WP_POISON_MINE,			// 51
	WP_NUM_WEAPONS			// 52
} weapon_t;

iluvnitmod.png

Offline

#3 26-Oct-12 17:43:54

wildes
Member
Registered: 26-Oct-12
Posts: 5

Re: Weapon script

First of all i gotta thank you for the quick response.

2nd this is all i wanted.

3rd I hereby ask politely for 2ndary weapon support in class command, the next time you update.  That would be awesome.


Reason for this was, that i want to have single buttons binded to specific class with weapon. Avoiding akimbos(bec i dont like them) and to have soldier bazooka with smg (when availabe) with one button. As i am new to nitmod is there still this issue? Can you have the smg at weaponbank 2?


Thanks again.


PS.: I know you dont want to implement "kick" (is there any reason or is this just a running gag?), but why is there cannisterkick and cannisterowner in the documentation and if there is a reason: how to use them?

Last edited by wildes (26-Oct-12 17:48:31)

Offline

#4 26-Oct-12 19:58:49

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,092

Re: Weapon script

To avoid akimbos you can set the client cvar n_forceSinglePistol to 1, and you should always spawn with colt/luger unless you change your choice in limbo.

canisterkick can be used by aiming at a "kickable" object and pressing F (or whatever is your activate key)

Players kicking will not be added because i don't want to, it requires player animations etc... and i don't feel like wasting time on this.


iluvnitmod.png

Offline

Board footer

Powered by FluxBB