U.K. modding

This forum has been archived. Please use the new modding forum. If you need to retrieve a thread from here, contact BattleGoat.

Moderators: Balthagor, BattleGoat

Post Reply
AJ1990s
Private
Posts: 1
Joined: Aug 21 2017
Human: Yes

U.K. modding

Post by AJ1990s »

So I recently started playing about with the .DATA and .ORBAT files specifically around British units for the TR2017 sandbox era.

Basically have a few queries

1.I’m trying to get the Royal Navy completely realistic with numbers and names of ships, I have managed to successfully change the amount of x class of ship the U.K. starts with but I could not manage to name them individually outside the game. So for example with the Type 45, when I start a TR2017 Save I want each T 45 to have the correct namesake and pennant number e.g D-32 HMS Daring. I know how to do this in game just not actually outside.

2. The RN operate 3 main U.K. bases (HMNB Clyde, Portsmouth and Devonport) I basically just want to get rid of all other U.K. sea ports and then mod the code so each of the 3 sea ports are named after the relevant name. Also I would like to give the U.K. foreign bases e.g HMNB Junfair so it’s like US ports in Japan or Cuba

3.I would like to either create the NATO alliance adding (default mutual defence, line of sight, full transit etc) with the sort of interactivity like the UN has in game or create the EU as a functioning nation state.

4. I would like to place ships at default locations on the map from the start of the game.


****FYI*****
I apologise if this is in the wrong place (my first post) and dw about in depth descriptions just general pointers and I’ll work it out
User avatar
Balthagor
Supreme Ruler
Posts: 22082
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: U.K. modding

Post by Balthagor »

Welcome to the forum,

No worries, it's easy to move around topics. Thanks for contributing!
Chris Latour
BattleGoat Studios
chris@battlegoat.com
vahadar
Colonel
Posts: 257
Joined: May 19 2010
Human: Yes

Re: U.K. modding

Post by vahadar »

AJ1990s wrote:1.I’m trying to get the Royal Navy completely realistic with numbers and names of ships, I have managed to successfully change the amount of x class of ship the U.K. starts with but I could not manage to name them individually outside the game. So for example with the Type 45, when I start a TR2017 Save I want each T 45 to have the correct namesake and pennant number e.g D-32 HMS Daring. I know how to do this in game just not actually outside.
1/ this is done through Orbats files.
Ingame you can rename a unit. In an orbat file you can generate, place and name a unit at game start.

Orbats are found for each country (if defined) in \Maps\ORBATS in the form of .csv file with the id of the country as filename, matching the id of the country in the .cvp file

ie : 1689.csv for France

How to add a unit and name it (and options)
https://supremeruler.gamepedia.com/Country_Orbats

Let's say i created a new cruiser class unit for France named Jeanne d'Arc, with id 20960 in my .UNIT file, this is what i need to write in my 1689.csv file to add it in game with a name

Code: Select all

20960,,,,1,,,Jeanne d`Arc,,,,,,,,,,,,,CL,Jeanne d`Arc,,,1931,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Like this, 1 unit will be available in reserve (default when status column is blank), with no homebase clearly identified, with unit name Jeanne d'Arc. The "CL", 2nd "Jeanne d'Arc" entry and "1931" are not mandatory, it is only informations for you to to put notes in each of your lines and not used by the game.

Of course you would need to write as many line as there are cruiser of that same class (unit id) but with different names.

Let's say i want to assign this unit as reserve in a specific sea port on map

Code: Select all

20960,802,166,Lorient,1,1,,Jeanne d`Arc,,,,,,,,,,,,,CL,Jeanne d`Arc,,,1931,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Here i'm assigning my 1 unit of cruiser to the port of Lorient (this is a named hex, known to the game), with the reserve status specifically mentionned. Despite not mentionend as mandatory in the wiki when specifying a named location, i suggest you also add the city coordinates, here 802x166
When not specifying location for reserve units, the game is distributing them equally between seaports, airbase or barracks.

Or i could put my ship somewhere at sea, ie one ocean hex south of Lorient

Code: Select all

20960,802,167,,1,0,,Jeanne d`Arc,,,,,,,,,,,,,CL,Jeanne d`Arc,,,1931,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Like this i'm telling the game my 1 unit ship Jeanne d'Arc is on hex coordinates 802x167, deployed status

Or i could simulate the construction of my unit in a shipyard

Code: Select all

20960,796,162,,1,1,,Jeanne d`Arc,,,,,,,127,,,,,,CL,Jeanne d`Arc,,,1931,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Here my unit is in construction in the shipyard near Brest, reserve status (mandatory in that case), hex coordinates 796x162, with 127 days left until completion. You can not specify shipyard by coordinates or name if lazy, because game will try to do it automaticly between available shipyards of that country, but sometimes all units in construction wont show in full as designed in the orbat file.

Of course there are more options you can use, see the wiki for details (unit experience, entrench, facing hex...)
AJ1990s wrote:2. The RN operate 3 main U.K. bases (HMNB Clyde, Portsmouth and Devonport) I basically just want to get rid of all other U.K. sea ports and then mod the code so each of the 3 sea ports are named after the relevant name. Also I would like to give the U.K. foreign bases e.g HMNB Junfair so it’s like US ports in Japan or Cuba
2/ modifying a map is done in the .OOF file
ie in /Maps/SR1936.OOF
you need to find your hex either by name (4th column, if a city or named complex) or coordinates (the 2nd and 3rd column). Double check when searching by names because many cities have same name (ex Plymouth, 2 checks, only 1 city with seaport at 797 151)

You will see a different set of number :

Code: Select all

21006, 815, 149, "PORTSMOUTH", 0.000000, 0, 0, , 6, 0.800000, 0.000000, 0, 1.000000, 1.000000, 0.000000, 1.570796, 0, 0, 0, 0, 
21203, 815, 149, "PORTSMOUTH", 0.000000, 0, 0, , 3, 0.800000, 0.000000, 0, 1.000000, 1.000000, 0.000000, 1.570796, 0, 0, 0, 0, 
21204, 815, 149, "PORTSMOUTH", 0.000000, 0, 0, , 1, 0.800000, 0.000000, 0, 1.000000, 1.000000, 0.000000, 1.570796, 0, 0, 0, 0, 
21212, 815, 149, "PORTSMOUTH", 0.000000, 0, 0, , 0, 0.800000, 0.000000, 0, 1.000000, 1.000000, 0.000000, 1.570796, 0, 0, 0, 0, 
 
You can set facility position on hex in the 9th column (0-6 where 6 is city or complex).
First number is facility name, as found in your .UNIT file, scroll down that file to find the code for "sea port" ie, which is 21203, so you simply need to delete the following line to remove seaport of Portsmouth (i know you want to keep it^^)

Code: Select all

21203, 815, 149, "PORTSMOUTH", 0.000000, 0, 0, , 3, 0.800000, 0.000000, 0, 1.000000, 1.000000, 0.000000, 1.570796, 0, 0, 0, 0, 
If you just want to replace sea ports by sea piers, replace 21203 by 21205

Change the name of the hex there also if you want, just specify the coordinates, and make sure all previous entries also have the same name for the same coordinates.
AJ1990s wrote:Also I would like to give the U.K. foreign bases e.g HMNB Junfair so it’s like US ports in Japan or Cuba
I dont know where HMNB Junfair is, i suppose it is outside UK territory ingame?
Then you would need to give the hex you want to UK, and make a military complex there with seaport.

To create the complex you need to add two line in the .OOF file, one with the complex, one with the sea port (there is no wiki for this, but you have pointers aldready above)

Then you need to make that hex you are building the base on property of UK through event 44 in your main scenario .csv file (ie SR1936.CSV in /Sandbox under &&SEVENTS section)
https://supremeruler.gamepedia.com/Events

Code: Select all

80000, 0, 0, 44, 0, 0, 1389, 0, 0, 0, 0, 0, 1492, 333, , , , , , , // hex transfer example
Here i'm transfering ownership of hex coordinate 1492x333 to UK, whatever its previous owner was.

You could also transfer hex loyalty with event 72 like this :

Code: Select all

80001, 0, 0, 72, 0, 0, 1389, 0, 0, 0, 0, 0, 0, 0, 1492, 33, , , , , // hex loyalty transfer example
80000 and 80001 are just id of lines added in the .csv, put whatever number you want.

You can also transfer ocean hex to give water access, or you can set sea transit treaty with the country where the base is (see under for details, its your next question)
AJ1990s wrote:
3.I would like to either create the NATO alliance adding (default mutual defence, line of sight, full transit etc) with the sort of interactivity like the UN has in game or create the EU as a functioning nation state.
3/ I will just reply to the first part, not the EU as a state (that would need grouping nations, creating a new one in the .cvp file, but this also means only one playable nation as Europe, and not its playable members)
As above this is done through event in the main .CSV file of the scenario using event 5, but with zero interactivity (it is set once and for all at game start here, though treaties can be broken later in game). For more interactivity see under.

Simply add for each country a set of lines defining relations with each other countries you want relations with.
Ie if i want mutual defense, line of sight and full transit between UK (region code 1389) and France (1689) :

Code: Select all

70084, 0, 0, 5, 10, 1389, 1689, 0, 0, 0, 0, 0, 1, 0, 0, , , , , , , //Mutual defense UK/FR set, two way treaty
70085, 0, 0, 5, 12, 1389, 1689, 0, 0, 0, 0, 0, 1, 0, 0, , , , , , , //Full Transit UK/FR
70085, 0, 0, 5, 30, 1389, 1689, 0, 0, 0, 0, 0, 1, 0, 0, , , , , , , //Line of Sight UK/FR
check wiki for explanations on parameters, basically here i am setting at game start (eventtime 0) the treaty, as a two way treaty, specifying the treaty code, the IDs of the countries.
70084,85,86 are just the ids of the line i'm adding, put whatever you want, just need to be greater than last line of the &&SEVENTS section of the .csv.

treaty number code :
https://supremeruler.gamepedia.com/Treaty_number

Also it just sets treaties, not relation between countries. If need to set relations it is done through &&CVPREL or event 14, both in the .csv file.
(treaties between countries can also be modded through &&CVPREL in the .csv file, i prefer events though, so check by yourself).

If you want interactivity, say if you want to make some predetermined countries member of NATO in the course of the game, you could test said country Blue sphere alignment and fire treaties event with other existing NATO countries, or other predetermined countries joigning NATO in the course of the game.
Anyway, explore event 45 and region sphere check strong allied conditions to achieve this.
This will require a lot of event lines :)
AJ1990s wrote:
4. I would like to place ships at default locations on the map from the start of the game.
4/ see my first reply at 1/ above, answer is there already (using coordinates in orbat file)
User avatar
sparky282
Colonel
Posts: 384
Joined: Dec 31 2011
Human: Yes

Re: U.K. modding

Post by sparky282 »

did you manage to sort this?
I would love to have a play of the modded files if you did always try to play as the uk and be as realistic as possible
Post Reply

Return to “Modding SRUltimate”