Announcement
Collapse
No announcement yet.
Everything on Hex Editing
Collapse
This topic is closed.
X
X
-
Allard, hey some really GREAT work here! This should definitely be made a scenario league tip before it gets lost as an old forum post.
Some stuff could use a bit more clarification though. For instance, what happens when you change the sequence number of a city? What happens if you say, give a high total food value of a city siting in a desert? Will the game get wise at some point and recalibrate that number, leading to sudden starvation? On the city architecture byte, is that permanent even if techs leading to industrial or modern style are discovered later?
Comment
-
quote:
TRIBES:=======
(source is from common knowledge)
2 before tribename = city style can be any city style, including industrial and modern without the required advances.
That will be very useful.
But I'm a bit confused by this:
quote:
C : 1... .... = bloodlust on/off .1.. .... ..1. .... ...1 .... = simplified combat on/off .... 1... .... .1.. .... ..1. .... ...1
How does that translate into the hex value we use, please?"I didn't invent these rules, I'm just going to use them against you."
Comment
-
Please note that these values are not all my work. Only there where my name stands on top has been found by me. The rest I simply assembled from all other information available. Therefore I also do not understand all of it, especially the city sequence numbers. Ask that Xin or Andrew.
quote:
On the city architecture byte, is that permanent even if techs leading to industrial or modern style are discovered later
Then it changes, if you have any of the old styles. Which is logical, because the game will automatically save the style there. And the style later upgrades. That in itself is no great innovation, but the trick is that you can set the civ to have modern cities without the required techs. Or industrial, which will (not tested that one though) upgrade to modern with the required techs.
This trick can allow good savings on the length of tech trees. Instead of giving one civ annoying techs, you can just set it here.
quote:
How does that translate into the hex value we use, please?
it's an unprofessional way of talking. What I mean with .... ...1 is in hexadecimal 01 and .... ..1. is 02. So adding both of them would give .... ..11 which is 03. The . basically means that it can be any value but has no importance for this.
I have no experience with hex-editing before, so it's probably not the best way of making it clear, but I thought it worked pretty ok like this.
quote:
Allard, hey some really GREAT work here! This should definitely be made a scenario league tip before it gets lost as an old forum post
I thought it handier to post it here. Reaches more people
quote:
Allard: Great job! If you attach an example it would be even better
I'll leave that too others
Comment
-
I answered my own question asked above:
What happens if you say, give a high total food value of a city siting in a desert? Will the game get wise at some point and recalibrate that number, leading to sudden starvation?
Unfortunately, it doesn't work. Changing this hex seems to have no effect at all, nor does changing the shields a city has. I guess the game must recalibrate this number as it loads, cos if the Rules.txt terrain stats change, these have to change too.
Comment
-
Finally understand this hexedit thing. thanks Allard and everyone who discovered these tricks to the game. I finally fixed several problems I had in my scenario.
Civfan..
------------------
Read my Joke of the Day at Offtopic forum. Do it now or you will ummmmm who cares......
Holly****, i'm a prince now. Damn to much time spent on this game.Civfan (Warriorsoflight)
Comment
-
quote:
Unfortunately, it doesn't work. Changing this hex seems to have no effect at all, nor does changing the shields a city has. I guess the game must recalibrate this number as it loads, cos if the Rules.txt terrain stats change, these have to change too
these kind of recalibrations seems to be so quite a lot if you make little "mistakes" at some places. Which is quite unfortunate, because some would, as what you are proposing, as far as I understand it, be quite interesting.
quote:
Finally understand this hexedit thing. thanks Allard and everyone who discovered these tricks to the game. I finally fixed several problems I had in my scenario
Comment
-
Well, good news.
Now that I finally figured out that it was a reference to binary values I've realised that both the civ's technologies and city improvements are both stored as binary numbers. Thanks, Allard.
Good news: found the starting locations for each civs technologies and gold:
CIV MONEY TECHNOLOGY
BARBARIAN 2280+2281 ( 8E8) 2366 ( 93E)
1 3708 ( E7C) 3794 ( ED2)
2 5136 (1410) 5222 (1466)
3 6564 (19A4) 6650 (19FA)
4 7992 (1F38) 8078 (1F8E)
5 9420 (24CC) 9506 (2522)
6 10848 (2A60) 10934 (2AB6)
7 12276 (2FFA) 12362 (304A)
Bad news: editing the barbarian's technology is not so straight-foward, which was the whole point of the investigation.
Bad news: the city information (in FW at least) only contains 84 bytes, not 88, so there is no index number for the city included within this space. Byte 86 in the above list is simply the vertical coordinates of the next city.
------------------
"The man who can smile when things go wrong has thought of someone he can blame it on""I didn't invent these rules, I'm just going to use them against you."
Comment
-
I updated the list today, in the first post on the topic. To make it more clear what has been added, here are the new things I found out.
Code:LAYOUT OF A SAVED GAME: ======================= Hex offsets are given, until map information, from where the values are no longer fixed. 00 - 2F = toggled options, various player settings 30 - 247 = unidentified or empty 248 - 8E5 = 7 blocks of each F2 bytes long with city style information, leader and tribe names for all 7 civs 8E6 - 3585 = 8 blocks of each 593 (in hex) bytes long with various information, like money and techs (a lot still unidentified) for all 8 civs (incl. barbarians) 3586 - 3594 = map header information ... = map data block 1 (continues a very long time) ... = map data block 2 (quite long too) ... = map data block 3 ... = unit information ... = city information ... = unidentified, and other info such as where the screen is centred or the cursor is located ... = a bit of text on how the scenario is called, and probably a bit of history (who's wiped out, etc.) ... = event stuff (starts with EVNT, easy to find)
Code:START OF SAVED GAME FILE: ========================= A : ---27 : Conflicts in Civilization or lower ---28 : Fantastic Worlds (2.7.81) ---2C : Multiplayer Gold 22-23 = specifies which unit is selected at start of the game (you can find the unit id number by playing another civ, revealing the map and right clicking on the unit. On the right, the id is shown between parentheses)
Code:TRIBES: ======= (source unknown) The information is stored in 7 blocks (not for barbarians) of F2 length. The blocks start and end at: 248-339 - 1st block 33A-42B - 2nd " 42C-51D - 3rd " 51E-60F - 4th " 610-701 - 5th " 702-7F3 - 6th " 7F4-8E5 - 7th " These 7 blocks are all filled with 00's except for a few names and numbers. These are: City Style - directly at start of block, one byte long Leader Name - 3rd byte from start (eg. 250, 341..), 23 bytes long Tribe Name - 1Ath (26th in decimals) byte from start, 23 bytes long Adjective - 32th (50th in decimals) byte from start, 23 bytes long note: City Styles can be any city style, including industrial and modern, even though without the required advances. You can even fill in higher numbers here, which however produce strange effect (as it does everywhere) and may cause the game to crash. TECHNOLOGIES & MONEY: ===================== Byte 8EF until 3585 is devided in 8 blocks of each 593 bytes. Each of these blocks contain information specific for each civ, such as techs and money. A lot more in these blocks has as yet not been idendified. The blocks all start at these offset bytes: Block of 0th civ: 8E6 - E79 (barbarians) " 1st civ: E7A - 140D " 2nd civ: 140E - 19A1 " 3rd civ: 19A2 - 1F35 " 4th civ: 1F36 - 24C9 " 5th civ: 24CA - 2A5D " 6th civ: 2A5E - 2FF1 " 7th civ: 2FF2 - 3585 Counted from the start of each block: note: the number given here are all hexadecimals, so the 16th byte in hexadecimal is the 22nd in decimal. byte 2 - Gender. Male=00 Female=02 byte 3 - Money. The barbarians' money is also changeable. byte B - Tech which is being researched. FF if cleared or no goal. byte 16 - Government. Valid values are 00-07 (though 07 does not normally exist). A value of 08 or higher causes the game to crash. 00 is of course Anarchy, 01 is Despotism, etc. byte 1F - Reputation byte 25-40 - Treaties. 4 bytes for the treaties with all 7 civs (including their own civ). 1st byte: .... ...1 - contact .... ..1. - cease fire .... .1.. - peace .... 1... - alliance (with peace always) ...1 .... - vendetta 1... .... - embassy 2nd byte: ..1. .... - war .... .1.. - ???? used by game 3rd byte: ..1. .... - ???? used by game 4th byte: ???? then the 1st byte for the next civ, for all 7 civs. note: you can also combine them, eg. war and alliance at the same time. They will repair your units, but talk with you as if in war. Some more strange effects. byte 42-48 - Attitudes. Byte 42 is attitude to 1st player, 43 is to 2nd player, etc. byte 59-64 - Technologies. B (11) bytes long. To explain how the bytes work, an example of the first technology byte: .... ...1 : 1st technology .... ..1. : 2nd " .... .1.. : 3rd " .... 1... : 4th " ...1 .... : 5th " ..1. .... : 6th " 1... .... : 7th " In the next byte are the 8th-14th technolgy. Note that for some reason the .1.. .... is left out. This is not the case in each of these bytes, though. I don't know why. Though it's fun to know how it works, it is much much easier to set techs using the cheat menu. byte 3E5-3F2 - last contact with civs. First two to 1st civ, 3rd and 4th for 2nd civ, etc. FF FF if not available, 01 00 for 1, etc. note: It may be that the FF FF in byte 3E3 and 3E4 are for last contact with barbarians, but that is not verifiable.
Code:OTHER ===== - 3c-3f bytes after the last city has been finished are the coordinates of the cursor
Comment
-
This is going v. well. I'm trying to beef up my barbarian power with some basic technologies. Now I have got to try and see if establishing diplomatic relations works
I think I found something odd about one of the city information bytes, and I'm also trying to see what effects ending the very first turn has, because as you know you can capture all of a civs gold from any city on the very first turn but never afterwards. I'll post again when I know anything concrete.
I wonder if Civfan has come up with anything new.
------------------
"The man who can smile when things go wrong has thought of someone he can blame it on""I didn't invent these rules, I'm just going to use them against you."
Comment
-
More great stuff you're doing, guys.
One question: has anyone seen where the pollution/global warming related hexes are? I wonder if this is one area where one could fool the computer, delaying the onset of global warming, perhaps even starting the game with negative numbers in the counter towards global warming.
Comment
-
Two things occur to me as I review this:
1) You could periodically reset the tech level to zero and build an entirely new rules.txt file with a new tech tree. Simply read off, say, the twenty most advanced technologies on your "ancient tech tree" and make them the FIRST twenty technologies of your "industrial tech tree". Then for each tribe set the appropriate starting techs. Anyone who was more techs behind than that gets an instant "tech leap".
2) You could also simultaneously scan for ALL outdated units (e.g., militiamen) and replace them with an equivalent modern unit. For example, when the late modern age starts, you might turn all ancient units in every civilization to riflemen. After all, nowadays even the most pathetic nation has riflemen of some sort. This would let you start the units file over again with an entirely new set of units.
Does anyone know the formula for the number of lightbulbs required for a tech advance? If one were to create such a modpack then this would become important. Because the cost of discovering a new tech seems to depend on the number of techs you already have, you'd need to either set the changeover to occur at times of "rapid innovation" like the Renaissance and the Modern Age, or else strategically change the tech paradigm for the scenario at the same time.
I think I'm starting to drool....
Comment
Comment