Monday, April 6, 2009

RPG VX Script Fixes

The Ruby script in RPG Maker VX has at least 2 bugs I'm aware of... Just documenting them here so I don't forget.
The first one, concerning the multiply-equal operator, I found myself. This one is so dumb and wrong that it makes me wonder what else is wrong in the script.
The second, concering a screwed-up case-statement, was found at this link (rpgvx faq) http://www.rpgrevolution.com/forums/index.php?s=98899f4cf56b32cd8003f3ec4ea52835&showtopic=14610&pid=291208&st=0&#entry291208.

Also, further googling turned up this link... which is a full replacement script and how to make the changes permanent.
http://www.rpgmakervx.com/variables-fix


#1. Multiplication doesn't work with Variables...

Orig code line 840-841 of "Game_Interpreter".
when 3 # Mul
$game_variables[i] = value

Fixed code:
when 3 # Mul
$game_variables[i] *= value

#2. Variable operation on an actor not working?...

Orig lines 748-752 of game_interpreter:
when 3 # Item
value = $game_party.item_number($data_items[@params[4]])
actor = $game_actors[@parameters[1]]
actor = $game_actors[@params[4]]
if actor != nil

Fixed code:
when 3 # Item
value = $game_party.item_number($data_items[@params[4]])
when 4 # Actor
actor = $game_actors[@params[4]]
if actor != nil

No comments: