Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cfg conversion help

#1
hi xonotic people!

im trying to make my old wolfet config work in xonotic
which seems to have a more complex console language
but i think if i understood how 1 part would look translated
i should be able to do the other 10 pages myself quite easily
therefore i kindly request of anyone who has the knowledge
please explain how to get this result in a cfg for xonotic

it may seem complex but really the script is rather simple
it forces D [+moveright] to dominate A [+moveleft] so
if pressing both A and D i move right instead of stopping

Code:
SET RGO "+MOVERIGHT;-MOVELEFT"  //  defines go right
SET LGO "+MOVELEFT;-MOVERIGHT"  //  defines go left
SET DGO "-MOVELEFT;-MOVERIGHT"  //  defines dont go
SET L0R1 "VSTR RGO;SET LBP VSTR L1R1;SET RBR VSTR L0R0"
SET L1R1 "VSTR RGO;SET LBR VSTR L0R1;SET RBR VSTR L1R0"
SET L0R0 "VSTR DGO;SET LBP VSTR L1R0;SET RBP VSTR L0R1"
SET L1R0 "VSTR LGO;SET LBR VSTR L0R0;SET RBP VSTR L1R1"
VSTR L0R0  //  prepare for A and D to be pressed [LBP/RBP]
BIND A +VSTR LBP LBR  //  binds left button press/release
BIND D +VSTR RBP RBR  //  binds right button press/release

thanks for the help in advance!
Reply

#2
What's "vstr"? What about "+vstr"? What do the four arguments of "bind" represent?

From my understanding "vstr" expands a variable defined with "set" and executes its contents as a console command? If that is so, DarkPlaces has a mechanism of aliases that you might want to use.

Also guessing: if in "bind x +vstr foo bar" the "+vstr" is some sort of modifier to separately bind press / release events to foo and bar respectively, we also have that in Darkplaces: if you bind a key to a command whose name starts with the "+" character, on key release the same command with that "+" replaced to a "-" is executed.

So something like this?

Code:
alias RGO "+MOVERIGHT;-MOVELEFT"
// ...
alias L0R1 "RGO; alias +LB L1R1; alias -RB L0R0"
// ...
L0R0
BIND A +LB
BIND D +RB
Reply

#3
very helpful... thank you... it took me a few tries
but i got A and D to work just like they did in et

i think i should be able to conquer the remainder
but now i really regret not cleaning up this cfg
5 years ago thinking "ill never need to rewrite it"

cheers man and thanks again for the quick reply
youre cool so i may not go for headshots on you
Reply

#4
ok so i know i can use /cvarlist to see them all
but is there a list of... um... important cvars?
m_pitch is the same but i have many relics now

also i cant seem to find where /condump goes
that alone would save me heaps of time im sure
being able to turn the /cvarlist into a .cfg and
have the /cmdlist to learn in the same text file
Reply

#5
Condumps go into your personal data directory, same one where your config.cfg is. I'm guessing you already know where that is, but in case someone else sees this thread, you can find out the path by typing this into the console: which config.cfg

As for a list of important cvars, I'm afraid that depends on what you consider "important", so the simple answer would be no. However, you may find a better categorized (that is, not alphabetical!) list of cvars in the default configuration files. You won't need to turn the cvarlist into a cfg as they're already cfg files.

The default cfg files are in the xonotic-data pk3 file. PK3 files are actually zip files, so you can open them with any software that knows .zip. You can also browse the data directory (rather its source form) in our code repository at gitlab or on the xonotic git server.

Since you're an advanced user, I can tell you this: it all starts with quake.rc being executed when the engine starts. This in turn runs the default.cfg, which as it stands is just a proxy to execute defaultXonotic.cfg. This sets some default cvars and executes weapons.cfg, binds-default.cfg, and a bunch of other cfg files containing other defaults.

After going through default.cfg and all its children, quake.rc then executes config.cfg which is usually located in your personal data directory, and where your settings are written when you quit the game. It also follows with autoexec.cfg and autoexec/*.cfg which are files you can create in your personal data directory for advanced manual configuration. Indeed, config.cfg is a bad place to put your manual configs as it's often overwritten.

EDIT: Feel free to ask about cvars in this thread though, I'll be happy to help Wink



Unrelated, but I dig your line wrapping. Where does it come from?
Reply

#6
the path where i 1st put my custom cfg is
a subdirectory of the path to my game.exe
"C:\Users\me\Desktop\Xonotic\data"... but
i just found my config.cfg and condumps in
"C:\Users\me\Saved Games\xonotic\data"

is there a reason the 2nd "data" directory
was created outside the game directory?
and how to make it so the game will only
use "C:\Users\me\Desktop\Xonotic\data"?

i like being an advanced user considering
ive only ever played on my own local host
but i can get <20sec on leave_em_behind
with that script [no blaster] which is nice

the line wrapping and odd number of lines
is just a strange manifestation of my ocd
Reply

#7
Many games use an external directory for the user's data.
This is so updates or clean installs of the game don't delete all your files (note that keeping everything in the main game folder then running the update-to-release script will infact delete anything custom in the Xonotic folder).

Knowing that risk, if you still wish to not use the separate user data, you can create a .bat file in the Xonotic folder and add the following in it: xonotic -nohome
[Image: 230.png]
Reply

#8
i just moved my autoexec
that seemed to be smarter
thanks for all the info guys
Reply

#9
(01-27-2015, 07:38 PM)ETPlayer Wrote: the path where i 1st put my custom cfg is
a subdirectory of the path to my game.exe
"C:\Users\me\Desktop\Xonotic\data"... but
i just found my config.cfg and condumps in
"C:\Users\me\Saved Games\xonotic\data"

is there a reason the 2nd "data" directory
was created outside the game directory?
and how to make it so the game will only
use "C:\Users\me\Desktop\Xonotic\data"?

i like being an advanced user considering
ive only ever played on my own local host
but i can get <20sec on leave_em_behind
with that script [no blaster] which is nice

the line wrapping and odd number of lines
is just a strange manifestation of my ocd

reads like some postmodern poetry
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with game configuration. Andrii 7 10,355 02-18-2014, 03:39 PM
Last Post: kojn^
  Need help for cfg Shodan 18 14,281 10-20-2013, 01:31 PM
Last Post: Shodan
  toggle help.. _|'Ev|on 10 7,045 03-22-2013, 06:01 PM
Last Post: _|'Ev|on
  Config help K__ 3 5,662 05-01-2012, 11:56 AM
Last Post: asyyy
  Can anyone help me understand player model lod? W4RP1G 7 6,858 04-23-2012, 04:48 AM
Last Post: divVerent

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-