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

Bad Syntax

Private
29 Badges
Apr 25, 2018
11
1
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Stellaris: Synthetic Dawn
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Sword of the Stars II
  • Sword of the Stars
  • Leviathan: Warships
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
So I'm trying to recreate the Battletech map, which in 3025 has about 2000 star systems. I've added a new map, which seems to render all the systems at the proper locations, using a new map\setup_scenario file and zeroing out the existing files.
static_galaxy_scenario = {
name = "Battletech_3025"
colonizable_planet_odds = 1.0
priority = 8
num_empires = { min = 16 max = 16 }
num_empire_default = 16
num_hyperlanes = { min = 0 max = 0 }
num_hyperlanes_default = 0
advanced_empire_default = 0
core_radius = 0

fallen_empire_default = 0
fallen_empire_max = 0
random_hyperlanes = no
system = { id = "11" name = "Acamar" position = { x = { min = -31.6344 max = -31.6344 } y= { min =30.852 max = 30.852 } } initializer = 0011_acamar }
<thousands of other lines>
system = { id = "2020" name = "Waypoint" position = { x = { min = 391.3416 max = 391.3416 } y= { min =-146.444 max = -146.444 } } initializer = 2020_waypoint }
}

Here is one of my pre-existing countries, though all are very similar without anything special:
"Federated Suns" = {
key="fs"
ship_prefix="FSS"
species={
class="HUM"
portrait="human"
name="Federated Suns"
plural="Federated Suns"
adjective="Federated Suns"
name_list="HUMAN1"
trait="trait_ingenious"
}
name="Federated Suns"
adjective="Federated Suns"
authority="auth_dictatorial"
government="gov_irenic_dictatorship"
planet_name="New Avalon"
planet_class="pc_continental"
system_name="New Avalon"
initializer=""
graphical_culture="humanoid_01"
city_graphical_culture="humanoid_01"
empire_flag={
icon={
category="01_Inner_Sphere"
file="f_fs1.dds"
}
background={
category="backgrounds"
file="00_solid.dds"
}
colors={
"fs"
"fs"
"null"
"null"
}
}
ruler={
gender=male
name="Hanse Davion"
portrait="human_male_04"
texture=0
hair=5
clothes=6
ruler_title="Prince"
ruler_title_female="Princess"
leader_class="ruler"
}
spawn_as_fallen=no
ignore_portrait_duplication=no
room="default_room"
spawn_enabled=always
ethic="ethic_fanatic_pacifist"
ethic="ethic_materialist"
civics={
"civic_diplomatic_corps"
"civic_efficient_bureaucracy"
}
origin="origin_default"
}

And then each system gets its own solar_system_initializer. I create these with a .net exe, so its easy to do for 2000+ systems. Eventually I'll have more to it, but right now I'm just trying to move forward.

Here is an example of a regular initalizer:
"Federated Suns" = {
key="fs"
ship_prefix="FSS"
species={
class="HUM"
portrait="human"
name="Federated Suns"
plural="Federated Suns"
adjective="Federated Suns"
name_list="HUMAN1"
trait="trait_ingenious"
}
name="Federated Suns"
adjective="Federated Suns"
authority="auth_dictatorial"
government="gov_irenic_dictatorship"
planet_name="New Avalon"
planet_class="pc_continental"
system_name="New Avalon"
initializer=""
graphical_culture="humanoid_01"
city_graphical_culture="humanoid_01"
empire_flag={
icon={
category="01_Inner_Sphere"
file="f_fs1.dds"
}
background={
category="backgrounds"
file="00_solid.dds"
}
colors={
"fs"
"fs"
"null"
"null"
}
}
ruler={
gender=male
name="Hanse Davion"
portrait="human_male_04"
texture=0
hair=5
clothes=6
ruler_title="Prince"
ruler_title_female="Princess"
leader_class="ruler"
}
spawn_as_fallen=no
ignore_portrait_duplication=no
room="default_room"
spawn_enabled=always
ethic="ethic_fanatic_pacifist"
ethic="ethic_materialist"
civics={
"civic_diplomatic_corps"
"civic_efficient_bureaucracy"
}
origin="origin_default"
}

And here is a capital system, for that previous faction
"1338_new_avalon" = {
name = "New Avalon"
class = "rl_standard_stars"
flags = { empire_home_system }
max_instances = 1
usage = custom_empire

planet = {
class = star
size = { min = 25 max = 30 }
orbit_distance = 0
orbit_angle = 1
}

planet = {
class = pc_arid
orbit_distance = 30
orbit_angle = { min = 90 max = 270 }
home_planet = yes

init_effect = {
prevent_anomaly = yes
generate_empire_home_planet = yes
set_deposit = d_null_deposit
generate_empty_system_resources = yes
}

change_orbit = 10

moon = {
count = { min = 0 max = 1 }
class = pc_molten
orbit_distance = 5
orbit_angle = { min = 90 max = 270 }
}
}
}

The issues I have are:
#1. The faction isn't spawning in its home/capital system. Not the selected empire, nor any other.
#2. While I have tried to define this before, never with any luck, I need these systems to have an owner specified. Almost all of the 2100 systems need to be owned at the start of the game, so each major faction can have 400-500 systems it should have on day 1.
#3. I also got rid of the non-human classes in the species_classes\00 and 01 files, but I still get all sorts of critters when the game starts. I need *ONLY* humans, as this universe has no aliens in it.

If I can get these things done, I think I can figure out the rest of the generation in getting all my systems unique. At that point I'll decide if I'll go all in and start changing game mechanics.

But I would think what I am trying to do would be easy, but it doesn't seem to be the case :(

Any help would be greatly appreciated!!!

I went ahead and attached the whole mod (WIP, clearly not very functional!), in case it helps anybody with troubleshooting.

Thanks,
Bad Syntax
 

Attachments

  • Battletech3025.zip
    3,9 MB · Views: 0
  • 1Love
Reactions:
If you want the game to assign a specific prescripted_country, you have to assign some spawn_weight to the system.

Code:
    system = {
        id = "240"
        position = {
            x = -272
            y = -30
        }
        spawn_weight = { base = 0 modifier = { add = 900000 has_country_flag = wrjak_flight } }
    }

And the empire itself needs have the custom flag:

Code:
    [...]
    spawn_enabled = always
    ignore_portrait_duplication = yes
    
    ship_prefix = ""
    
    flags = { wrjak_flight }
    
    species = {
    [...]

It should also have spawn_enabled = always, unless only having them spawn sometimes is the desired outcome.
 
Thanks! I tried that, and made my map lines like this:
Code:
system = { id = "11" name = "Acamar" position = { x = { min = -31.6344 max = -31.6344 } y= { min =30.852 max = 30.852 } } initializer = 0011_acamar spawn_weight = { base = 0 modifier = { add = 900000 has_country_flag = battletech_faction_cc } } }

And then made my factions like this::
Code:
"Federated Suns" = {
    key="fs"
    ship_prefix="FSS"
    ignore_portrait_duplication = yes
    ship_prefix = ""
    flags = { battletech_faction_fs }
    species={
        class="HUM"
        portrait="human"
        name="Federated Suns"
        plural="Federated Suns"
        adjective="Federated Suns"
        name_list="HUMAN1"
        trait="trait_ingenious"
    }
    name="Federated Suns"
    adjective="Federated Suns"
    authority="auth_dictatorial"
    government="gov_irenic_dictatorship"
    planet_name="New Avalon"
    planet_class="pc_continental"
    system_name="New Avalon"
    initializer=""
    graphical_culture="humanoid_01"
    city_graphical_culture="humanoid_01"
    empire_flag={
        icon={
            category="01_Inner_Sphere"
            file="f_fs1.dds"
        }
        background={
            category="backgrounds"
            file="00_solid.dds"
        }
        colors={
            "fs"
            "fs"
            "null"
            "null"
        }
    }
    ruler={
        gender=male
        name="Hanse Davion"
        portrait="human_male_04"
        texture=0
        hair=5
        clothes=6
        ruler_title="Prince"
        ruler_title_female="Princess"
        leader_class="ruler"
    }
    spawn_as_fallen=no
    ignore_portrait_duplication=no
    room="default_room"
    spawn_enabled=always
    ethic="ethic_fanatic_pacifist"
    ethic="ethic_materialist"
    civics={
        "civic_diplomatic_corps"
        "civic_efficient_bureaucracy"
    }
    origin="origin_default"
}

And now I see a few of the races on the map at start, but a few other races too. Also, the races do not start in their home system, and no systems are owned by that race when the game starts.

Any other ideas?

Thanks,
Bad Syntax
 
I have gotten starting points in the correct system, but I think only because I put those capital systems first.

I can't seem to figure out how to set owners of these other systems to that one country. I have tried stuff like owner=faction, set_owner=faction, set_owner=event_target:faction, and various combinations, with no luck.

I have some other things I'm also trying to figure out to no avail:
- Remove the 3 starting fleets
- Remove anything that creates mining/research, as those will not be in my mod
- I'd like the generic race portraits to match the initial leader portraits, no idea how to go about that yet.
- Though I can programmatically create the 12 THOUSAND hyperlanes needed, as movement in battletech is in 30 LY intervals, the game then takes a couple minutes to load and its horribly ugly. I *REALLY* hope to just have jump drives instead, with a range of 24, that work in 7 day increments (with later technology that allows 2 uses at once, but still a 7 day delay), but I'm not sure that will be possible. Maybe there is some way to limit free ship movement so it can only go like 24 LY before "running out of gas"?
- I have soooo many other things to do, but just getting the map showing the proper faction borders would be a HUGE boost to my morale!

Any help would be appreciated. I tried the discord, nobody answered my inquiries :(

Thanks,
Bad Syntax