Page 1 of 2
xmap - the thinking man's overworld
Posted: Wed Apr 20, 2022 7:47 pm
by deice
hello everybody. i come to you with this thread having both updated chocomap somewhat and added some more cool things to spruce your vanilla world map up with. i give you:
xmap.lua
(
download |
changelogs and documentation |
example episode )
xmap is a library that automatically loads several world map libraries for you. all of them have to be in the same folder and they can then be accessed through xmap, for example:
Code: Select all
local xmap = require("xmap")
local chocomap = xmap.chocoMap
function onStart() chocomap.addCameraBoundary(...) end
the currently available libraries are:
- chocoMap v1.3
- coinSign v1.01
- wanime v1.0
- xmusic v1.0
- xpath v1.09
- xtile v1.0
descriptions follow below
chocomap.lua
the beloved world map re-renderer. minor fixes and tweaks come with it's merger into xmap, but it's mostly as it's known.
brief feature showcase: show
coinsign.lua
nsmb star coin gates, that's pretty much it.
brief feature showcase: show
lock paths leading out from levels behind a required star coin count. can also easily be customized to take different currency counters into account. requires the "sign.png" inside the same folder by default.
wanime.lua
handy effects for the overworld.
brief feature showcase: show
create and easily manipulate disposable objects on the world map which can be configured to your liking.
xmusic.lua
marginally more control over the overworld music.
brief feature showcase: show
overrides the music playing on the overworld and lets you more easily manually play music. works with files in your episode folder that override the default music as well as music.ini, but doesn't allow arbitrary music ids or entirely custom music.
to make it work, you must call:
inside "map.lua". (preferrably in onStart())
this is because this library will interfere with other libraries which seize the sound stream and thus is not automatically active. if you do have other such libraries loaded, it's recommended to ignore this while using xmap.
(no gif as this is strictly an audio library and thus has no visual demonstration lol)
(special thanks to jukebox.lua for music.ini reading code)
xpath.lua
paths but awesome.
brief feature showcase: show
lets you manually open paths, and gives you the option to reduce the wait time between them appearing as well as to easily manipulate under what conditions paths actually get opened. to use, you have to place:
at the top of your episode's global "luna.lua" file.
xtile.lua
lunar magic overworld events eat your heart out.
brief feature showcase: show
lets you make (optionally permanent) changes to the overworld's tile structure. very versatile but doesn't let you create new tiles or go over the hard limit designated by smbx.
(note regarding documentation: indentation signifies hierarchy (i.e. where you put the dots, except for methods where it lists arguments), [...] signifies numerical table indexing, rest should be explained)
leave feedback and report any bugs you find. hope you enjoy, more to come (?)
Re: xmap - the thinking man's overworld
Posted: Thu Apr 28, 2022 2:35 pm
by deice
xpath has been updated (now works properly with paths leading out from direct overworld warps) and a new library, xtile, has been added. check 'em out in the original post.
Re: xmap - the thinking man's overworld
Posted: Mon May 09, 2022 3:19 am
by deice
updates and bugfixes to chocomap (please update if you were using removeCameraBoundary(), a new change was made to it to circumvent a very nice lua feature) and xpath, as well as another new library have been added. more details in the links inside the OP.
Re: xmap - the thinking man's overworld
Posted: Sun May 15, 2022 6:42 pm
by deice
xpath has been changed to disable the jump button while the player is walking to fix a bug regarding warps. also to fix a bug where music doesn't change immediately under some conditions, a new library (xmusic) has been added. check the OP for hard hits
Re: xmap - the thinking man's overworld
Posted: Tue Jun 07, 2022 1:00 pm
by Mal8rk
If this had diagonal paths, this would be an easier to use smwMap
Still very cool though
Re: xmap - the thinking man's overworld
Posted: Tue Jun 07, 2022 1:21 pm
by deice
POPME wrote: ↑Tue Jun 07, 2022 1:00 pm
If this had diagonal paths, this would be an easier to use smwMap
Still very cool though
i do appreciate the compliment but diagonal paths are unfortunately impossible for me to implement into this library as it relies on smbx's vanilla overworld logic under the hood, which means there can only be 4-directional movement.
(also, this and smwmap have different goals and use cases so personally i wouldn't compare them)
Re: xmap - the thinking man's overworld
Posted: Tue Jun 07, 2022 5:52 pm
by JamesR624
This is amazing! I was wondering if it would be possible to include example files (.wld, .lua, .txt, .png, etc) so we can get an idea of exactly how we're supposed to format things, like for example, the syntax for how to add things to map.lua or perhaps some example png's and txt's for the syntax of those files ofr wanime.lua?
I think this library might accomplish the small thing I am trying to do but I cannot for the life of me figure out how to properly format the files themselves from just the linked documentation sadly.
Re: xmap - the thinking man's overworld
Posted: Wed Jun 08, 2022 11:27 am
by deice
JamesR624 wrote: ↑Tue Jun 07, 2022 5:52 pm
This is amazing! I was wondering if it would be possible to include example files (.wld, .lua, .txt, .png, etc) so we can get an idea of exactly how we're supposed to format things, like for example, the syntax for how to add things to map.lua or perhaps some example png's and txt's for the syntax of those files ofr wanime.lua?
I think this library might accomplish the small thing I am trying to do but I cannot for the life of me figure out how to properly format the files themselves from just the linked documentation sadly.
that's not a bad idea at all actually, i've updated the OP with a link to an example episode i've quickly thrown together.
i've also updated the
download for the main script because somehow it appears that the default "sign.png" was missing from it. if anyone reading intends to use coinsign but gets an error, you might want to redownload.
Re: xmap - the thinking man's overworld
Posted: Thu Jul 28, 2022 8:59 am
by deice
a minor update has been made to xpath. onPathOpened and onLevelOpened are now registered as custom events by default, meaning you can override them within other libraries as well.
Re: xmap - the thinking man's overworld
Posted: Sat Aug 06, 2022 4:45 am
by SEDYON
Hello, the download is not working! MediaFire is constantly generating a new download key.
Re: xmap - the thinking man's overworld
Posted: Sat Aug 06, 2022 6:02 am
by deice
Boo128 wrote: ↑Sat Aug 06, 2022 4:45 am
Hello, the download is not working! MediaFire is constantly generating a new download key.
a very weird issue. all of my other files were working just fine so it seemed mediafire had a specific problem with that file in particular.
i've reuploaded it and it should be working now. thank you for notifying.
Re: xmap - the thinking man's overworld
Posted: Fri Oct 28, 2022 10:56 am
by baenyth
Xmap is disabling the custom tiles I'm using. Not the levels or paths, just the tiles. Is this intentional? If so, is there a way to undo it?
Re: xmap - the thinking man's overworld
Posted: Fri Oct 28, 2022 11:57 am
by deice
baenyth wrote: ↑Fri Oct 28, 2022 10:56 am
Xmap is disabling the custom tiles I'm using. Not the levels or paths, just the tiles. Is this intentional? If so, is there a way to undo it?
xmap unfortunately does not support the vanilla functionality of automatically detecting tile size based on image size. you can work around this by making text files for those tiles which specify the required parameters. if i get the time, i'll probably address that in a future update.
Re: xmap - the thinking man's overworld
Posted: Fri Oct 28, 2022 12:31 pm
by baenyth
Do you mean like config files? Because those aren't working for me.
Re: xmap - the thinking man's overworld
Posted: Fri Oct 28, 2022 12:47 pm
by deice
baenyth wrote: ↑Fri Oct 28, 2022 12:31 pm
Do you mean like config files? Because those aren't working for me.
yes. could you provide a screenshot of your episode folder? the configuration files have to be written in all-lowercase, have to have a .txt extension and be in the episode folder (same as the rest of the custom overworld assets). for example, if you want to resize tile-1 to be 64x64, you'd create a file inside your episode folder called "tile-1.txt" and place:
inside.
Re: xmap - the thinking man's overworld
Posted: Fri Oct 28, 2022 3:25 pm
by baenyth
Alright, here's a screenshot of my folder with the tile files:
And here's what each file looks like:
And here's what my world still looks like with the files:
I'm starting to think it might not be the tile config files. I think some of the tiles didn't change in size. Any other ideas to what it might be?
Re: xmap - the thinking man's overworld
Posted: Fri Oct 28, 2022 3:30 pm
by deice
baenyth wrote: ↑Fri Oct 28, 2022 3:25 pm
I'm starting to think it might not be the tile config files. I think some of the tiles didn't change in size. Any other ideas to what it might be?
indeed it's not the config files, the issue seems to be that the images aren't loading. the only thing that i can think of is that you might be using gif images instead of png images (xmap does not support the legacy gif format). if you are, you can use "gifs2png" inside "data/pge" to batch-convert them or open them in an image editor and save them again as png files.
Re: xmap - the thinking man's overworld
Posted: Fri Oct 28, 2022 4:09 pm
by baenyth
It worked! Thank you very much!
Re: xmap - the thinking man's overworld
Posted: Fri Nov 18, 2022 6:38 am
by deice
i've received a report and confirmed the presence of possible framedrops when using xmap. namely, chocomap will exhibit performance issues when your world map has a large number of tiles (around 6.5k is where it starts to become pretty noticeable).
it is possible to mitigate this for the most part by going into chocomap.lua line 424 and replacing
with
Code: Select all
Tile.getIntersecting(playerCamera.x, playerCamera.y, playerCamera.x + SCRWIDTH, playerCamera.y + SCRHEIGHT)
however, this takes advantage of an smbx2 feature where it will automatically set the physical size of a tile to the size of its image, and thus might not work properly for custom animated tiles.
i intend to wait for the next smbx2 update to see any changes made regarding the overworld before i get into more seriously testing this along with other possible optimizations and then releasing an official update.
Re: xmap - the thinking man's overworld
Posted: Sat Nov 19, 2022 12:00 am
by Alucard648
deice wrote: ↑Fri Nov 18, 2022 6:38 am
i intend to wait for the next smbx2 update to see any changes made regarding the overworld before i get into more seriously testing this along with other possible optimizations and then releasing an official update.
Which will take ages to do.