Romance of the Three Kingdoms XIII

Romance of the Three Kingdoms XIII

JustaGamer Jul 11, 2016 @ 11:14pm
Guide to editing and import portrait.
Here are the 2 guides to editing and import portrait using external tool. For background of the guides, what programs to use and how to obtain them, please refer to this thread:

http://steamcommunity.com/app/363150/discussions/0/358417008716034632/

I put them here for easy of access. If you have any question, please ask it here and we'll try our best to answer your question. We just started ourselves so following the process if you have new discover + experience on how to use the tools, please offer them here too. I'll try to keep the guide on this post up to date.
< >
Showing 1-15 of 49 comments
JustaGamer Jul 11, 2016 @ 11:15pm 
Guide #1 - How to export/import image. First, while the guide look intermidating and long, it only because I have to explain the file format and structure plus how to export the original portrait for reference (optional but highly recommend, and you only have to do this once). Secondly the import process itself is really only at the last part of the guide, and fairly simple. Once you import a couple set you'll memorize it (since you literally only press 5 different buttons). You don't need an English interface if that's what turn you off from attempting.



Here is the guide for the San13editor tool. Commissar made a pretty good visual translation of the UI, you can read it here:
https://s31.postimg.org/5z8i27xy3/editor_translation.jpg
My guide will use his translation as a base.
First, the most important buttons you need to keep in mind are:
One time use button:
- Open source directory: use this to link to your ROTK13 directory. You will only have to browse once when first using the tool, it’ll remember the dir after that.
- Batch export: under the 3rd menu, you’ll only have to use this once. More on this later.

Button that will be used regularly:

- Browse the previous block. (First left green arrow key)
- Browse the next block. (First right green arrow key)
- Browse previous frame. (Left blue arrow key).
- Browse next frame. (Right blue arrow key)
- Import current frame
- Export current frame
- Save.
- Jump to frame: this one is not on the tool bar but can be quickly access by using Ctrl+L. Or access under the 2nd menu, last option.

That’s all you need to know about the UI. Next is how to use them.

First, I recommend extracting the portrait directory first for two reasons: so you can see how the images are edited, and more importantly, it’ll serve as a directory for you to know which image to replace and how to match the number from the same set. Each set of portrait comes with 7 pictures, or frame spreading in 4 blocks, and you’ll have to match them. In order to extract the files:

- Open the program and link them to your directory. You should see a bunch of BGM file and bin file.
- Select the DATA0.S13 (usually under the last BGM).
- Double click, nothing happen but that’s normal.
- Go to the batch export tool (under the third (B) menu) – 2nd option).
- On the pop up window, put 6 for the left and 10 for the right box, then hit the top right button of the window, choose a place you want to extract the image. Do it right should give you this window:

https://ibin.co/2nc5q4e5wgGB.png

- Hit the left button (start), the right button is the stop/exit button.

Go make a coffee or something; there are thousands of BMP to extract.


After the file are extract, browse through it. I’ll use the young offical Liu Bei set as an example to explain the structure. Like I mentioned above, each portrait come from a set of 7 images, for young Liu Bei it’s:

00000006_02653
00000006_02654
00000006_02655

00000007_00885
00000008_00885
00000009_00885
00000010_00885

- The 000000XX are the package prefix, the 0XXXX is the frame number. You might think the 3 frame in package 6 is the same pictures looking at the portrait, but I suspect they represent the 3 different alpha channels for the “breathing image”, this is the image you see when talking to a character in game. Package 7 is the full portrait in their bio, 8, 9, 10 are your various thumbnail icons.

- The idea is you will name your custom portrait with the exact same name as the original and then import them into the game. You can see that the 3 frames in pack#6 are consecutive, while the one for the 7, 8, 9, 10 are the same. In general if you take the lst frame number from pack 6 and divide it by 3, you’ll get a the frame# for the other packages, double check to be sure, use this to quickly look up. Again this is the reason why you want to extract them in the beginning, since flipping one frame at a time in the tool is extreme slow.

Say I want to replace him with Diao Chan, her frame number is:

00000006_02950
00000006_02951
00000006_02952

00000007_00984
00000008_00984
00000009_00984
00000010_00984

To replace Liu Bei, all I have to do is rename Diao Chan number to the same one as Liu Bei’s above. This is how you will name all of your future custom pictures.



Now to put the image in the game:

- Make sure you have DATA0.S13 selected.

- On the tittle bar: you should see something like 1/1365 and 0/0. The first set is your pack number, and the 2nd is the frame number.

- Hit the “next pack key” on the tool bar (first right green button) until you see 6/1365 for the package. Depending on how fast your computer is there will be a pause before 6 is open.

- Once you see 6/1365, the frame number will also be update to 1/3801 and you should see the first image on your screen.

