Tutorial HTML How To Cheat In VirtualDate Games

geriatre

Member
Aug 22, 2016
495
665
This works for HTML VDate games, most if not all of them.
It will allow you to avoid going doing the game several times to find out all the possibilities.

First you need a decent text editor that can do syntax highlighting (to make it easier to find what you want to edit and not make mistakes), I use Notepad++.
Second you need something to edit your browser cookies, I use Cookies Manager+ for Firefox. It will allow you to edit the game variables.

Normally to start the game you just click begin.html at the root of the game folder.
Now before you do that you need to edit the game files so the game doesn't start in a special window that prevents you from going backwards and opening new tabs to try different options.

To do this you need to edit the file _functions.js in the "game" folder. Remove the content between { and } of the following functions :
Code:
// Other disable back
function disallowNav()
{
}

// No back button
function undoBack()
{
}

// No menu
function blockContextMenu()
{
}

// Backup no back
function blockKeyPresses()
{
}
That's how this part of the file should look like once you removed the code.
After that you can edit begin.html to stop the game from opening in a new window, although this is not necessary, just more convenient: near the bottom of the file you replace the code for the Start button so it just goes to game/helloworld.html instead of opening a new window. For example in Academy 3 this is the line :
Code:
<p align="center"><a href="#" onclick="BEGINDATE()"><img src="game/buttonsetc/start.png" width="250" height="250" border="0" /></a></p>
your replace it by :
Code:
<p align="center"><a href="game/helloworld.html" ><img src="game/buttonsetc/start.png" width="250" height="250" border="0" /></a></p>
I don't know if it's the same for all VDate games but it's possible, at least for the more recent ones, so you can reuse that code.

Once this is done you are able to play the game in a normal browser where you can go back to your previous choices/pictures and open new tabs to try different paths from a fork in the story.

The cookies editor will allow you to change the values of the game like booleans ("did you pick up that suncream before going to the beach") or attraction meters like "annie_lust", "amy_lust", "jodie_lust" and others "inf", "report" ... in Academy 3

While playing the game you hover the images and dialog options to see if the next pages is a "check", if it a check you should right click the background of the current page, show the source code, scroll down near the bottom where the dialog options are, then click the relevant link to get you to the code of that "check" (like "barcheck1.html", "bathroomcheck1.html" ...).
The code of the check page will indicate what is the relevant variable and what value you need to have (e.g. lust > 59 or 9 < clock < 11). That's where the cookies editor comes in play, you edit the value with whatever you want, then go back to the game and click the dialog that leads to the check.


Using these things I was able to get most of the achievements in Academy 3 in just one playthrough, bypassing all the bad situations where I would be late for something, didn't have enough lust to get sex, etc.
 

ikaruga

Well-Known Member
Modder
Respected User
Donor
Aug 11, 2016
1,191
2,501
Here my trick
Just empty the disallowNav function on _function.js and add my function.
This function write on console each action avalaible. It helps to know what choice do you have, and even show if the choice will add or remove points
HTML:
// Allow to console all the events
function showActions()
{
 
    /* Areas */
    var Map = document.getElementById("Map");
    if (Map !== null)
    {
        var areas = Map.getElementsByTagName("area");
        var area = null;
        var title = null;
        var onClick = null;
        for (var i = 0; i < areas.length; i++)
        {
            if (areas.length > 0 && areas[i].getAttribute("onClick") != null)
            {
                console.log(areas[i].getAttribute("title"), areas[i].getAttribute("onClick"), areas[i].getAttribute("href"));
            }
            else
            {
                console.log(areas[i].getAttribute("title"), areas[i].getAttribute("href"));
            }
        }
    }
    /* links */
    var as = document.getElementsByTagName("a");
    for (var i = 0; i < as.length; i++)
    {
        if (as[i].getAttribute("href") != null && as[i].getAttribute("href") != "#")
        {
            if (as[i].getAttribute("onClick") != null)
            {
                console.log(as[i].innerHTML, as[i].getAttribute("onClick"), as[i].getAttribute("href"));
            }
            else
            {
                console.log(as[i].innerHTML, as[i].getAttribute("href"));
            }
        }
     
    }
    return;
}


// Other disable back

function disallowNav()

{

    showActions();

}
 

Eiffel

Newbie
Aug 5, 2016
21
89
Here my trick
Just empty the disallowNav function on _function.js and add my function.
This function write on console each action avalaible. It helps to know what choice do you have, and even show if the choice will add or remove points
HTML:
// Allow to console all the events
function showActions()
{
 
    /* Areas */
    var Map = document.getElementById("Map");
    if (Map !== null)
    {
        var areas = Map.getElementsByTagName("area");
        var area = null;
        var title = null;
        var onClick = null;
        for (var i = 0; i < areas.length; i++)
        {
            if (areas.length > 0 && areas[i].getAttribute("onClick") != null)
            {
                console.log(areas[i].getAttribute("title"), areas[i].getAttribute("onClick"), areas[i].getAttribute("href"));
            }
            else
            {
                console.log(areas[i].getAttribute("title"), areas[i].getAttribute("href"));
            }
        }
    }
    /* links */
    var as = document.getElementsByTagName("a");
    for (var i = 0; i < as.length; i++)
    {
        if (as[i].getAttribute("href") != null && as[i].getAttribute("href") != "#")
        {
            if (as[i].getAttribute("onClick") != null)
            {
                console.log(as[i].innerHTML, as[i].getAttribute("onClick"), as[i].getAttribute("href"));
            }
            else
            {
                console.log(as[i].innerHTML, as[i].getAttribute("href"));
            }
        }
    
    }
    return;
}


// Other disable back

function disallowNav()

{

    showActions();

}
Could you upload your _functions.js file? just having a difficult time figuring out where to place the text...
 

shinonen

Member
Dec 13, 2016
254
469
Wow, this is great. Going to have to try this out. I normally just cheat by dropping the current html page in notepad and see what bonuses I get and pick from that.

I also avoid being locked into the window by just copying the URL from the popup and pasting it into a new tab, so that might save some time?

Thanks for this though!
 

ikaruga

Well-Known Member
Modder
Respected User
Donor
Aug 11, 2016
1,191
2,501
Is there a way to show text directions without hovering over them?
My code will log all actions, even the hidden ones, and will show what actions each will do (like plus5('Chris'); for a +5 intimacy with Chris) and with file will be loaded.

I can even add another function who ovveract each "check" made in some virtualdate, who from the point you gained, a branch occur (often continue or gameover)

I can hack the files so you'll be able to get asked witch branch you want to go. But at this point, just add the remaining point needed in console with the ingame function, like plu5(varname);
 

ikaruga

Well-Known Member
Modder
Respected User
Donor
Aug 11, 2016
1,191
2,501
functions.js file with ikaruga's script..
Thank you, you are faster than me, and i never use this upload function ;)

This is my ingame code, not commented, but if people want explanation about what's done, i can help too !
 

selectivepaperclip

Active Member
Modder
Respected User
Donor
Feb 19, 2017
524
3,411
I've been developing a script that should work on most VDateGames releases, particularly Academy Part 2 and 3. To install, put this code at the end of your _functions.js file.



It adds:

* big obvious blue borders around all clickable areas (you can toggle them off if you want)
* tries to show what variables will be incremented when you click a thing
* see the current values of any variables and change them by clicking on them
* multiple save/reload functionality

I've tested this version against Academy 3 but it probably works against a lot of other VDateGames releases. If people can't get it to work I can probably try to help fix it.

EDIT: I actually only tested that script in Firefox, to get it working in Chrome you'll have to load the game over http rather than just loading it as a file. On Windows, easiest way may be something like:

  1. Install node.js from (the 6.x series is fine)
  2. In a Windows Explorer window, navigate to where the game's begin.html is
  3. Shift+Right Click on any blank space in the folder, choose "Open command window here"

  4. In the command window, type: npm install -g http-server (only needed the first time)
  5. In the command window, type: http-server
  6. You should see a message that the content is "Available on:" and then some IP addresses

  7. Visit in Chrome or Firefox, click begin.html to start
 
Last edited:

iamvqb

Member
Nov 7, 2016
261
491
Here my trick
Just empty the disallowNav function on _function.js and add my function.
This function write on console each action avalaible. It helps to know what choice do you have, and even show if the choice will add or remove points
HTML:
// Allow to console all the events
function showActions()
{
 
    /* Areas */
    var Map = document.getElementById("Map");
    if (Map !== null)
    {
        var areas = Map.getElementsByTagName("area");
        var area = null;
        var title = null;
        var onClick = null;
        for (var i = 0; i < areas.length; i++)
        {
            if (areas.length > 0 && areas[i].getAttribute("onClick") != null)
            {
                console.log(areas[i].getAttribute("title"), areas[i].getAttribute("onClick"), areas[i].getAttribute("href"));
            }
            else
            {
                console.log(areas[i].getAttribute("title"), areas[i].getAttribute("href"));
            }
        }
    }
    /* links */
    var as = document.getElementsByTagName("a");
    for (var i = 0; i < as.length; i++)
    {
        if (as[i].getAttribute("href") != null && as[i].getAttribute("href") != "#")
        {
            if (as[i].getAttribute("onClick") != null)
            {
                console.log(as[i].innerHTML, as[i].getAttribute("onClick"), as[i].getAttribute("href"));
            }
            else
            {
                console.log(as[i].innerHTML, as[i].getAttribute("href"));
            }
        }
    
    }
    return;
}


// Other disable back

function disallowNav()

{

    showActions();

}
Hey man i want to ask, does this work for all The Academy games or just the 3rd game?
 

ikaruga

Well-Known Member
Modder
Respected User
Donor
Aug 11, 2016
1,191
2,501
Hey man i want to ask, does this work for all The Academy games or just the 3rd game?
Hello
I think it can work for any game that use this game framework system.
Just trry it : make a backup of the file, edit it, test it. It's it's working then you're done :)
 

j5LDC2TB

Member
Sep 5, 2016
207
151
Hi, the above two scripts doesn't work on their Anna game. Can someone edit it to edit and save local storage values instead of the cookies?
 

selectivepaperclip

Active Member
Modder
Respected User
Donor
Feb 19, 2017
524
3,411
Here's a version that works on vdg_anna_1.0.1_full:
Unfortunately it doesn't yet autodetect whether the game is trying to use local storage, so you have to use either this script or the other one depending on the game.
 

chipsiup

Active Member
Aug 12, 2016
504
966
Does anyone have a suggestion for what to use to edit Cookies? Cookies Manager+ is no longer compatable with the new version of Firefox.
 
Aug 25, 2016
324
189
in a date with Bridgette. you can use the web developer tools/storage to modify the value, but when i change the value, i feel like every choice i continue to make, there's no different, am i doing something wrong here ?
 

DamnVamMan

Member
Mar 14, 2017
302
362
Does anyone have a suggestion for what to use to edit Cookies? Cookies Manager+ is no longer compatable with the new version of Firefox.
I know this is old post, but it's very easy to modify the manifest (or whatever Firefox equivalent) inside the addon. Find a download site or read the instructions on how to get the archive from the Firefox site then you can open it just as you can a zip. Firefox checks by major version if I remember correctly, so if you need to go to the next version just change the value to the current major version.



Also, never a good idea to execute code in any console
 

dragonassz1

Newbie
Oct 19, 2016
16
3
Hi, It's not showing the code for me anymore.

Can anyone share it with me pleasE?


I've been developing a script that should work on most VDateGames releases, particularly Academy Part 2 and 3. To install, put this code at the end of your _functions.js file.


It adds:

* big obvious blue borders around all clickable areas (you can toggle them off if you want)
* tries to show what variables will be incremented when you click a thing
* see the current values of any variables and change them by clicking on them
* multiple save/reload functionality

I've tested this version against Academy 3 but it probably works against a lot of other VDateGames releases. If people can't get it to work I can probably try to help fix it.

EDIT: I actually only tested that script in Firefox, to get it working in Chrome you'll have to load the game over http rather than just loading it as a file. On Windows, easiest way may be something like:

  1. Install node.js from (the 6.x series is fine)
  2. In a Windows Explorer window, navigate to where the game's begin.html is
  3. Shift+Right Click on any blank space in the folder, choose "Open command window here"

  4. In the command window, type: npm install -g http-server (only needed the first time)
  5. In the command window, type: http-server
  6. You should see a message that the content is "Available on:" and then some IP addresses

  7. Visit in Chrome or Firefox, click begin.html to start