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

#16
Help / Re: Harmony Question
August 17, 2018, 02:39:29 PM
So the issue you will run into with simple getters (and especially constant getters) is C#'s jit will likely inline them.  If you can apply your patch before that happens, great.  If not, you'll have to patch all the calling methods (I think even a blank patch will make the JIT rerun).
#17
My favourite (with combat extended) was to sneak down there in the middle of the night and make a trail of mortar shells leading out of the middle of the raiders and around some corner, then tossing a grenade at the end of the trail.  By the time the raiders wake up from being under attack, it's too late for them.

The much simpler solution, which works without any mods, is to load a boomrat or two, or a boomalope into a drop pod and drop it in the middle of their base, right next to the explosive shells.  The raiders will shoot at the boomrats (which are surprisingly hard to hit), and often hit their friends.  Once they kill the boomrat, their ammunition (and anyone too close) all go up.
#18
Stories / Re: A muffalo took my leather.
August 17, 2018, 01:26:38 PM
Yeah, it's not one of the new mechanics that's super well thought out.  Animals should lose their training if they are ignored for too long, but as long as their food source is your colony, and your colony is safe (they don't get repeatedly injured), they shouldn't go 'wild'. 
#19
Outdated / Re: [B18] Insulating Walls
August 16, 2018, 03:04:31 PM
And the answer is I did fix it, but the link I posted was to an old version.  I've uploaded the fixed version now, go ahead and give it another try.
#20
Support / Wrong IP Address on forums
August 16, 2018, 02:52:49 PM
So I noticed today that an IP address is shown at the bottom right corner of all my posts.  That's fine, but I say 'an IP address' instead of 'my IP address' because it isn't my IP address.  I have a static IP, so it should always be the same, and should start with 63.227, but it doesn't (it isn't the same for all my posts, and it isn't correct in any of them). 

I don't think it's actually particularly important (certainly not to me), but it might have implications for IP-banning malicious users or auto-detecting compromised accounts.  Anyone else notice a similar issue? (You can check your external IP by visiting ip.dnsexit.com )
#21
So I've been thinking for a while on the caravan issue (ever since I had a combat supplier carrying a couple thousand mortar rounds get offed).  I think I have a solution to the problem that would work, but would be somewhat fiddly to implement. 

The problem is that the caravan's faction takes the loss of the caravan without complaint or reaction.  Sure, if it looks like you caused the demise of the caravan, they'll attack you for a while, but that does them no good, and usually isn't a big deal to you, and usually, you can engineer the situation so they don't even blame you. 

The solution isn't to have the faction get more angry with you or attack, since that would just introduce a host of other problems.  The solution is to have the faction send an asset retrieval team to gather the dropped supplies. 

The idea is the faction should send basically a nearly empty caravan, with their top-tier combat units to gather everything.  They aren't hostile to you, but will dig their way in if needed.  They don't have to get exactly what was dropped, just similar cash value of stuff.  Which is where it gets fiddly.  Telling what value of stuff got dropped by the caravan is easy, the hard part is telling how much of what got dropped got destroyed, by fire or by just sitting out rotting, or by grenades, or what have you.  A flag saying something was dropped by such and such a faction might be the way to do it, or simply an estimate based on relative faction power and the circumstances that caused the caravan animal to expire (killed by lightning strike vs heart attack). 

Particularly weak factions (tribals) may even hire a professional team to come in, so you can't just kill tribal traders without recourse.  Which also opens the door to some extra events, like raiders showing up to grab the caravan gear, possibly at the same time as the retrieval team, or the colony getting offered a chance to go retrieve stuff on behalf of one of their allies.

Unfortunately, monodevelop isn't really suited to this kind of task, so I've not looked at the game code enough to know how much could be reused and adapted, but it may be as simple as adapting the 'caravan packing' logic to order the item stacks packed up.  Any that get moved should still get packed, and anything that gets destroyed could automatically get ignored.  Depending on how it works, your colonists might even help with the packing.
#22
Outdated / Re: [B18] Insulating Walls
August 15, 2018, 02:24:18 PM
Hm, I thought I'd fixed that... I'll see if I can squeeze some time out to figure out what's causing it.
#23
Outdated / Re: [B18] Insulating Walls
August 12, 2018, 05:30:54 PM
Alright, I just posted a link for a direct download that should stick around pretty much forever.
#24
Outdated / Re: [B18] Insulating Walls
February 25, 2018, 01:44:56 PM
Unless Rainbeaus Smooth Stone Walls does some reflection magic, they insulate exactly the same as any other totally impassable terrain (constructed walls or natural stone).
#25
Outdated / Re: [B18] Insulating Walls
February 08, 2018, 05:58:08 PM
Quote from: FociA on February 04, 2018, 05:58:34 AM
Works great, you should release it in the steam community to find quicker issues.

idea:
combined materials. inner - center - outer wall(one tile wall, not 3 layer of walls). gold etc inner walls for beauty. woll in the center for Insulating. titanium etc for outerwall damage.

I have no idea how I would go about releasing it on Steam, I don't use Steam with rimworld (I don't use steam with anything that isn't absolutely necessary).  If you have some pointers on how to do that, I could possibly make it happen.

Eventually I want to support something like that, but it will take reworking a lot more internals, which isn't super easy.  The stock temperature system calculates the room map every time a wall is placed or removed, and caches it.  It then goes through the room edges, checking exactly one space out, along the principal axes, to see what it in that cell.  I'll I'm doing (so far) is changing how it reacts to finding that cell filled, adding checks to additional cells is another thing entirely.

Monodevelop lets me browse the base assembly, but lacks any sort of decent search, and can't export the decompiled source for use with grep et al.  Rider has a much nicer decompiler, but lacks a way to browse the assembly at all, and also can't export it to a greppable form.  None of the windows decompiler stuff plays nicely with mono/wine, so I'm out of luck there too.  This leaves just browsing the assembly in monodevelop and hoping to spot what needs to be overridden.

Quote from: Harry_Dicks on February 04, 2018, 10:24:57 AM
So I was thinking about this. Could we have a "hardcore" edition of this mod, or something that doesn't reduce temp changes for double thick rooms under mountains to only equalize @ 1%? I like the idea of insulating walls, but I may not want this drastic of a change, only slightly as much :) If it all possible, would a mod options window be possible, with some sliders for us to play with? Maybe in the future, if you plan on expanding this mod that much further.

Personally, I think it could be fun to play with all kinds of heat transfer/insulation mod options. Maybe you want to require your ice sheet map to need 3 layer thick walls, for a 50% heat transfer reduction, but only two walls will give you 25% reduction? Just some fun thoughts ;)

As above, checking for more than 2-thick walls is something I hope to get to with a 'phase 2' of the mod, when I have a better idea how these pieces fit together with everything else.  I may skip it entirely, and go for using a proper heat map, since I think that is the proper way to go long term, but I suspect that will have lots of little effects everywhere and I really need a good way to search for references before I can safely do that.

I picked 1% sort of arbitrarily, I may just has correctly made it 0%.  At 1%, the temperature effect on the room is dominated by the floor/ceiling ambient effect.  The idea was there is no good way to tell what the temperature change should be: it's not the outside world, since it's not an exterior wall, but it's also not the 'ambient underground temperature' (15C), so have a slight effect, but not much.  The proper thing to do is probably to look at the nearby cells and see if any of them are part of a room, and if so use that temperature, if not, the wall is at least 3 thick, and we should just use the ambient underground temperature.  We can't look more than the extra 1 tile away, or we might find our starting room, and there's no good way to know which direction to limit the search to.

As for the menu options, that's probably not a bad idea.  It would make isolating bugs simpler, since there are 3 overridden functions and disabling them at runtime would not be a bad idea.  I don't see a whole lot of point to investing time in adding sliders for fudge factor variables, and I'm not sure the mod option menu is the proper place to put per-item-type insulation settings, there would be a lot of them... 

As for adjusting the wall thickness needed to achieve 50% reduction in heat transfer, that won't change.  The equation for heat transfer is (temperature difference * material_specific_number) / material_thickness.  Doubling the thickness reduces the heat transfer in half, no matter what the temperature difference is, and no matter what the material type is.  The goal of this is to improve the realism of the temperature system, so replacing the real equation with a fake one would be counter-productive.
#26
Outdated / Re: [B18] Insulating Walls
January 16, 2018, 07:07:16 PM
Can you give me some more details / screenshot of your layout?  Probably easiest to find the bug if I can duplicate the setup.
#27
Outdated / Re: [B18] Insulating Walls
January 06, 2018, 12:10:58 PM
Alright, I think it's fixed.  I was multiplying the result by the 'cycleIndex' instead of the number of cells in the room.  This is why the problem would only show up after a while and I missed it in my testing.  If anyone is brave enough to give it a go, let me know if anything else breaks. 

As a side note, rider's decompiler seems fancier, and outputs prettier code, but monodevelop's is easier to parse.
#28
Outdated / Re: [B18] Insulating Walls
January 06, 2018, 03:15:48 AM
Hm, that's gonna be a pain to puzzle out...  Since I disabled one of the two patches, the trouble must be coming from the one that is still enabled, which is the more complicated one.  I'm a bit brain fried from programming all day, so I'll probably hit it tomorrow. 

In the mean time, the source is included in the zip, if anyone wants to take a peek, I'd have no objections.  The method overridden is Verse.RoomGroupTempTracker.WallEqualizationTempChangePerInterval.

#29
Outdated / Re: [B18] Insulating Walls
January 05, 2018, 02:21:32 PM
Quote from: Harry_Dicks on January 05, 2018, 03:05:57 AM
This mod looks very interesting. Just out of curiosity, do you know how your mod affects performance? Also, do temperature checks tick very often, and are they resource intensive? Is there anyway of slowing them down? Thanks!

The performance impact on this version should be minor.  It does have to use a bit of reflection to access the temperature data, and I don't know how well c#'s jit can optimize that, but it only adds a couple lookups ans some simple math.  Temperature processes once every 7 ticks.  The roof checks are extremely fast, since it precalculates the % of the room that is roofed/thick roofed, then just adjusts the temperature based on that percent.  Perimeter of rooms matters a little, but it calculates the edge checks in segments, so only 1/5 of the perimeter is processed each temperature tick (the whole perimeter is processed every 35 ticks).  The biggest determinant for time required is # of rooms.  It would be possible to slow the cycle rate down, but I'm not sure it would be a good idea.  It's only likely to matter if you have dozens of rooms, and I don't know what effect it would have on heaters, coolers, and the like.

Quote from: Heymom on January 05, 2018, 11:04:03 AM
Hey
Very interesting mod, have been a big fan of the max ice setting, so its -80 on avg on the maps i play.
I tried your mod, and my rooms now get so hot they set fire to the place. I am using the "auto cooler" mod, and i think its conflicting with that mod.

idea; add insulation options, ex. wooden walls + wool etc.. would be neat.

That does sound like a bad mod interaction, I can't find that mod though, so I can't see what it's doing.  You might try changing the mod load order, but if there are other mods that touch the same internals you're likely to have problems. 

Eventually, I will probably add an explicit insulation property, which is autocalculated based on HP for mod-added walls, or anything which doesn't set the insulation value.  That would let someone (with actual artistic skill) add an insulated wall type, but I probably won't do it myself.

Edit:  Hm, I just had a couple rooms start oscillating temperature, I do have a central heat mod installed, but none of its stuff built, so something wonky is going on.  I'll look into it, but in the mean time, be careful using this mod, there may be an issue.

Edit2:  Okay, so I think I might have it fixed, I think the original version of the TempDiffFromOutdoorsAdjusted must have been inverting the sign somehow, I'll verify that once monodevelop finishes installing.  In the mean time, I just updated the zip file to disable that patch, the better wall insulation seems to be working as intended still.  If I'm right about how the function is getting used, the reason Heymom found the bug is he's on a map with a temperature difference in excess of 100K (-80 to +50), anyway, I should have a fully functional version up in a couple hours.
#30
Outdated / Re: [B18] Insulating Walls
January 05, 2018, 02:44:16 AM
Quote from: BrokenValkyrie on January 05, 2018, 01:02:51 AM
Nice, I always assumed the quick temperature equalization was due to shoddy roofing. At least that how I was justifying it in my head.

A large part of it is shoddy roofing.  Heat transfers through thin roof at 1/14 the rate of open air (hole in the roof).  It equalizes at the same rate for thick roof, but always equalizes toward 15C, ignoring the outside weather.  Also, once the temperature outside is more than 100K different from the temperature inside, the extra difference is weighted 5x heavier (so if outside is 0C, and inside is 110C, it transfers heat as though the inside were 150C).  Single thickness walls transfer heat at 1/4 the rate of thin roofs. 

I might see how hard it would be to add an insulated roof, but I suspect that will also be a ways down the line.