Hey, we have forums!

Author Topic: World Maps in Mods (Beta Testers Wanted)  (Read 29145 times)

0 Members and 1 Guest are viewing this topic.

Offline calebj

  • Bit
  • ***
  • Posts: 28
    • View Profile
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #15 on: January 13, 2010, 02:35:39 am »
Wow!  This is perfect.  I tried your demo on my MacBook and it seemed to work perfectly.  However, I encountered problems when trying to incorporate it into my own mod.  I (being inexperienced  at scripting and such) could not figure out how to make my images appear on the minimap.  For example:
   
{"mul", "mmaps/mul.png", 0, 0, 256, 256, 650, "Open Passages",

i changed this to:
{"calebtest", "mmaps/calebtest.png", 0, 0, 256, 256, 650, "Welcome to Caleb's test map!",

my map is named calebtest and there is a picture called calebtest.png in a mmaps folder in the graphics folder.  The words appear when I start the level and I can open the minimap however I only get the plain we-cant-find-your-image squares.  Also, i happened to leave one of the demo maps in the folder and it came up when there was no reference to it in the whole script.  Edwards, you said you would post more detailed instructions for stupid people like me so, if this is the case, feel free to ignore this and I will figure it out when they are posted.

Thanks,
Caleb

Offline TheBear

  • Extra Bit
  • *****
  • Posts: 199
    • View Profile
    • http://doconnell.wordpress.com
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #16 on: January 13, 2010, 02:55:18 am »
Quote
dofile(appendUserDataPath("_mods/rpg_PrequelCampaign/scripts/mm_common.lua"))
There is a line of code in "node_mm_flagmap.lua" and "mm_Minimapper.lua" inside of your mod (above code). You need to change the folder directory of the above line to your mod so that it uses your version of "mm_common.lua."

Offline Guy

  • Bit Bit
  • ****
  • Posts: 62
    • View Profile
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #17 on: January 19, 2010, 01:42:14 am »
Edwards, get a Dropbox account ;). As Yogoda said, Rapidshare is really annoying.

3) Clicking on the minimap does not produce that expanding ripple effect.
Is this really an issue? Mods don't do this anyway and I'm not entirely sure how it relates to the world map.

As for widescreen, there is a minor annoyance: The minimap is on the right in the 'wide' part of the screen while the world map remains at 4:3 in the middle of the screen. As a result, the mouse cursor is off the right edge of the world map when you activate it and it immediately begins to scroll.


Just as a proof-of-concept, here's a screenshot of your maps 'replacing' the main game to get the real world map functioning :)


[edit] Here's the mod bundled up like this (Mac only): MM Demo 486 KB
Put it in the same folder as Aquaria (or change the symlink in the root of the bundle to point to your copy of Aquaria).
« Last Edit: January 22, 2010, 05:03:37 am by Guy »

Offline Edwards

  • Bit Bit
  • ****
  • Posts: 93
    • View Profile
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #18 on: January 20, 2010, 12:44:45 am »
Edwards, get a Dropbox account ;). As Yogoda said, Rapidshare is really annoying.
All right, all right.  I hadn't realized it was usable for file sharing in this manner.  I'll see

3) Clicking on the minimap does not produce that expanding ripple effect.
Is this really an issue? Mods don't do this anyway and I'm not entirely sure how it relates to the world map.
I interpret mods not doing it as a sign that the minimap has no functionality when clicked, so, since I've restored on-click functionality, I should also restore the ripple effect.  Also, there's a bug in widescreen mode where double-clicking to the left of the minimap will still bring up the world map, and it will be less surprising if that happens if the minimap gives an indication whenever it registers a click.

As for widescreen, there is a minor annoyance: The minimap is on the right in the 'wide' part of the screen while the world map remains at 4:3 in the middle of the screen. As a result, the mouse cursor is off the right edge of the world map when you activate it and it immediately begins to scroll.
Good point.  Do you think it's worth the effort to hack together something to make the map ignore the mouse for scrolling purposes until it is moved, or should I just move the cursor 100 pixels to the left when the map opens?

Just as a proof-of-concept, here's a screenshot of your maps 'replacing' the main game to get the real world map functioning :)
I never said it wasn't possible, I just said Alphasoldier's approach might not be reasonable. It's certainly overkill to replace the data files just to get a minimap. :)

[EDIT] That looks like a really cool and simple way to replace the maps, although it doesn't seem to be working on my system (MacOS 10.6.2).  I haven't poked it very much, so I don't know what's going wrong.  It launches, but doesn't create a window or do anything else.

- Edwards
« Last Edit: January 20, 2010, 12:53:27 am by Edwards »
You should only need one canister shell to bag your deer using your howitzer, but assemble more than one if  you have a mind to.1

Offline Guy

  • Bit Bit
  • ****
  • Posts: 62
    • View Profile
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #19 on: January 20, 2010, 01:09:29 am »
Good point.  Do you think it's worth the effort to hack together something to make the map ignore the mouse for scrolling purposes until it is moved, or should I just move the cursor 100 pixels to the left when the map opens?
Is it possible to get the game resolution? You could stretch the map to fit or something. Otherwise, if you're going to move the cursor I'd say just stick it in the center of the screen.

[EDIT] That looks like a really cool and simple way to replace the maps, although it doesn't seem to be working on my system (MacOS 10.6.2).  I haven't poked it very much, so I don't know what's going wrong.  It launches, but doesn't create a window or do anything else.
Hm, maybe a symlink went awry. Not sure though, it should all be fine. I'm on 10.6.2 as well.

There's a problem that I haven't worked out yet: If you save and load again you get a bunch of "Tile Dummy" errors.
[edit] Solved this: The worldmap file doesn't support comments. If you download it now everything should be working flawlessly.
Here's the worldmap format, as best I've been able to determine:
Code: [Select]
int     index
int     stringbank entry for displayed map name
string  map filename
bool    start zoomed in
float   scale (ignoring gems)
float   x position
float   y position
bool    visible at game start
float   scale (including gems)
« Last Edit: January 22, 2010, 05:05:57 am by Guy »

Offline prestart

  • Bit
  • ***
  • Posts: 20
    • View Profile
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #20 on: January 22, 2010, 09:24:44 am »
well, I've tried out the demo, and It's never been better to have such a wonderful idea! The problem bother me during playing sacrifice you know...
Hope this function can be patched into sacrifice MOD! ;)
e-mail to me ??    rawcliff@sina.com

Offline Yogoda

  • Extra Bit
  • *****
  • Posts: 144
    • View Profile
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #21 on: January 25, 2010, 11:38:47 pm »
Wow, it's a wonderful work, I love it ! :)

I would like to integrate it in our mod, maybe with modifications too, is it ok ? We will of course mention your name.

Offline Edwards

  • Bit Bit
  • ****
  • Posts: 93
    • View Profile
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #22 on: January 29, 2010, 11:49:48 pm »
Good point.  Do you think it's worth the effort to hack together something to make the map ignore the mouse for scrolling purposes until it is moved, or should I just move the cursor 100 pixels to the left when the map opens?
Is it possible to get the game resolution? You could stretch the map to fit or something. Otherwise, if you're going to move the cursor I'd say just stick it in the center of the screen.
I have not been able to determine actual resolution.  As far as I can tell, the game always reports window information based on an 800x600 window.

Here's the worldmap format, as best I've been able to determine:
...
That could be useful, although it's slightly unfortunate that there's no obvious mechanism to hide a tile after it has been discovered.  Also, what exactly do the two scale value do?

I would like to integrate it in our mod, maybe with modifications too, is it ok ? We will of course mention your name.
Certainly. This isn't exactly a useful feature if it isn't integrated into decently-sized mods.

- Edwards
You should only need one canister shell to bag your deer using your howitzer, but assemble more than one if  you have a mind to.1

Offline Guy

  • Bit Bit
  • ****
  • Posts: 62
    • View Profile
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #23 on: January 30, 2010, 11:11:24 am »
That could be useful, although it's slightly unfortunate that there's no obvious mechanism to hide a tile after it has been discovered.  Also, what exactly do the two scale value do?
The scale ignoring gems seems to scale the map image while leaving the gems exactly where they are. So you have to get this value correct in order to line the map up with the gems. With the maps in your mod though, a value of 1 was perfect for all, so I'm not sure what circumstances would require anything other than 1.

Did you get the mod bundle to work?

Offline Yogoda

  • Extra Bit
  • *****
  • Posts: 144
    • View Profile
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #24 on: February 09, 2010, 08:45:38 am »
Ok, I've integrated your mini-map system. I have to say, you did a really great job with the scripting.

However, I've changed some little things :

- I don't like to change of the zoom when using the mini-map. It seems you need it to be able to have your background tile always covering the screen, so we see the arrows on the borders. So, I've removed the zoom override, and made so we can click and hold the mouse to drag the map. Changed the background to all black, and made it very big so it covers all the screen, in every resolution. Changing the resolution will change the amount of map we can see, but this is not very important.

- The map is centered on the current map, I've changed it to center on Naija's location

- It was not displaying maps that are not squares in the correct location, fixed it.

- Added right click to exit the map

- Disable input when the map is displayed, so we can not rotate Naija when moving the map.

Now the only problem I have are the tiles in layers 8 and 9 that are drawn over the map :-[ but I can't find a solution.


Tell me if you want the script
« Last Edit: February 09, 2010, 08:23:38 pm by Yogoda »

Offline Yogoda

  • Extra Bit
  • *****
  • Posts: 144
    • View Profile
Re: World Maps in Mods (Beta Testers Wanted)
« Reply #25 on: February 19, 2010, 08:13:58 am »
I have made additional changes :

- Zoom :

Instead of changing the game zoom, I use the computed current zoom to scale the map accordingly. This way, the maps always stays the same size and the game zoom is untouched.

- Layers 8 and 9 :

I simply hide those layers using setElementsLayersVisible() when displaying the map, so they don't go in the way.

- Escape :

The Aquaria menu now don't show when hitting escape to exit the map.

- Coordinates :

Have to be given in global coordinates, no more map center offset


Here are the updated scripts :
http://cid-4356617b22d73a0a.skydrive.live.com/self.aspx/.Public/minimap_scriptsupdate.zip
« Last Edit: February 19, 2010, 08:48:23 am by Yogoda »