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.
Page 1 of 1
definegamefuncname bug report
#1 Posted 18 September 2009 - 10:24 AM
#2 Posted 18 September 2009 - 01:56 PM
I've had the same thing happen when defining nightvision as Sunglasses.
#3 Posted 18 September 2009 - 03:57 PM
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, 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."
#4 Posted 18 September 2009 - 04:07 PM
TX, 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, 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).
#5 Posted 18 September 2009 - 04:54 PM
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.
#6 Posted 18 September 2009 - 06:06 PM
TX, 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.
#7 Posted 18 September 2009 - 07:16 PM
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.
#8 Posted 19 September 2009 - 09:14 AM
TX, 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?
Share this topic:
Page 1 of 1