Tool for Obtaining Quest Varps
Posted: Sun Aug 21, 2022 2:55 pm
I made a very small and very simple tool that accepts the button ID of an entry in the quest log, and then spits back out the decompiled CS2 relating to that button ID that informs what Varp/Varpbit the CS2 checks in regards to the quest. This information is necessary to make the quest turn the correct color in the quest log, and aids in finding other var{p,bit}s related to the quest.
Don't know what a varp/varbit is? I explain it all in my blogpost here.
The tool consists of a simple shell script that just runs the included jar with the passed button ID as the sole argument. It's not foolproof, it's not idiot-proof, I don't care for it to be.
You can get a copy of the tool here.
Use it like Where 97 is the ID of the button for the quest in the quest list.
It will produce output like
This is decompiled CS2 script, which is the language that J uses to make the client do certain tasks, like turning quests in the quest list yellow or green.
This sample output shows that the VARP being checked for the quest whose button ID is 97, is varp 165. It is checking if the value of the varp is above 28, and returning the complete value (2) if it is.
I can get into a whole rant about how our quest system isn't exactly correct in how it decides to update the varps, but nonetheless this method will help you find the information you need to make a quest work correctly.
In the constructor for a quest, you would use this information like this:
97 is the button ID. Index, the value passed before the button ID, is always 1 higher than the button ID. It's dumb, I know. Then the next argument is the # of quest points rewarded. The last 4 are the values we get from this tool. Varp 165, unstarted is 0, in progress is 1, completion is 29 (because the script is checking if value > 28)
Don't know what a varp/varbit is? I explain it all in my blogpost here.
The tool consists of a simple shell script that just runs the included jar with the passed button ID as the sole argument. It's not foolproof, it's not idiot-proof, I don't care for it to be.
You can get a copy of the tool here.
Use it like
Code: Select all
./get-varp.sh 97
It will produce output like
Code: Select all
if (VARP[165] > 28) return 2; if (VARP[165] == 0) return 0; return 1; }; if (arg0 == 66)
This sample output shows that the VARP being checked for the quest whose button ID is 97, is varp 165. It is checking if the value of the varp is above 28, and returning the complete value (2) if it is.
I can get into a whole rant about how our quest system isn't exactly correct in how it decides to update the varps, but nonetheless this method will help you find the information you need to make a quest work correctly.
In the constructor for a quest, you would use this information like this:
Code: Select all
class ExampleQuest : Quest(NAME, 98, 97, 1, 165, 0, 1, 29)