Forum



Merri am 08.09.2012 23:36 #10523


I figured the meaning of the last unknown byte in a map's header: if it is non-zero the map is shown is Invalid Map in Unlimited Play mode. Map Editor sets the byte to 0x01 if no players are set.

Thus I suggest that any map which requires RttR features to have this byte set as 0x02. I probably do this automatically in my map upload service.

In addition I'm planning to set the value to 0x03 in any map that requires harbors to play, thus also preventing loading a harbor map in Unlimited Play mode.


If anybody has anything to say against this then replying to this thread or commenting my post at S2.net is a good idea.

---
Settlers II.net admin


Spike am 08.09.2012 23:57 #10524

Im Ruhestand
And which Maps do only work for RttR? I also like the idea to use this byte for rttr map sorting - single player has an
ID,multiplayer,seafaring single player,seafaring multiplayer etc.

An other question came up,are you maybe able to add this function to the editor by xaser? Maybe also to add more objects?

And anyway: nice work again :) do you maybe also make a dokumentation of the save game format?

---



Merri am 09.09.2012 00:11 #10525


Yes, using the byte for that information is possible. I guess we could make it a bitmask for feature requirements. Here is a suggestion based on that:

0000 0000 = 0x00 = no special requirements, playable in original game's Unlimited Play
0000 0001 = 0x01 = no players set, must randomize player starting locations to be playable
0000 0010 = 0x02 = requires seafaring
0000 0100 = 0x04 = multiplayer map (0x02 or 0x08 must also be set, because regular multiplayer maps are OK in Unlimited Play)
0000 1000 = 0x08 = extended object and texture information

This still leaves four bits unused for flagging future feature requirements. That is also enough space to store a value from 0 to 15.


Edit!
Also maps that allow building roads etc. through borders are troublesome to the original game as they just don't work. Ships can travel through borders, but building roads does not work.

Setting a HQ to a map's border position probably also crashes the game, but I haven't tested that yet.


Savegame information comes when it comes... probably not going to hurry too much with it.

---
Settlers II.net admin

Editiert von Merri am 09.09.2012 00:50

Spike am 09.09.2012 00:58 #10528

Im Ruhestand
That building maps is possible was already reported by xaser but I have no idea how this really works. Would it maybe be possible to add an other sub block - maybe this one allows buildings but not by the original editor?

---



Merri am 09.09.2012 20:05 #10533


Sorry, can you rephrase what you said? I can't understand your last message.

---
Settlers II.net admin

Editiert von Merri am 09.09.2012 20:06

Spike am 09.09.2012 23:37 #10535

Im Ruhestand
Ohw, That building roads is possible when editing the 3rd block I think was already discovered by Xaser.

I also asked myself if a map would work if we add an other block (10 27 00 00 00) at the end of the file, maybe the map loads and everything works?

sorry for my first confusing sentence :D hopefully this will work^^

---



Merri am 10.09.2012 00:01 #10536


You can add anything you want after the last byte (FF). However data put there is not retained by any tool so you'll lose it.

[HEADER (2352 bytes)]
[BLOCKS x 14]
[FOOTER (animals)]
[0xFF]

Also the current blocks already have some room for adding more stuff into the map files – even without breaking the original game.

---
Settlers II.net admin


Spike am 10.09.2012 03:43 #10538

Im Ruhestand
No I asked what happens if I would create a map with this format:

[HEADER (2352 bytes)]
[BLOCKS x 15]
[FOOTER (animals)]
[0xFF]

---



Merri am 10.09.2012 06:30 #10540


It doesn't work, atleast Map Editor crashes, I assume the game does the same. They expect animal data / footer after 14 blocks.

If I recall correctly map files in version 1.02 and before (WORLD200.DAT etc.) do have 15 blocks in them. But those files don't have header or a footer, and no 0xFF marking the end of the file.

---
Settlers II.net admin

Editiert von Merri am 10.09.2012 06:30



Feel free to post in English!

Antwort schreiben

Username:
Security code:
Text:

   
  Convert smilies like :), ;) etc. into small graphics?
  Convert WWW-addresses into clickable links?
  Soll Boardcode in ihrer Nachricht aktiviert werden?