Jump to content

Mod not working on a dedicated server


Recommended Posts

Hello,

 

I made a mod adding a starting stuff if season is summer/winter. Seems to work on classic server but not on dedicated server.

Could someone help me finding why ?

 

http://steamcommunity.com/sharedfiles/filedetails/?id=465111683 <- here the steam link, if it could help.

 

Is there specific things to add for dedicated server ? And when ? All the mod require it ?

 

Thank for the help.

modinfo.lua

modmain.lua

Link to comment
Share on other sites

all_clients_require_mod = true

this makes it so all the clients have to have the mod installed, but that's not really necessary, since adding the items is something that has to happen on the serverside.

@Lumina,

did u put prints in there to try to figure out whats happening?

Link to comment
Share on other sites

Ok i must remove the "all_clients_require_mod = true", but must i replace it by something else ?

 

And i don't have prints, sorry. I haven't dedicated server (and have trouble having one) so i'm not able to test it myself.

 

Thanks for the help :)

Link to comment
Share on other sites

@Lumina, setting all_clients_require to false and client_only to false makes it a server only mod. Based on the code it should work flawlessly on dedicated servers, although I personally would have hooked into the player via AddPlayerPostInit instead of doing it the way you did. 

Link to comment
Share on other sites

Ok. Thanks again for the help.

 

@Kzisor

I find an example using this method but i don't know enough to know the others methods possible or find the best.

 

 

@Seiai

Yes, i know for the local dedicated server, it's just a little hard to configure and all.

 

So, for the print i was thinking it was a sort of error log. Sorry, my english is not really good and the code language is sometime difficult to understand.

 

What is the use of the print ? A sort of mark to see if some part of the code are working ? How i must use it ?
I know it could seems very basic for you, but i'm a little lost.

Link to comment
Share on other sites

@Lumina,

u can see it in the console and in the logfile.

so if it reaches that point in the code, it prints whatever u put in the printfunction. u can just use this as a marker, or output variables to see what's in them at that point.

Link to comment
Share on other sites

Not got the time to test it for now, but i'm wondering : how the Reign of Giant content is working ? because in the classic game it was separate files. Here i don't know. Do i have to make something special to tell that it need RoG content ? Could the crash come for server disabling RoG content ?

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...