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

Anthropoid

Major Game Slut
59 Badges
Sep 30, 2008
3.014
1.079
  • Crusader Kings II
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Mount & Blade: Warband
  • Victoria 2: A House Divided
  • Supreme Ruler 2020
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Charlemagne
  • Arsenal of Democracy
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III Complete
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Deus Vult
  • East India Company Collection
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Cities: Skylines - Parklife
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Rise of Prussia
  • Cities: Skylines Industries
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
My goal was to make a "custom solar system" that could be used along with any randomly created faction, and then selected for play the same way "Sol" and "Deneb" can currently be selected. This seemed like a promising first step to creating a reasonable set of alternative custom solar systems.

I have achieved about 95% success with this. It turned out to involve changes to a lot more files than I had expected, and there is still one "blemish" that I'd like to fix (doesn't seem to impact functionality) but could not resolve last night.

Perhaps someone will see it and have a good idea of how I might pin it down.

Here is a screen cap of the solar system after it has initialized and the game has started



and here is one of the "blemish" The "Yggdrasil" name is not showing up correctly, and part of the description for the custom country is not showing up.


Krajzen's Modding Guide was extremely helpful as was the wiki

I was surprised to realize that: a custom solar system apparently cannot exist without a "country" associated with it (or at least that is what I've gathered). So it is not so simple as "copy the 00_prescripted_species.txt" and use Earth or Deneb to create a new solar system. In order for it to function fully, the reference to

Code:
    flags = { yggdrasil_system yggdrasil }

must match up with a line in a modded version of 00_prescripted_countries.txt, and in the directory
C:\ . . . \Stellaris\mod\Yggdrasil\prescripted_countries

Without correspondence here, the custom solar system will initialize with the names and many of the attributes correct, but the ordering of planets will be messed up, and in particular, the "home world" planet will have garbled tiles.

If anyone can help me pin down where that blemish in the setup screen might be coming from (because other than that it seems to be functioning completely) then I'll get it packaged and make it available.

I can post pieces of code and/or screen caps of the mod directories, etc., but I thought I'd start out simple.

And BTW: Yggdrasil is the "cosmic tree" in Norse pagan mythos. The system is basically modeled on our Sol system, but with a couple slight changes in permutation of planets, and with the planets renamed after Norse versions of the Roman Gods (Loki for Mercury, yes I know, not an exact analogue, but hey . . .) Fenrir for Venus (yes, it should really be Freyja, but I invoke "ARTISTIC LICENSE!" :p . . . although if one of you really is an expert on Norse mythos and finds this configuration to be horrendous do tell, I can always change things around), Midgard for Earth, Freyja for Luna, Thor for Mars, Odin for Jupiter, etc.

The custom country itself are a human phenotype (of course, how could Space Vikings be anything BUT human!? . . . well MAYBE the Xeno-Boar people I guess?) "Terran" (again I know that is Latin, but "Jordians" just doesn't sound so good eh?): Militarist, Spiritualist, Xenophile . . .
 
Last edited:
You want to make a custom solar system and select it from the list?

What's your issue you rambled on a lot and couldn't figure out what you needed help with
 
  • 1
Reactions:
You want to make a custom solar system and select it from the list?

What's your issue you rambled on a lot and couldn't figure out what you needed help with

Yes, I do have a tendency to provide too much detail don't I . . .

The "Yggdrasil" name is not showing up correctly, and part of the description for the custom country is not showing up.

Other than that, it works.
 
You just need to add the name for it in your own language yml file.. In the localization folder
 
  • 1
Reactions:
You just need to add the name for it in your own language yml file.. In the localization folder

Hmmm. I could've swore I already did that . . . I'll have a look though, thanks. Too many new files relationships figured out in one day . . .
 
If not upload your files in A zip or link me and I'll mess around with it for you
 
Yeah, let me see if that fixed it. Either way, I'll package it and upload it ;)
 
There it is. Got the name to show up, but still a problem with the description. Maybe too wordy . ..
 

Attachments

  • yggdrasil.zip
    495,7 KB · Views: 2
You should create new files and name them differently from the original files and not just modify vanilla files, whenever possible. (e.g localization, start_screen_message, pre-scripted countries)

Code:
yggdrasil_system_initializer_NAME:0 "Yggdrasil System"
yggdrasil_system_DESC:0 "Norse-mythos theme system, home of the Sublime Terran Republic, embarking on an age of celestial discovery.\n\n$system_initializer_DESC$"

And here is the problem. First put this in a new file and not in the l_english file. Your mods compatibility suffers and you will have to merge with the vanilla file after every patch.

And it should be:
Code:
yggdrasil_system_initializer_DESC:0 "Norse-mythos theme system, home of the Sublime Terran Republic, embarking on an age of celestial discovery.\n\n$system_initializer_DESC$"
 
  • 1
Reactions:
Ah, thanks Kordishal!

On the issue of file names: I don't think I had read anything specifically on this topic. But I had gathered that, using default file names was fine, so long as two conditions were met (at least one of which I know I'm in breach of in a few instances):

1. The mod files are in a separate directory (I'm good there)
2. The mod files do not include any duplicates of vanilla code, i.e., the mod files include ONLY script that is intended to be modified (I'm in breach of that in several instances, just hadn't got that far yet)

To clarify how this works, lets talk about a specific example in this mod.

The vanilla game has: C:\Steam\steamapps\common\Stellaris\localisation\l_english.yml

Presently Yggdrasil mod has: C:\Users\Anthropoid\Documents\Paradox Interactive\Stellaris\mod\anthropoid\localisation\l_english.yml

The mod version of that file is presently an exact duplicate of the vanilla, except for two additional lines, this is obviously not good, because as you explain, when updates come, if they impact the vanilla version of that file, then I will need to carry the "Yggdrasil" lines over into that new version of the updated I_english.yml file or the mod will be using an outdated version of the file.

There are at least two "solutions" to this: (1) rename the version of the file in the mod to something distinct (say I_Yggdrasil_english.yml) and/or (2) exclude all script in the modded version of the file _EXCEPT_ the two lines that make the mod function.

The latter would only be tenable _IF_ the engine were capable of initializing a game from a combination of both vanilla and modded files, which I'm led to believe it can do.

In this case, having all the mod file names identical to the vanilla files wouldn't result in conflicts with updates. The game engine would look at both the vanilla and modded version of the same file, include the assignments that each provided (and as long as the mod includes no repetitions of the assignments in the vanilla version, no problemo).

Depending on how the engine reads these files, it may be necessary to do both, either, neither or one specifically. Appreciate if anyone can clarify best practice on this.
 
Last edited:
Ah I see what you mean about renaming files. Even with the descriptor.mod file edited to say it is compatible with 1.2, when I load the mod, No prescripted countries at all.

So what would be a good thing to rename that to? How does the game know where to look for particular files if they do not have the same name as their vanilla counterparts?
 
Crap! No pre-scripted countries when I try to run my mod in 1.2.

I've done a quick pass through on all the files, copy-paste the vanilla stuff then plug in the new lines, but I just cannot get them to show up.

Does anyone have any immediate idea what might cause it?
 
You can name files whatever you want to. The location is what matters. Any file that is in the prescripted_countries folder is treated as a file that contains pre-scripted countries. As for why you stuff doesn't show up in Asimov beta patch I don't know.
 
You can name files whatever you want to. The location is what matters. Any file that is in the prescripted_countries folder is treated as a file that contains pre-scripted countries. As for why you stuff doesn't show up in Asimov beta patch I don't know.

Ahh, well that clarifies a great deal!

I think I have several different things going wrong, but I got a 'bead' on all of them. The main big ones seems to be: changes to the format of the 00_defines.lua. For that, I'm probably just going to have to go through it line by line and plug in every single value I had changed manually.

The game keeps a copy of empire's you have created, and that seems to have been a major source of errors in the log. Just deleting that might fix a lot of things. The missing pre-scripted countries probably has to do with changes they've made in that vanilla file, and again, I probably just need to go through the vanilla and re-introduce my Yggdrassil system line by line.

All of this is to be expected for such an early game, and partly why I think it is a bit unnecessary to worry to much about "compatibility." Even if you have done everything you can to insure compatibility, they can change not only the external files but what is inside the engine itself so all bets are probably off when patch time comes. Good practice!
 
changes to the format of the 00_defines.lua.

Never ever overwrite the 00_defines.lua file....

You can overwrite values in this file with the following syntax:
Code:
NDefines.NSpecies.MAX_TRAIT_POINTS = 2
NDefines.NSpecies.MAX_TRAITS = 8
NDefines.NCamera.SYSTEM_SPACE_SCALE_MULT    = 25.0

I probably just need to go through the vanilla and re-introduce my Yggdrassil system line by line.

What do you mean by that? The system initializer is not connected to vanilla code at all?

, they can change not only the external files but what is inside the engine itself so all bets are probably off when patch time comes. Good practice!

Sort of. But that is why things like WinMerge exist that lets you easily compare and merge two text files. But your mod doesn't need to overwrite any vanilla file anyway, you wouldn't have to update anything if you didn't and could just change the number.

Fundamental coding changes only occur in major updates and are usually documented in the ChangeLog or you can find the diff from people that will tell you line by line what was changed in the update. Making it very easy and quick to update your mod for a new patch.
 
You're a hero Kordishal!
Never ever overwrite the 00_defines.lua file....

You can overwrite values in this file with the following syntax:
Code:
NDefines.NSpecies.MAX_TRAIT_POINTS = 2
NDefines.NSpecies.MAX_TRAITS = 8
NDefines.NCamera.SYSTEM_SPACE_SCALE_MULT    = 25.0

So let me see if I understand you here:
Create a directory: C:\Users\Anthropoid\Documents\Paradox Interactive\Stellaris\mod\anthropoid\\common\defines

and create a file with a .lua extention in that directory ANY file name at all, it doesn't matter, then any attribute in the vanilla 00_defines.lua I want to change, I just use that syntax to specify an alternate value?

So I could name it
Create a directory: C:\Users\Anthropoid\Documents\Paradox Interactive\Stellaris\mod\anthropoid\\common\defines\wangadoodle.lua

and it the engine would know to read from that file and overwrite the attributes referenced there in place of the values in the vanilla 00_defines.lua?


What do you mean by that? The system initializer is not connected to vanilla code at all?

I haven't sorted out yet why the pre-scripted countries are not showing up. The game will initialize, but no pre-scripted countries. That could be simply a result of the "userempires.txt" file that was still in my C:\Users\ directory, or it might be from the changes I made to the various files that control the pre-scripted countries (e.g., deleting human2, and overwriting human1 as "Sublime Terran Republic.")

As I said above, my efforts to create a custom solar system were what got this all going, and I found that I could get a custom solar system to work even though it was not linked to a pre-scripted country, but it was garbled. Moreover, when I attempted to add a "human3" that did not work either. So as a work around, I simply overwrote human1.

I appreciate your help!
 
Create a directory: C:\Users\Anthropoid\Documents\Paradox Interactive\Stellaris\mod\anthropoid\\common\defines\wangadoodle.lua

and it the engine would know to read from that file and overwrite the attributes referenced there in place of the values in the vanilla 00_defines.lua?

Yep.

Moreover, when I attempted to add a "human3" that did not work either. So as a work around, I simply overwrote human1.

It should be possible to add "human3". Have you added it as a separate file?
 
So this would be a proper way to overwrite attributes in 00_defines.lua
C:\Users\Anthropoid

\Documents\Paradox Interactive\Stellaris\mod\anthropoid1.2\common\defines
Code:
NDefines.NGameplay.NEBULA_TRAVEL_SPEED_PENALTY = 0.15,     -- 30% travel speed penalty Default 0.30
NDefines.NGameplay.BASE_MONTHLY_INFLUENCE         = 4, -- Base Influence gained per month  Default 3
NDefines.NGameplay.BASE_MONTHLY_MINERALS         = 1, -- Base Minerals gained per month Default 0
NDefines.NGameplay.BASE_MONTHLY_PHYSICS         = 4, -- Base Physics gained per month Default 5
NDefines.NGameplay.BASE_MONTHLY_SOCIETY         = 4, -- Base Society gained per month Default 5
NDefines.NGameplay.BASE_MONTHLY_ENGINEERING     = 4, -- Base Engineering gained per month Default 5
NDefines.NGameplay.BASE_MONTHLY_ENERGY         = 2, -- Base Energy gained per month Default 0
NDefines.NGameplay.BASE_SURVEY_TIME         = 18.0,    -- Base Time In Days for surveying a planet  Default 20
NDefines.NGameplay.PIRATE_TARGET_DIST         = 65.0,    -- Target system can't be further away from home system  Default 80
NDefines.NGameplay.FTL_RANGE_WARP             = 50,    -- Base warp range  Default 45
NDefines.NGameplay.LEADER_POOL_SIZE        = 6, -- Each leader pool will consist of this many leaders  Default 3
NDefines.NGameplay.LEADER_POOL_LEAD_TIME    = 8, -- Years leaders will remain in the leader pool until replaced Default 10
NDefines.NGameplay.LEADER_HIRING_COST         = 40, -- Default 50
NDefines.NGameplay.LEADER_BASE_CAP            = 125, -- Default 10
NDefines.NGameplay.LEADER_ADMIRAL_FLEET_COMBAT_BASE_EXPERIENCE = 13, -- Leader Admiral base experience from fleet combat Default 10
NDefines.NGameplay.LEADER_ADMIRAL_FLEET_COMBAT_SHIPS_KILLED_CONVERSION = 0.34, -- Scale factor for total number of ships killed after combat when calculating experience gain for Admiral  Default 0.25
NDefines.NGameplay.LEADER_ADMIRAL_FLEET_COMBAT_SHIPS_LOST_CONVERSION = 0.065, -- Scale factor for total number of ships lost after combat when calculating experience gain for Admiral Default 0.1
NDefines.NGameplay.LEADER_GENERAL_GROUND_COMBAT_BASE_EXPERIENCE = 14, -- Leader General base experience from ground combat  Default 10
NDefines.NGameplay.LEADER_GENERAL_GROUND_COMBAT_EXPERIENCE_SCALE = 0.4, -- Scale factor used when calculating experience gain for General
NDefines.NGameplay.LEADER_GENERAL_GROUND_COMBAT_ARMIES_KILLED_CONVERSION = 0.37, -- Scale factor for total number of armies killed after combat when calculating experience gain for General  Default 0.25
NDefines.NGameplay.LEADER_GENERAL_GROUND_COMBAT_ARMIES_LOST_CONVERSION = 0.08, -- Scale factor for total number of armies lost after combat when calculating experience gain for General  Default 0.1
NDefines.NGameplay.LEADER_SCIENTIST_LEADING_RESEARCH_FIELD_EXPERIENCE = 6,  --   Default 3.5
NDefines.NGameplay.LEADER_SCIENTIST_SUCCESSFUL_ANOMALY_RESEARCH_EXPERIENCE = 150,     -- Experience gained from a successful discovery research   Default 100
NDefines.NGameplay.LEADER_SCIENTIST_COMPLETED_SPECIAL_PROJECT_EXPERIENCE = 125,    -- Experience gained from completing a special project Default 100
NDefines.NGameplay.LEADER_SCIENTIST_ASSIST_RESEARCH_MULT = 1.02,    -- Assist Research modifier-mult per skill level (this value times skill level equals modifier)  Default 1.0
NDefines.NGameplay.LEADER_GOVERNOR_BUILDING_OR_TILE_CLEAR_EXPERIENCE = 0.9, -- Scale-value for each completed building-construction or tile-clear, multiplied with the resources spent    Default 0.5
NDefines.NGameplay.LEADER_GOVERNOR_EDICT_GAIN_EXPERIENCE = 0.08, -- Scale-value for the exp-gain given each month an Edict is active on the planet, multiplied with the resources spent    Default 0.05
NDefines.NGameplay.LEADER_GOVERNOR_POP_IS_BORN_EXPERIENCE = 9, -- Exp-gain for each Pop born   Default 8
NDefines.NGameplay.LEADER_GOVERNOR_SECTOR_MONTHLY_EXPERIENCE = 4,    -- Monthy exp from governing sector.    Default 3.5
NDefines.NGameplay.LEADER_AGE_DEATH_CHANCE_AGE    = 92, -- Before this age the chance wont increase   Default 72
NDefines.NGameplay.GENERAL_DAMAGE_EXP_MULT        = 1.1, -- Multiplier of how much damage translates into experience.    Default 1.0
NDefines.NGameplay.GENERAL_DEFENSE_EXP_MULT    = 1.2, -- Multiplier of how much defense translates into experience.   Default 1.0
NDefines.NGameplay.BORDER_BASE_RADIUS = 14, -- The base radius of the border    Default 12
NDefines.NGameplay.BORDER_POPULATION_MODIFIER = 0.2, -- The border population modifier    Default 0.15
NDefines.NGameplay.WAR_SCORE_PLANET_BASE = 12.0, -- Relative warscore value of a planet   Default 10.0
NDefines.NGameplay.WAR_SCORE_PLANET_BUILDING = 1.5, -- Relative warscore value of a planet for every building   Default 1.0
NDefines.NGameplay.WAR_SCORE_OCCUPATION_MUL = 2.0, -- 150% warscore gained from completely occupying the opponents   Default 1.5
NDefines.NGameplay.WAR_SCORE_PLANET_MIN = 8.0, -- Warscore from 1 planet will never be less than this    Default 5.0
NDefines.NGameplay.WAR_SCORE_WARGOAL_MULT = 2.05, -- Wargoal planets are worth this much more   Default 1.25
NDefines.NGameplay.GARRISON_SIZE_BASE = 5, -- Planet always spawns this number of garrisons    Default 2
NDefines.NGameplay.PLANET_FORTIFICATION_BASE = 4000, -- Planet always has this much fortification health Default 1000
NDefines.NGameplay.PLANET_FORTIFICATION_MULT = 500, -- Per pop over 1  Default 100
NDefines.NGameplay.PLANET_FORTIFICATION_DEFENSE_BONUS = 50, -- At 100% fortification, divide damage to defending armies by this Default 10
NDefines.NGameplay.PLANET_FORTIFICATION_DEFENSE_MIN = 1.5, -- At 0% fortification, divide damage to defending armies by this Default 0.5
NDefines.NGameplay.DEBRIS_DAYS = 2700,    -- How many days the debris is visible for Default 1800
NDefines.NGameplay.DEBRIS_RESEARCH_TIME = 25, -- How many days it takes to analyze 1 debris. Default 90
NDefines.NGameplay.RIVALRY_INFLUENCE_GAIN = 1.25, -- Per rival (scales to relative power, value here is at 2x power)      Default 1
NDefines.NGameplay.NUM_TECH_ALTERNATIVES = 4, --  Default 3
NDefines.NGameplay.CORE_SECTOR_SYSTEM_CAP = 50, -- Too many systems with owned planets in core sector will apply modifier inefficient_planet_management. Default 5
NDefines.NGameplay.RESOURCE_CLUSTER_COUNT = 12, -- Number of resource clusters containing special resources Default 6
NDefines.NGameplay.NAVY_SIZE_MAX = 4000, -- Max value of Naval Capacity  Default 1000
NDefines.NGameplay.NAVY_SIZE_BASE = 3,    -- Base value of Naval Capacity  Default 5
NDefines.NGameplay.NAVY_SIZE_BASE = 3,    -- Base value of Naval Capacity  Default 5
NDefines.NGameplay.NAVY_SIZE_POP_MULT = 0.55, -- Mult value of Naval Capaicty for each Pop  Default 0.25
NDefines.NGameplay.NAVY_SIZE_SPACEPORT_BASE = 3, -- Base value of Naval Capacity for each spaceport  Default 5
NDefines.NGameplay.NAVY_SIZE_SPACEPORT_MULT = 2, -- Mult value of Naval Capacity for each spaceport level ( NAVY_SIZE_BASE + Level * NAVY_SIZE_MULT )  Default 1

It should be possible to add "human3". Have you added it as a separate file?

Well of course I have not! :p
I will try it that way though, thanks.
You're a hero Kordishal! :D
 
Never ever overwrite the 00_defines.lua file....

You can overwrite values in this file with the following syntax:
Code:
NDefines.NSpecies.MAX_TRAIT_POINTS = 2
NDefines.NSpecies.MAX_TRAITS = 8
NDefines.NCamera.SYSTEM_SPACE_SCALE_MULT    = 25.0

That doesn't seem to work details of attempts here
 
Remove the comas from the file. It does not use them as it substitutes and is not proper lua code.

Also, what I usually do when it randomly crashes is try to verify the Stellaris file integrity. Sometimes when copy pasting and switching between identically named folders and files it happens that you change the vanilla one in the wrong folder. This fixes this.

To do so right click on Stellaris in Steam -> Properties -> Local Files -> VERIFY INTEGRITY OF GAME CACHE...

This will replace any missing and changed files.