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

#1
Hello!

I was playing A18 with some mods recently when I stumbled across this problem; I have a character who can't be drawn, and when the game tries to, an NPE bubbles up in the draw loop and prevents the GUI from rendering. :(

The specific problem behavior is that whenever the 'broken' character would be rendered, instead the whole GUI disappears. The GUI returns if you pan the camera off the problem character.

Here's the stack trace:

Object reference not set to an instance of an object
  at RimWorld.PawnUtility.GetPosture (Verse.Pawn p) [0x00000] in <filename unknown>:0
  at Verse.PawnCollisionTweenerUtility.PawnCollisionPosOffsetFor (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.PawnTweener.TweenedPosRoot () [0x00000] in <filename unknown>:0
  at Verse.PawnTweener.ResetTweenedPosToRoot () [0x00000] in <filename unknown>:0
  at Verse.PawnTweener.PreDrawPosCalculation () [0x00000] in <filename unknown>:0
  at Verse.Pawn_DrawTracker.get_DrawPos () [0x00000] in <filename unknown>:0
  at Verse.Pawn.get_DrawPos () [0x00000] in <filename unknown>:0
  at Verse.TooltipGiverList.DispenseAllThingTooltips () [0x00000] in <filename unknown>:0
  at RimWorld.MapInterface.MapInterfaceOnGUI_BeforeMainTabs () [0x00000] in <filename unknown>:0
  at RimWorld.UIRoot_Play.UIRootOnGUI () [0x00000] in <filename unknown>:0
  at Verse.Root.OnGUI () [0x00000] in <filename unknown>:0


Though I did have mods installed and active when I encountered this, I'm hoping this could be handled regardless of mod errors; DispenseAllThingTooltips() calls giver.DrawPos, and an exception there can blow up the GUI rendering.
#2
QuoteIs it possible to make these turrets as a stand-alone mod?

Quoteis there any way to utilise the slavers unhappyness from working to be singled out ?

i would so much like a mini mod that changes the ((No hauling)) to instead give unhappyness if forced to haul stuff

any possibility in this ?
Sorry all, the more "mini-mods" or branches I build for this mod means more work to maintain the mod (and more work at upgrade time!) so I won't be branching off this mod.

Regarding the turrets, there is no code backing the turrets so you should be able to create your own small mod using the turret XMLs and images... you're more than welcome to but I'll leave that as an exercise for you if you're interested in building that ;)
#3
Help / Re: Room Awareness
March 25, 2015, 04:32:03 PM
I assume you're including an assembly in your mod, but this can be done by calling the GridsUtility.GetRoom method. It takes either an IntVec3 or a Thing (you can pass in your workbench as the thing).

Make sure to guard against a null returned here as I don't think every space is in a room. Once you get the Room object back, you can call AllContainedThings to get a list of every Thing in the room, and iterate over it to check if you've got more of whatever you're looking for. An optimization I would suggest is to not check for things if the Room.IsHuge is true, as for example a workbench placed outside might check against hundreds of objects and that would diminish performance. Also make sure not to check this every tick as that would bog the game down, only check every ten seconds or whatever you determine is appropriate.
#4
Make sure you have "show compiler-generated code" option enabled if you're using DotPeek.

The part we're interested in is here:

QuoteStockGenerator_Slaves<GenerateThings>c__IteratorA7 thingsCIteratorA7_1 = new StockGenerator_Slaves.<GenerateThings>c__IteratorA7();

search for c__IteratorA7 and if you have the show compiler-generated code option on you'll find a sealed class private to this class named c__IteratorA7.

The operative part of that class that you're interested in is this, I think:

QuoteIEnumerable<Faction> allFactionsVisible = Find.FactionManager.AllFactionsVisible;
if (StockGenerator_Slaves.<GenerateThings>c__IteratorA7.<>f__am$cache7 == null)
{
   // ISSUE: method pointer
   StockGenerator_Slaves.<GenerateThings>c__IteratorA7.<>f__am$cache7 = new Func<Faction, bool>((object) null, __methodptr(<>m__195));
}
Func<Faction, bool> predicate = StockGenerator_Slaves.<GenerateThings>c__IteratorA7.<>f__am$cache7;
this.<slaveFaction>__2 = GenCollection.RandomElement<Faction>(Enumerable.Where<Faction>(allFactionsVisible, predicate));
this.<pawn>__3 = PawnGenerator.GeneratePawn(PawnKindDefOf.Slave, this.<slaveFaction>__2);
this.$current = (Thing) this.<pawn>__3;
this.$PC = 1;
return true;

with the method pointer m__195 evaluating to:

Quoteprivate static bool <>m__195(Faction fac)
      {
        if (fac != Faction.OfColony)
          return fac.def.humanoidFaction;
        return false;
      }

So that's:
1) Getting a list of all visible factions
2) Filtering out the ones that are ofColony or non-humanoid
3) Picking a random faction from that list
4) Generating a pawn of KindDef Slave and of that faction using this line: PawnGenerator.GeneratePawn(PawnKindDefOf.Slave,this.<slaveFaction>E__2);

