Super Mod makes Hearthlings have Higher base stats


#41

@DukeArchibald I made a Video on how to edit my mod go check it out


#42

Does this mod work just with Ascendancy? Can you make it for Rayaa too?


#43

I could try


#44

I’m having a problem with the hearthlings, they can’t sleep, so they get stuck trying to rest and waking up after a second sleeping, have anyone the same problem?


#45

Is that with Ascendancy or RC


#46

At the moment with the Ascendancy and without modifying the mod.


#47

Which one are you using? Like which super mod are you using


#48

I used 16 and 100 to try it and the problems appear in both


#49

Try using the 1-10 one since that seem to be the most normal one and there probably a problem with the 16 and 100 one


#50

It works with the 1-10 so it could be as you said cause 16 or more are making something wrong.


#51

That would make sense considering the Hearthling can only have 6 max and having a max of 16 and 100 will have bugs considering they were never meant to go up that high


#52

That’s the bug I found the last time, I’m not sure if it’s cause I use this mod, what I have seen is that the higher the stats are the faster it occurs:

release-784 (x64)[M]
…hearth/services/server/calendar/calendar_service.lua:292: invalid duration passed to calendar set timer, "-120"
stack traceback:
[C]: in function ‘assert’
…hearth/services/server/calendar/calendar_service.lua:292: in function ‘_create_timer’
…hearth/services/server/calendar/calendar_service.lua:182: in function 'set_timer’
stonehearth/ai/actions/run_effect_timed_action.lua:38: in function <stonehearth/ai/actions/run_effect_timed_action.lua:28>
[C]: ?
[C]: ?
[C]: in function ‘execute’
…arth/ai/actions/sleeping/run_sleep_effect_action.lua:14: in function <…arth/ai/actions/sleeping/run_sleep_effect_action.lua:9>
[C]: ?
[C]: ?
[C]: in function ‘execute’

[C]: in function 'run’
stonehearth/components/ai/ai_component.lua:515: in function <stonehearth/components/ai/ai_component.lua:499>
[C]: in function 'xpcall’
radiant/modules/commons.lua:66: in function 'xpcall’
stonehearth/components/ai/ai_component.lua:499: in function '_thread_main’
stonehearth/services/server/threads/thread.lua:273: in function <stonehearth/services/server/threads/thread.lua:270>
[C]: in function 'xpcall’
radiant/modules/commons.lua:66: in function 'xpcall’
stonehearth/services/server/threads/thread.lua:270: in function 'f’
radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>


#53


Both are avalable


#54


if you reload it will temporarily fix it


#55

Normally i would of though a Hearthlings that is 10 base stats or lower wouldn’t have a problem but i have a 9 Hearthling base stats that is stuck trying to go to sleep then getting back up. Which sucks because this mod is amazing i guess it just need a little fix for the 1-10 Hearthlings


#56

if you reload it will fix temeraraly


#57

I found a way to solve the problem of hearthlings not sleeping.

You need to do a little change at bas_human.json:


“sleep_duration”: {
“type”: “derived”,
“equation”: “140 - 1.8 * diligence”,
“min”: 60

If the result of this equation is below 0 then you’ll see the little bug, so you just need to delete “-1.8 * diligence” and let them sleep the max time or just what you consider the best but at least something or they will blow.


#58


so I change it from this:
“sleep_duration”: {
“type”: “derived”,
“equation”: “140 - 1.8 * diligence”,
“min”: 60
to
"sleep_duration": {
“type”: “derived”,
“equation”: “140 - diligence”,
“min”: 60
?


#59

You must have an eye here:

},
“diligence_adjustment”: {
“type”: “random_range”,
“private”: true,
“base”: 7,
“max”: 9
},
“diligence”: {
“type”: “derived”,
“equation”: “mind * 10 + diligence_adjustment”

Depending on the mod diligence could be to high so what i did is just delete <1.8 * “diligence”> and let them sleep the max, they work so fast so they deserve a great rest :wink:


#60

I would suggest a formula which takes the max possible stat into account, such as this:

“equation”: “140 - 100 * diligence / max_diligence”,

With the above equation, the maximum amount which can be subtracted from the max sleep time (140) becomes 100, and so the end result will be 40. The numbers can be liberally exchanged to whatever one sees fit, as long as the result stays above 0.

Edit: of course the max possible diligance has to be manually calculated for every version.
Edit 2: alternatively, you could go ahead and replace diligance with mind in the equation, which simplifies things a bit.
Edit 3: Of course this entire thing collapses when buff-effects which grant bonuses to diligance come into play, so cheaping out and using the mind stat directly might be sufficient. Or just any static number for that matter, eliminating every variable in the formula.

fddfd

Edit 4: So, I managed to confuse myself with all these edits, and probably everyone else too.

So basically, the above equation assumes that the maximum diligance is known. But it would have to be manually calculated, taking into account every possible bonus which applies to it.

It would be simpler to scrap diligance, which is derived from mind, and simply use mind instead which has a known maxumum value (16/100/1000, depending on the version of this mod).

Of course any static number could be used to completely avoid maths.

Edit 5: Of course there are many other methods which involve (possibly better thought out) math.