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 » Sat Mar 07, 2015 8:39 pm

Feng Shin wrote:yea you bet it is.. oh yeah someone says if I edit my mount / horse and weapon it will actually gave the same effect bonus as the items, it didnt work on my created officer, I edited my weapon and mount as sky piercer and red hare but I dont see any difference but the grapic, damage taken and inflicting damage is still the same like wearing no items at all.

I can only say that when I tested this and wrote all of this, giving my CAW Zhang Fei's Serpent Spear had him one-hit KO Gao Shun in a duel, while having him without it didn't do anything. Also, my CAW with Guan Yu's Blue Dragon blade attacked more frequently than without.

How exactly did you test? The best way to test things like this is saving just before you challenge someone to a duel. If you don't do anything else before challenging to a duel, the outcome will always be the same (if you don't change stances or so during the duel), so if you equip your officer one time with Lu Bu's weapon and the second time without, you can see if there's a difference on how the duel goes. Of course, when attempting this, you should control both forces so that you can both challenge and accept (as the AI might turn down the challenge).
User avatar
Lord_Cao_Cao
Scholar of Shen Zhou
 
Posts: 1354
Joined: Sun Mar 21, 2010 9:14 am
Location: Germany

Re: Additional info for hex editing ROTK XI

Unread postby Feng Shin » Mon Mar 09, 2015 6:15 am

Lord_Cao_Cao wrote:
Feng Shin wrote:yea you bet it is.. oh yeah someone says if I edit my mount / horse and weapon it will actually gave the same effect bonus as the items, it didnt work on my created officer, I edited my weapon and mount as sky piercer and red hare but I dont see any difference but the grapic, damage taken and inflicting damage is still the same like wearing no items at all.

I can only say that when I tested this and wrote all of this, giving my CAW Zhang Fei's Serpent Spear had him one-hit KO Gao Shun in a duel, while having him without it didn't do anything. Also, my CAW with Guan Yu's Blue Dragon blade attacked more frequently than without.

How exactly did you test? The best way to test things like this is saving just before you challenge someone to a duel. If you don't do anything else before challenging to a duel, the outcome will always be the same (if you don't change stances or so during the duel), so if you equip your officer one time with Lu Bu's weapon and the second time without, you can see if there's a difference on how the duel goes. Of course, when attempting this, you should control both forces so that you can both challenge and accept (as the AI might turn down the challenge).


My ROTK XI is English and PC Version, I edited MakeData.s11 file who consist all my created officer who'll be placed on any scenario. I made a copy of MakeData.s11 (only created officer not the one in scenario files who consists the original officer) one is unedited (original) and the other one is a bunch of tests subject like edited only officer avatar models, edited only weapon and mount models, edited only their city origin and edited all of this etc, etc. So I swap the file that edited everything, doesnt work, then I swap with only weapons and mounts no officer model edited same stuff (not working). I'm testing it in combination way, I tried to test it in your way (control forces that will accept my duel request, save data before duel and load them up after I swap my edited file) but still doesnt have any of the mount and weapon bonus effects, and because It'll never worked if I swap the original MakeData.s11 file with edited MakeData.s11 file then load my latest current save, the models, weapon model, mount model etc" i've been modified had no effect if I tried this way, so I tried to swap the file and start a new game and it works on models etc" but not with weapon and mount bonus effect. Maybe I missing something that I should've do it before, Im not sure though maybe you can explained to me throughly. I'm using Hex Editor Neo and Universal Face Editor RTK XI to edit stuff.
User avatar
Feng Shin
Tyro
 
Posts: 15
Joined: Wed Dec 17, 2014 11:47 am

Re: Additional info for hex editing ROTK XI

Unread postby Zetta » Mon Mar 09, 2015 8:49 am

If I understand correctly you tried to modify the MakeData.s11 file, and then load your save file to see if changes happened ? Correct me if I'm wrong, but the problem seems to be that once your have started a new scenario, every officer (created or not) is only stored into Save0XX.S11, not in MakeData.s11 anymore. If you want to change your officers in-game, you will have to change your Save0XX.S11 file. Modifying MakeData.s11 won't have any effect while in-game and will only affect the "Create Officer" option menu.

In fact, the file MakeData.s11 is just here to store all the officers you have created with the editor. If you change one of them and load a save state, it doesn't affect the save file, since every created officer is copied and stored into the Save0XX.S11 file when you start a new game. I hope this was your problem. Otherwise I don't really see another solution.
User avatar
Zetta
Initiate
 
Posts: 79
Joined: Fri Feb 20, 2015 11:22 am

Re: Additional info for hex editing ROTK XI

Unread postby Lord_Cao_Cao » Mon Mar 09, 2015 9:10 am

As Zetta said, you'll have to change save files if you want to test it correctly. You have to save just before you start a duel, edit the model/weapon in the save itself and then reload. As long as you don't do anything else other than start the duel, the outcome will always be the same if nothing changed.
User avatar
Lord_Cao_Cao
Scholar of Shen Zhou
 
Posts: 1354
Joined: Sun Mar 21, 2010 9:14 am
Location: Germany