And I think that's pretty much it, rinse and repeat for however many pawns you need to generate.

What are you trying to do with your stock generator?
#5
I'm not super clear on what comes in the lite version vs. the full version, could you please add a breakdown to the OP?
#6
Support / Re: Whats this?
March 20, 2015, 02:59:16 PM
That's a bit of debug logging I left in by accident... I corrected it after release, please redownload Outfitter if you don't want that message anymore.
#7
QuoteIn the vanilla game there's a trait called masochist which gives a mood boost whenever the pawn is in pain (scales with the amount). Pawns with this trait make great slaves because they get a mood boost when beaten. If you could add the opposite trait (sadist) and have it give a mood boost for whenever that pawn sees another pawn in pain and a greater mood boost for actually causing pain, that'd be cool.
I like it! I'll put that on my roadmap (though not quite for the next release).

QuoteAlso Im having issues with getting enough money simply because theres just not enough trade ships (especially slaver ships) coming by. In the story teller you added could you increase the trade ships?

Absolutely, I'm planning the following for the next release:
-Magnetic cannon, lets you pirate ships in orbit (half-done)
-Roll in the Mending mod, so you can repair items you get from raiders/etc (done)
-Ransom paid for prisoners you hold (done)
-Custom storyteller will send lots more traders, especially slavers (done)
#8
Quote from: SpaceDrunk on March 13, 2015, 10:21:43 PM
Quote from: Wastelander on March 09, 2015, 11:47:30 AM
Also, the slave collar imposes a penalty to move speed and work speed, so they'll never be as efficient as regular colonists.

It appears you can simply remove the collar with no ill-effects, though? I did this with my first slave, and while the mood penalty remained, their stats otherwise went back to normal.

Obviously the collar shouldn't be removable, and if broken somehow, should result in them becoming hostile.

I'd rather not expand on the collar in this mod, if you want a more "fleshed out" system try my Slavers mod :) Plus some people like the ability to remove the collar for RP purposes.

QuoteIs it possible that the meals are just too far from the prisoners' beds, and the prisoner AI isn't looking that far for food? The freezer is across a hallway and through the chow hall from the bedrooms.
Another possibility I just now thought of... Could it be that there is a 1x1 "room" between the chow hall and the freezer - used as a temperature buffer - that isn't marked with a camera?

Hmm.. the only thing I can think of is the prisoners might not be considering the freezer if there isn't a camera there. I'm happy to check a screenshot of your setup if that doesn't help.
#9
It should still be fixed in that version... I'll try reuploading anyway.
#10
QuoteYes i get that bug too. It also unticks the 'outside items' box automatically with the radius reset.

That's fixed, please redownload.
#11
Does the paste dispenser room have a security camera in it? If not, it might not be marked a prisoner zone, and the prisoners might refuse to go out there.

Edit: although if they're refusing to eat hand-delivered meals too, that's weird. Any other mods active?
#12
I would vote no...

The only time repair is really vital for me is right after a raid, when my front gate / killbox is all messed up. I use the manual priority setting and I like to have a few colonists who have repair as their highest priority labor. Typically there's nothing to repair, but right after a raid they're quick about getting everything back into working order.
#13
Unfinished / Re: Common sense mod
March 12, 2015, 03:55:02 PM
Common sense is a reaaaaally hard problem for computers and AI in general, not just this game :)

