a multiplayer game of parenting and civilization building
You are not logged in.
Hi all.. just wondering if this is possible to do, without changing the source. I'm not a programmer and Linux/shell stuff is just too overwhelming for me, so I got my paws on Awbz' precompiled set. I wanted to put it up to play with my friends in a little village, however even when the server is offline, decay still happens. We had a little base, and 3 days later when we put the server back up to play, our village was in ruins.
I know it has something to do with the transitions, and i tried poking around in the editor to get rid of it, but none of it seems to work. I tried digging through the objects/transitions folders with grepwin and while i found some of the objects i couldn't find a common denominator in which to compare to find the numerical value to edit.
Any help would be much appreciated! <3
Offline
Decay might be implemented as transitions with timer. So you'd just remove transitions with timer that result in nothing.
For example, the second transition for broken skewers: https://onetech.info/847-Broken-Skewer
Offline
Yea, trouble is I can't tell which number in the transitions text file is the timer, and editing it in the editor never seems to work. (and yes, i clear the cache every time). I suppose even if there is a detailed guide out there on how to use the editor that would help too, so I could get it working on that front. As is all the changes I make have to be done in notepad for them to actually take hold.
Offline
You're on the right track, but this could be a daunting task without using the editor. To make matters worse, there's little-to-no documentation on how to use the editor. Jason has a full video of him using the editor to implement sheep, along with its various transitions, which may or may not help in that regard. An oversimplification is that combining the top two objects will transition, or produce, the bottom two objects.
As far as looking at the transition text files themselves, if you're specifically wanting to remove decay (IE: deleting a transition)...then you'd want to delete the appropriate transition file associated with the object in question.
For example, let's say you want Wheelbarrows to last forever. Effectively, all you'd really need to do is remove the transition of a Wheelbarrow "decaying" into an Old Wheelbarrow.
D:\OneLife\objects>findstr /C:"Old Wheelbarrow" *.txt
1321.txt:Old Wheelbarrow
D:\OneLife\transitions>findstr /C:" 1321 " *.txt
-1_483.txt:0 1321 -10 0.000000 0.000000 0 0 0 1 0 0
Here we can see that "Old Wheelbarrow" has an object ID of 1321, and the associated transition for it is the -1_483.txt file. You may also note that the 483 portion of this filename corresponds to the "Wheelbarrow" object ID. Simply delete this -1_483.txt transition file from both the client & server folder(s), rebuild the caches, and your game should no longer have a Wheelbarrow decay. Keep in mind that all clients connecting to your modified server will require the same modifications/deletions!
There will still be "leftover" transitions that will, now, never be used (-1_1321.txt & -1_1322.txt, as well as the "Old Wheelbarrow" and "Broken Wheelbarrow" objects themselves)...but removing that one transition file effectively halts its decay "chain." 483 (Wheelbarrow) turns into 1321 (Old Wheelbarrow), which turns into 1322 (Broken Wheelbarrow), then finally disappears into thin air.
Another quick example can be found in this commit where Jason removed the decay of backpacks by deleting the associated decay transition files.
I'm no expert with using the editor, but performing this task can also be done within its UI...however that will take some experimentation on your part. Given the sheer amount of items you're likely to dig through, using the editor is probably going to be your best bet...although you can absolutely accomplish this manually.
There are plenty of folks who have messed with the editor, likely much more than I have, so you might be able to solicit some help from the community here or on Discord. Meanwhile, I hope this helps in some way and wish you luck with your project!
Offline
Thanks a bunch! I was wary of outright deleting files, afraid to break things. It seems to work now! <3 Much appreciated!
Offline