Colony created resources

Please post here for questions and discussion about scenario, art and sound modding and the game editor for Distant Worlds.

Moderators: elliotg, Icemania

Post Reply
darkriot
Posts: 32
Joined: Sat Jul 05, 2014 1:56 am

Colony created resources

Post by darkriot »

[font="Arial"][/font] I would like to hear about people experiences with colony made resources. I'm currently developing a trade and resource mod and would like to hear some feedback on experiences with the colony based resources and if anyone has use them for components, fuel, or just to add them in game.
Blueinstinct
Posts: 64
Joined: Sat Dec 17, 2011 5:54 pm

RE: Colony created resources

Post by Blueinstinct »

the Starfall mod uses them and i went ahead and took some of them and imported them to my extended ai improvement mod.
I think they are flaged as super luxuries but dont add crazy bonuses.
But it seams to increase the alien traid income which is why i took them.

Increasing the revenue of tradeagreements and the overall trade is something id love to see happen and
colony created resources may be a way.

Also id love to see resources being a bigger factor in growth rate and planetary delevopement.
Ideally planets should grow pretty fast if lots of resources are available but not if they arnt.

thats my 2cents, looking foward to your mod

greetings
User avatar
Shark7
Posts: 7936
Joined: Tue Jul 24, 2007 4:11 pm
Location: The Big Nowhere

RE: Colony created resources

Post by Shark7 »

I've created and used them. I also created several types so you never know what you will get. They work well, but know that if you have a bunch of types like I do, then chances are you won't spawn all of them in your own empire.
Distant Worlds Fan

'When in doubt...attack!'
darkriot
Posts: 32
Joined: Sat Jul 05, 2014 1:56 am

RE: Colony created resources

Post by darkriot »

[font="Arial"][/font]Thanx for the feed back. That as the idea that you wont be able to get all the resources in your empire, at least not til late game when most of your colonies are fully developed. Starfall and the extended AI mod were the inspirations for me to overhaul the resources. They made the game feel more complete when it came to trade. But why i asked about the resources is i've noticed sometimes they appear on planets as natural resources with out any population of any kind on the planet. Maybe it happens if they are flagged as a super luxury?
Handbanana
Posts: 23
Joined: Wed Apr 09, 2014 9:56 pm

RE: Colony created resources

Post by Handbanana »

Shark7, can you give me some tips or ideas or a template for how you make the resources?

I am making my own personal mod based on Haree78's extended with Icemanias AI mod and das's Blue with a few personal tweaks and a player-only race, and have been dabbling with resource price and distribution to make trade more viable, but that just somehow seem to break the pirates and\or a few species, though I admit I have not tested it much save for a single playtrough. But colony-made resources seem awesome. I was thinking making 2-3 resources with a low chance of appearing at certain (colony development level*population) values on each planet type. So they are planet-type specific.

How did you approach it?
----------------------
New to DW.
Serenitis
Posts: 54
Joined: Sun Aug 23, 2015 3:16 pm

RE: Colony created resources

Post by Serenitis »

The thing about manufactured resources is there is no "chance" about them.
They have a set definition of when and where they appear as defined in the table which depends on planet type and overall development, and you are guaranteed to get them as soon as that condition is true. The only chance involved is the same as any other res. - if you get a random event for depleting that resource.

I'm currently using a mini-mod I made just to derp about with a few things, and this is one of the resources I used:

Code: Select all

41, Manufactured Goods, 41, 8.0, 2, 0, N, N, 0.5, 750,		0, 0, 0.5, 0.1, 0.3,	0, 1, 0.5, 0.1, 0.3,	0, 2, 0.5, 0.1, 0.3,	0, 3, 0.5, 0.1, 0.3,	0, 4, 0.5, 0.1, 0.3,	0, 5, 0.5, 0.1, 0.3,
From this you can see it is a luxury good (which is type 2) with a base price of 8 and a fair demand (0.5) at colonies.
The 750 is the bit that tells the game it is made at colonies, and to make it appear when the population reaches 7.5B (assuming 100% development).
It has six entries so it can appear on any colonised world, but when it does appear it will have a fairly low density %age.

This resource is slightly different:

Code: Select all

45, Agricultural Goods, 45, 8.0, 2, 0, N, N, 0.2, 850,		0, 0, 0.2, 0.1, 0.3,
Again it is a luxury good, but this time has a much lower demand and requires a population of 8.5B to appear.
The major difference being there is only a single entry for it so it only appears on one type of planet - in this case continental (type 0)

I made one res for every planet type, one generic good for all, and one high value good for all.
Money is a bit easier to make, but more importantly you see a lot more frieghters making trips to foreign empires for "exotic" goods.

The important bit for manufactured res. is the 10th value on the line (or 2nd value after the Ns & Ys).
This is 0 for everything except manufactured stuff.
Changing this to any other number will make that res. only appear at colonies. If your resources are appearing outside colonies check to make sure this value is a non-zero number, AND check the 6th value (immediately before the Ys & Ns) to make sure it IS zero.

I'm not 100% sure, but I think the super-luxury tag overrides the manufactured one. So if both the 6th and 10th values are set the res. behaves like loros fruit etc.
User avatar
Shark7
Posts: 7936
Joined: Tue Jul 24, 2007 4:11 pm
Location: The Big Nowhere

RE: Colony created resources

Post by Shark7 »

ORIGINAL: Handbanana

Shark7, can you give me some tips or ideas or a template for how you make the resources?

I am making my own personal mod based on Haree78's extended with Icemanias AI mod and das's Blue with a few personal tweaks and a player-only race, and have been dabbling with resource price and distribution to make trade more viable, but that just somehow seem to break the pirates and\or a few species, though I admit I have not tested it much save for a single playtrough. But colony-made resources seem awesome. I was thinking making 2-3 resources with a low chance of appearing at certain (colony development level*population) values on each planet type. So they are planet-type specific.

How did you approach it?

Serenitis explains this well, but I'll show an example of mine.

Here is how one of mine appears in the resources file:

56, Consumer Goods, 56, 5.0, 2, 0, N, N, 0.6, 1000, 0, 0, 0.50, 0.10, 0.5, 0, 1, 0.50, 0.10, 0.50, 0, 2, 0.50, 0.10, 0.50, 0, 3, 0.50, 0.10, 0.50, 0, 4, 0.50, 0.10, 0.50, 0, 5, 0.50, 0.10, 0.50,

For the purposes of making sure that all races get a shot at it, you'll notice that I made all the stats the same for each planet type. Also, I made all other manufactured resources match in terms of chance to happen and at what point (population level) they happen so you do get quite a random chance of what appears in a given empire.

Basically, colonies can support 8 resources with 3 potentially being manufactured. I think I have 7 manufactured resources, and they will generally all appear in game, though not necessarily all in one empire.
Distant Worlds Fan

'When in doubt...attack!'
darkriot
Posts: 32
Joined: Sat Jul 05, 2014 1:56 am

RE: Colony created resources

Post by darkriot »

Serenitis you are correct in that the super luxury tag overites the manufactured tag. After i made all of the luxuries normal, they stopped appearing in game on uncoloninized planets.
Serenitis
Posts: 54
Joined: Sun Aug 23, 2015 3:16 pm

RE: Colony created resources

Post by Serenitis »

Nice. Another little bit to go in the notes. [:)]

I really like how you can have the planets you can inhabit define the "flavour" of your empire.
And I wonder if in some future iteration DW will be able to further specify what resources a planet can make not just by what kind of planet it is, but also which race(s) are living there. And/Or which other resources are present.
It'd be a complete chore making up all the tables for it, but damn it would look fantastic.
User avatar
Drybreeze
Posts: 129
Joined: Thu Apr 14, 2016 11:21 pm
Contact:

RE: Colony created resources

Post by Drybreeze »

Hello awl.

I have begun editing some myself, with the end goal of creating a mod that completely overhauls the resource, components, and research trees.... however for some reason when I include colony-manufactured goods I get an error when launching a game. I thought at first it was an incompatibility with the Picard Era mod that I was using all the rest of the stuff from (ie: altering one thing at a time till it was completely overhauled) however when I include nothing but images for resources and resource.txt in it's own mod folder I still get this error message... only when starting a new game.

I'm a new poster, so the forums won't let me post a link to an image until 7 days from my 10th post... so... yeah... but it's IMGUR image #4i8ZL9b I'm sure you're plenty smart enough to put the dot coms around it.

My resource.txt is as follows:

Code: Select all

0, Bauxite, 0, 3.0, 0, 0, N, Y, 0.2, 0, 		0, 0, 0.9, 0.1, 0.5,	0, 1, 0.9, 0.1, 0.5,	0, 2, 0.5, 0.1, 0.3,	0, 3, 0.9, 0.1, 0.5,	0, 4, 0.9, 0.1, 0.5,	0, 5, 0.8, 0.1, 0.9, 	0, 6, 0.3, 0.2, 0.8,
TO

Code: Select all

17, Water, 17, 0.5, 0, 35, Y, Y , 1.0, 0,   0, 0, 1.0, 0.1, 0.9,   0, 1, 1.0, 0.5, 1.0,   0, 2, 1.0, 0.7, 1.0,   0, 3, 0.1, 0.1, 0.2,   0, 4, 0.5, 0.1, 0.9,   1, 6, 0.1, 0.1, 0.2,   0, 9, 0.1, 0.1, 0.2,
Launches fine.

But as soon as I add these variables:

Code: Select all

