Advertisement
Serenitis

DW Manufactured Resources

Nov 29th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.97 KB | None | 0 0
  1. There are lots of resources in Distant worlds, but there are some that were never used in the final release.
  2. These are the resources that are created *by* your colonies.
  3.  
  4. You only really need to do two things to add these resources into the game:
  5. - add an entry for them into the <resources.txt> file in the DW folder
  6. - add a png image for your resource to ..\DW\images\UI\resources\
  7.  
  8. This is the quick and dirty way. It involves messing with core files so it is potentially a bit dodgy.
  9. It's much safer (and no harder) to make a theme for this, or add it one that already exists.
  10.  
  11. Let's assume that we'll create a new theme for this.
  12. Open wherever you installed DW to and go to the <customization> folder, and inside that folder create a new folder with a suitable name.
  13. Now you have somewhere for your theme to go.
  14. First thing you should do now is go back to the main DW folder and find <resources.txt> and copy it into your new theme folder.
  15.  
  16. Before we mess with anything, let's set up the space we'll need for the images to prevent any mucking about later.
  17. In the theme folder create another new folder called <images>.
  18. Then inside <images> create a folder called <UI>, and inside <UI> create a folder called <resources>.
  19. So you end up with something like:
  20. C:\Distant Worlds\customization\<theme name>\images\UI\resources\
  21. For future ref. we'll call this the "image folder".
  22.  
  23. Okay, here's where we mess stuff up so it doesn't work any more.
  24. Open up the copy of <resources.txt> you made in the theme folder and behold the shit behind the fun.
  25. You can use a plain text editor or anything that can handle csv. (If you want to make your own stuff csv is prob. better. If you can't be bothered doing that and want to copypaste it in text is better.)
  26.  
  27. The good bit is that the file contains a full set of instructions on which bit does what.
  28. The bad bit is it's more than a little opaque about a few things
  29. We'll go through it line by line:
  30.  
  31. ----------------------------------------------------
  32.  
  33. 'each line defines a single resource with comma-separated data, up to a maximum of 80 resources (0-79)
  34. 'Basic Information:
  35.  
  36. ' - ID: numeric ID value of resource
  37. Just take the next available number. Don't miss any out - so sequential only. Don't go above 79.
  38.  
  39. ' - Name: text of resource name
  40. Call your new resource something here.
  41.  
  42. ' - PictureRef: index value mapping to image used to display resource (\ui\resources folder)
  43. This links your resource to it's picture in the image folder.
  44. Image must be png, but can be any size/shape. It will get squashed down to tiny so bigger isn't better.
  45. Must be named <resource_xx.png>, where xx is a number ranging from 41-79 (assuming we're not replacing any stock things).
  46. This will likely be the same number as the ID above, but doesn't have to be.
  47.  
  48. ' - BasePrice: base price of resource when buying and selling. Note that the actual price fluctuates based on galaxy supply and demand
  49. How much spaceports will dosh out for 1 unit of this.
  50. For ref. basic stuff is worth about 5, luxuries about 20, and super luxuries about 250.
  51.  
  52. ' - Type of Resource: 0=Mineral, 1=Gas, 2=Luxury
  53. This is important. A manufactured good is classed as a luxury so should always be 2.
  54. If you set it at anything else it just won't appear.
  55.  
  56. ' - SuperLuxuryBonusAmount: numeric value that indicates special development bonus for colonies with this luxury resource, range from 0 (no bonus, i.e. not a super luxury resource) to 50
  57. This is the thing that controls how super luxuries (those things that appear onl in 1 or 2 places) behave.
  58. Set this to 0 for manufactured goods. If you don't it will behave like a super luxury and will spawn "in the wild" and appear on diplomacy lists etc.
  59.  
  60. ' - IsFuel: Y/N value indicating whether this is fuel resource used in reactors
  61. I honestly don't know if you can use manufactured goods as fuel. It would need to have it's own reactor made at least if so.
  62. For our purposes put N.
  63.  
  64. ' - IsImportantPreWarpResource: Y/N value indicating whether this resource is important to have in home system of prewarp empires
  65. Manufactured goods cannot be spawned in pre-warp systems because they are made by colonies.
  66. Set to N to avoid odd behaviour with the game trying to spawn resources pre-game that need a developed colony.
  67.  
  68. ' - ColonyGrowthResourceLevel: numeric value indicating level of resource required for growth at colonies, range from 0 (not required) to 1.0 (lots of this resource required)
  69. Dictates how much of this thing colonies want to import. Enter a decimal between 0-1.
  70. 0.2 seems to be a comfy number here.
  71.  
  72. ' - ColonyManufacturingLevel: numeric value indicating whether resource is a manufactured resource at colonies. When greater than zero then resource is not naturally occurring but rather is manufactured at sufficiently developed colonies. Value indicates required population and development level before resource may randomly appear at a colony: value = population in billions * development level
  73. Here we go. This little thing is what we need to turn everything on.
  74. If you put 1000 here, your resource will show up roughly when the planet gets to 10,000M pop at an assumed development level of 100%.
  75. Colonies with a higher dev. level will spawn the resource sooner and vice-versa.
  76.  
  77. 'Distribution and Prevalance Information - Multiple entries allowed, each with 5 values as follows:
  78. ' - Type: 0=Planet/Moon, 1=Asteroid, 2=GasCloud
  79. *
  80. This should always be 0 because colonies are on planets.
  81.  
  82. ' - SubType: 0=Continental, 1=MarshySwamp, 2=Ocean, 3=Desert, 4=Ice, 5=Volcanic, 6=BarrenRock, 7=GasGiant, 8=FrozenGasGiant, 9=Metal (asteroid), 10=Ammonia, 11=Argon, 12=CarbonDioxide, 13=Chlorine, 14=Helium, 15=Hydrogen, 16=NitrogenOxygen, 17=Oxygen
  83. *
  84. This can only be 0-5 to cover the six types of colonisable planet.
  85.  
  86. ' - 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
  87. *
  88. Controls if this resource appears at all with a simple modifier.
  89. 0 = does not appear at all
  90. 0.5 = appears 50% of the time
  91. 1 = always appears
  92. I have mine set to 0.5 just for some variation between planets.
  93.  
  94. ' - Abundance Minimum: minimum abundance of resource at this type of planet/moon/asteroid/gas cloud. Range from 0 (0% abundance) to 1.0 (100% abundance). Actual abundance is random value between Minimum and Maximum
  95. *
  96. ' - Abundance Maximum: maximum abundance of resource at this type of planet/moon/asteroid/gas cloud. Must be higher than Minimum value above. Range from 0 (0% abundance) to 1.0 (100% abundance). Actual abundance is random value between Minimum and Maximum
  97. *
  98. Sets the minimum and maximum possible %age the resource can appear at. Both can be 0.01-1.0 but maximum must be higher than minimum.
  99. 0.1 = 10%
  100. 1.0 = 100%
  101.  
  102. The entries above with a * can be repeated together as a block to make the resource appear at multiple types of colony.
  103.  
  104. ----------------------------------------------------
  105.  
  106. After all that you should have something that looks like this:
  107.  
  108. ----------------------------------------------------
  109.  
  110. 41, Manufactured Goods, 41, 8.0, 2, 0, N, N, 0.5, 550, 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,
  111. 42, Solar Battery, 42, 8.0, 2, 0, N, N, 0.2, 1250, 0, 3, 0.2, 0.1, 0.3,
  112. 43, Purified Water, 43, 8.0, 2, 0, N, N, 0.2, 1250, 0, 2, 0.2, 0.1, 0.3,
  113. 44, Agricultural Goods, 44, 8.0, 2, 0, N, N, 0.2, 1250, 0, 0, 0.2, 0.1, 0.3,
  114. 45, Carbon Biofuels, 45, 8.0, 2, 0, N, N, 0.2, 1250, 0, 1, 0.2, 0.1, 0.3,
  115. 46, Refined Heavy Metals, 46, 8.0, 2, 0, N, N, 0.2, 1250, 0, 5, 0.2, 0.1, 0.3,
  116. 47, Refined Cryominerals, 47, 8.0, 2, 0, N, N, 0.2, 1250, 0, 4, 0.2, 0.1, 0.3,
  117. 48, Industrial Supplies, 48, 12.0, 2, 0, N, N, 0.3, 850, 0, 0, 0.2, 0.1, 0.3, 0, 1, 0.2, 0.1, 0.3, 0, 2, 0.2, 0.1, 0.3, 0, 3, 0.2, 0.1, 0.3, 0, 4, 0.2, 0.1, 0.3, 0, 5, 0.2, 0.1, 0.3,
  118.  
  119. ----------------------------------------------------
  120.  
  121. You can see that there are six lines which each have a single location entry (the * group above). These will only appear at one type of world.
  122. Eg; Purified Water only appears on ocean colonies because the 2nd number in the * group is a 2, which if you scroll up we are told means ocean.
  123.  
  124. There are also two lines which have six location entries, which means they appear on ALL colonies.
  125. You can mess with the numbers here to make some goods rare on certain worlds but common on others.
  126.  
  127. Now, all you need to do is findsteal some images from somewhere and drop them into the image folder and rename them to suit.
  128. I used images from Starsector. I'm sure Alex won't mind. (Shhhhhh. Don't tell him.)
  129. And the start the game and use the "change theme" option on the main menu to load it up.
  130.  
  131. I'm sure there will be questions.
  132. Put them in the thread, I'm sure I'll be able to confuse you some more.
  133.  
  134. Back to Guide Index: https://pastebin.com/hubsc3ZS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement