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

#151
Mods / Re: Modding help. Workbench issues
November 07, 2017, 05:06:48 PM
Here's a recipe that stands alone, and does not need a modification to the either the made thing or the bench:


  <RecipeDef>
    <defName>MakeShockStick</defName>
    <label>make a shock baton</label>
    <description>Use plasteel and components to make a shock baton.</description>
    <jobString>Making shock baton.</jobString>
    <workAmount>2500</workAmount>
    <workSpeedStat>SmithingSpeed</workSpeedStat>
    <effectWorking>Cook</effectWorking>
    <soundWorking>Recipe_Machining</soundWorking>
    <skillRequirements>
      <li>
        <skill>Crafting</skill>
        <minLevel>12</minLevel>
      </li>
    </skillRequirements>
    <workSkill>Crafting</workSkill>
    <recipeUsers>
      <li>TableMachining</li>
    </recipeUsers>
    <ingredients>
      <li>
        <filter>
          <thingDefs>
            <li>Steel</li>
          </thingDefs>
        </filter>
        <count>12</count>
      </li>
      <li>
        <filter>
          <thingDefs>
            <li>Plasteel</li>
          </thingDefs>
        </filter>
        <count>12</count>
      </li>
      <li>
        <filter>
          <thingDefs>
            <li>Component</li>
          </thingDefs>
        </filter>
        <count>2</count>
      </li>
    </ingredients>
    <products>
      <MeleeWeapon_Shock>1</MeleeWeapon_Shock>
    </products>
    <fixedIngredientFilter>
      <thingDefs>
        <li>Steel</li>  
        <li>Plasteel</li>
        <li>Component</li>
      </thingDefs>
    </fixedIngredientFilter>
  </RecipeDef>
#152
General Discussion / Re: I Call Bullsh*t
November 07, 2017, 03:20:44 PM
This entire thread is quickly becoming an ungraceful pissing contest.
#153
Mods / Re: Modding help. Workbench issues
November 07, 2017, 03:08:03 PM
An item needs an implicit or explicit recipe for the pawn to be able to craft the item.

The implicit recipe (and mostly the preferred method) is defined in the ThingDef, generally by making it have a costList AND a recipeMaker. You can see this by looking in WeaponsGuns.xml, looking at Gun_AssaultRifle, noting the costList there, and then tracing it through to the BaseHumanMakeableGun def, and seeing the recipeMaker there.

The explict recipe is done by making a RecipeDef.

I've done this many times, using either method, and I can confirm for you that they both work reliably. So you must have some kind of very basic error.

Either post the ThingDef (all of it) or the ThingDef and the RecipeDef, depending on which method you are using.
#154
Ideas / Re: Change 'Clear snow area' to 'Clear path area'
November 07, 2017, 08:59:31 AM
> But the fact remains that the intent behind clearing snow is to eliminate something on a tile that is slowing movement... so I don't see why this can't just be extended to include vegetation, chunks, corpses, etc.

It's a good suggestion. It should just be "clear path" or "clear area," where snow is just one of many obstacles.
#155
Mods / Re: Method for Grid Location 1 Higher
November 07, 2017, 08:03:17 AM
> No, I didn't mean vertical levels, sorry for the confusion. I meant grid locations, which in a 2D game I assumed were x and y.

In Rimworld, a Vec3 is x, y, z. X is left-right on the screen, z is up-down. y is towards-way from you, the viewer. I'm talking this knowledge from my extensive working with the drawing code. I'm not sure if it directly applies to GRID LOCATIONS, however. Those might be indexed from zero from lower left, or some such. With the drawing code 0, 0, 0 is relative to whatever you are drawing.
#156
Off-Topic / Re: Does someone have the Grass Texture?
November 07, 2017, 08:00:15 AM
> Maybe it requires the "Graphic_Random" class for some reason.

Given how the graphics classes work (I have implemented one), I would doubt that, but anything is possible. My guess is the why they are ALL random is simply that Tynan is leaving room to eventually have more textures without reworking. It makes sense to have multiple pine trees instead of just 1, etc.

#157
> where did the code that Varisha posted come from, and can it be edited? 

He likely found it with ILSpy by decompling RimWorld. It's in the FactionGenerator.cs class file. You can "change" this function by patching it using Harmony.

You'll have to reimplment the entire method. Typically this is done by copying the original code, changing to how you like, and then telling Harmony to only use your version of the Patch.

It's a bit tricky, but achievable for a diligent person.
#158
> Can anyone help with how to make a random integer in XML?

I don't think XML can randomly generate values. Looking on the net, there is a way to do this with XSLT, but it requires that the XML processor doing the processing support XSLT; I have no idea if RimWorld's does or doesn't. Look here: http://exslt.org/random/

#159
Off-Topic / Re: Does someone have the Grass Texture?
November 06, 2017, 11:51:38 AM
There is indeed only 1 grass texture in rimworld. You can find all rimworld's textures, including the UI elements  in Mods-->Help-->Rimworld core art source. Random fact: most Rimworld plants are implemented as "Graphic_Random," but only have 1 texture. This is funny, because the random designation means "randomly pick a texture". My Natural Textures mod uses many textures per plant. Grasses and mosses and the like tend to use ~5, where trees and similar tend to use 3. It gives the map a much more living feel.
#160
General Discussion / Re: I Call Bullsh*t
November 06, 2017, 10:56:35 AM
> If there were no debris, you could face tank F0 and F1 tornadoes without any shelter at all.

I feel like this should be a thing. "Let's get together, go outside, and face tank an F1 tornado, it'll be a BLAST." ;-P
#161
Mods / Re: [mod request] Prostitution mod
November 06, 2017, 07:41:26 AM
You haven't requested something purely evil enough: the forced prostitution of prisoners. I find it amusing and ironic that something like that would never be allowed in the base game, but killing, butchering and eating other people is. ;-P
#162
Mods / Re: Method for Grid Location 1 Higher
November 06, 2017, 07:40:00 AM
Slightly off topic, if you happen to be dealing with the Altitudes enums, it is perfectly valid to cast those to int, add or substract a number to them, and cast them back to enum. Just make sure you don't exceed the range, that will throw an exception. I use this approach in CompFX, for over/under FX.
#163
Unfinished / Re: 9thFinger's ThreadingMod
November 04, 2017, 02:13:00 PM
> Nope.

Crap. ;-P I keep hoping someone will know. ;-P
#164
Unfinished / Re: 9thFinger's ThreadingMod
November 04, 2017, 07:14:32 AM
Quote from: Kori on November 04, 2017, 12:39:28 AM
good news! :)

Have you succeeded in getting RW to run in a debugger, out of curiosity?
#165
Help / Re: InspectPanel
November 03, 2017, 08:14:19 AM
There is tickRare instead of tick--every 250 ticks.

Or you could just let tick fire, keep a count, and only take action if the value mod N == 0.