Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - scr1982

#1
Quote from: Nasikabatrachus on March 08, 2014, 01:31:21 AM
worktables have to be 3 by 1 to be recognized as worktables by the workgiver AI. I spent a few hours trying to figure out why the worktable I partially modeled on the NPD wasn't doing anything.

That's interesting I made a 1x1 Mill for my grain mod and it works...

Thank you for the tips on NutrientPasteDispenser code stuff - that makes sense and confirms my hunch. :)
#2
Help / Modding a new 'type' of nutrient dispenser
March 07, 2014, 11:43:04 PM
Hi all,

I am trying to build a mod that makes beer and I thought the nutrient dispenser item would be better to mod out than a table item. So I tried using similar XML to make this. However when the 'BeerDispenser' is built it operates just like a normal dispenser. I can't find anywhere to make beer come out rather than Nutrient Paste. There is no recipe def for Nutrient paste but there is a (unused?) thingdef for MealNutrientPaste. Any ideas of how to adapt to make this work?

Nutrient Dispenser Def adapted for beer brewing.
<ThingDef ParentName="BuildingBase">
<defName>BeerDispenser</defName>
<eType>BuildingComplex</eType>
<label>Brewery</label>
<thingClass>Building_NutrientPasteDispenser</thingClass>
<texturePath>Things/Building/NutrientDispenser</texturePath>
<altitudeLayer>BuildingTall</altitudeLayer>
<passability>Impassable</passability>
<castEdgeShadows>true</castEdgeShadows>
<fillPercent>1</fillPercent>
<maxHealth>350</maxHealth>
<flammability>1.0</flammability>
<description>Brews Beer for the needy.</description>
<comps>
<li>
<compClass>CompPowerTrader</compClass>
<startElectricalFires>true</startElectricalFires>
<basePowerConsumption>200</basePowerConsumption>
</li>
</comps>
<size>(3,4)</size>
<workToBuild>600</workToBuild>
<costList>
<li>
<thingDef>Metal</thingDef>
<count>90</count>
</li>
</costList>
<overdraw>true</overdraw>
<interactionSquareOffset>(0,0,3)</interactionSquareOffset>
<hasInteractionSquare>true</hasInteractionSquare>
<killedLeavings>
<li>
<thingDef>DebrisSlag</thingDef>
<count>6</count>
</li>
</killedLeavings>
<filthLeavings>
<li>
<thingDef>SlagRubble</thingDef>
<count>3</count>
</li>
</filthLeavings>
<leaveResourcesWhenKilled>true</leaveResourcesWhenKilled>
<surfaceNeeded>Heavy</surfaceNeeded>
<designationCategory>Building</designationCategory>
<staticSunShadowHeight>0.75</staticSunShadowHeight>
</ThingDef>


Example meal produced:
<ThingDef ParentName="MealBase">
<defName>Beer</defName>
<label>Beer</label>
<description>Brewed beer for the stressed or depressed person.</description>
<texturePath>Things/Resource/Beer/Beer</texturePath>
<basePrice>2.5</basePrice>
<food>
<quality>Meal</quality>
<nutrition>22</nutrition>
<eatenDirectThought>DrankBeerThought</eatenDirectThought> <!-- new thought type -->
<eatEffect>DrankBeer</eatEffect> <!-- Use new Eat Effect -->
<ticksBeforeSpoil>80000</ticksBeforeSpoil>
</food>
</ThingDef>


Example Beer Recipe:
<RecipeDef>
<defName>BrewBeer</defName>
<label>Brewing beer</label>
<description>Basic beer.</description>
<jobString>Brewing Beer.</jobString>
<workAmount>300</workAmount>
<workTimeSkillNeed>CookTime</workTimeSkillNeed>
<ingredients>
<li>
<filter>
<thingDefs>
<li>Grain</li>
</thingDefs>
</filter>
<count>10</count>
</li>
</ingredients>
<products>
<li>
<thingDef>Beer</thingDef>
<count>1</count>
</li>
</products>
<parentIngredientFilter>
<thingDefs>
<li>Grain</li>
</thingDefs>
</parentIngredientFilter>
<defaultIngredientFilter>
<thingDefs>
<li>Grain</li>
</thingDefs>
</defaultIngredientFilter>
<skillRequirements>
<li>
<skill>Cooking</skill>
<minLevel>1</minLevel>
<!-- <minLevel>5</minLevel>  leveling cooking still not implemented -->
</li>
</skillRequirements>
</RecipeDef>


To me, it looks like "      <thingClass>Building_NutrientPasteDispenser</thingClass>" is the culprit and what I am trying to do can't occur with the current level of modding. Will someone verify this?

As an alternative, I can always make a normal thingdef in the furniture way, but I wanted to try and use dispenser/hoppers for this.

Thanks for help.
#3
Outdated / Wheat/grain/bread mod
March 01, 2014, 07:11:54 AM
I'm keen on getting to know all the modding details so I thought I would try a chain from growing to processing to eating... Would like someone to try it out and feedback. The textures are very rough but you get the picture.

I plan to make Beer part of this tree and implement some sort of consumable induced coma useful for waiting out solar flares.

Cheers! ;)

Edit: I just noticed that the milling work priority wasn't great so I will fix that.
Question: Why do the wheat/grains/flour show the number stacked on the screen but the bread loaves don't unless you select them?

[attachment deleted by admin: too old]