Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Civilization III > Civ3-Creation > palace section of save game file format
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
16.Sep: 7 NEW FILES
15.Sep: TRIAL + NO SLEEP = ONE GAME
13.Sep: PATCH THE PREVIOUSLY UNPATCHABLE

bottom of page
   - CIV3 CONQUESTS $29.99 - CIV3 from $9.99
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
MqsTout is offline MqsTout
Chieftain
Pittsburgh PA
Oct 2001
time: 00:18
Exclamation  Old Post 30-03-2002 11:05 Visit MqsTout's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
palace section of save game file format Support Apolyton, buy Civilization 2

I don't recall noticing any documents of the save game file format here in Apolyton's forums (I haven't checked CivFanatics). Earlier tonight I went through and determined the Palace section for my own enjoyment (Yeah, I wanted to see a fully upgraded one for once...)


I took some time playing with Civilization 3 saved game files, to figure out the format for the palace section.
I had a saved game just before I was awarded an upgrade. I made a few saves after choosing various upgrades and
got my start, from which I was able to feel the rest of the way to get this data. I did crash the game a few times
with invalid data. (Particularly, if you have the bitmask on for a piece and you don't have the data for that piece
set -- boom.) Sometimes the palace button from the control strip in the bottom right corner of the screen would
disappear, but F9 would still bring up the palace. I don't think that variable is contained within this section.
Those of you out there who have written or are working on save game editors, here's the information for the palaces.

Here's a clip from a save game I was playing, as the French:
+----------------------------------------------+
| 5041 4C56 9000 0000 0080 2010 | PALV...... . |
| FFFF FFFF FFFF FFFF FFFF FFFF | ............ |
| FFFF FFFF FFFF FFFF FFFF FFFF | ............ |
| FFFF FFFF FFFF FFFF FFFF FFFF | ............ |
| FFFF FFFF FFFF FFFF FFFF FFFF | ............ |
| FFFF FFFF FFFF FFFF FFFF FFFF | ............ |
| FFFF FFFF FFFF FFFF FFFF FFFF | ............ |
| FFFF FFFF FFFF FFFF FFFF FFFF | ............ |
| FFFF FFFF FFFF FFFF FFFF FFFF | ............ |
| FFFF FFFF FFFF FFFF FFFF FFFF | ............ |
| FFFF FFFF FFFF FFFF FFFF FFFF | ............ |
| FFFF FFFF FFFF FFFF 0000 0000 | ............ |
| 0000 0000 0000 0000 | ........ |
+----------------------------------------------+
There are 32 152(0x98)-byte sections like this within the save game file. The player's section starts at 0x0037F2D4.
The entire palace section starts at 0x0037F23C. In the saved games I worked with anyway (from v1.17f).

The first 8 bytes seem to stay constant for each palace entry, as a header with the values:
5041 4C56 9000 0000

The next 4 bytes are unidentified. The only values I've seen while looking at the few saves I have are:
0080 2010 (my side, unique)
0000 0000 (default value)
0000 0004 (frequent)
0000 0014 (not uncommon)
0010 0014 (rare)
0000 0044 (common)
My guess is that these may have something to do with timing the upgrades. Though, has anyone ever seen the computer
players have an upgraded palace?

32 x 4 bytes each. PalaceView.txt says that the game can handle up to 32 upgrades per culture, even though it only
comes with graphics and information for 17. These bytes set the culture for each piece:
0000 0000 = AMERICAN
0100 0000 = EUROPEAN
0200 0000 = MEDITERRANEAN
0300 0000 = MIDEAST
0400 0000 = ASIAN
This makes me wonder, how many cultures could be added? When I've tried values other than these, the game has crashed.
These values are in the order as they appear in PalaceView.txt

The next 8 bytes are unknown. They never show any variance, though I don't recall any crashes happening when I changed
them to reasonable values.

The next (last) 4 bytes make a bitmask of which pieces have been added and which haven't. Again, since the comments
in PalaceView.txt say there can be 32 pieces, 4 bytes times 8 bits per byte = 32 possible pieces. However, when I put
any values into the last one, or greater than 03 in the second-to-last-one, the game would crash. It only allowed me
to toggle on up to 18 bits:
00000000000000000 = 0x000000 = (no parts)
11111111111111111 = 0xFFFF01 = (all parts present)
111111111111111111 = 0xFFFF03 = (highest value without crash)
00000000000000001 = 0x010000 = lawn
00000000000000010 = 0x020000 = right wing
00000000000000011 = 0x030000 = lawn and right wing
Note that the game will crash if you have the toggle for a piece on, but you do not have the culture selection
information set. The masks are as they are in PalaceView.txt
00000000000000001 = 0x01000000 = lawn
00000000000000010 = 0x02000000 = wing right
00000000000000100 = 0x04000000 = wing left
00000000000001000 = 0x08000000 = steps
00000000000010000 = 0x10000000 = wing tower right
00000000000100000 = 0x20000000 = wing tower left
00000000001000000 = 0x40000000 = hall right
00000000010000000 = 0x80000000 = hall left
00000000100000000 = 0x00010000 = hall tower right
00000001000000000 = 0x00020000 = hall tower left
00000010000000000 = 0x00040000 = center ground
00000100000000000 = 0x00080000 = center 1st above ground
00001000000000000 = 0x00100000 = arch and mini pillars
00010000000000000 = 0x00200000 = tall pillars
00100000000000000 = 0x00400000 = center 2nd above ground
01000000000000000 = 0x00800000 = trees
10000000000000000 = 0x00000100 = center 3rd above ground
100000000000000000 = 0x00000200 = (no visible addition)
1000000000000000000 = 0x00000400 = (crash)
Yes, it is possible to have pieces added in to the save game that do not have their prerequisites, as set in the text
file met. I did not, however, get a chance to test whether or not the game crashes on the next upgrade in the game if
you hurry it along and give yourself a floating center 3rd above ground.

Attachment: civ3palace.txt
This has been downloaded 5 time(s).

Kuciwalker is offline Kuciwalker
Emperor
of Schmooism
Feb 2001
time: 00:18
  Old Post 30-03-2002 20:55
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Wow, I never thought anyone would ever try and hack THIS.

MqsTout is offline MqsTout
Chieftain
Pittsburgh PA
Oct 2001
time: 00:18
  Old Post 30-03-2002 22:04 Visit MqsTout's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Increase Your PM Length

Hey, you've gotta be complete!

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:18
  Old Post 08-04-2002 02:04
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Inflate your Upload Space

Good info... when I get time to check it out i might add editing of the palace to C3MT.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:18.
Apolyton Time is 00:18.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0319 seconds (87.62% PHP - 12.38% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net