Tidloc 55 Posted May 25, 2012 (edited) Tidloc's compass v.1.1 by Tidloc Introduction simply a script, that allows to show a compass if a coordinate for a map is set. Features: shows a compass on the screen if a coordinate for the map you're on is set. hides that compass if no coordinate is set or is has been cleared. completely compatible with my Questlog. Screenshots https://photos-2.dropbox.com/t/2/AADpHmCnhYxlRTl7vvTNq2ta23D2x1MJL39SkozMfE42bA/12/65195743/png/32x32/1/_/1/2/compass.png/EOzbzTIY4KMHIAcoBw/LxugMg_hMYUbpXLvXLJ4WGu3uZjxsqKNlp83VWPkUI4?size=1600x1200&size_mode=3 How to use simply paste this script above main, (my header is not needed for this script.) Demo I think not needed, simply follow the instructions in the first lines of the script and us script commands looking like that: https://www.dropbox.com/s/9oh1njewy4d3vc8/compass_command.png?dl=0 Script Download this file: https://www.dropbox.com/s/o89x1v97eoyzfbj/tidloc_compass.rb?dl=0 You'll also need a graphic for the compass in the path: \Graphics\Pictures\ like: https://photos-3.dropbox.com/t/2/AADI74qU0MH-Ww03pRAayCRsQ-GARneEaJd-bMCsqMWOqg/12/65195743/png/32x32/1/_/1/2/compass_needle.png/EOzbzTIY4KMHIAcoBw/A_XHcckZNISXO4DL6vbjroGG-ldmbqF7uTITbl8yVnI?size=1600x1200&size_mode=3 (as it is now, the graphic will be shrinked by half of the height and width) FAQ Q: I found a bug or have a suggestion, how ca I contact you? A: please look into my signature, there you'll always find the most recent contact information! nothing asked so far, if important things appear, I will update this part. Credits and Thanks Tidloc Author's Notes This script has been requested by Niko Changelog: Spoiler 05/25/2012: implemented this script 04/29/2018: updated contact information. Edited April 29, 2018 by Tidloc 1 ShinGamix reacted to this Share this post Link to post Share on other sites
+ Novem 344 Posted May 25, 2012 (edited) Incredible, thanks Tidloc. By the way, you forgot to put the graphic for the compass in here, lol Edited May 25, 2012 by Niko Jose DelValle Share this post Link to post Share on other sites
Tidloc 55 Posted May 25, 2012 lol, yeah, noticed it myself and when I look into this thread, you already stated it... xDD Share this post Link to post Share on other sites
Galv 1,387 Posted May 26, 2012 This is a very cool script - nice one Tidloc. I'm getting a problem when trying this out. The compass works, points the right direction and everything is fine until the actor steps on the actual location co-ordinates it brings up this error: Script 'Compass Script' line 80:Math::DomainError occurred. Numerical argument is out of domain - "atan2" Tried on a fresh project, too - same thing happens. Share this post Link to post Share on other sites
+ Novem 344 Posted May 26, 2012 (edited) I encountered that problem to. Just make sure there is something to prevent the player from stepping on the tile. Make sure it's an event or something, at least it seems to be the best option for now anyways. Edited May 26, 2012 by Niko Jose DelValle Share this post Link to post Share on other sites
Galv 1,387 Posted May 26, 2012 I was actually hoping to use this for finding buried treasure and you need to dig on that spot Would it be difficult to perhaps make the compass spin in circles or even change the picture once someone is standing on the co-ordinates? Share this post Link to post Share on other sites
+ Novem 344 Posted May 26, 2012 Well, even I can figure out what's causing the error... once you step on the event, it has nowhere to point so it gets an error. It should be a rather simple fix to just make the graphic change to something else once you step on top of where it is. Still, for what it is, this is a rad script. Share this post Link to post Share on other sites
Tidloc 55 Posted May 26, 2012 (edited) lol, somehow I oversaw this ^__^ updated, so if you're on the marked spot either it shows another picture or erases the compass. I couldn't find out how to rotate it, as it doesn't work the way i thought it would... -__- Edited May 26, 2012 by Tidloc Share this post Link to post Share on other sites
Galv 1,387 Posted May 26, 2012 I really appreciate you fixing this up, Tidloc However, I can't get the updated script to work at all now. Script 'Compass Script' line 93: SyntaxError occurred. unexpected $end, expecting keyword_end I wish I knew some scripting, it sounds like a missing end line or something? I tried adding and removing ends but didn't know what I was doing and didn't get it to work Share this post Link to post Share on other sites
Tidloc 55 Posted May 26, 2012 I somehow didn't copy the whole script, now it's working! Share this post Link to post Share on other sites
Galv 1,387 Posted May 26, 2012 Perfect - thank you very much Tidloc. Share this post Link to post Share on other sites
Ravenith 5 Posted May 26, 2012 Nice one. I'd use it as a quest compass, maybe. Share this post Link to post Share on other sites
+ Novem 344 Posted May 26, 2012 Nice one. I'd use it as a quest compass, maybe. That's what I'm using it for. My game has a huge open world, without something to guide the player from point to point, a lot of exploring would be done, lol Share this post Link to post Share on other sites
dcshadow90 1 Posted October 13, 2012 lets say once they reach the coordinate, a green check would pop up. How would you do that? Share this post Link to post Share on other sites
Nate The Great 10 Posted October 15, 2012 Can we move the position of the Compass to the other side? I currently have a clock I am displaying in the right-hand corner... and would love to put the Compass in the left-hand corner. It seems like it should be easy enough, but I am not seeing where to do it in the script. Share this post Link to post Share on other sites
Galv 1,387 Posted October 15, 2012 Right at the top of the script, line 29 is the X value change it to: X = 32 Share this post Link to post Share on other sites
Nate The Great 10 Posted October 15, 2012 (edited) Gotcha! That Graphics.width - was what was making me nervous.... hehe. Wasn't certain if I wanted to remove that to test... Thanks Galv! And way to go Tidloc! This is great EDIT: Found a bug! If the compass is displayed on the world map... and you save the game... the compass will still be there. If you then quit the game, and load the game from that save, you will see the compass for about a frame or two before it dissapears... If you transfer into a map ... then transfer back, it fixes it. (I have mine set to a switch that is set to on far prior to the save...) I have not yet tried this on a clean project... but I assume it will repeat... Edited October 19, 2012 by Nate The Great Share this post Link to post Share on other sites
+ AdamSakuru 43 Posted August 16, 2014 Hey, Tidloc, your script isn't working. I thought it was something in my game but I've tried it in a fresh project. The compass just doesn't show up. Share this post Link to post Share on other sites
Berlioz 2 Posted September 17, 2014 Same. I can't find any other scripts like this, it would be great to get this one to work. Share this post Link to post Share on other sites
bloodyliao 5 Posted September 20, 2014 Your script isn't working in my project, either. Hope that it can be fixed Share this post Link to post Share on other sites
+ AdamSakuru 43 Posted September 22, 2014 Hey guys, when I had the issue with this I tracked down the member the script was written for and got the original working script and used it in my project. Here's the working script: ################################################################################ # Compass script v.1.0.1 # # by Tidloc # #==============================================================================# # simple script, that allows on given maps a compass to appear and point at a # # given point on that map. To define that point use th following command: # # Tidloc::Set_Coord(*map*,*x*,*y*) # # were x and y are the x and y coordinates on that map. # # If no coordinates are saved for a specific map, no compass will appear. # #==============================================================================# # Only adjustable thing in this script is the name of the graphic for the # # compass, and the place where the compass will be shown. Everything else # # will be calculated on its own by using the stated command. You can erase the # # saved coordinates with the command: # # Tidloc::Clear_Coord(*map*) # # You are free to leave the map out, then all coordinates will be erased. # #==============================================================================# # Feel free to use this script, but please credit me for my work! ^__^ # ################################################################################ $imported = {} if $imported.nil? $imported["Tidloc-Compass"] = true module Tidloc module Compass Graphic = "compass_needle" Target = "compass_exclamation" X = Graphics.width - 75 #Graphics.width - 32 Y = 82 end ################################################################################ ################################################################################ ################################################################################ class<<self def Set_Coord(map,x,y) $game_temp._tidloc_compass[map] = [x,y] end def Clear_Coord(map = nil) if map == nil $game_temp._tidloc_compass = [] else $game_temp._tidloc_compass[map] = nil end end end end class Game_Temp attr_accessor :_tidloc_compass alias wo_compass_init initialize def initialize self._tidloc_compass = [] wo_compass_init end end class Scene_Map < Scene_Base alias wo_compass_update update def update wo_compass_update if $game_temp._tidloc_compass[$game_map.map_id] x = Tidloc::Compass::X y = Tidloc::Compass::Y $game_map.screen.pictures[101].show(Tidloc::Compass::Graphic, 1, x, y, 50, 50, 255, 0) xdif = $game_player.x - $game_temp._tidloc_compass[$game_map.map_id][0] ydif = $game_player.y - $game_temp._tidloc_compass[$game_map.map_id][1] angle = 0 if ydif == 0 && xdif > 0 angle = 180 elsif ydif == 0 && xdif < 0 angle = -180 elsif xdif == 0 && ydif > 0 angle = 0 elsif xdif == 0 && ydif < 0 angle = 360 elsif xdif == 0 && ydif == 0 $game_map.screen.pictures[101].erase unless Tidloc::Compass::Target.nil? $game_map.screen.pictures[101].show(Tidloc::Compass::Target, 1, x, y, 50, 50, 255, 0) end else angle = Math::atan2(xdif + 0.0, ydif + 0.0) * 360.0 / Math::PI end $game_map.screen.pictures[101].rotate(angle) else $game_map.screen.pictures[101].erase end end end Share this post Link to post Share on other sites
lottesong 0 Posted September 22, 2017 Sounds very interesting , too bad every script by Tidloc is no longer available ,sniffs. Share this post Link to post Share on other sites
Tidloc 55 Posted September 23, 2017 oh really? contact me, when you find such a script! I'll insert a new download link Share this post Link to post Share on other sites
roninator2 238 Posted September 23, 2017 (edited) trying a few, compass and custom equips missing so far. but the custom equip demo is good. Copied the script displayed by adamsakaru and downloaded the graphic. Tested and works well. Edited September 23, 2017 by roninator2 add on Share this post Link to post Share on other sites
Tidloc 55 Posted September 23, 2017 5 hours ago, roninator2 said: trying a few, compass and custom equips missing so far. but the custom equip demo is good. Copied the script displayed by adamsakaru and downloaded the graphic. Tested and works well. I'd not use the demo's scripts, they may be well out of date and buggy (not that long for the custom equips I think) but updated the mentioned script's links! Damn dropbox with their stop of supporting the public folder, some links work, other don't and others again stop working after some time, it seems... >_> Share this post Link to post Share on other sites