Amaranth's Super Simple Mouse System for Ace

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,144
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
I think Zeriab wrote a script to make F12 do something else.
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
Well if this helps at all. I got this error message while play testing a project with hime's backtracer in it.

Shaz Mouse v1.10:161:in `set_bitmap': undefined method `%' for nil:NilClass, NoMethodError from Shaz Mouse v1.10:196:in `update_event_cursors' from Shaz Mouse v1.10:525:in `update' from Scene_Base:14:in `main' from SceneManager:23:in `run' from Main:13:in `block in <main>'All I did was start the game. Pressed f1 to bring up the ace options settings. I returned to the game without changing anything and pressed f1 again and it gave me that error. I couldn't reproduce it again.
 

Dark Gaia

Disgruntled Writer
Veteran
Joined
Mar 29, 2012
Messages
211
Reaction score
121
First Language
English
Primarily Uses
Hi Shaz. Thought I'd weigh in on the NoMethodErrror that Indie's reporting as it's popped up in my latest game too. It seems to happen in only a specific set of circumstances (much like the other instances, it occurred when the player clicked on a transition tile just before a battle was triggered) and I haven't been able to reproduce it.

Here's the actual player's bug report, if it helps: http://steamcommunity.com/app/325320/discussions/

I should mention that in my game I have modified your script to remove pathfinding (so that the mouse is only used for menu navigation/examining surroundings and not movement) but this shouldn't have triggered the error as it functioned just fine up until now.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,144
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
@Venka, thanks for the trace. It's not the same issue, but obviously one that will need to be addressed as well.


@Dark Gaia, I appreciate the info. It does indeed seem to be the same error Indy & ksjp17 are reporting. Can I please get you to try the suggestion I gave here?


@Indy/@ksjp17, have you had any feedback after implementing that little change?
 

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
1,876
Reaction score
776
First Language
French
@Indy/@ksjp17, have you had any feedback after implementing that little change? 
The player said the game has ran smoothly since then. Crossing fingers.
 

Dark Gaia

Disgruntled Writer
Veteran
Joined
Mar 29, 2012
Messages
211
Reaction score
121
First Language
English
Primarily Uses
I'll add the line as soon as I can (I need Degica to implement it on Steam, so it won't be done until after the weekend) but we'll see what happens.
 

ashes999

Uber Coder
Veteran
Joined
May 18, 2012
Messages
114
Reaction score
6
First Language
English
Primarily Uses
Hi @Shaz,

I found another bug:

- Save in slot #1

- Save in slot #2

- Shutdown and restart your game

- Click on Continue Game

The mouse very quickly moves from having slot #2 selected to slot #1 selected.  I think this is because the script is incorrectly handling the case when the mouse is out of bounds.

Can you please review, and possibly integrate, my fix? You can see the diff on GitHub (it's literally one line -- scroll to the last file). 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,144
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
What exactly is the problem? Where is the mouse at this time? What slot is it over? If the mouse is higher than the list of slots, it will choose the first one. That is not a bug.
 

ashes999

Uber Coder
Veteran
Joined
May 18, 2012
Messages
114
Reaction score
6
First Language
English
Primarily Uses
@Shaz the mouse is outside of the VX Ace window. VX Ace is smart enough to pick the most recent save as the default when you have multiple. The bug is that the second slot appears selected, and it quickly jumps to the first slot.

I kept accidentally loading the first save instead of the second because of this. The value of new_index is -1, which could mean the mouse is anywhere outside the bounds of VX Ace.
 

ashes999

Uber Coder
Veteran
Joined
May 18, 2012
Messages
114
Reaction score
6
First Language
English
Primarily Uses
You don't like my fix? :(

I can provide a copy of my in-development game, complete with saves, if you want to see the problem for yourself.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,144
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
I just haven't had the time to look at it, and it's not high on my priority list. I also planning to redevelop the mouse system, so am not likely to make too many more mods to this version.
 

ashes999

Uber Coder
Veteran
Joined
May 18, 2012
Messages
114
Reaction score
6
First Language
English
Primarily Uses
Please consider adding it. It's a pretty serious usability fix. It's not a new feature or anything like that.
 

Sawaragi Rikko

Villager
Member
Joined
Jan 3, 2014
Messages
8
Reaction score
0
First Language
Indonesia
Primarily Uses
I'm here for repot something

Tables Tile is a "Counter" tile

When I clicked 1 tile after tile, the character just go straight, but when i clicked 2 tiles after the table, the character/actor did a pathfinding

Here the .gif



Sorry with my grammar, English isn't my native language
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,144
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
can't see your gif - can you post it as a jpg instead?
 

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
80
First Language
English
Primarily Uses
I can see it just fine, if just because I opened it in a new window.



You should be able to see it now in my post, if not for some reason now then >click<
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,079
First Language
English
This seems to address the F12 crash script

http://himeworks.com/redirect.php?type=script-patch&name=shaz_mouse_script_fix

EDIT: oh, the post I saw was several pages ago lol

I'm not a fan of F12 either but I think this issue was reasonable enough to be issued on the script end.

The issue I see is that the

$mouse = Sprite_Mouse.new is done on script-load, rather than on game load.F12 does dispose the mouse sprite properly; when the game resets, a new mouse object isn't created.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,144
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
This is the correct behaviour. The character IS pathfinding, but when a counter is involved, the pathfinding will lead to the closest of the spot you click and the spot on the opposite side of the counter.


Imagine you have a shopkeeper behind the counter and you click on them. You want your character to walk up to the counter, opposite the shopkeeper. You don't want them to walk all the way around behind the counter to stand beside the shopkeeper.
 

brandos

Veteran
Veteran
Joined
May 25, 2013
Messages
147
Reaction score
31
First Language
German
Primarily Uses
When I move the mouse very slowly to the very bottom of the map this error appears. 



When I change the specific script to this the problem is gone but the changing cursor icons appear to be out of place.

def lowest_mouse_event_xy(x, y)

    list = events_xy(x, y) + events_xy(x, y+0)

    list.sort! {|a, b| b.y - a.y}

    evt = nil

    list.each do |event|

      if (event.pos?(x, y) || (event.pos?(x, y+0) && event.height > 43)) &&

        (evt.nil? || event.y > evt.y)

        evt = event

        break

      end

    end

    return evt

  end

end

 
 

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

Latest Threads

Latest Profile Posts

Here's the graveyard area I'm currently working on for another small project! (This is actually an RPG and not a puzzle game for once)
In the strangest turn of events, my animations now live in the characters folder, and my character images now live in the pictures folder. It's a complicated world, but weirdly a more resource efficient one. :LZSexcite:
Did you know that we use robotic spy animals to learn about how different species behave in the wild? We're only a step away from robotic spy humans, and then Terminator. :p
Not being able to do a commission/request after all and having to give back the money is so heartbreaking.

Sometimes I'm just way too eager to help people out and suddenly find myself in a very deep hole because I'm not gonna be able to finish it. I really hope I don't come across as unprofessional to these people and in general. =n="

Forum statistics

Threads
98,049
Messages
948,866
Members
129,317
Latest member
S_Rabbit
Top