worldspace in levels.txt : increasing areas ?

Post here for all aspects of map making and level design. Click here to visit the Keep's official map site, Diabolic Cartography.

Moderator: Paul Siramy

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
France

Hand-picked

worldspace in levels.txt : increasing areas ?

Post by Paul Siramy » Wed Feb 26, 2003 7:59 pm

I decided to take some time, and try to do something. Take data\global\excel\levels.txt. Now, let's imagine that the OffsetX and OffsetY columns are the upper/left corner of an area in the worlspace of the game, and let's consider that the SizeX and SizeY columns are respectively the Width and Height of these areas.

The minimum coordinates for the upper / left corner are (-4, -40)
The maximum coordinates for the bottom / right corner are (5200, 3147). (Act 2 - arcane : OffsetX = 5000, SizeX = 200 therefore the right corner of the arcane is at 5000 + 200 = 5200).

I have take all areas of Act 1 (because acts areas overlap in that worldspace, so let's just use Act 1 for now), make a big image in paint shop pro (5200 * 3200 pixels), and paint the areas over it.

A preview of the result : http://paul.siramy.free.fr/_divers/ds1/ ... review.gif (780 * 480 pixels, 10 kB).

The CYAN areas are the ones that have offsetX / Y and SizeX / Y meaningfull (not negative values). We find the Den of Evil, Jail levels, Tristram, Cow level ...

The GREEN and RED areas are the others. I think that the negative value (like -1 usually) means that area is dynamically placed in the worldspace, and properly links with the necessary ones (but I can be wrong here).

As you see it's well organized. Large and regular spaces between each areas. At the far Right part of the image you can find the Tristram and Moo Moo Farm levels. Here's now the full size image : http://paul.siramy.free.fr/_divers/ds1/worldspace.gif (5200 * 3200 pixels, 57 kB). On this image, keep in mind that each pixel is a Tile (!).

Now, go on the right part of this image, and check carefully the Tristram area. Its size is 43 * 48 pixels (the sizeof the tri_town4.ds1, in number of tiles). If you have already try to resize some areas before, you know that there's a limit. According to Joel, the maximim of Tristram he could resize it is 200 * 148 Tiles. And this is very interesting because ... check that preview of this tristram area : http://paul.siramy.free.fr/_divers/ds1/ ... istram.gif (681 * 526 pixels, 9 kB). If in Paint shop pro you select the maximum area you can, without exeding the right border, and without entering in the cow level area, you'll have an area of ... 200 * 148 pixels.

So, and it's only theorical right now, if in levels.txt you move areas (by the mean of OffsetX / Y) in a bigger place, or just take the cow level and move it down, you should increazed the size of Tristram more than the current maximum. To help you, understand that I have placed each areas in the BIG image by taking the OffsetX / Y values and draw them at the corresponding pixel coordinates (upper right corner of Tristram is at Offsets 5000, 1000 in levels.txt, and in the image at pixels coordinates 5000, 1000).

Now, I don't know if they're some restrictions, maybe some areas are dynamicly made where you're currently only seeing dark. But even if it don't work, I hope it was still interesting ;)

Good luck.


Edit : typo errors
Last edited by Paul Siramy on Thu Feb 27, 2003 7:09 am, edited 3 times in total.

User avatar
Red Havoc
Retired staff
Arch-Angel
Posts: 1191
Joined: Sun May 26, 2002 8:57 pm
Location: Berlin, Germany

Re: worldspace in levels.txt : increasing areas ?

Post by Red Havoc » Thu Feb 27, 2003 1:32 am

It IS interesting! :D

Just to make sure I understood you correctly: If I have problems increasing the size of some areas, I could just change those offsets (and put the map area to another place on this "worldmap" where enough space is) and get around this? Of course only if there are no restrictions you haven´t discovered yet... :?:
PLEASE READ THE TERMS OF SERVICE BEFORE POSTING

Avatar image is Scrat from 'IceAge' by Blue Sky Studios and Twentieth Century Fox

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12100
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U
United States of America

Hand-picked

Re: worldspace in levels.txt : increasing areas ?

Post by Myhrginoc » Thu Feb 27, 2003 3:26 am

I think those offsets may be act spaces, not world spaces. Each town has the same coordinates, except for Act 1. And what are town coordinates in the other acts are shared by two different levels in Act 1 (Stony Field and Dark Forest). I think what might happen is 1000,1000 is a general starting coordinate from which the act space is laid out in all directions. And you could have two spaces for Act 1 because the Stony Field and Dark Forest are coupled underground, there isn't an overland route between them.

It would be worthwhile to look in ptGame and see if any of these offsets are defined in the embedded levels structures, e.g. within (ptGame +e0) for Level 2. Then we would see if the game fills the -1 values out at load time Finding the code that does that might point us to the code that assembles complex levels from ds1 parts.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
France

Hand-picked

Re: worldspace in levels.txt : increasing areas ?

Post by Paul Siramy » Thu Feb 27, 2003 3:53 am

[quote="Red Havoc";p="72637"]Just to make sure I understood you correctly: If I have problems increasing the size of some areas, I could just change those offsets (and put the map area to another place on this "worldmap" where enough space is) and get around this? Of course only if there are no restrictions you haven´t discovered yet.[/quote]
In summary yes, that's what you should try. But in more details, you have to change the Offsets and/or the Sizes (but even if you didn't mentioned the Sizes, I think you still have tought of that).

Some litle areas are the size of a .ds1 (Tristram, Forgotten Tower ...) but some other areas are mazes that are using several .ds1, and I believe that these ds1 are placed onto the areas and never go outside them. So moving an area should be the optional 1st part of the increasing process, using bigger sizes is more important, and when 2 areas start to overlap, then it's ime to move them to be able to increase them more.

@Myhrginoc : You're right for the "act spaces". I only check the levels of act 1, and when I saw that Lut Gohlein were right into an existing area, I stopped my analyse. In any case, these Offsets and Sizes are used in 1 plane system, the trick will be to know which area is on which plane. I checked the Layer column in levels.txt, but didn't found any obvious correlations. I left the exercice of checking the datas at run-time in your hand, it's not a domain where I'm good ;)

User avatar
CorniI
Dark Alliance Beta Test
Champion of the Light
Posts: 371
Joined: Wed Apr 12, 2006 9:02 am

Re: worldspace in levels.txt : increasing areas ?

Post by CorniI » Sun Mar 16, 2008 1:47 pm

HI,
I've writen a tool which examines level size + offsets from RAM and draws a nice map of it, so we get 5 nice (accurate :P) Pics of the 5 acts, with all random placed levels in it. Keep in Mind that eG for Act1 the stony field spawns at 1000/1000 always, but the other levels are placed randomly around it (!) and we have just a one-time shot here.
Act1: http://www.files.to/get/213431/tlzl8koxo7
Act2: http://www.files.to/get/213432/weyzgo6h81
Act3: http://www.files.to/get/213433/atrgxe033d
Act4: http://www.files.to/get/213434/8tc5xge3mq
Act5: http://www.files.to/get/213435/f7azlay3b0
Linux is like a Wigwam - NO Windows, no Gates and Apache inside

User avatar
BuffyS
Posts: 12
Joined: Sun Jan 06, 2008 8:39 pm

Re: worldspace in levels.txt : increasing areas ?

Post by BuffyS » Thu Oct 30, 2008 10:47 pm

[quote=Aggrocorni";p="380300"]HI,
I've writen a tool which examines level size + offsets from RAM and draws a nice map of it, so we get 5 nice (accurate :P) Pics of the 5 acts, with all random placed levels in it. Keep in Mind that eG for Act1 the stony field spawns at 1000/1000 always, but the other levels are placed randomly around it (!) and we have just a one-time shot here.
Act1: http://www.files.to/get/213431/tlzl8koxo7
Act2: http://www.files.to/get/213432/weyzgo6h81
Act3: http://www.files.to/get/213433/atrgxe033d
Act4: http://www.files.to/get/213434/8tc5xge3mq
Act5: http://www.files.to/get/213435/f7azlay3b0[/quote]

Can you please re-post these files? Act2 - Act5 are no longer available :(

Thanks! :)

User avatar
Drac0
Retired staff
Angel
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia
Australia

Re: worldspace in levels.txt : increasing areas ?

Post by Drac0 » Mon Sep 26, 2011 8:22 am

Just a quick question on the relationship between world/act space and the 'layer' column in Levels.txt.

I've figured out the the layer column is used to determine which levels will appear on the automap together.

But if I've read this thread correctly, it has no affect on where a level appears in relation the other levels in an act?
The act space is just a single plane, despite using different layers for the automaps, correct?
So I can't have levels on 2 different layers in the same act sharing the same offsets?

Cheers

***** EDIT *****
Ok, answered my own question with a quick test. You can do it but get strange results. The maps themselves are fine, I didn't get strange tiles showing up or anything. It's objects that are on the map, both placed & randomly spawned.

I placed my new level @ the same offsets as the Pandemonium Fortess. Went to the new lvl & things like the stash & npc's were there. You couldn't interact with them (open stash etc), but they looked & acted like normal.

I'm sure someone will come up with some off-the-wall way to use this. :)

Cheers

User avatar
MarcoNecroX
Junior Member
Paladin
Posts: 177
Joined: Sun Apr 22, 2012 10:55 pm

Re: worldspace in levels.txt : increasing areas ?

Post by MarcoNecroX » Sun Aug 01, 2021 10:07 am

Small resurrection, but I thought this would be useful to anyone looking this topic. I've made a script that reads levels.txt and draws a worldmap.
It uses offsets, sizes & checks vis tiles. There is a bit of hardcoded logic into it (outdoor areas use dynamic positioning), but it should *mostly* accurate.

--

Red = preset, yellow = maze, green = outdoor. Act can be changed in the URL. Hope this can be useful to someone.


Btw. it's drawn at 5200x3200 like in this topic, but in-game worldspace is actually bigger (but unknown).

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12100
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U
United States of America

Hand-picked

Re: worldspace in levels.txt : increasing areas ?

Post by Myhrginoc » Mon Aug 02, 2021 5:10 pm

Sounds useful. I have an Excel planner I have used for TFW: Awakening which allows a 5500 x 3450 (5549 x 3499?) world space for each act. Not sure why my numbers are slightly larger than Paul's after fifteen years, lol! 0 to 1000 in X and in Y are reserved for Type 0 "wilderness" levels, with seeds (towns, Stony Field) at 1000, 1000, but that leaves nearly a 4500 x 2450 space for existing and new mazes and preset levels. This is just a flat set of spreadsheets since it does no lookup in the txt files, so no overlap with what you have done.

Did you intend on inserting the script into your message?

Generally, we prefer that new topics be made with links to history rather than necroposting (just shy of ten years is not quite a small resurrection). I understand why you did it here and know you mean well.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

Return to “Map Editing”