BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Latest topics
» Error Injecting Drool Links Saliva Mod Menu
Execute String Value (VSTR) Empty10/18/2024, 2:58 am by SnB@BWH

» USB Gecko problems with some games
Execute String Value (VSTR) Empty10/16/2024, 1:59 pm by Reclaimer Shawn

» JMaster Duel Bot: A Yu-Gi-Oh! Master Duel Bot and Trainer for Steam
Execute String Value (VSTR) Empty10/11/2024, 2:21 pm by z1379228

» Metal Gear Solid V The Phantom Pain X Flashpoint Batman Gameplay unedited [Seth@WiiPlaza]
Execute String Value (VSTR) Empty9/23/2024, 12:48 pm by Seth@WiiPlaza

» Dropped Out of College to Pursue Web Dev and Life Pursuits in General
Execute String Value (VSTR) Empty8/9/2024, 7:09 am by SnB@BWH

» Lego Stars Wars: The Complete Saga [RLGE64]
Execute String Value (VSTR) Empty8/1/2024, 2:04 am by Whatever_1240

» ASM <> Gecko Code Converter
Execute String Value (VSTR) Empty7/29/2024, 11:15 am by Mac11ngAround

» German With a Jackhammer
Execute String Value (VSTR) Empty7/28/2024, 3:42 pm by SnB@BWH

» Wii RAM Hacking: Pointers and ASM
Execute String Value (VSTR) Empty7/23/2024, 1:54 pm by Mac11ngAround

» IBM AIX Assembler Programming Reference - Useful For PPC ASM
Execute String Value (VSTR) Empty7/21/2024, 5:00 pm by Mac11ngAround

Search
 
 

Display results as :
 


Rechercher Advanced Search

November 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

Execute String Value (VSTR)

Go down  Message [Page 1 of 1]

1Execute String Value (VSTR) Empty Execute String Value (VSTR) 10/30/2014, 11:01 am

Bully@WiiPlaza

Bully@WiiPlaza
 
 

The
Code:
vstr
command executes the String value of a dvar as a command. If the dvar already exists, its value will be overwritten otherwise a new dvar will be created.

Code:
twistbind WII_C "vstr toggleInfiniteAmmo"
set toggleInfiniteAmmo "toggle player_sustainammo"

This twistbinds the Nunchuk Nunchuk C button to executing the String value of "toggleInfiniteAmmo" which is "toggle player_sustainammo".

Note that the following does the same thing:

Code:
twistbind WII_C "toggle player_sustainammo"

So why do we even need vstr?
It can be used to store and reuse certain commands or for toggling controls.

A "complex" example:
Code:
twistbind WII_A "vstr aButton"
twistbind WII_MINUS "vstr minusButton"
twistbind WII_PLUS "vstr toggleControls"

set aButton "noclip"
set minusButton "god"

set toggleControls "vstr controlsTwo"
set controlsTwo "set aButton notarget;set minusButton toggle timescale 1 2 0.2;set toggleControls vstr controlsOne"
set controlsOne "set aButton noclip;set minusButton god;set toggleControls vstr controlsTwo"

By default, twisting the Wii Remote and pressing Wii Remote A toggles noclip. Twisting and pressing Wii Remote MINUS toggles god mode. Why? The new dvars aButton and minusButton are set to the "noclip" and "god" commands.

What happens though if we twist the Wii Remote and press Wii Remote PLUS? The value of "toggleControls" is executed. That again executes "controlsTwo" which sets the "aButton" dvar to "notarget", "minusButton" dvar to "toggle timescale 1 2 0.2" and  the "toggleControls" dvar to execute "controlsOne".

Now if we twist the Wii Remote again and press Wii Remote A  it will toggle notarget. Wii Remote MINUS will toggle the game speed through 3 different values.

When we twist the Wii Remote and press Wii Remote PLUS  a 2nd time it will now execute the value of "controlsOne" which is sets the "aButton", "minusButton" and "toggleControls" dvar to their original values again.

Therefore, what this construct using vstr allowed us to do was making toggleable controls instead of being fixed to a certain command or sequence of commands. Cool

I hope you learned something. Post if you have any questions about this.

Sources:
http://www.cfgmodding.com/tutorials/introtovstr.php
http://www.cfgmodding.com/tutorials/advancedvstr.php



Last edited by Bully@WiiPlaza on 10/31/2014, 12:27 am; edited 1 time in total

2Execute String Value (VSTR) Empty Re: Execute String Value (VSTR) 10/31/2014, 12:26 am

Bully@WiiPlaza

Bully@WiiPlaza
 
 

Bump, tutorial now written

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum