Mod Walkthrough: CSV Relations overrides

What is the world like in 2020? What are the different ways to play? How can I create my own futuristic scenario and country groupings?

Moderators: Balthagor, Legend

User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Mod Walkthrough: CSV Relations overrides

Post by Balthagor »

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...
Chris Latour
BattleGoat Studios
chris@battlegoat.com
User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Mod Walkthrough: CSV Relations overrides

Post by Balthagor »

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;
#include "Superpowers.CSV"
* Open 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;
// SCENARIO ADJUSTMENTS
&&REGIONSCEN

&&CVPREL,

&&SEVENTS
Save both files.

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 &&REGIONSCEN section of the Superpowers.CSV file. Then add the following to each line;
, False, False, False, False, False, False,
We will cover what these values mean later on.

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]
Chris Latour
BattleGoat Studios
chris@battlegoat.com
User avatar
ZT Strike
Major
Posts: 164
Joined: Jan 02 2010
Human: Yes
Location: Evansville, IN
Contact:

Re: Mod Walkthrough: CSV Relations overrides

Post by ZT Strike »

Done
-ZT Strike
User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Mod Walkthrough: CSV Relations overrides

Post by Balthagor »

got around to testing and found error in Step 1, updated post. I'll work on Step 3 for tomorrow (I hope...)
Chris Latour
BattleGoat Studios
chris@battlegoat.com
User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Mod Walkthrough: CSV Relations overrides

Post by Balthagor »

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;
&&CVPREL, 154
Each line within the section is formated with the following info separated by commas;
* 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;
2950, , -0.05, -0.02, 0.02
This would;
* 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;
&&CVPREL, 2950
154, , -0.13, -0.12, 0.11
We could also create an alliance between Brazil and Chile using the following two sections;
&&CVPREL, 2303
2304, 1, , ,
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, 2304
2305, 12, , ,
2305, 30, , ,
2305, 84, , ,
These values would set two way Line of Sight, Full Transit and Free Trade treaties between Chile and Columbia.

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.
Chris Latour
BattleGoat Studios
chris@battlegoat.com
User avatar
ZT Strike
Major
Posts: 164
Joined: Jan 02 2010
Human: Yes
Location: Evansville, IN
Contact:

Re: Mod Walkthrough: CSV Relations overrides

Post by ZT Strike »

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
-ZT Strike
User avatar
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

Post by Ruges »

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
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.
User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Mod Walkthrough: CSV Relations overrides

Post by Balthagor »

I have answered both questions in step #3;

1) look it up in the data file
* Treaty Number (ID from &&RTREATIESTEXT section of LOCALTEXT.CSV)
So open the LOCALTEXT.CSV file, look for the &&RTREATIESTEXT section and find your number

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.
Chris Latour
BattleGoat Studios
chris@battlegoat.com
User avatar
ZT Strike
Major
Posts: 164
Joined: Jan 02 2010
Human: Yes
Location: Evansville, IN
Contact:

Re: Mod Walkthrough: CSV Relations overrides

Post by ZT Strike »

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.
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!
Balthagor wrote:I have answered both questions in step #3;
1) look it up in the data file
* Treaty Number (ID from &&RTREATIESTEXT section of LOCALTEXT.CSV)
So open the LOCALTEXT.CSV file, look for the &&RTREATIESTEXT section and find your number
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.
Thanks for the help Chris, that cleared up some of the small things but I'm still a bit lost. Mainly the difference between:
&&CVPREL, 154
2950, , -0.05, -0.02, 0.02
----------------
&&CVPREL, 2950
154, , -0.13, -0.12, 0.11
------and-------
&&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....
-ZT Strike
User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Mod Walkthrough: CSV Relations overrides

Post by Balthagor »

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.
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.
Chris Latour
BattleGoat Studios
chris@battlegoat.com
User avatar
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

Post by Ruges »

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.
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 loooking at the wiki. we see that the first thing you should know is http://www.supremewiki.com/index.php/Mo ... ted_Format
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.
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.
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.

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.
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....
Yes, and Yes. Is it in the same place? use a spreedsheet. look at the headers from the wiki.

*edit, I dont mind him insulting me. I basicaly called him an idiot, just in a nice way.
User avatar
ZT Strike
Major
Posts: 164
Joined: Jan 02 2010
Human: Yes
Location: Evansville, IN
Contact:

Re: Mod Walkthrough: CSV Relations overrides

Post by ZT Strike »

Ruges, there is a difference between being ignorant and being an idiot.
-ZT Strike
User avatar
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

Post by Ruges »

Sure a fine line. But you see the info there now right?
User avatar
ZT Strike
Major
Posts: 164
Joined: Jan 02 2010
Human: Yes
Location: Evansville, IN
Contact:

Re: Mod Walkthrough: CSV Relations overrides

Post by ZT Strike »

I understand, thank you ruges.

Balth, we going to move onto the next step. We still have I think, 3 majors to do.
-ZT Strike
User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: Mod Walkthrough: CSV Relations overrides

Post by Balthagor »

I'll try and post some tonight.
Chris Latour
BattleGoat Studios
chris@battlegoat.com
Post Reply

Return to “Scenarios, Mods and More - 2020”