Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Other

Other Cant find a category above, use this one! Core mods not listed above go here!

Reply
 
Thread Tools Display Modes
Old 07-08-2007, 01:47 PM   #1 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,413
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Cool Lokai Versioning (Workbench Mod)

LOKAI Versioning.

NEW!

Just added to this post 2 new downloads, one for 1.0, and another for 2.0 RC2 (or SVN 286.)

Both use the new system discussed later in this thread. When you start your Server with one or more of the switches, it will look for files with *.cs extensions located in folders called Scripts.LV1, Scripts.LV2, etc. It will only compile the ones you have selected with switches enabled. I recommend you use the attached Lokai RunUO Menu.bat batch file, which will make running the Server easier, since it will turn on the switches for you.

One Note: "debug" and other modes used in the batch file were NOT tested with the 1.0 version, so use caution on those other switches.

CHANGE LOG:

4/7/2008
Added RunUO 1.0 Lokai Versioning system. Tested.
Added Lokai Versioning for RunUO 2.0 RC2. Tested.

8/15/2007
Lokai RunUO Menu. Batch file to process various switches.

This concept is really an expansion of the idea put forth by Ashlar, in:

[2.0] Workbench Scripts.WB.dll for faster compile times.

The idea is to compile the scripts in separate entities so that compile time is less. This is particularly useful for people that make hundreds of small changes to scripts, and compile the Server each time to make sure it works.

This idea expands on that, and introduces a new concept, which for lack of a better term, I call "Lokai Versioning" for simplicity. With this modification, you can choose at Run-time which scripts to include or exclude based on which extensions they have.

LV1 scripts have .lv1 extensions, etc.

When run, here are examples of what you might see, depending on what parameters you pass to the Compiler:

Quote:
Originally Posted by Server.exe -LV1 -LV2 -LV3 -LV4 -LV5
RunUO - [www.runuo.com] Version 2.0, Build 2745.21656
Core: Running on .NET Framework Version 2.0.50727
Core: Running with arguments: -lv1 -lv2 -lv3 -lv4 -lv5
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...done (cached)
Scripts: Compiling VB.NET scripts...no files found.
Scripts: Compiling Lokai Version-1 C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling Lokai Version-2 C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling Lokai Version-3 C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling Lokai Version-4 C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling Lokai Version-5 C# scripts...done (0 errors, 0 warnings)
Scripts: Verifying...done (2705 items, 743 mobiles)
Regions: Loading...done
World: Loading...done (0 items, 0 mobiles) (0.05 seconds)
Quote:
Originally Posted by Server.exe -LV2 -LV4 -LV5
RunUO - [www.runuo.com] Version 2.0, Build 2745.22469
Core: Running on .NET Framework Version 2.0.50727
Core: Running with arguments: -lv2 -lv4 -lv5
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...done (cached)
Scripts: Compiling VB.NET scripts...no files found.
Scripts: Compiling Lokai Version-2 C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling Lokai Version-4 C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling Lokai Version-5 C# scripts...done (0 errors, 0 warnings)
Scripts: Verifying...done (2678 items, 742 mobiles)
Regions: Loading...done
World: Loading...done (0 items, 0 mobiles) (0.01 seconds)
Attached Files
File Type: zip Server.zip (10.1 KB, 24 views)
File Type: zip Lokai Runuo Menu.zip (1.2 KB, 20 views)
File Type: zip RunUO-1.0 Lokai Versioning.zip (8.1 KB, 6 views)
File Type: zip Lokai Versioning RC2.zip (10.4 KB, 6 views)

Last edited by Lokai; 04-07-2008 at 06:13 PM. Reason: Added RunUO Lokai Menu
Lokai is offline   Reply With Quote
Old 07-08-2007, 01:50 PM   #2 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,413
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default

Oh, sorry, just a note, this is designed for SVN 187, you will need to make some mods to make it work with SVN's lower than probably around 181.
Lokai is offline   Reply With Quote
Old 07-10-2007, 07:43 PM   #3 (permalink)
Forum Expert
 
Join Date: Dec 2005
Location: Germany
Age: 31
Posts: 401
Default

