Sign in to follow this  
Overflow

Varp Explorer

Recommended Posts

Overflow   

Varp Explorer

 

This is a developer utility for exploring the varp array within the RT6 client

 

Screenshot

[Spoiler]

 

ca26d84409.png

 

[/Spoiler]

 

Features

  1. The left hand panel is to filter the events based on varp indicies add and remove the ids with the buttons below, if empty it will show them all.
  2. The right hand panel shows a tree with the filtered varp change events, sub nodes are the varpbit operations affected.
  3. The button in the bottom right hand corner toggles the pause on the listener meaning no new varp change events will be detected

Example

In the screenshot above the events where called when the interface lock button was pressed. This would suggest the bit at index 1, of the varp at index 3814 in the varp array changes to a 1 when the interfaces are locked

 

So where 3814 is the index 1 is the lower bit bound and 0x1 is the mask

    public final boolean isInterfaceLocked() {
        return ((ctx.varpbits.varpbit(3814) >> 1) & 0x1) == 1;
    }

Share this post


Link to post


Explicit   

So what is a Varp?

Player variables, little pieces of data stored in an array where each index represents some characteristic about your player (quest stage, if your special attack is queued, etc.).

Share this post


Link to post

So what is a Varp?

I'd appreciate a technical explanation of varpbits, too. So far I only know that specific values of specific bits mean something, but I have no idea what the lower/upper bound do/mean and the mask. Could you give an example, too?

 

 

Edited by Flamezors

Share this post


Link to post
Overflow   

 

I'd appreciate a technical explanation of varpbits, too. So far I only know that specific values of specific bits mean something, but I have no idea what the lower/upper bound do/mean and the mask. Could you give an example, too?

 

 

 

 

Varps are an integer array located within the client in which settings are stored for things that represent something locally for your player such as whether a lodestone has been activated or not.

 

Some such as lodestones only have a small number of cases, ie activated or not in which case it aren't worth assigning its own variable at an index in the client. We can then use different bits within the integers to store multiple different things. The upper and lower bounds pertain to the bits within the integer that are valid for this setting.

 

So in the example I posted above interfaces being locked can have two different states on or off. This can be stored in 1 bit with 0 meaning off or 1 meaning on. The upper and lower bound are the range of bits within the integer that correspond to this individual setting, both the upper and lower bounds are 1 so only the bit at index 1 is relevant. To get this we need to shift it 1 to the right and then do and and operation by the mask. The operations on a bitwise level are shown below

 

ba1acfa18a.png

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this