[A14] Community Core Library v0.14.3.1

Started by RWCCLTeam, October 20, 2015, 12:08:13 PM

Previous topic - Next topic

Chestburster

Well i'm stuck now.. i took the example defs and compared them with my own but i cant find out why it is still throwing errors (Screenshot attached).

<AdvancedResearchDef>

<defName>CraftHMG</defName>
<Priority>0</Priority>

<researchDefs>
<li>BasicTurretCrafting</li>
</researchDefs>

<recipeDefs>
<li>BuildHMGTurret</li>
</recipeDefs>

<thingDefs>
<li>TableTinker</li>
</thingDefs>

</AdvancedResearchDef>




<RecipeDef>
<defName>BuildHMGTurret</defName>
<label>Build M2 Browning</label>
<description>Build a M2 Browning Turret Gun</description>
<jobString>Building M2 Turret Gun.</jobString>
<workAmount>8000</workAmount>
<workSpeedStat>SmeltingSpeed</workSpeedStat>
<effectWorking>Smelt</effectWorking>
<soundWorking>Recipe_Smelt</soundWorking>
<skillRequirements>
<li>
<skill>Crafting</skill>
<minLevel>6</minLevel>
</li>
</skillRequirements>
<ingredients>
<li>
<filter>
<thingDefs>
<li>Heavy_Component</li>
</thingDefs>
</filter>
<count>1</count>
</li>
<li>
<filter>
<thingDefs>
<li>Weapon_Parts</li>
</thingDefs>
</filter>
<count>10</count>
</li>
<li>
<filter>
<thingDefs>
<li>Spare_Parts</li>
</thingDefs>
</filter>
<count>10</count>
</li>
<li>
<filter>
<thingDefs>
<li>Parts_Steel</li>
</thingDefs>
</filter>
<count>5</count>
</li>
<li>
<filter>
<thingDefs>
<li>SyntheticMaterials</li>
</thingDefs>
</filter>
<count>2</count>
</li>
</ingredients>
<products>
<MGTurret_Crate>1</MGTurret_Crate>
</products>
<fixedIngredientFilter>
<thingDefs>
<li>Heavy_Component</li>
<li>Weapon_Parts</li>
<li>Spare_Parts</li>
<li>Parts_Steel</li>
<li>SyntheticMaterials</li>
</thingDefs>
</fixedIngredientFilter>
<workSkill>Crafting</workSkill>

</RecipeDef>




<ResearchProjectDef>
<defName>BasicTurretCrafting</defName>
<label>Basic Turret Crafting</label>
<description>Allows you to build the Tinker's Workbench.</description>
<totalCost>500</totalCost>
<prerequisites>
<li>AdvancedGunTurret</li>
</prerequisites>
</ResearchProjectDef>




<ThingDef ParentName="BenchBase">
<DefName>TableTinker</DefName>
<label>Tinker's Workstation</label>
<ThingClass>Building_WorkTable</ThingClass>
<Description>A workbench with tools for producing turrets.</Description>
<graphicData>
<texPath>Things/Building/Production/Tinker_Workbench</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>(3,1)</drawSize>
</graphicData>
<stuffCategories>
<li>MetallicParts</li>
</stuffCategories>
<costStuffCount>15</costStuffCount>
<CostList>
<Spare_Parts>5</Spare_Parts>
<ElectronicComponents>5</ElectronicComponents>
<Mechanism>5</Mechanism>
</CostList>
<AltitudeLayer>Waist</AltitudeLayer>
<fillPercent>0.5</fillPercent>
<useHitPoints>True</useHitPoints>
<statBases>
<WorkToMake>4750</WorkToMake>
<MaxHitPoints>300</MaxHitPoints>
<Flammability>1.0</Flammability>
<Cleanliness>-3</Cleanliness>
</statBases>
<Size>(3,1)</Size>
<DesignationCategory>Production</DesignationCategory>
<Passability>PassThroughOnly</Passability>
<pathCost>70</pathCost>
<hasInteractionCell>True</hasInteractionCell>
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
<surfaceType>Item</surfaceType>
<recipes>
<li>BuildHMGTurret</li>
<li>BuildAvengerTurret</li>
<li>BuildChainTurret</li>
<li>BuildVulcanTurret</li>
<li>BuildAGLTurret</li>
<li>BuildEMPTurret</li>
<li>BuildLaserTurret</li>
<li>BuildPLaserTurret</li>
<li>BuildPlasmaTurret</li>
<li>BuildAMTurret</li>
<li>BuildCannonTurret</li>
<li>BuildHowitzerTurret</li>
<li>BuildDevastatorTurret</li>
<li>BuildLMSTurret</li>
<li>BuildMMSTurret</li>
<li>BuildHMSTurret</li>
<li>BuildSteelBase</li>
<li>BuildPlasteelBase</li>
<li>BuildCopperBase</li>
<li>BuildAluminiumBase</li>
<li>BuildTitaniumBase</li>
<li>BuildVancidiumBase</li>
<li>BuildCarbonBase</li>
</recipes>
<inspectorTabs>
<li>ITab_Bills</li>
</inspectorTabs>
<building>
<spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
</building>
<comps>
<li>
<compClass>CompPowerTrader</compClass>
<startElectricalFires>true</startElectricalFires>
<basePowerConsumption>500</basePowerConsumption>
<soundPowerOn>PowerOnSmall</soundPowerOn>
<soundPowerOff>PowerOffSmall</soundPowerOff>
</li>
<li>
<compClass>CompAffectedByFacilities</compClass>
<linkableFacilities>
<li>Stool</li>
<li>Small_ToolCabinet</li>
</linkableFacilities>
</li>
<li Class="CommunityCoreLibrary.CompProperties_LowIdleDraw">
<compClass>CommunityCoreLibrary.CompPowerLowIdleDraw</compClass>
<idlePowerFactor>0.1</idlePowerFactor>
</li>
</comps>
<researchPrerequisite>BasicTurretCrafting</researchPrerequisite>
<placeWorkers>
<li>PlaceWorker_ShowFacilitiesConnections</li>
</placeWorkers>
</ThingDef>


PS: Can the hopper def be used to feed turrets with ammunition?

[attachment deleted due to age]

1000101

