One Hour One Life Forums

a multiplayer game of parenting and civilization building

You are not logged in.

#1 2018-11-23 01:05:42

Moepenmoes
Member
Registered: 2018-11-22
Posts: 7

How to edit the source code to disable or reduce hunger/aging?

I've managed to set up a working private OHOL server earlier today (in Ubuntu), and for sandbox/experimenting purposes I'd like to disable or reduce hunger/aging. What should I edit in the source code to make this possible? I know it's possible because there are some custom OHOL servers out there with reduced hunger and aging, but I have no idea how they did it. Already asked on the OHOL Discord and I've tried tweaking some stuff such as tweaking min and maxfooddecrements in server.ccp, but apparently I'm still doing something wrong or missing something.

Hopefully one of you is able to guide me in the right direction. Thanks in advance.

Offline

#2 2018-11-23 08:18:59

lionon
Member
Registered: 2018-11-19
Posts: 532

Re: How to edit the source code to disable or reduce hunger/aging?

I cannot test it now, but looking at the source:

Food  line 11985 in server.cpp looks like the time based food reduction, simply comment it out and foodstore shouldn't reduce by itself.

Age line 1693.. instead of "return age", try replaceign it with "return 30" and every player should be permanently 30.

When I get to it I wanted to try something like this myself to try out more complicated things in peace on my private for-me-alone localhost server.

Offline

#3 2018-11-23 14:25:36

wondible
Member
Registered: 2018-04-19
Posts: 855

Re: How to edit the source code to disable or reduce hunger/aging?

Food rates are easily set by server setting files.I don't see one for age rate, but secondsPerlYear looks like the easiest code change.


https://onemap.wondible.com/ -- https://wondible.com/ohol-family-trees/ -- https://wondible.com/ohol-name-picker/
Custom client with  autorun, name completion, emotion keys, interaction keys, location slips, object search, camera pan, and more

Offline

#4 2018-11-23 15:40:16

Moepenmoes
Member
Registered: 2018-11-22
Posts: 7

Re: How to edit the source code to disable or reduce hunger/aging?

Yeah, heard earlier that hunger rates can be changed by editing the maxFoodDecrementSeconds .ini and minFoodDecrementSeconds .ini files.

Offline

#5 2018-11-23 16:01:45

lionon
Member
Registered: 2018-11-19
Posts: 532

Re: How to edit the source code to disable or reduce hunger/aging?

Just got a few minutes to test it out. Yes works out like expected.

Offline

#6 2018-11-23 16:58:53

Moepenmoes
Member
Registered: 2018-11-22
Posts: 7

Re: How to edit the source code to disable or reduce hunger/aging?

wondible wrote:

Food rates are easily set by server setting files.I don't see one for age rate, but secondsPerlYear looks like the easiest code change.

Yeah I've tried changing the secondsPerYear code but it didn't have any effect. I've either missed something or there's something else that has to get changed to affect aging.

Offline

#7 2018-11-23 19:56:06

lionon
Member
Registered: 2018-11-19
Posts: 532

Re: How to edit the source code to disable or reduce hunger/aging?

just discovered the hard way, line 85 server.cpp should be set to INFINITY, otherwise the game will kill you, albeit the computed age is forced to 30.

Offline

Board footer

Powered by FluxBB