Tool for Obtaining Quest Varps

Archive of any gathered authentic information
Post Reply
User avatar
Ceikry
Site Admin
Posts: 663
Joined: Wed Aug 10, 2022 11:48 pm
Location: Draynor Village
Has thanked: 88 times
Been thanked: 135 times

Tool for Obtaining Quest Varps

Post by Ceikry »

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

Code: Select all

./get-varp.sh 97
Where 97 is the ID of the button for the quest in the quest list.

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 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:

Code: Select all

class ExampleQuest : Quest(NAME, 98, 97, 1, 165, 0, 1, 29)
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)
Nerds
User avatar
ChocolatePancakes
Froob
Posts: 31
Joined: Sun May 21, 2023 10:20 pm
Location: yes
Has thanked: 1 time
Been thanked: 7 times

-

Post by ChocolatePancakes »

^-^
Last edited by ChocolatePancakes on Tue Jun 13, 2023 8:20 pm, edited 3 times in total.
User avatar
Ceikry
Site Admin
Posts: 663
Joined: Wed Aug 10, 2022 11:48 pm
Location: Draynor Village
Has thanked: 88 times
Been thanked: 135 times

Re: CEEEEEEEEEEEEEEEEEEEEEEEEEEEEEIIIIIIIIIKKKKKRYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

Post by Ceikry »

ChocolatePancakes wrote: Mon Jun 12, 2023 4:05 pm Halapeño!

Im adding quest, create an quest journal for 85 button, after that I wanted to check it in-game and i see only inauthentic interface wtf

Image

what your tool creates
i add 86,85,3,604,0,1,4

Image
You're doing something incorrect with your Quest file. Fix it, instead of blaming something unrelated.
Nerds
User avatar
ChocolatePancakes
Froob
Posts: 31
Joined: Sun May 21, 2023 10:20 pm
Location: yes
Has thanked: 1 time
Been thanked: 7 times

Re: Tool for Obtaining Quest Varps

Post by ChocolatePancakes »

FINE

thanks for help
User avatar
ChocolatePancakes
Froob
Posts: 31
Joined: Sun May 21, 2023 10:20 pm
Location: yes
Has thanked: 1 time
Been thanked: 7 times

Tool for Obtaining Quest Varps

Post by ChocolatePancakes »

Summer wrote: Mon Jun 12, 2023 4:43 pm Should've posted this in the support section instead of making this thread ugly with comments. You can delete my comment if you want to clean this post up.
Image

just forgot to init
humph
Post Reply