Jump to content

Recommended Posts

I want to figure out what exact differences there are between Server_only_mod and All_clients_require_mods, especially during game process.

Say, how differently will they act during game initialization? What exactly happens during game initialization? What exactly do server and client do during game initialization respectively?

Is there any reference or manuals or something to look up regarding this?

'cause I made a server_only_mod that modifies an existing prefab (only add extra codes, no extra images or anything), and it functions very well I suppose (at least no comment about having problems of different actions between server and client so far), but still I'm a little worried about this.

Plus, I really want to know the game operation process (the order DST load game files, etc) and I just find it very very rare on the internet.

@D_BL

The all clients require flag in modinfo forces clients that join the server to get the mod from the workshop in order to play on it and will run the mod's modmain during initialization.

The server only flag runs the script(s) on the server during its initialization but doesn't make clients download nor run anything.

 

If your server-only mod touches server-side components and logic then there's no need for clients to also have a copy of it.  Most mods use the all required because it's easier to write mods knowing that it could be ran on either client or server.  Flagging it one or the other requires knowledge on what is entirely server-sided and such.

 

The order of operations for initialization is all there in the scripts files for you to look over, but to give you a kickstart look at modutil.lua and check out the ModWrangler class for its functionality.

  • Like 1
Quote

@CarlZalph, thank you for your reply!

2 hours ago, CarlZalph said:

Flagging it one or the other requires knowledge on what is entirely server-sided and such.

yeah, well actually I really can't decide whether something is entirely server-side or not.

In my server-only mod, I modified one existing component file of an existing object. Will this modification be broadcasted to clients?
I mean, do server and clients use the same existing Component files?
I guess clients will at first use the server Component files, and then they will check if there's local modfications. If yes, they use the local ones over the server ones. Am I understanding it right?

Quote
2 hours ago, CarlZalph said:

The order of operations for initialization is all there in the scripts files for you to look over, but to give you a kickstart look at modutil.lua and check out the ModWrangler class for its functionality.

Thank you very much! I will check those files to learn more.

BTW, what I firstly want is like a book or something I can read about all those things. You know, like a manual about mod-making. 'cause I think there're much more barriers if one can only learn from codes, let alone massive amount of codes.

 

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