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

How do I change a bunch of Spanish cities to other nations?
Post new topic   Reply to topic     Forum Index -> Customization & Modding Goto page 1, 2, 3  Next
View previous topic :: View next topic  
Author Message
fleetp
Helmsman
Posts: 4598



26019 Gold -

PostPosted: Thu May 28, 2020 9:52 pm    Post subject: How do I change a bunch of Spanish cities to other nations? Reply with quote

I know I can conquer individual cites and install a new governor one city at a time.
Is there a way to change a bunch of Spanish cities to other nationalities by modifying a txt file or modifying the exe file?

Very respectfully,
fleetp
Back to top
View user's profile Send private message Send e-mail
corsair91
Sailing Master
Posts: 10370



296901 Gold -

more...
PostPosted: Thu May 28, 2020 10:27 pm    Post subject: Reply with quote

At a guess

possibly editing your save game (use a backup copy) may do this
as would expect your cities state be recorded in your save game.


jlangsdo's mods

https://www.dropbox.com/sh/4rjpm6zt4ru517t/AADafjCo4h0a4W-APOzXY8Qta?n=385028626&oref=e

pirates_savegame_editor.pl : Converts a savegame file to a readable and editable text file and back

Working on a perl savegame editor (for Mac)
http://www.hookedonpirates.com/forums/viewtopic.php?t=6491


Can't recall if the PHTrainer can change cities

Sid Meiers Pirates! PHTrainer v3.20
https://www.lonebullet.com/tools/download-sid-meiers-pirates-phtrainer-v320-free-295.htm


c++ version of savegame editor
http://www.hookedonpirates.com/forums/viewtopic.php?t=7710


Last edited by corsair91 on Sun May 31, 2020 12:20 pm; edited 2 times in total
Back to top
View user's profile Send private message
Pirate
Helmsman
Posts: 5927



117641 Gold -

PostPosted: Thu May 28, 2020 10:39 pm    Post subject: Reply with quote

a5 01 00 00 75 00 00 00 06 00 00 00 01 0c 06 00 02 00 00 00 50 00 00 00 00 00 00 00 11 01 00 00 # Antigua goods for sale

ba 01 00 00 4a 00 00 00 06 00 00 00 01 1d 0f 02 12 00 00 00 96 00 00 00 00 00 00 00 11 11 00 00 # Barbados spice price

6e 00 00 00 93 00 00 00 02 00 00 00 00 14 19 01 14 00 00 00 78 00 00 00 00 00 00 00 11 11 01 00 # Campeche sugar price

6e 01 00 00 2f 00 00 00 02 00 00 00 00 1c 19 02 0c 00 00 00 78 00 00 00 00 00 00 00 11 11 01 00 # Caracas sugar for sale

0e 01 00 00 26 00 00 00 02 00 00 00 00 32 28 04 37 00 00 00 b4 00 00 00 00 00 00 00 11 11 01 00 # Cartagena capital

4d 01 00 00 37 00 00 00 02 00 00 00 00 0d 0a 00 0a 00 00 00 5a 00 00 00 00 00 00 00 00 10 01 00 # Coro goods for sale

86 01 00 00 29 00 00 00 02 00 00 00 00 15 12 02 0a 00 00 00 55 00 00 00 00 00 00 00 11 11 01 00 # Cumana goods price

5f 01 00 00 41 00 00 00 06 00 00 00 03 16 12 02 0f 00 00 00 96 00 00 00 00 00 00 00 11 11 00 00 # Curacao spice/sugar price

0a 01 00 00 ca 00 00 00 06 00 00 00 01 06 02 00 01 00 00 00 23 00 00 00 00 00 00 00 11 11 01 00 # Eleuthera luxurie price

d2 00 00 00 c8 00 00 00 06 00 00 00 02 02 01 00 00 00 00 00 0f 00 00 00 00 00 00 00 11 11 01 00 # Florida Keys ----

42 01 00 00 21 00 00 00 02 00 00 00 00 0e 05 00 01 00 00 00 50 00 00 00 00 00 00 00 10 11 01 00 # Gibraltar lux price / food for sale

a1 00 00 00 3d 00 00 00 00 80 00 00 00 14 14 00 19 00 00 00 82 00 00 00 00 00 00 00 11 11 01 00 # Gran Granada

f2 00 00 00 dd 00 00 00 06 00 00 00 01 02 01 00 00 00 00 00 0a 00 00 00 00 00 00 00 11 11 01 00 # Grand Bahama food for sale

a5 01 00 00 6b 00 00 00 06 00 00 00 02 13 10 02 0a 00 00 00 6e 00 00 00 00 00 00 00 11 01 00 00 # Guadeloupe goods prices

c6 00 00 00 b8 00 00 00 02 00 00 00 00 41 2d 04 3c 00 00 00 c3 00 00 00 00 00 00 00 11 11 01 00 # Havana capital

2f 01 00 00 85 00 00 00 06 00 00 00 02 08 06 00 02 00 00 00 3c 00 00 00 00 00 00 00 11 00 00 00 # Leogane -----

3a 01 00 00 33 00 00 00 02 00 00 00 00 12 0c 02 0f 00 00 00 82 00 00 00 00 00 00 00 11 11 01 00 # Maracaibo lux/goods prices

8b 01 00 00 34 00 00 00 06 00 00 00 00 09 08 00 06 00 00 00 4b 00 00 00 00 00 00 00 11 11 01 00 # Margarita -----

b0 01 00 00 58 00 00 00 06 00 00 00 02 13 10 02 0a 00 00 00 6e 00 00 00 00 00 00 00 11 01 00 00 # Martinique sugar for sale

a2 01 00 00 71 00 00 00 06 00 00 00 02 0c 06 01 02 00 00 00 50 00 00 00 00 00 00 00 11 01 00 00 # Montserrat food for sale

9d 01 00 00 75 00 00 00 06 00 00 00 01 14 08 01 02 00 00 00 6e 00 00 00 00 00 00 00 11 01 00 00 # Nevis food for sale

ff 00 00 00 cc 00 00 00 06 00 00 00 01 01 01 00 00 00 00 00 0a 00 00 00 00 00 00 00 11 00 00 00 # Nassau ---------

ec 00 00 00 23 00 00 00 02 00 00 00 00 0d 0c 01 0f 00 00 00 6e 00 00 00 00 00 00 00 11 11 01 00 # Nombre de Dios Capital

e5 00 00 00 1e 00 00 00 00 80 00 00 00 3c 28 01 50 00 00 00 c8 00 00 00 00 00 00 00 11 11 01 00 # Panama Capital

2c 01 00 00 82 00 00 00 02 00 00 00 02 0d 08 00 05 00 00 00 5a 00 00 00 00 00 00 00 11 11 00 00 # Petit-Goave goods prices

34 01 00 00 93 00 00 00 02 00 00 00 02 10 09 01 08 00 00 00 6e 00 00 00 00 00 00 00 11 01 00 00 # Port-de-Paix goods prices

03 01 00 00 7f 00 00 00 02 00 00 00 01 0f 08 01 04 00 00 00 6e 00 00 00 00 00 00 00 11 00 00 00 # Port Royale fluctuates

e5 00 00 00 24 00 00 00 02 00 00 00 00 19 19 02 0f 00 00 00 78 00 00 00 00 00 00 00 11 11 01 00 # Puerto Bello Capital

62 01 00 00 2e 00 00 00 02 00 00 00 00 0a 08 01 0a 00 00 00 50 00 00 00 00 00 00 00 11 11 01 00 # Puerto Cabello ------------

f9 00 00 00 a3 00 00 00 00 80 00 00 00 1e 16 02 0a 00 00 00 82 00 00 00 00 00 00 00 11 11 01 00 # Puerto Principe lux/goods prices

2c 01 00 00 37 00 00 00 02 00 00 00 00 12 0c 01 12 00 00 00 64 00 00 00 00 00 00 00 11 11 01 00 # Rio de la Hacha sugar/spice for sale

78 01 00 00 84 00 00 00 02 00 00 00 00 18 19 03 04 00 00 00 6e 00 00 00 00 00 00 00 11 11 01 00 # San Juan goods for sale / capital

d6 00 00 00 49 00 00 00 06 00 00 00 00 06 07 01 00 00 00 00 28 00 00 00 00 00 00 00 11 00 00 00 # Santa Catalina -------

4f 01 00 00 85 00 00 00 02 00 00 00 00 1f 1c 03 08 00 00 00 78 00 00 00 00 00 00 00 11 11 01 00 # Santo Domingo lux prices

0e 01 00 00 93 00 00 00 02 00 00 00 00 28 1e 03 28 00 00 00 aa 00 00 00 00 00 00 00 11 11 01 00 # Santiago Capital

