notdodgeball / vagrant-story-lua-script

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vagrant-story-lua-script

A script to be used with the PCSX-Redux emulator for the game Vagrant Story.

It can display and edit values like Ashley's speed and coordinates, insert and read text from memory, modify the inventory, load any room, freeze memory addresses and output text on top of the screen.

Summary

vg.lua is the main file and the one executed by the emulator.

map.lua contains the area and text encoding info for the game.

widgets.lua implements several support functions and some imgui helpers:

  • drawCheckbox
  • drawSlider
  • drawMemory
  • drawInputInt
  • drawDrag
  • drawRadio
  • drawJumpButton
  • drawInputText
  • drawSaveButton
  • drawLoadButton
  • drawFreezeCheck

prt.lua implements output functions

  • p.setOutput
  • p.screenLog
  • p.printCoordinates
  • p.text

out.lua File to replace the content of output.lua to enable drawing into the screen.

Showcase video of older version: Showcase video

Usage

Type into the lua console:

dofile 'C:\\Path\\to\\vg.lua'

Or use the command line arguments

pcsx.exe -loadiso "Vagrant Story.bin" -dofile "vg.lua"

As a module

You can use this script in your own project, an example:

p = require 'prt'
w = require 'widgets'

p.setOutput(function() 
  p.text(200,50,'Look at me')
end)

function DrawImguiFrame()
  
  imgui.safe.Begin('Command', true, function()
    w.drawSlider(PCSX.getMemPtr(),  0x80000000, 'Something', 'uint8_t*', 0, 40)
  end)

end

About

License:GNU General Public License v3.0


Languages

Language:Lua 100.0%