Jump to content

Recommended Posts

KMS Minimap

Script by tomy

http://ytomy.sakura.ne.jp/

 

Latest Version: 2012/02/12

 

post-103-0-40897900-1326061436_thumb.jpg

 

Description

Create a passability minimap HUD. See screenshot for an example.

 

(See post below this one for more info.)

 

Latest Updates

2012-02-12: Issues with hiding the minimap have been addressed.

2012-01-14: The issue where the game would crash when events had no page conditions met has been fixed.

 

Script

KMS Minimap 2012-02-12.txt

 

Installation

Install this script in the Materials section in your project’s script editor.

 

How to Use

This script utilizes map notetags and tags in event comments. Please read the comments thoroughly.

 

Compatibility

n/a

 

Terms and Conditions

http://ytomy.sakura....tech/rules.html

 

Tomy's Site T&Cs (translated by kirinelf)

 

 

If you wish to redistribute the scripts or other materials on this site, I would appreacite being told beforehand through either the BBS or e-mail.

 

Feel free to link to any of the pages on this site.

However, keep in mind that due to editing and rearranging of the site contents, links might break without warning.

 

I am not held responsible for any direct or indirect consenquence of using my scripts if you've modified them.

Please take that responsibility onto yourself.

As a precaution, please backup your project before use.

 

At the moment, no requests are being taken.

 

There is no need to report material usage to me, nor is credit required.

If you want to credit me, there's no specific format to do so.

Please write as you wish.

 

Editing is allowed freely, of course.

Redistribution after editing is fine.

(As long as you don't say you didn't write the whole thing yourself.)

You can port them to any other language (C++, C#, etc.) if you want.

 

You are also allowed to use these materials for 15+ and 18+ games.

 

...Well, now that the formalities are over, I really don't mind what you do with my works as long as you use them with common sense. Go ahead and use them! ヽ(´▽`)/

 

 

FAQ Style

 

 

Q: Can I share your works on my site?

A: Yes, but I would prefer it if you could tell me beforehand via either the BBS or an email.

 

Q: Aren't there many similar scripts out there? What should I do with them?

A: Scripts are almost a form of art; each author has their own way of writing them. Even if they function the same, there is more than one way to write a script.

I think that as long as the different scripts don't just have different names for the variables and method, every script has its own value and merit.

 

Q: I'm gonna link to your technique page, okay?

A: Link and favorite (bookmark) to your hearts extent! Just be warned that sometimes the address for the links might change, so be careful.

 

Q: There was a bug and it screwed up my game! What should I do?

A: As said in the rules, I am not responsible for that. Please make frequent backups.

 

Q: Can you make something for me?

A: I'm not accepting any requests at the moment.

 

Q: Do I need to report usage details to you?

A: No. I'd appreciate the occasional notice though, it gives me motivation. If I don't hear anything at all, I do this: (´・ω・`) *Laugh*

 

Q: Do I need to put a copyright notice for you? (Can mean 'Do I need to credit you?')

A: No, you don't need to.

 

Q: I'd like to edit something...

A: Feel free to edit as you please. However, be warned that I might not be able to provide support for modified materials.

 

Q: I've got this strange urge to modify your scripts and redistribute them.

A: Please go ahead. Just try not to say something like, "I wrote the whole thing myself." and we're good.

 

Q: I'd like to port this over to a game in C++.

A: Feel free to port and modify it at will.

 

Q: I found a bug!

A: Please report it on the BBS.

Please describe the circumstances in which you came across the bug in detail.

Bugs are hard to fix if you don't know what caused them in the first place.

If you get an error, please report where or how the error happened as well as the error message that pops out.

 

Q: Can I use your materials for 15+ and 18+ (adult) games?

A: Sure thing! (・∀・) Hehe.

 

Q: Can I use this for shareware?

A: If I won't end up involved in some huge complicated mess, sure.

 

 

 

The English version translated by Mr. Bubble, but credit to Mr. Bubble is not necessary.

Share this post


Link to post
Share on other sites

Tomy, the creator of the popular KGC scripts is back! Now he's renamed his website to Kamesoft and his VX Ace scripts will be labelled as KMS.

 

I have asked Tomy for permission to translate KMS scripts to English and he said yes. I will try to avoid the readability and fluency issues that were apparent in the KGC translations by Mr. A. I'll try to keep comments reasonably concise and the comment format clean and consistent.

 

Some things of note - I will not be translating Japanese regexp because Tomy has graciously already coded English notetags. I am into maintaining KMS scripts for the long haul so I will need to keep the maintenance of these scripts quick and easy in the event KMS scripts get updated.

 

It would help if someone can make a proper clear summary of Tomy's rules. That's something I don't want to mess up.

Share this post


Link to post
Share on other sites

Great Bubble! Thanks for traduction!

 

We can expect great script from tomy!

Share this post


Link to post
Share on other sites

Okay, I'm having some issues with this script. I've confirmed that these both occur 100% of the time under the specified conditions, even in a fresh project.

 

First, if one chooses to hide the minimap (either by using the map name/notebox tag or by using the map hide hotkey) at any time, it will never come back up for the rest of the game, no matter what you do. Am I missing something, or is the minimap hiding code not quite playing nice?

 

Second (and lastly), it seems that, based on my testing, if an event has a switch condition set on its first page, then the game crashes upon loading the map with the following: "Script 'KMS Minimap' line 294: NoMethodError occurred. undefined method 'list' for nil:NilClass".The line at 294 is:

@page.list.each { |cmd|

 

The code section in question is as follows:

 

  def __create_minimap_cache
@__last_page = @page
@__minimap_wall_event  = false
@__minimap_move_event  = false
@__minimap_object_type = -1
@page.list.each { |cmd|
  # 注釈以外ã«åˆ°é”ã—ãŸã‚‰é›¢è„±
  break unless [108, 408].include?(cmd.code)
  # æ­£è¦è¡¨ç¾åˆ¤å®š
  case cmd.parameters[0]
  when KMS_MiniMap::REGEX_WALL_EVENT
	@__minimap_wall_event = true
  when KMS_MiniMap::REGEX_MOVE_EVENT
	@__minimap_move_event = true
  when KMS_MiniMap::REGEX_OBJECT
	@__minimap_object_type = $1.to_i
  end
}
 end
 private :__create_minimap_cache

 

 

Any idea what's up?

Edited by Nohta

Share this post


Link to post
Share on other sites

Making the minimap reappear requires that you open the menu then close it. Strange, I know. Likely not intended and the script will probably be updated to address that.

 

I can't reproduce the error you have since you didn't provide all the steps for the event, but make sure you don't load your game from an old save file.

 

Also, on a separate note, there are some script call commands I forgot to document. I've update the comments in the script in the first post.

Share this post


Link to post
Share on other sites

Making the minimap reappear requires that you open the menu then close it. Strange, I know. Likely not intended and the script will probably be updated to address that.

That explains that, I guess. I never thought of that, though that might just be because the menu is disabled for the whole map that I'm doing (a semi-short prologue section). Didn't even think to try that on the fresh project.

 

I can't reproduce the error you have since you didn't provide all the steps for the event, but make sure you don't load your game from an old save file.

To start with, I never use saves while playtesting, though I'm not entirely sure why (I imagine that it's a really old habit of mine). I literally copied the map I was using to a fresh project. I kept the original starting map, adding a 3x3 grid of autotile grass and a teleport on the top-center tile so I could warp to the problem map. This was done so I could check to see if it was something to do with the problem map or the script itself.

 

First, I tried to warp to the map, which resulted in the crash detailed above, so I did the first thing that came to mind: delete all of the events on the map and copy/paste them from the main project one at a time to see which ones would error out. My autorun event worked fine, but if I added a switch condition to the first page (which, yes, was an autorun, and I didn't want that running while I was testing), it would result in the same crash. Setting the first page to "Action Button" instead and removing the switch condition resolved that problem. The event has switch conditions on other pages, but I didn't need to touch those for some reason.

 

Next, I copied an event that was basically just a sprite of a party member that joins right at the beginning. All that's contained in her event is her sprite and a switch condition on the first (and only) page that causes her to appear when it's turned on. Copying that event to the map caused another crash of the same type. Bumping the page over (copy/paste event page), making the first page just a blank one, and adding a new event to turn on the switch that would make the event appear caused no problems.

 

Those are the only two events on the map that I've tried so far (I've got another party member event and an enemy event of the same nature as well as a player-touch cutscene event to test), and I haven't tried making an event on the starting map with a switch condition on the first page, but once I get back to my desktop (I'm on my laptop at the moment; just woke up), I'll keep you posted on my results and add some screenshots to illustrate my problem.

 

EDIT 1: Okay, after another test on the starting map, it seems that making any event with a switch condition on the first page causes the crash documented in my last post. I even recopied the script (once to Notepad++, another straight into the script editor to see if Notepad++ was the problem (which it isn't)), but all that changed was what line # the error was on (the line that's erroring out is the same; it just moved to line 306 because of the documentation you added on the script calls). Again, it all works if the first page of all events on the map do not have a switch condition set, so for the moment, I can alleviate the problem by bumping the event pages over using the Page Copy/Paste functions and making the first pages all blank for the events that are affected.

 

Also, on a separate note, there are some script call commands I forgot to document. I've update the comments in the script in the first post.

Just checked, and that should help a lot once I get this thing to behave.

Edited by Nohta

Share this post


Link to post
Share on other sites

Thanks for the toggle button fix, but now I'm having a (relatively) minor issue with the map tags. If I use either [NOMAP] in a map name or <minimap hide> in a map's notebox, I can't get the minimap to appear, not with the script calls or the toggle button. However, if I access the menu one way or another, the problem fixes itself entirely (script calls, the toggle button, the works; why it does that is anyone's guess).

Share this post


Link to post
Share on other sites

Ah, I see the issue now. Tomy didn't consider events where none of the event's pages have their condition met. It can be avoided by making a page with no conditions (page number doesn't matter), but I'll give it a week or two for Tomy to update this one. It just got released, after all. I do know how to bandaid the issue, but it only avoids the issue rather than solving it. I'd rather wait to see if Tomy updates it himself.

Share this post


Link to post
Share on other sites

I'm getting a syntax error at line 59 the instant the game is run:

"target of repeat operator is not specified"

 

This script is the only script in a blank project.

Share this post


Link to post
Share on other sites

I'm getting a syntax error at line 59 the instant the game is run:

"target of repeat operator is not specified"

 

This script is the only script in a blank project.

After performing an independent investigation, I've come to the (preliminary) conclusion that the Japanese characters in your copy of the script may not have saved correctly, one way or another. My advice would be to check to see if your browser can display Japanese text correctly, and then try to recopy the script directly into the script editor.

 

When I originally tried this script, I copied it into Notepad++ (failing to make sure that the right text encoding option was set; big mistake), saved it, and went on with the day. This caused all of the Japanese characters to turn into question marks, which caused the game to throw an error upon start-up when I finally got around to adding it. Fortunately, I was able to fix it by copying it straight from the link above and pasting it directly into the editor (later resaving it in Notepad++ with the proper settings).

 

I used the above experience as the basis of which to carry out my investigation into your problem, and it sounds like this is the same problem you're experiencing. I reproduced the steps I originally took, which produced the exact same error you noted (although on a different line, strangely enough), so I'm fairly confident that I'm on the right trail with troubleshooting your issue. If my above advice doesn't help, I'd advise you to reply back and post what you have (in a code box, of course) so someone can further assist you with the issue.

 

Off-topic: Whoa, I'm starting to sound like a tech support guy. I wonder if it's because I should be asleep right now or if it's because of something else. *looks over his reply again* Yeah, it looks so prim and proper. Totally uncharacteristic, given my previous forum history.

Share this post


Link to post
Share on other sites

Script update:

 

2012-01-14:

  • The issue where the game would crash when events had no page conditions met has been fixed.

 

I'm getting a syntax error at line 59 the instant the game is run:

"target of repeat operator is not specified"

 

This script is the only script in a blank project.

What Nohta said. :)

Share this post


Link to post
Share on other sites

Issue solved. I opened it with notepad and the Japanese characters showed up instead of the question marks.

 

I'm assuming that there's no simple way to pre-draw the "other side" of the map when doing a vertical/horizonal map loop? I also had this problem with Woratana's KGC MiniMap for VX. It's not a big problem, but I think it would appear funny to a typical end user.

Share this post


Link to post
Share on other sites

Script "Mini Map" line 660: TypeError occurred.

can't iterate from Float

 

When I try to enter my town. Or pretty much any map...

 

Edit: Also the comments like Minimap walls and Minimap obj dont work at all.

Edited by Ice Nick

Share this post


Link to post
Share on other sites

Script "Mini Map" line 660: TypeError occurred.

can't iterate from Float

 

When I try to enter my town. Or pretty much any map...

 

Edit: Also the comments like Minimap walls and Minimap obj dont work at all.

Try recopying the script again. Something might've gotten messed up when you copied it (happens sometimes). I'd tab the link and click on it, CTRL+A (select all), CTRL+C (copy (of course)), click in the script editor and press CTRL+A and CTRL+V (paste (of course)) over the copy you have in your game.

 

If that doesn't work, you might have a script clash in progress. It might help to know where you placed the script in the list and what other scripts you're using (in the exact order they appear on your script list).

Share this post


Link to post
Share on other sites

Same error, the script says plug and play so this is odd. It appears that the mini map only works on 1 specific map, but if I change to any other it via setting hero starting point or teleports, I get that error. The script is placed above main below materials, last on in this list.

 

Edit: It doesn't work with Khas pixel movement, I had to remove that.

Edited by Ice Nick

Share this post


Link to post
Share on other sites

Make sure you do not load your game from an old save file after installing this script. You should never use old save files after modifying anything in your project's script editor.

 

I have no saves, however I did not know this and its good to know! Thanks.

I edited my previous post, its due to Khas Pixel Movement script.

Share this post


Link to post
Share on other sites

I apologize for the necropost...It's just a few days too late but I know I'm still disobeying rules :/ but whenever I put the tag in a comment <minimap obj 3> or any other number in an event's comment, nothing happens to the minimap. It remains without the result wanted.

Here's a list of the other scripts I have (btw, I've tried moving this script around to make sure the positioning wasn't affecting it)

-Pause Menu Features by Ventwig

-Battle Pop-Ups by Jet10985

-Side-View Battle System by Jet10985

-State Icon Animation by Jet10985

-Map name on load fix by Crazyninjaguy

-Picture Bug Fix by Raizen884

 

Again, I really am sorry for the necropost.

 

EDIT: I found the fix...no space between obj and the #. Also, put the comment first in the event...I actually had to check on the Japanese website to find out.

Edited by Kat

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted