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

City Location Editing
Post new topic   Reply to topic     Forum Index -> Customization & Modding
View previous topic :: View next topic  
Author Message
slserpent
Powder Monkey
Posts: 2


224 Gold -

PostPosted: Sat May 10, 2008 9:13 pm    Post subject: City Location Editing Reply with quote

hello all. first time posting, but i've been reading for a while. i've also been modding other games for a while, so i figured i'd try my hand at modding this one.

when i unpacked the game files, i noticed a particularly interesting one called cityloc.dta. i spent all of yesterday trying to figure out the format of this file, and i think i've made some revelations that the community might be interested in.

  • every 16 bytes is a different city
  • (cities are ordered according to their order in citynames_enu.txt)

    • 4 bytes - X coord (little-endian i.e. backwards bytes)
    • 4 bytes - Y coord (little-endian)
    • 8 bytes - ??? Profit?

  • 48 bytes of nulls
  • every 16 byes is a different settlement/haven/monastery/village
  • (they have no order, selected at random)

    • 4 bytes - X coord (little-endian)
    • 4 bytes - Y coord (little-endian)
    • 8 bytes of nulls

so you can move cities (and assume settlements) around as you please editing this file, but i have no clue what the last 8 bytes for each city are. well, okay...i have some clues. unfortunately, they aren't used for either nationality or existence of city. they may be used for prices of goods, wealth, or soldiers. i'll have to run more tests to be sure.

also, you can't add new cities (settlements?) editing this file. the number of cities may be hardcoded into the game (though by no means unmoddable). the greatest potential i see for modding city locations (given the limitations) is a completely new map. north american coast? europe?

here's a spreadsheet of the information i'm working with for the city locations and screenshots of a test city (i moved puerto principe to where savannah would be): cityloc.xls

Back to top
View user's profile Send private message Visit poster's website
Phalzyr
Powder Monkey
Posts: 30


1968 Gold -

PostPosted: Tue May 13, 2008 4:37 pm    Post subject: Reply with quote

Unfortunately a lot of stuff is hard coded in the exe. For instance with my trainer I tried making a normal city into Indian or Jesuit owned. Game will crash if you do that. Ouch.
Back to top
View user's profile Send private message Visit poster's website
corsair91
Sailing Master
Posts: 8189



221101 Gold -

PostPosted: Fri Oct 30, 2020 12:18 am    Post subject: Reply with quote

slserpent content is here

http://www.snakebytestudios.com/downloads/index.php?dir=.%2Fgames%2FPirates

right click on filename - save as
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
Page 1 of 1

 
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