Mouse System

Jet

Flying in a sky near you
Veteran
Joined
Mar 19, 2012
Messages
172
Reaction score
103
First Language
English
Primarily Uses
Mouse System
by Jet

Introduction

Yes that's right, another iteration of my mouse. This time around I coded my own pathfinding (which does not freeze up like the previous one) and i completely recoded almost everything. It's highly optimized and works much better than any previous version. It has removed the scrolling with mouse wheel, but added a developers block.

This is adding a fully functioning mouse into your game. This can allow the character to move and interact with just a click and navigate menus with ease.

Features

- Quick, flexible pathfinding, via A*
- Many configuration options
- Even more compatible with custom systems with a recoded base
- Just a click to do mostly anything
- And more...

Screenshots

Pretend the mouse is hovering over an event and TEXT APPEARS, WHOAPretend to see me click and the player MOVES TO WHERE I CLICKED, WOW

Pretend the mouse is over some items in the inventory screen and the item right under it IS THE ACTIVE ONE, AMAZING
Script
http://pastebin.com/raw.php?i=RDtzRMCN
 
 

Credit

Jet

Note

I have a license, it's in my signature.
 
Last edited by a moderator:
Joined
Mar 17, 2012
Messages
904
Reaction score
214
First Language
English
Primarily Uses
Finally. Only took you 6 months.

geez
 
Last edited by a moderator:

Chaos17

Dreamer
Veteran
Joined
Mar 13, 2012
Messages
1,304
Reaction score
482
First Language
French
That's really nice!

Finally a mouse script which work with your SBS.

Here's my bug report:

1) when I am on my title screen, i can't select the commands.

Is it because there're in pictures ?

Here's the title screen script I am using: http://www.atelier-r...ACE_Menu09.html

2) when I choose to select to use an event which use a mouvement route, the accuracy of your script isn't 100%

Set up of my event (on player touch): http://uppix.net/2/d...f7ef95b623b.gif

Result when I am not using your mouse script > http://uppix.net/e/b...522b499968a.gif

Result when I am using your script > http://uppix.net/5/1...d3fab88b679.gif

3) I can't throw in a different direction an object (event)

I am using this script > http://www.atelier-r.../ACE_SYS05.html

Your script will always make my character throw the item in front of him even if I select the other side.

I think it's because the character isn't changing side by itself when I make a click with your mouse script.

I am not asking you to make compatibility patches, it's your choice do it or not. ;)

I am just reporting actions that you can possible have with the scenery.

I just have an suggestion, when you click on a event, example a chest. it will be nice that the character move to it.

To avoid bug maybe you can allow like an 5 quare area of detection range and if the character is blocked because of the passability it won't search react to the clicking.

Sorry for my bad english.
 
Last edited by a moderator:

RyanA

Happy Cat
Veteran
Joined
Jun 28, 2012
Messages
2,423
Reaction score
230
First Language
English
Primarily Uses
Someone must do a point and click game with this awesome script! Thank you very much, dear maker :3
 

Levi

Veteran
Veteran
Joined
Jun 7, 2012
Messages
798
Reaction score
143
First Language
English
Primarily Uses
Loving this!! I just set up a Map System with this.

A problem:

1) If I turn the Mouse System off mid game, it can't be turned back on.

Some questions:

1) I'm super script-stupid... how can I change the Font for the Hover Text?

2) What script call or comment can I use to change "ALLOW_MOUSE_MOVEMENT" mid-game?
 

Jet

Flying in a sky near you
Veteran
Joined
Mar 19, 2012
Messages
172
Reaction score
103
First Language
English
Primarily Uses
Loving this!! I just set up a Map System with this.

A problem:

1) If I turn the Mouse System off mid game, it can't be turned back on.

Some questions:

1) I'm super script-stupid... how can I change the Font for the Hover Text?

2) What script call or comment can I use to change "ALLOW_MOUSE_MOVEMENT" mid-game?
1.) Fixed.

1(2).) Feature Added.

2(3).) Feature Added.

The new version has been linked in the original post. Thanks for the report and ideas.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,555
Reaction score
3,809
First Language
English
For the comments, maybe you can use string interpolation and allow users to decide what to type.

For example, maybe the default MOUSE CLICK is too much work to type, but I don't know how to change the regex.

Instead I can just go to some config and type in the phrase I want to use for the MOUSE CLICK comment.

I like the choice of implementation though; just add mouse functionality to window_selectable rather than some other implementations that create custom window/scenes for everything just for the mouse.

Might go off and do some TBS script I had started working on but then got bored.

btw,

1: I have a chest with MOUSE CLICK. It doesn't work when "ALLOW_MOUSE_MOVEMENT = false" though (works when it's true)

