New account registration is temporarily disabled.

REALLY IMPORTANT FIX NEEDED

Posts

Pages: 1
Puddor
if squallbutts was a misao category i'd win every damn year
5702
In the last few months I've switched from using the NORMAL_WINDOW mode of UMS to FIT_WINDOW_TO_TEXT. This doesn't cause an error with the Cursor script, persay, rather it causes a rather major annoyance. The cursor script no longer reads Choice Dialogue boxes properly when using the window of event commands (initiated with \e for over player, etc) and does not click through the options correctly, rather it only stays in a small space and moves about a millimeter. This is a major flaw and someone was actually kind enough to point it out in a Youtube Video. It can be seen here:

ccoa's UMS: http://www.rmxpunlimited.net/forums/index.php?app=downloads&showfile=63
The cursor script I'm using is this one:

#==============================================================================
# â–  Cursor Script
#------------------------------------------------------------------------------
#  Script to display a cursor instead of a highlight box
# by squall
# squall@rmxp.ch
#==============================================================================

#==============================================================================
# â–  Cursor_Sprite
#==============================================================================

class Sprite_Cursor < Sprite
#--------------------------------------------------------------------------
# ● instances
#--------------------------------------------------------------------------
attr_accessor :true_x
attr_accessor :true_y
#--------------------------------------------------------------------------
# ● initialize
#--------------------------------------------------------------------------
def initialize(x = 0, y = 0)
super()
self.x = @true_x = x
self.y = @true_y = y
self.z = 10000
self.bitmap = RPG::Cache.picture("cursor") rescue Bitmap.new(32, 32)
end
#--------------------------------------------------------------------------
# ● update
#--------------------------------------------------------------------------
def update
super

if self.y < @true_y
n = (@true_y - self.y) / 3
n = 1 if n == 0
self.y += n
elsif self.y > @true_y
n = (self.y - @true_y) / 3
n = 1 if n == 0
self.y -= n
end

if self.x < @true_x
n = (@true_x - self.x) / 3
n = 1 if n == 0
self.x += n
elsif self.x > @true_x
n = (self.x - @true_x) / 3
n = 1 if n == 0
self.x -= n
end
end
end

#==============================================================================
# â–  Window_Selectable
#==============================================================================

class Window_Selectable < Window_Base
#--------------------------------------------------------------------------
# ● instances
#--------------------------------------------------------------------------
attr_reader :index
attr_reader :help_window
attr_accessor :cursor
alias update_cursor_moves update
#--------------------------------------------------------------------------
# ● initialize
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = -1
@cursor = Sprite_Cursor.new(x, y)
update_cursor
end
#--------------------------------------------------------------------------
# ● x=
#--------------------------------------------------------------------------
def x=(x)
super
@cursor.x = x if !@cursor.nil?
end
#--------------------------------------------------------------------------
# ● y=
#--------------------------------------------------------------------------
def y=(y)
super
@cursor.y = y if !@cursor.nil?
end
#--------------------------------------------------------------------------
# ● visible=
#--------------------------------------------------------------------------
def visible=(visible)
super
if !@cursor.nil? and visible == false
@cursor.visible = false
end
end
#--------------------------------------------------------------------------
# ● dispose
#--------------------------------------------------------------------------
def dispose
@cursor.dispose
super
end
#--------------------------------------------------------------------------
# ● update_cursor_rect
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
cursor_width = self.width / @column_max - 32
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 32 - self.oy
if @cursor != nil
self.cursor_rect.set(x, y, 0, 0)
else
self.cursor_rect.set(x, y, cursor_width, 32)
end
end
#--------------------------------------------------------------------------
# ● update_cursor
#--------------------------------------------------------------------------
def update_cursor
@cursor.true_x = self.cursor_rect.x + self.x - 14
@cursor.true_y = self.cursor_rect.y + self.y + 24#16
@cursor.update
@cursor.visible = (self.visible and self.index >= 0)
end
#--------------------------------------------------------------------------
# ● update
#--------------------------------------------------------------------------
def update
update_cursor_moves
update_cursor
end
end


I would be deeply thankful if anyone could help me with this, I want to release my game in the next month and I need this fixed to do so.

EDIT: and just so you know it does this even in a blank project so it's not one of my bajillion scripts causing this. I CHECKED.
change this part

http://pastebin.com/h1k74nii

to

http://pastebin.com/FFY3fuUL

and let me know if it worked.

I don't know that it necessarily is the problem, but it looks like it at first glance.
Puddor
if squallbutts was a misao category i'd win every damn year
5702
No, it doesn't work. :< in normal modes the cursor moves REALLY slowly and it just does the same thing when it's set to FIT_WINDOW_TO_TEXT and \e.
If I had to guess I think it has something to do with the height of the cursors movement. Maybe something with this part:

# ● update_cursor
#--------------------------------------------------------------------------
def update_cursor
@cursor.true_x = self.cursor_rect.x + self.x - 14
@cursor.true_y = self.cursor_rect.y + self.y + 24#16
@cursor.update
@cursor.visible = (self.visible and self.index >= 0)
end

I think try messing with the x/y values a bit and see if they change anything.
Puddor
if squallbutts was a misao category i'd win every damn year
5702
Nah, that doesn't help at all. It just means that the title screen is effed up and the selection process looks even worse.

The cursor works normally until fit_window_to_text and \e are applied. And I know what the easiest fix for this is, I know! Get rid of the two. But it's a completed game almost and it's something like 7-8 hours long with a shit tonne of dialogue that would take me forever to find and change. I made the change because it looked better.

I -think- it might have something to do with ccoa's UMS messing with the Cursor script (I have tried changing script positions- nothing is affected, same error).

The text is here: http://pastebin.com/MWTWDK20

To put it simply, the problem when using event mode with the UMS is that the window's coordinates are re-calculated continuously. Since the cursor moves smoothly towards its destination, the coordinates change before it can attain it - hence the weird effect.

The only thing to do without a separate cursor implementation into the UMS is simply to deactivate the smooth effect and enable an instant cursor movement.

To do this, go inside the update_cursor method of your cursor script and add this:
if self.is_a?(Window_Choice)

@cursor.x = self.cursor_rect.x + self.x - 14
@cursor.y = self.cursor_rect.y + self.y + 24
end


The smooth effect will be gone, but at least the coordinates are right.
Pages: 1