Additional info for hex editing ROTK XI

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

Re: Additional info for hex editing ROTK XI

Unread postby Lord_Cao_Cao » Fri Sep 21, 2012 5:26 pm

MakeData.s11

So I'm moving now to the MakeData.s11 file and start with the officers.

Officers

Officer codes are the same as in scenario files. Here's the one of my officer Hei Zheng.

Hei 00 00 00 00 00 00 00 00 00 Zheng 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 d0 07 00 b5 00 a7 00 00 01 00 52 03
ff ff ff ff 00 53 03 ff ff 19 57 01 55 01 58 03 55 00 4e 00 6b 03 69 03 6a 03 ff ff ff ff ff
ff ff ff ff 08 ff
ff ff 00 00 00 03 03 01 03 01 00 63 60 59 48 4b 00 00 00 06 02 ff 30 00 04 00
00 01 01 0f 01 00 01 00 55 07 55 55 55 55 55 ff ff 02 04 ff f0

I still have to say something about the things in red.

Generation (00)
Editing the Generation byte in the MakeData.s11 file is useless. As soon as you start a new game, the byte will be reset to 00 (or 01, 02, 03, etc. for following generations).

Service, Location, etc. (ff ff ff ff ff 08 ff ## ## 00 00 00)
Now why would you want to edit these things? They do not matter in the MakeData.s11 file after all. Well, you can edit them. Example:
01 24 00 24 00 03 3c ## ## 64 40 1f

This will cause your officer to start serving the second district (01) in Hanzhong (24 00 24 00) as a regular officer (03) with the rank Gatekeeper (3c), 100 Loyalty (64) and 8000 Deeds (40 1f) in every scenario you start, no matter who rules at Hanzhong or to whom District 2 belongs. I'm not quite sure about the Deeds part though, might get reset to 1000/3000.
In any case, I'm not a fan of editing this, but you can possibly create a MakeData.s11 file for every scenario.

Birthplace (ff)
Insert what you want here, the Birthplace byte will be changed to whatever Province the city belongs where your officer starts.

Portrait Change (ff)
Since there are no "old" portraits for Created Officer portraits, changing this byte is useless.

You might have noticed 6 bytes after the Officer's biography. Those basically code the other two sworn siblings and the Close Friend. They don't matter for scenario files, but I wouldn't change them in the hex editor.

Items

You can also create Items via hex editing. The first item starts at Offset 0x0001bbe8.

White Hare 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 19 02 52 03 ff 01

See Zetta's guide for how to edit Items. I don't know how to add descriptions yet. I though the free space after the code would be the place, but no matter what I insert, it doesn't appear in the game.

So, that's it. Next I think I'll compile my info about the scenario.s11 file (editing Ranks and such).
User avatar
Lord_Cao_Cao
Scholar of Shen Zhou
 
Posts: 1365
Joined: Sun Mar 21, 2010 9:14 am
Location: Germany

Re: Additional info for hex editing ROTK XI

Unread postby kiko94 » Fri Sep 28, 2012 8:34 pm

Lord Cao Cao, do you know how to edit the units in the savefile ? like attack, defence and other stuff ?
My first collection of RTK XI duels (among many to come) here
Duel Collection Number 2 this time in HD
User avatar
kiko94
Sage
 
Posts: 292
Joined: Mon Aug 06, 2012 12:04 am

Re: Additional info for hex editing ROTK XI

Unread postby Lord_Cao_Cao » Fri Sep 28, 2012 10:33 pm

Not necessarily ATK and DEF stuff (because that's not coded at all), but other things such as troops, food, gold, positions, actions and such. It's just that I don't remember all of that anymore.
User avatar
Lord_Cao_Cao
Scholar of Shen Zhou
 
Posts: 1365
Joined: Sun Mar 21, 2010 9:14 am
Location: Germany

Re: Additional info for hex editing ROTK XI

Unread postby kiko94 » Sat Sep 29, 2012 7:11 pm

It's ok then, I migh give it a shot, do you remember where they start in the hex ? I can try to work something during this week since I'm editing my saves a lot

oh and also wondering, still no info on the alliances ? just asking
My first collection of RTK XI duels (among many to come) here
Duel Collection Number 2 this time in HD
User avatar
kiko94
Sage
 
Posts: 292
Joined: Mon Aug 06, 2012 12:04 am

Re: Additional info for hex editing ROTK XI

Unread postby joewijoyo » Sun Sep 30, 2012 4:36 am

kiko94 wrote:It's ok then, I migh give it a shot, do you remember where they start in the hex ? I can try to work something during this week since I'm editing my saves a lot

oh and also wondering, still no info on the alliances ? just asking


i do know how to edit the atk def and etc of weapons if u want.
for farm output market output and etc too
joewijoyo
Student
 
Posts: 99
Joined: Sat Sep 22, 2012 6:38 am

Re: Additional info for hex editing ROTK XI

Unread postby Lord_Cao_Cao » Sun Sep 30, 2012 8:12 am

Right, forgot it was coded in the scenario.s11 file.

Unit code starts at offset 0x00085a1c. I'll look at this "archive" version of the Koei boards and see if I can find my discoveries again. If yes, I'll just post them here and rephrase them later for this thread's purpose.

Alliances are stupid. Might do some testing in the future and see, if there are certain patterns (like allying force 1 and force 2 will always give the same byte).
For now, if someone still doesn't know, start the scenario with the rulers you want to ally, make alliances, save and then open the save file and copy the alliance code from there and insert it to the code in the scenario file. That always works (that's why I suspect a pattern).
User avatar
Lord_Cao_Cao
Scholar of Shen Zhou
 
Posts: 1365
Joined: Sun Mar 21, 2010 9:14 am
Location: Germany

Re: Additional info for hex editing ROTK XI

Unread postby kiko94 » Sun Sep 30, 2012 2:28 pm

Thanks for the suggestion joewijoyo , althoug what I'd ask you is if you can find the where is the info about dams and rockslides stored, especially the dams if you'd find how much you can change them to deal to city, the flood at fan castle destroyed the entire reinforcements led by pang de and yu jin, seing it do 1000 damage to city hp is sad, and same about rockslides, they do about 2300 damage to each unit, Lu Bu with bows does more than that :lol:
My first collection of RTK XI duels (among many to come) here
Duel Collection Number 2 this time in HD
User avatar
kiko94
Sage
 
Posts: 292
Joined: Mon Aug 06, 2012 12:04 am

Re: Additional info for hex editing ROTK XI

Unread postby joewijoyo » Sun Sep 30, 2012 2:31 pm

kiko94 wrote:Thanks for the suggestion joewijoyo , althoug what I'd ask you is if you can find the where is the info about dams and rockslides stored, especially the dams if you'd find how much you can change them to deal to city, the flood at fan castle destroyed the entire reinforcements led by pang de and yu jin, seing it do 1000 damage to city hp is sad, and same about rockslides, they do about 2300 damage to each unit, Lu Bu with bows does more than that :lol:

i think those bytes will be in the rotk exe itself, because the stuff of it which u find in scenario s11 is just text info and stuff to be displayed like the crossbow matter we discuused. also hp data is tored there, but actual damage done , i still dont know. if i can succeed in finding it ill inform u :)
joewijoyo
Student
 
