RimWorld

RimWorld

Proximity
37 Comments
Mlie 6 Jul, 2020 @ 12:25pm 
Made an update of this for RimWorld 1.1
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2156644611
Hope this helps someone!
FlareShooter 26 Mar, 2020 @ 3:52am 
It seems that the successor modder is no longer activity in Rimworld. Will it be updated to 1.1?
Valken 1 Mar, 2020 @ 12:36pm 
@Ashnal Do you have an update for 1.1 ready?
I kinda want to use this mod for some stuff
pgames-food 8 Nov, 2019 @ 9:49pm 
(ideally it could be something i could simply add as a property in my xml code, since i cant to proper coding, and then your framework could maybe facilitate that, but not sure what is possible)
pgames-food 8 Nov, 2019 @ 9:48pm 
thanks pelador and ashnal for current and future dev work.

if during your dev-ly travels, you find a way to facilitate this as a possible option, it could be cool...
in my Rimside Recycling mod, i have a way to make sawdust from wood, but it could be interesting to have the Worker receive a small hediff of (inhaled sawdust) at the machine, unless wearing a gasmask or similar item to reduce toxicity effects :) (not a big hediff but even just a minor one with an hour or 2 mood effect)
NECEROS 8 Nov, 2019 @ 11:21am 
That sounds great, Ashnal!
Ashnal 8 Nov, 2019 @ 10:33am 
Just chiming in to say I have taken it under my wing, since I want to expand the functionality to allow pawns and hediffs to have proximity effects. It may be a while before I post any update.
Pelador  [author] 15 Oct, 2019 @ 5:08am 
@News

Ashnal, another developer has taken it upon himself to adopt the functionality from Proximity. And is intending to extend the functionality of the mod further. This since I don't personally have the spare time to do so.

This means that when developed it will be appearing as a new mod or as a library resource for people to make use of.

I'd hope that as indicated the existing functionality of Proximity will be maintained as a result.

Will keep you informed.
NECEROS 23 Aug, 2019 @ 4:54am 
Fantastic. Thank you.

I've made my first draft swift tile. It works fantastically, and I can see the stacking with a radius of 1. I'll try 0 tomorrow. If I see any major performance I'll rethink my approach, and discuss with more further.

Appreciate this mod.
Pelador  [author] 23 Aug, 2019 @ 3:51am 
@Neceros continued ....

Pawns also have their ticks spread out as the 2s frequency, so ticks are reduced due to the 2s modulus uses but also that the pawns have a randomness applied to this so they will spread out their proximity checks as opposed to all of them happening at the same time. Again another considered aspect of the process to remove potential performance issues.
Pelador  [author] 23 Aug, 2019 @ 3:48am 
@Neceros continued ...

Also, If I remember rightly a proximity range of 0 is valid for the most immediate cell as it will include the current occupied cell of the pawn in addition to radial application. There is also a sensible ceiling of a radius of 10 within the code for which proximity will apply. This used to ensure that performance degrading radii cannot be potentially set.

Again as with all mod work testing of additional features will give a better understanding of their impact and would be impossible for me to test all the various permutations of effects and scenarios, but I have confidence in the simplicity of what proximity is as something that just feeds into statistic offsets to a pawn that its overall impact with its use is minimal and therefore having confidence that it supports a useful framework.
Pelador  [author] 23 Aug, 2019 @ 3:47am 
@Neceros

Scaleable testing with multiple buildings and a sizeable number of pawns didn't have an apparent effect. Though perhaps performed in more "clinical" test conditions.

Proximity works off of the pawn not the terrain to check for the environmental effects, and will be doing these checks regardless of the environment, so there is no consequence to the idea of using proximity with a whole map of terrain defined as it will still be literally only checking the "proximity" of the pawn and not doing a larger iteration of all the terrain cells.

Proximity range is important with terrain however (where connected) as the effects applied to the pawns are cumulative if they qualify. So as the range increases then more and more terrain cells will become valid to apply based on the proximity range.
NECEROS 23 Aug, 2019 @ 3:18am 
Question!

If I made a terraindef that gives pawns a move speed bonus, and I intended for the user to make full paths out of this tile, should I put my prox range to 1 and... will that cause a ton of lag?

Would you suggest making a small device that extends move bonus out to a range instead of a floor tile?
Pelador  [author] 2 May, 2019 @ 1:35am 
@Update

On the subject of additional functionality, now added the ability to similarly apply effects from terrain. (See guidance notes for details).
pgames-food 2 May, 2019 @ 1:35am 
ah thanks for the detailed information, sorry i wasnt trying to make more work, (just had the idea) though it's cool if its possible in principal. (if i get any more bright ideas i'll just add them to that ideas page meanwhile) :)
Pelador  [author] 2 May, 2019 @ 1:34am 
@pgames-food

Also with including different item sets you would also generally impact the overall performance of the process, especially if say added to look at items also (guns, food, plants ....). So there may be sensible limits to trying to add all the various objects that could be in proximity to a pawn to then potentially apply effects for.

It would require a rewrite of the schema in the code to accommodate extra elements with extensive scaleable testing to ensure everything sits pretty with it's use also.

I'll consider it for the future to add extra elements progressively where it makes sense a applies well in testing, but can't promise when I might be able to do these things.
Pelador  [author] 2 May, 2019 @ 1:29am 
@pgames-food

It is however important to note that the mod is intended to apply to "custom" items due to the idea that using a "mod extension" you would have conflicts of interest if more that one developer wanted to associated values for the definition if say a vanilla item. And in the case of Pawns, ideally this might need to be associated with something like race definitions in order for there to be a sensible XML schema for the developers to use for the mod extension.

I would more likely have to develop a new custom XML schema also for things like Pawns in order that not only can you define your own custom defNames to allow for the inclusion of vanilla items to be included, but also that multiple different effects with differing selection properties as per the proximity definitions could then be applied.
Pelador  [author] 2 May, 2019 @ 1:28am 
@pgames-food

In principle, Yes, it could be possible for pawns to gain bonuses from other items like other pawns or even guns, food, plants and so on and rules could be added to provide further selection criteria. But would require further development and testing.
pgames-food 1 May, 2019 @ 9:53pm 
hi i wonder if there is maybe a way for a colonist to detect something on another colonist?
for example, if 1 person uses a perfume Scenter, and still has that buff, maybe when they walk past someone else, that other person gets a small buff for a bit of time?
Pelador  [author] 29 Apr, 2019 @ 12:45am 
@Update

The ProxEquipped variable has been changed to a list type to allow for multiple entries you wish to check against. (See guidance notes).

(Apologies if part way through development with the use of this variable, but this definition allows for a much better configuration of the mod checking for a list of valid equipped items as opposed to a single item).
Pelador  [author] 28 Apr, 2019 @ 3:23pm 
@eides72

Cannot support modded introduced statistics as the stat definitions exist in the mod not Core elements. And since not everyone may be using the mod this will result in exception errors on loading when this is apparent.
Rea 28 Apr, 2019 @ 2:15pm 
@Rimushima, Radiation
Pelador  [author] 28 Apr, 2019 @ 12:00am 
@Update

Added an additional behaviour variable "ProxEquipped" to help control the use of the effects based on whether the pawn has a particular item equipped. (See Guidance notes for details).
Pelador  [author] 27 Apr, 2019 @ 11:47am 
@Update @Grimelord82

ComfyTemperatureMin and ComfyTemperatureMax stat values added to be applied as offsets in the mod. (See guidance notes).
Pelador  [author] 27 Apr, 2019 @ 10:32am 
@Grimelord82

When I next get a moment available, I can check how feasible those stats are to include in the mod.
Grimelord82 27 Apr, 2019 @ 8:20am 
Pelador, this is really cool! I just now saw it here in the workshop.
The list of variables is fairly complete, but am I blind because I don't see a ComfyTemperatureMax or ComfyTemperatureMin?
These are from the Stats_Pawns_General.xml just like some of the ones you have listed.

I ask because we've had a couple discussion threads asking about making things like campfires directly work in non-enclosed spaces. Modifying the pawn via those two variables in a radius is a way to do that.
Pelador  [author] 22 Apr, 2019 @ 12:23pm 
@Daniel_USA

The guidance notes describe what it does and how to use it, examples also provided.
Daniel_USA 22 Apr, 2019 @ 12:17pm 
you could simply make a demo video that shows what this does and how to make it do it.
Pelador  [author] 22 Apr, 2019 @ 11:55am 
@Daniel_USA

To demonstrate what though?

This tool can be used multiple ways based on the imagination and creativity of the mod developer with the application of the available statistics and how they define their hediffs. It would be practically impossible to show all the possible permutations of how this "tool" could be used as a result.
Valken 22 Apr, 2019 @ 11:29am 
Yeah I know I just wanted to know if some of the effects would also work with other things. Thanks for the response
Pelador  [author] 22 Apr, 2019 @ 11:19am 
@Christian This tool has been programmed specifically for buildings and their effects applied to pawns.
Daniel_USA 22 Apr, 2019 @ 10:34am 
is it possible for you to make a video?
Valken 22 Apr, 2019 @ 8:12am 
Can those effects only be added to buildings or could I also use this to add effects to items
Oniwabanshu 21 Apr, 2019 @ 7:34pm 
If i wasn't such a lazy bum i would be all over this mod already.
Oniwabanshu 21 Apr, 2019 @ 7:33pm 
Thank you!
Pelador  [author] 21 Apr, 2019 @ 6:37pm 
@yagiou

found to be minimal/not apparent so far, and scaled testing has been done with multiple buildings and lots of pawns on the same map.

The tick process is every 2 seconds per pawn (on average) as I considered the idea of performance as part of the design, so it spreads the pawn ticks around this period amount so that not all the pawns are just ticking at the same time also.

The idea of ticking on the pawn more preferable with checking it's environment as opposed to multiple ticks being associated with building items.
Oniwabanshu 21 Apr, 2019 @ 6:00pm 
Amazing concept!
Question, how much of a resource hog will this be?