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
1ce3defb
Commit
1ce3defb
authored
3 years ago
by
Rsge
Browse files
Options
Downloads
Patches
Plain Diff
Fixed formatting error in Readme & changed script formatting a bit
parent
7a067fff
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
EUI_Modpack_Converter/converter.py
+7
-12
7 additions, 12 deletions
EUI_Modpack_Converter/converter.py
README.md
+2
-2
2 additions, 2 deletions
README.md
with
9 additions
and
14 deletions
EUI_Modpack_Converter/converter.py
+
7
−
12
View file @
1ce3defb
#######################################################
# #
# © 2022 - MPL 2.0 - Rsge - v2.0.
0
#
# © 2022 - MPL 2.0 - Rsge - v2.0.
1
#
# https://github.com/Rsge/Civ-V-EUI-Modpack-Converter #
# #
# WINDOWS ONLY! #
...
...
@@ -136,6 +136,7 @@ if os.path.isdir(modpack_path):
if
os
.
path
.
isdir
(
eui_folder_path
):
shutil
.
rmtree
(
eui_folder_path
)
# Compile EUI with colored unlocked citizens
if
not
os
.
path
.
isfile
(
modded_eui_zip_path
):
print
(
"
Creating colored unlocked citizens EUI...
"
)
...
...
@@ -175,22 +176,20 @@ for file in globbed:
for
mod_file
in
g
(
mod_files
,
recursive
=
True
):
mod_file_name
=
get_file_name
(
mod_file
)
mod_file_folder
=
os
.
sep
.
join
(
mod_file
.
split
(
os
.
sep
)[
-
3
:
-
1
])
# IGE UI compat file
if
mod_file_name
==
ige_compat_file_name
:
print
(
"
Providing IGE-EUI-compat...
"
)
shutil
.
move
(
mod_file
,
mod_file
+
"
.orig
"
)
shutil
.
copyfile
(
g
(
j
(
modsave_path
,
ige_compat_file_name
+
"
*
"
))[
0
],
mod_file
)
# Find out if modcompat unit panel needed
elif
mod_file_name
in
unit_panel_modcompat_file_names
:
print
(
"
UnitPanel modcompat need detected...
"
)
unit_panel_modcompat_needed
=
True
# Delete UI overwrite duplicates
if
mod_file_name
in
vanilla_ui_files
:
el
if
mod_file_name
in
vanilla_ui_files
:
print
(
"
Removing overwriting file {}...
"
.
format
(
j
(
mod_file_folder
,
mod_file_name
)))
os
.
remove
(
mod_file
)
# Find out if modcompat unit panel needed
if
mod_file_name
in
unit_panel_modcompat_file_names
:
print
(
"
UnitPanel modcompat need detected...
"
)
unit_panel_modcompat_needed
=
True
# Delete useless desktop.ini (Thanks True...)
ini_files
=
re
.
sub
(
r
"
\.\w+$
"
,
"
.ini
"
,
mod_files
)
...
...
@@ -205,12 +204,9 @@ for ini_file in g(ini_files, recursive = True):
for
ui_file
in
g
(
ui_files
):
ui_file_name
=
get_file_name
(
ui_file
)
print
(
"
Getting tags from
"
+
ui_file_name
+
"
...
"
)
load_tags
[
ui_file_name
]
=
[]
with
open
(
ui_file
,
'
r
'
)
as
file
:
lines
=
file
.
readlines
()
for
line
in
lines
:
if
line
.
startswith
(
load_tag
):
load_tags
[
ui_file_name
].
append
(
line
)
...
...
@@ -218,7 +214,6 @@ for ui_file in g(ui_files):
# Insert stuff into EUI files
for
eui_file
in
g
(
eui_files
):
eui_file_name
=
get_file_name
(
eui_file
)
# Base UI files
if
eui_file_name
in
load_tags
.
keys
():
print
(
"
Writing tags to
"
+
eui_file_name
+
"
...
"
)
...
...
This diff is collapsed.
Click to expand it.
README.md
+
2
−
2
View file @
1ce3defb
...
...
@@ -3,12 +3,12 @@ A script for Civilization V to add Colored Unlocked Citizens (CUC) to Enhanced U
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.
*
Per default t
he following folder structure:
*
T
he following folder structure:
*
_steamapps
\c
ommon
\S
id Meier's Civilization V
\A
ssets
\D
LC
\\
_
\
EUI-Modpacks and EUI with CUC
*
_zz_Vanilla_Versions
\\
_
\
Vanilla Modpacks and EUI
*
This project's folder somewhere
\\
_
\
*
This project's folder somewhere
\\
\
Edited files
*
_EUI_Modpack_Converter
\\
_
\
Script and project files
...
...
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