| View previous topic :: View next topic |
| Author |
Message |
fleetp

Helmsman 
Posts: 4600 

 
26028 Gold -

|
Posted: Mon Sep 21, 2020 7:14 pm Post subject: |
|
|
| Pirate wrote: | | Could you not move a city to that same location and perhaps let the settlements have the former city location? That way you wouldn't have to launch a saved game to get Paramaribo to show up in that exact location and to Paramaribo would be a actual city which I believe was the original idea in the first place. |
pirate,
If I could figure out how to move a city I'd do it. So far I haven't been able to (which is why I abandoned that effort). If you can do it feel free to do so.
I should have the 'rename a Dutch settlement to Paramaribo" mod ready later today.
Regrads,
fleetp |
|
| Back to top |
|
 |
Pirate

Helmsman 
Posts: 5927 

 
117641 Gold -

|
Posted: Mon Sep 21, 2020 7:21 pm Post subject: |
|
|
Is the location of the city you want to move listed in the loc file? Is there a location of the settlement in a loc file? If so can they be switched? Just asking don't know either actually I'm on a different project . |
|
| Back to top |
|
 |
fleetp

Helmsman 
Posts: 4600 

 
26028 Gold -

|
Posted: Mon Sep 21, 2020 7:39 pm Post subject: |
|
|
| Pirate wrote: | | Is the location of the city you want to move listed in the loc file? |
There is code in the exe file, but how it translates to x,y coordinates is beyond my comprehension.
| Pirate wrote: |
Is the location of the city you want to move listed in the loc file? |
If you mean cityloc.dta it is, but it's in code in the exe file, but how it translates to x,y coordinates is beyond my comprehension.
| Pirate wrote: |
Is there a location of the settlement in a loc file? If so can they be switched? Just asking don't know either actually I'm on a different project . |
The game places settlements on land, but does so randomly. Once you save a game, the location of the settlement is in the saved game file (once again in code).
I'm not asking you to solve this conundrum. I just figure I've wasted enough time on a project that I started for fun. When it stopped being fun I decided to do it the easiest way I know how.
Link to picture of results
https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/fc802f72-0ddd-4d7e-a9f5-e35e9dc1cdac/de5j98o-bded2247-edc9-4897-ac8b-4ea09a9cff35.jpg/v1/fill/w_1280,h_854,q_75,strp/paramaribo_in_smp_by_fleetp_de5j98o-fullview.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3siaGVpZ2h0IjoiPD04NTQiLCJwYXRoIjoiXC9mXC9mYzgwMmY3Mi0wZGRkLTRkN2UtYTlmNS1lMzVlOWRjMWNkYWNcL2RlNWo5OG8tYmRlZDIyNDctZWRjOS00ODk3LWFjOGItNGVhMDlhOWNmZjM1LmpwZyIsIndpZHRoIjoiPD0xMjgwIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmltYWdlLm9wZXJhdGlvbnMiXX0.2oteVlRo0tkWp5rNuxLU22yUfAkYA2vuoKXU-Jeh4CY
Last edited by fleetp on Mon Sep 21, 2020 7:44 pm; edited 1 time in total |
|
| Back to top |
|
 |
themodelcitizen

Gunner 
Posts: 903 

 
15615 Gold -

|
Posted: Mon Sep 21, 2020 7:43 pm Post subject: |
|
|
I moved Gibraltar to that site and renamed it Guayana last night, just by taking the xloc from a city directly north (I think I used Trini) and the yloc from a city directly west (I think I used Gran Granada).
It wasn't perfectly placed though, you could sail in, but ships sailing out were a bit bugged, that's why I left it to someone who could figure out the entries for coordinates.
| Quote: | | If you mean cityloc.dta it is, but it's in code in the exe file, but how it translates to x,y coordinates is beyond my comprehension. |
The first four entries are xloc and next 4 are yloc obviously, I don't know how to convert them but it's a 4-byte integer to represent a place on the grid (jlangsdo said the size somwhere, trying to find it).
Additionally if you look at the "cities" text file in the East Indies mod, you can see it has the xloc and yloc bytes and port/fort directions, just like cityloc.
But it also has entries like "has_port", years active, and "flag" (which is either 00, 01, 02, or 03 depending on nation). Maybe replicating that "cities" file for the Caribbean (or finding it in the code) and making the necessary edits will allow you to change nationality along with moving cities.
Last edited by themodelcitizen on Mon Sep 21, 2020 7:46 pm; edited 3 times in total |
|
| Back to top |
|
 |
Pirate

Helmsman 
Posts: 5927 

 
117641 Gold -

|
Posted: Mon Sep 21, 2020 7:43 pm Post subject: |
|
|
I know the location part in the executable its the first part of the string |
|
| Back to top |
|
 |
fleetp

Helmsman 
Posts: 4600 

 
26028 Gold -

|
Posted: Mon Sep 21, 2020 7:52 pm Post subject: |
|
|
If someone does figure out how to do this, please write a 'how to' guide.
It would be wonderful if we could re-create Jlansdo's New Orleans mod, his Bermuda mod, and be able to move cities like Puerto Principe, Panama, and Gran Granada.
I plan to write instructions on how to use the mod I made and upload the mod this evening.  |
|
| Back to top |
|
 |
themodelcitizen

Gunner 
Posts: 903 

 
15615 Gold -

|
Posted: Mon Sep 21, 2020 8:24 pm Post subject: |
|
|
I suck at math. But if someone can make sense of this explanation:
| Quote: | | There are 4 numbers per city: 4-byte integers X and Y coordinates (462x293 grid multiplied by 1000) |
How do you convert a space on a grid (i.e., bottom right corner would be 462 by 293, each multiplied by 1000) to the 4-byte hex format? i.e. what's 462 000 represented in xloc? |
|
| Back to top |
|
 |
Pirate

Helmsman 
Posts: 5927 

 
117641 Gold -

|
Posted: Mon Sep 21, 2020 8:43 pm Post subject: |
|
|
| themodelcitizen wrote: | I suck at math. But if someone can make sense of this explanation:
| Quote: | | There are 4 numbers per city: 4-byte integers X and Y coordinates (462x293 grid multiplied by 1000) |
How do you convert a space on a grid (i.e., bottom right corner would be 462 by 293, each multiplied by 1000) to the 4-byte hex format? i.e. what's 462 000 represented in xloc? |
That's easy I'll ask the dog. He said it was bark. Hope that helps. |
|
| Back to top |
|
 |
themodelcitizen

Gunner 
Posts: 903 

 
15615 Gold -

|
Posted: Mon Sep 21, 2020 8:46 pm Post subject: |
|
|
lol I don't have a patch on you math and engineer types. I'll figure it out eventually. For now I can move cities as long as it's just drawing straight lines from the existing ones |
|
| Back to top |
|
 |
fleetp

Helmsman 
Posts: 4600 

 
26028 Gold -

|
|
| Back to top |
|
 |
themodelcitizen

Gunner 
Posts: 903 

 
15615 Gold -

|
Posted: Mon Sep 21, 2020 11:26 pm Post subject: |
|
|
I just moved Gibraltar to that space in the Barbados mod, getting the location data from a cross-section of jlangsdo's new Barbados and Panama City.
It's in the bottom right corner, squeezed into the last playable section. The actual Ciudad de Guayana is upriver a bit so use your imagination.
It shouldn't be too difficult to change the nationality and name if you still want Par'bo as a full city.
http://www.mediafire.com/file/z62g2rdz0jmvmir/file
Last edited by themodelcitizen on Tue Sep 22, 2020 2:24 am; edited 1 time in total |
|
| Back to top |
|
 |
fleetp

Helmsman 
Posts: 4600 

 
26028 Gold -

|
Posted: Tue Sep 22, 2020 1:24 am Post subject: |
|
|
| themodelcitizen wrote: | I just moved Gibraltar to that space in the Barbados mod, getting the location data from a cross-section of jlangsdo's new Barbados and Panama City.
It's in the bottom right corner, squeezed into the last playable section. The actual Ciudad de Guayana is upriver a bit so use your imagination.
It shouldn't be too difficult to change the nationality and name if you still want Par'bo as a full city. |
The rar file is corrupted. I was unable to open it with either 7-zip or winrar.  |
|
| Back to top |
|
 |
themodelcitizen

Gunner 
Posts: 903 

 
15615 Gold -

|
|
| Back to top |
|
 |
fleetp

Helmsman 
Posts: 4600 

 
26028 Gold -

|
Posted: Tue Sep 22, 2020 1:38 am Post subject: |
|
|
I successfully opened the file using winrar . EDIT: Deleted stupid question.
Comments: Fabulous piece of work! I was unable to enter Guyana by landing nearby and marching into it, but I was able to sail into the harbor.
I sailed to Bermuda and successfully entered it by land and sea.
Last edited by fleetp on Tue Sep 22, 2020 2:11 am; edited 1 time in total |
|
| Back to top |
|
 |
themodelcitizen

Gunner 
Posts: 903 

 
15615 Gold -

|
Posted: Tue Sep 22, 2020 1:56 am Post subject: |
|
|
| fleetp wrote: |
I successfully opened the file using winrar . Do I put all of the files into the custom folder, or do some go into the assets folder? |
Honestly not sure, I just put an entire copy of each in both it's overkill but hasn't resulted in any issues |
|
| Back to top |
|
 |
|