Lokai, this is a really interesting thing and I actually wonder why it has found so little attention so far. What I'd be interested in, though, is if it could be modified in a way that does not use different file extensions, but different paths instead? Like:

RunUO Server\Scripts
RunUO Server\Scripts.LV1
RunUO Server\Scripts.LV2

It should be somewhat less bothersome than constantly having to rename the file extensions (even though I agree that this bother is quite insignificant compared to the possible advantages of the system itself).
Setharnas is offline   Reply With Quote
Old 07-11-2007, 08:34 AM   #4 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,413
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default

Quote:
Originally Posted by Setharnas View Post
Lokai, this is a really interesting thing and I actually wonder why it has found so little attention so far. What I'd be interested in, though, is if it could be modified in a way that does not use different file extensions, but different paths instead? Like:

RunUO Server\Scripts
RunUO Server\Scripts.LV1
RunUO Server\Scripts.LV2

It should be somewhat less bothersome than constantly having to rename the file extensions (even though I agree that this bother is quite insignificant compared to the possible advantages of the system itself).
I did consider this possibility. If you have ideas on how to implement it, I would like to hear them. In the meantime, I will see what I can come up with.
Lokai is offline   Reply With Quote
Old 07-11-2007, 10:22 AM   #5 (permalink)
Forum Expert
 
Join Date: Dec 2005
Location: Germany
Age: 31
Posts: 401
Default

Quote:
Originally Posted by Lokai View Post
I did consider this possibility. If you have ideas on how to implement it, I would like to hear them. In the meantime, I will see what I can come up with.
How about this? (untested, will do so in a moment, but you can take a look at it right away)

*Edit*
Works, it loads a bunch of scripts I put into MyServer\Scripts.LV1 and I can use commands defined in them.


To clarify what I did: I merged your main.cs and scriptcompiler.cs with mine, then added an additional overload to the GetScripts method in scriptcompiler. This is needed because the standard one is set to only load from \Scripts. Finally, I modified your Lokai Version 1 - 5 regions so they would use *.cs again, and additionally call GetScripts with the parameter "Scripts.LV1" to "Scripts.LV5".

Now I expect anyone who can think of a reason why this should not be done to please tell me so.
Attached Files
File Type: cs ScriptCompiler.cs (44.9 KB, 11 views)

Last edited by Setharnas; 07-11-2007 at 10:47 AM. Reason: Confirmation edit
Setharnas is offline   Reply With Quote
Old 07-11-2007, 11:03 AM   #6 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,024
Send a message via Yahoo to Lord_Greywolf
Default

sounds like a winer to me

let us know if you have any problems at all with it
the more we can spread out some of this stuff the better
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is offline   Reply With Quote
Old 07-11-2007, 11:20 AM   #7 (permalink)
Forum Expert
 
Join Date: Dec 2005
Location: Germany
Age: 31
Posts: 401
Default

Yes, m'lord, I really hope this will help you with your own server. Just be aware that the same limits still apply as with the original idea: you can't have anything in the main script assembly that depends on something loaded in a later one. So, any script package that is completely self-contained (except for inheriting from objects from the main assembly) can be put completely into a Scripts.LV1-5 folder.

Practical example: I have Nerun's distro installed (who hasn't ). This includes a GMHidingStone, the one from CEO IIRC. I had gotten a newer version of that, and this was among the scripts I put into the LV1 folder for a test. Of course, when RunUO tried to compile the main assembly, it error'd out - because it depended on an object that would only be included in a later assembly. As long as you're sure that doesn't happen, you're golden.

Oh, and so far it's limited to five custom folders, but that should be sufficient for most servers, I guess.
Setharnas is offline   Reply With Quote
Old 07-11-2007, 11:51 AM   #8 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,413
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default

Quote:
Originally Posted by Setharnas View Post
...
Oh, and so far it's limited to five custom folders, but that should be sufficient for most servers, I guess.
This is what I was thinking also. Five should be plenty, except for those that REALLY want the ultimate VERSIONING system, where they can keep track of EVERY change they make, and revert to one at any point in time. (ugh )
Lokai is offline   Reply With Quote
Old 07-11-2007, 11:52 AM   #9 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,413
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default

Quote:
Originally Posted by Setharnas View Post
How about this? (untested, will do so in a moment, but you can take a look at it right away)

*Edit*
Works, it loads a bunch of scripts I put into MyServer\Scripts.LV1 and I can use commands defined in them.


To clarify what I did: I merged your main.cs and scriptcompiler.cs with mine, then added an additional overload to the GetScripts method in scriptcompiler. This is needed because the standard one is set to only load from \Scripts. Finally, I modified your Lokai Version 1 - 5 regions so they would use *.cs again, and additionally call GetScripts with the parameter "Scripts.LV1" to "Scripts.LV5".

Now I expect anyone who can think of a reason why this should not be done to please tell me so.
Did you make any changes to Main.cs? Because, if so, you did not post that one.
Lokai is offline   Reply With Quote
Old 07-11-2007, 12:00 PM   #10 (permalink)
Forum Expert
 
Join Date: Dec 2005
Location: Germany
Age: 31
Posts: 401
Default

Nope, main.cs is still as you put it in the zip. I felt I should not redistribute a new archive because my meager contribution consisted of just one slightly modified method, so I won't claim any credit for it. I wouldn't even have thought of the whole thing if not for you and Ashlar.
Setharnas is offline   Reply With Quote
Old 07-11-2007, 04:34 PM   #11 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,413
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default

I like it.

I created a new Project Tool to read the files from the separate Scripts folders. I have attached it here, including my modified source files.
Attached Files
File Type: zip ProjectTool.zip (8.7 KB, 15 views)
File Type: zip ProjectTool Source.zip (10.5 KB, 16 views)
Lokai is offline   Reply With Quote
Old 07-11-2007, 06:46 PM   #12 (permalink)
Forum Expert
 
Join Date: Dec 2005
Location: Germany
Age: 31
Posts: 401
Default

Neat thing, but I have stumbled over a small error. When I tried to open the .csproj file your tool created from my scripts, my VS 2005 error'd out. What it seems to have hiccup'd on was a "&" character (the given position points to a space right after that) in a scriptfolder path.

The error was (paraphrased from german):

The project file "Scripts.csproj" could not be read.
{path}\Scripts.csproj(122,94): The project file could not be loaded. An error occured while analysing 'EntityName'. Line 122, position 94.

Last edited by Setharnas; 07-11-2007 at 06:48 PM.
Setharnas is offline   Reply With Quote
Old 07-11-2007, 08:38 PM   #13 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,413
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default

Quote:
Originally Posted by Setharnas View Post
Neat thing, but I have stumbled over a small error. When I tried to open the .csproj file your tool created from my scripts, my VS 2005 error'd out. What it seems to have hiccup'd on was a "&" character (the given position points to a space right after that) in a scriptfolder path.

The error was (paraphrased from german):

The project file "Scripts.csproj" could not be read.
{path}\Scripts.csproj(122,94): The project file could not be loaded. An error occured while analysing 'EntityName'. Line 122, position 94.
You have a script with an '&' in the name? Try changing the name of that file. I did not get any errors with it, and it's actually the same Project Tool that has been used on these forums quite a lot, just modified for my Version folders.
Lokai is offline   Reply With Quote
Old 07-12-2007, 07:10 AM   #14 (permalink)
Forum Expert
 
Join Date: Dec 2005
Location: Germany
Age: 31
Posts: 401
Default

Quote:
Scripts\Custom\FS Animal Taming Systems Gen2\Advanced Pet System\Gump & Menus
Not even a thing I made myself. But I haven't used that tool before, rather made my own project file for my server. So, I've never had this error before either.
Setharnas is offline   Reply With Quote
Old 08-15-2007, 06:28 PM   #15 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,413
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default Lokai RunUO Menu

Just added to first post this little Batch file utility.

It lets you select debug or service mode, in addition to turning on any combination of switches, all in a cool little batch file menu.

Here are some screen shots:
Attached Images
File Type: jpg Lokai1.jpg (36.7 KB, 49 views)
File Type: jpg Lokai2.jpg (57.1 KB, 39 views)
File Type: jpg Lokai3.jpg (38.3 KB, 34 views)
Lokai is offline   Reply With Quote
Old 03-30-2008, 02:34 AM   #16 (permalink)
Forum Expert
 
Iomega0318's Avatar
 
Join Date: Feb 2005
Location: Dirt City,TX
Age: 21
Posts: 608
Send a message via ICQ to Iomega0318 Send a message via AIM to Iomega0318 Send a message via MSN to Iomega0318 Send a message via Yahoo to Iomega0318
Default

Sorry for bringing this thread back to life.. But does this work on 1.0?
__________________
-Lichking-
"I believe in Christianity as I believe in the sun...
not because I see it but because by it I see everything else."
C.S. Lewis

Heed what I say, for it shall be mentioned only once.

Iomega0318 is offline   Reply With Quote
Old 03-30-2008, 01:30 PM   #17 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,024
Send a message via Yahoo to Lord_Greywolf
Default

probably would - but i would:

1) make back ups 1st
2) look to see the simular calls made in the 1.0 version, and if different way of being done - modify it to match

but can always try it - woprse case is it fubars on you and you have to undo it
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is offline   Reply With Quote
Old 03-30-2008, 09:44 PM   #18 (permalink)
Forum Expert
 
Iomega0318's Avatar
 
Join Date: Feb 2005
Location: Dirt City,TX
Age: 21
Posts: 608
Send a message via ICQ to Iomega0318 Send a message via AIM to Iomega0318 Send a message via MSN to Iomega0318 Send a message via Yahoo to Iomega0318
Default

Very true, as soon as I have the free time I will try it out..

Thanx Greywolf
__________________
-Lichking-
"I believe in Christianity as I believe in the sun...
not because I see it but because by it I see everything else."
C.S. Lewis

Heed what I say, for it shall be mentioned only once.

Iomega0318 is offline   Reply With Quote
Old 04-07-2008, 06:14 PM   #19 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,413
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default

NEW!

Just added to the top post 2 new downloads, one for 1.0, and another for 2.0 RC2 (or SVN 286.)

Both use the new system discussed earlier in this thread. When you start your Server with one or more of the switches, it will look for files with *.cs extensions located in folders called Scripts.LV1, Scripts.LV2, etc. It will only compile the ones you have selected with switches enabled. I recommend you use the attached Lokai RunUO Menu.bat batch file, which will make running the Server easier, since it will turn on the switches for you.
One Note: "debug" and other modes used in the batch file were NOT tested with the 1.0 version, so use caution on those other switches.
Lokai is offline   Reply With Quote
Old 04-27-2008, 05:36 PM   #20 (permalink)
Forum Expert
 
Iomega0318's Avatar
 
Join Date: Feb 2005
Location: Dirt City,TX
Age: 21
Posts: 608
Send a message via ICQ to Iomega0318 Send a message via AIM to Iomega0318 Send a message via MSN to Iomega0318 Send a message via Yahoo to Iomega0318
Default

You are the best, I had been unsuccessful in my attempts anyways lol...

**EDIT**

When I download the files they are like corrupt or something and aren't working.. anyone else having this issue?
__________________
-Lichking-
"I believe in Christianity as I believe in the sun...
not because I see it but because by it I see everything else."
C.S. Lewis

Heed what I say, for it shall be mentioned only once.


Last edited by Iomega0318; 04-27-2008 at 05:48 PM.
Iomega0318 is offline   Reply With Quote
Old 04-27-2008, 05:56 PM   #21 (permalink)
Forum Expert
 
Iomega0318's Avatar
 
Join Date: Feb 2005
Location: Dirt City,TX
Age: 21
Posts: 608
Send a message via ICQ to Iomega0318 Send a message via AIM to Iomega0318 Send a message via MSN to Iomega0318 Send a message via Yahoo to Iomega0318
Default

Here is an error message I receive when I change the extension and try to run it..
Attached Images
File Type: jpg lokai.jpg (50.7 KB, 7 views)
__________________
-Lichking-
"I believe in Chr