Can you separate the actual mouse movement from event triggering? (assuming that's how it was done)
 
Last edited by a moderator:

Chaos17

Dreamer
Veteran
Joined
Mar 13, 2012
Messages
1,304
Reaction score
482
First Language
French
I still have the same problem with the mouvement route, I tried all new option.

I guess the problem is that my character jump when I when on the event.

It doesn't wait for my character to stand on the event then make it jump.
 
Last edited by a moderator:

Jet

Flying in a sky near you
Veteran
Joined
Mar 19, 2012
Messages
172
Reaction score
103
First Language
English
Primarily Uses
Fixed a couple of bugs:

1.) Event hovering text windows would not become invisible when a new scene is called. This has been corrected.

2.) The developer block would temporarily be visible outside of the map in scenes. This has also been corrected.

New version in first post.

@Chaos: I haven't pin-pointed the issue, but i don't see how the mouse would be responsible, it doesn't mess with any direct movement.
 

Maus Merryjest

Veteran
Veteran
Joined
May 8, 2012
Messages
240
Reaction score
40
First Language
English
Primarily Uses
The new version gives me this:

line 657:NoMethodError ocurred. undefined method 'visible=' for fale:FalseClass

It happens when moving with the mouse, and it also appears when calling up the menu.
 
Last edited by a moderator:

Jet

Flying in a sky near you
Veteran
Joined
Mar 19, 2012
Messages
172
Reaction score
103
First Language
English
Primarily Uses
The new version gives me this:

line 657:NoMethodError ocurred. undefined method 'visible=' for fale:FalseClass

It happens when moving with the mouse, and it also appears when calling up the menu.
Fixed. Update original post with new link.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,555
Reaction score
3,809
First Language
English
Here's an attempt to separate event checks from mouse movement, although it looks like certain events are supposed to force you to move.



Code:
class Scene_Map
  alias jet3745_update update
  def update(*args, &block)
    jet3745_update
    check_event_trigger
    check_mouse_movement if $game_system.mouse_movement
    check_mouse_icon_change
  end

  # moved here
  def check_event_trigger
    $game_temp.mouse_character ||= $game_player
    if Mouse.click?(1)
      dont_move = false
      x, y = *Mouse.true_grid
      ($game_map.events_xy(x, y) + $game_map.vehicles).each {|event|
        if event.is_a?(Game_Vehicle)
          if (event.x - mouse_char.x).abs + (event.y - mouse_char.y).abs == 1
            if [event.x, event.y] == Mouse.true_grid
              mouse_char.get_on_vehicle_mouse(event)
              dont_move = true
            end
          end
        elsif !!!mouse_char.vehicle
          if event.mouse_activated?
            event.start
            dont_move = true
          elsif (event.x - mouse_char.x).abs + (event.y - mouse_char.y).abs == 1
            if event.is_a?(Game_Vehicle)
              mouse_char.get_on_vehicle_mouse(event)
              dont_move = true
            else
              if !event.mouse_empty? && [0, 1, 2].include?(event.trigger)
                mouse_char.turn_toward_character(event)
                event.start
                dont_move = true
              end
            end
          else
            {UP: [0, -1], DOWN: [0, 1], LEFT: [-1, 0], RIGHT: [1, 0]}.each {|d, a|
              if event.check_for_comment(/MOUSE[ ]*MOVE[ ]*#{d.to_s}/i)
                x += a[0]; y += a[1]
              end
            }
          end
        end
      }
      mouse_char.mouse_path(x, y) unless dont_move
    end
  end

  def check_mouse_movement
    $game_temp.mouse_character ||= $game_player
    if Mouse.click?(1)
      # separated into its own method
      mouse_char.mouse_path(x, y)
    end
  end
end
 
Last edited by a moderator:

masterchafa

Warper
Member
Joined
Jul 18, 2012
Messages
1
Reaction score
0
First Language
Spanish
Primarily Uses
Hi Jet. I just loved your script, and now i admire you. But i came with this idea... Is there any chance for this script to have an option that would allow the player to dinamically face the same direction as the cursor (at least the 4 basic facings), as if the chara were looking for something?

... Aand something else: It seems that the cursor and the real mouse aren´t exactly in the same place. To be more acurate, the actual click is about one and a half tiles to the right of the cursor, and maybe a half tile up. Can you fix it?

Thank you :)
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
2,994
First Language
Tagalog
Primarily Uses
RMVXA
just wanna say that it seems to bug with YanFly's custom system menu (when I use YF's system to disable then re-enable the mouse, the mouse cursor never reappears but it still works)
 

Chaos17

Dreamer
Veteran
Joined
Mar 13, 2012
Messages
1,304
Reaction score
482
First Language
French
Bug report



My script list

 
Last edited by a moderator:

Genii Benedict

Supervillain, Extraordinaire
Veteran
Joined
Jun 13, 2012
Messages
333
Reaction score
114
First Language
English
Primarily Uses
It seems that the cursor and the real mouse aren´t exactly in the same place. To be more acurate, the actual click is about one and a half tiles to the right of the cursor, and maybe a half tile up.
I just installed the script, and I think I'm seeing this as well as another issue. First, here's a screenshot of the mouse script beside my character, when I start...



The highlight seems fine on the first screenshot, and even when you aim, you're good.



In the screenshot above, I'm aiming for the door center. It's correct, and there's an event there to open the door.



Now, once you move, you get this whenever you aim. You're 50% to the right or left of the actual spot where you can aim.... Also, when I mouse click on the event where the door action is, you don't go to it. I'm guessing there's a way to make it so, but it looks like either I've done something wrong (I haven't edited the event) or else, the walk parsing code doesn't want to go there. Even if I click the doors right from my starting position (so that you KNOW it's dead on, without the issue I'm having above) it won't walk to it. It will walk right up to it, and then stop. And you can 'manually' walk through them.

Let me say this - THIS SCRIPT IS SOME KIND OF AMAZING MAGIC. I am in awe of how amazing it looks, and applaud the work you've done so far.

GB

EDIT: Ah. I think I've also determined where the issue I'm having specifically may be originating. The door event works if you choose "Below" or "Above", but not at the same level. Unfortunately, this causes a different issue in the fact that now, the player walks through (under or over, technically) the door graphic before the animation opens and closes the door. So, unfortunately, that kills the functionality for me somewhat...

As an aside, everything else works - and I've just tested Vlue's mouse, and it works fine with my door events as is. Unfortunately, his doesn't offer as much robust power (sorry Vlue!) as Jet's does, as it doesn't (presently?) have auto-walk, nor does it seem to have the pathing code as strongly as Jet's. Now, if there was some way to match Vlue's event functionality with Jet's pathing and customization...

EDIT EDIT: A-HA! I can confirm that the issue whereby the 'target box' is 50% out of phase with your position is caused by a conflict with "Yanfly's Engine Ace - Ace Core Engine v1.09", and likely due to the increase in screen resolution when the screen is panning. I removed this script and everything works fine, shy of the issues with my doors, as above. I'm still hoping and wishing for some resolution to each, if that's anywhere close to possible.
 
Last edited by a moderator:

MacGabhann

Villager
Member
Joined
Aug 21, 2012
Messages
8
Reaction score
0
First Language
English
Primarily Uses
ive just tryed out this script on my game and let me just say it works great so far no problems that I can see right now. I looked at the license and if im reading it right it would mean that if I keep the script in my game I would not be able to sell the game which I was wanting to try even if just to see how well it would do though ive also been thinking of just making it free. just curiuse as to what my options might be regarding the licence if im reading it correctly. and let me just say that this is one awsome script.
 

Genii Benedict

Supervillain, Extraordinaire
Veteran
Joined
Jun 13, 2012
Messages
333
Reaction score
114
First Language
English
Primarily Uses
I looked at the license and if im reading it right it would mean that if I keep the script in my game I would not be able to sell the game which I was wanting to try even if just to see how well it would do though ive also been thinking of just making it free. just curiuse as to what my options might be regarding the licence if im reading it correctly.
Contact Jet directly via PM. I'm hoping to explore using this script for a future commercial venture, and that's the way I'll be going. (Unless, of course, Jet pops back in and says how to approach him in a different way.)

GB
 

Internetakias

RPG Maker VX Ace Noob :P
Member
Joined
Aug 26, 2012
Messages
67
Reaction score
8
First Language
Greek
Primarily Uses
I know it's already been said before but could you tweak the MOUSE CLICK tag so it works even if ALLOW MOUSE MOVEMENT is set to false? Thanks. :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Got the menu problem sorted out, now most of the systems are in place and I can focus on the plot and the maps!
Im really Happy that the MZ Hero looks like a Boy than a Man.
What the community thinks hackers do:
"Ok, now let's just type in the /win command, and... done!"

What hackers actually do:
"Alright, so I have a high jump mod installed, now I can just jump over everyone and be sneaky until I'm the last one standing."
When you gotta make a new tileset for each building because of a few differences.

20/24 done. Still no clue waht to put in 24, though...

Forum statistics

Threads
103,146
Messages
997,627
Members
134,624
Latest member
Pakaku
Top