[VX Ace] Free Movement Incompatibility

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
491
Reaction score
213
First Language
English
Primarily Uses
RMVXA
Hello! i'm using GaryCXJk's Free Movement Script, and I'm trying out a new script: Prof. Meow Meow's Stealth Script(Only version I could find that wasn't buried in a thread.). To be honest, I tried using the latter script a couple years ago, when I had first restarted my project, but I encountered the same problem then as now. Simply put, these scripts seem to be incompatible with one another. If you place Free Movement above the Stealth Script, the game crashes when some aspects of the Stealth Script is activated (e.g. Moving out of sight.) with a TypeError. Specifically, it points to line 381, saying "can't iterate from Float".

If the Stealth Script is placed above Free Movement, a NoMethodError occurs on line 933 as soon as the Player moves, saying "undefined method 'size' for nil:NilClass".

Hopefully someone can help me with this. Thanks for reading, and as always, any help is appreciated. If you need a screenshot of the crash, I can oblige.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
4,685
Reaction score
5,357
First Language
Indonesian
Primarily Uses
RMVXA
The script is too long to try to understand the system as a whole, however ... when I try to look at your error notice lead.
If you place Free Movement above the Stealth Script, the game crashes when some aspects of the Stealth Script is activated (e.g. Moving out of sight.) with a TypeError. Specifically, it points to line 381, saying "can't iterate from Float".
This probably makes sense, the "Stealth Script" consider x and y coordinate as an integer, while the free movement script converted it into a decimal/float number. The wrong data type is what causes them to be incompatible with each other, however, fixing this will require to understand both scripts.

However...
If the Stealth Script is placed above Free Movement, a NoMethodError occurs on line 933 as soon as the Player moves, saying "undefined method 'size' for nil:NilClass".
I looked at this error specifically, since the stealth script is less than 900 lines, I looked at the free movement script, and that line specifically was this
Code:
processed = true
Are you sure it is the correct line number?
 

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
491
Reaction score
213
First Language
English
Primarily Uses
RMVXA
I'll double check. One moment...

Yep.
Game Error 01.png

I've added some collision boxes for my project though, so the true line 933 for my project is this:

Game Example 01.png
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
4,685
Reaction score
5,357
First Language
Indonesian
Primarily Uses
RMVXA
I don't get how that could be nullified, but try to replace that specific line with this
Code:
(@pos_list ||= []).size
 

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
491
Reaction score
213
First Language
English
Primarily Uses
RMVXA
I just tried it, and that error no longer occurs, but there's a new one on line... Here, just have the pictures.

Game Error 02.png

Game Example 02.png
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
4,685
Reaction score
5,357
First Language
Indonesian
Primarily Uses
RMVXA
Do a replace. Find this
Code:
@move_poll+
Replace with this
Code:
self.move_poll+
Then insert a new code below both of scripts
Code:
class Game_CharacterBase
  def move_poll
    @move_poll ||= []
  end
end
Disclaimer: You may want to backup the script.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
4,685
Reaction score
5,357
First Language
Indonesian
Primarily Uses
RMVXA
At least, no error happens?
I just realized both use a common variable name.
The first obvious way to make attempt to make both compatible would be renaming these variables.

Screenshot_174.jpg

Screenshot_175.jpg
I'm probably not the one who's going to edit, but at least I gave pointers.
 

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
491
Reaction score
213
First Language
English
Primarily Uses
RMVXA
I just tried it. I still can't move, but I appreciate you trying to help. At least it doesn't crash now.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
4,685
Reaction score
5,357
First Language
Indonesian
Primarily Uses
RMVXA
If you're going to rename it, you're going to scan the whole script and look for the reference of the variable, not just the one I pointed it out, which is why I was saying "I'm not the one who's going to do it".
 

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
491
Reaction score
213
First Language
English
Primarily Uses
RMVXA
Right, right. I used Replace All to replace @old-x and @old_y with @old_fm_x and @old_fm_y.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

suspended on twitter for calling an ahole an ahole & appealing the tweet; furious at myself for being even slightly upset with my suspension: oh no, you've been temporarily banned from hell. GET OVER IT, me.
how can you download the tiles from a forum post here? HELP
That moment when you post the wrong download link to your game and wonder why it got so few downloads... :mad:
Trying to make it so my map is cleared of "random" events after the player leaves the map... to little success >.< I think I might need to ask help for this.
Had my first interaction with a legit homophobe concerning one of my games today. Tempting to engage, but pointless.

Forum statistics

Threads
94,245
Messages
919,369
Members
123,959
Latest member
CecilGP
Top