Author Topic: Config questoin  (Read 6114 times)

Offline VaeVictis

  • i was -1 because you fucking suck
  • Brobdingnagian Member
  • *
  • Posts: 4498
    • View Profile
  • Rated:
Config questoin
« on: January 08, 2011, 07:31:33 PM »
can i store key assignments as a variable? like....

alias rox e

then use it later like

bind rox "use rocket launcher"

??

idk about the syntax exactly... but if something like that was possible, it could help me make more complex tdm scripts with more freedom to change so i could hand them out to people easier
« Last Edit: January 08, 2011, 08:54:56 PM by VaeVictis »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline |iR|Focalor

  • Irrepressibly Profuse Member
  • *
  • Posts: 15739
  • Help Destroy America: VOTE DEMOCRAT
    • View Profile
    • Focalor's Horrible Website: We Rape You Til The Room Stinks
  • Rated:
Re: Config questoin
« Reply #1 on: January 08, 2011, 08:29:13 PM »
Bind e "use rocket launcher" doesn't get the job done? :???: This is like trying to scratch your butthole with your elbow when you already have an Acme brand butthole scratching glove on your right hand. Maybe you should explain a little more as to what you're trying to do. Looks very unnecessary.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline VaeVictis

  • i was -1 because you fucking suck
  • Brobdingnagian Member
  • *
  • Posts: 4498
    • View Profile
  • Rated:
Re: Config questoin
« Reply #2 on: January 08, 2011, 08:57:52 PM »
Bind e "use rocket launcher" doesn't get the job done? :???: This is like trying to scratch your butthole with your elbow when you already have an Acme brand butthole scratching glove on your right hand. Maybe you should explain a little more as to what you're trying to do. Looks very unnecessary.

well im talking a tdm config where it might have binds multiple times in the same alias and going through like 20 lines of config to make sure you change every single bind embedded in the aliases seems kinda shitty...

if i could just create a value for that, i could put the value in all those lines, and then separate the lines setting those values b4 or after in the config file to make them easy to change :)

same as using a zoom script, you CAN just set it to go to a certain fov and sens and stuff inside the alias, but you can also separate those values out to make them easier to modify
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline funk_munkey

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • Rated:
Re: Config questoin
« Reply #3 on: January 08, 2011, 09:11:24 PM »
Yes, you can use custom variables to store numeric values, like the FOV and sensitivity examples.  But, I seriously doubt you can use variables to reference bindable keystrokes; you're getting into asking the Quake scripting language to become a full fledged programming language that understands all kinds of different data types. 

I'm guessing the best you could do would be to use something like

bind CUSTOMROCKETKEY "use rocket launcher"

or whatever.  Then tell people to use their text editor's "Find and replace" function to specify all the necessary keys.  If your scripts really are that complicated, I guess that could help you distribute them to people.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline |iR|Focalor

  • Irrepressibly Profuse Member
  • *
  • Posts: 15739
  • Help Destroy America: VOTE DEMOCRAT
    • View Profile
    • Focalor's Horrible Website: We Rape You Til The Room Stinks
  • Rated:
Re: Config questoin
« Reply #4 on: January 08, 2011, 09:19:42 PM »
I'm still not 100% sure what exactly you're trying to do. At first I was going to suggest you try using several small additional config files to exec several commands all at once, but I don't think that's going to accomplish what I think (I think I think that I think I know anyway) you're shooting for because what you're probably trying to do would involve resetting binds if one weapon is searched for an not found. If you were to hit the bind to exec that one config and it couldn't find any of the weapons refereced, it would get a little confusing as to how to make that same config reset that key to whatever it is supposed to be afterwards. Or something? Fuck. I'm not sure I even know what the fuck I mean anymore.

Bottom line is that all a client can do is use "alias" and "bind" commands. Sounds like you're trying to create a 3rd process which would involve modifying the client to accept that input.
« Last Edit: January 08, 2011, 09:22:32 PM by |iR|Focalor »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline VaeVictis

  • i was -1 because you fucking suck
  • Brobdingnagian Member
  • *
  • Posts: 4498
    • View Profile
  • Rated:
Re: Config questoin
« Reply #5 on: January 08, 2011, 09:23:54 PM »
hm... well ive been really impressed with what the engine can do :) and it does work a hell of a lot like bash stuff im finding out while i learn more and more shell stuff :P

i figure SOME ONE would have a definite no or yes answer... i believe the engine could be capable of doing it, whether its implemented or not though idk :( gonna need some one who has done a lot of work with q2 engine code to answer this one with a definite yes or no answer....

and yeah using a replaceable string people could find and replace would be convenient for the first time setting the client up... HOWEVER what if they wanted to change a bind? cant really do a find/replace with the letter E inside a config xD

its this kinda thing that made me rewrite my zoom script (which i never use lol) because if i ever accidentally hit it... it would drop me back to my OLD fov instead of my current one, and drop me back to my OLD sens instead of my current one... so i created a new value for zoomsens and a new value for zoomfov which were seperate out of the aliases, you could set those easily without fussing with the script... and inside the script it would store the current fov and sens use the values i created, then when the button was released change fov and sens back to the stored values....

so with making things a tiny bit more complex, it makes things much easier to change around and manage in the end because i dont have to fuss with the script, i just change my values around which have their own dedicated line in my config... so being able to set a string to represent a key stroke would be soooo helpful with big aliases that involve binding key strokes

@foc i dont believe that executing different small configs for each bind would work out so well in the middle of an alias... and it would kind of defeat the purpose of trying to simplify things
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline |iR|Focalor

  • Irrepressibly Profuse Member
  • *
  • Posts: 15739
  • Help Destroy America: VOTE DEMOCRAT
    • View Profile
    • Focalor's Horrible Website: We Rape You Til The Room Stinks
  • Rated:
Re: Config questoin
« Reply #6 on: January 08, 2011, 09:35:33 PM »
@foc i dont believe that executing different small configs for each bind would work out so well in the middle of an alias... and it would kind of defeat the purpose of trying to simplify things

As I said, all a client can accept is "alias" and "bind". I think what you're trying to do is reverse engineer aliases or something. Either way you're going to have to fully script it out somewhere along the process. But for distribution to others, putting a series of aliases and binds in one little mini config and then binding a key to exec that config or a chain of configs would probably be a lot less confusing for others. Then all they'd have to change in their own config would be:

bind e "use rocket launcher"
to
bind e "exec crazyshit.cfg"

If you go telling some people to add this or that to an existing config, inevitably someone somewhere will screw something else up and then have to waste half a decade trying to root it out and correct it. Probably better to do the hard work FOR them and let them have to only change one little line at a time.
« Last Edit: January 08, 2011, 09:38:20 PM by |iR|Focalor »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline VaeVictis

  • i was -1 because you fucking suck
  • Brobdingnagian Member
  • *
  • Posts: 4498
    • View Profile
  • Rated:
Re: Config questoin
« Reply #7 on: January 08, 2011, 10:10:09 PM »
well... its kinda annoying because if some one needs a team config, if they ask me, i have to take my team config, go through it line by line, and set it all up for their binds :/

it would be so much easier to leave ALL the aliasing and shit seperate... and just have a group of like 5-10 lines thats just setting binds, because it doesnt take a genius to figure out how to set one simple bind, but it does take some time to read through some one elses aliases and simple scripts to figure out how exactly they work and what you need to change
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Er!c@

  • Swanky Member
  • *****
  • Posts: 627
  • “Hell is empty and all the devils are here.”
    • View Profile
  • Rated:
Re: Config questoin
« Reply #8 on: January 08, 2011, 10:14:20 PM »
question*
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
"<[2d> i am considering suiciding dont worry" <br><br>

"<@Killo> damn so ericas right
<@Misery> she always is"

Offline VaeVictis

  • i was -1 because you fucking suck
  • Brobdingnagian Member
  • *
  • Posts: 4498
    • View Profile
  • Rated:
Re: Config questoin
« Reply #9 on: January 09, 2011, 12:40:24 AM »
question*

doesnt matter, you could still read it, so stfu :)
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline fdrjk

  • Brobdingnagian Member
  • ***
  • Posts: 4996
  • gotta be above it
    • View Profile
  • Rated:
Re: Config questoin
« Reply #10 on: January 09, 2011, 09:06:51 AM »
umad
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline quadz

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5352
    • View Profile
  • Rated:
Re: Config questoin
« Reply #11 on: January 09, 2011, 01:22:36 PM »
it would be so much easier to leave ALL the aliasing and shit seperate... and just have a group of like 5-10 lines thats just setting binds, because it doesnt take a genius to figure out how to set one simple bind, but it does take some time to read through some one elses aliases and simple scripts to figure out how exactly they work and what you need to change

In my brief forray into team play in late 1998, I created some configs with a similar DRY motivation.

NOTE: Some of what these binds were doing was compensating for what would now be done with $LOC capability in modern Q2 clients.

So the binds themselves are pretty useless, but they provide some level of examples of dynamic rebinding:

Code: [Select]
// teamcore.cfg

echo "...compiling teamcore"

bind 7 "drop rocket launcher; drop rockets;        say_team [] dropped rocket launcher; wave 1"
bind 8 "drop railgun; drop slugs;                  say_team [] dropped railgun; wave 1"
bind 9 "drop super shotgun; drop shells;           say_team [] dropped super shotgun; wave 1"
bind 0 "drop chaingun; drop bullets; drop bullets; say_team [] dropped chaingun; wave 1"

set tstr_Subj_Self      "[‹‹‹] temporarily holding at"
set tstr_Subj_SelfTo    "[] on my way to"
set tstr_Subj_Enemy     "[ƒƒƒ] enemy at"
set tstr_Subj_Respawn   "[‹‹‹]"
set tstr_Subj_XWeap     "[‹‹‹] I have an extra"
// [] is brown bar chars

set tstr_UpDn           ""
alias tset_UpDn_Upper   "set tstr_UpDn upper"
alias tset_UpDn_Lower   "set tstr_UpDn lower"
alias tset_UpDn_None    "set tstr_UpDn the"
tset_UpDn_None

set tstr_Respawn_Secs   "15"

alias tsay_SelfTo_BFG   "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_BFG area; tset_UpDn_None"
alias tsay_SelfTo_Blaster "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_Blaster area; tset_UpDn_None"
alias tsay_SelfTo_SG    "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_SG area; tset_UpDn_None"
alias tsay_SelfTo_SSG   "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_SSG area; tset_UpDn_None"
alias tsay_SelfTo_MG    "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_MG area; tset_UpDn_None"
alias tsay_SelfTo_CG    "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_CG area; tset_UpDn_None"
alias tsay_SelfTo_GL    "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_GL area; tset_UpDn_None"
alias tsay_SelfTo_RL    "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_RL area; tset_UpDn_None"
alias tsay_SelfTo_HB    "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_HB area; tset_UpDn_None"
alias tsay_SelfTo_Rail  "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_Rail area; tset_UpDn_None"
alias tsay_SelfTo_Quad  "say_team $tstr_Subj_SelfTo $tstr_UpDn $tstr_Area_Quad; tset_UpDn_None"
alias tset_tsay_SelfTo  "exec teamselfto.cfg"
alias tset_tsay_Default "tset_tsay_SelfTo"
echo "...loading default binds"
tset_tsay_Default
echo "...continuing teamcore"

alias tsay_Self_BFG     "say_team $tstr_Subj_Self $tstr_UpDn $tstr_Area_BFG area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Self_Blaster "say_team $tstr_Subj_Self $tstr_UpDn $tstr_Area_Blaster area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Self_SG      "say_team $tstr_Subj_Self $tstr_UpDn $tstr_Area_SG area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Self_SSG     "say_team $tstr_Subj_Self $tstr_UpDn $tstr_Area_SSG area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Self_MG      "say_team $tstr_Subj_Self $tstr_UpDn $tstr_Area_MG area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Self_CG      "say_team $tstr_Subj_Self $tstr_UpDn $tstr_Area_CG area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Self_GL      "say_team $tstr_Subj_Self $tstr_UpDn $tstr_Area_GL area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Self_RL      "say_team $tstr_Subj_Self $tstr_UpDn $tstr_Area_RL area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Self_HB      "say_team $tstr_Subj_Self $tstr_UpDn $tstr_Area_HB area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Self_Rail    "say_team $tstr_Subj_Self $tstr_UpDn $tstr_Area_Rail area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Self_Quad    "say_team [‹‹‹] friendly $tstr_Area_Quad; tset_UpDn_None; tset_tsay_Default"
alias tset_tsay_Self    "exec teamself.cfg"

alias tsay_Enemy_BFG    "say_team $tstr_Subj_Enemy $tstr_UpDn $tstr_Area_BFG area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Enemy_Blaster "say_team $tstr_Subj_Enemy $tstr_UpDn $tstr_Area_Blaster area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Enemy_SG     "say_team $tstr_Subj_Enemy $tstr_UpDn $tstr_Area_SG area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Enemy_SSG    "say_team $tstr_Subj_Enemy $tstr_UpDn $tstr_Area_SSG area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Enemy_MG     "say_team $tstr_Subj_Enemy $tstr_UpDn $tstr_Area_MG area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Enemy_CG     "say_team $tstr_Subj_Enemy $tstr_UpDn $tstr_Area_CG area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Enemy_GL     "say_team $tstr_Subj_Enemy $tstr_UpDn $tstr_Area_GL area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Enemy_RL     "say_team $tstr_Subj_Enemy $tstr_UpDn $tstr_Area_RL area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Enemy_HB     "say_team $tstr_Subj_Enemy $tstr_UpDn $tstr_Area_HB area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Enemy_Rail   "say_team $tstr_Subj_Enemy $tstr_UpDn $tstr_Area_Rail area; tset_UpDn_None; tset_tsay_Default"
alias tsay_Enemy_Quad   "say_team [ƒƒƒ] enemy $tstr_Area_Quad; tset_UpDn_None; tset_tsay_Default"
alias tset_tsay_Enemy   "exec teamenemy.cfg"

