+  Koei Forums
|-+  Romance of the Three Kingdoms®» RTKXI for PC» Guide to edit a Map in ROTK XI
Username:
Password:
Pages: [1] 2 3 ... 26   Go Down
  Print  
Author Topic: Guide to edit a Map in ROTK XI  (Read 46844 times)
0 Members and 1 Guest are viewing this topic.
Zetta

Offline Offline

Posts: 215



« on: March 27, 2010, 04:06:11 am »

Hello everyone.

Lezard from the-scholars.com has modified the guide. I'd like to take this opportunity to thank him for his work and all the improvements he added to it.
The original thread : http://the-scholars.com/viewtopic.php?f=38&t=22893
You can download the new guide here (v1.4) : http://www.sendspace.com/file/viwjxz

You will need an HEX editor to change a map, but it may take some time to get used to it. The maps are coded in "small" files (175Ko): you can see and modify the country descriptions, the character's names etc... So, basically, you can create new maps by modifying old ones, using a simple hexadecimal editor. I'd like to thank Hero of Chaos for his contributions and Scholar, for the constant reassessing of this guide.


Contents:

1) Changing name, date ,description.

2) Changing characters
Detailed officer editing Part I and Part II
Editing Items

3)Creating a New Force

4)About cities, gates and ports
List of all cities codes

5)A practical example
An illustrated example


1)Changing name, starting date and descriptions.



DESCRIPTIVE DATE :
The first characters you see in the file are those:
http://img690.imageshack.us/img690/8646/datedescr.jpg
With a classical HEX-Editor, you see:

00  00  fe  ff  02  00  00  00 KOEI%SAN11 00  00  00  00  00  00  00  00  00  00  17  00  00  00  00  00  00  00  00  00  00  00  00 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  b8  00  01  01 Yellow Turbans

