• 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.
I`ve tried it, and it was possible to implement a new resource and to charge it as cost. The last problem I could not fix was to show it`s count.
I don`t know if I`m just to bad in trying or if the UI really is not designed to have new resources shown. As long as I`m not able to get any resource count my whole solution is useless.

Here is what I have so far:
01_deposits.txt ( in common/deposits )
##################################
############ CRYSTALS ############
##################################

d_crystal_deposit = {
resources = { crystals = 1 }
station = shipclass_mining_station
orbital_weight = {
weight = 10
}

drop_weight = {
weight = 0
modifier = {
weight = 10
planet = {
is_planet_class = pc_nuked
}
}
modifier = {
weight = 15
planet = {
OR = {
is_planet_class = pc_gaia
is_planet_class = pc_continental
is_planet_class = pc_ringworld_habitable
is_planet_class = pc_tropical
is_planet_class = pc_ocean
is_planet_class = pc_arid
is_planet_class = pc_desert
is_planet_class = pc_tundra
is_planet_class = pc_arctic
}
}
}
}
}

d_rich_crystal_deposit = {
resources = { crystals = 2 }
station = shipclass_mining_station
orbital_weight = {
weight = 20
}

drop_weight = {
weight = 0
modifier = {
weight = 6
planet = {
OR = {
is_planet_class = pc_molten
is_planet_class = pc_toxic
is_planet_class = pc_nuked
is_planet_class = pc_frozen
}
}
}
modifier = {
weight = 8
planet = {
OR = {
is_planet_class = pc_gaia
is_planet_class = pc_continental
is_planet_class = pc_ringworld_habitable
is_planet_class = pc_tropical
is_planet_class = pc_ocean
is_planet_class = pc_arid
is_planet_class = pc_desert
is_planet_class = pc_tundra
is_planet_class = pc_arctic
}
}
}
modifier = {
weight = 12
planet = {
OR = {
is_planet_class = pc_barren
is_planet_class = pc_barren_cold
}
}
}
modifier = {
weight = 22
planet = {
is_asteroid = yes
}
}
}
}

d_vast_crystal_deposit = {
resources = { crystals = 3 }
station = shipclass_mining_station
orbital_weight = {
weight = 30
}

drop_weight = {
weight = 0
modifier = {
weight = 1
planet = {
OR = {
is_planet_class = pc_gaia
is_planet_class = pc_continental
is_planet_class = pc_ringworld_habitable
is_planet_class = pc_tropical
is_planet_class = pc_ocean
is_planet_class = pc_arid
is_planet_class = pc_desert
is_planet_class = pc_tundra
is_planet_class = pc_arctic
is_planet_class = pc_frozen
is_planet_class = pc_molten
is_planet_class = pc_toxic
}
}
}
modifier = {
weight = 3
planet = {
is_asteroid = yes
}
}
modifier = {
factor = 0.5
planet = {
is_asteroid = yes
is_in_cluster = resource_cluster_0
}
}
}
}

d_immense_crystal_deposit = {
resources = { crystals = 4 }
station = shipclass_mining_station
orbital_weight = {
weight = 50
}

drop_weight = {
weight = 0
modifier = {
weight = 1
planet = {
is_asteroid = yes
}
}
modifier = {
weight = 35
planet = {
AND = {
OR = {
is_planet_class = pc_gaia
is_planet_class = pc_continental
is_planet_class = pc_ringworld_habitable
is_planet_class = pc_tropical
is_planet_class = pc_ocean
is_planet_class = pc_arid
is_planet_class = pc_desert
is_planet_class = pc_tundra
is_planet_class = pc_arctic
is_planet_class = pc_nuked
}
OR = {
has_planet_modifier = "pm_ultra_rich"
has_planet_modifier = "pm_crystal_rich"
}
}
}
}
modifier = {
weight = 100
planet = {
has_planet_modifier = "pm_chthonian_planet"
}
}
modifier = {
factor = 0
planet = {
OR = {
has_deposit = "d_immense_crystal_deposit"
has_deposit = "d_immense_energy_deposit"
has_deposit = "d_immense_society_deposit"
has_deposit = "d_immense_physics_deposit"
has_deposit = "d_immense_engineering_deposit"
has_strategic_resource = yes
}
}
}
}
}
01_strategic_resources.txt (in common/strategic_resources )
########
# Extra Resources
########
crystals = {
accumulative = yes
accumulated_by_sectors = yes
tradable = yes
AI_category = minerals
max = 5000
}
Added a new *.dds file containing the image for the new resource in
gfx/interface/icons/resources
named: scr_crystals.dds
////they are shown on the map on surveyed objects


Added the line in the spoiler to:
resources.gfx (in interface/ )
spriteType = {
name = "GFX_resource_crystals"
textureFile = "gfx/interface/icons/resources/scr_crystals.dds"
}

Added a localisation file
modname_l_english.yml (in /localisation/ )
l_english:

#Resource
crystals:0 "Crystals"
crystals_desc:0 "Harvestable Crystals."
#Deposits
d_crystal_deposit:0 "Crystals discovered\n"


As I said the resource can be charged from buildings and even ships, tried several different uses. but I can not get them shown in the UI with a counter how many I gathered ...
Maybe it`s of some help.
Tibor
 
They stated that you can't give the interface new information. e.g. you can only get the information that is passed on (which is a bit more than currently displayed, but not a hole lot.)

The only work around I can think of is to add a free edict/policy which spawns an event that shows your current stockpile and income. But that seems pretty clunky and not very user friendly.
 
I'm fairly sure you can add a count, actually. The data is passed to the interface somewhere because it's used in the tooltip for full storage. Just need to find out where that tooltip is defined and it should be possible to hack something similar into interface.gui.