Message Boards

Topic: CVAR complete list in a wiki page - bonus automap patch  (Read 9824 times)

Offline Nes

  • Developer
  • Posts: 31
    • View Profile
As some of you may know, I'm developing a complete list of cvars to put in a wiki page. The information for each cvar is descriptive and contains things such as the code file it's defined at and all that use it externally. (Including information such as broken cvars, external cvars that have no use at all, and trivial things such as a file calling a cvar externally when that cvar was created in the same file)

Progress is good so far. I've developed the list of cvars used in the client and as of now I'm sorting them, alphabetically, in a format that can be read better in the wiki.

I'll also be making patches that clean up the cvar usage. (Removing unused externals, cleaning up bad cvars, etc.) It's one step closer to cleaning up the mess that is Odamex source.

Example:
---------------------------

Name: deathmatch
Default Value: "1"
Flags: CVAR_ARCHIVE
Type: Normal CVAR
Options Menu: No
Source: src\g_game.cpp
Externals: src\doomstat.h, src\g_level.cpp

Determines whether the local game runs Cooperative or Deathmatch rules. This variable doesn't determine between "-deathmatch" and "-altdeath" rules, so follow this cvar chart:

Type         =deathmatch =itemsrespawn =weaponstay
==================================================
Singleplayer =Disabled   =Disabled     =Disabled
Cooperative  =Disabled   =Disabled     =Enabled
-deathmatch  =Enabled    =Disabled     =Enabled
-altdeath    =Enabled    =Enabled      =Disabled
"Newschool"  =Enabled    =Enabled      =Enabled
==================================================

0: Enable Cooperative rules.
1: Enable Deathmatch rules.

NOTE: Unlatched. Sets itself to 0 when moving between maps. Unused locally.

---------------------------

Remember, this is for the client only. The server cvar is kind of different.

BONUS: While doing this, I've done a ton of modifications for the automap. It's enclosed (though needs to be renamed to .diff or .patch) and contains many features:

