• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

unmerged(13933)

General
Jan 20, 2003
1.795
3
www.student.oulu.fi
I mean the leader name modification which let you sort leaders according to their traits. I know there was one here sometimeago but I cant find it now.
 
Dec 7, 2003
584
0
Visit site
Icer said:
I mean the leader name modification which let you sort leaders according to their traits. I know there was one here sometimeago but I cant find it now.
A mod?
Mmm. Do you mean like inside the game? Or do you mean like tools outside the game? If you just need something to sort leaders there are at least two tools that I know of, one being used and made by myself and one used and made by Mithel. The tools are different in several ways.

To make a long story sort; if you have Microsoft Excel you may consider my own Excel-based tool. My tool is not an editor but only scripts for more or less advanced sorting, searching and analyzing of the leader files.
I still use it and find it extremely handy within its scope.
If you know some Basic programming in general or more specifically VBA/Excel programming you could enhance it very much.

Take a look at, to start with, the three initial post in this thread:
http://forum.paradoxplaza.com/forum/showthread.php?t=127421
 

unmerged(13933)

General
Jan 20, 2003
1.795
3
www.student.oulu.fi
Well I recall someone modified the leader files so that every leader had their traits listed in their name. Like Rommel would be listed as tr,lo,pa Rommel or something like that.

So when one would sort leaders according to their name it would actually sort all leaders according to their trait.

That way it worked ingame.
 

jdrou

Field Marshal
74 Badges
Jun 10, 2002
24.161
461
  • Stellaris: Federations
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Paradox Order
  • Stellaris: Digital Anniversary Edition
  • Humble Paradox Bundle
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: El Dorado
  • Europa Universalis III: Collection
  • Europa Universalis III: Chronicles
  • 500k Club
  • 200k Club
  • Europa Universalis IV: Dharma Pre-order
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Stellaris: Megacorp
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Deus Vult
  • Darkest Hour
  • Crusader Kings II
  • Hearts of Iron II: Armageddon
  • Arsenal of Democracy
  • Hearts of Iron Anthology
  • Victoria 2
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
Warlimont was modifying the leader files by adding the traits to the names. I don't think he has updated them since the picture packs came out. (I have a bash shell script that I use to apply this to my leader files. I can post it if anyone wants to see it. I also have a link to a bash shell for Windows if you don't run Linux.)
 

unmerged(13933)

General
Jan 20, 2003
1.795
3
www.student.oulu.fi
Allright! Jdrou your solution is even better than directly modifying the leader files. Could you post it here or host is somewhere? :D

Edit: I got Gentoo running on my other pc. I've been thinking to remove windows from my other pc aswell. I'd only need "small" windows partition for games but I've been looking for other solutions too, like running hoi in linux with wine or something similar.

Well that's something to do for the summer...
 
Last edited:
Dec 7, 2003
584
0
Visit site
jdrou said:
Warlimont was modifying the leader files by adding the traits to the names. I don't think he has updated them since the picture packs came out. (I have a bash shell script that I use to apply this to my leader files. I can post it if anyone wants to see it. I also have a link to a bash shell for Windows if you don't run Linux.)
Aha, adding the traits to the names? A clever idea! But how dows it look on screen in the game? Can you post a pic here please?
 

jdrou

Field Marshal
74 Badges
Jun 10, 2002
24.161
461
  • Stellaris: Federations
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Paradox Order
  • Stellaris: Digital Anniversary Edition
  • Humble Paradox Bundle
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: El Dorado
  • Europa Universalis III: Collection
  • Europa Universalis III: Chronicles
  • 500k Club
  • 200k Club
  • Europa Universalis IV: Dharma Pre-order
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Stellaris: Megacorp
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Deus Vult
  • Darkest Hour
  • Crusader Kings II
  • Hearts of Iron II: Armageddon
  • Arsenal of Democracy
  • Hearts of Iron Anthology
  • Victoria 2
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
In the case of my script the names just have the traits added in front of them so they can be sorted by trait:
Code:
(FB OD LW)von Falkenhausen
Chinese leader with Fortress Buster, Offensive Doctrine, & Logistics Wizard
 

unmerged(13933)

General
Jan 20, 2003
1.795
3
www.student.oulu.fi
Even if it's only for linux I can use it if you could just post it somewhere.
 

jdrou

Field Marshal
74 Badges
Jun 10, 2002
24.161
461
  • Stellaris: Federations
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Paradox Order
  • Stellaris: Digital Anniversary Edition
  • Humble Paradox Bundle
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: El Dorado
  • Europa Universalis III: Collection
  • Europa Universalis III: Chronicles
  • 500k Club
  • 200k Club
  • Europa Universalis IV: Dharma Pre-order
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Stellaris: Megacorp
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Deus Vult
  • Darkest Hour
  • Crusader Kings II
  • Hearts of Iron II: Armageddon
  • Arsenal of Democracy
  • Hearts of Iron Anthology
  • Victoria 2
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
bash script leader name mod

It's not pretty but it works.
Code:
#bash script
# Extract numerical traits from leader record and add text traits to name field

trait[0]=LW
trait[1]=DD
trait[2]=OD
trait[3]=WS
trait[4]=TR
trait[5]=EN
trait[6]=FB
trait[7]=PL
trait[8]=CO
trait[9]=OG
trait[10]=SW
trait[11]=BR
trait[12]=ST
trait[13]=SP
trait[14]=TB
trait[15]=CB
trait[16]=NF
trait[17]=FD

typeset -i traits
typeset -i trait_added
typeset -i n
typeset -i t

input_file=${1}

if [ -f ${input_file}.tmp ]
then
    rm ${input_file}.tmp
fi

while read input_record
do
    field5=`echo ${input_record} | cut -d';' -f5`
    case $field5 in
        Traits|TRAITS)
            traits_text="(Traits) ";;
        0)
            traits_text="(N) ";;
        *)
            traits=$field5
            traits_text="("
            trait_added=0
            n=17
            while [ $n -ge 0 ]
            do
                t=2**n
                if [ $traits -ge $t ]
                then
                    if [ $trait_added -eq 1 ]
                    then
                        traits_text="${traits_text} "
                    fi
                    traits=$traits-$t
                    traits_text="${traits_text}${trait[n]}"
                    trait_added=1
                fi
                n=$((n-1))
            done
            traits_text="${traits_text}) ";;
    esac
    echo "${traits_text}${input_record}" >> ${input_file}.tmp
done < ${input_file}
mv ${input_file} ${input_file}.bak
mv ${input_file}.tmp ${input_file}
bash shell for Windows/DOS (compiled with DJGPP): http://www.delorie.com/pub/djgpp/current/v2gnu/bsh204b.zip
 
Dec 7, 2003
584
0
Visit site
jdrou said:
It's not pretty but it works.
Code:
#bash script
# Extract numerical traits from leader record and add text traits to name field
.
.

[/QUOTE]
Anything that works is good.

Would it be okay with you if I translated this to vbscript and/or vba for personal use and then potential forum posting/publishing? 
I will fully credit you in the post+code. I would trust your judgement about it would be proper to also credit Warlimont in some way.

As for the MS scripting... I hope you will not think blasphemy would be involved  ;)  
Just to smooth the path: I [I]have [/I] played around with a number of diffrent systems, SCO Unix and Linux (an old Redhat) included, but it was a long time ago and even if I have some basic knowledge left, I have scrapped the installations and don't do anything new. Point is I am not a MS fanatic, even when putting some focus on some of their stuff.
So, will that do to smoothen the path?  :D
 

jdrou

Field Marshal
74 Badges
Jun 10, 2002
24.161
461
  • Stellaris: Federations
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Paradox Order
  • Stellaris: Digital Anniversary Edition
  • Humble Paradox Bundle
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: El Dorado
  • Europa Universalis III: Collection
  • Europa Universalis III: Chronicles
  • 500k Club
  • 200k Club
  • Europa Universalis IV: Dharma Pre-order
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Stellaris: Megacorp
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Deus Vult
  • Darkest Hour
  • Crusader Kings II
  • Hearts of Iron II: Armageddon
  • Arsenal of Democracy
  • Hearts of Iron Anthology
  • Victoria 2
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
MostlyHarmless said:
Anything that works is good.

Would it be okay with you if I translated this to vbscript and/or vba for personal use and then potential forum posting/publishing?
I will fully credit you in the post+code. I would trust your judgement about it would be proper to also credit Warlimont in some way.

As for the MS scripting... I hope you will not think blasphemy would be involved ;)
Just to smooth the path: I have played around with a number of diffrent systems, SCO Unix and Linux (an old Redhat) included, but it was a long time ago and even if I have some basic knowledge left, I have scrapped the installations and don't do anything new. Point is I am not a MS fanatic, even when putting some focus on some of their stuff.
So, will that do to smoothen the path? :D
Feel free to translate and post. If you want to make a compiled binary and post with source code that would be fine too. I was hoping someone would do a Perl translation; I've been trying to translate it myself but haven't had time to learn enough Perl yet. The only thing I got from Warlimont was the idea to write the script after seeing his mod posted; I asked him if he used a program/script and he said he did it manually.
 
Dec 7, 2003
584
0
Visit site
jdrou said:
Feel free to translate and post. If you want to make a compiled binary and post with source code that would be fine too. I was hoping someone would do a Perl translation; I've been trying to translate it myself but haven't had time to learn enough Perl yet. The only thing I got from Warlimont was the idea to write the script after seeing his mod posted; I asked him if he used a program/script and he said he did it manually.
Ok, thx for the input.
 

Kanitatlan

Field Marshal
84 Badges
Mar 13, 2003
8.702
1.212
Visit site
  • Crusader Kings II: Horse Lords
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • 200k Club
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Hearts of Iron II: Beta
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Rome Gold
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Divine Wind
  • Arsenal of Democracy
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
Try the program in the link from my signature. It does lots of things but if you go to the leaders tab (after loading the hoi files) it gives you the opportunity to update all the names for a country and save the result. I use it all the time to update leader names in all the Mods I play.

To use the program you need to set up all the relevant directories and click the load button. Then you can go to the leader tab, select a country in the combobox and it will show the leaders for that country. Click the "trait names" button and all the names will update. Then use the save button and you can save back the modified file. The works for all Mods. The trait names processing will remove any previous trait name prefixes and substitute based on leaders actual current traits.

This is just about the only part of the program that currently permits you to change things but do have a look at the rest of it as it provides lots of interesting information.
 

jdrou

Field Marshal
74 Badges
Jun 10, 2002
24.161
461
  • Stellaris: Federations
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Paradox Order
  • Stellaris: Digital Anniversary Edition
  • Humble Paradox Bundle
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: El Dorado
  • Europa Universalis III: Collection
  • Europa Universalis III: Chronicles
  • 500k Club
  • 200k Club
  • Europa Universalis IV: Dharma Pre-order
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Stellaris: Megacorp
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Deus Vult
  • Darkest Hour
  • Crusader Kings II
  • Hearts of Iron II: Armageddon
  • Arsenal of Democracy
  • Hearts of Iron Anthology
  • Victoria 2
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
Excellent. Should probably be a standard feature of a leader editor.
 

Lothos

HoI3 SF LUA Developer
180 Badges
Dec 16, 2002
10.741
29
  • Impire
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Galactic Assault
  • Gettysburg
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III Complete
  • Iron Cross
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Legio
  • Leviathan: Warships
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sunset Invasion
  • Ancient Space
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • A Game of Dwarves
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • Dungeonland
  • East India Company
  • East India Company Collection
  • Europa Universalis III
  • Europa Universalis III: Chronicles
Super AI Bundle has put the leader traits in their names alreayd. We did this in January sometime. The leader files are the same as pic pack 0411 so you can just use the ones from our mod.
 
Dec 7, 2003
584
0
Visit site
Haha, I did a complete direct translation of that bash code today and seem to get the resulting leader files alright, but when I try those I get database mismatch...

Considering what is available I doubt that a basic script would be of interest anyway. Not that I mind, it was a small but nice exercise! That cut command was very handy by the way.
 

jdrou

Field Marshal
74 Badges
Jun 10, 2002
24.161
461
  • Stellaris: Federations
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Paradox Order
  • Stellaris: Digital Anniversary Edition
  • Humble Paradox Bundle
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: El Dorado
  • Europa Universalis III: Collection
  • Europa Universalis III: Chronicles
  • 500k Club
  • 200k Club
  • Europa Universalis IV: Dharma Pre-order
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Stellaris: Megacorp
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Deus Vult
  • Darkest Hour
  • Crusader Kings II
  • Hearts of Iron II: Armageddon
  • Arsenal of Democracy
  • Hearts of Iron Anthology
  • Victoria 2
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
MostlyHarmless said:
That cut command was very handy by the way.
Forgot about that.:eek:o Did you run it in Linux or get the cut command from the same location I linked to for the bash shell for Windows?
 
Dec 7, 2003
584
0
Visit site
jdrou said:
Forgot about that.:eek:o Did you run it in Linux or get the cut command from the same location I linked to for the bash shell for Windows?
I didn't run it in Linux. I don't think I have Linux installed anymore.
Anyway, I am rusty with these things...