18, Advanced Chips, 18, 10.0, 2, 10, N, N, 0.5, 1.0,   0, 0, 50, 0.5, 1.0,   0, 1, 50, 0.5, 1.0,   0, 2, 50, 0.5, 1.0,   0, 3, 50, 0.5, 1.0,   0, 4, 50, 0.5, 1.0,   0, 5, 50, 0.5, 1.0,
TO

Code: Select all

40, Electronics, 40, 20.0, 2, 20, N, N, 0.8, 5,   0, 0, 1000, 0.1, 1.0,   0, 1, 1000, 0.1, 1.0,   0, 2, 1000, 0.1, 1.0,

It loads fine, but once I click on launch and it does the little spinning galaxy thing while "generating galaxy" it comes up with the above error.

Any pointers on where I'm going wrong? The mod help files don't really help with this one so I'm a bit out of my depth unless I start trial-and-erroring it one line at a time.... more... [8|]

I'm guessing that the resources I haven't included in this post aren't the issue and that it's something global, not specific to any individual resources...? If it helps I can post the entire file of course.
Image
darkriot
Posts: 32
Joined: Sat Jul 05, 2014 1:56 am

RE: Colony created resources

Post by darkriot »

Where you have 1000 you have to change to any number between 0.001 to 1.0. This number is the chance this resource has to appear at a colony when it reaches the right population. 1.0 would be the highest chance. And 18, Advanced Chips, 18, 10.0, 2, 10, N, N, 0.5, 1.0, the 1.0 at the end should be a number like 100 not 1.0. This is the population number for the resources to appear. 100 would be 100,000,000 population. Hope that helps.
User avatar
Drybreeze
Posts: 129
Joined: Thu Apr 14, 2016 11:21 pm
Contact:

RE: Colony created resources

Post by Drybreeze »

Are you sure?

I was under the impression that this number had to be much greater on colony-manufactured goods, since it represented the total number of planets that could generate this resource in the galaxy... the resource.txt file has this in the field-definitions area:
' - Prevalence Value: chance of resource appearing at this type of planet/moon/asteroid/gas cloud. Range from 0 (0% chance) to 1.0 (100% chance). NOTE: when resource is super luxury then Prevalence Value instead indicates how many sources in average galaxy of 700 stars, i.e. 1.0 means single source in 700-star galaxy

The bit after "NOTE" is what I refer to... isn't that saying that in an average 700 star galaxy that a value of 1.0 means there's only ever going to be one colony in the whole galaxy that can produce that particular super-luxury? So if you want 1000 colonies in total (ie: no cap) you put a value of 1000? Maybe it's because 700 is the maximum you can put since it refers to an average 700 star galaxy, making a value of 700 at this variable effectively represent 100% of available stars? How many colonisable planets can a 700 star galaxy theoretically have? 400? 500? 900? I'll try making this value 100 maximum on all variables and see if this helps.

EDIT > After doing as you said, and making all Prevalence values "1.0" and making all ColonyManufacturingLevel ("Pop Quota") levels 100 I still get the same error. I was careful but I suppose the possibility exists that one or more variables are being overlooked and are still incorrect, so I've decided to go back to basics and I've started with the default game's Resources.txt and I'm changing one resource at a time... sigh.

The start of a learning curve is always the most frustrating part.

Thanks for your help darkriot :)
Image
darkriot
Posts: 32
Joined: Sat Jul 05, 2014 1:56 am

RE: Colony created resources

Post by darkriot »

Yeah if you set it to 1.0 in a 700 star galaxy you will only have one source. I believe super luxuries are hard coded to appear only a certain amount depending on the size of the galaxy from experience. It's also not perfectly implemented either; I have seen colony created resources appear on planets naturaly without colonies. Let us know your results of your testing
User avatar
Drybreeze
Posts: 129
Joined: Thu Apr 14, 2016 11:21 pm
Contact:

RE: Colony created resources

Post by Drybreeze »

Okie dokey,

So after a lot of line-by-line adding to resource.txt, launch game, close game, rinse and repeat I have come to the problem area but I can't quite figure out what the problem is.

I've made the pop quota 100, and the Prevalence Value 1.0 on all lux resources for now, and I'll edit them 1 at a time later to varied amounts, if I can get the full list of resources to function with those values first.

I've managed to add strategic resources as listed below, no problem:

Code: Select all

0, Bauxite
 1, Biomass
 2, Diamond
 3, Energy
 4, Gold
 5, Gravel
 6, Hydrocarbons
 7, Hydrogen
 8, Iron
 9, Limestone
 10, Methane
 11, Nitrogen
 12, Oxygen
 13, Pelts
 14, Silicon
 15, Silver
 16, Uranium
 17, Water
... and I've managed to add Colony Manufactured Resources 17 to 25 as listed below no problem:

Code: Select all

18, Advanced Chips
 19, Aesthetics
 20, Aluminium
 21, Awesome Aesthetics
 22, Biofilm
 23, Concrete
 24, Electronic Chips
 25, Explosive
 26, Engineered Biomass
 27, Fine Aesthetics
 28, Glass
 29, Glorious Aesthetics
...but the next colony manufactured resource brings on the error:

Code: Select all

 30, Hosing, 30, 15.0, 2, 10, N, N, 0.5, 100, 					0, 0, 1.0, 0.1, 1.0,	0, 1, 1.0, 0.1, 1.0,	0, 2, 1.0, 0.1, 1.0,	0, 3, 1.0, 0.1, 1.0,	0, 4, 1.0, 0.1, 1.0,	0, 5, 1.0, 0.6, 1.0,

For the life of me I can't see how this is any different to the first colony manufactured resources... for example:

Code: Select all

18, Advanced Chips, 18, 10.0, 2, 10, N, N, 0.5, 100,		0, 0, 1.0, 0.5, 1.0,		0, 1, 1.0, 0.5, 1.0,		0, 2, 1.0, 0.5, 1.0,		0, 3, 1.0, 0.5, 1.0,		0, 4, 1.0, 0.5, 1.0,		0, 5, 1.0, 0.5, 1.0,

Code: Select all

25, Explosive, 25, 6.0, 2, 2, N, N, 0.2, 100, 				0, 0, 1.0, 0.1, 1.0,	0, 1, 1.0, 0.1, 1.0,	0, 2, 1.0, 0.1, 1.0,	0, 3, 1.0, 0.1, 1.0,	0, 2, 1.0, 0.1, 1.0,	0, 2, 1.0, 0.6, 1.0,	0, 2, 1, 0.1, 1.0,	

It also gives me the same error if I put resource #30 back to default "Caguar Fur" and edit resource #31... so perhaps there's a limit to the number of colony-manufactured resources? To test this theory I edited #30 back to my custom "Hosing" and edited #19 back to the game's default "Loros Fruit"... (#19 has been successfully customised for a bunch of launches now).

This still gave me the error, so the issue is definitely with my custom #30 and #31. Next I tried #32, #33, and #34 one at a time (with #30 and #31 default Caguar Fur and Terallion Down, plus the previous 29 successfully modified resources).

#32 - customised resource "Petroleum" = FAIL
#33 - customised resource "Polymers" = FAIL
#34 - customised resource "Plutonium" = FAIL

So finally I tested the theory that there's a limit by having resources #18 - #29 the default ones, and editing #30 to #34 to be my custom resources and relaunch... this will test if #30 - #34 entries are the failure, or if they've somehow tripped some kind of hard coded maximum or something.

Launching this game works fine, with everything as default resources, but my own custom resources #30 - #34... bearing in mind that I'm cutting and pasting these from different files, so there's zero risk of it being typed wrongly sometimes and correctly other times.

So this conclusively proves that there's some kind of maximum being reached here... my best theory so far is that there is a maximum number of super-luxury resources of 12.

Now I'll test to see if I can make these resources into raw resources instead of super-luxury... I'm still a bit confused about the difference between super-luxury and colony-manufactured... they seem to be the same thing except for the variable ColonyManufacturingLevel. It seems if this is set to zero then the resource is a Super-Luxury that can be found anywhere, and if it's higher than zero (above a [to be confirmed] minimum of 100) that it only appears once a colony reaches a population of [ColonyManufacturingLevel x 100,000,000].
Image
User avatar
Drybreeze
Posts: 129
Joined: Thu Apr 14, 2016 11:21 pm
Contact:

RE: Colony created resources

Post by Drybreeze »

Two new developments:

1) I can successfully make all new resources Strategic resources, while leaving only #19 Aesthetics, #21 Awesome Aesthetics, #27 Fine Aesthetics, and #29 Glorious Aesthetics as Luxury Resources. #30 onwards are default game resources (Caguar Fur through to Yarras Marble).

2) By doing so, this results in a total of 15 Luxury resources in the list, in-game.

So it can't be a maximum of 12 luxury resources (since I was replacing them, not adding to them, before). So perhaps it has something to do with a maximum number of spawning locations? Since the default resources list has one planet per resource (#19 Loros Fruit onwards).

So I'm stumped. Now I guess I'll try giving #30 onwards only 1 potential spawning location instead of several each, and see if that makes a difference...

It'd be great if someone that knew what was going on here could shed some light and speed my learning curve...?
Image
Rosbjerg
Posts: 88
Joined: Wed Mar 11, 2015 4:02 pm

RE: Colony created resources

Post by Rosbjerg »

I don't think anyone really does, you're treading new waters - but it's interesting to follow :)
Post Reply

Return to “Design and Modding”