#16
Screenshots are useless, without an actual log showing the stack trace (which is what's really important), I can't help you much.  Something can't find what it wants but without knowing what that something is, no help can be given.

The best help you will get will require the best information you can provide.  ie, the complete log, the mod itself, etc.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Chestburster

I hope those 3 attachments are more helpful.

[attachment deleted due to age]

1000101

It's your directory structure.  Make sure you spell things correctly.

RecipeDef <--- Should be RecipeDefs

I think the root of your problem is that you aren't doing enough on your part to do self checking.  None of this has to do with CCL.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

1000101

In regards to your question about hoppers, they can be used to feed anything to anything.  You need to write the code on the user side, however, to make use of them.  They aren't an "xml only" tool, they are designed for making buildings which will take resources out of the hopper and as such provide an easy to use interface to abstract enumeration of hoppers and resources.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Chestburster

Thanks 69. I never noticed the missing s there, only searching inside the files. It must have happened after rebuilding the folder structure on my work PC and copying it on my laptop.

I'll take a look at the hopper code. Thanks again.

kyzy_4399

Hi there. I try to use the Refrigerated_Meal_Shelf MOD in my new game, so I copy the assemble: Community Core Library with a new mod fold and past the def of Refrigerated_Meal_Shelf into defs. Everything look great because there is no alram box or mistake, then I realize that the Mod fridge does not really work on game, which means foods keep rot and deteriorate when they are put in fridge. So I wonder does I did anything wrong?

TLHeart

Quote from: kyzy_4399 on November 06, 2015, 10:33:56 PM
Hi there. I try to use the Refrigerated_Meal_Shelf MOD in my new game, so I copy the assemble: Community Core Library with a new mod fold and past the def of Refrigerated_Meal_Shelf into defs. Everything look great because there is no alram box or mistake, then I realize that the Mod fridge does not really work on game, which means foods keep rot and deteriorate when they are put in fridge. So I wonder does I did anything wrong?

here is a copy of the refrigerated storage rack I use, that works with no problems.


  <ThingDef ParentName="FurnitureBase">
    <defName>Ref-FoodRack</defName>
    <label> refrigerated food rack</label>
    <thingClass>Building_Storage</thingClass>
    <graphicData>
      <texPath>Things/Building/Furniture/Ref-FoodRack</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(2,1)</drawSize>
    </graphicData>
    <altitudeLayer>Waist</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <fillPercent>0.4</fillPercent>
    <castEdgeShadows>true</castEdgeShadows>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
      <li>Stony</li>
    </stuffCategories>
    <costStuffCount>30</costStuffCount>
    <statBases>
      <MaxHitPoints>100</MaxHitPoints>
      <WorkToMake>1050</WorkToMake>
      <Flammability>1.0</Flammability>
    </statBases>
    <description>Provides a simple storage solution for foods. Prevents deteriation, and keeps food refrigerated..</description>
    <size>(2,1)</size>
    <building>
      <preventDeterioration>true</preventDeterioration>
      <fixedStorageSettings>
        <filter>
          <categories>
            <li>Foods</li>
          </categories>
        </filter>
      </fixedStorageSettings>
      <defaultStorageSettings>
<priority>Important</priority>
<filter>
<categories>
<li>FoodMeals</li>
</categories>

</filter>

</defaultStorageSettings>
    </building>
<comps>
            <li>
                <compClass>CommunityCoreLibrary.CompRefrigerated</compClass>
            </li>
            <li>
                <compClass>CompForbiddable</compClass>
            </li>
            <li>
                <compClass>CompPowerTrader</compClass>
                <basePowerConsumption>100</basePowerConsumption>
            </li>
            <li Class="CommunityCoreLibrary.CompProperties_LowIdleDraw">
                <compClass>CommunityCoreLibrary.CompPowerLowIdleDraw</compClass>
                <idlePowerFactor>0.25</idlePowerFactor>
                <operationalMode>Cycle</operationalMode>
                <cycleLowTicks>2500</cycleLowTicks>
                <cycleHighTicks>1500</cycleHighTicks>
            </li>
        </comps>

    <inspectorTabs>
      <li>ITab_Storage</li>
    </inspectorTabs>
    <staticSunShadowHeight>0.5</staticSunShadowHeight>
    <surfaceType>Item</surfaceType>
  </ThingDef>

kyzy_4399

Quote from: TLHeart on November 07, 2015, 12:23:35 AM
Quote from: kyzy_4399 on November 06, 2015, 10:33:56 PM
Hi there. I try to use the Refrigerated_Meal_Shelf MOD in my new game, so I copy the assemble: Community Core Library with a new mod fold and past the def of Refrigerated_Meal_Shelf into defs. Everything look great because there is no alram box or mistake, then I realize that the Mod fridge does not really work on game, which means foods keep rot and deteriorate when they are put in fridge. So I wonder does I did anything wrong?

here is a copy of the refrigerated storage rack I use, that works with no problems.


  <ThingDef ParentName="FurnitureBase">
    <defName>Ref-FoodRack</defName>
    <label> refrigerated food rack</label>
    <thingClass>Building_Storage</thingClass>
    <graphicData>
      <texPath>Things/Building/Furniture/Ref-FoodRack</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(2,1)</drawSize>
    </graphicData>
    <altitudeLayer>Waist</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <fillPercent>0.4</fillPercent>
    <castEdgeShadows>true</castEdgeShadows>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
      <li>Stony</li>
    </stuffCategories>
    <costStuffCount>30</costStuffCount>
    <statBases>
      <MaxHitPoints>100</MaxHitPoints>
      <WorkToMake>1050</WorkToMake>
      <Flammability>1.0</Flammability>
    </statBases>
    <description>Provides a simple storage solution for foods. Prevents deteriation, and keeps food refrigerated..</description>
    <size>(2,1)</size>
    <building>
      <preventDeterioration>true</preventDeterioration>
      <fixedStorageSettings>
        <filter>
          <categories>
            <li>Foods</li>
          </categories>
        </filter>
      </fixedStorageSettings>
      <defaultStorageSettings>
<priority>Important</priority>
<filter>
<categories>
<li>FoodMeals</li>
</categories>

</filter>

</defaultStorageSettings>
    </building>
<comps>
            <li>
                <compClass>CommunityCoreLibrary.CompRefrigerated</compClass>
            </li>
            <li>
                <compClass>CompForbiddable</compClass>
            </li>
            <li>
                <compClass>CompPowerTrader</compClass>
                <basePowerConsumption>100</basePowerConsumption>
            </li>
            <li Class="CommunityCoreLibrary.CompProperties_LowIdleDraw">
                <compClass>CommunityCoreLibrary.CompPowerLowIdleDraw</compClass>
                <idlePowerFactor>0.25</idlePowerFactor>
                <operationalMode>Cycle</operationalMode>
                <cycleLowTicks>2500</cycleLowTicks>
                <cycleHighTicks>1500</cycleHighTicks>
            </li>
        </comps>

    <inspectorTabs>
      <li>ITab_Storage</li>
    </inspectorTabs>
    <staticSunShadowHeight>0.5</staticSunShadowHeight>
    <surfaceType>Item</surfaceType>
  </ThingDef>


Hi, I check the example mod and your post, and I feel that only different is the BuildingBase and FurnitureBase. So do u think is there anything special in your FurnitureBase comps or sth? I still can not get it works. :(

TLHeart

Quote from: kyzy_4399 on November 07, 2015, 01:16:29 AM



Hi, I check the example mod and your post, and I feel that only different is the BuildingBase and FurnitureBase. So do u think is there anything special in your FurnitureBase comps or sth? I still can not get it works. :(

nothing special there, did you also include the parent definition?  This one is from the example.

Also, you need to start the game if you change anything with the mods, for the CCL refrigeration to work... If it is not working, exit rimworld to the desktop, restart rimworld.


    <ThingDef Name="BuildingBase" Abstract="True">
        <category>Building</category>
        <soundImpactDefault>BulletImpactMetal</soundImpactDefault>
        <selectable>true</selectable>
        <drawerType>MapMeshAndRealTime</drawerType>
        <altitudeLayer>Waist</altitudeLayer>
        <terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
        <repairEffect>Repair</repairEffect>
        <leaveResourcesWhenKilled>true</leaveResourcesWhenKilled>
        <filthLeaving>BuildingRubble</filthLeaving>
    </ThingDef>

Hague

Great Resource you have here!

Can I make a suggestion? How about a filthProducer comp that can be added to buildings? It could hook in to the active power so petrochemical plants and charcoal plants could produce temporary air pollution or leave soot or grime around. Brewing/cooking could leave behind It would produce filth in a room or area around a room with certain variables. Of course, a <thingDef> would define what type of filth to be spawned. I mean, it doesn't necessarily have to be filth, it could be any thingDef but it would probably be easier to work with just filth. The idea would be to set a radius for the spawn, ticks to spawn and whether or not the building needs to be actively powered or operated for it to produce filth. Could open up a lot of avenues for several things: Events that spawn buildings that generate dangerous things while its battery lasts. Could even make a device that produces 'filth' that improves the beauty of the environment or adds to room cleanliness (incense burners) or air sterilizing agents.

What do you think?

1000101

#26
Quote from: kyzy_4399...so I copy the assemble: Community Core Library...

Be sure to read the documentation and all note sections in the main thread (which has multiple (10) entries).  Specifically the part where it tells you NOT to do that.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

RawCode

your mods under normal conditions should not include any 3rd party code or content, not limited to CCL.

Issue is classloading and domain handling rules that causes "DLL HELL" in case of mods - "CLASS HELL".

RWCCLTeam

v0.12.6 Update - It's About Freaking Time!

New features added, lots of code refactored and optimized, new bugs introduced!  (Hopefully not on the last point.)

Iwillbenicetou

Mod Help! The basics on how to download mods!