Topic: Generated map image  (Read 13518 times)


Night

« on: March 23, 2020, 02:40:17 PM »
Just wanted to share this, was able to generate an image of the game map from data and save it to file, kind of neat to look at.

Landmark key:

TileID | Name |   Color
239 | Village |   Yellow
211 | Settlement |   Light Purple
210 | Fortified Village |   Red
86 | Settlement (2) |   Magenta
31 | Shelter |   Pale Mint
30 | Camp |   Orange-red
60 | Cave |   Brown

Warning: Map is 3073x2049 in size, hold shift to scroll left to right.
Spoiler: show
« Last Edit: March 23, 2020, 02:44:04 PM by Night »
URW Character Menu - Cheating menu by a player, for the players.
URW Character Designer - Design your characters sprite!

ineedcords

« Reply #1 on: January 09, 2023, 09:23:23 PM »
Just wanted to share this, was able to generate an image of the game map from data and save it to file, kind of neat to look at.
Thanks for sharing this. Agreed, pretty neat. Opens up a lot of external possibilities.

In your embedded screenshot, it appears, this completely bypasses the fog of war (FoW), is that bypass, mandatory by nature or optional?
Did you create any open source code on this or alternatively is there any public information/writing on your experiment?
This could be a good day to utilize your squirrels hides.

Tinker

« Reply #2 on: January 09, 2023, 09:33:51 PM »
I can see my house there.

Night

« Reply #3 on: January 10, 2023, 10:53:13 AM »
Just wanted to share this, was able to generate an image of the game map from data and save it to file, kind of neat to look at.
Thanks for sharing this. Agreed, pretty neat. Opens up a lot of external possibilities.

In your embedded screenshot, it appears, this completely bypasses the fog of war (FoW), is that bypass, mandatory by nature or optional?
Did you create any open source code on this or alternatively is there any public information/writing on your experiment?

Heres the gist of it;


here I'm using memory to read/write the bitmap data.
but you could alternatively pull similar data from the files described here:


According to URW Fandom Wiki - [Playing With UrW Files], WORLD.PLM contains the map with fog of war included.

Possibly in memory somewhere as well.


Also note, completely possible to render the full map tiles (hence storing the file paths). Was working on a prototype in the old URWCharacterMenu, which was more or less a successful proof of concept. -- tried to find an old picture of it, but couldn't :(.



edit: Oh also something i forgot to mention; I get the tile ID's/Path info from debug_ter-tiles.txt, located in the URW folder while you're playing.




edit2: saw your post in suggestions, working on something for it...
« Last Edit: January 10, 2023, 01:06:53 PM by Night »
URW Character Menu - Cheating menu by a player, for the players.
URW Character Designer - Design your characters sprite!

ineedcords

« Reply #4 on: January 10, 2023, 01:50:59 PM »
Heres the gist of it
<snip>
Fantastic! Once again thank you for a fully detailed response.
I will look into the memory method at first chance and will keep an eye out for your potential next utility release.
This could be a good day to utilize your squirrels hides.

Night

« Reply #5 on: January 12, 2023, 02:30:00 PM »
Heres the gist of it
<snip>
Fantastic! Once again thank you for a fully detailed response.
I will look into the memory method at first chance and will keep an eye out for your potential next utility release.


Some progress:




working out an issue with size constraints (which is why the tiles are scaled to 6x7 currently)
Ignore gimp file size, actual file size is 25.2mb
« Last Edit: January 12, 2023, 02:34:37 PM by Night »
URW Character Menu - Cheating menu by a player, for the players.
URW Character Designer - Design your characters sprite!

ineedcords

« Reply #6 on: January 12, 2023, 09:20:16 PM »
Some progress:
<snip>
working out an issue with size constraints (which is why the tiles are scaled to 6x7 currently)
Ignore gimp file size, actual file size is 25.2mb
Thanks for sharing the developments. I look forward to the next update.

Following up on your previous message, I have looked at the map-in-memory idea. After some brief evaluation, (for me) I did not find it to be faster than the method suggested below.

(While on the matter, as a side curiosity, I also briefly tested modifying portions of the map via memory locations and also via WORLD.DAT file modification followed by its duplication as WORLD.PLM. A primitive quick test succeeded in generating an artificial island in the north west corner of the map that was visible in F6/in-game map screen. A follow up, wider scope test, attempting to create a massive island, failed, as the game completely ignored this change, somehow reverting to the default/previous state. At this point, I am unsure whether there are checks in the game code preventing from a modified more-than-threshold map to be used, but that's my first guess.)

Back on the original goal of obtaining a (mostly-unmodified) single, unified Large Unreal World map:
Prior to your interest in developing a convenient external utility solution, I was thinking doing via another route, using the convenience devs gave all users (i.e.: F6/in-game map screen). As detailed in the suggestion thread, my main issue is the in-game map is not big enough.

Observation shows the entire World Map (the entirety of the F6 screen, including the sections that are only visible via scrolling) appear to be made of 6 "cells", like so:
Code: [Select]
----------------------------------------------------
|                |                |                |
|                |                |                |
|       A        |      B         |        C       |
|                |                |                |
----------------------------------------------------
|                |                |                |
|                |                |                |
|       D        |      E         |        F       |
|                |                |                |
----------------------------------------------------
The quick solution I had on mind is based on the idea if you copy and paste small map enough times, it would get "big enough".
It could work like this: 1) take 6x screenshots save to disk, 2) pixel-perfect merge the 6x in the correct composition to create a unified map, and 3) save output externally.

As a proof of concept, without any script/program involvement, I did this manually by taking manual screenshots and manual merging in GIMP and here is the outcome:
* 6x screenshots, each displaying a single cell at max-zoomed-out level:

** Click here for the full sized version, then right click and open image in new tab.
* 1x unified Large World Map:

** Click here for the full sized version, then right click and open image in new tab.

My current thinking is that there are imperfections in this final output, for example between cells A and B in the middle of the border however it is still much better than the small World Map I can see in UrW F6/in-game map screen so I would consider this a win, if it can be automated by any means.

Just sharing in case you would like to evaluate this approach, that is, in case you have not done so already.

For the automation/convenience part, I had ideas like using an AutoHotkey script to grab and save screenshots, use ImageMagick to post process to create the unified merged large picture etc. but that would be hard to use for some. A nice utility, as single software package (I believe you prefer .NET?) surely would be far superior solution.
I have not done any AHK/IM tests on this even though I used C & IM together long ago and I remember it gave adequate results for a problem then, so probably this would work but won't be nice or easily maintainable.

Now the good part: having seen your post & updates, if you are still keen to develop a solution, all I have to do now is wait! :>
This could be a good day to utilize your squirrels hides.

aat

« Reply #7 on: August 09, 2023, 11:16:13 AM »
A good thing to mention in this topic:
There is a tool to generate browsable maps.

It's in the old forum, but it is still downloadable and it still works.
https://www.tapatalk.com/groups/urwforum/map-viewer-t7712.html

I also attach it here in case attachments in the old forum gets deleted in the future