• 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.

AlexanderBoesen

Second Lieutenant
103 Badges
Apr 26, 2013
102
224
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome Sign Up
  • Crusader Kings III
  • Europa Universalis IV
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Surviving Mars: Digital Deluxe Edition
  • Surviving Mars: First Colony Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Victoria 3 Sign Up
  • Crusader Kings II
  • Victoria 2
  • Sengoku
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • March of the Eagles
  • Magicka
  • Knights of Pen and Paper +1 Edition
  • Hearts of Iron III
  • Ship Simulator Extremes
  • Teleglitch: Die More Edition
  • War of the Roses
  • Cities: Skylines
  • Mount & Blade: Warband
  • Humble Paradox Bundle
Hello!

I'm wondering how racial identities work exactly. I know that both Terran and Deneb humans identify as the same species but how does it work?

My problem is that I'm working on a mod where I'd like all the empires that are generated upon empire_init to use "prescripted" races (Like, I define let's say 6 races and every generated empire would have one of these 6 races as their primary species. Furthermore, some empires would have the same species like with humans from Terra and Deneb). The problem is that I could of course force the game to spawn only prescripted empires but that is only something I wish to do if there's no other solution as I like the idea of randomly generated empires.

Hope someone understands what I'm trying to say :)
 
Terran and Deneb work by spawning not as galaxy generation, but as events. For instance, if you play the Imperium, if Sol hasn't spawned as part of galaxy generation, a new system is created with the United Nations, and pops that simply copy the species id of the Deneb humans.
You could write an event to copy this fairly easily, just look at how the event game_start.1 in events/game_start.txt does it.
 
Thanks, I will look into that!

Does this effectively mean that you could, let's say replace Deneb humans with something different alltogether and the same species would spawn on Earth?
 
Thanks, I will look into that!

Does this effectively mean that you could, let's say replace Deneb humans with something different alltogether and the same species would spawn on Earth?
As long as the empire still has the human_2 flag in the user_empire_design file, it should, yes. I don't have the game available to test right now, unfortunately. If you try it, just edit the Imperium in the game, and then check the predesigned_empires file to make sure human_2 and special_start_message flags are separate, there seems to be a bug that puts them together.
 
Last edited:
Okay, I looked into the files and it seems that humans are generated in "special_system_initializers" when initializing Sol system. It is still sort of unclear to me how the system works though. In initialization humans are created normally, but I understood that if unplayed, Sol is initialized only AFTER events of game_start. If the Deneb humans are generated BEFORE initialization of Sol how come the initialization doesn't overwrite the changes? And still I find it difficult to understand identities, is it just the flag that does it? How does it work exactly? Sorry if I'm being thick :V

Also, I'm wondering what kind of scope works for "species" that is found under create_country in special_system_initializers. It is set as "last_created" by default. Can I refer to other species as well? With their name perhaps? Could I just create a species in game_start and then use them for all empire_initializers?
 
Humans may also be generated in special_system_initializers. This creates a Sol, which either has primitive humans or cockroaches. If you play as an empire with the human_2 flag, what happens is at game start, an event is triggered. It checks if the system Sol exists. If it doesn't, it then creates a Sol inhabited by a space faring country of the same species that has the human_2 flag. So basically, if humans aren't spawned by special_system_initializers, Sol is spawned with the same species as Deneb has. Note that your empire needs to have the human_2 flag, so not just the Deneb spawn, but also a special flag in the user_empire_design file.

As far as I know there is no way to scope to a certain species using their name. What special_system_initializers does is create a new species of humans at the very start, which is then referred to as last_created. So what I would do in your situation is start a game with just the main empires for your six species, set them to always spawn, and then write events to spawn in the additional empires that share a species. To achieve this, each empire would need a unique system initializer, to give their starting planet a "is_important_species_home" flag for the events to check by, the way game_start.1 checks for "has_star_flag = sol".
 
Okay I think I'm starting to understand the mechanics of Deneb/Sol spawn. This still leaves me to wonder how the game generates the empires, it seems to be nowhere in the files (hardcoded or maybe I'm just blind). I looked trough all initializers and it seems every other type of nation (fallens, pre-ftl and such) are generated with their systems and pops trough initializers, I am just wondering why is this not the case with normal empires? For now it does seem that I should go with the solution you proposed, but it comes with it's own problems. I should at least be able to tell the event how many empires should be generated, referring to setup settings (I presume thi is not impossible at all, I just haven't had the time to look into it yet.) With a quick look the fallen empire init didn't seem to refer to setup settings in any way so the spawned number of them is handled somewhere else. Another thing is that the player will be forced to play only pre-defined races because making a custom one would create a species outside of the pre-defined ones.

Thanks for the help so far though!