therfiles Posted October 29, 2012 Posted October 29, 2012 Alright guys. Sorry to bother you all again with another CVAR question, but it's quite urgent. So me and afiNity are hard at work at JKAHP. AfiNity, with the help of Eez, stumbles upon a limit of menus the game can have. 64. The mod we are hard at work making is a role playing game. Cvars are extremely important. Example: one cvar may tell the game what spell the player is casting, another tells the game if the player has the item or not. But it's not that that worries me. There is currently no way other than menus for the game to execute and set cvars/console commands. There is no line in Icarus that lets the user set a console command or change the value of a cvar. There is nothing that lets us do this in GTK. So our only option is using menus, menus that change the desired cvar and/or change the console command and close, causing little to none disturbance to the game. There is a way in Icarus that lets us add more menus, so, it looked like we had a solution. But, alas, no. With only 64 menus, we will quickly run out of menus to use, we will need one for each conversation, each item, each encounter. Does anyone know if there is anyway to set the cvars/commands or if the 64 menu limit is not true? Thanks guys for helping. afi likes this
mrwonko Posted October 29, 2012 Posted October 29, 2012 Cvars are extremely important. Example: one cvar may tell the game what spell the player is casting, another tells the game if the player has the item or not. But it's not that that worries me. There is currently no way other than menus for the game to execute and set cvars/console commands. There is no line in Icarus that lets the user set a console command or change the value of a cvar.I've had a brief look at the source. g_ICARUScb.c is of interest - cb = callback, the file contains the vm-specific icarus parts. Don't you think you could modify the Q3_Set and Q3_GetFloat/Q3_GetString functions in there to allow the set()/get() commands in ICARUS to access cvars? e.g. treat everything with a cvar_ prefix as a cvar. therfiles likes this
therfiles Posted October 29, 2012 Author Posted October 29, 2012 Hmmm...would something like that be possible in SP, though? Any modifying of the Behaved source?
mrwonko Posted October 30, 2012 Posted October 30, 2012 Hmmm...would something like that be possible in SP, though? Any modifying of the Behaved source?Hmm... if cvar setting is done via trap call, and SP works like MP, it might be possible to have a proxy DLL that forwards most calls to the original jagamex86.dll, except for those you'd like to change. That's pretty advanced stuff... I'll take a look at that, I'm intrigued. therfiles likes this
therfiles Posted October 30, 2012 Author Posted October 30, 2012 Hmm... if cvar setting is done via trap call, and SP works like MP, it might be possible to have a proxy DLL that forwards most calls to the original jagamex86.dll, except for those you'd like to change. That's pretty advanced stuff... I'll take a look at that, I'm intrigued. Thanks so much! Any help is greatly appreciated!
mrwonko Posted November 21, 2012 Posted November 21, 2012 Sorry, I kinda forgot to report my findings here. In SP all the ICARUS stuff is in the DLL - there's no way for a Proxy DLL to modify anything of that. So not possible via scripting, sorry.
therfiles Posted November 21, 2012 Author Posted November 21, 2012 Awww...to bad. Thanks for the extended time and research on your behalf, though!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now