[MOD] Wilderness NPCs

A curated forum for approved mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
User avatar
pango
Posts: 1919
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [MOD] Wilderness NPCs

Post by pango » Wed Jan 01, 2020 4:42 pm

If you want spawns to look random and unrelated to one another, correct model would be Poisson process I believe:

Code: Select all

+            // Poisson process https://preshing.com/20111007/how-to-generate-random-timings-for-a-poisson-process/
+            float rateParameter = (MinWaitTime + MaxWaitTime - 1) / 2f;
+            waitTime = -Mathf.Log(Random.Range(0f, 1f)) * rateParameter;
+            // apply bounds
+            waitTime = Mathf.Max(MinWaitTime, Mathf.Min(MaxWaitTime, waitTime));
Not sure if it'll make a big difference, but that can be experimented with.
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

L57
Posts: 96
Joined: Tue Dec 31, 2019 7:53 pm
Location: Moscow, Russia

Re: [MOD] Wilderness NPCs

Post by L57 » Thu Jan 16, 2020 10:04 am

This mod has one minor issue: it spawns enemies afloat in the ocean.

I think script simply should be stopped completely if PC is swimming.

L57
Posts: 96
Joined: Tue Dec 31, 2019 7:53 pm
Location: Moscow, Russia

Re: [MOD] Wilderness NPCs

Post by L57 » Thu Jan 16, 2020 5:36 pm

Ralzar wrote:
Fri Dec 27, 2019 7:08 am
but with wilderness allready having a random monster spawn table
I thought these tables only work while camping. Can you actually meet in vanilla DF/DFU any creature from this spawn tables simply while travelling in the wilderness (without fasttrevel)? Just want to clarify, can't remember at all

User avatar
pango
Posts: 1919
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [MOD] Wilderness NPCs

Post by pango » Thu Jan 16, 2020 5:53 pm

L57 wrote:
Thu Jan 16, 2020 5:36 pm
Can you actually meet in vanilla DF/DFU any creature from this spawn tables simply while travelling in the wilderness (without fasttrevel)? Just want to clarify, can't remember at all
From what I remember, yes you can. That's actually how you can encounter enemies with Tedious Travel, even without mods like Warm Ashes.
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

L57
Posts: 96
Joined: Tue Dec 31, 2019 7:53 pm
Location: Moscow, Russia

Re: [MOD] Wilderness NPCs

Post by L57 » Thu Jan 16, 2020 6:17 pm

Indeed, just found it without mods. I wonder why I thought otherwise for years

Post Reply