New manufactured resource: is this code OK?

isnorden

Amnesiac Modder
Joined
Jul 6, 2012
Messages
608
Location
Madison, Wisconsin, USA
As you probably saw in another thread, I'm working on an upgrade for my Brewery building that includes Beer as a luxury resource. So far, I've done a bare-bones XML write-up for Beer that includes most of the relevant data. I plan to cover the art atlases in a different file; however, I worry that I've left some other crucial bit of code out. Would you please take a look at the attached file and see whether anything except the atlas-related code is missing or incorrect? I'm using a version of DeepBlue's Resource Generator as a starting point, although some values won't apply: Beer is going to be produced by a building, so most map-related stats won't be necessary (at least, I don't think they will).
 

Attachments

While the resource code itself appears okay, you didn't cause the Brewery to produce beer. Here is some code of mine, written for the Community Call to Power project, which causes buildings to manufacture resources:

Code:
          <Building_ResourceQuantity>
          <!--dummy resources produced by tier 2 buildings-->
                                     <Row>
                                          <BuildingType>BUILDING_MEAT_3</BuildingType>
                                          <ResourceType>RESOURCE_FOOD_STOREHOUSE</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
                                     <Row>
                                          <BuildingType>BUILDING_PLANT_FOOD_3</BuildingType>
                                          <ResourceType>RESOURCE_FOOD_STOREHOUSE</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
                                     <Row>
                                          <BuildingType>BUILDING_NAP_3</BuildingType>
                                          <ResourceType>RESOURCE_NAP_STOREHOUSE</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
                                     <Row>
                                          <BuildingType>BUILDING_PRECIOUS_STONE_3</BuildingType>
                                          <ResourceType>RESOURCE_STONE_STOREHOUSE</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
                                     <Row>
                                          <BuildingType>BUILDING_COMMON_STONE_3</BuildingType>
                                          <ResourceType>RESOURCE_STONE_STOREHOUSE</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
                                     <Row>
                                          <BuildingType>BUILDING_PRECIOUS_METAL_3</BuildingType>
                                          <ResourceType>RESOURCE_METALS_STOREHOUSE</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
                                     <Row>
                                          <BuildingType>BUILDING_COMMON_METAL_3</BuildingType>
                                          <ResourceType>RESOURCE_METALS_STOREHOUSE</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
          <!--L3 dummy resources consumed by L4 Monopoly Buildings (Conglomerates)-->
                                     <Row>
                                          <BuildingType>BUILDING_FOOD_4</BuildingType>
                                          <ResourceType>RESOURCE_FOOD_DISTRIBUTION_CENTER</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
                                     <Row>
                                          <BuildingType>BUILDING_NAP_4</BuildingType>
                                          <ResourceType>RESOURCE_NAP_DISTRIBUTION_CENTER</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
                                     <Row>
                                          <BuildingType>BUILDING_STONE_4</BuildingType>
                                          <ResourceType>RESOURCE_STONE_DISTRIBUTION_CENTER</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
                                     <Row>
                                          <BuildingType>BUILDING_METALS_4</BuildingType>
                                          <ResourceType>RESOURCE_METALS_DISTRIBUTION_CENTER</ResourceType>
                                          <Quantity>1</Quantity>
                                     </Row>
          </Building_ResourceQuantity>
 
Thanks, I was wondering how to handle that part of the code! :thanx:
 
One last question: If I want Resource A to be a required material for manufacturing Resource B, where does that information go? In the resource description(s), the description(s) of the required building(s), or both? (I plan to add three manufactured resources to my modpack, including the Beer I've shown you so far.)
 
Back
Top Bottom