[A16] Camping Stuff v0.2.3

Started by Nandonalt, January 04, 2017, 08:27:06 PM

Previous topic - Next topic

rambo

Method not found: 'Verse.AI.ReservationUtility.CanReserve'.
at Verse.ThingWithComps/<GetFloatMenuOptions>c__Iterator140.MoveNext () <0x0023f>
at (wrapper dynamic-method) RimWorld.FloatMenuMakerMap.AddHumanlikeOrders_Patch4 (UnityEngine.Vector3,Verse.Pawn,System.Collections.Generic.List`1<Verse.FloatMenuOption>) <0x0415c>
at (wrapper dynamic-method) RimWorld.FloatMenuMakerMap.ChoicesAtFor_Patch1 (UnityEngine.Vector3,Verse.Pawn) <0x001f2>
at AchtungMod.Controller.MouseDown (UnityEngine.Vector3) <0x00126>
at AchtungMod.Controller.HandleEvents () <0x00155>
at AchtungMod.MainTabsRoot_HandleLowPriorityShortcuts_Patch.Prefix () <0x00015>
at (wrapper dynamic-method) RimWorld.MainTabsRoot.HandleLowPriorityShortcuts_Patch1 (object) <0x00010>
at RimWorld.MainButtonsRoot.HandleLowPriorityShortcuts () <0x00016>
at RimWorld.UIRoot_Play.UIRootOnGUI () <0x0017f>
at Verse.Root.OnGUI () <0x000c6>
got this error form the tent

SpaceDorf

The Fur Beds from the Tribal Pack are also similiar enough to Sleeping Bags that I used them for exactly this ..

Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Alias

#92
I was poking around the mod's source files and I *think* I was able to update the mod to A17 compatibility by:

  • Removing the references to Microsoft.CSharp and System.Net.Http and setting .net target to 3.5 (these may just be my visual studio adding stuff on me)
  • Changing 'stringToLines' to 'StringToLines' on CompTargetable_Tent.cs lines 53 & 195
  • Changing 'getPlacements' to 'GetPlacements' on CompTargetable_Tent.cs lines 191, 306, & 530 and CompPackTents.cs line 93
  • Adding a '-1,' to CompTargetable_Tent.cs line 446 so it reads: return GenClosest.ClosestThingReachable(pawn.Position, pawn.Map, ThingRequest.ForDef(this.parent.Stuff), PathEndMode.InteractionCell, TraverseParms.For(pawn, pawn.NormalMaxDanger(), TraverseMode.ByPawn, false), 9999f, validator, null, -1, -1, false);
  • Changing 'Scribe_Values.LookValue' to 'Scribe_Values.Look' on CompPackTent.cs lines 64 & 65
  • Commenting out (or deleting) CompPackTent.cs lines 179-204
  • Changing CompPackTent.cs lines 153-164 to:
    'nodoor = false;
    thingList2.Destroy(DestroyMode.Vanish);'
  • moved original JobDriver_RepairTent.cs line 48 to after line 53

I've included a zip with the changes for anyone interested (and Nandonalt if he'd like to use it to push an official A17 update). Let me know if I've broken something and I'll do some more poking and try to fix it.

Edits 1 & 5:
GitHub link: GitHub (a17)
GitHub link: GitHub (b18)

Edit2: Changed author in about.xml to Nandonalt
Edit3: Fixed endless tent repair bug (change #8) and re-uploaded mod
Edit4: Attachment re-uploaded by Alias due to age

[attachment deleted by admin: too old]

abarilov

Woohoo thank you Alias! Gonna test it out!

alexander_q

#94
Tried A17 version above. Can confirm I'm able to craft tents in each of the three sizes, and each can be packed and unpacked, and rotated. Each also correctly interacts with terrain.

Great job!

EDIT: Unfortunately, I have found a bug with the tents. After having damaged them, and packed them, a new right click menu item "repair tent" is available. Executing this action however fails to repair the tent (pawn will still use materials, perform action). Upon unpacking again, a damaged tent has no doors and gives a "some walls will be missing" message. No amount of performing the repair action successfully repairs the tent.

Alias

#95
Nice! I probably should have tested that part (I was just happy that the tents were packing okay, at one point they were leaving doors all over the place). Give me some time and I'll see what I can do about that.

Edit: All fixed! I've re-uploaded the mod in my original post and on GitHub

alexander_q

#96
Tested just now, can confirm tents can now be repaired successfully. I did notice that there are some errors in the text of the right click menu for the repair material, but it makes no functional difference.

Question: when a tent is damaged, packed and re-deployed, is it always the doors that are missing, regardless of how much damage was done? Is this the behaviour of previous versions of the mod?

EDIT: No, there seem to be several stages of damaged tent. One interesting thing that happened during my tent experiments was that after having destroyed all walls and doors, the roof collapsed and severely injured a colonist... I wonder if this room collapse behaviour can be changed for the tent.

Alias

There are no errors in the right click menu, the game is behaving exactly as it should. Nandonalt's code makes use of the translate() method, likely to allow the mod to play nicely with other languages (not entirely sure why "repair the tent (" is hard coded in English, but I read code not minds). As part of the translate method the text gets handed off to the PseudoTranslated() method when the game is in developer mode, hence creating the funny characters.
Yes, broken tents will always deploy with the same chunks missing, in the same order (doors, then walls), given they are in the same orientation, that's just the way Nandonalt coded it.
The roof collapse behavior is due the fact that the game has three roofs (constructed, rock thin, and rock thick), the tents spawn constructed roof in their deployment and destroy it when they get packed back down. At the moment I'm not entirely sure how to fix this (I would have to define a new type of roof that has all of the properties of a regular roof, except that it has a 0 damage multiplier) or even sure if I want to fix this behavior, as quite frankly if your let your tent get destroyed to the point where it has no walls you kind of deserve what happens next.

Katarumi

You craft the tent at a crafting spot or a hand / electric tailor bench, right? With no required research?

I'm not seeing how to craft one, even in God Mode. I have just core and the mod enabled and the most recent github version (0.2.3). No visible errors in the log, other than the irrelevant 'Version 'unknown'' error.

Alias

Correct, however version is defined in the about.xml file, are you sure you downloaded the entire thing? Even in the official a16 version you could craft tents, you just couldn't deploy them.

Katarumi

Yep, it was a problem on my end! Sorry about that, and thank you for the update.

Mitsael

Quote from: Alias on July 18, 2017, 02:26:03 PM
I was poking around the mod's source files and I *think* I was able to update the mod to A17 compatibility by:

  • Removing the references to Microsoft.CSharp and System.Net.Http and setting .net target to 3.5 (these may just be my visual studio adding stuff on me)
  • Changing 'stringToLines' to 'StringToLines' on CompTargetable_Tent.cs lines 53 & 195
  • Changing 'getPlacements' to 'GetPlacements' on CompTargetable_Tent.cs lines 191, 306, & 530 and CompPackTents.cs line 93
  • Adding a '-1,' to CompTargetable_Tent.cs line 446 so it reads: return GenClosest.ClosestThingReachable(pawn.Position, pawn.Map, ThingRequest.ForDef(this.parent.Stuff), PathEndMode.InteractionCell, TraverseParms.For(pawn, pawn.NormalMaxDanger(), TraverseMode.ByPawn, false), 9999f, validator, null, -1, -1, false);
  • Changing 'Scribe_Values.LookValue' to 'Scribe_Values.Look' on CompPackTent.cs lines 64 & 65
  • Commenting out (or deleting) CompPackTent.cs lines 179-204
  • Changing CompPackTent.cs lines 153-164 to:
    'nodoor = false;
    thingList2.Destroy(DestroyMode.Vanish);'
  • moved original JobDriver_RepairTent.cs line 48 to after line 53

I've included a zip with the changes for anyone interested (and Nandonalt if he'd like to use it to push an official A17 update). Let me know if I've broken something and I'll do some more poking and try to fix it.

Edit: GitHub link: GitHub
Edit2: Changed author in about.xml to Nandonalt
Edit3: Fixed endless tent repair bug (change #8) and re-uploaded mod

I was just going to comment on the serious error of deploying the store, but I see a possible solution ... thanks, I'll try it

tag8833

I downloaded the A17 version posted above, and I can craft tents, but can't deploy them.  Any thoughts?

sirgzu

Quote from: tag8833 on August 21, 2017, 03:09:19 PM
I downloaded the A17 version posted above, and I can craft tents, but can't deploy them.  Any thoughts?
Try restarting the game and then first thing try deploying the tent.

I've had issues like that where features get broken after a few hours gameplay, it's worth a shot.

tag8833

Quote from: sirgzu on August 21, 2017, 03:23:41 PMTry restarting the game and then first thing try deploying the tent.
Good idea, but that didn't do it.  I'm wondering if I've got a conflict with another mod.  1st thought is miniaturization or the allow tool.  I'll do some tests by removing them.