20 01 00 00 34 00 00 00 02 00 00 00 00 10 08 01 0a 00 00 00 50 00 00 00 00 00 00 00 11 11 01 00 # Santa Marta food for sale

d8 00 00 00 f5 00 00 00 02 00 00 00 00 0a 08 01 00 00 00 00 37 00 00 00 00 00 00 00 11 11 01 00 # St. Augustine ------------

9c 01 00 00 7e 00 00 00 06 00 00 00 03 0f 08 02 0c 00 00 00 a0 00 00 00 00 00 00 00 11 01 00 00 # St. Eustatius good/lux prices

9a 01 00 00 79 00 00 00 06 00 00 00 01 19 0a 02 06 00 00 00 82 00 00 00 00 00 00 00 11 01 00 00 # St. Kitts spice prices

96 01 00 00 81 00 00 00 06 00 00 00 03 0d 06 01 03 00 00 00 64 00 00 00 00 00 00 00 11 11 01 00 # St. Martin sugar for sale

2f 01 00 00 96 00 00 00 06 00 00 00 02 0d 07 01 05 00 00 00 5a 00 00 00 00 00 00 00 11 11 01 00 # Tortuga fluctuates

b0 01 00 00 2d 00 00 00 06 00 00 00 00 0a 05 00 00 00 00 00 50 00 00 00 00 00 00 00 11 11 00 00 # Trinidad --------

2b 00 00 00 97 00 00 00 02 00 00 00 00 19 1e 04 23 00 00 00 82 00 00 00 00 00 00 00 11 11 01 00 # Vera Cruz good/lux prices / Capital

58 00 00 00 85 00 00 00 02 00 00 00 00 10 0f 00 0f 00 00 00 64 00 00 00 00 00 00 00 11 11 01 00 # Villa Hermosa food for sale

Okay lets start with Antigua. open the exe with a hex editer and serch for this string.

a5 01 00 00 75 00 00 00 06 00 00 00 01 0c 06 00 02 00 00 00 50 00 00 00 00 00 00 00 11 01 00 00

The Nationality i will use BB to show location

a5 01 00 00 75 00 00 00 06 00 00 00 BB 0c 06 00 02 00 00 00 50 00 00 00 00 00 00 00 11 01 00 00

natinilty list is 00 for Spanish
01 for England
02 for Franch
03 for Dutch
04 for Pirate

You can see BB is 01 in the first string. That tells me it belongs to England. want it Ducth the change it to 03.

use that string for guidance for the other cities as the nationalities will be in the same location.


another thing in case you want to make the city open to all eras is as
also editable

a5 01 00 00 75 00 00 00 06 00 00 00 01 0c 06 00 02 00 00 00 50 00 00 00 00 00 00 00 11 01 00 00 The last part of the string here is 11 01 00 00

change the that to 11 11 01 00


this is what Antigua looks like if i change her to France and open up all eras.

a5 01 00 00 75 00 00 00 06 00 00 00 02 0c 06 00 02 00 00 00 50 00 00 00 00 00 00 00 11 11 01 00 .

Hope this helps but scream if you get lost.
Back to top
View user's profile Send private message
fleetp
Helmsman
Posts: 4598



26019 Gold -

PostPosted: Fri May 29, 2020 2:26 am    Post subject: Reply with quote

@Corsair91, thanks, I may try playing with the saved game editor tomorrow.

@pirate, I think I can use the hex editor technique. Thank for the additional tip about making the cities available in all eras.

Very respectfully,
fleetp
Back to top
View user's profile Send private message Send e-mail
Pirate
Helmsman
Posts: 5927



117641 Gold -

PostPosted: Fri May 29, 2020 4:09 am    Post subject: Reply with quote

Try that with a hex editor in the exe. I’d recommend trying the first city I showed you and if it doesn’t turn Dutch French then something wrong happens. Get good at it and I’ll show the location points and if the city has a port shipyard or not. The trainer can be used to to change cities as well.
Back to top
View user's profile Send private message
fleetp
Helmsman
Posts: 4598



26019 Gold -

PostPosted: Fri May 29, 2020 4:01 pm    Post subject: Reply with quote

I used the hex editor to modify the pirates!.exe file to change Cartagena to Dutch. Smile

Also this morning I used the Trainer to change the nationality of the 'special city', and the 'nearest city'. Using the 'change the nationality of the nearest city' appears to be a fairly easy and quick way to make the changes.

My day promises to be busier than I expected, so I'll defer trying to use the save game editor until later today.

Thanks for the help and advice!
Back to top
View user's profile Send private message Send e-mail
fleetp
Helmsman
Posts: 4598



26019 Gold -

PostPosted: Fri May 29, 2020 6:53 pm    Post subject: Reply with quote

I checked the savegame editors we have here at Hooked on Pirates.

One seems to be written in c++, which I don't think I have on my widows 10 computer.
The other seems to be written in perl, which I also don't have on my computer.

I read what was in our threads about how to use the pl (perl) file and cpp (c++) file, but it appears that the work-arounds to use either of these savegame editors is cumbersome.

Am I missing something?
Back to top
View user's profile Send private message Send e-mail
corsair91
Sailing Master
Posts: 10370



296901 Gold -

more...
PostPosted: Fri May 29, 2020 8:38 pm    Post subject: Reply with quote

Not missing anything

Accurate Summary of the current SM pirates Savegame editor situation
Back to top
View user's profile Send private message
Pirate
Helmsman
Posts: 5927



117641 Gold -

PostPosted: Fri May 29, 2020 8:51 pm    Post subject: Reply with quote

The cities can be found in a saved game too with a hex editor. I have used the trainer before to double the population solders wealth etc. then I would take that information out of the saved game to create new cities in my exe.
Back to top
View user's profile Send private message
fleetp
Helmsman
Posts: 4598



26019 Gold -

PostPosted: Sat May 30, 2020 3:18 pm    Post subject: Reply with quote

I wasted a bunch of hours downloading microsoft visual express with the idea of converting the cpp version of the save game editor to a windows exe file. That particular tool is not idiot simple. I took another look at the pl version of the savegame editor.

Unless I'm mistaken, both the cpp and pl versions of the savegame editor give you a text readable version of a savegame file which you can then edit in any test editor program (such as notepad) and then 'repack' into the savegame editor format.

What I was really looking for is something like the German save game editor (simple user-interface), only expanded to do as much or more than the trainer
Screenshot

https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/fc802f72-0ddd-4d7e-a9f5-e35e9dc1cdac/ddydijk-663b474e-f2fc-4621-860b-5fa44bc8ff98.jpg/v1/fill/w_1280,h_854,q_75,strp/savegame_edit_by_fleetp_ddydijk-fullview.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3siaGVpZ2h0IjoiPD04NTQiLCJwYXRoIjoiXC9mXC9mYzgwMmY3Mi0wZGRkLTRkN2UtYTlmNS1lMzVlOWRjMWNkYWNcL2RkeWRpamstNjYzYjQ3NGUtZjJmYy00NjIxLTg2MGItNWZhNDRiYzhmZjk4LmpwZyIsIndpZHRoIjoiPD0xMjgwIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmltYWdlLm9wZXJhdGlvbnMiXX0.pXZgbjJ_Sh28uYcdjv6SSEsc4NIJVtA1--rss3Qhl5E

For now I'll stick with using the trainer and hex-editing the pirates!.exe file
Back to top
View user's profile Send private message Send e-mail
Pirate
Helmsman
Posts: 5927



117641 Gold -

PostPosted: Sat May 30, 2020 9:51 pm    Post subject: Reply with quote

Another quick tip.

a5 01 00 00 75 00 00 00 06 00 00 00 01 0c 06 00 02 00 00 00 50 00 00 00 00 00 00 00 11 01 00 00 # Antigua goods for sale


a5 01 00 00 75 this is your location point for Antigua. Use this as guide for all cities as location points are the first part.

Now lets make it Havana but keep it for England and in the same location as Antigua.

This is Havana

c6 00 00 00 b8 00 00 00 02 00 00 00 00 41 2d 04 3c 00 00 00 c3 00 00 00 00 00 00 00 11 11 01 00

now replace c6 00 00 00 b8 with a5 01 00 00 75

a5 01 00 00 75 00 00 00 02 00 00 00 01 41 2d 04 3c 00 00 00 c3 00 00 00 00 00 00 00 11 11 01 00

Thats Havana with new location and new nation.
Back to top
View user's profile Send private message
Pirate
Helmsman
Posts: 5927



117641 Gold -

PostPosted: Sat May 30, 2020 10:08 pm    Post subject: Reply with quote

another trick.

All inland cities dont have a port or shipyard so if i want to use Panama for Antigua I have to give it a shipyard or you won't be able to sell your ships or repair them.