After 90 bytes, there is the descriptive date: YEAR-00-MONTH. You may put a date very far away from the limit, but I don't know if you will be able to play. So let's use our HEX-editor. Replace the b8 with a c2 for example. b8 codes for year 182 (see table http://www.ascii.cl/htmlcodes.htm). Replacing it with a c2 gives us year 194. The 01 codes the month. Let's play in march, shall we ? Put a 03 instead of it.
Example:
November 199 http://img88.imageshack.us/img88/7471/example2j.jpg



NAME AND DESCRIPTION:
Here we have raw code. Depending on the HEX-Editor you use, you can see names such as "Liu Bei in Shu". Let's call it KOEI Forums. Replace one letter after another. Well, it's too short. We still have Shu written. We could replace it with 00 also sometimes called NUL bytes. Copy and paste three NUL bytes instead of "Shu". Result:
http://img38.imageshack.us/img38/5585/koeiforums.jpg

Then, you see the description of the map. The idea is the same. Modify one after another the letters you want to change. The rest of it shall be 00 bytes. Example:
http://img94.imageshack.us/img94/826/dedicated.jpg



FORCES DESCRIPTION:

It seems that this code follows the order you have put in the added forces. You may want to change it, just like the title of your map. The process is the same.



IN-GAME DATE:
Once you modified the descriptive date, go down in the code. Stop at ® or ae. Yes, you see it ? After massive 00 bytes and forces description, we have the date and month exactly the same way:
00 00 b8 00 01 01 bc 02 00 00 00 00 00 ff (
00 00 00 00 00 00 00 00 00 ae

Let's play in March 194 (meaning c2 00 03).
But now we have a little problem... The characters are a bit younger !! This leads us to the change of characters.
« Last Edit: June 09, 2013, 01:17:02 am by Zetta » Logged
Zetta

Offline Offline

Posts: 215



« Reply #1 on: March 27, 2010, 04:09:39 am »

2)Changing Characters.

Even if all characters are certainly encoded in another file, you can modify them within the map. The only thing you can't modify is the biography (I think). It begins at Ahui Nan and ends with special characters like "Soldier" etc... Even the Emperors are in there and can be played in-game! One character is ALWAYS coded with 152 bytes. I never found any exception (and if you find one, then please tell it). So if you ADD one byte, it will change everything and create a huge mess...
This is the code, in order of what has been discovered.
Name- Second Name  - Face -? - Allegiance - Location - Service - ? - Spear  - Pike - Bow - Cavalry - Weaponry - Navy - Ldr - War  - Int - Pol - Chr - ?



CHANGING NAMES:
We will be working on Yang Song (this horrible character), his code is:

Yang 00 00 00 00 00 00 00 00 Song 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b9 01 00 ba 00 a7 00 d7 00 01 H02 06 08 ff ff 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0a $ 00 $ 00 03 49 ff ff 61 40 1f 00 00 00 00 00 00 02 05 1c " 05 04 04 04 04 04 ff 02 00 02 02 00 00 00 03 00 00 jstff ttff ff ff ff ff ff  00 00 00

Use the function "search" to find him in the code. He has 152 bytes, like everyone. We see his name and other things that doesn't seem to be understandable. But by changing them one after another we will see what happen. Change his two names to whatever you want by replacing the bytes that code it. After the name, we find the face code. I don't know how it works, but you may change it. Portraits are surely in a certain order. We just need to find what it is.



CHANGING ALLEGiANCE - LOCATION - SERVICE:

After 95 bytes you will find this:

Yang 00 00 00 00 00 00 00 00 Song 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b9 01 00 ba 00 a7 00 d7 00 01 H02 06 08 ff ff 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0a $ 00 $ 00 03 49 ff ff 61 40 1f 00 00 00 00 00 00 02 05 1c " 05 04 04 04 04 04 ff 02 00 02 02 00 00 00 03 00 00 jstff ttff ff ff ff ff ff  00 00 00

How is for example Sun Quan at this place ? He's 06 16 00 16. Replace it with the same things. Actually, Sun Quan is the 6th force coded in the Liu Bei in Shu scenario. That is why it is 06. Then the cities have numbers from 00 to 40 (?). 16 should therefore be city Jian Ye. We still need to make a list of cities and their numbers.



THE MARTIAL ABILITIES:

Yang 00 00 00 00 00 00 00 00 Song 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b9 01 00 ba 00 a7 00 d7 00 01 H02 06 08 ff ff 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0a $ 00 $ 00 03 49 ff ff 61 40 1f 00 00 00 00 00 00 02 05 1c " 05 04 04 04 04 04 ff 02 00 02 02 00 00 00 03 00 00 jstff ttff ff ff ff ff ff  00 00 00

We have 6 bytes that code the rank of weapon. The order found was: spear-pike-bow-cavalry-weaponry-navy. They use 00 (=rank C) 01 (=rank B) 02 (=rank A) 03 (=rank S). Yang Song only has 00 or C ranks. Let us put:
Spear A  - Pike B - Bow S - Cavalry S - Weaponry A - Navy C
Code : 02 - 01 -03 - 03 - 02 - 00

After that, why not putting him some strenght ? Like 100 in every stat ?
Just after the weapon ability code, there is the statistics. He has Ldr 2 - War 5 - Int 28 - Pol 35 - Chr 5. Code found is 02 05 1c " 05 (STX ENQ FS " ENQ) which corresponds to the numbers if you look at an HEX-table. Change him to Ldr 70 - War 90 - Int 89 - Pol 76 - Chr 99 meaning code: 46 5a 59 4c 63 (or F Z Y L c)
« Last Edit: April 05, 2010, 01:13:59 am by Zetta » Logged
scholar
What do you think?

Offline Offline

Posts: 4398


Liu Bei chronicle


WWW
« Reply #2 on: March 27, 2010, 10:30:28 am »

Haha, sorry, I couldn't help but laughing. I fiddled around with the text before, I literally created a second coalition against Dong Zhou, but really all I could do was change the name and description. I fiddled around with it and I decided against actually creating a scenario and focused more on editing in game games because it's a bit easier.

But I do wish you the best of luck with this guide, maybe then we can actually start creating games instead of creating saves  Wink
Logged

My story, Fallen Kingdoms read it, you'll like it Wink

History is... amazing, but it is also tragic. It is a story of never ending heroism, deceitfulness, wonder, pain, and tragedy. It is an unfinished epic, an unsolved mystery. There is so much we do not know, and there is so much we have yet to learn.
Imyourbaka
Believe.

Offline Offline

Posts: 585



« Reply #3 on: March 27, 2010, 10:51:22 am »

OMG IM DEDICATED  Grin Grin Grin Good job!!! Do you use the hex editor neo?
Logged

They gave their tommorow for our today.
Hero of Chaos
Emperor Wu of Wei

Offline Offline

Posts: 594



« Reply #4 on: March 27, 2010, 11:07:50 am »

Well,I looked through the files and I don't really see numbers that fit for the cities. I was able to edit the preview map that shows up when you hover over the scenario,but as soon as I klick on it,the forces are reset to what they were before. And I thought I found out how to edit the forces in the city...

I think the biggest problem here will be creating forces in certain cities. Moving around officers isn't hard,editing their name/model/stats/skill/APT isn't hard and editing their status (ruler,officer,viceroy,prefect,free officer,underaged,searchable and dead) isn't hard,but creating new forces is hard. Good luck with this,I failed.

@scholar: How do you edit the savegames? I know that it works with Van's editor,but don't you have the english version? (and Van's editor doesn't work for the english version,I opened a save file with it and all I saw was a mess) When I opened my save files with a hex editor,I didn't really know what to do.
Logged
scholar
What do you think?

Offline Offline

Posts: 4398


Liu Bei chronicle


WWW
« Reply #5 on: March 27, 2010, 11:56:22 am »

I don't edit, edit, perhaps manipulate is a better term. You basically play out the scenario to the point that you want, save it, change some of the troop numbers (either manually or the editor that has a few bugs) and then cut off the scenario, save it, and upload it for all to use.
Logged

My story, Fallen Kingdoms read it, you'll like it Wink

History is... amazing, but it is also tragic. It is a story of never ending heroism, deceitfulness, wonder, pain, and tragedy. It is an unfinished epic, an unsolved mystery. There is so much we do not know, and there is so much we have yet to learn.
Hero of Chaos
Emperor Wu of Wei

Offline Offline

Posts: 594



« Reply #6 on: March 27, 2010, 12:12:44 pm »

Ah.
Well,I thought about making my "The Tiger and the Noble" scneario that way before,but after I realized how to use Van's editor,I dropped the idea.
Logged
Zetta

Offline Offline

Posts: 215



« Reply #7 on: March 27, 2010, 12:38:49 pm »

Do you use the hex editor neo?
I'm using Notepad ++. I don't know if it is enough to change the whole file, but until now it worked fine.

I fiddled around with the text before, I literally created a second coalition against Dong Zhou, but really all I could do was change the name and description. I fiddled around with it and I decided against actually creating a scenario and focused more on editing in game games because it's a bit easier.

I was able to edit the preview map that shows up when you hover over the scenario,but as soon as I klick on it,the forces are reset to what they were before. And I thought I found out how to edit the forces in the city...

So I'm not the only one who tried to change maps. That's a good thing Cheesy. How both of you did what you have done (i.e. creating a coalition and colors on the map?)
And yes, the big problem is to create new forces. I'm working on it now. I found out a few things about characters and will be writing something pretty soon.

About chinese version, it just seems to be totally uncompatible with the english one. I tried the Van editor, downloaded some stuff for ROTK 11, like maps etc... but all of them didn't work at all.
Logged
El Jefe

Offline Offline

Posts: 751



« Reply #8 on: March 27, 2010, 10:10:01 pm »

lol I'm surprised my name appeared on your list!

I'm completely incompetent with HEX code; I understand the concept well enough but not in any practical sense. So I've never toyed with it much. But if you actually do succeed in creating some scenarios that aren't too farfetched to add to the existing ones, that would be pretty sweet. I'd personally like to see something to fill in that massive gap between 211 and 225, perhaps a pre-invasion Shu with Guan Yu and Jing intact. Another one would be a late scenario where Zhuge Dan/Guanqiu Jian have broken off and/or Sima Yi has launched his coup. Older games tended to fall apart in the 240s due to a lack of officers, but XI is still playable in the 270s - especially if you throw in some created officers...too bad you have to loaf around for 40 years to experience it.
Logged
Hero of Chaos
Emperor Wu of Wei

Offline Offline

Posts: 594



« Reply #9 on: March 28, 2010, 02:28:29 am »

PUK has a scenario starting in 217 AD,with Cao Cao,Liu Bei,Sun Quan,Meng Huo and Gongsun .... as rulers. Cao Cao owns Han Zhong there. If we succed in mastering this,I could try to "convert" this scenario and the other ones in PUK.
Logged
scholar
What do you think?

Offline Offline

Posts: 4398


Liu Bei chronicle


WWW
« Reply #10 on: March 28, 2010, 12:44:20 pm »

It's in the PS2 version too, along with Lu Bu in Xu.
Logged

My story, Fallen Kingdoms read it, you'll like it Wink

History is... amazing, but it is also tragic. It is a story of never ending heroism, deceitfulness, wonder, pain, and tragedy. It is an unfinished epic, an unsolved mystery. There is so much we do not know, and there is so much we have yet to learn.
Zetta

Offline Offline

Posts: 215



« Reply #11 on: April 03, 2010, 12:36:05 am »

This is one of the most important parts, and also maybe one of the hardest. But if you persevere, you will be able to add or delete any force, with any leader and strategist.

After all characters and items, there is a part of the code with a lot of "2222222" or "32 32 32 32 32 32 32". You can't miss it, there is something like 40 lines of them, it's near the end of the file. It is from there that we may find what interests us.



COLOR, RULER, STRATEGIST

