Jump to content

[Help] Attempting to update Wisteria


Recommended Posts

(Wisteria is NOT made by me, she is made by the forum user 'Wisteria'. I am only attempting to update her for DST. The original download can be found here: http://forums.kleientertainment.com/files/file/453-wisteria-the-herbalist-beta/ )

 

So yeah, I'm trying to update her for multiplayer, but I've encountered a couple of problems.

 

The first one:

 

Obvious I didn't expect this to work, but when moving the Wisteria files into DST mod directory, and starting the game with her, the game says that components like health, eater, and sanity cannot be found.

 

So I tried looking into other characters files that have been updated for DST (aka Cthulu and Ika), the only difference in code I saw was instead of this line:

 

local fn = function(inst)

 

they have:

 

local function master_postinit(inst)

 

After attempting to replace the first line with the second, in vain hopes of fixing the problem, I get problem number 2:

 

The main menu freezes after activating the mod.

 

I am NOT by any means a decent programer, so I have no clue if what I was attempting to do was even a feasible fix, as I'm sure it could take more than that to update Wisteria.

 

Any help in fixing this would be appreciated, as she is one of my favorite characters, next to Woodie, who isn't in the game yet! :(

Link to comment
Share on other sites

(Wisteria is NOT made by me, she is made by the forum user 'Wisteria'. I am only attempting to update her for DST. The original download can be found here: http://forums.kleientertainment.com/files/file/453-wisteria-the-herbalist-beta/ )

 

So yeah, I'm trying to update her for multiplayer, but I've encountered a couple of problems.

 

The first one:

 

Obvious I didn't expect this to work, but when moving the Wisteria files into DST mod directory, and starting the game with her, the game says that components like health, eater, and sanity cannot be found.

 

So I tried looking into other characters files that have been updated for DST (aka Cthulu and Ika), the only difference in code I saw was instead of this line:

 

local fn = function(inst)

 

they have:

 

local function master_postinit(inst)

 

After attempting to replace the first line with the second, in vain hopes of fixing the problem, I get problem number 2:

 

The main menu freezes after activating the mod.

 

I am NOT by any means a decent programer, so I have no clue if what I was attempting to do was even a feasible fix, as I'm sure it could take more than that to update Wisteria.

 

Any help in fixing this would be appreciated, as she is one of my favorite characters, next to Woodie, who isn't in the game yet! :(

Did you get permission from the author to update this for DST?

Link to comment
Share on other sites

Did you get permission from the author to update this for DST?

 

I wasn't planning on releasing a working version until I got a response from the creator.

 

Though, they seem to be out of commission... don't think I'll hear back from them :(

 

Regardless, I would still like to get Wisteria working, even if I only use her for personal servers.

Edited by Ogrecakes
Link to comment
Share on other sites

@Ogrecakes,

 

The fn() has been split into a common_postinit() and master_postinit(). What things you put in each is a bit hit-or-miss, but mostly you want to put stuff in the master_postinit(). The main thing I've encountered that needs to be in common are any recipes (e.g. Webber's spider egg recipe). There are definitely other things, though.

 

The real difference between the two is that they're called at different points in the constructor for player_common. So you can look at that and see when various things are created, and based on that determine whether it makes sense to have it in common or master.

 

But in general... you just have to let it crash a ton of times and then try to fix the things that crash. There's a lot of code changes, so there are many things that could need to be rewritten. Even if it crashes without showing you an error message in-game, there's probably a pretty useful one in the log file-- that's something I keep open literally at all times.

Link to comment
Share on other sites

I wasn't planning on releasing a working version until I got a response from the creator.

 

Though, they seem to be out of commission... don't think I'll hear back from them :(

 

Regardless, I would still like to get Wisteria working, even if I only use her for personal servers.

They were last online about 2 weeks ago, that hardly seems "out of commission", especially during this time of the year.

Edited by kraken121
Link to comment
Share on other sites

@Ogrecakes,

 

The fn() has been split into a common_postinit() and master_postinit(). What things you put in each is a bit hit-or-miss, but mostly you want to put stuff in the master_postinit(). The main thing I've encountered that needs to be in common are any recipes (e.g. Webber's spider egg recipe). There are definitely other things, though.

 

The real difference between the two is that they're called at different points in the constructor for player_common. So you can look at that and see when various things are created, and based on that determine whether it makes sense to have it in common or master.

 

But in general... you just have to let it crash a ton of times and then try to fix the things that crash. There's a lot of code changes, so there are many things that could need to be rewritten. Even if it crashes without showing you an error message in-game, there's probably a pretty useful one in the log file-- that's something I keep open literally at all times.

 

The thing that confuses me is that when the fn() was still in the code (instead of a common/master_postinit(inst)), the game would still let me load into my server before crashing after I select her. It's only after I replace the fn() that the main menu freezes.

 

Again, I am far from a good programmer.

 

Also, where do I access the log file?

 

Edit: I think it has something to do with loading the ghost files. aaaand I have no ******* clue how to create new assets and load them

 

They were last online about 2 weeks ago, that hardly seems "out of commission", especially during this time of the year.

 

Whoops, didn't notice that...

 

Regardless, if I didn't get a response (or permission to upload), I don't think I could really be wronged if I used a fixed up version of the character in a private, local friends only server.

Edited by Ogrecakes
Link to comment
Share on other sites

@Ogrecakes, Well, "fn()" is just a function name. If you notice, at the bottom of a character prefab it'll have a line like this:

return MakePlayerCharacter("wx78", prefabs, assets, common_postinit, master_postinit)

If you're just changing fn, then that's going to have the wrong number of arguments (and it's going to be putting the master_postinit in the slot for the common_postinit). So you have to change that too.

 

In Lua functions are also variables, so you can pass them as arguments, and that's what MakePlayerCharacter is doing-- passing the common_postinit and master_postinit functions so that they can be run at the correct points in MakePlayerCharacter.

Link to comment
Share on other sites

@Ogrecakes, Well, "fn()" is just a function name. If you notice, at the bottom of a character prefab it'll have a line like this:

return MakePlayerCharacter("wx78", prefabs, assets, common_postinit, master_postinit)

If you're just changing fn, then that's going to have the wrong number of arguments (and it's going to be putting the master_postinit in the slot for the common_postinit). So you have to change that too.

 

In Lua functions are also variables, so you can pass them as arguments, and that's what MakePlayerCharacter is doing-- passing the common_postinit and master_postinit functions so that they can be run at the correct points in MakePlayerCharacter.

 

EDIT: EEE GOT IT ALL WORKING!!!

 

The problem was that I didnt think you needed to load the common_postinit first, but now I realize why that code is there!

 

Thank you for your help <3 <3 <3

Edited by Ogrecakes
Link to comment
Share on other sites

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
 Share

×
  • Create New...