Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Civ-V-Modpack-UI-Converter
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gohrbandt, Jan
Civ-V-Modpack-UI-Converter
Commits
5b9e00b7
Commit
5b9e00b7
authored
3 years ago
by
Rsge
Browse files
Options
Downloads
Patches
Plain Diff
Made the script a little bit more easily configurable
parent
55ceebe3
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
EUI_Converter/EUI_Converter.py
+12
-7
12 additions, 7 deletions
EUI_Converter/EUI_Converter.py
EUI_Converter/EUI_Converter.sln
+1
-0
1 addition, 0 deletions
EUI_Converter/EUI_Converter.sln
README.md
+14
-0
14 additions, 0 deletions
README.md
with
27 additions
and
7 deletions
EUI_Converter/EUI_Converter.py
+
12
−
7
View file @
5b9e00b7
...
@@ -14,8 +14,13 @@ os.chdir("../..")
...
@@ -14,8 +14,13 @@ os.chdir("../..")
##Global Values
##Global Values
print
(
"
Configuring variables...
"
)
print
(
"
Configuring variables...
"
)
#Names
#Names
# Customize according to your setup here #
vanilla_eui_zip
=
"
!EUI.7z
"
# Vanilla EUI file (in vanilla_packs_folder)
modded_eui_zip
=
"
!EUI_CUC.7z
"
# CUC-version file name of EUI
modsave_folder
=
"
zzz_Modsaves
"
# Folder containing this scripts project folder and it's needed edited files
vanilla_packs_folder
=
"
zz_Vanilla_Versions
"
# Folder containing the vanilla packs
# Don't change from here [if you don't really know what you're doing that is of cause ;)] #
modpack_folder_name
=
"
MP_MODSPACK
"
modpack_folder_name
=
"
MP_MODSPACK
"
modded_eui_zip_name
=
"
EUI_CUC.7z
"
eui_cu_file_names
=
[
"
CityBannerManager.lua
"
,
eui_cu_file_names
=
[
"
CityBannerManager.lua
"
,
"
CityView.lua
"
,
"
CityView.lua
"
,
"
Highlights.xml
"
]
"
Highlights.xml
"
]
...
@@ -31,18 +36,18 @@ unit_panel_modcompat_file_names = ["EvilSpiritsMission.lua",
...
@@ -31,18 +36,18 @@ unit_panel_modcompat_file_names = ["EvilSpiritsMission.lua",
"
THTanukiMission.lua
"
]
"
THTanukiMission.lua
"
]
#Paths
#Paths
base_path
=
os
.
getcwd
()
base_path
=
os
.
getcwd
()
modsave_path
=
j
(
base_path
,
"
zzz_Modsaves
"
)
modsave_path
=
j
(
base_path
,
modsave_folder
)
modpack_path
=
j
(
base_path
,
modpack_folder_name
)
modpack_path
=
j
(
base_path
,
modpack_folder_name
)
vanilla_packs_path
=
j
(
base_path
,
"
zz_V
anilla_
Versions
"
)
vanilla_packs_path
=
j
(
base_path
,
v
anilla_
packs_folder
)
ui_path
=
j
(
modpack_path
,
"
UI
"
)
ui_path
=
j
(
modpack_path
,
"
UI
"
)
eui_path
=
j
(
base_path
,
"
UI_bc1
"
)
eui_path
=
j
(
base_path
,
"
UI_bc1
"
)
szip
=
r
"
C:\Program Files\7-Zip\7z.exe
"
szip
=
r
"
C:\Program Files\7-Zip\7z.exe
"
#Files
#Files
base_eui_zip_path
=
j
(
vanilla_packs_path
,
vanilla_eui_zip
)
modded_eui_zip_path
=
j
(
base_path
,
modded_eui_zip
)
mod_files
=
j
(
modpack_path
,
"
Mods
"
,
"
**
"
,
"
*.lua
"
)
mod_files
=
j
(
modpack_path
,
"
Mods
"
,
"
**
"
,
"
*.lua
"
)
ui_files
=
j
(
ui_path
,
"
*.lua
"
)
ui_files
=
j
(
ui_path
,
"
*.lua
"
)
eui_files
=
j
(
eui_path
,
"
*
"
,
"
*.lua
"
)
eui_files
=
j
(
eui_path
,
"
*
"
,
"
*.lua
"
)
base_eui_zip
=
j
(
vanilla_packs_path
,
"
0EUI.7z
"
)
modded_eui_zip_path
=
j
(
base_path
,
modded_eui_zip_name
)
#Global Variables
#Global Variables
load_tags
=
{}
load_tags
=
{}
...
@@ -70,14 +75,14 @@ if os.path.isdir(eui_path):
...
@@ -70,14 +75,14 @@ if os.path.isdir(eui_path):
#Compile EUI with colored unlocked citizens
#Compile EUI with colored unlocked citizens
if
not
os
.
path
.
isfile
(
modded_eui_zip_path
):
if
not
os
.
path
.
isfile
(
modded_eui_zip_path
):
print
(
"
Creating colored unlocked Citizens EUI...
"
)
print
(
"
Creating colored unlocked Citizens EUI...
"
)
subprocess
.
run
([
szip
,
'
x
'
,
base_eui_zip
],
stdout
=
null
,
stderr
=
null
)
subprocess
.
run
([
szip
,
'
x
'
,
base_eui_zip
_path
],
stdout
=
null
,
stderr
=
null
)
#shutil.move(j(vanilla_packs_path, eui_file_name), eui_path)
#shutil.move(j(vanilla_packs_path, eui_file_name), eui_path)
for
eui_cu_file_name
in
eui_cu_file_names
:
for
eui_cu_file_name
in
eui_cu_file_names
:
eui_cu_file
=
g
(
j
(
modsave_path
,
eui_cu_file_name
+
"
*
"
))[
0
]
eui_cu_file
=
g
(
j
(
modsave_path
,
eui_cu_file_name
+
"
*
"
))[
0
]
orig_eui_file
=
g
(
j
(
eui_path
,
"
*
"
,
eui_cu_file_name
))[
0
]
orig_eui_file
=
g
(
j
(
eui_path
,
"
*
"
,
eui_cu_file_name
))[
0
]
shutil
.
move
(
orig_eui_file
,
orig_eui_file
+
"
.orig
"
)
shutil
.
move
(
orig_eui_file
,
orig_eui_file
+
"
.orig
"
)
shutil
.
copyfile
(
eui_cu_file
,
orig_eui_file
)
shutil
.
copyfile
(
eui_cu_file
,
orig_eui_file
)
subprocess
.
run
([
szip
,
'
a
'
,
modded_eui_zip
_name
,
eui_path
],
stdout
=
null
,
stderr
=
null
)
subprocess
.
run
([
szip
,
'
a
'
,
modded_eui_zip
,
eui_path
],
stdout
=
null
,
stderr
=
null
)
else
:
else
:
#Unzip EUI
#Unzip EUI
print
(
"
Unzipping EUI...
"
)
print
(
"
Unzipping EUI...
"
)
...
...
This diff is collapsed.
Click to expand it.
EUI_Converter/EUI_Converter.sln
+
1
−
0
View file @
5b9e00b7
...
@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
...
@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
ProjectSection(SolutionItems) = preProject
..\.gitattributes = ..\.gitattributes
..\.gitattributes = ..\.gitattributes
..\.gitignore = ..\.gitignore
..\.gitignore = ..\.gitignore
..\Readme.md = ..\Readme.md
EndProjectSection
EndProjectSection
EndProject
EndProject
Global
Global
...
...
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
+
14
−
0
View file @
5b9e00b7
# EUI Converter
A script for Civilization 5 to add colored unlocked citizens (CUC) to EUI and EUI to MPMPM modpacks.
The following things are assumed when running the script without changes:
*
Having
[
7-zip
](
https://www.7-zip.org/
)
installed in the standard programs directory.
*
Every pack being saved as a .7z or .rar archive.
*
This folder structure:
*
*
steamapps
\c
ommon
\S
id Meier's Civilization V
\A
ssets
\D
LC
\*
EUI-Modpacks and EUI with CUC
*
*
zzz_Modsaves
\*
Edited files
*
*
EUI_Converter
\*
Script and project files
*
*
zz_Vanilla_Versions
\*
Vanilla Modpacks and EUI
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment