1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
5/5, 1 rating

How to add Snippet's/Systems

Summary of the tutorial

This is a small kinda simple how to for adding in Snippet/Systems into your shard

Adding Snippets/Systems

How To Add Custom Code:

Hello Agian,

Here is a small help and how to for adding in "Custom" code or "Snippets".

Here I will explain how you go about adding "Basic" plug-n-play code that you just have to go in and drop into the code and how to get it to work. Most Developers or people who have released "Custom" code or "Snippets" will have a help/readme file telling you how to add it in, but I decided to do this as a quick reference for you to be able to know right away on how to add the code and go.

Please Be warned that now all code/snippet/package you download are up-to-date and may not work without being updated or may contain In-game bugs (More on this as you read).

So assuming you are looking at you *\ServUO-master\ file you will see a few different folders and files but the one we want is called "Scripts". Going in there you will see a bunch more now right click add new folder and call it "Custom" this is where you will drop all you custom code into.

So after you have created this folder and opened it up you are ready to start putting in "Snippets" that do not require you to edit any files and you can then go and "Compile" your code using the Compile.WIN file in the *\ServUO-Master file, After you have done that just double click on your ServUo.exe file you will see it saying

Scripts: Compiling C# scripts

Give it a min and it "SHOULD" say

Scripts: Compiling C# scripts...done (cached)

And then it will continue and finish loading to where it is running...

But sometimes you will get errors.... we all hate errors, If you look at the error that has been displayed it normally tells you what file and what line is causing the error. You would then go into that file find the line and fix the error, I know some people may not be a coder but take a look at it something may not be spelled correctly or is out of place. Some things are very easy to fix others not so much and you would then ask for help on the forums.

Now sometimes when you start the Servuo.exe file you get warnings these are to tell you something it not correct in the code but it will still work and "MAY/WILL" in time cause an issue when you use that item/mobile/system that you have installed... I suggest if you can go in and Find the error and see why it is happening. It may be as simple as the compile didn't find a " ) " out of place and throw an error but only a warning so just fix that and it "Should" compile again without that warning....

Remember not all things are cut and dry and really easy to fix. Having SOME knowlegde of C# code is essential if you plan on changing alot of things to make your Shard more custom or have a friend/family member that knows C# code to help you.

Now that is just a basic "Snippet" installation, Now there are many "Snippets" out there that are a complete new system you are adding into the game code, These will require you to change other files that come Standard in the ServUO-Master package that you downloaded.

Please note that not all new code you download will work some of them are actually Out-Of-Date and may need to be updated or some may be working but have bugs, That have not shown up as an error/warning when compiling or running the server these bugs are in-game bugs. These happen when you use the system/snippet and it don't like or want to do what it is meant to properly and crashes the server or many other different things may occur.

There are also programs out there that help you with some internal game changes those are different from normal code you add into the game, There are even a few that you can add to your code so that you can remotely access certain file from the server to be able to View/Change things in the game, But those are usually drag and drop and do not require you to edit any internal files.

I really hope this help/tutorial gives people a hand on how to start out on adding in codes to there server and if there is anything I have missed PLEASE feel free to add it or drop me a line and I will edit this help/tutorial as needed.

Thank You all for reading and happy Coding