Z levels and maps

How, what and why to code in BYOND.
Post Reply
User avatar
Tokiko2
Joined: Mon Apr 21, 2014 12:18 am
Byond Username: Tokiko1

Z levels and maps

Post by Tokiko2 » #283916

Is there any easy way to get tgcode to load specific maps for each z level?

I'm trying to have a small map stretching across 5 zlevels and one z level for adminstuff. No lavaland or random empty space. How would I go about doing this? What files need changing? Or should I just go with baycode instead?
User avatar
BeeSting12
Joined: Sat Apr 16, 2016 1:11 am
Byond Username: BeeSting12
Github Username: BeeSting12
Location: 'Murica

Re: Z levels and maps

Post by BeeSting12 » #283922

>small map
>goes across 5 zlevels
How is that small?
Edward Sloan, THE LAW
Melanie Flowers, Catgirl
Borgasm, Cyborg
Spoiler:
OOC: Hunterh98: to be fair sloan is one of the, if not the, most robust folks on tg

DEAD: Schlomo Gaskin says, "sloan may be a faggot but he gets the job done"

DEAD: Rei Ayanami says, "YOU'RE EVERYWHERE WHERE BAD SHIT IS HAPPENING"
DEAD: Rei Ayanami says, "IT'S ALWAYS FUCKING EDWARD SLOAN"
oranges wrote:Bee sting is honestly the nicest admin, I look forward to seeing him as a headmin one day
[2020-05-21 01:21:48.923] SAY: Crippo/(Impala Chainee) "Shaggy Voice - She like... wants to get Eiffel Towered bro!!" (Brig (125, 166, 2))
hows my driving?
User avatar
cedarbridge
Joined: Fri May 23, 2014 12:24 am
Byond Username: Cedarbridge

Re: Z levels and maps

Post by cedarbridge » #283937

Tokiko2 wrote:Is there any easy way to get tgcode to load specific maps for each z level?

I'm trying to have a small map stretching across 5 zlevels and one z level for adminstuff. No lavaland or random empty space. How would I go about doing this? What files need changing? Or should I just go with baycode instead?
Remmie is already working on a multi-z project. Best to look at what's already been done with that.
onleavedontatme
Joined: Fri Mar 13, 2015 10:26 pm
Byond Username: KorPhaeron

Re: Z levels and maps

Post by onleavedontatme » #284036

Ask Cyberboss, he did the new map loading.
bman
Github User
Joined: Fri Oct 14, 2016 4:55 pm
Byond Username: Basilman
Github Username: Militaires

Re: Z levels and maps

Post by bman » #284037

cedarbridge wrote:
Tokiko2 wrote:Is there any easy way to get tgcode to load specific maps for each z level?

I'm trying to have a small map stretching across 5 zlevels and one z level for adminstuff. No lavaland or random empty space. How would I go about doing this? What files need changing? Or should I just go with baycode instead?
Remmie is already working on a multi-z project. Best to look at what's already been done with that.
>remie

that wouldnt be a problem if they didnt fuck OFF THE PLANET
User avatar
Tokiko2
Joined: Mon Apr 21, 2014 12:18 am
Byond Username: Tokiko1

Re: Z levels and maps

Post by Tokiko2 » #284362

Kor wrote:Ask Cyberboss, he did the new map loading.
How do I do that? Where, how?

I've dug around in the code a bit and found the mapping subsystem that uses the dmm_suite.dm maploading thing which I assume seems to be what I want. Or not? There also seem to random empty z levels(which I assume are the random emptz space z levels) being loaded or possibly generated somewhere, how do I disable those too?

Another thing that I wonder is if multi-z level files are okay to be loaded with that loader. I've tried it and it seems to work for now, but I am not sure if this causes any horrifying bugs in the long run. I can see the advantage in having each z level of the map being its own file but I really want them all in one file for the much faster workflow.
User avatar
Screemonster
Joined: Sat Jul 26, 2014 7:23 pm
Byond Username: Scree

Re: Z levels and maps

Post by Screemonster » #284390

BeeSting12 wrote:>small map
>goes across 5 zlevels
How is that small?
5 100x100 maps is less tiles than 1 250x250 map
onleavedontatme
Joined: Fri Mar 13, 2015 10:26 pm
Byond Username: KorPhaeron

Re: Z levels and maps

Post by onleavedontatme » #284467

Tokiko2 wrote:
Kor wrote:Ask Cyberboss, he did the new map loading.
How do I do that? Where, how?

I've dug around in the code a bit and found the mapping subsystem that uses the dmm_suite.dm maploading thing which I assume seems to be what I want. Or not? There also seem to random empty z levels(which I assume are the random emptz space z levels) being loaded or possibly generated somewhere, how do I disable those too?

Another thing that I wonder is if multi-z level files are okay to be loaded with that loader. I've tried it and it seems to work for now, but I am not sure if this causes any horrifying bugs in the long run. I can see the advantage in having each z level of the map being its own file but I really want them all in one file for the much faster workflow.
He is in #coderbus on irc.rizon.net most of the day.
User avatar
Tokiko2
Joined: Mon Apr 21, 2014 12:18 am
Byond Username: Tokiko1

Re: Z levels and maps

Post by Tokiko2 » #285523

I've managed to rewrite it.

In case anyone is interested and wants some pointers:

code/datums/map_config.dm
code/controllers/subsystem/mapping.dm
code/_DEFINES/maps.dm
The _map .dm files and the .json files are also involved.

map_config.dm reads and and converts the configs and mapping.dm then actually tries to load the stuff. maps.dm has some of the defines that are used in the other files. There's probably other stuff for ruins and away missions but I didn't bother with those. Feel free to provide a better explanation if I got anything of that wrong.
Post Reply

Who is online

Users browsing this forum: No registered users