You must be logged in to post messages.
Please login or register

Scenario Design and Modding
Moderated by Suppiluliuma, PhatFish, Fisk, EpiC_Anonymous, Epd999

Hop to:    
Welcome! You are not logged in. Please Login or Register.18 replies
Age of Empires Heaven » Forums » Scenario Design and Modding » Map size limit has been breached
Bottom
Topic Subject:Map size limit has been breached
PhatFish
Mr. Beta
posted 05-21-20 06:33 PM ET (US)         

Ridiculous large map sizes


You thought maps couldn't go bigger than the 255x255 tile limit?

...yes they can.

How about a 512x512 tile map? NO WAY!

A 768x768 tile map? wut

How about we go even larger...

1024x1024 tiles? 0MG YASSSSS11!1!!!!!!!1!


Now, before you start designing your most epic scenario with these... there's a catch (isn't there almost always?). Please read on.

Designing with maps that are 512x512 or larger


Okay, so here it goes. These are real, not joking. I don't know how useful they will be, but they are fun to mess around with however.

But first of all... I will crush your dreams of ever using these maps. *evil laugh*

1. They are all unstable. 512x512 seems to be the most stable but even that one will crash frequently. My preliminary tests found that adding units, text to the instructions and changing the global victory condition helps in stabilizing and getting it to run somehow. Sometimes the map runs fine, other times... you get a crash out of nowhere.

2. All these ridiculous map sizes are shrouded under a veil of darkness, literally. When playtesting NO LOS (line of sight) is present for any object. To even see the map you NEED to use the Reveal Map and No Fog cheat codes. Dropped flares do nothing.

3. The AI goes totally dumb. Seriously, even when it's using the aggressive PER it doesn't do much. Villagers do explore a bit. They prefer to be VERY passive.

4. You cannot build anywhere. You cannot train any unit either. Nor can you unload a transport ship. The game will say that there is no room.

5. RoR only (.scx), I could not get the maps to load in AoE (resulted in crashes).

6. The 1024x1024 map causes an issue with the drawing of tiles, sometimes they appear like jagged black terrain tiles (NOT actual fog terrain) when scrolling, this disappears quickly though:



Now for the fun part. These maps have some really bizarre quirks.

1. You cannot attack ANY unit with a unit of your own even though the diplomacy is set to Enemy! Try engaging an enemy Axeman with your Composite Bowman. Nothing will happen (Compy will walk towards the Axe though). However you CAN convert enemies with priests, and you can also attack them with splash damage (catapult).

2. You CAN attack buildings. It's fun to see the AI try and attack you if you try to raze their TC, they will follow you around but won't do anything else. Strange eh? Enemy Towers won't attack you either.

3. GAIA units/buildings cannot be captured. They CAN be attacked and won't retaliate at all.

4. Ruins/artifacts/war chests/traitors will not change allegiance and cannot be captured.

5. GAIA can actually win and prevail over every player. Put the global victory condition to standard, place a Gaia Wonder on the map, and see what happens at the 16:40 minute mark (in-game time). There is no Wonder countdown!

Creating a 512x512 map or larger using Hex-editing


Before I explain how to create these maps using hex-editing, I first need to give some credit where credit is due. I was not the first to discover the 512x512 map, that credit goes to the person who created the Ludakris map for AoK:HD. I did not copy his idea however, I created these maps on my own while experimenting with the map size data. It is simple to do, but the bigger the map size, the more difficult it becomes to load in the editor without getting a crash.

For those interested:

Open a decompressed 255x255 map in your hex-editor, find the value 9DFFFFFFFF000000FF000000 (start of the map size in the hex-data), and change the following 2 bytes:

9DFFFFFFFF010000FF010000 - 512x512 map size
9DFFFFFFFF020000FF020000 - 768x768 map size
9DFFFFFFFF030000FF030000 - 1024x1024 map size
9DFFFFFFFF040000FF040000 - 1280x1280 map size
(and so on).

Each time 256x256 tiles are added.

Final thoughts


Naturally I tried to load these humongous maps in DE, AoK, AoC and AoK:HD to see if they would work, but in all of them they don't and result in a crash. (If you somehow to get them to work please let us know). It's a small miracle they even load in RoR. Other map sizes, like 256x256, 312x312, 400x400 or 888x888 for example, cannot be created as far as I know.

I created even larger maps, they are 1280x1280, 1536x1536 and 1792x1792 (the latter being the max, 2048x2048 would not load for me).

Interestingly enough the maps larger than 1024x1024 generate their own elevation and terrain in a line-like pattern (similar to a printer), and the 1792x1792 map even cuts off the top-right corner portion of the minimap:



Looks pretty neat if you ask me. Note how small the viewport is!

It's too bad RoR can't handle these properly. If you somehow get a stabilized 512x512 scenario, please do share it.

Download


Download the 512x512, 768x768 and 1024x1024 tiled maps here.

I did not include any of the larger maps (1280x1280,1536x1536 and 1792x1792), because they are simply too big (hell even 512x512 is way more than you would ever need!), they are all just a curiosity, but if you are really keen to have a look at them I can upload or e-mail them to you.


That's about all, have fun with these big weird maps!

[This message has been edited by PhatFish (edited 05-21-2020 @ 06:35 PM).]

AuthorReplies:
Eurotool
Hero
posted 05-22-20 06:23 PM ET (US)     1 / 18       
This is exactly the kind of content I sign up for. It's amazing people still make these finds in a game that's more than 2 decades old.

𝓎𝑒𝓈, 𝒾 𝓁𝒾𝓀𝑒 𝓅𝑒𝓅𝑒
Fisk
Champion of AoEH
(id: Fruktfisk)
posted 05-23-20 11:59 AM ET (US)     2 / 18       
Oh so you can make this run stable but not my 250x250 maps?

What I find most curious about this is that it is RoR specific. If anything I'd expect such a thing to be an unfixed leftover from the original. Then again it might very well be a side effect of something else. I've always suspected that RoR allows for more memory for the map and its objects to support the Gigantic map. At least I've always had more luck running my overfull maps with the Expansion. Any ideas Phat?

//The warrior of Isola

"I lack quotes that demonstrate Humor Intelligence or anything about me."

Pineapplefish
Cleidopus gloriamaris
PhatFish
Mr. Beta
posted 05-24-20 10:57 AM ET (US)     3 / 18       
I suspect this as well, better handling of memory.

If anyone manages to stabilize these it's probably Chab. Rectangular maps work in his RockNRor, but not regular RoR, so who knows, maybe he can get these going properly
chab
Clubman
posted 05-31-20 03:46 PM ET (US)     4 / 18       
I would say that some data structures are optimized (in an effort to make AOE usable even on machines without much memory), including some path finding and AI structures.

There might be a lot of places in the code where coordinates are capped at 255, it's already impressive to manage to get "almost-stable" maps like these.


Not sure if it is possible to stabilize it, anyway it doesn't seem worth the effort as some basic features (AI, moving) can't be fixed (adding support for non-square maps was already a very complex effort).
It's similar to the max number of terrains and/or altitude, we can't really mod it to allow more, because it's limited by data structure size. Changing this would require to recompile the whole code...

Congrats Phatfish for keeping challenging the game engine

edit : I made a quick analysis on this, what's causing the biggest issues (game crash, all fogged, can't spawn, etc) is a structure about map visibility which is static (not dynamically allocated) - and whose size is 256*256.
There is no way to have a stable game running with bigger maps, if you don't get a crash you're just lucky. There is no real difference between AOE and ROR but maybe buffer overflow just messes more critical stuff/more quickly on AOE.
There would be a way in RockNRor to bypass this limitation, the game might be stable then, however it would require to change sensitive stuff in game code. And that still woudln't solve other issues (path finding, AI...).
Maybe I'll try to see if it's feasible someday, if it's not too long.

[This message has been edited by chab (edited 06-01-2020 @ 08:10 AM).]

Suppiluliuma
AoEH Seraph
posted 06-07-20 02:54 PM ET (US)     5 / 18       
Dammit, Lipoichthys, why do you play with stuff that I had no clue you could even manipulate.

Hats off!
chab
Clubman
posted 06-10-20 10:15 AM ET (US)     6 / 18       
I uploaded a new version of RockNRor

Make sure to set the "max map size" you want in <map name="maximumMapSize" value="256"/>
For example 1024.
Then you should be able to generate empty maps in scenario editor with any size up to 1024, even rectangular such as 1024*256
Choose "custom" map size in map generation tab, and make sure to generate an EMPTY map if size>=256 (I disabled random map generation for large maps because it would crash).

What I fixed :
- Visibility info : Visibility and movement issues should be solved now
- Global map data structures : no random crash because of random access to invalid memory

You can run a game on "large" maps.
The game should be stable as long as there are no units beyond the "standard" portion of the map (bottom-left).


What I did not fix:
- AI
- Path finding : in-game, moving a unit beyond the standard part of the map will crash the game
- Path finding structures : the presence of units beyond the standard part of the map is very likely to cause game crash.
- Other possible game limitations...

It might be feasible to fix some more stuff the same way I did for the list above, but not everything.
The game was optimized using assessment that maps are less than 255*255, here is the cost of those optimizations.


Of course if you generate a "large" map using RockNRor and then use it on a computer without RockNRor, you'll get the same issues as before (the scenario file itself is not the problem)
Fisk
Champion of AoEH
(id: Fruktfisk)
posted 06-10-20 11:02 AM ET (US)     7 / 18       
Haha Omg Chab thank you for existing. Nobody expects you to get these working but I just love that you're here and giving it your best shot anyways.

//The warrior of Isola

"I lack quotes that demonstrate Humor Intelligence or anything about me."

Pineapplefish
Cleidopus gloriamaris
PhatFish
Mr. Beta
posted 06-12-20 07:57 AM ET (US)     8 / 18       
Dude this is wonderful work! Indeed there was no need to prove anything but you did it anyways, congrats on this achievement The super large maps are much more playable now, like you mentioned a crash occurs whenever right clicking or putting units beyond the 255x255 limit (indeed limitations of optimization). Still not sure how useful they will be but it's nice to be able to push the limits.

So, the treshold to total LOS darkness is 256x256. That map is now the largest stable one, and playable like normal, and has the normal LOS. I did some test with it and found units cannot move beyond the 255 tile limit (the last 256 row prevents them from moving), however when a unit is created from a building created on the very edge it can end up on the 256 tile edge. When you move the unit the game will crash. One can fix this with impassable terrain on the 256 edge, then you should be totally fine to use this map.

Also the addition of the bitmap extractor is supercool. I knew Trigger studio could do this for AoK but in AoE/RoR we never had such an option until now. Awesome work, and very useful.

I had some trouble installing the new version, directdraw error coming up. Fixed this by setting admin mode and compatibility to Win7. Stupid Win10.

You deserve a honorary statue alongside Trisolo and Zapdotep, amongst others.
chab
Clubman
posted 06-16-20 12:15 PM ET (US)     9 / 18       
yes win10 sucks, tons of new problems we never had before.
Anyone else experiencing heavy game slowness under win10 ? The games gets slower and slower when running a game (after a long time playing OR after loading a game with many units fighting)

Could not find out the reason, I suspect directx/graphical stuff to be involved, not the game itself.
The only workaround I found was to save/load game. I even added a "reload game" chat command to do so.


About 256*256 maps, I wouldn't recommend using them. -1 (which is the same as 255 in 1-byte data) is used either as a joker or N/A value, so positions on last tile (255) might create confusion/bugs in game code.


I thought of something for you Phatfish, that might be handy. I'm adding a TAB/shift-TAB key in scenario editor/units to switch between the 4 modes (place/delete/move/rotate).
For too long those stupid buttons with no shortcut have sucked and used people's patience !
I don't think TAB is of any use in scenario editor, so this key should be a good choice.
Fisk
Champion of AoEH
(id: Fruktfisk)
posted 06-16-20 05:23 PM ET (US)     10 / 18       
Anyone else experiencing heavy game slowness under win10 ? The games gets slower and slower when running a game (after a long time playing OR after loading a game with many units fighting)
So that's why that guy's Game of Thrones campaign lagged so badly for me! I never figured it might be Win10 related. The first issue and I wouldn't say I have bad performance in general but yeah, big masses of fighting units do present a lag which I don't remember from playing on my old windows Me setup.

//The warrior of Isola

"I lack quotes that demonstrate Humor Intelligence or anything about me."

Pineapplefish
Cleidopus gloriamaris
PhatFish
Mr. Beta
posted 06-19-20 10:20 AM ET (US)     11 / 18       
adding a TAB/shift-TAB key in scenario editor/units to switch between the 4 modes (place/delete/move/rotate)
Sure thing, that would indeed save time.