- We know Liu Bei frame for package 6 starts at 2653, so hit CTRL+L and enter 2653, then hit enter, you should see his face on your screen, your tittle par should show something like 6/1365 and 2653/3801. Play with the blue arrow keys a bit to see if you’re at the right place, 2653, 2654, 2655 should give you the same image.

- To replace: make sure you are at the correct frame: hit the import key (right next to the right blue arrow key), then select your custom image (in this example it would be the Diao Chian picture after it was rename). MAKE ABSOLUTELY SURE THE NAME OF THE FILE IS THE SAME AS THE ONE YOU REPLACE OR YOU WILL GET AN ERROR.

- Once you’re done with the 3 frame in pack 6, click the next pack key for 7, 8, 9, 10 and it’s pretty much the same process. Once you’re done with all 7 image, hit save. That’s it. Again, depending on how fast your computer is, expect some brief or long unresponsive pause as you switch between the packages.


The process is actually pretty simple and quick once after you get used to it. It'll take between 1 to 3 minutes to import the set depend on how fast your computer handle the pack switching. You'll spend far more time editing and renaming the pictures outside the tool.
Last edited by JustaGamer; Jul 11, 2016 @ 11:31pm
JustaGamer Jul 11, 2016 @ 11:18pm 
Guide #2: how to edit an original stock image into the proper format so you can import using the previous guide. Credit and thanks to Spartanlemur for making this guide.

1. Pick an image. It will make your life a lot easier if you go with something with a distinct background, and less "flowy parts", but you can use any image you like if you're prepared to invest the time into it. Make sure the image is sufficiently large - for an idea of what to look for, check the "00000007" images exported from ROTK13 using the San13Pictool. You need an image that you would be satisfied with at this size (if you choose something too small, your character will appear smaller than others, or you will have to expand it, which will make it blurry). It's a matter of taste, so entirely up to you.

2. Download GIMP.

3. Launch GIMP and open your chosen image.

4. You're going to want to create a cut-out of your character using a layer mask, and you're going to want to do it in the ***aspect ratio*** "633x900", as this is what ROTK13 uses. You can do the whole image if you want, but it's unnecessary. DO NOT make it 633x900 pixels: it will need to be larger than this, as later you're going to have to cut out a 1024x1024 elbow-up image from it (see images from batch 7 for an example).

If you know how to do this, create your layer mask based cutout and skip to step 8.

5. So first of all, click "Windows > Dockable Dialogues > Tool Options" along the top to allow you to edit your selection. Now press "R" and drag a basic rectangle, before using the tool you just opened (if it was already open, check any windows which began open - it's called "Tool Options") to modify size to:

Left box: 633 Right box: 900

Click "Fixed (aspect ratio)" above to allow you to resize your rectangle to the correct size.

Now drag the corner of your rectangle and move it around until you have the selection you want.

If you mess this up, ctrl+z has quite a long memory in GIMP, and you can just press R and create a new rectangle to start the process again.

6. "Image > Crop to selection". This (minus the background) is how your image will appear in the game. If you don't like how it looks, undo, and repeat step 5.

7. Follow this guide to see how backgrounds are generally removed in GIMP:

https://www.youtube.com/watch?v=5pBNVLP3PQ0

Two step you need to do differently from the video:

- right click layer > delete top/transparent layer after cutting the black+white image as per the video

- don't do the background stuff at the end. Stop at the point where you have pasted your layer mask

This is basically what you are going to be doing. If your image has a complex background, you're going to have to manually trace along the edge of your cutout character, or carefully use the "fuzzy select tool" to select your character (shift click to select multiple areas) and then use the pencil/paint tool to fill with white (or do the reverse with black for the background). Your brush will not paint anything outside the selection. CTRL+A to select the whole image if you want to "reset" your selection. MAKE SURE that when you are painting the image white, you have the duplicate image selected in the right-hand panel (otherwise you will paint the main image).

The video says to turn the contrast up very high - this WILL NOT WORK if your background is similar to the main image. Fiddle around with the sliders to reach something that you think makes the cutout as distinct as possible from the background.

8. You now have your basic file. Most of the work has now been done. Save as a standard xcf file, as you'll want a backup in case something now goes horribly wrong.

9. We'll start with a "batch 7" image (the very large ones)". Create a 1024X1024 rectangle, fix the aspect ratio, and expand it to cover the part of the image you would like to use. Use the young Liu Bei portrait from Raven's guide as an example. If you want to see the background to help you with this, right-click on the layer in the tool panel, and check "disable layer mask". Make sure yo re-enable it once you are done.

10. Image > Crop to Selection. Image > Scale Image > 1024x1024 (it must be EXACTLY this size). Right click the layer in the tool panel again, and make sure "show layer mask" and "edit layer mask" are checked. Press "P" for the paintbrush tool, and in the brush panel, select something which fades at the edges. Use "]" to expand the size, select black as your colour, and click on the bottom left side of your image, hold shift, and then click on the bottom right side of your image. You may want to repeat this for the sides if any parts are cut off. Uncheck "show layer mask" and when you are happy with your profile, proceed to step 11.

11. File > Export As > Select by file type > BMP

***BREATHING IMAGES***

12. Open your "base.xcf" file (the basic cutout you created). Now click Layer > New Layer > 1024x1024 and transparent fill. Put this on the bottom.

13. Now make sure the image you want is in the aspect ratio 633:900, and then layer > Scale Layer to 633x900. Make sure "edit layer mask" is deselected. Press M and drag it into the top left corner so it meets it perfectly.

14. Image > Fit canvas to layers

15. Now, make sure that your cutout is the top layer (drag it to the top in the tool panel if you need to). Ensure "edit layer mask" is checked, then click

-Edit > Cut.
-Layer > Merge down.
-Add a layer mask to the base image, as per the video. You want it to be "black - full transparency" this time.
-CTRL+V
-Move the layer mask into the top left corner
-Anchor layer

16. Save as an xcf template. You now have your basic file from which you will create three sub-images which the game will use for breathing.

17. Download a programme called "Pixelformer", and use it to open up a set of three batch 6 images. Click view > alpha only to see how Koei has done them. The order is torso - waist - head. In GIMP, check "show layer mask", and "edit layer mask" and use the paintbrush tool as before to fade away the body parts you are not doing (face/torso/chest), and then when done, export each as a BMP file. Check them in Pixelformer to make sure they will cover the whole body.

Repeat this for each part, and you will now have breathing images done!

18. You should by now have batch 6 and 7 out the way. 8 and 10 are simple cut+paste jobs, while 9 requires the same method you used to get your breathing template.


For 9, the easy way to do it is to draw a square around the part of the head you want (using your base xcf file with the layer mask), and then:

Image > Crop to selection.
Image > Scale image > 72x72
Image > Canvas size > 128x128
Check edit layer mask and use the black paint brush to lightly fade the top and sides of the image
Export as BMP (image 9 done)

For 8: Open your original file (no layer mask, just the basic image), create a 186x90 rectangle, fix the aspect ratio, and expand it to cut out the wide profile of the face you want.
Now as with 9, crop image to selection, scale image down to 186x90, change the canvas size to 256x128. Make sure your foreground colour is black (it's the front rectangle on the toolbox).
New layer (leave it as the default canvas size, and select "foreground color"). Move the face on top, and merge down.

I don't know if you need to do the tabs on the side, but I used the pencil tool to do them anyway. Export as BMP, and you're done.

For 10.Exactly the same as with 8, except you are cutting out a 96x96 square rather than a rectangle. A shortcut would be to cut it from image 8, but if you want (slightly) higher quality, start from the basic image again. You could even CTRL+Z back to the original rectangle cutout if you want a consistent profile AND high quality.

IMPORTANT: All BMPs should be Imported in Pixelformer and Re-exported (boxes unchecked, 32 bit) before importing them into the game. (For some reason the San13editor doesn't like GIMP).


19. When done with your set, follow Raven's guide to put them into the game.
Last edited by JustaGamer; Jul 12, 2016 @ 9:04pm
JustaGamer Jul 11, 2016 @ 11:22pm 
This particular post will be reserved for completed works, hopefully we'll have more as time goes on.

- 3 Complete package made by Spartanlemur. Good for you to test our guide#1 and try to import into the game.


{LINK REMOVED}

{LINK REMOVED}

{LINK REMOVED}

Some other package:

{LINK REMOVED}

{LINK REMOVED}

{LINK REMOVED}

Here is the first package verified successfully imported into the game:

http://steamcommunity.com/sharedfiles/filedetails/?id=722174045
Last edited by JustaGamer; Jul 16, 2016 @ 5:32pm
Spartanlemur Jul 11, 2016 @ 11:38pm 
Also, if anyone knows any sources of good HD artwork which would fit with the aesthetic of RTK13, links would be helpful.
TwoHeavensAsOne Jul 12, 2016 @ 7:45am 
Thanks guys, I finally managed to import my own portrait into the game. As for GIMP, it needs to be GIMP 2.6 or it won't save your alpha channels correctly. Pixelformer is optional. It's not really needed when you have the correct version of GIMP.
Last edited by TwoHeavensAsOne; Jul 12, 2016 @ 7:45am
Spartanlemur Jul 12, 2016 @ 10:10am 
Originally posted by TwoHeavensAsOne:
Thanks guys, I finally managed to import my own portrait into the game. As for GIMP, it needs to be GIMP 2.6 or it won't save your alpha channels correctly. Pixelformer is optional. It's not really needed when you have the correct version of GIMP.

Ah, you appear to be right. I'll update the guide.

Edit: Done

Also, I'll take a look at Deviantart like you said.
Last edited by Spartanlemur; Jul 12, 2016 @ 10:17am
TwoHeavensAsOne Jul 12, 2016 @ 11:01am 
What's the portrait size for package 9? It's the only one missing in my portrait set. I know the border is 128 x 128, but what's the size of the actual portrait?
Last edited by TwoHeavensAsOne; Jul 12, 2016 @ 11:02am
JustaGamer Jul 12, 2016 @ 11:23am 
I don't think the portrait itself have to be exact as long as the border is correct, if you don't like how it look in game you can go back and adjust it.
Last edited by JustaGamer; Jul 12, 2016 @ 11:24am
Spartanlemur Jul 12, 2016 @ 12:00pm 
Originally posted by TwoHeavensAsOne:
What's the portrait size for package 9? It's the only one missing in my portrait set. I know the border is 128 x 128, but what's the size of the actual portrait?

72 x 72
JustaGamer Jul 12, 2016 @ 12:40pm 
@Spartan: In hind sight I think I should have asked you to post the guide yourserf at the beginning so you can edit it yourself. Just edit the original guide on the other topic, I'll keep an eye on it and will past the update onto the 3rd post here.

btw is that filebin site you're using free and safe? I think I find a few set that you would like.
Last edited by JustaGamer; Jul 12, 2016 @ 12:44pm
Spartanlemur Jul 12, 2016 @ 2:58pm 
Originally posted by Raven2015:
@Spartan: In hind sight I think I should have asked you to post the guide yourserf at the beginning so you can edit it yourself. Just edit the original guide on the other topic, I'll keep an eye on it and will past the update onto the 3rd post here.

btw is that filebin site you're using free and safe? I think I find a few set that you would like.

Yeah, I edited the guide on the other page. To be honest, I doubt there will be a lot of changes to it, because the ROTK 13 image format isn't going to change.

Filebin is not a long term storage site (I only used it because it was quick) but it's good for quickly sharing stuff. Dropbox is probably better, so I'll dump the images there some time soon.
JustaGamer Jul 12, 2016 @ 3:22pm 
can you explain 8,9,10 for me? What do you mean by 8-10 is cut and paste and using the same method for 9?
Spartanlemur Jul 12, 2016 @ 3:40pm 
Originally posted by Raven2015:
can you explain 8,9,10 for me? What do you mean by 8-10 is cut and paste and using the same method for 9?

So for 9, the easy way to do it is to draw a square around the part of the head you want (using your base xcf file with the layer mask), and then:

Image > Crop to selection.
Image > Scale image > 72x72
Image > Canvas size > 128x128
Check edit layer mask and use the black paint brush to lightly fade the top and sides of the image
Export as BMP (image 9 done)

8: Open your original file (no layer mask, just the basic image), create a 186x90 rectangle, fix the aspect ratio, and expand it to cut out the wide profile of the face you want.
Now as with 9, crop image to selection, scale image down to 186x90, change the canvas size to 256x128. Make sure your foreground colour is black (it's the front rectangle on the toolbox).
New layer (leave it as the default canvas size, and select "foreground color"). Move the face on top, and merge down.

I don't know if you need to do the tabs on the side, but I used the pencil tool to do them anyway. Export as BMP, and you're done.

10.Exactly the same as with 8, except you are cutting out a 96x96 square rather than a rectangle. A shortcut would be to cut it from image 8, but if you want (slightly) higher quality, start from the basic image again. You could even CTRL+Z back to the original rectangle cutout if you want a consistent profile AND high quality.
Last edited by Spartanlemur; Jul 12, 2016 @ 4:02pm
JustaGamer Jul 12, 2016 @ 3:59pm 
Tried to import my batch 6 image and look like I did something wrong, the program is rejecting it :(
Last edited by JustaGamer; Jul 12, 2016 @ 4:00pm
Spartanlemur Jul 12, 2016 @ 4:02pm 
Originally posted by Raven2015:
Tried to import my batch 6 image and look like I did something wrong, the program is rejecting it :(

Let me look at it.

Make sure that the image is the right resolution, format, and is 32 bit (right click, properties, details in WIN10).

The other way to see where you might have gone wrong is to open it in Pixelformer, and then view > color only/alpha only/normal, comparing to a batch 6 image from the base game.
Last edited by Spartanlemur; Jul 12, 2016 @ 4:28pm
< >
Showing 1-15 of 49 comments
Per page: 1530 50

Date Posted: Jul 11, 2016 @ 11:14pm
Posts: 49