Play map that isn't in my title pack but is in Maps folder?

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
BigBang1112
Posts: 389
Joined: 20 Jul 2015, 12:44
Location: Czech Republic
Contact:

Play map that isn't in my title pack but is in Maps folder?

Post by BigBang1112 »

I'm more and more finding that Maniaplanet has some serious problem with reading local files.
Not only the buggy file://, but also PlayMap from CManiaAppTitle which seems to work only for maps that are right inside the title pack and not for any map that the user has installed.

Is there a way how to play a map from a script that user has installed and is not directly presented in the title pack?
Or simply, how can I read files in my title pack that are not directly in the titlepack but just installed in folders of Documents/Maniaplanet?
Example of PlayMap would be maximally appreciated as I think I'm just lost. :)
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
zocka
Posts: 205
Joined: 15 Jun 2010, 17:56

Re: Play map that isn't in my title pack but is in Maps folder?

Post by zocka »

So finally I built myself a little "map browser" to test your problem.

While in edit-mode you actually only see the maps you are including in your TP, DataFileMgr.Map_GetGameList returns everything in Documents\ManiaPlanet\Maps\ (or whereever your MP lives) once you install your TP into a station and load it from there.

However you get some weird duplicates if a map is included in both your titlepack and your local files on the same path, but that shouldn't be a problem in a real-world scenario where you organize your maps etc.
manialink minigame shatter
my manialink: zockaml
my maniaflash: maniaflash?zocka
User avatar
BigBang1112
Posts: 389
Joined: 20 Jul 2015, 12:44
Location: Czech Republic
Contact:

Re: Play map that isn't in my title pack but is in Maps folder?

Post by BigBang1112 »

Glad you reminded me with that CDataFileMgr again, I think I just did my code wrong there so now I see it's working nicely. It will be useful for reading more map data in the future of my title.

Wait, PlayMap does not seem to work on Documents/Maps maps. :shock:
Edit: But PlayMap in CTitleFlow does, kinda interesting.

Sad I can't read a local manialink just the way I can play maps. Nadeo, please fix file:// !!!

Yet thanks for answering this fast, you probably saved Reunited.
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest