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

Antsassin

Private
87 Badges
Mar 12, 2004
21
25
  • Victoria 2
  • Impire
  • Europa Universalis III Complete
  • Iron Cross
  • The Kings Crusade
  • March of the Eagles
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Sword of the Stars
  • Sword of the Stars II
  • Heir to the Throne
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Rise of Prussia
  • Mount & Blade: Warband
  • Victoria 3 Sign Up
  • Europa Universalis III
  • Hearts of Iron Anthology
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • East India Company Collection
  • Ancient Space
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
Hello everyone. I am trying to create a mod where asteroids (ice, crystal etc) can be used for asteroid bases (with 4 or 5 slots) to be able to exploit resources on a tiered basis using asteroid specific building. I don't just want a mod that makes all asteroids colonizable because then each system gets crammed with colonization icons and looks busy or messy.

I want to create an event or modifier added to all asteroid candidates of a type similar to the "terraforming candidate" modifier so that an icon appears on the candidate (like the terraforming candidate icon) rather than filling the system full of colonization icons.

I would like the event to be triggered by gaining a technology such as "asteroid colony" tech or something like that. Then the localization would apply to all candidate asteroids existing and uncovered by future survey etc.

And it is breaking my brain - I'm sure it can be done and I found this tech code which may help me but I don't understand the necessity or importance for the code lines such as "prereqfor_desc" or "diplo_action" etc.

it is entirely possible my brain isn't built to get my head around how to do this so please treat me with baby gloves.

I was going to add the event as a global modifier triggered by the technology - can it be done????

code:

#Climate Transformation
tech_asteroid_colony = {
cost = @tier1cost1
area = society
tier = 1
category = { new_worlds }
prerequisites = { "tech_colonization_1" }
weight = @tier1weight1

# unlocks additional terraforming-options

prereqfor_desc = {
diplo_action = {
title = "TECH_UNLOCK_TERRAFORMING_NUKED_CHANGE_TITLE"
desc = "TECH_UNLOCK_TERRAFORMING_NUKED_CHANGE_DESC"
}
}

weight_modifier = {
modifier = {
factor = 1.25
has_tradition = tr_expansion_adopt
}
modifier = {
factor = value:tech_weight_likelihood
research_leader = {
area = society
has_trait = "leader_trait_expertise_new_worlds"
}
}
}

ai_weight = {
factor = @terraforming_tech_ai_factor
modifier = {
factor = 1.25
research_leader = {
area = society
has_trait = "leader_trait_expertise_new_worlds"
}
}
modifier = {
factor = 5
has_origin = origin_life_seeded
}
modifier = {
factor = 5
any_system_within_border = {
any_system_planet = {
is_planet_class = pc_nuked
}
}
}
}
}
 
Do you want to make the asteroids into habitats or do you want to "terraform" them? If habitats there's already a mod for that that you can edit since it's out-of-date.

EDIT: Planetary Diversity also has a Planetary Habitat sub-mod

If you want them to be terraformable there are a couple of ways to do it; either you have a start-of-game event that sets a flag on random asteroids that is called when the tech is researched or make the tech allow a decision to re-evaluate the suitability of an asteroid for terraforming.

And it is breaking my brain - I'm sure it can be done and I found this tech code which may help me but I don't understand the necessity or importance for the code lines such as "prereqfor_desc" or "diplo_action" etc.

That's code pointing to the localization text.
 
Do you want to make the asteroids into habitats or do you want to "terraform" them? If habitats there's already a mod for that that you can edit since it's out-of-date.

EDIT: Planetary Diversity also has a Planetary Habitat sub-mod

If you want them to be terraformable there are a couple of ways to do it; either you have a start-of-game event that sets a flag on random asteroids that is called when the tech is researched or make the tech allow a decision to re-evaluate the suitability of an asteroid for terraforming.



That's code pointing to the localization text.
Yes interesting. Maybe converting to a habitat with mining colony specific building. And no I did want to terraform asteroids.

However, I did want the ability to use asteroids as habitats or asteroid colonies to be triggered by technology and then adding a modifier to the applicable asteroids similar to the "terraforming candidate" modifier for barren planets. Again this is because mods where all the planets and steroids are made terraformable the start systems become full of colonizable planet icons and it just looks busy and messy and hard to manage.

Obviously I will need to create a new technology and a new modifier similar to "terraforming candidate"

And additionally, I want to add the "terraforming candidate" to all frozen and toxic planets as they have liquids or gas that can be used to terraform. But again I want to add the "terraforming candidate" modifier as an event caused by a technology so as not to have a million terraformable planet icons in the system.

Also, I would have to limit it to frozen planets only being able to be terraformed to ocean worlds and toxic planets perhaps only to an as yet un-named colonization type.

And yes I had an idea these were localization - "prereqfor_desc" or "diplo_action" - but I only found them in that sequence in that technology code - do I need to use this code?

Thanks
 
Yes interesting. Maybe converting to a habitat with mining colony specific building. And no I did want to terraform asteroids.

However, I did want the ability to use asteroids as habitats or asteroid colonies to be triggered by technology and then adding a modifier to the applicable asteroids similar to the "terraforming candidate" modifier for barren planets. Again this is because mods where all the planets and steroids are made terraformable the start systems become full of colonizable planet icons and it just looks busy and messy and hard to manage.

Obviously I will need to create a new technology and a new moidifer similar to "terraforming candidate"

And additionally, I want to add the "terraforming candidate" to all frozen and toxic planets as they have liquids or gas that can be used to terraform. But again I want to add the "terraforming candidate" modifier as an event caused by a technology so as not to have a million terraformable planet icons in the system.

Also, I would have to limit it to frozen planets only being able to be terraformed to ocean worlds and toxic planets perhaps only to an as yet un-named colonization type.

And yes I had an idea these were localization - "prereqfor_desc" or "diplo_action" - but I only found them in that sequence in that technology code - do I need to use this code?

Thanks
EDIT: Planetary Diversity also has a Planetary Habitat sub-mod

And yes I found this mod but it adds an extreme amount of terraformable planet icons to the solar systems which I want to avoid.

Can it be done my way above?
 
You don't have to use that piece of code, especially if you are making a mod for personal use. That being said a good mod has proper localization for use by others (I for one don't usually put localizations on my personal mod).

If that's what you want then you'll have to have a an event that fires on game start to flag potentially 'habitable' asteroids and planets. It's possible to have them remain hidden until the tech is researched, but in my opinion it would be easier if they appear just like any other planet modifier upon survey. I refer you to mzilli's excellent Better Terraforming Candidates for inspiration on how to flag planets and prompts on when they are discovered as well as how to limit the amount of potential habitables.

Your tech would probably be in Engineering - Voidcraft instead of Society - New Worlds so as to remain thematic to its habitat origins. You will also have to create a megastructure much like the ones in Planetary Diversity since you're essentially making a habitat. If they're explandable you'll also have to make Decisions and Colony Types for them.
 
  • 1Like
Reactions: