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

Tibor Tyrone

Recruit
78 Badges
Nov 17, 2011
5
0
  • Crusader Kings II
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Starvoid
  • Sword of the Stars II
  • Europa Universalis IV: Res Publica
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Europa Universalis IV
  • Cities in Motion 2
  • Stellaris: Distant Stars
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Rights of Man
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines - Green Cities
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Surviving Mars
  • BATTLETECH
  • Stellaris: Apocalypse
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Europa Universalis 4: Emperor
  • Stellaris: Ancient Relics
  • Cities: Skylines - Parklife Pre-Order
  • Europa Universalis IV: Dharma
  • BATTLETECH: Flashpoint
  • Surviving Mars: Digital Deluxe Edition
  • 500k Club
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Rule Britannia
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
 

Kordishal

Second Lieutenant
48 Badges
Jan 3, 2013
113
140
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Majesty 2
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II: The Old Gods
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis IV
  • Imperator: Rome Sign Up
  • Stellaris: Megacorp
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Stellaris: Ancient Relics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis IV: Third Rome
  • Cities: Skylines
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.
 

Naselus

PDM's Benevolent Dictator for Life
56 Badges
Feb 26, 2009
14.260
1.598
  • Cities in Motion 2
  • Stellaris: Galaxy Edition
  • Pillars of Eternity
  • Victoria 2 A House Divided Beta
  • Pride of Nations
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Supreme Ruler: Cold War
  • Sengoku
  • Europa Universalis: Rome
  • Victoria: Revolutions
  • March of the Eagles
  • Majesty 2 Collection
  • Magicka
  • Crusader Kings II: Rajas of India
  • A Game of Dwarves
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Darkest Hour
  • Heir to the Throne
  • Stellaris: Apocalypse
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Knights of Honor
  • Stellaris: Nemesis
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - Parklife
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • Cities: Skylines
  • 500k Club
  • Victoria 2
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.