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

shastar2005

Second Lieutenant
9 Badges
Nov 30, 2015
196
50
  • Knights of Pen and Paper +1 Edition
  • Majesty 2 Collection
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Knights of Honor
  • BATTLETECH
  • Surviving Mars
  • Age of Wonders III
  • Crusader Kings III
Hi there,

today i just started to create my first mod ever, a little mod, who ads some new army_attachments, needs new sience prerequisite and descriptions. Alright about that part.


Question is, if i create a new file in the mod folder like MyMod_technology_l_english.yml, ll oher files need the MyMod-Prefix too?

Sorry if my english is too bad to understand what i mean :D
 
Last edited:
If you want to add new functionality - new events, army_attachments, what have you - then you make a new file with a different name from the original files that contains the added information. Don't include the army_attachments in the base game in the file, just the new ones you want to add. You only use the same file name as the original files, or include the same code as in the original files, if you want to remove or replace some functionality in the base game.

Good luck!
 
Related, if I want to alter some vanilla functionality, like insert a new tech between two existing vanilla techs, do I need to add my new one to the vanilla file and overwrite it, or can I just have a new file with my new tech and the vanilla tech I want to now depend on it? I tried it the second way and got a buggy branching tech tree, and I want to know if I just did it wrong or we really are limited to just adding techs or overwriting an entire vanilla file.
 
so e.g i copy and paste the original files and name them to

tweety_armies.txt
tweety_army_attachments.txt

tweety_l_english.yml
tweety_ technology_l_english.yml

delete everything out of it and only put those parts in it, i want to add to the game or i modified from existing content?

@Pode

As far es i know, you cannot OVERRIDE values, the game engine will not accept it. You can only ADD something.

If you want Building_1A betweent Building_1 and Building_2, and change there prerequisite techs for Building_2 in a new mod-file, i dont know if the game accept the new "rules" for that tech-tree.
 
Last edited:
Related, if I want to alter some vanilla functionality, like insert a new tech between two existing vanilla techs, do I need to add my new one to the vanilla file and overwrite it, or can I just have a new file with my new tech and the vanilla tech I want to now depend on it? I tried it the second way and got a buggy branching tech tree, and I want to know if I just did it wrong or we really are limited to just adding techs or overwriting an entire vanilla file.

So, I haven't actually tried to overwrite existing functionality before. My memory - which may be wrong - is that it decides priority by alphabetical order of the file name.

so e.g i copy and paste the original files and name them to

tweety_armies.txt
tweety_army_attachments.txt

tweety_l_english.yml
tweety_ technology_l_english.yml

delete everything out of it and only put those parts in it, i want to add to the game or i modified from existing content?

That will definitely work for adding new army_attachments and technologies to the game. If you want to also change some of the existing army_attachments and technologies, I believe that will work if your filenames comes before the base game's corresponding file alphabetically, but I may be wrong about that. Hopefully someone who actually knows for sure will chime in.
 
  • 1
Reactions:
If you want to edit any information in a file you will have to replace the entire file. If you make a new file with an already existing tech all you will do is create a wholly new tech with the new information.

The only things you can overwrite in new files are localisation lines and defines.
 
  • 2
Reactions:
Gracias.
 
Okay,

so, when i e.g. want to replace the description text for the "Hunter-Killer-Drones" , but not the values, can i create a new file like

update_l_english.yml

with the changed

army_attachment_hunter_killer_drone_swarms:0 "Example Text Subjects"
army_attachment_hunter_killer_drone_swarms_desc:0 "§LExample text comes here§!"

Or will this lead to a conflicht in the game mechanic?

Sorry i am still confused at this point. Dont want do create a bug, that i maybe not can fix, because i do not understand how the game acts.
 
The only thing localisation files do is tell the game what text to show the player when. The absolute worst thing that can happen when modding localisation files is making all the fluff lines disappear so that when you hover over hunter killer drones for examples it won't show "Hunter Killer Drones" or "Example Test Subjects", but "army_attachment_hunter_killer_drone_swarms".

Secondly, don't be afraid of bugs, there is absolutely nothing you can do barring using some real high-tier code magic that will cause an irrevocable bug when coding in PDX's scripting language. Worst case scenario you crash the game on start or corrupt the save file you have loaded in to (and then the old save will still be fine). Bugs are opportunities for learning and understanding the game engine and coding in general.
 
Hi thanky,
the problem is, if a bug appears, and you dont know why.
You cannot fix a problem, if you do not know the origin of it.

I tried to start a game with the mod enabled.
All the entries in the ENGINEERING section of the sience window are worked well, all names and desc shown correctly.
But all entires in the SOCIAL section are broken.
There only appears the references like

tech_combat_medic_1
tech_combat_medic_1_desc

All descriptions are in technology_l_english.yml

And i have NO clue, why the engineering entries work and the social sience entries not.
 
Not the original game files, only in the mod folder.

And yes i verified the entries several times. like i said, the engineering entries works fine, only social sience not. Maybe they need to be in a differend .yml file, but i dont know wich. :/



That's how it looks (shortend texts):


# ###################################
# Engineering
# ###################################

# AAA Branch

tech_power_armour_1:0 "Power Armor"
tech_power_armour_1_desc:0 "The development and "
tech_power_armour_2:0 "Advanced Power Armour"
tech_power_armour_2_desc:0 "The improvment of"
tech_power_armour_3:0 "Titans"
tech_power_armour_3_desc:0 "Titans are huge"
tech_ground_support_1:0 "Airborne Directive"
tech_ground_support_1_desc:0 "The develompent"
tech_ground_support_2:0 "Fleet Support"
tech_ground_support_2_desc:0 "Improved target."

# ###################################
# Society
# ###################################
tech_combat_medic_1:0 "Combat Medics"
tech_combat_medic_1_desc:0 "Combat Medic Text"
tech_warfare_center_1:0 "Advanced Warfare"
tech_warfare_center_1_desc:0 "The develompen."
tech_warfare_center_2:0 "Special Warfare"
tech_warfare_center_2_desc:0 "Improved target "
 
Tip 1. Don't publish anything to Steam before it is in something close to working order.

Tip 2. If you want someone who has offered to help you to help, don't have them jump through hoops to do it.