Pages: [1]
  Print  
Author Topic: Unset Wildcards  (Read 10458 times)
7
Member


Cakes 7
Posts: 278


Is 7 up?


« on: April 08, 2011, 06:11:25 AM »

If you use the disable_ or replace_ cvars to disable or change map items, you have to unset those cvars before you change the map or the changes will act on the next map also. If you unset only the changed cvars before calling the next map it becomes impractical to change the map rotation, because if you put one map in another slot you have to edit 4 map calls. Therefor it's more practical to unset all of the cvars and not only those specified in the previous map, because this way you can change the map rotation without side effects.

Because there are 102 disable_ and replace_ cvars, it's better to keep all the unset commands in a separate file, and exec that file before you call the next map:

File: unset-disrep.cfg
Code:
unset disable_weapon_chaingun
unset disable_weapon_prox_launcher
unset disable_weapon_nailgun
unset disable_item_bluecube
unset disable_item_redcube
unset disable_team_CTF_neutralflag
unset disable_item_ammoregen
unset disable_item_doubler
unset disable_item_guard
unset disable_item_scout
unset disable_ammo_belt
unset disable_ammo_mines
unset disable_ammo_nails
unset disable_holdable_invulnerability
unset disable_holdable_portal
unset disable_holdable_kamikaze
unset disable_team_CTF_blueflag
unset disable_team_CTF_redflag
unset disable_item_flight
unset disable_item_regen
unset disable_item_invis
unset disable_item_haste
unset disable_item_enviro
unset disable_item_quad
unset disable_holdable_medkit
unset disable_holdable_teleporter
unset disable_ammo_bfg
unset disable_ammo_slugs
unset disable_ammo_rockets
unset disable_ammo_lightning
unset disable_ammo_cells
unset disable_ammo_grenades
unset disable_ammo_bullets
unset disable_ammo_shells
unset disable_weapon_grapplinghook
unset disable_weapon_bfg
unset disable_weapon_plasmagun
unset disable_weapon_railgun
unset disable_weapon_lightning
unset disable_weapon_rocketlauncher
unset disable_weapon_grenadelauncher
unset disable_weapon_machinegun
unset disable_weapon_shotgun
unset disable_weapon_gauntlet
unset disable_item_health_mega
unset disable_item_health_large
unset disable_item_health
unset disable_item_health_small
unset disable_item_armor_body
unset disable_item_armor_combat
unset disable_item_armor_shard
unset replace_weapon_chaingun
unset replace_weapon_prox_launcher
unset replace_weapon_nailgun
unset replace_item_bluecube
unset replace_item_redcube
unset replace_team_CTF_neutralflag
unset replace_item_ammoregen
unset replace_item_doubler
unset replace_item_guard
unset replace_item_scout
unset replace_ammo_belt
unset replace_ammo_mines
unset replace_ammo_nails
unset replace_holdable_invulnerability
unset replace_holdable_portal
unset replace_holdable_kamikaze
unset replace_team_CTF_blueflag
unset replace_team_CTF_redflag
unset replace_item_flight
unset replace_item_regen
unset replace_item_invis
unset replace_item_haste
unset replace_item_enviro
unset replace_item_quad
unset replace_holdable_medkit
unset replace_holdable_teleporter
unset replace_ammo_bfg
unset replace_ammo_slugs
unset replace_ammo_rockets
unset replace_ammo_lightning
unset replace_ammo_cells
unset replace_ammo_grenades
unset replace_ammo_bullets
unset replace_ammo_shells
unset replace_weapon_grapplinghook
unset replace_weapon_bfg
unset replace_weapon_plasmagun
unset replace_weapon_railgun
unset replace_weapon_lightning
unset replace_weapon_rocketlauncher
unset replace_weapon_grenadelauncher
unset replace_weapon_machinegun
unset replace_weapon_shotgun
unset replace_weapon_gauntlet
unset replace_item_health_mega
unset replace_item_health_large
unset replace_item_health
unset replace_item_health_small
unset replace_item_armor_body
unset replace_item_armor_combat
unset replace_item_armor_shard

Map call, disabling quad only:
Code:
exec unset-disrep.cfg;set disable_item_quad 1;map oa_dm4

In my opinion this is a terrible cludge because you have to unset 102 cvars individually. If you could use simple completion-wildcards you could cut that down to 2 unsets and you wouldn't have to use a separate file to store them in:

Code:
unset disable_*
unset replace_*

I think unset wildcards could have other practical scripting purposes too. What do you think?
Logged

I'm on the ten most wanted list, I've got it dead in the groove.
My face is on every wanted poster in town, for the way I move.
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #1 on: April 08, 2011, 06:48:59 AM »


Code:
unset disable_*
unset replace_*

I think unset wildcards could have other practical scripting purposes too. What do you think?
Sounds interesting.... maybe a little "dangerous", too?
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
7
Member


Cakes 7
Posts: 278


Is 7 up?


« Reply #2 on: April 08, 2011, 07:13:42 AM »

Sounds interesting.... maybe a little "dangerous", too?

Is an unset * more dangerous than a cvar_restart? Wink
Logged

I'm on the ten most wanted list, I've got it dead in the groove.
My face is on every wanted poster in town, for the way I move.
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #3 on: April 08, 2011, 03:53:06 PM »

I don't know that command... even if I can imagine it...
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
RMF
Member


Cakes 12
Posts: 694



« Reply #4 on: April 25, 2011, 03:40:41 AM »

Please warn next time, now i had to put back a backup of my config Tongue
Logged
7
Member


Cakes 7
Posts: 278


Is 7 up?


« Reply #5 on: April 25, 2011, 01:36:20 PM »

Oops, sorry there. Sad cvar_restart only clears your cvar variables, so not much damage should be done unless you saved your config in q3config.cfg (which is managed by OA) and exit the game.

So for other people who type \cvar_restart in the console and didn't save their config: don't exit the game because this will overwrite your config in q3config.cfg, instead type \exec q3config.cfg to get your config back.
Logged

I'm on the ten most wanted list, I've got it dead in the groove.
My face is on every wanted poster in town, for the way I move.
RMF
Member


Cakes 12
Posts: 694



« Reply #6 on: May 02, 2011, 12:04:12 PM »

I already suspected as much and quit oa by killing it from the windows task manager (kill the process in the process list, I didn't close it via the applications tab). OA still it saved it before... Oh well, different configs for every mod finally are helpful Tongue
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #7 on: May 30, 2011, 02:00:00 PM »

Tried (obviously, I backupped the file first!)... the \exec q3config.cfg trick did not work.
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
7
Member


Cakes 7
Posts: 278


Is 7 up?


« Reply #8 on: May 31, 2011, 10:53:01 AM »

Tried (obviously, I backupped the file first!)... the \exec q3config.cfg trick did not work.

I'm afraid you're right Sad I could have sworn that used to work, but q3config.cfg is synchronized right after a cvar_restart. Teaches me to write things without checking, and others to create an autoexec.cfg in the baseoa folder with their basic configuration settings in it Tongue
Logged

I'm on the ten most wanted list, I've got it dead in the groove.
My face is on every wanted poster in town, for the way I move.
Pages: [1]
  Print  
 
Jump to: