Saturday, August 12, 2017

Crusader Kings 2 - Society Modification - Artifact Image

8/12/2017 The Crusader Kings II Botanical Society is still in the works. In this journal post we will modify an image. Pictures will help the forum post for the modders as well. Quick posted.

I didn't want to, but I looked for images in the game files and I didn't like any of them for a plant. The ingredients for the hermetic society are just pouches. I want to see something that looks like a plant or a flower. This forced me down the path of creating a custom image. This could have been done easier if I had planned it out or worked with images before, but I had to learn. I'll try to put easier suggested the instructions that one may follow, but it still could be simplified:


Programs used:
GIMP (free download off the internet)
Paint (the paint program that comes with windows computers)

Parts
1. Create the brown canvass
2. Create the image
3. Save the image as a game file
4. Testing

Part 1: Create the brown canvass
1. In ...\Documents\Paradox Interactive\Crusader Kings II\mod\lion\gfx\interface\inventory\artifacts are the artifacts images as .dds files. Specifically, I open viking_axe.dds into GIMP by just dragging the file and dropping onto the GIMP program. Note “lion” is a copied folder of the game files. Do not edit the original game files. This is modding lesson one. Do not change anything without learning this. I repeat do not proceed if you don’t know what I am talking about. Copy the files before you work with them. See my other post… I’ll try to link it here.
2. I exported the viking_axe.dds file as a .jpg into a new folder just to hold my work in progress stuff.
 
 3. I opened the newly saved .jpg file in paint. I used paint because it was easy to work with. Even Andrelvis suggested it ;).
4. I selected the bottom right portion of the image and copied it so I would have the bottom right corner.
5. I pasted that corner back onto the image, rotated it, then placed it in the top right.
6. I then copied the right side of the image, which is all brown now.
7. I then pasted that half onto the image, rotated it, then placed it on the left side.
 
This resulted in a plain brown background image that looks similar to what the game uses. This is my black brown canvass… to say. I need to figure out how to post images on this forum. Until then, just imagine it is sort of like the viking_axe.dds image but without the axe, just brown, lighter brown in the middle, darker brown near the edges.

Part 2: Create the image
1. I took a picture of a venus flytrap with a camera, uploaded the picture onto my computer as .jpg file.
 
2. I opened it with GIMP.
3. Using the "Free Select Tool" I drew around the venus flytrap in the image. I copied this selection.
4. I opened my brown canvass image in Paint. I pasted my plant image selection. I dragged the corners to make it a good size. I moved it into the middle of the brown canvass.
5. I saved the plant on brown as plantunsized.jpg.
6. Still in Paint, I selected the image and right clicked it to resize it. I chose the pixel option, set for 118 by 118. I saved this image as plant.jpg.
7. I then resaved the image, but this next time I chose the pixel option set as 59 by 59. I saved this image as plant_small.jpg.
This resulted in the images I plan to use for the game files.

Part 3: Save the image as a game file

The game has an image and small image version for each artifact. To mimic the game files I made the same.
1. I opened my plant.jpg file in GIMP. I then exported the file as plant.dds.
2. I did the same with the plant_small.jpg. I exported the file as plant_small.dds.
3. I pasted this two .dds files of my plant image into the artifact folder.

Part 4: Testing
Since my image is not yet connected to any event, I will test it by replacing the Iron Crown of Lombardia.
1. I renamed my plant.dds and plant_small.dds to iron_crown_of_lombardy.dds and iron_crown_of_lombardy_small.dds respectively. I made a backup of the original files. I then replaced the folder files with my newly modified files.
2. I opened the game. I started a new game. I search for people. Searches for artifacts can be performed like searching for characters. I searched iron and selected the king. I looked into his inventory and success.
3. After success, I did replaced the changed files with the original so that I will have the proper image for the crown back.

What we accomplished. We created an image file and replaced a game image with this file. This process can be used in many other modifications for the game. For this case it was artifacts, but it could be used with boarders, interface, etc. Note the file extensions, where images must be placed, and the size of those images to match that of the game. It was fun. Hopefully, this image will be used for future events in the society.

No comments:

Post a Comment