OpenArena Message Boards

OpenArena => General => Topic started by: apolloAdama on March 12, 2013, 02:25:35 PM



Title: Disable weapons in single player game
Post by: apolloAdama on March 12, 2013, 02:25:35 PM
I enjoy playing OpenArena in the single player mode and I was wondering if it is possible to disable weapons like the rocket and grenade launchers? I had a google and found that you can disable certain weapons in one of the skirmish games (I think it is Elimination)  by using the settings in the .openarena/baseoa/q3config.cfg file:

seta elimination_rocket "0"
seta elimination_grenade "0"

Is there settings like this for the main single player game?


Title: Re: Disable weapons in single player game
Post by: sago007 on March 12, 2013, 02:55:12 PM
You can disable them (works in all versions of OpenArena and most mods):
Code:
seta disable_weapon_rocket 1
seta disable_weapon_grenade 1

In OpenArena 0.8.8 you can also replace them with another weapon like the shotgun:
Code:
seta replace_weapon_rocket weapon_shotgun
seta replace_weapon_grenade weapon_shotgun

This does not work for the gauntlet and the machinegun but only for pickups. It is not limited to weapons.



Title: Re: Disable weapons in single player game
Post by: GrosBedo on March 12, 2013, 04:26:13 PM
What about this:

Code:
seta g_elimination 0 // activate the elimination_* features in other gametypes

Doesn't it work anymore?


Title: Re: Disable weapons in single player game
Post by: apolloAdama on March 12, 2013, 04:26:52 PM
Thanks for replying sago007.

I played around with the settings and the following seems to have worked.

Code:
seta disable_weapon_rocketlauncher "1"
seta disable_weapon_grenadelauncher "1"

The game is a whole lot better now that you don't get randomly fragged by a random blast!!


Title: Re: Disable weapons in single player game
Post by: Jakash3 on March 12, 2013, 05:18:53 PM
I give up on openarena


Title: Re: Disable weapons in single player game
Post by: MegaAIM on March 13, 2013, 12:38:10 AM
Code:
// weapons
seta disable_item_armor_shard "0"
seta disable_item_armor_combat "0"
seta disable_item_armor_body "0"
seta disable_item_health_small "0"
seta disable_item_health "0"
seta disable_item_health_large "0"
seta disable_item_health_mega "0"
seta disable_weapon_gauntlet "0"
seta disable_weapon_shotgun "0"
seta disable_weapon_machinegun "0"
seta disable_weapon_grenadelauncher "0"
seta disable_weapon_rocketlauncher "0"
seta disable_weapon_lightning "0"
seta disable_weapon_railgun "0"
seta disable_weapon_plasmagun "0"
seta disable_weapon_bfg "1"
seta disable_weapon_grapplinghook "0"
seta disable_ammo_shells "0"
seta disable_ammo_bullets "0"
seta disable_ammo_grenades "0"
seta disable_ammo_cells "0"
seta disable_ammo_lightning "0"
seta disable_ammo_rockets "0"
seta disable_ammo_slugs "0"
seta disable_ammo_bfg "0"
seta disable_holdable_teleporter "1"
seta disable_holdable_medkit "1"
seta disable_item_quad "1"
seta disable_item_enviro "0"
seta disable_item_haste "0"
seta disable_item_invis "0"
seta disable_item_regen "0"
seta disable_item_flight "0"
seta disable_team_CTF_redflag "0"
seta disable_team_CTF_blueflag "0"

// missionpack

seta disable_holdable_kamikaze "0"
seta disable_holdable_portal "0"
seta disable_holdable_invulnerability "0"
seta disable_ammo_nails "0"
seta disable_ammo_mines "0"
seta disable_ammo_belt "0"
seta disable_item_scout "0"
seta disable_item_guard "0"
seta disable_item_doubler "0"
seta disable_item_ammoregen "0"
seta disable_team_CTF_neutralflag "0"
seta disable_item_redcube "0"
seta disable_item_bluecube "0"
seta disable_weapon_nailgun "1"
seta disable_weapon_prox_launcher "1"
seta disable_weapon_chaingun "1"


Title: Re: Disable weapons in single player game
Post by: sago007 on March 13, 2013, 01:16:47 AM
Which mod is that? baseoa doesn't have this g_disable_someweapon feature.
It does! But the cvars are not registred, they are generated from the item names and will not autocomplete.


Title: Re: Disable weapons in single player game
Post by: Gig on March 13, 2013, 01:40:28 AM
What about this:

Code:
seta g_elimination 0 // activate the elimination_* features in other gametypes

Doesn't it work anymore?
Yes, it works.

(DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Special_game_options#Elimination_features_outside_Elimination_mode
But that would not simply remove specified weapons pickups from the maps, it would remove all weapons pickups, and would also remove all health, armor, ammo boxes, powerups such as the quad damage...
It would apply various features from DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/Elimination]Elimination (http://([b) gametype, but keeping the scoring type of the current gametype.
In that case, you can control each weapon's initial ammo load with the elimination_ variables.
(DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Elimination#CVARs


Title: Re: Disable weapons in single player game
Post by: Jakash3 on March 13, 2013, 11:57:42 AM
I give up on openarena


Title: Re: Disable weapons in single player game
Post by: sago007 on March 13, 2013, 12:13:18 PM
replace_<ITEMNAME> was added in OAX r216 and is included in OpenArena. https://code.google.com/p/oax/source/detail?r=216

disable_<ITEMNAME> existed in Q3A. The code is placed in g_items.c

Code:
/*
============
G_ItemDisabled
============
*/
int G_ItemDisabled( gitem_t *item ) {

        char name[128];

        Com_sprintf(name, sizeof(name), "disable_%s", item->classname);
        return trap_Cvar_VariableIntegerValue( name );
}


Title: Re: Disable weapons in single player game
Post by: Gig on March 13, 2013, 12:15:31 PM
There is no point at using both g_elimination and disable_weapon_rocketlauncher at the same time.
The change that comes with g_elimination 1 (removing ALL item pickups, while giving you weapons and ammo since your respawning) requires a map_restart to be effective. I don't know if the other one requires that, too, and I don't have time to test it right now.

While disable_weapon_rocketlauncher really does not exist before you create it (you have to use "set" or "seta" command to set it the first time - when you don't need it anymore, I suppose you can delete it using "unset"), g_elimination DOES exist, you do not need to create it with "set".

Note: some variables may look like not existing, or report the wrong "default value" (they may tell your current value is the default one, while it's not the default) if you check them using the cosole from the main menu before having entered at least a match after you launched OA. I don't know workarounds for this, except loading a map... I'm not sure if that affects dedicated server executables, too.

PS: is it possible that you typed "disable_weapon_rocket", as you wrote in the post, instead of "disable_weapon_rocketlauncher", as in AIM's list?


Title: Re: Disable weapons in single player game
Post by: Jakash3 on March 13, 2013, 03:12:52 PM
I give up on openarena


Title: Re: Disable weapons in single player game
Post by: sago007 on March 13, 2013, 03:27:14 PM
I'm not running oax, I'm using the regular openarena.
OpenArena 0.8.8 is based on OAX r280.


Title: Re: Disable weapons in single player game
Post by: Jakash3 on March 13, 2013, 04:35:28 PM
I give up on openarena


Title: Re: Disable weapons in single player game
Post by: sago007 on March 13, 2013, 04:42:43 PM
you mean this? http://openarena.ws/page.php?14 (http://openarena.ws/page.php?14)
Yes, the OpenArena 0.8.8 source is from the oa-0.8.8 branch from OAX http://code.google.com/p/oax/source/browse/#svn%2Fbranches%2Foa-0.8.8