Made some further recommendations in your project thread in the Modding section.
Zungen
Clubman
posted 06-27-20 12:40 PM ET (US)     12 / 18       
When you say
Open a decompressed 255x255 map in your hex-editor, find the value 9DFFFFFFFF000000FF000000 (start of the map size in the hex-data), and change the following 2 bytes:

9DFFFFFFFF010000FF010000 - 512x512 map size
9DFFFFFFFF020000FF020000 - 768x768 map size
9DFFFFFFFF030000FF030000 - 1024x1024 map size
9DFFFFFFFF040000FF040000 - 1280x1280 map size
(and so on).
you still need to add descriptions to the tiles, as in, you said to the game 'hey, the scenario has n*n tiles', but you just declared those tiles, you didn't give values to the attributes 'type' and 'height' to the 'tile' object
The many pairs of 160100 following them are tile data (160100 is a single tile), in the following format:

16 The first byte is the terrain type (16 for Deep Water).
01 The second short byte is the elevation level (ranging from 00 (lowest) up to 07 (highest) .
00 Marks the end of the tile. Never edit this value or your map WILL crash.
Maybe if you actually those tiles? Like, copy and paste the bytes of the tiles which have values to get enough tiles.
So, if you have 255*255=65025 tiles and you want to go to 512*512=262144, you need to add 512*512-255*255=197119 tiles.

Another option would be creating an Age of Empires II scx with agescx or PHP SCX editor. Sometimes they load natively in RoR, sometimes you have to change the file version. If it doesn't load natively, you could just copy all the tiles from a scx scenario created with any of those tools and paste them in a new RoR scx, taking care of also copying the size description

9DFFFFFFFF010000FF010000 - 512x512 map size
9DFFFFFFFF020000FF020000 - 768x768 map size
9DFFFFFFFF030000FF030000 - 1024x1024 map size
9DFFFFFFFF040000FF040000 - 1280x1280 map size
PhatFish
Mr. Beta
posted 06-27-20 04:28 PM ET (US)     13 / 18       
I should update that article sometime, it's missing a few things like a more accurate overview of each data part.

Apparently, as I found out with these large map sizes, you don't need to put in the accurate number of tiles (bytes) or any tile data at all, AoE/RoR actually generates them automatically in relation to the map size. Same for AoK/AoC I assume since they are the same engine. Saves a lot of time. Since RockNRor can generate all these super large map sizes now there is no further need to hex edit unless you want to go beyond 1024x1024 which is kinda useless anyways.
pawel0482
Clubman
posted 07-28-20 04:24 AM ET (US)     14 / 18       
Hi @PhatFish can u send me 1280x1280, 1536x1536 and 1792x1792 map sizes?? Im will be very appreciate
chab
Clubman
posted 07-28-20 08:48 AM ET (US)     15 / 18       
@Phatfish : actually you can go beyond 1024*1024, it just depends on the value you put in <map name="maximumMapSize" value="1024"/> in rocknror.xml configuration file.

There needs to be a limit, 1024 was a sample value, but you may put higher "max size" if you wish.


So Pawel you can use RockNRor to generate the maps with the size you wish in scenario editor.

[This message has been edited by chab (edited 07-28-2020 @ 08:48 AM).]

pawel0482
Clubman
posted 07-29-20 04:43 AM ET (US)     16 / 18       
Ok thank you @chab for help btw is there a way to do the same thing with Age of Empires II The Conquerors?? Cause Im want to create a mod in the future but I need bigger maps for AOE II. Im will be very appreciate for any help
PhatFish
Mr. Beta
posted 07-31-20 06:23 AM ET (US)     17 / 18       
@chab: excellent, I kinda figured this would be the case. I haven't found any use for them yet though.

@pawel: Yup you should just use RockNRoR since it can generate any super large map size you want and they load in vanilla AoERoR (up to a certain size since the genie engine is very sensitive about this). I tried porting these maps to AoC but they always crashed. I guess if you hex-edited an AoE2 .scx file instead doing the same thing I did it might just work. In future updates DE should add support for sizes up to Ludikris like in AoKHD, that would be really cool.
pawel0482
Clubman
posted 07-31-20 10:42 AM ET (US)     18 / 18       
@PhatFish thx for answer and tips about getting maps bigger in AOE 2 and yea little bigger maps in Definitive Editions will be really cool, many thx. I will try that method u recommend me for bigger maps in near future and will let u know if that works
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires Heaven | HeavenGames