View previous topic :: View next topic |
Author |
Message |
jlangsdo
Cutthroat
Posts: 399
10932 Gold -
|
Posted: Mon Nov 15, 2021 9:28 pm Post subject: make_world 2021 : Make New Maps |
|
|
Directions to rebuild the landforms and maps, like in the East Indies Mod.
Install Tools:
Set up a Work directory, put these scripts in it (2021 versions):
Unpack Assets:
At the Command Prompt, run smp_fpk_unpack.pl
This will create an Assets_UNPACKED directory with your base files.
Convert loadsavemap.dds to bmp
In GIMP, open "C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Pirates!\Assets_UNPACKED\dds\loadsave.dds"
File->Export As->
Change filename to loadsavemap.bmp
Change directory to bmp instead of dds
Export
Get a topographic map:
Tune, scale, and edit your map:
Open the tif file in GIMP.
Colors=> Brightness Contrast => Increase contrast until you see mountain ranges in white, but without making the whole picture black and white. You want to march up and down the mountains, not have flat land or cliffs. Changing brightness would raise/lower sea levels, but changing contrast alone will not disturb the coastline.
You can draw in water channels in black or landforms in white.
Image -> Scale Image to scale the image to 1640x1040. You may want to unchain width and height to scale them differently.
Export as a bmp in "C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Pirates!\Work
Relocate land battles (TBD)
I hope to offer a script for changing the executable to use a different location for land battles automatically. For now, you need to have some land in the location where Hispanola should be, about 1150,540 on your 1640x1040 map, otherwise land battles will crash.
Run make_world.pl
This rebuilds the island files and maps. Most of the time is spent on the last and biggest file, caribbeanmap6.bmp.
Convert new loadsavemap.bmp to dds
In GIMP
Open C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Pirates!\Assets\make_world\loadsavemap.bmp
Export as loadsavemap.dds in the same directory
Results will be in Assets/make_world, and should be ready to play. I'll work on a tool for cities next. |
|
Back to top |
|
|
themodelcitizen
Gunner
Posts: 880
15142 Gold -
|
Posted: Mon Nov 15, 2021 10:45 pm Post subject: |
|
|
Thank you! This looks incredible. I'll play with it tonight. |
|
Back to top |
|
|
themodelcitizen
Gunner
Posts: 880
15142 Gold -
|
Posted: Mon Nov 15, 2021 11:33 pm Post subject: Re: make_world 2021 : Make New Maps |
|
|
jlangsdo wrote: | Export as a bmp in "C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Pirates!\Work
|
Sorry - what filename does this get? Is that "work" folder necessary, or can it get it from assets_unpacked/bmp? Even if I'm storing a world_map.bmp, or world.bmp, at 1640 x 1040 in that folder or any other relevant ones, my make_world keeps stalling because it can't find the world_map.bmp file (line 65 I think) |
|
Back to top |
|
|
jlangsdo
Cutthroat
Posts: 399
10932 Gold -
|
Posted: Tue Nov 16, 2021 5:03 pm Post subject: |
|
|
Oops. make_world.pl has a required switch, -world <filename>
So save it to any filename and use the switch. Thanks for helping work out the bugs! I put it into /Work/Mediterranean.bmp for my testing. |
|
Back to top |
|
|
themodelcitizen
Gunner
Posts: 880
15142 Gold -
|
Posted: Tue Nov 16, 2021 5:48 pm Post subject: |
|
|
jlangsdo wrote: | Oops. make_world.pl has a required switch, -world <filename>
So save it to any filename and use the switch. Thanks for helping work out the bugs! I put it into /Work/Mediterranean.bmp for my testing. |
Is that done in the perl cmd line, or by a separate script/adding a line to make_world.pl? Sorry, I'm (very slowly) learning how some of this works |
|
Back to top |
|
|
jlangsdo
Cutthroat
Posts: 399
10932 Gold -
|
Posted: Tue Nov 16, 2021 6:42 pm Post subject: |
|
|
If you save your bmp as, for example, Work/mycool.bmp
Then in the command prompt,
Cd to bhah/blah/blah/Work and run:
make_world.pl -world mycool.bmp
I have directed you to put the script and the bmp in the same directory so you don’t have tell the script the path to the bmp.
Maybe what I should have done is required the bmp to have a particular name in Assets, and hardcoded name that into the script. But to execute the script from the command prompt you would still have to figure out how to cd to the dir, I think. |
|
Back to top |
|
|
corsair91
Sailing Master
Posts: 8189
221101 Gold -
|
Posted: Tue Nov 16, 2021 9:01 pm Post subject: |
|
|
loadsavemap.dds is located here
\Assets\pak6.FPK\loadsavemap.dds
New link for topographic map
https://www.ncei.noaa.gov/maps/grid-extract/
ETOPO_2022 (Ice Surface, 15 arcseconds)
There is a way of making changing command prompt directories slightly easier
Firstly
Right click on Taskbar - Taskbar Settings
Replace command prompt with Windows Powershell in the menu
when I right-click the start button
or Press Windows logo key + X
set to off
i.e. keep using Command prompt
(powershell probably doesn't support all the command line commands)
To change directories
Browse in my computer or Windows file Manager
(windows Logo key + E (ignore the plus +) will open File Manager
aka Windows Explorer)
Browse to the Directory (folder) you want to change to (open)
and click on it once to highlight the name only
(assuming here you have Double click to open a folder Set
in File Manager - View - Options)
Press SHIFT Key + Right Click on Folder Name
(ignore the plus +)
on the right Click extended context List
Select - Open Power shell Window here (actually now a command prompt
if you have done the taskbar settings outlined previously)
Should leave you in a command line at that folder location
CD.. goes up a directory level (CD change directory)
dir displays directory contents
The manual way of doing this is
open a command prompt
Start - Run - Type Cmd
In the command prompt
Type CD\
go back to the root (very top) of the C: drive
CD C:\pathname
for example CD "C:\Sid Meier's Pirates!\assets"
if you have any spaces in the pathname use quotes ""
for example "C:\my folder which has spaces in the pathname"
Command prompt uses the old MSDOS naming format 8.3
8 characters then Dot and 3 char extension
Use quotes for any long filenames (more than 8 Characters)
or long pathnames or for anything with spaces
I typically create a Desktop Shortcut say named Cmd
Target
C:\Windows\System32\cmd.exe
Start in
C:\WINDOWS\system32
make things slightly easier to use a command prompt
by just clicking on the shortcut icon
Windows XP used to have a useful Microsoft Powertoy Utility
Open command prompt here which was dropped for Win 7-10
You have to edit the registry to do this now for Win10
https://www.windowscentral.com/add-open-command-window-here-back-context-menu-windows-10
What I outlined previously is apparently the only way to do something similar without editing your registry
Alternate ways of bringing up a command prompt
https://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/
Last edited by corsair91 on Sun Oct 29, 2023 10:41 pm; edited 8 times in total |
|
Back to top |
|
|
Guest
0 Gold -
|
Posted: Tue Nov 16, 2021 9:40 pm Post subject: |
|
|
Oh brilliant, yes I've got it!
Welcome to the British Isles:
Wow! Wow!
Thank you for making this so accessible. Obviously I've work ahead with cityloc and related files, but the possibilities are endless. I haven't been this excited about a game in a long time!
As I get started, the Mediterranean is enticing, perhaps with Ottomans and Venetians, but the original 4 nations work with the North Sea (perhaps the Treasure Fleet is now the Spanish Armada restocking in the mainland).
In the longer term, I'll create an 11th century viking mod, where you can venture to Greenland, Helluland, Markland, etc. Rejigging the East Indies to have more passable channels/straits is an option too.
You're an absolute legend j! |
|
Back to top |
|
|
corsair91
Sailing Master
Posts: 8189
221101 Gold -
|
|
Back to top |
|
|
themodelcitizen
Gunner
Posts: 880
15142 Gold -
|
Posted: Tue Nov 16, 2021 11:38 pm Post subject: |
|
|
Have you found a sweet spot with the contrast, or after changing it do you find yourself going in and using the magic wand tool to isolate specific mountainous areas and toning down the contrast there? I can get the land to look good with rolling hills, but then other areas are completely flat or cliffs. I'll keep finetuning it. |
|
Back to top |
|
|
fleetp
Boatswain
Posts: 3854
37201 Gold -
|
Posted: Wed Nov 17, 2021 4:44 am Post subject: |
|
|
Holy sh*t! You guys are amazing! |
|
Back to top |
|
|
jlangsdo
Cutthroat
Posts: 399
10932 Gold -
|
Posted: Wed Nov 17, 2021 9:26 pm Post subject: |
|
|
Further plans....
For cities, I'm thinking of giving you a spreadsheet to download and edit, then export as a csv, then run a perl script to update all of the files, including changing the executable.
I might make it a Google Sheet, just because they don't ship Windows with Excel any more.
I like the Britain and Ireland... it's a cool idea to have an island rather than a sea, because it doesn't cut off. Only problem is that until the cities are moved, many of your starting locations are illegal. |
|
Back to top |
|
|
themodelcitizen
Gunner
Posts: 880
15142 Gold -
|
Posted: Wed Nov 17, 2021 10:49 pm Post subject: |
|
|
The trainer helps with that - with the England/Ireland map I'm playing around with, the Jamaica Channel lines up nicely with the English Channel (an easy fix in text.ini), so I've been teleporting there if the game starts me inland somewhere.
Those script ideas sound great, I was planning on manually moving cities and the treasure fleet by calculating the x and y coordinates like I've done in the past, but that sounds a lot less time-consuming!
And yes, including the mainland is tricky, as much as I'd like to rejig Holland's coastline to 1600 levels (including the Zuiderzee), and that part of the map is fine because of the game's eastern/northern invisible wall, the other side of the map (France or Spain/Portugal) would have a weird cut-off. |
|
Back to top |
|
|
Pirate
Helmsman
Posts: 5665
112704 Gold -
|
Posted: Thu Nov 18, 2021 12:05 am Post subject: |
|
|
Mars used to have water they say make a map of that and little green men shooting and looting. Cities look like Adobe villages of red clay. |
|
Back to top |
|
|
corsair91
Sailing Master
Posts: 8189
221101 Gold -
|
Posted: Thu Nov 18, 2021 12:31 am Post subject: |
|
|
jlangsdo wrote: | Further plans....
For cities, I'm thinking of giving you a spreadsheet to download and edit, then export as a csv, then run a perl script to update all of the files, including changing the executable.
I might make it a Google Sheet, just because they don't ship Windows with Excel any more.
. |
FYI
Another possible option is Libre Office
https://www.libreoffice.org/
https://en.wikipedia.org/wiki/LibreOffice
Free opensource fork of Openoffice
includes Calc Spreadsheet
LibreOffice_7.2.2_Win_x64.msi (323 MB)
https://www.libreoffice.org/discover/calc/
Can read/write Microsoft Excel Spreadsheet file formats
typically included in various Linux distributions and also available
for Microsoft Windows, Mac OS X
There are some differences with Excel
Financial people probably prefer Excel because of possibly their Macros
only work on Excel unless redone for Calc
and they don't pay for Office Excel but it is probably provided for them anyway
Libre office may be best considered as possibly more suitable for Casual
light Use
google search on say
libreoffice calc vs excel
should give more info on comparing the 2 spreadsheets
Is Libre Calc A Good Replacement For Microsoft Excel?
JANUARY 30, 2014
https://www.strategicsourceror.com/2014/01/can-libre-calc-replace-microsoft-office.html
https://wiki.openoffice.org/wiki/Documentation/UserGuide/Migration_Guide/Calc_and_Excel
LibreOffice Review
Mar 26, 2021
https://uk.pcmag.com/office-suites/2249/libreoffice-5
Libre Office fork of Apache Open office is based on Open source
Star Office code
https://en.wikipedia.org/wiki/StarOffice
the very same Star Office that Microsoft Office development
is also based on (not then open source)
Naturally Libre Office - Open office has become more Office like
in interface as that is what most people are familiar with
Rather than Open Office being a clone of Office
it is actually the other way around
Microsoft Office being originally an unlicensed clone of Star Office
which is now open source Open Office forked into Libre office.
Microsoft was to license this but eventually decided not to
and lawyered Star Office to death in the legal dispute
which followed when Star Office objected to not being paid
for Microsoft using it's tech which it shared on the basis
Microsoft was to license and pay for, which it never did.
Microsoft has to prove a clean Office development if it wanted
to ever sue Open office which it essentially can't as it saw
Star office tech IP it used but never paid for or licensed.
It is ironic that some of the products Microsoft is best known for
MS-DOS, Microsoft Office (Star Office), Exchange Mail Server and Windows (OS/2)
are not completely original in-house Microsoft products
but are more acquired products
The Best Office Suites for 2021
28 Oct 2021
https://uk.pcmag.com/migrated-23208-office-suites/88907/the-best-office-suites
Further Info
LibreOffice office suite
http://www.hookedonpirates.com/forums/viewtopic.php?t=8310
Last edited by corsair91 on Sat Dec 04, 2021 3:09 am; edited 3 times in total |
|
Back to top |
|
|
|