Posts: 99
Joined: Sat Sep 22, 2012 6:38 am

Re: Additional info for hex editing ROTK XI

Unread postby joewijoyo » Mon Oct 01, 2012 12:49 am

kiko94 wrote:Thanks for the suggestion joewijoyo , althoug what I'd ask you is if you can find the where is the info about dams and rockslides stored, especially the dams if you'd find how much you can change them to deal to city, the flood at fan castle destroyed the entire reinforcements led by pang de and yu jin, seing it do 1000 damage to city hp is sad, and same about rockslides, they do about 2300 damage to each unit, Lu Bu with bows does more than that :lol:


btw is 2300 for boulders and 1000 for dams the minimum damage they always do?
joewijoyo
Student
 
Posts: 99
Joined: Sat Sep 22, 2012 6:38 am

Re: Additional info for hex editing ROTK XI

Unread postby kiko94 » Sat Oct 06, 2012 4:53 pm

Lord Cao Cao, looking at this image , do you think you can tell where the first free building slot is ? I'd like to start messing around with those a bit :P

Image


Here's your info on editing buildings in the save files :

Good. We remember that part where you can edit the current city HP, right?

It seems I have found out what that whole part is for: buildings.
Here are all buildings coded. The list is very long as it applies to all coordinates on the game map. Again, you'll only find that bit (except for cities, ports and gates of course) in save files, not in scenario files. So it's not possible to add any buildings to that map beforehand.

Image

Here is an excerpt from the buildings-part (trust me, it truly is long). I have framed red two buildings so you can see where they start and where they end.

Image

Here's the edited part of the upper box.

01 is what I don't get. It seems to be 01 all the time, but in the codes of the real cities, gates and ports, it's always 04, combined with 00 in the building type. Using this combination on "buildable" buildings doesn't work, the game will still crash.

06 is the building type. Here's a list...

00=Crash (don't use it)
01=City (Yes, you can actually place cities everywhere. But can't use them.)
02=City again...
03=Camp
04=Outpost
05=Fort
06=Archer Turret
07=Crossbow Turret
08=Embankment
09=Stone Wall
0a=Catapult Platform
0b=Drum Platform
0c=Band Platform
0d=Eight Pillars
0e=Citadel 1
0f=Citadel 2
10=Embers
11=Fires
12=Fireball
13=Inferno Ball
14=Nothing (You can't see anything but you can't build there anymore)
15=Hell's Fireball
16=Hell's Embers
17=Boulders (Those rocks you can throw off the edge of a cliff)
18=Dam (I'll test if you can flood any city with that)
19=Sand Bar (It has the model of a City. Weird)
1a=Mountains (Again City Model)
1b=Great Wall (Again City Model)
1c=Ruins
1d=Shrine
1e=Pheasent Tower
1f=Market
20=Farm
21=Barracks
22=Smith
23=Stable
24=Workshop
25=Shipyard
26=Mint
27=Granary

Using Markets or Farms doesn't seem to increase the revenue/harvest. I have yet to see if it has an effect when building barracks or so.

04 is the force.

Domestical buildings (Markets, etc.) will always belong to the force the territory belongs to, so you can't place your markets in your enemy's territory, as it will become his.

bc 02 01 is the building's current HP.

Yes, you can raise it above its max. HP.

08 00 80 00 are the building's coordinates.

That way, you can place buildings underwater or so, as I have seen in a few screenshots in the forum Zetta had posted, as well as place them right besides cities.


This might sound really weird to you, but I've been curios about for a while now :P , you've been hex editing for a while, how much stuff do you actually memorize from the lists, like officer numbers, force coding order ( like cao cao is the first, then liu bei then sun jian ...)
My first collection of RTK XI duels (among many to come) here
Duel Collection Number 2 this time in HD
User avatar
kiko94
Sage
 
Posts: 292
Joined: Mon Aug 06, 2012 12:04 am

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