Ludeon Forums

Ludeon Forums

  • April 03, 2020, 07:52:35 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

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.

Topics - 1000101

Pages: [1] 2
1
Outdated / [A14] Pastafarianism v3 (15/08/2016)
« on: August 02, 2016, 01:06:28 AM »


Our Pasta

Our Pasta, who “Arghh” in heaven, Swallowed be thy shame. Thy Midgit come. Thy Sauce be yum, On top some grated Parmesan. Give us this day our garlic bread. And give us our cutlasses, As we swashbuckle, splice the main-brace and cuss. And lead us into temptation, But deliver us some Pizza. For thine are Meatballs, and the beer, and the strippers, for ever and ever. RAmen.




A nice temple for the colonists


Don your colander and pray to the mighty FSM!



This mod requires Community Core Library v0.14.2 or later for ThinkTree injection points



This mod shows off a basic proof of concept for adding a religion framework to the game (to be expanded on and made modder friendly later).  Currently, it's a silly little mod made after a short conversation in the RimWorld Modding Slack.

This mod adds a new need - Pastafarianism - for your colonists and depending on the average colony level two different incidents can occur.  If the average need is low then the Flying Spaghetti Monster may downgrade some of your meals one level (lavish->fine->simple->paste) and if the colony average is high, then the FSM may upgrade some of your meals one level (paste->simple->fine->lavish).

Colonists also have thoughts based on the their "Pastafarianism need" ranging from a -10 mood debuff to a +10 mood buff.

The need is prioritized and balanced against the other needs so your colonists aren't starved for any single need and will take the appropriate actions at the appropriate times to fulfill them.  Right now the Pastafarianism need can only be filled when the colonist is allowed to to joy activities.  I may add special scheduling for this later but currently it works well and I feel it fits in with the joy scheduling.  That being said, this need is completely independent of joy and the only overlap is the scheduling.

To increase a colonists Pastafarianism meter build a totem for them to pray at.  If you have colanders for your colonists, they will put one on (stashing their current hat in their inventory) before praying which will double the effectiveness of their prayers.  Once done praying they will drop the colander and put their hat back on (and remember whether it was forced or not).


THIS MOD IS SILLY AND NOTHING ELSE!  IT IS ONLY A PROOF OF CONCEPT!

Credits:
Code: 1000101
Colander: 3dgrunge
Small Totem: Shinzy
Large Totem: Interwebs



changelog:
Code: [Select]
v3 (15/08/2016):
+ Pastafarianism need doesn't go down when a pawn is in bed
+ Mod now makes use of CCL's ThinkTreeDef injection points, specifically for needs so it doesn't completely overwrite the sub-trees
+ Prisoners can properly fill their Pastafarianism need as long as there is a totem in their prison
+ Small bugs fixed which would cause null reference errors for prisoners
+ Totems are "socially proper", colonists won't use totems in prisons and prisoners won't try to use totems outside of prisons

v2 (03/08/2016):
+ Changes the ThinkTree to PreMain and uses a need priority sorter to balance the need with other needs and work jobs
+ Adds a room role for "temples"
+ Adds thoughts similar to the joy need thoughts to give a more immediate incentive to dealing with the need
+ Fixes a save/load bug regarding stashing hats (everything worked but apparently equiping apparel from inventory doesn't remove it from the inventory)
+ Tweaks the incidents weights for the average colony need as well as doubling the weight for "very high" (>90%) and "very low" (<10%)
+ Added the graphics for shinzy's small totem which I forgot to in the original release

v1 (31/07/2016):
+ First release showing a silly proof-of-concept mod for religion



Mods used in screenshots:

Note:  The above mods are mentioned only because they are depicted in the screenshots.

[attachment deleted by admin - too old]

2
Bugs / [A14] Game does not reload mods on load order change
« on: July 21, 2016, 11:16:58 PM »
ModLister.InstalledModsListHash() always uses an alphabetical list of mods and not the load order list which means that it will not reload the mods when the load order changes.  I have detoured this in CCL to use ModsConfig.ActiveModsInLoadOrder and it correctly reloads the mods if the load order changes.

3
Bugs / [0.14.1234] Cannot find siege spot...
« on: July 16, 2016, 08:07:11 PM »
If you build walls around your colony to completely encircle it at the very edge of the buildable area, the siege will spawn but will throw an error.

Code: [Select]
Could not find siege spot from (0, 0, 26), using (0, 0, 26)
Screenshot of colony (max zoom 960x960 px):
https://www.dropbox.com/s/tc9620oceseey1n/Siege_Error.png

4
Unfinished / [A14][WIP] Prisoners & Slaves - Testing Release
« on: June 19, 2016, 10:55:59 AM »
Prisoners & Slaves

This is a mod about the size and scope of Hospitality by Orion.  Unlike Hospitality, which deals with guests, this mod deals with wardens and the prisoners and slaves they need to keep in line.

When this mod is ready for release I will create it's own thread for it.  I only post this now because some people have seen it and others asked.  This is going to be kept to list form with a follow up post with some early screen shots.

Things that are done:
  • Custom door class with auto-replacer (only works for building new doors, existing doors when added to a save will be vanilla)
  • Restrictions for custom doors (allow prisoners, slaves, guests or only the room owners) as well as the ultimate override - Lock.  That's right, doors can be physically locked again (pawn flick job to [un]lock).  Wardens can also remotely auto-[un]lock autodoors (and designate other doors) when monitoring security stations (more on security stations below).
  • Room markers for designating that prisoners and/or slaves may enter it.  Two in-game objects exist for this, a simple no-cost sign and small material cost (and with some vanilla research) security cameras which have "observable cells" (controlled by placement rotation, FoV, range and LOS) which can be remotely monitored at...
  • ...Security stations for remotely monitoring multiple cameras in different areas at the same time which come in two tiers:
    • The first unlockable with security cameras can monitor three cameras at the same time.
    • The second tier research bench (after a little more vanilla research) can monitor 12 cameras at the same time.
    The warden monitoring the security station will cycle through all the colonies cameras based on how long it's been since it was monitored last.  If there is "something of interest" in a cameras observable cells (ie, a hostile threat, crime (WIP, see below), etc), the warden will "lock onto" that camera (until all the monitors are locked onto something) and auto-lock all doors to that room (see above).
  • A new utility minimap overlay to show security camera coverage to help you with...
  • ...the pawn minimap overlay overrides to restrict non-colonists (wildlife, prisoner, guests, hostiles, etc) to only showing up if "the colony" has a LOS to the pawn - either direct LOS from a colonist or in an observable cell of an actively monitored security camera.  (May make this toggleable for wussies.)
  • Wardens will enforce "laws" in the colony if they see one being broken - direct LoS, alerted by a warden monitoring a security station or monitored at a security station.
    Currently, there are only two laws:
    • Public drunkenness - If a pawn is "drunk" or more severely intoxicated and is in a "public place" (room they don't own), a warden will escort colonists to their private rooms to "sleep it off" or they will be arrested, taken to prison and released* after one day.  Non-lethal** force is authorised.
    • Social fighting - The instigating pawn will be arrested, taken to prison and released* after one day.  Non-lethal** force is authorised.
    * Releasing after their time is up is not yet implemented.
    ** "Non-lethal" means that the weapon has the "stun" effect.  They will still Rodney King his ass.
  • Non-lethal weapon(s):
    • A "side handled baton" - Currently the only non-lethal.  Common to police forces everywhere is the simple baton, does 1 physical damage but can stun the target.  Useful for subduing those pawns who resist arrest.
  • Lockable apparel which applies to separate and explicit hand cuffing and leg shackling, and the real reason you're hear - slave collars.
    These apparel items can be freely removed from corpses or the prisoner/slave has to be explicitly marked for cuffing/shackling which is a warden job.  Prisoners have an "interaction mode" for enslavement and slaves have an interaction mode for release.
    The only other way to try to remove them is to pick the lock.  Picking the lock is always successful but it takes time which is factored by the quality of the lock (apparel quality), manipulation capacity of the pawn, whether they are trying to pick the lock on an apparel they or someone else is wearing (it's harder to pick your own cuffs).
    The new "apparel":
    • Slave Collars - Shave a prisoners head and slap this around their neck.  Turn any prisoner into a slave who can then be forced to labour for the colony.  All work types unrestricted despite their back stories with the exception of warden which is always locked out to slaves.  Slightly reduces movement speed, global work speed and social impact.
    • Hand Cuffs - Reduces a pawns manipulation capacity by 90% (and prevents them from picking up items WIP)
    • Leg Shackles - Reduces a pawns moving speed by 40%.  Slow those prisoners and slaves down if they try to run.
  • New Prisoner/Slave tab on pawns.  New features added for new functionality, layout changed a bit for easier usage.
  • New Slave main tab.  A combination of the Work and Assignment tabs.
    • Work - Assign any work to a slave regardless of their back story restrictions.  The only work slaves can't do is warden.
    • Restrictions - Restrictions menu also allows you to quick set their daily schedule as well "gets food", "cuff", "shackle" and "medical needs" at a glance without having to open each individual slave.  Slaves can not be restricted by area, instead they have rooms they are allowed to enter using a room marker and the individual door settings (both mentioned above).
    I plan on doing a similar main tab for prisoners which will basically be the same as the slave restrictions tab (sans scheduling) for easier prisoner management.
  • Wardens, prisoners and slaves AI has been "heavily" modified - wardens have a couple new jobs, prisoners and slaves have a new think sub-tree.  Most of the changes relate directly to the above information.
    eg, prison escapes:  Relative movement speeds and distances to colonists with a LOS, their weapons range, visibility by security cameras (any, they don't know whether a camera is currently/ever monitored), etc all play into whether a prisoner/slave will try to escape.
  • Mod Configuration Menu for default global settings, some can be changed and saved per-game.
  • When buying slaves, they come as slaves (with collar, perhaps other restraints) [toggleable:  Bought slaves become colonists (no collars or restraints, vanilla behaviour)]
  • New random trait "empathic" which is the polar opposite of the vanilla "psychopath" trait.
  • Some vanilla memories have been changed in accordance with the new trait.  Only empathic pawns suffer debuffs from organ harvesting, executions, taking slaves, etc.  Inversely, psychopaths get the same mood buff for the same things.
    Everybody else is basically indifferent to your Orwellian Nightmare.
    The "harvested from me" memory is left untouched (-30 for harvesting organs for the harvestee).
  • Some new room role workers with room markers:
    • "Prison yard" - an outdoor area with 300 or more open roof tiles allowing prisoners.
    • "Prison commons" - indoors and outdoor areas with fewer than 300 open roof tiles also allowing prisoners
    • "Slave work area" - For rooms allowing slaves, a very low prioritised room role when no other better role exists.
  • An even more punishing mood debuff for slaves than "imprisoned".

Things to do:
  • Re-write the prison escape lord driver to factor deeper changes into account (such as picking locks on apparel items, doors, etc)
  • Look at additional laws for other anti-social behaviour.
  • Law main tab where individual laws can be enabled/disabled and have their parameters tweaked (allow use of lethal force to subdue, type of punishment (prison, house arrest), length of incarceration).
  • Slave smuggling jobs to take raw resources into prisons for...
  • ...prisoner crafting jobs at "hidden" crafting stations (ie, crafting spot hidden under a bed, only usable by prisners, etc) including simple weapons like shivs, and "pruno".
  • Stuff I'm forgetting I'm sure.

This future release is based in concept (and some assets) from Wastelanders Prison Improvements v1.1.  Assets used - Some of the graphics, core concept of the original code but it has been substantially expanded and virtually all of the original code has been re-written.

New assets (graphics) by 1000101 (icons), shinzy (basic security station, security camera) and mrofa (advanced security station).

Assets (graphics) used with the permission of Tynan from A9 (I think I used the A9 versions) - Lock icon and locked overlay.

July 22nd, 2016:

Pre-Release Download!
Requires CCL v0.14.1 or later

[attachment deleted by admin - too old]

5
Mods / MODDERS PLEASE READ, Abstracts and how they should be used.
« on: April 25, 2016, 05:10:45 PM »
milon:
So it looks like you *can* inherit Abstracts from other mods (see quote from Ison below).  I'm locking this thread now, but I'm leaving it intact.  I'll leave it stickied for now so hopefully everyone will see the update.  If there are any problems/concerns, PM a moderator and we'll take the appropriate action. 

I've just tested it and it seems that it is possible to inherit XML nodes like BuildingBase from other mods, so I'm not sure if this thread is still valid.




To all modders

Apparently there is bad information regarding xml inheritance.  Specifically regarding abstract definitions.

The prevailing thought pattern is that abstracts are inheritable across mods.  This is not true.  An abstract can only be inherited across files within the mod that defines it.  This is known as scope and trying to inherit from another mods abstract will result in it being "out of scope".  This is similar to the "using" statement in assembly sources which defines a namespace as "in scope" allowing referencing to classes in the namespace defined without explicitly referencing the namespace.

The big offender is "BuildingBase" which many modders are not defining thinking that they can inherit.  While none of the abstracts are inheritable, "BuildingBase" is used most often.

Please check your output_log.txt/Player.log and resolve any errors before releasing your mods.  Don't rely on the debug window popping up!

The issue with abstracts and errors, however, is that they do not show an error or even a warning directly.  Trying to inherit from an abstract which doesn't exist will result in the fields in the def which are not set by the def to be set to the default for the class (eg, ThingDef).  This can cause subtle errors which may not show as a direct link to the missing abstract.

While the game may "work," these errors can cause problems with other mods.  The Community Core Library is especially sensitive to xml errors and many users are experiencing problems and reporting bogus/junk bugs due to this.

Thank-you for reading this,
1000101

Edited 12/08/2016:  Fixed some typographical errors and added information regarding the lack of errors when trying to use undefined abstracts.

Edit 15/11/2016:

TL;DR

If you don't define an abstract, don't use it.  No errors will be thrown by the game about missing abstracts but they can and will cause subtle errors which may not detectable at first or without other mods installed.

Bogus error reports and disgruntled users can be avoided by simply defining abstracts.

Guarantee the success of your own mods and others by defining every abstract you use.


Skullywag also posted this boiled-down information as PSAs:
[Mods Subforum]
[Help Subforum]
[Releases Subforum]

6
Outdated / [A14] ESM - e's small mods (Custom Population - NEW!)
« on: September 13, 2015, 02:36:05 PM »
e's small mods

This is the public release of some small RimWorld mods I made for myself.

All mods require the Community Core Library and unless otherwise noted, all mods work on existing saves.


Custom Population - v0.14.0
REQUIRES: CCL v0.14.0 or later

Adds an MCM to allow you to override the population settings of all installed storytellers.


Do Not Disturb - v0.14.0.2
REQUIRES: CCL v0.14.0 or later

Pawns don't like other pawns just waltzing into their personal rooms. When pawns really want privacy, they'll let you know by forbidding their room doors from other pawns.

This mod uses a map component which checks twice per second (every 30 "ticks") for the status of colonists. It won't forbid/unforbid while paused. Drafting sleeping colonists will unforbid their doors, give them half a second, they just woke up.


Mine Vein - v0.14.0
REQUIRES: CCL v0.14.0 or later

A handy tool to designate an entire vein of resources to be mined at once. You will find the new "Mine Vein" designator beside the "Mine" designator in the orders tab.  The designator will also appear directly on mineable resources when selected.


Mountain Temp - v0.14.0
REQUIRES: CCL v0.14.0 or later

Just below the surface of the planet, the rock is a fairly stable temperature. This mod stabilizes rooms with any portion of a natural roof to either the seasonal average, annual average or a fixed point temperature (configurable in the MCM). The more and thicker the natural roof, the more it will move towards this temperature. Extreme temperatures can still effect rooms deep underground through the passage ways leading to them so don't expect a constant temperature all the time.


Smooth Wall - v0.14.0.2
REQUIRES: CCL v0.14.0 or later

Requires Stonecutting research.

Tired of mining for rock chunks and coming up short? Want some strong, beautiful, natural walls? After digging a cave in the mountain you can just carve out a new environment by smoothing the walls. Because they are solid rock, don't expect to build anything under them. You will find "Smooth Wall" next to "Cancel" in the structures tab.  The designator will also appear directly on rock walls when selected.


Download

All mods are separate and unique downloads.

github


Credit

All credit for designator textures go to mrofa and shinzy.


Redistribution and General License

All source is original.

Permissions:  I am no longer modding RimWorld.  I give free and clear permission to anyone who wants to update and upload these mods.  Please give me credit for the original implementation but you are otherwise free to do with them as you will.

7
Help / [Solved] Scribe References "Misaligned load ID request"
« on: July 14, 2015, 02:49:55 PM »
For some reason when a part of my code is loading references from a save game, the reference being loaded changes class.

To wit:
Code: [Select]
Misaligned load ID request. Requests didn't match between the LoadingVars and ResolvingCrossRefs stage. Id MealSimple384145 was entered as a Verse.Thing but is being read as a Verse.Pawn.
Exception getting object with load id MealSimple384145 of type Verse.Pawn. What we loaded was MealSimple384145. Exception:
System.InvalidCastException: Cannot cast from source type to destination type.

  at (wrapper managed-to-native) object:__icall_wrapper_mono_object_castclass (object,intptr)

  at Verse.LoadedObjectDirectory.ObjectWithLoadID[Pawn] (System.String loadID) [0x00000] in <filename unknown>:0

This happens between the LoadingVars (which is done without issue) and ResolvingCrossRefs stage when the error is thrown.  However, when it tries to resolve the reference, it complains the other way:
Code: [Select]
Misaligned load ID request. Requests didn't match between the LoadingVars and ResolvingCrossRefs stage. Id null was entered as a Verse.Pawn but is being read as a Verse.Thing.
The code which causes this is as follows:
Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using RimWorld;
using UnityEngine;
using Verse;
using Verse.AI;

namespace CommunityCoreLibrary
{
    public class RefrigeratorContents : IExposable
    {
        // This is to handle the degredation of items in the refrigerator
        // It is capable of handling multiple items in multiple cells
        public Thing                    thing;
        public int                      HitPoints;
        public float                    rotProgress;

        public RefrigeratorContents()
        {
            // Default .ctor
            // Needed for Scribing
        }

        public RefrigeratorContents( Thing t, CompRottable compRottable )
        {
            thing = t;
            HitPoints = t.HitPoints;
            rotProgress = compRottable.rotProgress;
        }

        public void ExposeData()
        {
            Log.Message( "\tRefrigeratorContents::ExposeData() {\n\t\tScribeMode: " + Scribe.mode );
            Scribe_References.LookReference( ref thing, "thing" );
            Scribe_Values.LookValue( ref HitPoints, "HitPoints" );
            Scribe_Values.LookValue( ref rotProgress, "rotProgress" );
            Log.Message( "\t} // RefrigeratorContents" );
        }

    }

    public class CompRefrigerated : ThingComp
    {
        private List< RefrigeratorContents >    contents = new List< RefrigeratorContents >();

        private CompPowerTrader         compPower
        {
            get{ return parent.GetComp<CompPowerTrader>(); }
        }

        private Building_Storage        thisBuilding
        {
            get{ return (parent as Building_Storage); }
        }

        public override void PostExposeData()
        {
            base.PostExposeData();

            Log.Message( thisBuilding.ThingID + "::PostExposeData() {\n\tScribeMode: " + Scribe.mode );

            Scribe_Collections.LookList<RefrigeratorContents>( ref contents, "contents", LookMode.Deep );

            Log.Message( "} // " + thisBuilding.ThingID + "::PostExposeData()" );
        }

        public void ScanForRottables()
        {
            // Check for things removed
            bool restartScan;
            do
            {
                restartScan = false;
                foreach( RefrigeratorContents item in contents )
                {
                    if( ( item.thing.Destroyed )||
                        ( item.thing.StoringBuilding() != thisBuilding ) )
                    {
                        // Modifing list, restart scan
                        contents.Remove( item );
                        restartScan = true;
                        break;
                    }
                }
            }while( restartScan == true );

            // Add new things
            foreach( Thing t in thisBuilding.slotGroup.HeldThings )
            {
                CompRottable compRottable = t.TryGetComp<CompRottable>();
                if( ( compRottable != null )&&
                    ( contents.Find( item => item.thing == t ) == null ) )
                    contents.Add( new RefrigeratorContents( t, compRottable ) );
            }

        }

        public override void CompTick()
        {
            base.CompTick();

            // Only do it every 60 ticks to prevent lags
            if( !Gen.IsHashIntervalTick( parent, 60 ) )
                return;

            RefrigerateContents();
        }

        private void RefrigerateContents()
        {
            // Only refrigerate if it has power
            // Don't worry about idle power though
            if( compPower.PowerOn == false )
            {
                // Clear it out
                if( contents.Count > 0 )
                    contents = new List<RefrigeratorContents>();
                // Now leave
                return;
            }

            // Look for things
            ScanForRottables();

            // Refrigerate the items
            foreach( RefrigeratorContents item in contents )
            {
                CompRottable compRottable = item.thing.TryGetComp<CompRottable>();
                item.thing.HitPoints = item.HitPoints;
                compRottable.rotProgress = item.rotProgress;
            }
        }
    }
}

There are caveman debugging messages in the code which is how I tracked it to happening between the two stages, but I can't figure out why.

Saving works and it writes the "contents" as it should.
Code: [Select]
<thing Class="Building_Storage">
<def>RefrigeratedMealShelf</def>
<id>RefrigeratedMealShelf147715</id>
<pos>(128, 0, 54)</pos>
<rot>3</rot>
<health>100</health>
<stuff>Steel</stuff>
<faction>Colony915677562</faction>
<contents>
<li>
<thing>MealSimple314344</thing>
<HitPoints>50</HitPoints>
<rotProgress>39310</rotProgress>
</li>
<li>
<thing>MealSimple384145</thing>
<HitPoints>50</HitPoints>
<rotProgress>855</rotProgress>
</li>
</contents>
<parentThing>RopeLight149507</parentThing>
<keepOnTicks>180</keepOnTicks>
<curPower>-200</curPower>
<curUser>null</curUser>
<settings>
<priority>Important</priority>
<filter>
<disallowedSpecialFilters>
<li>AllowCorpsesColonist</li>
<li>AllowCorpsesStranger</li>
<li>AllowBuried</li>
</disallowedSpecialFilters>
<allowedDefs>
<li>MealNutrientPaste</li>
<li>MealSimple</li>
<li>MealFine</li>
<li>MealLavish</li>
</allowedDefs>
<allowedHitPointsPercents>0~1</allowedHitPointsPercents>
<allowedQualityLevels>Awful~Legendary</allowedQualityLevels>
</filter>
</settings>
</thing>

And the meals exist in the save file:
Code: [Select]
<thing Class="Meal">
<def>MealSimple</def>
<id>MealSimple314344</id>
<pos>(128, 0, 54)</pos>
<health>50</health>
<stackCount>10</stackCount>
<rotProg>39310</rotProg>
<ingredients>
<li>WildBoar_Meat</li>
<li>Muffalo_Meat</li>
<li>Squirrel_Meat</li>
</ingredients>
</thing>
<thing Class="Meal">
<def>MealSimple</def>
<id>MealSimple384145</id>
<pos>(128, 0, 55)</pos>
<health>50</health>
<stackCount>2</stackCount>
<rotProg>855</rotProg>
<ingredients>
<li>Squirrel_Meat</li>
<li>WildBoar_Meat</li>
</ingredients>
</thing>

The full error log (less spam) of this problem:
Code: [Select]
RefrigeratedMealShelf147715::PostExposeData() {
ScribeMode: LoadingVars
RefrigeratorContents::ExposeData() {
ScribeMode: LoadingVars
} // RefrigeratorContents
RefrigeratorContents::ExposeData() {
ScribeMode: LoadingVars
} // RefrigeratorContents
} // RefrigeratedMealShelf147715::PostExposeData()
RefrigeratedMealShelf147715::PostExposeData() {
ScribeMode: ResolvingCrossRefs
} // RefrigeratedMealShelf147715::PostExposeData()
Misaligned load ID request. Requests didn't match between the LoadingVars and ResolvingCrossRefs stage. Id MealSimple384145 was entered as a Verse.Thing but is being read as a Verse.Pawn.
Exception getting object with load id MealSimple384145 of type Verse.Pawn. What we loaded was MealSimple384145. Exception:
System.InvalidCastException: Cannot cast from source type to destination type.

  at (wrapper managed-to-native) object:__icall_wrapper_mono_object_castclass (object,intptr)

  at Verse.LoadedObjectDirectory.ObjectWithLoadID[Pawn] (System.String loadID) [0x00000] in <filename unknown>:0
RefrigeratorContents::ExposeData() {
ScribeMode: ResolvingCrossRefs
} // RefrigeratorContents
RefrigeratorContents::ExposeData() {
ScribeMode: ResolvingCrossRefs
Misaligned load ID request. Requests didn't match between the LoadingVars and ResolvingCrossRefs stage. Id null was entered as a Verse.Pawn but is being read as a Verse.Thing.
} // RefrigeratorContents
RefrigeratorContents::ExposeData() {
ScribeMode: PostLoadInit
} // RefrigeratorContents
RefrigeratorContents::ExposeData() {
ScribeMode: PostLoadInit
} // RefrigeratorContents
RefrigeratedMealShelf147715::PostExposeData() {
ScribeMode: PostLoadInit
} // RefrigeratedMealShelf147715::PostExposeData()

Anyone with any thoughts?

8
Bugs / [W|0.11.857] Select Landing Site still rendered incorrectly
« on: July 08, 2015, 02:41:10 PM »
This issue still exists but you did put it in the Mantis.  I see in the log that you made changes to deal with it, but it doesn't actually reduce the texture size as can be seen from the logs and the problem still being there.

Code: [Select]
Texture2D 4096x4096 won't fit, reducing size (needed mem=65536 used mem=48 allowedmem=26195)
Texture2D 4096x4096 won't fit, reducing size (needed mem=65536 used mem=48 allowedmem=26195)

Hope this helps some.  :)

9
I'm not sure if I should have posted it here, it is a "real bug" but not one that effects actual game play.  If this is the wrong place for it, I apologise now.

This bug only really shows up when modding as it only becomes apparent when extending the Command class in conjunction with Gizmos.

In the Command class, there is a virtual property Desc which (in theory) allows commands description to be handled by inheritors.  Unfortunately, it doesn't seem this is ever invoked and the defaultDesc is always used.

This leads to unexpected behaviour when modding, namely, no description callback.  If your description is static no problem, use defaultDesc.

Unless I am totally missing the purpose of the Desc property...?

Sample code to reproduce:
Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using RimWorld;
using UnityEngine;
using Verse;
using Verse.AI;

namespace foo
{
    public class TestCommand : Command
    {
        public TestCommand() {
            // Give it the grow zone icon for testing
            icon = ContentFinder<Texture2D>.Get( "UI/Designators/ZoneCreate_Growing", true );
        }

        // THIS IS NEVER INVOKED!
        // Shows "No description."
        public override string Desc {
            get { return "Yes description."; }
        }

    }

    public class Building_Bar : Building
    {
       
        public override IEnumerable<Command> GetGizmos()
        {
            yield return base.GetGizmos();

            // Get the offending gizmo
            var bar = new foo.TestCommand();
            yield return bar;

            // No more gizmos
            yield break;
        }

    }

}

10
Bugs / [W|0.11.834] Select Landing Site rendered incorrectly
« on: June 29, 2015, 10:23:57 PM »
The "Select Landing Site" window for Alpha 11 has been rendering the map scaled and offset from the wrong screen co-ordinates.

As can been seen here.

Initially I thought this may be due to mods so I completely re-installed and get the same problem.

Relevant machine specifics:
Intel Mobile Core 2 Duo T5500 (Dual-core 1.0-1.8GHz)
2GB DDR2
Mobile Intel 945 Express Chipset (256MB)

If you need more I can give you CPU-Z and GPU-Z hardware dumps.

11
Outdated / [A12d] Community Core Library (v0.12.3b)
« on: June 29, 2015, 04:18:48 PM »


This is the old forum thread, please redirect yourself to the new thread here.

12
Help / [Help/Info] Building Designators stacking
« on: May 10, 2015, 04:47:06 PM »
I was playing around with separating the walls a little so there are walls for material types.  Largely because I didn't like that plasteel is stonger than stone (no....just...no) and architecturally, it just wrong.  A wood wall does NOT look, act, have anything in common aside from being a "wall" than a stone or metal wall.  Construction techniques, methods, structural engineering etc is all different when building with wood/stone/metal.

Anyway, I found that if buildings share the same uiIconPath, they will stack in the designators menu.  So, if your menu icon for "WallWood" and "WallStone" are the same, you won't see two icons like you expect.

Is there any other "kooky" behaviour like this I should be aware of?

13
Outdated / [Mod-Addon] (Alpha 10) A2B - Selector Options [v0.10.0]
« on: May 07, 2015, 01:53:22 PM »
This add-on requires: A2B Conveyor Belts

Not affiliated with A2B Corp. in any way.

Your mod order needs to look like this:
Code: [Select]
RW_A2B
RW_A2B_Selector

This adds additional options for selector components.  It expands the options from the single core selector to a total of 12 different selectors.

There are five new selectors with different pathing options and six selectors which are "soft" filtered variants.  The difference between the normal ("hard") filtered selectors and the "soft" selectors is that the "soft" selectors will send an item which would be filtered to an alternate path if the filtered path is blocked.

The new selectors will show up in a new tab "A2B Selectors" beside the "A2B" tab.  The original selector has not been moved.  The same research is required to access the new selectors as the original - "[A2B] New Components".

The selectors are in individual xml files so you can remove the ones you don't want (all are enabled by default).


[attachment deleted due to age]

14
Help / Help overriding the food system by mod.
« on: May 06, 2015, 12:19:31 AM »
I'm trying to extend Building_NutrientPasteDispenser to support additional modded features (different hoppers, different meals, more than one type of dispenser).

What works:  The new NPDs accept the new hoppers (buildings with CompHopper), the new WorkGiver_CookFillHoppers fill the hoppers, the alert is surpressed as long as the buildings which need hoppers have hoppers.

What fails:  The new methods are successfully injected to replace the private/hard-coded methods in Building_NutrientPasteDispenser but they don't seem to be called.  No errors are thrown, cave-man debugging logs nothing (and I have plenty of log messages just trying to trace this).  My example project to show that the code injection works, works and everything about the methods I'm injecting meet the criterion for code injection (call type, return type, method flags, parameter list, code target (IL, not x86), etc, etc) except...it doesn't?

Hopefully someone here is familiar with code injection and can help me here, I'm right stumped.  This is the only thing holding up the completion of the mod and being able to add some modding features to the food system in RimWorld for a variety of purposes.


[attachment deleted due to age]

15
Help / [Poll - Proposed] Community Core Library
« on: April 23, 2015, 10:00:17 AM »
So, I've noticed quite the level of redundancy in the mods which are being produced.  Not so much in content of the mods but of the underlying code which drives them.  I propose that house some of those redundancies into a single core library and thereby have a "standard" of how to do common things as well as have a simple common requirement.  This will help for people on lower-end machines who may not have either the RAM or CPU to waste on code redundancies.  Further, it can also serve as an example of sorts for future modders who, quite frankly, don't have many good official sources to work off of and have to rely on examining the work of the existing mods on the forum and/or reverse-engineering the game (which has to be done to a certain extent anyway).

Where to get:  https://github.com/ForsakenShell/CommunityCoreLibrary

Please remember that this currently a WIP and not everything is 100%.  I am currently and actively working on the food system to allow new nutrient paste dispensers.

For those who voted on the poll and are interested in helping in any capacity (ideas, code, fixes, beer) - feel free to PM me and send the beer to...



Quote from: Original post for posterity
To that end, I present v0.1 of the "Community Core Library" for review by modders and feedback.  This is 100% open for discussion and debate as to how to approach a given problem.  I am providing everything thus far for peer review and hope to get a decent discussion going.

What it currently offers (everything is in the namespace CommunityCoreLibrary):

Alert_NeedMealSourceComplete : Alert_NeedMealSource
The new alert looks for any building with the CompFoodSource ThingComp instead of using hard-coded references.

Building_LightFixture : Building
Reduces the number of base light buildings.  You only need one def and it can support multiple colours after the appropriate research is complete.

Building_SunLampUV : Building
It's a sunlamp!  It's a temperature controller!

CompFoodSource : ThingComp
Flags a building as a food source.

CompPowerLowIdleDraw : ThingComp
Allows a building to use less power when idle.  No one leaves the stove on all night!
Currently operates in one of two modes, "InUse" (production tables) and "WhenNear" (doors, NPD).  Plan to add "GroupUse" for things like the television once I work out the detection code.

CompProperties_LowIdleDraw : CompProperties
Contains the values to influence how CompPowerLowIdleDraw works.
idlePowerFactor - Range 1.0 >= x >= 0.0 - Multiplier on basePowerConsumption for when the building is not in use.  Default 0.0
operationalMode - "InUse" or "WhenNear", determines when the building should come back to full-power.  Default "InUse"

PlaceWorker_OnlyOnItemSurface : PlaceWorker
Allows you to force placement on an existing building with an item surface.  Make sure the thing you're placing isn't an edifice.

PlaceWorker_OnlyUnderRoof : PlaceWorker
Allows you to restrict the placement of a new building to be under a roof.

PlaceWorker_WallAttachment : PlaceWorker
Force placement of the new building so it's "head" is against a proper support structure.  No floating wall lights!


Toils:  These are housed in the static class Toils_Common.

Toil SpawnThingOfCountAt( ThingDef of, int count, IntVec3 at )
Spawns count thingDefs of at location.

Toil ReplaceThingWithThingOfCount( Thing oldThing, ThingDef of, int count )
Removes oldThing and spawns count thingDefs of at the oldThings position.

Toil RemoveDesignationOfAt( DesignationDef of, IntVec3 at )
Removes designation of at location.

Toil RemoveDesignationOfOn( DesignationDef of, Thing on )
Removes designation of on thing.


Common functions:  Located in static class Common.

void ChangeThingDefDesignationCategoryDefOfTo( ThingDef t, string d )
Updates the thingdef to now use the new designation category.  Used internally by AdvancedResearch.

void ClearBuildingRecipeCache( ThingDef building )
Clears the buildings recipe cache.  Used internally by AdvancedResearch.

void ResolveDesignationCategoryDefs()
Rebuilds the designation categories after changing buildings designation category.  Used internally by AdvancedResearch.

bool ThingHasCategory( Thing t, ThingCategoryDef c )
Does this thing have a given thing category?


static class LightColour:  Contains the list of colours for lights (and anything else that wants colours in this fashion).


static class Icons:  Various icon refs used for the core library.


Advanced Research:  AdvancedResearchDef

This defines how multiple research projects interact as far as what recipes and buildings become available.  One AdvancedResearchDef can use multiple research projects to unlock multiple buildings OR multiple recipes on multiple buildings.  It is differentiated by an AdvancedResearchDef either containing recipeDefs or not.  If it does not contain any recipeDefs, then it will unlock tables.  If it has it, it will unlock recipes on tables.


The "mod" is mostly examples of how to do things, not a mod in-and-of-itself.  I'm also using some "borrowed" graphics to illustrate some aspects of the mod.

Pages: [1] 2