Shop  •   Avatar  •   FAQ  •   Search  •   Memberlist  •   Usergroups  •   Profile  •   Log in to check private messages  •   Log in  •  Register 

Working on a perl savegame editor (for Mac)
Post new topic   Reply to topic     Forum Index -> Customization & Modding Goto page Previous  1, 2
View previous topic :: View next topic  
Author Message
Roland
Helmsman
Posts: 4190



23929 Gold -

PostPosted: Sun Jun 03, 2012 8:14 pm    Post subject: Reply with quote

I compared the city numbering with the daughter types of each city in the Lesser Antilles. Both Dutch cities are odd-numbered, and they both have the same daughter types. All three English cities are even-numbered, and they all have the same daughter types. The two odd-numbered French cities have the same daughter types, while the even-numbered city has the opposite types. The one time when an odd-numbered Dutch city was captured by the English, it had the opposite daughter type as the even-numbered English cities.

Conclusion: It appears that the daughter types are determined by whether a city is odd- or even-numbered.

Implications
1. All three Dutch cities are odd-numbered, so the other type of Dutch daughters will never appear unless the Dutch capture an even-numbered city.
2. Six of the eight English cities are even-numbered, and five of the eight French cities are odd-numbered, so one daughter type of these nationalities will be more prevalent than the other.
3. All three landlocked cities are odd-numbered, which could make one type of Spanish daughter seem rarer if you never venture inland.
Back to top
View user's profile Send private message Send e-mail
rupertlittlebear
Helmsman
Posts: 4434


10417 Gold -

more...
PostPosted: Sun Jun 03, 2012 8:47 pm    Post subject: Reply with quote

if this hypothesis is correct then whatever kind of governor's daughter is in a starting city for any given year will never change.
Back to top
View user's profile Send private message
Roland
Helmsman
Posts: 4190



23929 Gold -

PostPosted: Mon Jun 04, 2012 6:27 am    Post subject: Reply with quote

rupertlittlebear wrote:
if this hypothesis is correct then whatever kind of governor's daughter is in a starting city for any given year will never change.

For a given beauty level, that is correct. So if the daughter of the Governor of Guadeloupe is beautiful, she will always be the one with brown hair and a purple dress. And if the daughter of the Governor of Martinique is beautiful, she will always be the one with black hair and a blue dress.
Back to top
View user's profile Send private message Send e-mail
Roland
Helmsman
Posts: 4190



23929 Gold -

PostPosted: Mon Jun 04, 2012 6:44 am    Post subject: Reply with quote

I have figured out another pattern based on the numbered city list: governor models.

I visited all the Dutch cities (included captured cities) in three saved games. There are three Dutch governor appearances:

1. red hair, brown coat, silver star
2. gray hair, maroon coat, orange sash
3. blond hair, gold coat, red sash

If a city is Dutch, its governor will have the same appearance in every game. The governor of city 0 is #3. The governor of city 1 is #1. The governor of city 2 is #2. The governor of city 3 is #3. The governor of city 4 is #1. Etc.
Back to top
View user's profile Send private message Send e-mail
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Sat Jun 23, 2012 2:18 pm    Post subject: Reply with quote

Latest version:

pirates_savegame_editor.pl

Among other changes, this version adds a -bmp switch that lets you write out as bmp files the 4 maps of the Caribbean.

The perl script itself is the most detailed documentation, but I thought it might be nice to summarize what I have found in the savegame file. (The names of the sections I have made up; I've renamed them from single letters to something descriptive when I felt that I understood most of the data in that section.)

Intro : variable :
Information about name and location as visible when you go to load a game. Difficulty and location are derived from the real values found in the Personal and Ship sections.

CityName : variable
Names for the 128 cities/settlements

Personal : 228 bytes
Attributes like crew size, rank, gold on hand, items acquired, etc.

Ship: 128*1116 = 142848 bytes
Information for the up to 128 active ships
Position/location/direction/speed/class/upgrades/damage,
starting and destination ports, mission
The first 8 ships are yours, then the named pirates.

City : 128*32 = 4096 bytes
Information about the 128 city/settlements
Location, visibility of features, population, soldiers, wealth

CityInfo : 128*148=18944 bytes
More information about each of the 128 city/settlements
Prices of goods as shown on world map, goods on hand, local land grant, daughter's attractiveness.

Log : 1000*28 bytes
Entries in the Ship's Log

j : 4 bytes : unknown

e : 960 bytes : random data
Includes who is at war with whom, and the date (measured in time since Jan 1 of the starting year)

Quest : 64*32=2048 bytes
Supplement to the log with information about wanted criminals and pirates; ties wanted criminal to the log entry about the daughter who pointed you to him.

LogCount : 4 bytes
Entry number of the next item to add to the log.

TopoMap : 2*293*462 = 270732 bytes
Topographical map of the Caribbean. Unfortunately, editing it does not seem to change anything in the game.

FeatureMap : 293*462 = 135366 bytes
Shows where you have been (a wide swath around your actual ship track) settlements and cities, landmarks, and treasure map features like totem poles

TreasureMap : 328*4 = 1312 bytes
Locations of items to be drawn on the 4 treasure maps. Center of the map shown is calculated to be between the X and the Pirate Landmark. Also records which pirate owns the treasure, and whether parts of the map are missing.

SailingMap : 293*462=135366 bytes
Cities, settlements, and shipwrecks; things you can sail into.

vv : 3072 bytes : unknown
vvv : 8 bytes, unknown

Top10 : 28*10=280 bytes
Info from the Top10 chart; also whether a pirate's treasure has been found. You are pirate #0.

d : 32 bytes : unknown

Villain: 28*36=1008 bytes
For wanted criminals, pirates, and evil characters
Ship number, special move, pirate hangout, visibility, icon

t : 120 bytes: unknown

CityLoc : 128*16 = 2048 bytes
X and Y coordinates of each city, enables them to show up on the
world map.

CoastMap : 293*462=135366 bytes
Low resolution coastline used to create the coastlines in treasure maps
Coastline is stored in a number from 0-9, but 0-4 becomes water and 5-9 becomes land.

k : 32 bytes : unknown

LandingParty : 8*8*4 = 256 bytes
Location, direction, and position of each marching pirate

m : 12 bytes : unknown

ShipName : variable
Names of your up to 8 ships

Skill : 1 byte
Back to top
View user's profile Send private message
Roland
Helmsman
Posts: 4190



23929 Gold -

PostPosted: Mon Jun 25, 2012 8:13 am    Post subject: Reply with quote

jlangsdo wrote:
City : 128*32 = 4096 bytes
Information about the 128 city/settlements
Location, visibility of features, population, soldiers, wealth

CityInfo : 128*148=18944 bytes
More information about each of the 128 city/settlements
Prices of goods as shown on world map, goods on hand, local land grant, daughter's attractiveness.

When a city is captured by another nation, the abbreviated trade notes (e.g., "Sugar is often quite plentiful here.") disappear from both the front page of the city and the description you get when you click on the city on the big map. If the original nation recaptures the city, the trade notes do not reappear. Is this the sort of thing covered by your cataegory, "visibility of features"?
Back to top
View user's profile Send private message Send e-mail
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Sat Jun 30, 2012 11:59 am    Post subject: Reply with quote

I'm not sure about the trade notes; that's probably a bit in here, but I had never noticed the phenomenon that they disappear when a city is captured. You have a good eye, Roland.

Here's a clip from a pst file:

City_0_2_0 : B1 : 10000111 : ?/0/0/0/0/?/has a port/details visible
City_0_2_1 : B1 : 00000001 : city without port/0/?/news this month/grudge/indian_or_jesuit/0/? (Antigua)
City_0_2_2 : B1 : 00000100 : 0/0/0/0/0/daughter visible/grateful/unfriendly (Antigua)
City_0_2_3 : B1 : 00000000 : city_off/0/0/0/0/?/?/? (Antigua)


? means I have seen a bit 1 or 0 but not decoded it; one of those are probably trade notes.
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Thu Nov 01, 2012 10:49 pm    Post subject: Reply with quote

Ahoy mateys!

The Aberdonian let me know that there were some problems running the script on Windows machines; after some back and forth I've got them fixed.

Now it works on both Mac and PC:

pirates_savegame_editor.pl
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Sun Nov 04, 2012 12:45 pm    Post subject: Reply with quote

pirates_savegame_editor.pl

version 1.42, adds "Escorted By"
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Sun Nov 11, 2012 1:31 pm    Post subject: Reply with quote

The Aberdonian pointed me to some more city information to decode...

pirates_savegame_editor.pl

version 1.43

This version adds directions for the pier and fort of each city, as well as the ship launching direction from that city.

In the ships, it adds the code for the enemy ship name, and detects when two ships are battling.
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Sun Dec 09, 2012 1:46 pm    Post subject: Reply with quote

I've been looking at text.ini

This file defines many of the arrays hardcoded into the savegame editor for translating a small number into a meaningful string: SHIPTYPE, RANK, NATIONALITY, UPGRADED , BEAUTY, DUELINGSKILL...

This could have saved a lot of time.

The file also has several other strings... perhaps there are more bits to translate.
Back to top
View user's profile Send private message
Roland
Helmsman
Posts: 4190



23929 Gold -

PostPosted: Sun Dec 09, 2012 9:16 pm    Post subject: Reply with quote

Yes, text.ini is very interesting. I have only tinkered with it to correct some bad spellings (e.g., curaiss), but others have used it to change nations (e.g., Ireland), rank titles (e.g., Commodore), or ship types (e.g., Man o' War).

That file provided some basic data for my exploration of city and settler types and wealth levels. (Otherwise, I might not have noticed the rare city types - colony, town, outpost.) I also used it to confirm your nearly alphabetical ordering of cities.

The variable SHARE appears to contain the captain's share by difficulty level. Would changing this actually change the captain's share, or is that hard-coded in the game?
Back to top
View user's profile Send private message Send e-mail
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Thu Mar 21, 2013 5:58 pm    Post subject: Reply with quote

I seen ya mates active this months on other posts but not this one. Thx's for all the work done. I'm wanting to extend the gameplay to allow TRUE mods to the ship,sword, and upgrade fucntionality.

IE a real katana blade

an ironclad $$$ ship upgrade

possibly some ships types from the 18th century (ironclad upgrade was actually 1850's)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Customization & Modding All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group