Package contains Earth 2150 .par .wd .lan and other tools and source files for "Mod for OSMod" and also mod itself tutorial how to edit EARTH2150.par easily
EARTH 2150 TRILOGY - Modding Tutorial - How to edit EARTH2150.par
Youtube.com
________________________________________________________________________
This is needed to do once only :
Copy EarthE2150_Tools folder to C: eg.: C:\EarthE2150_Tools\
open Mass_Import_Export_CSV.xlsm (this is excel file with VBA macros MASS CSV Import/Export)
1. RUN CombineCsvFiles() macro for mass import CSV files to xlsx sheets
For faster work is recommend to add macros as icons to excel toolbar, create ribbon
1. right-click excel tool bar
2. from right-click menu click "customize the ribbon"
3. on left panel from dropdown menu choose Macros, there should be macros:
ExportSheetsToCSV() (for mass export sheets to CSV files)
ExportSheetsToText() (for mass export CSV to txt files)
CombineCsvFiles() (for mass import CSV to xlsx file)
(if you dont see these macros you will have to add them first, in the excel press ALT+F11 this will open Visul Basic window, then from menu "Insert->Module" paste macros from
CSV_VBA_Macro_for_Excel.txt file, then save macros, from menu "File->Save" (CTRL+S), close Visual Basic window.
After mass CSV import to excel save xlsx file to same folder as Mass_Import_Export_CSV.xlsm, in this case C:\EarthE2150_Tools\
CSV files will be export to folder "C:\EarthE2150_Tools\"
________________________________________________________________________
There are two tool folders:
\par_tool_OSmod\
\par_tool_Update21\
OSmod folder "par_tool_OSmod" contains two main executables CSV2PAR_OSmod.exe, PAR2CSV_gui.exe, the CSV2PAR.exe is original unchanged compiled exe.
Difference between CSV2PAR.exe and CSV2PAR_OSmod.exe is in the order of writing CSV files into PAR file.
If you use CSV2PAR_OSmod.exe AI will use all building robots for building, 1st builder builds main layout of base, Factories, Power Plants, Towers etc., other builders spam Weapons Production Center and Vehicle Factory.
This will create huge base, but these buildings are often without power until 1st builder builds Power Plant next to them.
If OSmod CSV files are compiled by tool from "par_tool_Update21" folder, AI will use one builder only, other builders do nothing. Base is smaller but more logical, more space between buildings compared to the OSmod tool where base is huge, but building are often too close to each other and then units can't move and are trapped between buildings.
If main builder is destroyed AI will use another builder, or starts to build new one. BUT if builder is disabled by ION cannon, the other builders do nothing, so ION shot can completely stop AI progress. Sometimes happens, the main builder does nothing long time, he gets stuck for various reasons, for example if there is no space for building, destroying some building usually unstuck builder's AI.
Another weird thing I noticed for LC faction is, if OSmod is compiled by tool from "par_tool_Update21" folder, LC Mercury II builder instantly builds "Solar Cells" (LCBSB) or "Xyrex power plants" (LCBPP2), large part of map is spammed by these buildings. I observed this happens for building for Groups 29, 30 in the building.csv, in this case it is Group 129, Group 130, i put two extra groups with NEUTRAL faction before Xyrex power plant group to prevent this spam.
Spamming of buildings could be advantage for AI as AI is not very smart.
Another thing I noticed, AI watches what other players do, if someone build more factories they also try to do that, if player builds Ship Yard they also will try to build it. AI mostly focus on destroying Power Plants. This apply to unmodded game also.
The building spam may happen also for ED, UCS if group 29,30, belongs to them, when I changed order of buildings UCS started to spam Capture flag building (CTF Flag) even building is normally not available for build.
Unfortunately, AI does not build SDI Defense Center and custom mod buildings, I do see any way how to edit AI. Same for unmodded game, so when ED spams Nuclear Rockets, AI is lost.
Note: CSV2PAR_UPD21.exe is modified version of CSV2PAR, change is in CSV order when are written to PAR file. If you extract CSV files from EARTH2150.par located in the official archive Update21.wd and compile CSV files back to EARTH2150.par file by tool CSV2PAR_UPD21.exe you should get exactly same file.
IMPORTANT!!!
1. If some cannon, vehicle, building requires some technology to research first, this technology must by defined in the research.csv
2. The column "previous" in the research.csv is shifted by 1 row down, before editing research.csv is needed move whole column "previous" by 1 row up, for this is best Excel, after editing research.csv column must be moved back 1 row down. Why? Tool is not perfect, author of python code created smart universal code but there are some exceptions as research is indexed from 0,1,2...
3. I usually add some non-existent dummy/fake technology at the end of research.csv eg: RES_ED_DUM2, this is because last row is not fully written to par file, if we compare length of record of last but one record and last record, the last technology record is shorter, the last dummy record can be safely removed by any HexEditor (it is always located at the end of EARTH2150.par file).
4. Each identifier must be unique eg.: EDBBA (ED Vehicle Production Center), EDBFA (ED Weapons Production Center), if two or more identifiers are same, game probably will not run at all. Identifier cannot be empty, this means CSV row cannot start by ,,
5. Be very careful with editing when you add new rows, follow csv standards of previous rows in the csv file.
6. Each group starts by word Group Number, FACTION (ED,LC,UCS,NEUTRAL) eg.: Group 82,ED
If you need to change order of groups, don't bother with group number, number is used for your info only, it is ignored by par tool, two identical Group 82,ED Group 82,ED are ok same as Group blabla,ED. But the faction after coma , is required!
_____________________________________________________________________
Some info about columns plugType, slotType in the cannon.csv, equipment.csv, lookroundequipment.csv... etc.:
"plugType" number defines category for cannons eg. small cannons, heavy cannons, cannons for buildings and towers, Anti-Air cannons...
"slotType" some cannons can have defined number for sub-equipment, usually heavy cannons, eg.: Heavy electro-cannon (LCCHL1)
The number for both columns should be understanded as binary number. Similar columns slot1Type, slot2Type, slot3Type, slot4Type can be found in the vehicle.csv or building.csv
for example: Heavy electro-cannon (LCCHL1, cannon for buildings and towers) plugType is 32 = 2^5 -> binary 0010 0000 (as you see all digits are zero one digit is 1) If building or vehicle has eg.: slot1Type with number 4144 -> binary 0001 0000 0011 0000, because sixth digit from right is 1 this means building can be equipped by this cannon.
Max SlotType number is FF FF FF FF = 4294967295 -> binary 1111 1111 1111 1111 1111 1111 1111 1111 this means you can equip everything.
Min SlotType number is 00 00 00 00 = 0 -> binary 0000 0000 0000 0000 0000 0000 0000 0000 this means you can equip nothing.
Example:
Weapon 1 has plugType = 2 -> binary 0000 0010
Weapon 2 has plugType = 4 -> binary 0000 0100
Weapon 3 has plugType = 64 -> binary 0100 0000
What will be SlotType number for vehicle, if we need all 3 weapons to be equipable?
2 + 4 + 64 = 70
0000 0010
OR 0000 0100
OR 0100 0000
____________
0100 0110
Be careful, for plugType addition, use rather binary bitwise OR. Why? Look at example below
binary bitwise OR |
0 | 0 = 0
0 | 1 = 1
1 | 0 = 1
1 | 1 = 1
if we have:
Weapon 1 has plugType = 4 -> binary 0000 0100
Weapon 2 has plugType = 4 -> binary 0000 0100
What will be SlotType number for vehicle, if we need both weapons to be equipable?
4 + 4 = 8 ? Wrong! because 8 = 2^3 -> binary 0000 1000
0000 0100
OR 0000 0100
_____________
0000 0100 = 4
plugType number should have one digit 1 and all other 0, but there are some plugType numbers which does not follow this rule
eg.: UCS AA PlasmaGun plugType = 32816 -> binary 1000 0000 0011 0000
This is waste of limited slots for weapons, but OK i let AA PlasmaGun as it was.
So if we want to equip AA PlasmaGun at least one "1" plugType digit must be present in the SlotType number.
Can equip: SlotType = 1000 0000 0011 0000 = 32816
Can equip: SlotType = 1000 0000 0000 0000 = 32768
Can equip: SlotType = 1000 0000 0001 0000 = 32784
Can equip: SlotType = 1000 0000 0010 0000 = 32800
Can equip: SlotType = 0000 0000 0010 0000 = 32
Can equip: SlotType = 0000 0000 0001 0000 = 16
Can't equip: SlotType = 0100 0000 0000 0000 = 16384
Can't equip: SlotType = 0000 0000 0000 0010 = 2
Can't equip: SlotType = 0000 0000 0000 1000 = 8
Can't equip: SlotType = 0111 1111 1100 1111 = 32719
Can equip: SlotType = 0111 1111 1101 1111 = 32735
plugType = 32816 -> 1000 0000 0011 0000 (UCS AA PlasmaGun)
_____________________________________________________________________
Similar binary bitwise OR applies for repairerFlags column in the repairer.csv
1 = 2^0 = 0000 0001 repairerCanRepairTanks
2 = 2^1 = 0000 0010 repairerCanRepairBuildings
4 = 2^2 = 0000 0100 repairerCanConvertDisabledTanks
8 = 2^3 = 0000 1000 repairerCanConvertDisabledBuildings
16 = 2^4 = 0001 0000 repairerCanRepaint
32 = 2^5 = 0010 0000 repairerCanUpgrade
64 = 2^6 = 0100 0000 repairerCanConvertHealthyTanks
128 = 2^7 = 1000 0000 repairerCanConvertHealthyBuildings
1 + 2 = 3 repairerCanRepairTanks and repairerCanRepairBuildings
1 + 2 + 16 = 19 repairerCanRepairTanks AND repairerCanRepairBuildings AND repairerCanRepaint
1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255 -> binary 1111 1111 Repairer can do all
Other details about csv colums are explained in the polish EARTH2150_2.2.xls in the first worksheet "Defines"