This is Panama

e5 00 00 00 1e 00 00 00 00 80 00 00 00 3c 28 01 50 00 00 00 c8 00 00 00 00 00 00 00 11 11 01 00

Now replace e5 00 00 00 1e with a5 01 00 00 75

should look like this below

a5 01 00 00 75 00 00 00 00 80 00 00 00 3c 28 01 50 00 00 00 c8 00 00 00 00 00 00 00 11 11 01 00

Now you have a Panama at Antigue but no shipyard. Fix that Jack.

Look for the number 80 in the string then change it to 00

should look like this

a5 01 00 00 75 00 00 00 00 00 00 00 00 3c 28 01 50 00 00 00 c8 00 00 00 00 00 00 00 11 11 01 00

Now we have a new Spanish city in Antigue with a shipyard.

Now I'm busy converting the barmaid nif. into real life so if you don't mind I'll get back to work now.
Back to top
View user's profile Send private message
fleetp
Helmsman
Posts: 4598



26019 Gold -

PostPosted: Sun May 31, 2020 3:13 am    Post subject: Reply with quote

I downloaded strawberry perl and after multiple attempts, was able to unpack one of my saved game files using the perl script created by jlangsdo. I viewed the output file with notepad, and was able to easily find the cities by name and change the nationalities. It took me several attempts to repackage the modified savegame file, but I tested it in-game and the changes worked.

My difficulties with unpacking and re-packing were mainly caused by
1. trouble using the command prompt in windows
2. my long folder names in my directory structure
3. Windows command prompt doesn't like spaces in folder names (it kept failing when trying to look in the 'my games' folder.
Back to top
View user's profile Send private message Send e-mail
corsair91
Sailing Master
Posts: 10370



296901 Gold -

more...
PostPosted: Sun May 31, 2020 5:08 am    Post subject: Reply with quote

Ref:
My difficulties with unpacking and re-packing were mainly caused by
1. trouble using the command prompt in windows
2. my long folder names in my directory structure
3. Windows command prompt doesn't like spaces in folder names (it kept failing when trying to look in the 'my games' folder.


Use Quotation marks for command line path names with spaces

for example

copy c:\my file name d:\my new file name

"copy c:\my file name" "d:\my new file name"

A google search on say or similar
command line folder name with spaces quotation marks

should give more help on this

Alternatively use a scratch folder with a very short pathname and no spaces
for example C:\a


ref: microsoft visual express

Apparently what you want is the Free
Visual Studio Community 2019

https://visualstudio.microsoft.com/vs/community/
https://visualstudio.microsoft.com/license-terms/mlt031819/
https://visualstudio.microsoft.com/downloads/
Web installer

Create an offline installation of Visual Studio
https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2019

https://en.wikipedia.org/wiki/Microsoft_Visual_Studio


Last edited by corsair91 on Sat Dec 04, 2021 12:25 am; edited 4 times in total
Back to top
View user's profile Send private message
corsair91
Sailing Master
Posts: 10370



296901 Gold -

more...
PostPosted: Sun May 31, 2020 2:11 pm    Post subject: Reply with quote

Back in the Windows XP days,
there was a very useful Microsoft freeware powertoy called
open command prompt here

If installed, Browse to your folder in File Explorer or My computer
and right click on folder name and
select open command prompt here
would leave you in a command prompt windows at that folder location

Otherwise you has to manually browse to that location in the command prompt

(use quotation marks " " for any pathnames with spaces).

for example
cd\
cd "C:\Users\my profile name\Documents\My Games\Sid Meier's Pirates!"


cd command syntax help
https://www.computerhope.com/cdhlp.htm


Microsoft in its wisdom no longer makes things quite as simple
in Windows 10.


here are a few articles on Windows 10 command prompt

https://www.itprotoday.com/windows-10/add-open-command-window-here-windows-10-context-menu

https://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/

ttps://www.windowscentral.com/add-open-command-window-here-back-context-menu-windows-10


Some suggest registry editing, before you do, try this first
(probably requires admin rights)


Browse the drive containing your folder in File Explorer
select the Folder so its hightlighted (single left click usually)

Hold down shift and right-click on Folder name
and if it works should see a properties menu

and select open powershell window here

gives you an open command prompt window in that folder location


Last edited by corsair91 on Wed Sep 16, 2020 2:15 pm; edited 3 times in total
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 1, 2, 3  Next
Page 1 of 3

 
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