RTKXI, how to change City current HP

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

RTKXI, how to change City current HP

Unread postby foosoomin » Tue Feb 19, 2019 1:56 am

Hi all,



Please enlighten, how to change City current HP (Healthpoint) ?


I browsed the tutorial, couldn't understand it
Last edited by foosoomin on Tue Feb 19, 2019 7:32 am, edited 1 time in total.
foosoomin
Scholar of Shen Zhou
 
Posts: 978
Joined: Fri Jun 10, 2011 7:26 am

Re: RTKXI, how to change City max HP

Unread postby foosoomin » Tue Feb 19, 2019 2:00 am

I mean the value that starts from hex offset 673B


How to spot which ruler, which district, which city at which hex offset ?



Please give me some guidance
foosoomin
Scholar of Shen Zhou
 
Posts: 978
Joined: Fri Jun 10, 2011 7:26 am

Re: RTKXI, how to change City max HP

Unread postby Death » Tue Feb 19, 2019 4:07 am

The way to change the city HP is to look in the scenario file for the one you want to change, the offsets for each city should be like this (view offsets in hex mode, not dec or others):

2814f Xiang Ping
281a0 Bei Ping
281f1 Ji
28242 Nan pi
28293 Ping Yuan
282e4 Jin Yang
28335 Ye
28386 Bei Hai
283d7 Xia Pi
28428 Xiao Pei
28479 Shou Chun
284ca Pu Yang
2851b Chen Liu
2856c Xu Chang
285bd Ru Nan
2860e Luo Yang
2865f Wan
286b0 Chang An
28701 Shang Yong
28752 An Ding
287a3 Tian Shui
287f3 Wu Wei
28845 Jian Ye
28896 Wu
288e7 Hui Ji
28938 Lu Jiang
28989 Chai Sang
289da Jiang Xia
28a2b Xin Ye
28a7c Xiang Yang
28acd Jiang Ling
28b1e Chang Sha
28b6f Wu Ling
28bc0 Gui Yang
28c11 Ling Ling
28c62 Yong An
28cb3 Han Zong
28d04 Zi Tong
28d55 Jiang Zhou
28da6 Cheng Du
28df7 Jiang Ning
28e48 Yun Nan


Once you get there, you should see something like this:

0C A0 86 01 00 F0 55 00 00 C0 12 00 00 80 BB 00 00 00 00 00 00 88 13 00 00 88 13 00 00 88 13 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 32 00 90 01 88 13 28 0A 50 50 00 00 00 01 00 00

Force owner This is the actual owner of the city, you'd have to check the force code or the actual leader's hex info to find what force they are on.

Max HP This is what you'd need to change to edit the city HP, in this instance the number is 2600.

The way I edited these was, (I use HxD), copy all the city data from those offsets I listed, then paste them into a new file, sort by 81 bytes per row and they will all line up evenly so you can go down the list and edit them how you want.

Also if you are editing an actual save file directly instead of the scenario file, its the same kinda setup just the offsets will be different/lower than the ones listed for the scenario file. In the save files they are spread out to I think 107 bytes, some of the new ones that are in there are the ones for districts etc, since those are not in the scenario file itself, only save file, but its mostly the same, just with some added bytes for those kinda things.
User avatar
Death
Scholar
 
Posts: 371
Joined: Sat Aug 23, 2014 4:18 am
Location: Zanarkand

Re: RTKXI, how to change City current HP

Unread postby foosoomin » Tue Feb 19, 2019 7:31 am

Val,



Then i asked wrongly.......What i want to know is how to edit "Current HP" for city, ports, gates


It starts from hex offset 6746
Last edited by foosoomin on Tue Feb 19, 2019 8:13 am, edited 2 times in total.
foosoomin
Scholar of Shen Zhou
 
Posts: 978
Joined: Fri Jun 10, 2011 7:26 am

Re: RTKXI, how to change City max HP

Unread postby foosoomin » Tue Feb 19, 2019 7:31 am

i using Hxd hex editor too
foosoomin
Scholar of Shen Zhou
 
Posts: 978
Joined: Fri Jun 10, 2011 7:26 am

Re: RTKXI, how to change City current HP

Unread postby Death » Tue Feb 19, 2019 8:59 am

Sorry, I misunderstood the question then :oops:
From that offset though that you mentioned, say I put 0C B0 04 00 00, the 0C is the owner of the city, (will be different than the force code if they have a district in game) B0 04 is the new HP, its set the current HP to 1200 now instead of 2600 (max is 2600 from my example, this section is only current HP) from my example in my last post. The order of the cities is the same from my list.
User avatar
Death
Scholar
 
Posts: 371
Joined: Sat Aug 23, 2014 4:18 am
Location: Zanarkand

Re: RTKXI, how to change City current HP

Unread postby foosoomin » Wed Feb 20, 2019 6:55 am

i take "Chaos in Chang An" scenario file as an example


0C 28 0A 00 00 00 00 00 00 00 00 00 AE 00 10 00 04 00 ( for xiang ping city ? )


Am i right to say per city is 18 hex ?




0B B8 0B 00 00 00 00 00 00 00 00 00 95 00 14 00 04 00 ( for Bei ping city ? )



Is it like this ?
foosoomin
Scholar of Shen Zhou
 
Posts: 978
Joined: Fri Jun 10, 2011 7:26 am

Re: RTKXI, how to change City current HP

Unread postby Death » Wed Feb 20, 2019 11:45 pm

Yeah I never edited those areas really, but that looks right and 18 bytes per city too. Think the ports and gates are after the cities and probably have less bytes, but follow same pattern.
User avatar
Death
Scholar
 
Posts: 371
Joined: Sat Aug 23, 2014 4:18 am
Location: Zanarkand


Return to Three Kingdoms Game Editing & Mods

Who is online

Users browsing this forum: No registered users and 6 guests

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