Re: Additional info for hex editing ROTK XI

Unread postby Feng Shin » Wed Mar 11, 2015 6:44 pm

Zetta wrote:If I understand correctly you tried to modify the MakeData.s11 file, and then load your save file to see if changes happened ? Correct me if I'm wrong, but the problem seems to be that once your have started a new scenario, every officer (created or not) is only stored into Save0XX.S11, not in MakeData.s11 anymore. If you want to change your officers in-game, you will have to change your Save0XX.S11 file. Modifying MakeData.s11 won't have any effect while in-game and will only affect the "Create Officer" option menu.

In fact, the file MakeData.s11 is just here to store all the officers you have created with the editor. If you change one of them and load a save state, it doesn't affect the save file, since every created officer is copied and stored into the Save0XX.S11 file when you start a new game. I hope this was your problem. Otherwise I don't really see another solution.


Lord_Cao_Cao wrote:As Zetta said, you'll have to change save files if you want to test it correctly. You have to save just before you start a duel, edit the model/weapon in the save itself and then reload. As long as you don't do anything else other than start the duel, the outcome will always be the same if nothing changed.


I already tried that, edit the save data file, but if I edit the save data file the file become corrupted and I cant load and play from it, it works (edited model and stuff) for a couple months after that the file become corrupted then theres error message saying I had to terminate the program (force close the rotk 11 game). I dont really know what exactly going on on that part but I've had enough editing the save data file after that happens twice, first attempt I was trying to edit the officer body model from save data then the next try is edit full officer model including weapons and mounts, I also tried to reverts back to its original value using back up file but the file stil corrupt and cant be load. that is why I only edit MakeData.s11 it works perfectly just fine but the officer weapon and mount only temporary even though I put the code permanently and I know I must edit this value from save data but then again if I edit the save data those save data will corrupted.

thanks for the help lord cao cao and zetta you guys rocks 8-) oh btw did you guys figure it out how to add secret bonus duel stat or debate stat in a created officer? I tried to figure it out but Im stucked here. anyhelp?

thanks n' cheers :)
User avatar
Feng Shin
Tyro
 
Posts: 15
Joined: Wed Dec 17, 2014 11:47 am

Re: Additional info for hex editing ROTK XI

Unread postby Lord_Cao_Cao » Wed Mar 11, 2015 9:08 pm

No idea why the save file becomes corrupted, sorry.

Secret duel bonuses are probably hardcoded in the exe, as there's nothing like that to be found in the officer codes. The only way to get them is to replace the character (Lu Bu, Guan Yu, or whoever has duel bonuses) with your CAW. It's similar to the special quotes some officers have (like Zhou Tai talking about his scars when he's injured).
User avatar
Lord_Cao_Cao
Scholar of Shen Zhou
 
Posts: 1354
Joined: Sun Mar 21, 2010 9:14 am
Location: Germany

Re: Additional info for hex editing ROTK XI

Unread postby Zetta » Thu Apr 23, 2015 7:10 am

Since we were talking about save files, I'll just chime in and add a few things about them. Some of this information has already been posted by other users and I have added some of mine in here as well.

IN-GAME DATE
Ingame date is coded at offset 459-460 (year) then 461 (month) and 462 (days).

OFFICERS
Each officer is coded with 203 bytes in save files. Code starts at offset 297 591 or 0x48a77
Most of the code is exactly the same as what can be found in scenario files.
Example : Yuan Tan
59 75 61 6e 00 00 00 00 00 00 00 00 54 61 6e 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 23 00 00 bb 00 ad 00 f8 00 01 12 00 12 00 ff ff 02 ff ff ff ff 56 ff ff ff ff ff ff ff ff ff ff 11 00 ff ff ff ff ff ff ff ff 0c 10 00 10 00 00 50 ff ff 64 00 00 00 01 01 00 01 00 3c 45 1e 23 3b 04 04 04 04 04 03 ff 02 01 04 01 03 03 0f 01 00 01 00 27 6f 70 ff 78 78 ff ff ff ff ff ff 89 02 00 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0f 0d 00 00 00 e8 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff 03 00 ff ff 00 ff 00 00 00

CURRENT STATUS AND GUILE CARDS AVAILABLE
This codes for two things : guile card (as explained in the guide) and officer status as well. Status : Done is odd hex (09, 31, 41, 49, 61, 69, 71, 81, 89, c9, d9, e9, f1) while Active is even hex (08, 30, 40, 48, 60, 68, 70, 80, 88, c8, d8, e8, f0)

ENERGY
Can be from 0 (0x00) to 100 (0x64)

EXPERIENCE BYTES
Each 100 points (hex is 0x64) gives you +1 in a characteristic, they are coded in the following order with two bytes each : LDR - WAR - INT - POL - CHR. If you want for example +7 points in POL : 00 00 00 00 00 00 bc 02 00 00

ORDERS
00 = Develop (+ Target)
01 = Recruit
02 = Produce
03 = Inspections
04 = Merchant
05 = Research
06 = Drill
07 = March
08 = Transport
09 = Move (+ Target)
0a = Summon (+ Target)
0b = Search
0c = Employ Officer (+ Target)
0d = Reward
0e = Award
0f = Goodwill (+ Target)
10 = Alliance (+ Target)
11 = Annul Alliance (+ Target)
12 = Ceasefire (+ Target)
13 = Solicit Surrender (+ Target)
14 = Exchange (+ Target)
15 = Request Reinforcements (+ Target)
16 = Disrupt Relations (+ Target)
17 = Collaborate (+ Target)
18 = Rumor (+ Target)
19 = Council
1a = District
1b = Establish
1c = Edit
1d = Dissolve
1e = Strategist
1f = Ranks
20 = Mediate
21 = Sworn Sibling Mediation (+ Target)
22 = Marriage Mediation
23 = Banish
24 = Remove
25 = Return
26 to 30 --> nothing, I didn't check further values
ff = No orders


TARGET
Target can be a force number, a district number, a city number or a building and even a specific officer depending on the nature of the order the officer is carrying.

GOLD TAKEN WITH OFFICER FOR MISSION
The amount of Gold the officer has to accomplish his mission (Goodwill, Rumor...)

TIME
The number of turns it will take to do the action. 01 is for 10 days, 02 for 20 days and so on... This timer doesn't always apply for each order. The game calculates automatically the time to move an officer from one city to another and might ignore this value for example.

HEALTH
00 = Good
01 = Weakened
02 = Struggling
03 = Critical
User avatar
Zetta
Initiate
 
Posts: 79
Joined: Fri Feb 20, 2015 11:22 am

Re: Additional info for hex editing ROTK XI

Unread postby Zetta » Thu Apr 23, 2015 7:30 am

FORCES SLOTS
Start : adress 524 291 (or 0x80003)
End : adress 529 624 (or 0x814d8)
Each force is coded with 127 bytes. The whole code is pretty similar to what can be found in scenario files (ruler, strategist, relationships with other forces, alliances, researched techniques and so on...).

Forces under your control
Address 524 359 + 127x N, where N is the number of the force slot.
00 allows you to control the force
ff makes the IA control the force
It seems like you can't control more than 8 forces though.

Technique Points
The current TP value each force has is stored over two bytes at offset 524 412 + 127 x N, where N is the number of the force slot.
If you want for example 1500 TP, your code is going to be 05 dc.


DISTRICTS - CITIES - GATES AND PORTS - COUNTRIES AND COUNTRIES DESCRIPTIONS
From offset 530 260 to 547 354
These codes are somewhat similar to what can be found in scenario files. I haven't studied them more in detail.


UNITS DEPLOYED
Unit codes can only be found in tutorial and save files.
Start : 547 355
End : 645 352
Normal Length : 98 bytes
SEE : viewtopic.php?f=38&t=22893&start=60#p599785


CUSTOM OFFICERS BIOGRAPHIES
645 355 to 746 054
Just the text you have written for every custom officer created added to your current game.


Unidentified stuff
746 055 to 966 990


TUTORIAL MODE
Offset 966 991
Length : 4
To activate the "tutorial" windows, you must be in "Tutorial" mode : replace ff ff ff ff at this offset with anything else. (01 00 00 00 for example)


TUTORIAL WINDOW TEXT
Offset 966 995
You can write text that will appear in the tutorial windows.


ENABLE/DISABLE COMMANDS
Offset 968 030 to 968 038
SEE : viewtopic.php?f=38&t=22893&start=60#p599785


TIME LIMIT (TUTORIAL MODE ACTIVATED)
Starts at offset 968 018.
In ROTK XI, years are made of 360 days. If you want to limit the game time to, let's say, 21 March 198 :
198 * 360 + 2*30 + 20 = 71 360
198 years converted to days + january and february (2*30 days) + 20 days from march
Convert this with hexadecimal and you get 01 16 c0 . But, like almost every high number in this game, the code is reverted, which gives : c0 16 01.


Unidentified
984 300 to 988 298


ON FIRE TERRAIN
Starting at offset 988 299 until the end of the file (1 148 298), each of these bytes has 00 as default value. When it is 01 or superior, it represents how long fire will burn in a specific spot on the map. I still haven't precisely found out which byte is which square on the map.
Last edited by Zetta on Sat May 02, 2015 8:08 am, edited 1 time in total.
User avatar
Zetta
Initiate
 
Posts: 79
Joined: Fri Feb 20, 2015 11:22 am

Re: Additional info for hex editing ROTK XI

Unread postby Lord_Cao_Cao » Thu Apr 23, 2015 3:18 pm

Fine work Zetta, thanks!
User avatar
Lord_Cao_Cao
Scholar of Shen Zhou
 
Posts: 1354
Joined: Sun Mar 21, 2010 9:14 am
Location: Germany

Re: Additional info for hex editing ROTK XI

Unread postby Won Ton » Tue Apr 28, 2015 5:55 am

I would just like to give a big shoutout to everyone for all the helpful information, i have used all of it quite a bit working on this scenario
Won Ton
Tyro
 
Posts: 12
Joined: Sat Apr 18, 2015 1:51 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