alias tsay_Respawn_BFG  "say_team $tstr_Subj_Respawn $tstr_UpDn bfg respawns in $tstr_Respawn_Secs sec...; tset_UpDn_None; tset_tsay_Default"
alias tsay_Respawn_Blaster "say_team $tstr_Subj_Respawn $tstr_UpDn blaster respawns in $tstr_Respawn_Secs sec... hahah; tset_UpDn_None; tset_tsay_Default"
alias tsay_Respawn_SG   "say_team $tstr_Subj_Respawn $tstr_UpDn sg respawns in $tstr_Respawn_Secs sec...; tset_UpDn_None; tset_tsay_Default"
alias tsay_Respawn_SSG  "say_team $tstr_Subj_Respawn $tstr_UpDn ssg respawns in $tstr_Respawn_Secs sec...; tset_UpDn_None; tset_tsay_Default"
alias tsay_Respawn_MG   "say_team $tstr_Subj_Respawn $tstr_UpDn machinegun respawns in $tstr_Respawn_Secs sec...; tset_UpDn_None; tset_tsay_Default"
alias tsay_Respawn_CG   "say_team $tstr_Subj_Respawn $tstr_UpDn chaingun respawns in $tstr_Respawn_Secs sec...; tset_UpDn_None; tset_tsay_Default"
alias tsay_Respawn_GL   "say_team $tstr_Subj_Respawn $tstr_UpDn gl respawns in $tstr_Respawn_Secs sec...; tset_UpDn_None; tset_tsay_Default"
alias tsay_Respawn_RL   "say_team $tstr_Subj_Respawn $tstr_UpDn rl respawns in $tstr_Respawn_Secs sec...; tset_UpDn_None; tset_tsay_Default"
alias tsay_Respawn_HB   "say_team $tstr_Subj_Respawn $tstr_UpDn hyper respawns in $tstr_Respawn_Secs sec...; tset_UpDn_None; tset_tsay_Default"
alias tsay_Respawn_Rail "say_team $tstr_Subj_Respawn $tstr_UpDn rail respawns in $tstr_Respawn_Secs sec...; tset_UpDn_None; tset_tsay_Default"
alias tsay_Respawn_Quad "say_team $tstr_Subj_Respawn $tstr_UpDn quad respawns in $tstr_Respawn_Secs sec...; tset_UpDn_None; tset_tsay_Default"
alias tset_tsay_Respawn "exec teamrespawn.cfg"

alias tsay_XWeap_BFG    "say_team $tstr_Subj_XWeap bfg          ; tset_UpDn_None; tset_tsay_Default"
alias tsay_XWeap_Blaster "say_team $tstr_Subj_XWeap blaster hahah; tset_UpDn_None; tset_tsay_Default"
alias tsay_XWeap_SG     "say_team $tstr_Subj_XWeap sg           ; tset_UpDn_None; tset_tsay_Default"
alias tsay_XWeap_SSG    "say_team $tstr_Subj_XWeap ssg          ; tset_UpDn_None; tset_tsay_Default"
alias tsay_XWeap_MG     "say_team $tstr_Subj_XWeap machinegun   ; tset_UpDn_None; tset_tsay_Default"
alias tsay_XWeap_CG     "say_team $tstr_Subj_XWeap chaingun     ; tset_UpDn_None; tset_tsay_Default"
alias tsay_XWeap_GL     "say_team $tstr_Subj_XWeap gl           ; tset_UpDn_None; tset_tsay_Default"
alias tsay_XWeap_RL     "say_team $tstr_Subj_XWeap rl           ; tset_UpDn_None; tset_tsay_Default"
alias tsay_XWeap_HB     "say_team $tstr_Subj_XWeap hyper        ; tset_UpDn_None; tset_tsay_Default"
alias tsay_XWeap_Rail   "say_team $tstr_Subj_XWeap rail         ; tset_UpDn_None; tset_tsay_Default"
alias tsay_XWeap_Quad   "say_team $tstr_Subj_XWeap weapon       ; tset_UpDn_None; tset_tsay_Default"
alias tset_tsay_XWeap   "exec teamxweap.cfg"


bind PGUP               tset_UpDn_Upper
bind PGDN               tset_UpDn_Lower

bind HOME               tset_tsay_Self
bind END                tset_tsay_Enemy
bind DEL                tset_tsay_XWeap
bind KP_DEL             tset_tsay_Respawn


// default areas (map unknown, so just weapons-based)
set tstr_Area_BFG       "bfg"
set tstr_Area_Blaster   "blaster"
set tstr_Area_SG        "shotgun"
set tstr_Area_SSG       "ssg"
set tstr_Area_MG        "machinegun"
set tstr_Area_CG        "chaingun"
set tstr_Area_GL        "grenade launcher"
set tstr_Area_RL        "rl"
set tstr_Area_HB        "hyper"
set tstr_Area_Rail      "rail"
set tstr_Area_Quad      "quad"


echo "...teamcore compiled."

Code: [Select]
// teamselfto.cfg

bind KP_INS             tsay_SelfTo_BFG
bind KP_END             tsay_SelfTo_Blaster
bind KP_DOWNARROW       tsay_SelfTo_SG
bind KP_PGDN            tsay_SelfTo_SSG
bind KP_LEFTARROW       tsay_SelfTo_MG
bind KP_5               tsay_SelfTo_CG
bind KP_RIGHTARROW      tsay_SelfTo_GL
bind KP_HOME            tsay_SelfTo_RL
bind KP_UPARROW         tsay_SelfTo_HB
bind KP_PGUP            tsay_SelfTo_Rail
bind *                  tsay_SelfTo_Quad

Code: [Select]
// teamself.cfg

bind KP_INS             tsay_Self_BFG
bind KP_END             tsay_Self_Blaster
bind KP_DOWNARROW       tsay_Self_SG
bind KP_PGDN            tsay_Self_SSG
bind KP_LEFTARROW       tsay_Self_MG
bind KP_5               tsay_Self_CG
bind KP_RIGHTARROW      tsay_Self_GL
bind KP_HOME            tsay_Self_RL
bind KP_UPARROW         tsay_Self_HB
bind KP_PGUP            tsay_Self_Rail
bind *                  tsay_Self_Quad

Code: [Select]
// teamenemy.cfg

bind KP_INS             tsay_Enemy_BFG
bind KP_END             tsay_Enemy_Blaster
bind KP_DOWNARROW       tsay_Enemy_SG
bind KP_PGDN            tsay_Enemy_SSG
bind KP_LEFTARROW       tsay_Enemy_MG
bind KP_5               tsay_Enemy_CG
bind KP_RIGHTARROW      tsay_Enemy_GL
bind KP_HOME            tsay_Enemy_RL
bind KP_UPARROW         tsay_Enemy_HB
bind KP_PGUP            tsay_Enemy_Rail
bind *                  tsay_Enemy_Quad

Code: [Select]
// teamrespawn.cfg

bind KP_INS             tsay_Respawn_BFG
bind KP_END             tsay_Respawn_Blaster
bind KP_DOWNARROW       tsay_Respawn_SG
bind KP_PGDN            tsay_Respawn_SSG
bind KP_LEFTARROW       tsay_Respawn_MG
bind KP_5               tsay_Respawn_CG
bind KP_RIGHTARROW      tsay_Respawn_GL
bind KP_HOME            tsay_Respawn_RL
bind KP_UPARROW         tsay_Respawn_HB
bind KP_PGUP            tsay_Respawn_Rail
bind *                  tsay_Respawn_Quad

Code: [Select]
// teamxweap.cfg

bind KP_INS             tsay_XWeap_BFG
bind KP_END             tsay_XWeap_Blaster
bind KP_DOWNARROW       tsay_XWeap_SG
bind KP_PGDN            tsay_XWeap_SSG
bind KP_LEFTARROW       tsay_XWeap_MG
bind KP_5               tsay_XWeap_CG
bind KP_RIGHTARROW      tsay_XWeap_GL
bind KP_HOME            tsay_XWeap_RL
bind KP_UPARROW         tsay_XWeap_HB
bind KP_PGUP            tsay_XWeap_Rail
bind *                  tsay_XWeap_Quad



  *  *  *

So that was the basic system, and then I had LOC data in a config file for each map, which would be exec'd at the start of the map, to customize the locations:

Code: [Select]
// teamdm1.cfg

// q2dm1 areas:
set tstr_Area_BFG       "bfg"
set tstr_Area_Blaster   "blaster"
set tstr_Area_SG        "shotgun"
set tstr_Area_SSG       "ssg/backway"
set tstr_Area_MG        "underground"
set tstr_Area_CG        "mega/armor"
set tstr_Area_GL        "lift/gl"
set tstr_Area_RL        "rl"
set tstr_Area_HB        "hyper/armor"
set tstr_Area_Rail      "rail/water"
set tstr_Area_Quad      "quad"

Obviously it was extremely limited, as it was based on weapon, however it did include the ability to specify "upper" or "lower" for each weapon dynamically.

Basically the thing worked by first hitting keys to configure the binding phrases, then hit a key on the keypad associated with the weapon to produce the compound phrase.

For example, if I wanted to say "I'm on my way to upper rl" it required these keys:

  HOME PGUP KP_7

"I'm on my way to lower rl" would be:

  HOME PGDN KP_7

"Enemy at railgun" would be:

  END KP_9

etc.


Kinda funky do-it-yourself LOC binds, but, anyway... it's an example of reasonably DRY dynamic bind configuration.


:dohdohdoh:

  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
"He knew all the tricks, dramatic irony, metaphor, bathos, puns, parody, litotes and... satire. He was vicious."

Offline randypants

  • Sr. Member
  • ****
  • Posts: 322
  • Damnit Bobby!
    • View Profile
  • Rated:
Re: Config questoin
« Reply #12 on: January 09, 2011, 01:30:44 PM »
Using an alias is pretty straight forward. Before the loc's became common place I used a series of aliases for location commands.

Alias 1 would be RL so anytime the alias rl was used it said Rocket launcher. That would be assigned to the "1" key. Then for example the "2" key might be "ENEMY". "3" key would be IM. "4" Key would be Available. So if you hit the 2,1 combination it would say Enemy at Rocket Launcher. The combination 4,1 would say Rocket Launcher Available and so on and so forth. If i recall the config was made by Mason (Nogame). It could very well still be online somewhere.

Offline VaeVictis

  • i was -1 because you fucking suck
  • Brobdingnagian Member
  • *
  • Posts: 4498
    • View Profile
  • Rated:
Re: Config questoin
« Reply #13 on: January 09, 2011, 02:00:40 PM »
:/ i already know how to make a team config... i have one toggle switch that changes all my weapon switch binds to drop binds and all my normal chat binds to team messages

the problem is doing that requires binds in the middle of aliases, and so if a key change is needed its a big pain in the ass to go through line by line and make sure i change everything

what i was asking, is if its possible to create a value to represent a key press... the engine understands stuff like E R F as key presses... so, can i make a value to represent a key press so i can change that value, like say i set a value ROX and i want it to represent the key press E so something like "set ROX e" and then when i go for my bind i can just "bind ROX use rocket launcher"
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline erik

  • Full Member
  • ***
  • Posts: 187
    • View Profile
  • Rated:
Re: Config questoin
« Reply #14 on: January 09, 2011, 02:40:28 PM »
So you want to set a value for rox, which means "rox" represents an action.  Instead of having to manually type out bind e use rocket launcher, you make an alias for that action.  Alias rox "use rocket launcher".  Bind e rox.  If you give your config to someone else, and they use the key "r" for rockets, all they could have to change is the bind key, so they would make it say bind "r" rox.  Seems pretty straight forward to me?


Alias rox "use rocket launcher"
bind e rox

alias vaeisawesome "use blaster"
bind  v vaeisawesome

When I took over a config, I only had to do minimal editing.  All the aliases were set, I just had to change the keys that they were bound to, which took all of a few minutes to update.  All I had to update was the stuff in bold.  Very easy.

alias drl "say_team Dropping RL @ [${$loc_here}]; drop rocket launcher; drop rockets"
alias url "use rocket launcher"
alias drg "say_team Dropping RAILGUN @ [${$loc_here}]; drop railgun; drop slugs"
alias urg "use railgun"
alias dcg "say_team Dropping CG @ [${$loc_here}]; drop chaingun; drop bullets"
alias ucg "use chaingun"
alias dssg "say_team Dropping SSG @ [${$loc_here}]; drop super shotgun; drop shells"
alias ussg "use super shotgun"
alias dhb "say_team Dropping HYPERBLASTER @ [${$loc_here}]; drop hyperblaster; drop cells"
alias uhb "use hyperblaster"
alias dgl "say_team Dropping GL @ [${$loc_here}]; drop grenade launcher; drop grenades"
alias ugl "use grenade launcher"
alias dmg "say_team Dropping MGUN @ [${$loc_here}]; drop machinegun; drop bullets"
alias umg "use machinegun"
alias dsg "say_team Dropping SHOTGUN @ [${$loc_here}]; drop shotgun; drop shells"
alias usg "use shotgun"
alias dns "say_team Dropping NADES @ [${$loc_here}]; drop grenades"
alias uns "use grenades"
alias droc "say_team Dropping ROCKETS @ [${$loc_here}]; drop rockets"
alias dslug "say_team Dropping SLUGS @ [${$loc_here}]; drop slugs"
alias dbul "say_team Dropping BULLETS @ [${$loc_here}]; drop bullets"
alias dshel "say_team Dropping SHELLS @ [${$loc_here}]; drop shells"
alias dcel "say_team Dropping CELLS @ [${$loc_here}]; drop cells"
alias dnad "say_team Dropping NADES @ [${$loc_here}]; drop grenades"

alias +dropweaps "bind q drl;bind r drg;bind f dcg;bind e dssg;bind c dhb;bind 4 dgl;bind 5 dmg;bind x dsg;bind g dns" 
alias -dropweaps "bind q url;bind r urg;bind f ucg;bind e ussg;bind c uhb;bind 4 ugl;bind 5 umg;bind x usg;bind g uns"
bind shift "+dropweaps"

alias +dropammo "bind q droc;bind r dslug;bind f dbul;bind e dshel;bind c dcel;bind g dnad" 
alias -dropammo "bind q url;bind r urg;bind f ucg;bind e ussg;bind c uhb;bind g uns"
bind alt "+dropammo"
« Last Edit: January 09, 2011, 02:49:33 PM by erik »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

 

El Box de Shoutamente

Last 10 Shouts:

 

RyU

September 03, 2024, 05:15:49 PM
And wow Derrick is still playing lol
 

RyU

September 03, 2024, 05:15:15 PM
Just know yesterday is gone and soon tomorrow will be gone too  :)
 

Lejionator

August 08, 2024, 07:28:01 PM
It's tiem to QuakeCon!!!  ;)

https://www.youtube.com/watch?v=ThQd_UJaTys
 

ImperiusDamian

July 26, 2024, 09:34:53 PM
In nomine Quake II et Id Software et Spiritus John Carmack, Amen.
 

QuakeDuke

July 26, 2024, 05:10:30 PM
Hey, shout, summertime blues
Jump up and down in you blue suede shoes
Hey, did you rock and roll? Rock on!!  ...QD
 

Yotematoi

July 24, 2024, 01:31:20 PM
Ayer me mato 5 veces para robarme en la vida real hará lo mismo? [img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid0wXU2VgS7atesBcSoMz5BWMJCJajeZFVT6GzSU6TtpJGddN9kLTvWNgcZaskkbKFQl&amp;show_text=true&amp;width=500
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid0wXU2VgS7atesBcSoMz5BWMJCJajeZFVT6GzSU6TtpJGddN9kLTvWNgcZaskkbKFQl&show_text=true&width=500" width="500"
 

Yotematoi

July 24, 2024, 01:25:59 PM
hi ya está la basura de Martin, se cambió el nombre es un ladron estupido, asi llegó a 10000[img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&amp;show_text
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&show_text
 

Yotematoi

July 24, 2024, 01:25:59 PM
hi ya está la basura de Martin, se cambió el nombre es un ladron estupido, asi llegó a 10000[img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&amp;show_text
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&show_text
 

-Unh0ly-

July 05, 2024, 05:20:36 AM

Show 50 latest
Welcome, Guest. Please login or register.
September 19, 2024, 10:55:10 PM

Login with username, password and session length