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 - Liegeman

#1
Help / Re: Prosthetic parts question
September 17, 2015, 01:04:49 PM
As far as I've been able to find with experimentation, Offset is a bonus the part applies to the whole. 0.2 for instance provides a flat 20% boost in, say, Moving.

Efficiency applies only to replacement parts, and refers to how much of the previous part they replace. So a peg leg slows down a pawn because it is only some percent as efficient as a meat leg. A bionic part is better because it as efficient as a meat leg and also provides a boost.

(At work and would need to see the defs for better/more accurate examples)
#2
Help / Re: Hediff that modifies Stats
September 16, 2015, 02:00:54 PM
Well perhaps if I have time I'll look into it. Sticking with xml level for this mod for now.
#3
Help / Hediff that modifies Stats
September 15, 2015, 05:53:20 PM
I'd like to make a few new cybernetics that modify specific colonist stats. Like a SubDermal Armor mod that gives them a natural armor rating. Is it possible with current code to do this, or am I looking at a dll mod?

Hediffs that I can find in Core only modify Capacities, which are far too broad for what I'm trying to achieve. (And don't affect things like armor anyway)
#4
Help / Automated Work Benches (Factories)
July 26, 2015, 01:38:35 PM
I'd like to make a workbench that can be assigned bills and then work on them itself, given hoppers full of the required resources.

Trouble is, I'm not sure how to even start on that. I've made simple factories before, but they just took an input and produced  a single kind of output constantly. My ideal result would be a Comp that could add this automation to any workbench it was attached to.

There's a lot of smart folks in this community, any thoughts?
#5
Help / Re: How Is Damage Assigned in a Cell?
July 24, 2015, 10:46:17 PM
Ah IlSpy. An excellent idea.


                                Thing thing = Find.ThingGrid.ThingAt(base.Position, ThingCategory.Pawn);
if (thing != null)
{
this.Impact(thing);
return;
}
List<Thing> list = Find.ThingGrid.ThingsListAt(base.Position);
for (int i = 0; i < list.Count; i++)
{
Thing thing2 = list[i];
if (thing2.def.fillPercent > 0f || thing2.def.passability != Traversability.Standable)
{
this.Impact(thing2);
return;
}
}
this.Impact(null);
return;


From this, it looks like the controlling factors are the fillPercent and it not being a thing that a pawn can stand on.

The problem is, it doesn't check in order of fillPercent, it just looks through the Things at the Position and hits the first one with a non-zero fill. I can't find any indication of the order (if any) that ThingsListAt returns the Things in.

What I'm trying to do is to make an "armor plate" building that could be constructed on a wall, and would then take any hits before the wall itself.
#6
Help / Re: How Is Damage Assigned in a Cell?
July 24, 2015, 01:22:18 PM
I suppose then the question is how does a projectile know which Thing it hits when passing through a cell. Say I somehow have two walls on the same space. Which one gets hit when a projectile collides with it?
#7
Help / How Is Damage Assigned in a Cell?
July 24, 2015, 12:21:05 PM
Say for instance I have a variety of buildings in a given cell (by cheating, at the moment) and a Mech opens up on that tile with a Minigun. How is damage assigned to Things in that cell?
#8
Help / Re: Minified GrowBuilding not being sown.
July 08, 2015, 10:19:39 AM
Yes. The tank does work when it's not coded to be minified. I did that first before adding that functionality.

It is indeed haulable and placeable by colonists. I don't have the plant def at hand (at work) I will try to get it up tonight. Not terribly interesting, and it did work when the tank was not able to be minified.
#9
Help / Re: Make turrets require hoppers?
July 06, 2015, 10:05:49 AM
My experience with hoppers tells me that the vanilla ones are incredibly limited in their implementation. They seem quite generic, but they are actually intended specifically for Nutri-paste dispensers.

Not too hard to clone the code and adjust them for turrets, but it is beyond the scope of a simple XML mod.
#10
Help / Minified GrowBuilding not being sown.
July 05, 2015, 02:56:22 PM
I have created a 1x1 hydro basin that can be constructed at a station and moved where needed. The issue is that, despite having the sow menu and such, colonists will never plant plants there.

