Duke4.net Forums: definegamefuncname bug report - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

definegamefuncname bug report

User is online   Danukem 

  • Duke Plus Developer

#1

I tried this:

definegamefuncname 17 GAME_TIPS

And then whenever I pressed the key for that function, the key does not work and I get this error in the log:

Error: "gamefunc_Aim_Up" is not a valid command or cvar


This happens regardless of whether I put the _ in the function name.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #2

I've had the same thing happen when defining nightvision as Sunglasses.
0

User is offline   TerminX 

  • el fundador

  #3

It's because your keyboard configuration and binds were generated before you changed the function name. This is actually a feature, not a bug... definegamefuncname alters the names used to generate the console function names before they are generated, so that anyone binding them from the console can bind them by the names set up in the CONs instead of by whatever the original game function was.

So, you just need to rebind that key from the menu and you should be fine. Obviously, only mod developers will ever run into this issue so it's not really something I'm looking to "fix."
0

User is online   Danukem 

  • Duke Plus Developer

#4

View PostTX, on Sep 18 2009, 04:57 PM, said:

It's because your keyboard configuration and binds were generated before you changed the function name. This is actually a feature, not a bug... definegamefuncname alters the names used to generate the console function names before they are generated, so that anyone binding them from the console can bind them by the names set up in the CONs instead of by whatever the original game function was.

So, you just need to rebind that key from the menu and you should be fine. Obviously, only mod developers will ever run into this issue so it's not really something I'm looking to "fix."


So, thanks to this "feature", when someone installs and starts my TC, the game will tell them to press the HOME key to access the help menu, but pressing that key won't actually do anything unless they first go into the keyboard setup and bind it (even though it is already listed in the menu as being bound to that key).
0

User is offline   TerminX 

  • el fundador

  #5

Only if they already have a keyboard configuration from regular Duke set up. Make sure you're using setcfgname or whatever the hell I called it and you shouldn't have this problem at all.
0

User is online   Danukem 

  • Duke Plus Developer

#6

View PostTX, on Sep 18 2009, 05:54 PM, said:

Make sure you're using setcfgname or whatever the hell I called it and you shouldn't have this problem at all.


That fixed it, thanks.

Just one more thing, though. If you start the game with a fresh install, where there are no cfgs in the directory, it will still say something like, "wgr2.cfg cannot be found. Do you want to import settings from eduke32.cfg?" In this case wgr2.cfg should automatically be given the default values without any user input. Some people might freak out or get confused when they are asked this question upon installing a new game.
0

User is offline   TerminX 

  • el fundador

  #7

Are you sure? The code in question to display that dialog checks for the existence of the file you're prompted for before displaying it. First, it checks whether the requested cfg name exists (wgr2.cfg in this case) and loads it. If not, it checks if eduke32.cfg is present and asks to create wgr2.cfg based on eduke32.cfg. If eduke32.cfg isn't present either, it does the same thing but with duke3d.cfg instead.
0

User is online   Danukem 

  • Duke Plus Developer

#8

View PostTX, on Sep 18 2009, 08:16 PM, said:

Are you sure? The code in question to display that dialog checks for the existence of the file you're prompted for before displaying it. First, it checks whether the requested cfg name exists (wgr2.cfg in this case) and loads it. If not, it checks if eduke32.cfg is present and asks to create wgr2.cfg based on eduke32.cfg. If eduke32.cfg isn't present either, it does the same thing but with duke3d.cfg instead.


Yes, I'm sure. Maybe eduke32.cfg gets created before that code runs?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options