You could probably handle some specific situations like "don't get within rifle range of an enemy if you're just hauling", but most of it probably won't be possible unless you had access to the full source code.
#14
QuoteHey uhm, I might have overlooked something, but what's an easy way to tell if you updated your mods? I'm not sure on which versions I have and which are your latest. Could you perhaps keep a version number in the main post?
Yeah, I'll update the title when I release a new version and keep a version in the main post.

QuoteThis would be totally fine, and in fact I think it would be OK if you just made it a hard threshold of 95% or whatever if it's difficult to code it for user input.
OK, at some point soon I'll add a "repair items under health %" slider to the Mending bench. It'll default to 100%, though. :)
#15
Thanks for all the feedback!

QuoteI'm considering trying this mod, but in my perfect vision of a slave colony, not ALL the members are slaves with only a tiny number (the starter three?) as the slavers. I envision a social hierarchy... a class based system if you will, where *some* of the more favorable slaves can be promoted from slaves to slavers/pirates or whatever you want to call them (I prefer human trafficking engineers ;)).
Yeah, right now the only way to get more pirates is to buy them off slave traders (which confusingly causes them to come in as pirates, not slaves... should probably change that at some point) or recruit using the old "friendly chat warden" method. I've considered some way of promoting slaves up to pirates and I'll be doing that in the future, just nothing specific yet.

QuoteWould you consider the payment system to be optional or at least add some other ways to pay the slavers (weapons, armor etc)?
Right now I'd like to focus on making the wage system doable, by adding ways to make money. Right now the storyteller can really screw you by not sending traders, or not sending raids so you have nothing to sell. Before the next release, I'll have the mending (item repair) stuff rolled into this mod, plus the guarantee that you'll get a trader at least once a month, plus the magnetic cannon building I've been talking about in this thread, so you don't have to wait for raiders to bring you loot. You'll have options to proactively generate money.

Quote*EDIT2: I am also reading about your prisoner improvement mods. Do I also need to install that or is it standalone apart from this one? If I install this one, I don't need the improvement mod, correct?
Yup, PI is rolled into this one so don't use it at the same time.

Quote*EDIT3: (sorry for so many questions!) - Does this mod work ok with EdB's Plan Carefully mod? It's really the only other one I was considering and is an interface mod.
I haven't actually tested, but I think so!

Quote1. Enslaving a colonist and then trying to 'release' them seems broken.
My bad, I'll look into fixing that.

Quote2. I think someone else mentioned this but there needs to be a distinction between slave jobs and colonist (slaver) approved jobs.
Pirates only get unhappy about the following jobs:
        -Construction
        -Mining
        -Planting or Harvesting
        -Plant cutting (cutting trees, etc.)
        -Anything that requires a bill (crafting)
So they can do hunting, doctoring (except surgery), research, hauling, etc. without becoming angry. I would like to be able to refine the "gets angry about doing any bill" part of this so they can do surgery and craft weapons and such without getting mad, but it'd be almost prohibitively difficult. :( Right now I'm just causing the thought whenever they do a bill, to get more specific would require a ton of work and be very fragile across upgrades.

All that said, though, I'd like to eventually add 'entertainment' buildings like VR booths, or a bar (which when supplied with beer provides an even bigger mood and social boost), etc. so idle pirates have something to do.

QuoteI separated the food prep areas so that the slaves only get access to the nutrient paste hopper. Filling the hoppers is a cook job and raises cooking skill. I don't mind having a slave do that but I don't want the slaves to have access to the freezer where the fine and lavish meals are stored, those are only for the slavers!
I'm having the same issue in my test colony, I'd like to reserve my finer meals for the pirates, but can't figure out a good way to without micromanaging. I think I'll add some kind of "slave rules" tab somewhere where you can define what foods, beds etc. the slaves have access to.



QuoteIf I have slaves and I have some prisoners, will my slaves take up the role of warden for prisoners?
Nope, slaves will not warden or Guard other slaves. I figured it didn't make much sense to have a slave trying to convince a prisoner to join the colony as a pirate. At some point I might revisit that so slaves can at least feed prisoners.

QuoteSlave Zones:

Simple really, you zone an area and your slaves are limited to only those places and will only complete tasks which are within the zone.
I would love to do this but it'd be very, very difficult without hooking into the pathfinding code, which isn't possible yet. :(