<?xml version="1.0" encoding="utf-8" ?>
<ThingDefs>



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

    <ThingDef ParentName="BuildingBase">
        <defName>GrowTank</defName>
        <label>grow tank</label>
        <thingClass>Building_PlantGrower</thingClass>
        <graphicData>
            <texPath>Things/Building/Furniture/PlantPot</texPath>
            <graphicClass>Graphic_Single</graphicClass>
            <drawSize>(1,1)</drawSize>
        </graphicData>
        <minifiedDef>MinifiedGrowTank</minifiedDef>
        <passability>Impassable</passability>
        <fillPercent>0.75</fillPercent>
        <castEdgeShadows>true</castEdgeShadows>
        <statBases>
            <MaxHitPoints>180</MaxHitPoints>
            <Flammability>1.0</Flammability>
            <MarketValue>200</MarketValue>
        </statBases>
        <description>Algae growth tank.</description>
        <size>(1,1)</size>
        <inspectorTabs>
            <li>ITab_Growing</li>
        </inspectorTabs>
        <fertility>1.0</fertility>
        <building>
            <defaultPlantToGrow>PlantAlgae</defaultPlantToGrow>
            <plantsDestroyWithMe>true</plantsDestroyWithMe>
            <sowTag>Tank</sowTag>
        </building>
        <tickerType>Rare</tickerType>
        <comps>
            <li>
                <compClass>CompForbiddable</compClass>
            </li>
            <li>
                <compClass>CompPowerTrader</compClass>
                <basePowerConsumption>25</basePowerConsumption>
            </li>
        </comps>
        <costList>
            <Steel>40</Steel>
        </costList>
        <recipeMaker>
            <workSpeedStat>SmithingSpeed</workSpeedStat>
            <workSkill>Crafting</workSkill>
            <effectWorking>ConstructMetal</effectWorking>
            <soundWorking>Recipe_Machining</soundWorking>
            <recipeUsers>
                <li>TableMachining</li>
            </recipeUsers>
        </recipeMaker>
    </ThingDef>

</ThingDefs>


<?xml version="1.0" encoding="utf-8" ?>
<ThingDefinitions>

    <!-- ======================= Minified things ========================= -->

    <ThingDef Name="MinifiedBase" Abstract="True">
        <thingClass>MinifiedThing</thingClass>
        <category>Item</category>
        <useHitPoints>true</useHitPoints>
        <selectable>true</selectable>
        <altitudeLayer>Item</altitudeLayer>
        <!-- for CompForbiddable -->
        <drawerType>RealtimeOnly</drawerType>
        <comps>
            <li>
                <compClass>CompForbiddable</compClass>
            </li>
        </comps>
        <alwaysHaulable>true</alwaysHaulable>
        <rotatable>false</rotatable>
        <pathCost>15</pathCost>
    </ThingDef>


    <ThingDef ParentName="MinifiedBase">
        <defName>MinifiedGrowTank</defName>
        <label>grow tank</label>
        <thingCategories>
            <li>Items</li>
        </thingCategories>
    </ThingDef>


</ThingDefinitions>


Any thoughts from the clever folk here? I can't imagine that I'm the first to try this.

(Note: the "Tank" sowtag corresponds to a plant that I didn't post above.)
#11
Help / Re: Cybernetics that affect skills
May 18, 2015, 01:45:59 PM
The issue I've found is that (installed) body parts are not items. When a body part is applied to a pawn, it ceases to exist as a separate Thing, and becomes a Hediff on that pawn. Hediffs are basically health conditions.

Effectively, a cybernetic part becomes a health condition on the pawn, just like hypothermia, flu, etc. Only permanent of course. The surgery simply consumes the bodypart Thing to apply that condition to the target.
#12
Help / Cybernetics that affect skills
May 08, 2015, 07:21:25 PM
Is it possible?

I know they affect Capacities such as Manipulation and such, but if I want to create say, a drill arm, I want it to only increase mining. Not just Manipulation and all the fine motor skills that entails.
#13
Help / Adding a specific Background to a pawn
May 06, 2015, 02:19:15 PM
How can I do this? I know how to add a random one, and I can create one out of whole cloth in the code (although it doesn't survive save/load). I want to be able to create a pawn with a specific story (Lets say I'm making cave people that randomly spawn) such as Caveworld Tunneler.
#14
Help / Re: WorkTable not ticking?
April 03, 2015, 07:48:35 PM
No, I think I am saying that I did not know it defaulted to Never. Curious.
I suppose it saves processor cycles and memory.

I will add the tag and set it to normal. That should fix the issue.
#15
Help / Re: WorkTable not ticking?
April 02, 2015, 09:01:25 PM
It has neither, but I tried both. Does it default to Never?