In order to use a variable to determine the id of another variable, you could do this...
$game_variables[$game_variables[1]]^ this would automatically contact the variable whos id is determined by the number stored within game variable 1.
In order to add 1 onto this variable, we could do this...
$game_variables[$game_variables[1]] += 1Finally, in order to show said variable within a message box, you should be able to do this within the text box (not tried, should work).
\V[\V[1]]So, putting that together with the code you showed previously you might end up with something like this... (not tried, might work)
VARIABLE_ID = 1 def gold_mining mine_success? ? successful_mine : failed_mine end def mine_success? rand(GOLD_RANGE) >= GOLD_SUCCESS end def successful_mine RPG::SE.new(MINE_SUCESS,MINE_SE_VOL,MINE_SE_PITCH).play $game_party.gain_item($data_items[GOLD_ITEM_ID],VALUE) $game_variables[$game_variables[VARIABLE_ID]] += 1 SceneManager.goto(Scene_Map) $game_message.add("Current node counter is \V[\V[#{VARIABLE_ID}]]") end def failed_mine SceneManager.goto(Scene_Map) end def dispose_main_viewport dispose_image_cover super endEdit:
Who wrote this script you are trying to alter, cause for lack of a better phase, its piss poor.