Working on Custom Map mods

Post Reply
mstrdenton
Posts: 8
Joined: Mon May 13, 2019 3:09 am

Tue May 14, 2019 1:54 am

I'm trying to make a mod with a completely custom map. Through experimentation, it is possible. Though there is one issue: the heightmap TIF has to be saved in photoshop. If you save it in any other program, Kenshi crashes when it loads the map. This has to do with how TIF is a file format invented by photoshop, and most free programs use .Net libraries that don't get it quite the same. The largest issue seems to be something to do with a formatting criteria called IPTC. Gimp doesn't even know what it is and spits out errors when reading the vanilla heightmap file:


Image


However, talking with people who actually have photoshop, they say it works great for them when they use that. I don't want to have to buy photoshop just for this purpose as I prefeer gimp, and its 10 bucks a month. Free trial is only a week... If anyone has photoshop and would like to lend me a hand please reply here. I need someone to take maps, export them from photoshop, then give it back to me. Sounds stupid but I know no other way at this point.

I even tried a few converter programs that claim to be just like photoshop, some even advertising IPTC, but none of them work with Kenshi.


I can also tell that the heightmap used for the game was actually made in photoshop originally, or was at least exported there in its final product form. Seems World Machine was also used, as I don't know any other program that offers as much detail in a heightmap that kenshi has. Considering to bite the bullet and get World Machine, would make a custom map mod way better than if I just threw stuff together with Wilbur and Gimp...


This is the header for the fullmap.tif found in Kenshi. When I save tif files in other programs, there is no xml header, and this header specifically mentions photoshop.

Code: Select all

Adobe Photoshop CS6 (Windows) 2017:09:25 15:03:57 <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        ">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:dc="http://purl.org/dc/elements/1.1/">
         <dc:Format>image/tiff</dc:Format>
         <dc:format>image/tiff</dc:format>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
         <photoshop:ColorMode>1</photoshop:ColorMode>
         <photoshop:ICCProfile>Dot Gain 20%</photoshop:ICCProfile>
         <photoshop:DateCreated>2016-11-22T14:59:18-14:59</photoshop:DateCreated>
         <photoshop:DocumentAncestors>
            <rdf:Bag>
               <rdf:li>uuid:2ED132E01488DE11BF61F4C61B8EADA1</rdf:li>
               …(about a hundred more lines of gibberish)
               
Maybe someone with more knowledge about Kenshi or TIFF formats could enlighten me on a solution I can do without having to spend money on software I otherwise wont use?

Also here are some teasers as to what is possible with these discoveries (stuff made by other people):
Image
Image

Notice in the second image above, that there are strange river lines on the landmass. That probably has to do with some sort of detail map for rendering terrain at great distances, but I have no idea how that works at the moment. Probably something to do with the many smaller dds files scattered in the overlaymaps folder. Interestingly, there is an exe in this same folder that seems to be designed for putting these dds files together into some sort of larger image. However, it seems to be bugged and gets stuck and never finish doing what its doing. I have a feeling this exe is not meant for running on its own, and is actually something called by the game at runtime for some purpose.

Another interesting folder is the navtiles folder. My guess is that all these binary files in this folder are the navmeshes for the base terrain. I don't think these files are actually for the finalized navmesh used, because the buildings and objects will change the navmesh and these things are mod dependent. It seems that in order to make a new map, one of the hardest parts will be updating the navmeshes map wide, which has to be done in the ingame editor. These changes are then packed into the .mod files of the mods you load it seems. That means for a new continent, you need to go to every area on the map and recreate the navmesh. With the crashes and stuff, this could be unbearable for an entirely new continent that is as large as kenshi... I'm eager to find a better way of doing this part.

Also this nexusmods page from someone who already did it and released something with it: a new island. Its super low detail due to him not having world machine or something else to make it as nice as vanilla, but you can see it is indeed possible. If you look at one of his screenshots, you can see that its even possible to customize the biome locations, which is done by editing the areasmap.tga.

https://www.nexusmods.com/kenshi/mods/250/

Anyways, total-conversion mod with a new landmass is my goal. I especially want to explore the idea of icy environments, something you don't see much in vanilla. If you want to talk to me about ideas with that, you can reply about that here as well.

Akerus12
Posts: 1
Joined: Wed Sep 19, 2018 12:28 pm

Mon May 27, 2019 8:36 pm

I tried to make a map, too. Still does not work:)
I have a question for you, how you changed the ground texture?
Because I tried different things, changed the color of Biomemap, areasmap, distant. And the weather has changed, but not the texture of the earth, as some trees, such as the swamp is not removed. Do you know the answer to anything?:)

mstrdenton
Posts: 8
Joined: Mon May 13, 2019 3:09 am

Tue May 28, 2019 11:11 pm

Akerus12 wrote:
Mon May 27, 2019 8:36 pm
I tried to make a map, too. Still does not work:)
I have a question for you, how you changed the ground texture?
Because I tried different things, changed the color of Biomemap, areasmap, distant. And the weather has changed, but not the texture of the earth, as some trees, such as the swamp is not removed. Do you know the answer to anything?:)
There are two maps. Biomes are in biomemap.png. Spawn Zones are in areasmap.tga. Biomes are for ground texture, plants, fertility, and resources, while spawn zones are for deciding region names ingame, weather events, nests, and roaming squads. They overlap in different ways, and are all editable in the FCS.

Here is a rare photo of the biomes map with all biome names
Image

This is the regionsmap with region names added for easy viewing
Image

someone
Developer
Posts: 360
Joined: Fri Aug 23, 2013 6:00 pm
Contact:

Wed May 29, 2019 3:58 pm

Gimp should be able to edit the fullmap.tif file, just make sure it is saved as uncompressed 16bit greyscale. Older versions of gimp don't support high bit depths (added in 2.9).
The ground texturing doesn't directly use biomemap.png. You will probably need this tool to generate the blendmap and blendinfo files from the biome map:
BiomeSplitter.7z
Biome map processor
(628.53 KiB) Downloaded 280 times
The game does not officially support map mods, but it should be possible to edit everything.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests