IN SAVE FILES:
-- ACTIVATE TUTORIAL MODE--
To allow the time limit or to disable commands, you must be in "Tutorial" mode : replace ff ff ff ff at offset 966 991 with anything else.
--DISABLE COMMANDS--
Offset 968 030
Each city command can be enabled or disabled by a simple addition :
1 (0x01) disables "Develop"
2 (0x02)disables "Recruit"
4 (0x04) disables "Outfit"
8 (0x08) disables "Inspection"
16 (0x10) disables "Merchant"
32 (0x20) disables "Research"
64 (0x40) disables "Drill"
128 (0x80) disables "March"
example : I want to disable the commands "March", "Outfit", "Merchant".
128 + 4 +16 = 148 to convert into hexadecimal which is 0x94
Note : to disable all of these, the code is ff (256) and not fe (255)
1 Transport
2 Move
4 Summon
8 Search
16 Employ Officer
32 Reward
64 Award
128 Goodwill
Disable Goodwill + Search + Move + Reward = 128 + 8 + 2 + 32 = 170 or "aa" in hexadecimal
1 =Alliance
2 = Annul Alliance
4 = Ceasefire
8 = Solicit Surrender
16 = Exchange
32 = Request Reinforcements
64 = Disrupt Relations
128 = Collaborate
1 = Rumor
2 = Council
4 = District
8 = Establish (District)
16 = Edit (District)
32 = Dissolve (District)
64 = Strategist
128 = Ranks
1 = Mediate
2 = Sworn Siblings
4 = Marriage
8 = Banish
16 = ??
32 = ??
64 = ??
128 = ??
Offset 968 038
Allows to disable Unit's commands :
1 = Wait
2 = Attack
4 = Surround
8 = Tactics
16 = Duel
32 = Strategy
64 = Build
128 = Repair
-- DATES // TIME LIMIT --
Ingame date is coded at offset 459-460 (year) then 461 (month) and 462 (days).
Another interesting thing I discovered is how the day limit is coded. 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 (198*360) + january and february (2*30 days) + 20 days played in march
Convert this in 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. In save files, the time limit code starts at offset 968 018. It could be interesting to make our own non-scripted challenges.
-- ??? --
I don't think that the last byte is solved already. I'm almost sure that it has more to say than "if it is 20 or 68 or C8 than the officer can be used in the first turn else not". Officers with similar stats often have the same value here ... I'll take a closer look soon.
I just made my move against this byte which took quite a lot of time. A pattern is clearly hidden here, but I'm not able to see it clearly. So far I found out:
* The byte has only 32 possible values: 00, 08, 10, 18, 20...
* Some values are unused: 38, 58, 98 (Yellow Turbans Scenario).
* The occurrences differ from very rare (single use) to very often.
* Officers that use the same value are often similar in some aspects.
* Custom officers also have a value - it is calculated somehow.
-- UNITS CODES --
Unit codes can only be found in tutorial and save files.
Start : 547355
End : 645352
Normal Length : 98 bytes
http://s7.directupload.net/images/110822/nzbxnmpn.png
These are the parts I was able to decipher.
00 is the unit type itself.
00=Normal Unit
01=Transport Unit
ff=None
94 02 ff ff ff ff are the officers in the unit. First the leader, then the two deputies. Simply insert the officer numbers here.
10 27 is the unit's troop number.
64 is the unit's will.
00 d0 07 is the unit's gold.
00 20 4e is the unit's food.
00 is the unit status.
00=Active
01=Done
(!This is turned off when you move the unit automatically!)
00 is the unit's state.
00=Normal
01=Confused
02=Misinformed
00 is the duration of the unit's state. It shows how many turns the unit is in the state above.
ff ff ff ff is the unit's target. These are set when you command a unit to get somewhere beyond it's range (which means it will move automatically there) or give it tasks that require more turns to be carrired out.
ff ff ff ff = Wait
01 02 ff ff = Move (ff ff ff ff are the moving coordinates)
03 00 xx 00 = Attack ... (xx being the city, port, gate or any other building) <---- The problem here is, you'll have to find that building in the building list I have posted above. You'll have to count from Xiangping (00) to the actual building...
04 00 xx 00 = Retreat to ... (xx being the city, port or gate)
xx 01 01 00 = Follow (xx being the unit number (00 is the first unit in the code)
01 00 xx 00 = Move into ... (xx being a city, gate or port)
02 02 xx 00 = Build xx at ff ff ff ff (you get this when you order a unit to build something beyond the unit's ZOC) (00=Camp/Outpost/Fort ; 01=Archer Turret/Crossbow Turret ; etc...)
08 00 xx 00 = Repair (within ZOC) (xx being the building)
08 00 xx 00 = Repair building at ff ff ff ff (beyond ZOC) (xx being the building) <---- Same as "Attack ..." You'll have to look for the building first.
00 05 01 xx = Expell (xx being the enemy unit) <--- This is what the AI units have when you invade their territory.
03 01 xx 00 = Annihilate (xx being the enemy unit (again, 00 is the first unit in the code))
5c 00 4d 00 are the coordinates of the units. First x-axis, then y-axis (this means that the unit is placed in 92,77).
01 is the automatic unit status. 00 means that it's active (which means the unit will carry out the atomatic order when ending the turn) and 01 means Done (it won't do anything when ending the turn).
(!This is turned off when you move the unit manually!)
04 is the unit type.
00=Swords,
01=Spears,
02=Pikes,
03=Bows
04=Cavalry
05=Rams
06=Tower
07=Catapult
08=Juggernaut
09=Boat
0a=Ship
0b=War Ship
Right, you can even move Ships on land and soldiers on water!
10 27 is the ammount of weapons the unit carries. Usually it's the same ammount as the troop number.
09 00 are the bytes for the Vessel. 09 indicates which vessel it is and 00 how many the unit carries. I'd recommend inserting only 09, 0a or 0b. Using 0a and 0b requires you to to change 00 to 01, so that if you enter a city, you'll get the ship as equipment.
04 seems to correspond with the unit's target. It changes as the target changes. You should make a dummy save game and give your units targets in order to see to what this byte changes.
Lezard wrote:version 1.8:
http://www.wuala.com/hellkite/Public/RoTK%20XI%20Editing%20Guide.rar/This guide objective is to provide international community gamers the knowledge necessary to edit files in order to customize the game in many possible ways for an enhanced experience, since there's no official editor (safe the limited nonenglish PUK built-in editor) and all fan made editors are not in english.
Foreign versions of the game, including PUK versions, have very similar structure (almost the same) and eventually notes will be presented in this guide about japanese PUK version since it was fan translated to english (no other PUK version have been translated).
The link is broken, pls upload again. ThanksZetta wrote:I'm sorry but I only have version 1.6 of the guide on my PC, I hope someone else has a more recent version though.
You can download it from here if you want.
Return to Three Kingdoms Game Editing & Mods
Users browsing this forum: No registered users and 1 guest
Copyright © 2002–2008 Kongming’s Archives. All Rights Reserved