hey there,
I need help to create a custom module.
I'm trying to do module for starbase, that is only possible to be built if there is an asteroid/asteroid belt in the system
So far, I can't make this working. Please can some experienced scripter have a look at this code?
So far this don't work, I can see the module in the stabase modules list, but it can't be build, and it don't shows the cost resources or what it can produce.
I need help to create a custom module.
I'm trying to do module for starbase, that is only possible to be built if there is an asteroid/asteroid belt in the system
So far, I can't make this working. Please can some experienced scripter have a look at this code?
Code:
## this is in my mod_l_english.yml
mod_requires_asteroid_belt:0 "$TRIGGER_FAIL$Can only be build in systems that has a rocky asteroid belt."
## this is in the module folder/file
asteroids_advanced_mines = {
icon = "GFX_asteroids_advanced_mines"
section = "REFINERY_STARBASE_SECTION"
construction_days = 120
possible = {
custom_tooltip = {
## any_planet = pc_asteroid
any_system_planet = pc_asteroid
fail_text = "mod_requires_asteroid_belt"
}
custom_tooltip = {
fail_text = "requires_starport"
has_starbase_size >= starbase_starport
}
}
possible = {
solar_system = {
custom_tooltip = {
fail_text = "requires_asteroid_belt"
any_planet = pc_asteroid
}
}
}
resources = {
category = starbase_buildings
cost = {
alloys = 200
}
produces = {
minerals = 30
alloys = 5
rare_crystals = 0.25
}
upkeep = {
energy = 30
}
}
ai_build_at_chokepoint = yes
ai_build_outside_chokepoint = yes
ai_weight = {
weight = 150
}
potential = {
exists = owner
## owner = { has_technology = tech_asteroids_advanced_mines }
}
## show_in_tech = "tech_asteroids_advanced_mines"
}
So far this don't work, I can see the module in the stabase modules list, but it can't be build, and it don't shows the cost resources or what it can produce.