Jump to content

Recommended Posts

would it be difficult, if even possible?

to elaborate: i'm making a custom character, hypothetically in possession of one custom item! things were going pretty smoothly until i got to said item.

the idea is that it's a little book on crops. it shows you what you should know as you grow & pick them. for example once you are in the possession of corn, it will 'unlock' the page for corn, and it'll tell you its proper season, what seeds it grows from and anything of the sort. so... a cookbook which accesses the plant registry rather than learned recipes. yes, the gardeneer hat is a thing, and i'd like to code its functionality into a book! if my intent still isn't clear, i could probably draw what i have in mind.

all this seems incredibly far-fetched especially for somebody who only familiarized themselves with coding a few days ago, but i'd like to believe it's possible, even if it involves terribly complicated mechanics? you can feel free to prove me wrong. right now i just need a place to start, and any help is deeply appreciated. if anything like this has been asked before, i've completely missed it!

Edited by chrysomelidae
clarity

@chrysomelidae
I think I understand what you want, like tooltips for the crops you encounter, right?

I'm not very familiar with hoe books are coded, but the "cookbook" appears to store data in a string, then decode that data on demand.  Someone else might be able to make an alternate version of the book, but not me I'm afraid, I'm not talented enough a coder.

Hey :)

Yes.

What you want should be possible I think.

It might not even be that hard to do.

If you find the code for the cookbook, and the gardener hat. Then smoosh them together in to a new item is basically what you're thinking right?

I'd look in the /<DST INSTALL FOLDER>/data/scripts/prefabs folder for them (or rather, <DST INSTALL>/data/databundles/scripts.zip/scripts/prefabs/ )

I'd also use the wiki to look up the item's in-code names, ie: /data/databundles/scripts.zip/scripts/prefabs/cookbook.lua and "plantregistryhat" respectively.

Also, look at how other mods add a new items to the game

Hope that helps, and Good luck :)

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...