-- IntraTeleportColor and InterTeleportColor changed to TeleportColor and ExitColor. We don't have Hexen hubs anymore, we can go back to basic.
-- Teleporter and exit lines work 100%. Classic colors didn't use these and use the other lines depending on the type of wall.
-- New cvar (am_classicmapstring) that, when activated, will emulate classic map strings from vanilla Doom. (Instead of "MAP01: entryway" it's "level 1: entryway". Uses the original string and not some crazy new "MAP01:" replacement)
-- New and changed custom color cvars, including new overlay color cvars to match. (Upgrading the potential use of overlays.)
-- Speaking of which, Odamex needs to differentiate from ZDoom. So instead of ZDoom's parchment automap and olive overlay, it's just one awesome color scheme that makes Odamex the perfect default automap scheme.
-- New cvar (am_ovshare) that determines whether the overlay scheme uses the same scheme as the custom automap scheme. (So you don't have to work your ass off trying to make both schemes the same)
-- New command (and menu option), resetcustomcolors will reset the custom colors for both the automap and the overlay to the new default.
-- Split up a lot of the shared custom automap and overlay colors for better customization.
-- Teleporter and exit colors will only show up
-- Add a few extra variables for the am_overlay cvar. am_overlay 2 will give a more full overlay. It's like automap with a transparent background. am_overlay 3 is the same, but with automap disabled.
-- And one more thing that I'm really excited about. At first, I thought I went overboard with this and that it's not really practical. But eventually, I decided to keep it in the patch. You know how some ports have different colors for Red, Blue, and Yellow doors? I've decided to simplify that aspect while giving an awesome new effect. (that only shows up when am_usecustomcolors is enabled) Basically, the LockedColor color, which can be defined to any color, glows to red, blue, or yellow depending on the color of the key required every few seconds.
-- And I don't know why, but CodeBlocks likes to screw around with spaces and lines. >:P

I'm not trying to stack features on Odamex like a late 90s BOOM clone. I just thought that the ZDOOM automap system was incomplete and busted, especially with the overlay. (which only had few colors and no real use) This patch shows the potential for automap and overlay, while not giving it too many crazy new features.

Also, if you're running this patch and the colors of the automap is messed up, go to the display options menu and activate "reset custom automap colors". While you're there, you can change overlay to Off, Standard, Full, and Full Only to test.

The only bug I can think of is that you can't enter the map cheats and zoom in overlay mode. But that's a boom/zdoom bug.

EDIT: P.S. The new default looks awesome in UDM3.
P.S.S. Is it possible to change your forum/wiki name?
« Last Edit: July 25, 2007, 05:29:21 by Nestea »

Offline deathz0r

  • Administrator
  • Posts: 61
  • kick it oldskewl
    • View Profile
    • deathz0r's Place of DOOM
Re: CVAR complete list in a wiki page - bonus automap patch
« Reply #1 on: July 25, 2007, 15:59:36 »
-- And I don't know why, but CodeBlocks likes to screw around with spaces and lines. >:P
That's probably because of the different formatting styles for the code in Odamex. It seriously needs to be standardized.
Quote
P.S.S. Is it possible to change your forum/wiki name?
The admins can change the forum name, but I'm not sure if it also updates the current wiki account or if it just creates a new account.

Offline Nes

  • Developer
  • Posts: 31
    • View Profile
Re: CVAR complete list in a wiki page - bonus automap patch
« Reply #2 on: July 27, 2007, 23:53:20 »
Still working on the wiki entry for client cvars. It's looking good so far and the result will help clarify the Odamex code much more than before.

As a result, I've created a new patch that has everything from the above patch plus:

- am_classicmapstring now actually emulates classic map string color (red). (client\src\am_map.cpp) (nes04v3)
- Remove all unused and duplicate external client CVARs. (client\src\cl_ctf.cpp, client\src\cl_main.cpp, client\src\m_options.cpp, client\src\st_stuff.cpp, client\sdl\hardware.cpp, client\src\p_interaction.h, client\src\m_misc.cpp, client\src\p_tick.cpp, client\src\r_main.cpp, client\src\r_sky.cpp, client\src\wi_stuff.cpp) (nes04v3)
- Comment out all currently unused client CVARs. (i_remapkeypad, use_mouse, use_joystick, joy_speedmultiplier, joy_xsensitivity, joy_ysensitivity, joy_xthreshold, joy_ythreshold, teamplay) (client\sdl\i_input.cpp, client\src\doomstat.h) (nes04v3)
- itemsrespawn can now work in local non-deathmatch games. (client\src\p_mobj.cpp) (nes04v3)
- The tint you get from carrying the flag now glows for maximum noticability. (client\src\cl_ctf.cpp) (nes04v3)
- show_messages now affects revealsecret messages. (client\src\c_console.cpp) (nes04v3)

These are pretty little things (well, you'll notice the tint change), though the giant multi-file part really cleans up some of the clutter.

I've also noticed some things about CVARs that's trivial but unclean, such as external CVARs being used in both header files and code files that include the same header files.

denis, if you're reading this, I'm sorry that I didn't break up this patch. I have no idea how to break up multiple multi-file edits of a single file. The best I can do is list it on the changelog above.

Offline Nes

  • Developer
  • Posts: 31
    • View Profile
Re: CVAR complete list in a wiki page - bonus automap patch
« Reply #3 on: August 02, 2007, 14:52:49 »
I just thought of a way to break up the patches. I'll go ahead and try that.

Also, I finished the client cvars, but should I dump all of them on one page? Or is that too big for a wiki page?

Offline Nes

  • Developer
  • Posts: 31
    • View Profile
Re: CVAR complete list in a wiki page - bonus automap patch
« Reply #4 on: August 03, 2007, 12:52:00 »
Split up the patches to make it easier to commit. Also completed a few edits such as making the full overlay less annoying and a working 2-team CTF hud. (though it also shows up during 3-team CTF matches)