Minor Faction Generator

Hey all,

I have created a random generator for Minor Factions which generates the XML needed to be added to your own FactionsDefs.

Simple enter the number of factions you want to generate (1-99) and it will randomly generate the follow:

  • Random Name
  • Unique InternalName (format minorFactionxxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where x is random character)
  • Random LeaderName
  • Random selected PersonalityTraits (50% chance for any trait)
  • Random selected RaceTraits (50% chance for any trait though only 1 of each type)
  • Random selected StarSystem
  • Random HomePlanetName
  • Random starting ships (0-3 of each: ColonyStaticBlueprint, SurveyStaticBlueprint, ScoutStaticBlueprint. PirateStarterSniperStaticBlueprint)
  • Random selected TechTree
  • Random ShipCallsign
  • Unique LeaderImageFG 
  • Unique LogoImage
  • Random starting gold 4000-10000
  • Random StartingColonyPopulation 4-14
  • Random values for AICategoryWeight

It is designed to be used with my MinorFactionImage file up on Nexusmods.com or a local copy on my website.

Each time you load the page it will re-randomly generate the values, though using a common set of Logos/Forground images.

I have created a simple tutorial Video on how to use the generator and create a quick mod for adding minor Factions.

 

Note #1: Because it generates things randomly these minor factions can/will vary in power. They could have up to 12 starting ships or none, 4 population or 14, 4-10k gold and upto every PersonalTrait category and RaceTrait Category, though only one level from each (or none of each).

Note #2: Each has a unique (or should be) internalName, so you can run the page multiple times to generate 300, though the images/logos will be the same across the "run sets".

Note #3: If you don't like my images for minor factions you can just copy/create your own. Generator uses image naming pattern "minor/minorFactionXXFG.png" (where XX is zero prefixed number).

Enjoy

 EDIT: Had a minor glitch on RaceTraits - fixed now.

EDIT: Just added the ability to change/customize the starting ship set. Button to load all blueprints from ShipBlueprintDefs.xml (change at your own risk).

EDIT: It does seem to crash the  client once in a while on new game, so need to fix something, but hard to find without logging from GCIII. Beleive I fixed the issue - added bad color schemas. If anyone else experiences a crash on the game, please send me minor factions and I will try to parse through it.

15,574 views 11 replies
Reply #1 Top

Nice work! Will have to give this a try.

Reply #2 Top

Thanks!

The code is fairly simply, what would be cool is if there was a feature (routine) in the game that did this on the fly each time you ran the game. You would just need a base set of images/logos to work from.

Reply #3 Top

Added a text box, so you can customize the default set of Ship blue prints.

Also has an option to load all available Blueprints from game, then you can delete/change the ones you want used.

 

Nothing like seeing a minor faction with a ton of starting ships... lol

Reply #4 Top

This is great.  I added 20 minors with only a little problem figuring out what my silly mistake was.

I did find two problems.  First, the zip files of the images from both locations are missing minorFaction**FG.png files where ** is 05, 06, 07, 08 and 09.  If these are used, there is no image of the race in conversations.  I had several of these missing images in some quick test games.  Second, I found that the zip files are also missing minorFaction09.png from the logos.  If this is used, a generic logo appears.  I found this in a test game.

I started several quick games to check things out and used the console to clear the FOW.  That is how I found these problems.  In one of them I also found what the variations in ships can do.  I found a minor that already settled two other planets, so that part definitely works.

Again, this is great.  I just hope I don't get carried away generating many, many minors to check out all the possible variations.

Reply #5 Top

Yeah, I have 200 minor factions.

Yep - on the missing files.

I will create the new missing files and repost. 

 

Glad you like it!

 

 

Reply #6 Top

Ok,

I have added the missing Minor Leader images and logo.

I have also added an additional minor leader foregrounds so from 1-99 they are all unique.

I have also resaved a few of the images, which had "dark" scan lines, I had two different sources files so cleaned them up to the lighter version.

 Modified the generator script to include new leader foregrounds.

I will be making a video on how to use it later today.

Reply #7 Top

Added a quick Tutorial Video on how to create a minor faction mod using my generator.

Reply #8 Top

Excellent mod! I wonder if it's possible, and this is perhaps stretching it a bit, but randomize descriptions. By structuring sentences it would be possible to randomize the text into something different for each. It would perhaps be a bit goofy, but that's the charm!

Edit: As I was updating it for the new images, I kept running into this problem when booting up the game:

C:\Users\User\Documents\My Games\GalCiv3\Mods\Minors\Game\FactionDefs_New.xml(1606,12): error:
invalid byte 't' at position 2 of a 4-byte sequence

In english, what does that mean?

Edit: I got it to work after a few tries. It seems to be a rogue letter somewhere, but I fine combed it for an hour so I don't know what it was. In the end I just redid everything and it worked.

Reply #9 Top

Cool.

Yes I could generate a random description for both Leader and Faction, I have some random generators I have created for making sentences, though I guess I would need/like some input of a few, and I can likely go from there.

 

Reply #10 Top

Quoting Syrkres, reply 6

I have added the missing Minor Leader images and logo.
I have also added an additional minor leader foregrounds so from 1-99 they are all unique.
I have also resaved a few of the images, which had "dark" scan lines, I had two different sources files so cleaned them up to the lighter version.
 Modified the generator script to include new leader foregrounds.
 

I had a number of new comments to make, but your changes have eliminated most of them.  I'm still not finding the minorFaction09.png in the logos directory in you zip files.

The main comment concerns the blueprints.  In a earlier version of your generator, when I clicked on Load All BluePrints, it loaded in all the blueprints.  When I do that in the current version, it doesn't load in any, and the three already in the list are deleted.  When I generate factions after this, they don't have any ships.

Reply #11 Top

Ok, I can check into that. I was trying to see "how flexible" changing the startingships was/is, and I was not seeing certain ships when generated.

 

I believe the problem is that unless you have the proper tech tree I am not sure it can load a ship from a different tech for starting ships. I am thinking of disabling it. Reloading the page will re-load the default starting ships. Also if you want more of a particular ship you can just add another entry for it. 

The minorFaction09.png logo was missed, I just added it to the zip files,  here is stand alone file minorFaction09.png so you don't have to re-download the zip files, sorry about that.

 

Also - thanks for feedback.