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

HMS Enterprize

On loan to the C.S Navy
26 Badges
Jun 21, 2004
4.981
222
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron II: Armageddon
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • 500k Club
  • Victoria 2
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • Iron Cross
  • Europa Universalis III Complete
  • Hearts of Iron III
  • Europa Universalis III Complete
  • Darkest Hour
Hi all,

Ive created 2 custom factions for my mod (Terrans & Vulcans). When playing as Terrans I want the Vulcans to spawn near the Terrans.

Ive managed to create a custom Vulcan solar system as per the code below and it shows up in the game. Great. One problem solved. Although using the code below, the planet spawns as continental not arid - which I have no explanation for.

However, my remaining problem is I tried some code (not shown) to get the Vulcan species to spawn in that system which did not work. Can someone help with what code I need to make the Vulcans actually spawn in the Vulcan system near the Terrans please? I presume this may be a flags issue as well?



# Vulcans
vulcan_homeworld = {
name = "40 Eridani"
class = "sc_trinary_1"
usage = custom_empire
flags = { vulcan_homeworld }
max_instances = 1
asteroid_belt = { type = rocky_asteroid_belt radius = 130 }

#Stars
planet = { name = "40 Eridani A" class = pc_k_star orbit_distance = 0 orbit_angle = 1 size = 30 has_ring = no }
planet = { name = "40 Eridani B" class = pc_g_star orbit_distance = 60 orbit_angle = 90 size = 30 has_ring = no }
planet = { name = "40 Eridani C" class = pc_m_star orbit_distance = 20 orbit_angle = 20 size = 10 has_ring = no }


#Planets

planet = {
name = "Vulcan"
class = "pc_arid"
orbit_distance = 30
orbit_angle = -150
size = { min = 22 max = 25 }
starting_planet = yes
has_ring = no
modifiers = none
flags = { planet_vulcan }
init_effect = {
prevent_anomaly = yes
clear_deposits = yes
set_name = "Vulcan"
}
}



I have added the following code to the sol_system initialisers file:

neighbor_system = {
hyperlane_jumps = { min = 2 max = @jumps }
initializer = "vulcan_homeworld"
}
 
I am assuming you want the Vulcans to be their own empire?

Try this.

Code:
    planet = {
        count = 1
        name ="Vulcan"
        home_planet = yes
        class = ideal_planet_class
        orbit_distance = 14
        orbit_angle = { min = 90 max = 270 }
        size = 21
        deposit_blockers = none
        modifiers = none
        has_ring = no        

        init_effect = {
            prevent_anomaly = yes
        }

        init_effect = {
            generate_empire_home_planet = yes
        }
 
I am assuming you want the Vulcans to be their own empire?

Try this.

Code:
    planet = {
        count = 1
        name ="Vulcan"
        home_planet = yes
        class = ideal_planet_class
        orbit_distance = 14
        orbit_angle = { min = 90 max = 270 }
        size = 21
        deposit_blockers = none
        modifiers = none
        has_ring = no       

        init_effect = {
            prevent_anomaly = yes
        }

        init_effect = {
            generate_empire_home_planet = yes
        }


Thank you for the reply. I made the additions as you suggested below but still the system is showing up but no Vulcans. Still also showing as continental rather than arid.

Ive set initializer = "vulcan_homeworld" in the prescripted file for the vulcans in the prescripted_countries folder.



planet = {
count = 1
name = "Vulcan"
home_planet = yes
class = ideal_planet_class
#class = "pc_arid"
orbit_distance = 30
orbit_angle = -150
size = { min = 22 max = 25 }
starting_planet = yes
has_ring = no
deposit_blockers = none
modifiers = none
flags = { planet_vulcan }

init_effect = {
prevent_anomaly = yes
clear_deposits = yes
set_name = "Vulcan"
}

init_effect = {
generate_empire_home_planet = yes
}
}
 
Did you make sure that the Vulcan empire you made is set to force spawn and that their planet preference is set to arid?

Edit: Don't set it as pre-scripted. If you want them to show up make them as a custom empire and force spawn them (make sure the icon at the lower right corner is orange).
 
Did you make sure that the Vulcan empire you made is set to force spawn and that their planet preference is set to arid?

Edit: Don't set it as pre-scripted. If you want them to show up make them as a custom empire and force spawn them (make sure the icon at the lower right corner is orange).
I’ll give that a try.
 
Did you make sure that the Vulcan empire you made is set to force spawn and that their planet preference is set to arid?

Edit: Don't set it as pre-scripted. If you want them to show up make them as a custom empire and force spawn them (make sure the icon at the lower right corner is orange).
I tried the custom empire approach and still did not work. The system still spawns (but as continental) but no Vulcans.

Couple of points to note:
If you play as the Vulcans then the planet spawns as arid.
When I edited the Vulcans, i noted on the planet edit options it was saying 'vulcan_homeworld_name' & 'vulcan_homeworld_desc' rather than 'Vulcan'. Is this a localisation issue?

When playing as Terrans, is trying to spawn the vuclcans 2 jumps away too close? Could that be part of the problem?
 
When I edited the Vulcans, i noted on the planet edit options it was saying 'vulcan_homeworld_name' & 'vulcan_homeworld_desc' rather than 'Vulcan'. Is this a localisation issue?
Yes, it's localization.

vulcan_homeworld_name:0 "Vulcan"
vulcan_homeworld_desc:0 "your description here"

When playing as Terrans, is trying to spawn the vuclcans 2 jumps away too close? Could that be part of the problem?
Possible, but unlikely since the Hegemony and Common Ground origins spawn the relevant empires as neighbors.

Sorry I can't be of additional help. You'll have to go through your code to make sure there are no conflicts or omission to be sure.
 
Never tried, but I'm pretty sure you cannot force spawn one prescripted empire in the initialization process of another empire.
You'd likely have to spawn that empire in manually, as an additional empire that is not part of the normal galaxy creation process.

For some hints at how to do that, you can have a look at how the Prikkiki-Ti are spawned in by the game for example.
The event where that's scripted is in distant_stars_events_2.txt, distar.2033.

So the general idea would be that you have an initializer that has the vulcan system with an empty vulcan planet, and some planet_flag to identify it later. Then, you'll need an event that after the game start loops through all planets looking for the Vulcan planet, and on that planet you'll have to run the script to spawn the actual Vulcans.

It'd maybe also be possible to script the Vulcans to spawn directly within the initializer, but doing so in an external script is probably easier.
 
Never tried, but I'm pretty sure you cannot force spawn one prescripted empire in the initialization process of another empire.
You'd likely have to spawn that empire in manually, as an additional empire that is not part of the normal galaxy creation process.

Ive set the Vulcans to always spawn in the game, its only where they spawn that Im trying to force.

Nevertheless, thank you for the suggestions - I will give that a try and see what happens.

The solar system layout for the Vulcan system is the same if you play as either the Terrans or the Vulcans. However, if you play as Terrans, the empty vulcan system still generates a continental world, yet if you play as the Vulcans, the home system correctly generates an arid world. Confused....
 
Ive set the Vulcans to always spawn in the game, its only where they spawn that Im trying to force.
That's why I am saying that as far as I know, you cannot force an empire to spawn at a specific position that's defined in the spawning process of another empire.

If you set an empire to force spawn, it will just spawn somewhere in the galaxy, with its own initializer placed randomly.

So unless I'm wrong on this, you cannot use force spawning as the method to achieve what you're trying to achieve.
 
Yep.

Not sure why I didn't think about that earlier, but the Common Ground/Hegemony Origins do exactly that, in the event origin.55. That's probably a much simpler example to replicate than the Prikkiki-Ti one I named above.
 
Yep.

Not sure why I didn't think about that earlier, but the Common Ground/Hegemony Origins do exactly that, in the event origin.55. That's probably a much simpler example to replicate than the Prikkiki-Ti one I named above.
The Star Trek mod has races spawn near each other. But they have a static map - not sure if that is a factor perhaps?

Bit I will check out the origins you mentioned & see if there is anything there that could help.

Many thanks for your input .