map extension is it possible

13 posts / 0 new
Last post
#1
map extension is it possible

greetings all. been a long time player and lurker of the mod pages. so after a long time of thinking i am going to attempt at creating my first mod. im sure i will be bothering you all with many questions over the coming months but to get things started something that is rather important to my idea.
so i know and understand how to change the map through the maps list but my number one question is. is it possible to extend the current map. so everything already in game stays the same but i could say make the great swamp go down many more cells then open out to plains and to the west a desert for many cells then lush forest.
if so, how? my only idea is that it has something todo with this line.
<column name="strName">Excel50x100</colum -do these two numbers corrispond with the number of cells?

Iv looked many time for answers but never been able to find them sorry if this has been covered before and im just being short sighted

It is possible to extend the map, but not via that line you mentioned - that would be too easy.

It's the other map that actually generates terrain in the game - "MapMiniMichigan.png" one.
Each line of numbers in that scary grid below it is a line of hexes on the map, in game. Starting with the first number in the first line, being the most north-western hex. Coordinate (1, 1).

So, technically, you can simply add more lines at the end of that coordinate grid, to create more rows of hexes below the current end of the vanilla map. You only have to remember to keep the number of numbers/hexes in each row the same, to avoid having holes in your world (59 per row, if I'm right - better count them yourself).

The numbers represent the hex types, as given in "Table hextypes". Each number on the map is ID of the "hextype" -1 (minus one). So to make a forest hex (ID 5) you place number "4" on the coordinate grid. Placing number "3" (grassland, ID 4) actually makes the hex randomized. So all 3's will make the new hexes totally random, all 4 will make them all forest.


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

ok thank you. so i assume 0 is impassable water? also for random hexs is there a way to create say a bunch of new custom hexs then create a hex that when used randomly picks between the new custom hexs?

No, the random hexes are hard-coded, as far as I know. So if you want some custom hexes, you have to place them yourself.


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

okay thank you.
Finally, adding more custom hexs to the game without disturbing the vanilla ones is this possible? i assume the hextype file relates to the hexsheet.png file that contains all hex types visuals. this is one large file with all hexs in it. so how would i go about adding more hex types in relation to their aesthetics. do i create a new hexsheet.png with a new hextype.xml refrencing the new .png or do i edit the existing one and create new rows in line with the vanilla ones?
Also while thinking about extending the map if i where to extend it westwards would this interfere with things such as spawn location?

Adding new hexes - I'm not sure, as the whole system is so ramshackle that no one tried it before ;)

In regards to extending the map: Westwards - yes, it would cause problems for several things actually. Cause remember that the (1, 1) point is the top-leftmost hex. So moving that hex further to the left would move not only creature spawns, but anything that relies on the coordinates. So things like encounter triggers, minimap locations, the encounters themselves (they sometimes move the player around, when he does not see it - example ATN, is actually set on 3 different hexes), market hexes, etc.

Plus, as soon as you will start playing around with the map, you will notice that it's way more complicated than you probably expected, as the hex-based map is a bitch to edit, since hexes that are next to each other on the number grid don't actually connect to one another in reality, because of the way the hexes are shaped. Honestly, adding new hexes is more akin to knitting than drawing, so adding more things in the front/top rows will actually relocate things in the existing map as well...

I really don't want to sound negative, and dishearten you in your goal, but the "map stuff" is probably most user unfriendly part of the game, and it's honestly only partially usable for modding. That's why no one really done anything with it, in any real capacity. It's not completely impossible to do, but... You know... Well... Good luck... ;(


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Haha better too hear it know than further down the road. Do you know where in the encounters.xml it specifys if any where each encounter takes place? just thinking if i keep track of how many rows/columns i add i can supliment the location within the encounters.xml. As far as custom hexs go i guess il just try and see what happens.
Thank you very much for your words of wisdom. You are the font of knowledge.

The encounter takes place on the hex it was called for - some are caused by conditions, others by "encountertrigger" However, some do move the character around in mid-encounter (player does not actually see that happen). It's due to the way certain other mechanics work. Either way, encounters use the "ptTeleport" parameter to do so, the coordinates other than (0, 0) meaning player being moved to (X, Y). So you would have to check each one out to see where that happens.

Also, as I said, adjusting the coordinates would not be easy, since the number grid does not really represent the map, visually.

It is something I explain in this thread. See the picture in post 12 to see what I am talking about (the rows really causing a lot of trouble) and read the whole thing for more details.


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Speaking of hexes, would it be possible to change the texture of them, the climate, and loot types without completely annihilating the game?

Rar! Rar rar rar! Thanks for reading :)

First of all, I apologize for the monster of a system that is hexes. It evolved over the years into something that works, but only if you know all the hairy details :)

Secondly, thanks for explaining all the details, Kaaven. Sometimes I wonder if you know the data better than I!

Finally, adding more custom hexs to the game without disturbing the vanilla ones is this possible? i assume the hextype file relates to the hexsheet.png file that contains all hex types visuals. this is one large file with all hexs in it. so how would i go about adding more hex types in relation to their aesthetics. do i create a new hexsheet.png with a new hextype.xml refrencing the new .png or do i edit the existing one and create new rows in line with the vanilla ones?

Regarding new custom hexes, I think either of your approaches would work. I.e. adding new rows to the bottom of the hexsheet png should work, as well as painting over the unused hexes in that sheet. You'd just have to make sure the hextypes.xml defines their data, and that they were used somewhere in the map.

One other thing you may want to consider is copying the map data from the xml and pasting it into a spreadsheet like Excel or Google Sheets. Since they are comma-separated, spreadsheet apps should be able to divide the data into cells for easier editing (can see row/column numbers). One of the test maps I did was generated this way, using a spreadsheet to randomly assign a hex ID to each cell.

But beware what Kaaven warns against: rows and columns are staggered a bit due to the hex nature.

Speaking of hexes, would it be possible to change the texture of them, the climate, and loot types without completely annihilating the game?

This should be much easier to do. Repainting the hexsheet.png will change the in-game appearances, climate can be changed in gamevars.xml, and the loot types are defined in hextypes.xml.

Dan Fedor - Founder, Blue Bottle Games

Very late reply i know, college got in the way for a time and only now coming back to this.
Thank you for you the response. Using excel really helps visualise things more cheers.

Could I get some form of guide for how to view an XML file on a google spreadsheet? I tried myself... I think you can make a pretty good inference as to what happened. If not, then I'll tell you.
Nothing happened... I even converted the darn thing using an actual tool made for this purpose.

Rar! Rar rar rar! Thanks for reading :)

Never mind, I think I found out... Probably not right, but hey, I got it to display something!

Spoiler: Highlight to view
IMAGE( https://lh3.googleusercontent.com/j4jApqCM_uaCi1mLMZeoAMV3YHj3tAVc877KErIquv5UVzu-yj-sN501CqZm9a4JoxQiORJEhMSiA1BxBAtKnbya6_8bm-cN-4gRTQ88HaTDwBd5QR_3YbuCxDojzxBv9VrJqS0IAMGUYhgbgrv0GUFhEJ4U47WzJ8Ftopo_CvyjAUK1xVQlvOCZNnmi8QDaCZ-gdHR8YwxPq7dMKXG9D3agk23vqRZ6lHuUeuBzlGOZ9FWthscQaM9TfDlfoLJw5SlYVl4_E1afrQaEa4QyC5RnFr2I1-QVU0pux_7KtLVWyjYHOgQUEMWSzd0CXiPSS9WjpbgELCe_LGwUdKeE_6MyG6C3sIYQaW1bytgfmN8-9R4sOU8U48EUkachBi-0fYJGGkDzlelmd9VRBNt3AtYpF_6MIEo00iPP33wlHU6JRwLy3c0zht-px6u16yACqJ05NC2UWF1cCY9BDe5_G2qmm2hNgnUFvV8gSQf9UZwvENx9rlhJtMBHYTaMD_hCNp-ZPi-dBTGIWBDbY3K225fgxBDg-tyeSXXtACEqjU7QxOnc8G4-dRITYzK1y3_xsWMd1RccIGBdseIT0iNsBE2FGeolS9ed5y3a5j7uE8FqcihN4Y8=w1203-h676-no )

Rar! Rar rar rar! Thanks for reading :)