Mod Walkthrough: CSV Relations overrides
- Balthagor
- Supreme Ruler
- Posts: 22106
- Joined: Jun 04 2002
- Human: Yes
- Location: BattleGoat Studios
Mod Walkthrough: CSV Relations overrides
This thread will use an existing mod to show how to create/modify a .CSV relations file for a scenario. For those who wish to follow along exactly, go grab the latest datafiles for the SuperPowers Mod.
If you would like information on editing Regional Influences/Spheres as set in the Regional Data .CVP file, please consult this thread.
I'm starting to write the opening steps, please stand by...
If you would like information on editing Regional Influences/Spheres as set in the Regional Data .CVP file, please consult this thread.
I'm starting to write the opening steps, please stand by...
- Balthagor
- Supreme Ruler
- Posts: 22106
- Joined: Jun 04 2002
- Human: Yes
- Location: BattleGoat Studios
Re: Mod Walkthrough: CSV Relations overrides
Mod Goals;
We're going to use the Superpowers Mod for this example. I currently does not have a .CSV relations override file. We will do the following;
* Create a .CSV relations override file
* change the relationships between some regions
* fix existing scripted events
These steps will not require rebuilding the cache.
Step 1
* open Superpowers.scenario using Notepad
* in the section #endifset add the following line at the bottom;
This file has 3 sections;
* Included Regions in Scenario
* Relation Overrides
* Scripted events
With the current values in the file (a direct copy of Global Crisis.csv) it would crash the game because we have regions that don't exist in all three sections. In this case the mod we're working with is so different that we're as well to dump all 3 sections and keep only the headers. If we remove all the actual data the file will look like this;
Step 2
We'll rebuild the first section now. Open the Superpowers.REGIONINCL file and use it's values to fill in the section. Copy and paste all the values from the REGIONINCL file into the &®IONSCEN section of the Superpowers.CSV file. Then add the following to each line;
At ths point, I need to test my file to be sure I have no mistakes in the above info. Step 3 later...
[Edit: corrections to Step 1, line to paste into .csv file rewritten]
We're going to use the Superpowers Mod for this example. I currently does not have a .CSV relations override file. We will do the following;
* Create a .CSV relations override file
* change the relationships between some regions
* fix existing scripted events
These steps will not require rebuilding the cache.
Step 1
* open Superpowers.scenario using Notepad
* in the section #endifset add the following line at the bottom;
* Open Superpowers.CSV#include "Superpowers.CSV"
This file has 3 sections;
* Included Regions in Scenario
* Relation Overrides
* Scripted events
With the current values in the file (a direct copy of Global Crisis.csv) it would crash the game because we have regions that don't exist in all three sections. In this case the mod we're working with is so different that we're as well to dump all 3 sections and keep only the headers. If we remove all the actual data the file will look like this;
Save both files.// SCENARIO ADJUSTMENTS
&®IONSCEN
&&CVPREL,
&&SEVENTS
Step 2
We'll rebuild the first section now. Open the Superpowers.REGIONINCL file and use it's values to fill in the section. Copy and paste all the values from the REGIONINCL file into the &®IONSCEN section of the Superpowers.CSV file. Then add the following to each line;
We will cover what these values mean later on., False, False, False, False, False, False,
At ths point, I need to test my file to be sure I have no mistakes in the above info. Step 3 later...
[Edit: corrections to Step 1, line to paste into .csv file rewritten]
- ZT Strike
- Major
- Posts: 164
- Joined: Jan 02 2010
- Human: Yes
- Location: Evansville, IN
- Contact:
- Balthagor
- Supreme Ruler
- Posts: 22106
- Joined: Jun 04 2002
- Human: Yes
- Location: BattleGoat Studios
Re: Mod Walkthrough: CSV Relations overrides
got around to testing and found error in Step 1, updated post. I'll work on Step 3 for tomorrow (I hope...)
- Balthagor
- Supreme Ruler
- Posts: 22106
- Joined: Jun 04 2002
- Human: Yes
- Location: BattleGoat Studios
Re: Mod Walkthrough: CSV Relations overrides
Step 3
* open Superpowers.csv using Notepad
* In the &&CVPREL section, create on section for every region whose data you wish to alter.
* Add data for each region section
Here we have multiple secitons, each of these sections is about one region. The values below the first line indicate a second region and their relationship to the first region. The first line of the section must begin with the &&CVPREL command followed by a comma and the region that this section alters. For example, the relations overrde section for the Caliphate would look lik this;
* Target Region (ID from .CVP file)
* Treaty Number (ID from &&RTREATIESTEXT section of LOCALTEXT.CSV)
* Diplomatic Relations modifier
* Civilian Opinion modifier
* Causus Belli Modifier
So if we wish the Caliphate to be at odds with America, we could place values like this;
* not add a treaty between the regions
* reduce starting Caliphate DipRel of America by 0.05%
* reduce starting Caliphate CivOp of America by 0.02%
* add 2% Caliphate CB against the US
To create the American opinion of the Caliphate would could add a section that looks like this;
NOTE: The values for Dip/Civ/Belli seen here modifiy the values that are set by comparing influences in the .CVP file adjusted by the volatility of the map. This can create unpredictable effects from the overrides here. A lot of trial and error may be needed.
When the values you like are in place, close and save the file. Launch the game to see the changes. Cache building is not required for this stage when the .CSV file is applied as set in step 1.
* open Superpowers.csv using Notepad
* In the &&CVPREL section, create on section for every region whose data you wish to alter.
* Add data for each region section
Here we have multiple secitons, each of these sections is about one region. The values below the first line indicate a second region and their relationship to the first region. The first line of the section must begin with the &&CVPREL command followed by a comma and the region that this section alters. For example, the relations overrde section for the Caliphate would look lik this;
Each line within the section is formated with the following info separated by commas;&&CVPREL, 154
* Target Region (ID from .CVP file)
* Treaty Number (ID from &&RTREATIESTEXT section of LOCALTEXT.CSV)
* Diplomatic Relations modifier
* Civilian Opinion modifier
* Causus Belli Modifier
So if we wish the Caliphate to be at odds with America, we could place values like this;
This would;2950, , -0.05, -0.02, 0.02
* not add a treaty between the regions
* reduce starting Caliphate DipRel of America by 0.05%
* reduce starting Caliphate CivOp of America by 0.02%
* add 2% Caliphate CB against the US
To create the American opinion of the Caliphate would could add a section that looks like this;
We could also create an alliance between Brazil and Chile using the following two sections;&&CVPREL, 2950
154, , -0.13, -0.12, 0.11
In this case we have no created any relation overrides, we have simply set the alliance. Treaties are set both ways when created like this. To create multiple treaties, simply repeat the region ID like this;&&CVPREL, 2303
2304, 1, , ,
These values would set two way Line of Sight, Full Transit and Free Trade treaties between Chile and Columbia.&&CVPREL, 2304
2305, 12, , ,
2305, 30, , ,
2305, 84, , ,
NOTE: The values for Dip/Civ/Belli seen here modifiy the values that are set by comparing influences in the .CVP file adjusted by the volatility of the map. This can create unpredictable effects from the overrides here. A lot of trial and error may be needed.
When the values you like are in place, close and save the file. Launch the game to see the changes. Cache building is not required for this stage when the .CSV file is applied as set in step 1.
- ZT Strike
- Major
- Posts: 164
- Joined: Jan 02 2010
- Human: Yes
- Location: Evansville, IN
- Contact:
Re: Mod Walkthrough: CSV Relations overrides
I see the idea for the most part. However I am still a little off on a few things.
1) How do I know which number means what treaty.
2) How do I change the staring relations
If you wouldn't mind, I would like to rework this with you to figure out what I'm doing. I could use 3 examples for each of what's next. I will try to give you situations that will give me what I need to know.
I)Changing starting relations. I need to know where to change this and what it should look like.
-Examples for use:
--1)Korea and Japan are very good friends, and are allied or very likely to ally at the start of the game.
--2)The EF and AU are start friendly but not friendly enough to ally.
--3)The AU and China are neither friendly nor hostile, "Neutral" for say.
--4)The EF and Russia are not happy with one another.
--5)Brazil hates Argentina
II)Changing the "acting relations" (relations of course of game) of countries.
-Examples:
--1)Korea and Taiwan are both going to improve their relations quickly.
--2)India and the EF relations are going to improve slowly over time.
--3)South Africa and Malaysia are unlikely to have any change in relation.
--4)China and Taiwan have slowly declining relations.
--5)Brazil and Ven have rapidly declining relations
--6)(tricky)The EF and AU are friendly but can also see on another as rivals.(Variable or swing relations)
III)Treaties
-Examples:
--1)Korea and Japan are allied
--2)China and Mongolia are at war
--3)Free Trade between EF and AU
--4)Embassy between AU and Cal
--5)Full Transit between AU and Panama
1) How do I know which number means what treaty.
2) How do I change the staring relations
If you wouldn't mind, I would like to rework this with you to figure out what I'm doing. I could use 3 examples for each of what's next. I will try to give you situations that will give me what I need to know.
I)Changing starting relations. I need to know where to change this and what it should look like.
-Examples for use:
--1)Korea and Japan are very good friends, and are allied or very likely to ally at the start of the game.
--2)The EF and AU are start friendly but not friendly enough to ally.
--3)The AU and China are neither friendly nor hostile, "Neutral" for say.
--4)The EF and Russia are not happy with one another.
--5)Brazil hates Argentina
II)Changing the "acting relations" (relations of course of game) of countries.
-Examples:
--1)Korea and Taiwan are both going to improve their relations quickly.
--2)India and the EF relations are going to improve slowly over time.
--3)South Africa and Malaysia are unlikely to have any change in relation.
--4)China and Taiwan have slowly declining relations.
--5)Brazil and Ven have rapidly declining relations
--6)(tricky)The EF and AU are friendly but can also see on another as rivals.(Variable or swing relations)
III)Treaties
-Examples:
--1)Korea and Japan are allied
--2)China and Mongolia are at war
--3)Free Trade between EF and AU
--4)Embassy between AU and Cal
--5)Full Transit between AU and Panama
-ZT Strike
- Ruges
- General
- Posts: 3408
- Joined: Aug 22 2008
- Location: Nearby, really I'll see you tonight when your sleeping
- Contact:
Re: Mod Walkthrough: CSV Relations overrides
1) read the wiki. Infact if you are even going to think about moding, Spend awhole day reading the wiki before you start moding. Look at the files and read the wiki. Once you get an idea of what you are looking for seach on the forum.ZT Strike wrote:I see the idea for the most part. However I am still a little off on a few things.
1) How do I know which number means what treaty.
2) How do I change the staring relations
2) Read this post. This post is showing you an example of how todo that.
The info is out there on how todo all of this stuff. Sure its not the examples that you are looking for. But they are examples. And if you cannot figure out the simularities between what you are asking and what has already been supplied. You might want to rethink making a mod.
- Balthagor
- Supreme Ruler
- Posts: 22106
- Joined: Jun 04 2002
- Human: Yes
- Location: BattleGoat Studios
Re: Mod Walkthrough: CSV Relations overrides
I have answered both questions in step #3;
1) look it up in the data file
2) for the Japan/Korea example, add negative Dip/Civ overrides to Japan towards Korea and to Korea towards Japan. Pick a number to start with, save, look in game, adjust your numbers if not right. Wash, rinse, repeat.
If you want to change the base relationships, you'd have to change Influences which is the stuff in the thread where Ruges provided the info linked in the OP.
There is no way to change the "acting relations" beyond scripting in events, which I will touch on in a later step, and these are never variable/random. You can only script an increase or a decrease.
and there is no specific way to make a region "less likely" to sign a treaty, you can only create relationships that make them not want a given treaty with a given region. They make their own decisions on treaties.
1) look it up in the data file
So open the LOCALTEXT.CSV file, look for the &&RTREATIESTEXT section and find your number* Treaty Number (ID from &&RTREATIESTEXT section of LOCALTEXT.CSV)
2) for the Japan/Korea example, add negative Dip/Civ overrides to Japan towards Korea and to Korea towards Japan. Pick a number to start with, save, look in game, adjust your numbers if not right. Wash, rinse, repeat.
If you want to change the base relationships, you'd have to change Influences which is the stuff in the thread where Ruges provided the info linked in the OP.
There is no way to change the "acting relations" beyond scripting in events, which I will touch on in a later step, and these are never variable/random. You can only script an increase or a decrease.
and there is no specific way to make a region "less likely" to sign a treaty, you can only create relationships that make them not want a given treaty with a given region. They make their own decisions on treaties.
- ZT Strike
- Major
- Posts: 164
- Joined: Jan 02 2010
- Human: Yes
- Location: Evansville, IN
- Contact:
Re: Mod Walkthrough: CSV Relations overrides
1)I read the wiki and if I understood everything it told me I wouldn't be asking for help you simple minded prick.Ruges wrote:1) read the wiki. Infact if you are even going to think about moding, Spend awhole day reading the wiki before you start moding. Look at the files and read the wiki. Once you get an idea of what you are looking for seach on the forum.
2) Read this post. This post is showing you an example of how todo that.
The info is out there on how todo all of this stuff. Sure its not the examples that you are looking for. But they are examples. And if you cannot figure out the simularities between what you are asking and what has already been supplied. You might want to rethink making a mod.
2)I see the examples of Chris's post, I was asking for more so I could understand the correlation between. Yes I bet there is other examples out there to show me, but I haven't heard of any direct thread that shows this. Therefor this thread is to be that.
P.S. Just because you know how to mod doesn't mean we all do. Thanks for interrupting the thread, please do yourself a favor and ****-off!
Thanks for the help Chris, that cleared up some of the small things but I'm still a bit lost. Mainly the difference between:Balthagor wrote:I have answered both questions in step #3;
1) look it up in the data fileSo open the LOCALTEXT.CSV file, look for the &&RTREATIESTEXT section and find your number* Treaty Number (ID from &&RTREATIESTEXT section of LOCALTEXT.CSV)
2) for the Japan/Korea example, add negative Dip/Civ overrides to Japan towards Korea and to Korea towards Japan. Pick a number to start with, save, look in game, adjust your numbers if not right. Wash, rinse, repeat.
If you want to change the base relationships, you'd have to change Influences which is the stuff in the thread where Ruges provided the info linked in the OP.
There is no way to change the "acting relations" beyond scripting in events, which I will touch on in a later step, and these are never variable/random. You can only script an increase or a decrease.
and there is no specific way to make a region "less likely" to sign a treaty, you can only create relationships that make them not want a given treaty with a given region. They make their own decisions on treaties.
----------------&&CVPREL, 154
2950, , -0.05, -0.02, 0.02
------and-------&&CVPREL, 2950
154, , -0.13, -0.12, 0.11
To me, the first two to seem to be an acting relations and how they will get along. However the third looks like a treaty assignment, but it looks like its in the same place. I'm going go into the original file and see if I can figure out the relations....&&CVPREL, 2303
2304, 1, , ,
-ZT Strike
- Balthagor
- Supreme Ruler
- Posts: 22106
- Joined: Jun 04 2002
- Human: Yes
- Location: BattleGoat Studios
Re: Mod Walkthrough: CSV Relations overrides
Hold up. Ruges may not be giving you the answer you're looking for but he is one of our senior forum members and our top ranked modder, you will not go around insulting him. We have exactly one rule around here and you've just managed to break it. This is your one and only warning, rudeness on this forum will not be tolerated.ZT Strike wrote:1)I read the wiki and if I understood everything it told me I wouldn't be asking for help you simple minded prick.
- Ruges
- General
- Posts: 3408
- Joined: Aug 22 2008
- Location: Nearby, really I'll see you tonight when your sleeping
- Contact:
Re: Mod Walkthrough: CSV Relations overrides
So loooking at the wiki. we see that the first thing you should know is http://www.supremewiki.com/index.php/Mo ... ted_FormatZT Strike wrote:[1)I read the wiki and if I understood everything it told me I wouldn't be asking for help you simple minded prick.
2)I see the examples of Chris's post, I was asking for more so I could understand the correlation between. Yes I bet there is other examples out there to show me, but I haven't heard of any direct thread that shows this. Therefor this thread is to be that.
P.S. Just because you know how to mod doesn't mean we all do. Thanks for interrupting the thread, please do yourself a favor and ****-off!
So we can see how the columns and lines all line up and make sense. Until you really know the format, I really sugest using a spreadshieet. Once you become more skilled, it can be quicker todo it in notepad. But your more likly to create an error. So once you have figured out the whole comma delimited format when you look at the page for http://www.supremewiki.com/index.php/Map_.CSV_Data . This section contains the headers for the &&CVPREL. When you are using a spreadsheet you will see each column is assosiated with the header. While this info alone should be enough for it to click in your head, you might still need anouther push. So we look at this thread.
At the top of this thread there is a link to http://www.bgforums.com/forums/viewtopi ... 48&t=16411. The secound post down shows an example very well laid out of the &&CVPREL.
Which shows an example and what each number is and means. and shows all variations. Then if you read Balths Step 3 it goes into even more detail. So yea I feel the info is out there on how todo it. And that this is probly one of the easier things todo. So if somone could not figure it out by the info that is posted, Moding might not be somthing that somone should attempt.Code:
&&CVPREL, 2601 //
2499, ,0.2,0.19,
2503, ,0.15,0.3,
1999,90,0.4,0.22,
2999, ,-0.2,-0.3,0.18
Here we have region 2601 (Mexico). The next line 2499 means the region they will have relations with. The first spot is for treaties, but the treaty ID number in this spot., Secound is civilian relations. Third is diplo relations and fourth is CB.
So the above would mean:
Mexico has:
.2 beter civil and .19 beter diplo relations with canada.
.15 better civil, and .03 beter diplo relations with Dom republic.
an embasy, .4 better civil, .22 better diplo relations with China.
.2 worse civil, .3 worse diplo, .18 CB with the US.
All the examples you requested, well that would be allot of work jut of the examples, Geez you might as well tell us how you want the mod to run and us do it for you. And that probly wont happen. And some of the examples you requested where simple things that you should have picked up from the wiki and here on the forums. So to me when you asking for examples of this stuff, either you did not read the wiki and forums, and I mean really read, spend a couple hours going over it alll, and then do it again once or twice more. Or its just over the top of your head, and moding is not for you.
Yes, and Yes. Is it in the same place? use a spreedsheet. look at the headers from the wiki.Thanks for the help Chris, that cleared up some of the small things but I'm still a bit lost. Mainly the difference between:
Quote:
&&CVPREL, 154
2950, , -0.05, -0.02, 0.02
----------------
Quote:
&&CVPREL, 2950
154, , -0.13, -0.12, 0.11
------and-------
Quote:
&&CVPREL, 2303
2304, 1, , ,
To me, the first two to seem to be an acting relations and how they will get along. However the third looks like a treaty assignment, but it looks like its in the same place. I'm going go into the original file and see if I can figure out the relations....
*edit, I dont mind him insulting me. I basicaly called him an idiot, just in a nice way.
- ZT Strike
- Major
- Posts: 164
- Joined: Jan 02 2010
- Human: Yes
- Location: Evansville, IN
- Contact:
Re: Mod Walkthrough: CSV Relations overrides
Ruges, there is a difference between being ignorant and being an idiot.
-ZT Strike
- Ruges
- General
- Posts: 3408
- Joined: Aug 22 2008
- Location: Nearby, really I'll see you tonight when your sleeping
- Contact:
Re: Mod Walkthrough: CSV Relations overrides
Sure a fine line. But you see the info there now right?
- ZT Strike
- Major
- Posts: 164
- Joined: Jan 02 2010
- Human: Yes
- Location: Evansville, IN
- Contact:
Re: Mod Walkthrough: CSV Relations overrides
I understand, thank you ruges.
Balth, we going to move onto the next step. We still have I think, 3 majors to do.
Balth, we going to move onto the next step. We still have I think, 3 majors to do.
-ZT Strike
- Balthagor
- Supreme Ruler
- Posts: 22106
- Joined: Jun 04 2002
- Human: Yes
- Location: BattleGoat Studios
Re: Mod Walkthrough: CSV Relations overrides
I'll try and post some tonight.