A New RoTK XI Guide

Use this forum to discuss hex-editing or otherwise altering any Three Kingdoms game, and to promote modded titles and patches.

Re: A New RoTK XI Guide

Unread postby Zyzyfer » Fri Mar 15, 2013 1:19 pm

Well I have to add a force to the Imperial Rescue X scenario so I guess I will go with that instead of Zhou Cang. I will try to detail the process step by step, more or less.

The person I want to make a ruler is Zhang Xian, who rebelled sometime after Zhang Ji's death attacking Liu Biao, and gave Liu Biao considerable trouble down in Jing in the 190s. He is absent from the game, and I have given him one of the Historical XX slots. His son Zhang Yi and another missing Yang Ling are also being added, along with existing officer Huan Jie. There will be no strategist as Huan Jie does not have high enough INT, but that part is easy to figure out already. (You can actually assign anyone you want here without having the officer yet, even Zhuge Liang...)

In 196 X, Zhang Xian's officer location hex is b1 02, Zhang Yi is b2 02, Yang Ling is b4 02, just for reference. The force will be based in Changsha (city code 1f) and I will use force color 0d (it's the first free one) and district slot 18.

1) assign ruler etc in force code based on desired color (this determines force color)

Okay, so I want to find force code for 0d. This stuff all starts at offset 0002735b with Cao Cao's force. 0d starts at offset 000276cf. Empty forces always start with ff ff ff ff; these bytes are for ruler and strategist. Zhang Xian will be the ruler, so I will change it to b1 02 ff ff.

Now for a little extra challenge. Notice all of the 32 32 32 32 stuff after the strategist byte. The 14th value however is 64. In every force, this codes relations with 0d. Since Zhang Xian rebelled against Liu Biao, I'll make them start off hostile to each other. 64 is Trusted maxed out, 00 is Hostile maxed out. I will make their relations 0a (rather Hostile) for fun.

To do this, we have to change the value for 0d in Liu Biao's force color code, and Liu Biao's in the byte for force 0d. Liu Biao is the 7th force (color 06, starts at offset 74f3). So in Liu Biao's force, change the 14th force's relation byte (7504) to 0a. Then, in Zhang Xian's force down at 0d, change the 7th force relation byte (76d9) to 0a. There, now they hate each other very much.

The last change I will make, since it is X Series, is giving him some starting tech. In 194 X he has Reinforce Defenses. Since this scenario is in 196, I will give him Drill Pikes as well. I want him to be able to defend against Liu Biao.

Tech is coded a bit weird. The tech bytes for force 0d start at offset 770f. But each pair is reversed, so the hex order is pikes, spears, cavalry, bows, invention, command, fire, defense. So the first 00 is pikes then spears, no tech for either. The standard values are 1 (level 1), 3 (levels 1 and 2), 7 (levels 1-3), and f (all levels). So, to get the tech I want, I will change 00 00 00 00 here to 10 00 00 0f. There, now he has Drill Pikes and all the defense tech.

There are other things you can do in this section but that's a basic explanation.

2) assign new district for force (this determines force code)

Sometimes it isn't possible due to all the districts, but a very good rule to remember when adding a force is to try to use the same force code and district slot when possible. It's just simpler.

Okay, down to the district code. This starts at 7f09 with Cao Cao. The 14th slot to match 0d is not available, but the 18th slot (806f) is available. So I will change it from:

ff 00 ff ff

to:

0d (force color) 01 b1 02

You can do whatever you want with the rest, I usually don't mess with AI force behavior and just use a basic one for the smaller forces.

Now you have your force/district code: 18, or in hex, 13 (Cao Cao being 0 throws this off one). Also, your force technically exists - but is not playable yet, and probably not visible.

3) assign troops/gold/food/supplies/order/will to desired city

Now that you've got your color (0d) and district (13) hex values. Now it's time to make your base. The city code for Changsha begins at offset 8b1e. You will see ff a0 86 01. Change that to 13 a0 86 01. After that, input whatever you want here for gold, food, troops, equipment, etc. I won't go into this as it is in the guide.

Yay! The tricky part is over. You're almost done.

4) assign officers to that city, location, officer rank, loyalty, optionally deeds

Now it's time to put officers on the force. First I will go to Zhang Xian's officer code. You have to assign him as the ruler, so starting with his allegiance byte (for slot b1 02 this is offset 06da), I will change the code from whatever it may be starting at that offset to: 13 1f 00 1f 00 00 50 ff ff 64. That's allegiance - 13, location - 1f 00 (it appears twice for slightly different purposes), 00 (ruler status), 50 (no rank), ff ff (no dependence), 64 (loyalty). The next two bytes are deeds, so put whatever you want there.

Then I will repeat the process with the other officers, with the only difference being that their status will be 03 instead of 00.

5) optionally, assign ports/gates to city (force code/troops/gold/food/equipment/will)

Lu Xian Port belongs to Changsha, so I will give him that port as well. Lu Xian starts at offset 98d9. Put in 13 there and then fill in the rest of the stuff as you desire.

6) optionally, update scenario description; force color in city, force description

The introductory map doesn't affect anything in the game, and you now have your very own new force ready to go, but you can make a few finishing touches here.

The force color for Changsha is at offset 0000 02f1. This is just below the scenario description. Here, you input the force color, 0d.

The force description starts at offset 0000 2277, the force description for force color 0d. 2277 is the difficulty, ranging from 00 (1 star) to 04 (5 stars). It may depend on your editor, but I just use Hex Editor Neo, and I type what I want to appear on the side bar rather than directly in the hex window.

-----

Like I said, it's not a straightforward process to add a new force. There are several changes that must be made, even for a small force like Zhang Xian. I would suggest practicing with a throwaway copy of a scenario and existing officers to get the hang of it. The four key points are getting your force color, getting your district code, giving yourself a city, and making your ruler an actual ruler. If you do not do these four key steps, the force will not function properly.
Gamefaqs: KongZhou
Steam: heinous_won
User avatar
Zyzyfer
Scholar of Shen Zhou
 
Posts: 3088
Joined: Thu May 08, 2008 1:17 pm
Location: South Korea

Re: A New RoTK XI Guide

Unread postby Lezard » Fri Mar 15, 2013 10:58 pm

Looking good Zyzyfer! :D

I've changed/adapted the text and replaced the Zhou Cang example in the guide.
Since it's based on a scenario that doesn't come with the game, I'll pack the scenario with the guide in the next version.

version 1.3 (PDF) with new example:
http://www.sendspace.com/file/d1s6of

The only thing I think is confusing is the "force position/slot" code that you've called "force color", maybe it would be nice to add a paragraph to explain this tie you did. :wink:
"They envied the power that I wield, and that envy led them to an early end". —Lezard Valeth
User avatar
Lezard
Retired Account
 
Posts: 445
Joined: Sun Nov 25, 2012 10:33 pm

Re: A New RoTK XI Guide

Unread postby Zyzyfer » Sat Mar 16, 2013 7:33 am

Well it's the force slot, but it also determines the force's color, which you need to have before you can make the force exist in the district section. I realize it's not following the parlance that we have given various bytes, but it's a key element of creating a new force, getting the color, so I felt it's important to state it as such.

I guess I should have repeated Zetta's Zhou Cang example for simplicity, but since I actually had to add a force to an alternate scenario, I went with this. I suppose it could be altered to fit the Zhou Cang thing instead, since I only put the offsets in for foosoomin's sake.
Gamefaqs: KongZhou
Steam: heinous_won
User avatar
Zyzyfer
Scholar of Shen Zhou
 
Posts: 3088
Joined: Thu May 08, 2008 1:17 pm
Location: South Korea

Re: A New RoTK XI Guide

Unread postby Lezard » Sat Mar 16, 2013 7:05 pm

I see, but it's actually a good practice not to mess with the colors, leaving them tied to the slots (you look at the map to see which color is available in order to know which slot to use — that's the best way). What I really mean is that a beginner may find strange to see colors linked to positions, since you do have the byte to change color available. So maybe it's better to say that explicitly, don't you think?

I agree that parlance maybe confusing, specially with "force color/slot" and with "district/force code", I should revise all the guide in order to standardize it, but that takes time.

I wouldn't say Zhou Cang example, but something more familiar such as an original scenario without created officers. But that is not a big issue, I've tried to make things clear in the guide and will pack the scenario together. This scenario have those created officers right? They're not exclusive of the X series right?
"They envied the power that I wield, and that envy led them to an early end". —Lezard Valeth
User avatar
Lezard
Retired Account
 
Posts: 445
Joined: Sun Nov 25, 2012 10:33 pm

Re: A New RoTK XI Guide

Unread postby foosoomin » Sun Mar 17, 2013 6:33 am

Lezard,


You worried too much about

1) force position

2) force number

3) force colour

4) force district position


Later I will upload a force ruler screenshot, I wanna convince you, force position & force colour can be different.


I even placed Shanyue Chief force as 1st force position ( I swapped position with Cao Cao force )
foosoomin
Scholar of Shen Zhou
 
Posts: 721
Joined: Fri Jun 10, 2011 7:26 am

Re: A New RoTK XI Guide

Unread postby Lord_Cao_Cao » Sun Mar 17, 2013 8:05 am

I think he perfectly knows that you can change the force colour, but it might cause problems for beginners who could get confused.
User avatar
Lord_Cao_Cao
Scholar of Shen Zhou
 
Posts: 1341
Joined: Sun Mar 21, 2010 9:14 am
Location: Germany

Re: A New RoTK XI Guide

Unread postby Zyzyfer » Sun Mar 17, 2013 9:11 am

Lezard wrote:I see, but it's actually a good practice not to mess with the colors, leaving them tied to the slots (you look at the map to see which color is available in order to know which slot to use — that's the best way). What I really mean is that a beginner may find strange to see colors linked to positions, since you do have the byte to change color available. So maybe it's better to say that explicitly, don't you think?


You can explain that if you want but I've had problems when I tried to mess with changing colors in force slots, so in my case at least, I find the color I want and go from there.

I wouldn't say Zhou Cang example, but something more familiar such as an original scenario without created officers. But that is not a big issue, I've tried to make things clear in the guide and will pack the scenario together. This scenario have those created officers right? They're not exclusive of the X series right?


They're exclusive to the X Series, actually. The process is more important though, and you can just change it to existing officers without having to change the explanation too much.
Gamefaqs: KongZhou
Steam: heinous_won
User avatar
Zyzyfer
Scholar of Shen Zhou
 
Posts: 3088
Joined: Thu May 08, 2008 1:17 pm
Location: South Korea

Re: A New RoTK XI Guide

Unread postby foosoomin » Sun Mar 17, 2013 4:09 pm

Lezard,


See this Dong Zhuo Rise (Version 3) scenario

Download: https://www.dropbox.com/s/6bndph0cfo3qvck/SCEN009.S11





Force Position


Image



Cao Cao force position is now at 10 ( Hex value 0A )

His force colour still remain at default blue colour ( hex value 00 )


His district hex offset position is now at 28087. Hex value is now 0A 01 57 01 01 01 00 FF


1) 0A -> Force position is now 10 ( numerical value )

2) 01 -> first district

3) 57 01 -> officer position

4) 01 01 00 FF -> Conquest code set to conquer Central Plains



Summary:

A) This is an example of a swapped force position ( in this case swapped with Cao Cao force )

B) The ruler Shanyue Chief is in force 00 position, with 0A ( Numerical value 10 ) force colour

C) Cao Cao force position became 0A ( Numerical value 10 ), with 00 default blue force colour

D) Shanyue Force district hex position is now at 27FD7. Hex value is now 00 01 CE 01 01 03 00 FF ( See the first byte of Shanyue Chief force & Cao Cao force under their force position )




I hope this doesn't confuse you.
foosoomin
Scholar of Shen Zhou
 
Posts: 721
Joined: Fri Jun 10, 2011 7:26 am

Re: A New RoTK XI Guide

Unread postby Lezard » Mon Mar 18, 2013 4:31 am

^ I already knew that, I was talking about beginners being confused (see, I think of myself as intermediate or something), thanks anyway for trying to help. :)

You can explain that if you want but I've had problems when I tried to mess with changing colors in force slots, so in my case at least, I find the color I want and go from there.

Ok, I've added the "step zero" highlighting this topic.

They're exclusive to the X Series, actually. The process is more important though, and you can just change it to existing officers without having to change the explanation too much.

I'm leaving it up to the reader to create 3 officers, which shouldn't be a problem for someone attempting to create a force.

I've corrected all the hex-strings (the most troubled were on the removed Zhou Cang example :lol: ).
I have a question though: on the force slot (that with tons of 32s), there is a byte missing in the guide (a "00"), is it the last byte? Is it meaningless?

The next version is likely to be the last (I won't change anything else unless someone asks so). :D
"They envied the power that I wield, and that envy led them to an early end". —Lezard Valeth
User avatar
Lezard
Retired Account
 
Posts: 445
Joined: Sun Nov 25, 2012 10:33 pm

Re: A New RoTK XI Guide

Unread postby Lezard » Tue Mar 19, 2013 9:21 pm

Last version (1.4):
http://www.sendspace.com/file/viwjxz

Since nobody answered I've just added a 00 in the end (I think that's what was missing) :roll:
"They envied the power that I wield, and that envy led them to an early end". —Lezard Valeth
User avatar
Lezard
Retired Account
 
Posts: 445
Joined: Sun Nov 25, 2012 10:33 pm

PreviousNext

Return to Three Kingdoms Game Editing & Mods

Who is online

Users browsing this forum: No registered users and 1 guest

Copyright © 2002–2008 Kongming’s Archives. All Rights Reserved