The code for one force is made of 68 characters: it begins with "˙˙˙˙" or ff ff ff ff, then 42 bytes of "2" (but it's not always "2"), then 22 bytes until the next line. One line codes one color and force. Choose your force's color depending on the LINE you choose. You may try to change the color, using the table given previously, but not all combinations work.

ff ff ff ff 32 32 32 32 32 32 32 32 32 32 32 32 32 64 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 00 00 00 00 09 ff 0d ff ff 00 00 00 00 00 00 00 00 00 00 00 00

Now, how does the code work ? The two first "ff ff" codes for the leader of the force. Then, we have the strategist. For example, compare those lines taken from “Liu Bei in Shu” scenario here:

No force:
ff ff ff ff 32 32 32 32 32 32 32 32 32 32 32 32 32 d3 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 00 00 00 00 09 ff 0d ff ff 00 00 00 00 00 00 00 00 00 00 00 00

Cao Cao's force:
57 01 3c 00 64 0a 0a 00 28 32 32 32 32 28 32 32 50 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 00 3c 00 00 03 ff 00 00 ff 00 00 00 00 00 00 00 00 01 00 01


The color is determined with the ff 0d ff ff . Use the officers list to put the leader and strategist you want. They are not in alphabetical order.
For example, you should try to modify a line, so that we have a new force, with Sun Shi as a leader (73 01) and Cao Rui (48 01) as a strategist :
ff ff ff ff becomes 73 01 48 01
Now, you may select this new leader. However you still have to give it a force number.


ALLIANCES

This is pretty logic: the 2 codes for your relationship with other forces, and that "d" or 64 that seems to travel in the code (if you look at it, it just goes from the left to the right) codes for your "relationship" with you. Meaning you shouldn't change it. So 32 codes for neutral. The rest still needs to be discovered. The first "2" for example, is your relationship with blue force (here Cao Cao for example). This is why Cao Cao has a "d" or 64 here, as he is the first force that is coded.


ADDING A FORCE


This is very important for you to create a new force. After all those "222222" we have some lines that seem to be constant in all files. And then we have:

64 09 29 36 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 01 57 01 01 02 03 11 00 02 3b 00 04 ff 01 ff 00 03 55 00 04 ff 00 ff 00 04 b7 01 04 ff 00 ff 01 01 7b 02 01 04 00 ff 01 02 14 02 04 ff 00 ff 02 01 6f 01 01 03 00 ff 02 02 fb 00 04 ff 00 ff 03 01 03 02 00 00 00 ff 04 01 p 02 04 ff 01 ff 09 01 ba 01 04 ff 01 ff 0c 01 b2 00 04 ff 00 ff ff 00 ff ff ff ff ff ff ff 00 ff ff ff ff ff ff ff 00 ff ff ff ff ff ff ff 00 ff ff ff ff ff ff ff etc...

Finally, we found where forces are coded. It's between two ff 00 ff. You really can see a shape and regularity here. One force is coded with five bytes between two ff 00 ff. And it seems that the districts are also coded here. If you want to add your force, you'll have to put:

(force colour) (district number, better 01) (Ruler name in TWO bytes) (one byte: I don't know what it codes for, put 00 if you want)

You can recognize it because we have already seen those letters previously in the colour / ruler lines. THE POSITION is very important as it gives you a code for changing officers and city alleageances. There is room for 42 forces. For example, if you put your force in the 6th place, it will be 05. Cao Cao is in the first position, so he has 00, but he also has districts like 01 02 03.

Note: be very careful here in where you place your force. One byte shifted and the game won't recognize your force number.
« Last Edit: May 23, 2010, 03:16:15 am by Zetta » Logged
El Jefe

Offline Offline

Posts: 751



« Reply #12 on: April 03, 2010, 12:29:11 pm »

I read through and I'm lost, but I still have massive hopes for this. I know scholar has apparently figured out importing faces to players who haven't toyed with the face editor - though killaz916 from SOSZ first introduced me to the concept - and I would love to see some sweet import save states to run with.
Logged
scholar
What do you think?

Offline Offline

Posts: 4398


Liu Bei chronicle


WWW
« Reply #13 on: April 03, 2010, 05:25:06 pm »

I read through and I'm lost, but I still have massive hopes for this. I know scholar has apparently figured out importing faces to players who haven't toyed with the face editor - though killaz916 from SOSZ first introduced me to the concept - and I would love to see some sweet import save states to run with.
Working on it. However if you put this into your documents/RTKXI/Facedata folder you will gain access to portraits for Napoleon, Emperor Meiji, all of the Shi family from RTKX, Nobunaga, Akechi Mitsuhide, The Shoguns Yoshiteru and Yoshiaki, Yoshimoto Imagawa, and finally Alexander the Great. If this doesn't work, let me know and I'll try to fix the problem right away.  Wink

Minor warning, if you already added portraits to your game they will be over written by this file, I would suggest saving a copy of your own original face data and moving it to another folder if you have anything you don't want to lose.
« Last Edit: April 03, 2010, 06:12:23 pm by scholar » Logged

My story, Fallen Kingdoms read it, you'll like it Wink

History is... amazing, but it is also tragic. It is a story of never ending heroism, deceitfulness, wonder, pain, and tragedy. It is an unfinished epic, an unsolved mystery. There is so much we do not know, and there is so much we have yet to learn.
El Jefe

Offline Offline

Posts: 751



« Reply #14 on: April 03, 2010, 10:17:25 pm »

Like I said, someone else introduced me to that idea.  Wink But I've added numerous faces to my game for the missing officers project, so for the time being, I don't want to tamper with that particular file, no matter how easy.
« Last Edit: April 03, 2010, 10:18:59 pm by El Jefe » Logged
Pages: [1] 2 3 ... 26   Go Up
  Print  
 
Jump to:  

Page created in 0.4 seconds with 18 queries.