Mythruna
April 23, 2024, 03:34:27 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Script/plugin installation...  (Read 9432 times)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« on: October 22, 2012, 06:49:13 PM »

There have been some questions about this lately so I'm putting together a post that describes this in detail along with where it's headed.  This post can then be updated as the feature is updated.

As of the June 2012 release of Mythruna, here is how plug-ins can be installed:

Below when I describe a directory, it is relative to where Mythruna is installed and is not created by default.  So when I talk about a "mods" directory, I'm talking about a yet-to-be-created sub-directory underneath where you installed Mythruna.

So, if you have:
C:\SomePath\Mythruna
That has the Mythruna.exe in it then I mean:
C:\SomePath\Mythruna\mods

Also note, unless otherwise specified, the script/plugin search is recursive.  So if you install a plugin script under mods/scripts/foo/bar the script manager will still find it.  This is a nice way to keep plug-ins isolated if they have lots of scripts and data files... plug-in authors should consider this when packaging their plugins.  Unzipping a zip into the mods/scripts directory may be all that's needed.

Client-side plugins

Right now there are three different kinds of scripts that go in three different places (this will change someday).

UI Scripts:
These are scripts that are run on the client for either single player or multiplayer.  They can be used to tweak key mappings or add console commands like the /trees and /flora commands.
They go in:
Code:
mods\ui-init

Dialog scripts:
These are dialog related scripts (like the help file but can be used for any interactive clickable conversation) used by other scripts.
They go in:
Code:
mods\dialog

Plug-in scripts:
These are the general purpose scripts that are run during single player games.  They can add commands, tools, game-mode objects, etc..  This is really the heart of the plug-in system as of this version.
They go in:
Code:
mods\scripts

Server-side plugins

The server only has dialog and regular plug-in scripts.  They are essentially the same as for the client/single player versions except that are used by the server during multi-player games.  They can still add tools, commands, game-mode objects, etc..

Dialog scripts go in: dialog
Plugin scripts go in: scripts

So if you have your stand-alone mythruna server installed in: C:\MyGames\Mythruna-server

You would make: C:\MyGames\Mythruna-server\scripts
...if you wanted to have a place to put multiplayer plugins.

Additional Libraries

It is possible for a plug-in script to use additional libraries and that plugin may then require that an additional library directory is added.  In this case, there will be an additional "lib" subdirectory relative to the plug-in script that contains .jar files that the plugin requires.

The Future

Soon, users will not need to involve themselves in any of this.  They will at worst have to put a plugin file in the already-created plugins directory and then "install" it through the mythruna game interface... either client or server.  These would be packaged as .jar files and include everything that the plug-in needs along with dependency information if it needed some other plug-in installed first.

So from a users perspective, all of the hard parts would be taken care of and the plugin (along with author, version, etc.) will just appear in a list in the in-game Plugin Manager screen.  When they create new worlds they can choose to use the plugins or not.

...but today, we still have to hand create directories and copy script files.
Logged
Iggyjeckel
Donators
Hero Member
***
Posts: 510


View Profile
« Reply #1 on: October 23, 2012, 05:15:11 AM »

Thank you paul for this
Logged
TryKM
Newbie
*
Posts: 2


View Profile
« Reply #2 on: October 12, 2013, 07:10:09 PM »

Hey Paul! I've been wondering how I could install mods or plug ins into the game? I have a mac so I wasn't sure if what everything you were saying was meant for PC's only (since you keep saying <file name>.exe which isn't in my version of Mythruna). I'm wondering if I'm supposed to decompile the Mythruna-<version>.jar file or the mythruna.db folder.

Also I'm wondering if I am worthy of a face palm.
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #3 on: October 12, 2013, 08:12:37 PM »

Hey Paul! I've been wondering how I could install mods or plug ins into the game? I have a mac so I wasn't sure if what everything you were saying was meant for PC's only (since you keep saying <file name>.exe which isn't in my version of Mythruna). I'm wondering if I'm supposed to decompile the Mythruna-<version>.jar file or the mythruna.db folder.

Also I'm wondering if I am worthy of a face palm.
I'm pretty sure it should work the same, in the directory that you have mythruna add a folder called "mods" and then the subfolder type, so like if my mythruna's path was at 'C:\mypath' then mythruna's folder would be at 'C:\mypath\Mythruna-20120627' in that directory add the mods folder.
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #4 on: October 12, 2013, 08:49:17 PM »

Hey Paul! I've been wondering how I could install mods or plug ins into the game? I have a mac so I wasn't sure if what everything you were saying was meant for PC's only (since you keep saying <file name>.exe which isn't in my version of Mythruna). I'm wondering if I'm supposed to decompile the Mythruna-<version>.jar file or the mythruna.db folder.

Also I'm wondering if I am worthy of a face palm.

You don't need to decompile anything.  While the layout of your Mythruna application may be a little different on a Mac, basically whatever directory it stuck the mythruna.db directory in is the one where you can create a mods directory as described.  So mythruna.db and mods will be siblings.
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #5 on: October 12, 2013, 09:18:07 PM »

Hey Paul! I've been wondering how I could install mods or plug ins into the game? I have a mac so I wasn't sure if what everything you were saying was meant for PC's only (since you keep saying <file name>.exe which isn't in my version of Mythruna). I'm wondering if I'm supposed to decompile the Mythruna-<version>.jar file or the mythruna.db folder.

Also I'm wondering if I am worthy of a face palm.

You don't need to decompile anything.  While the layout of your Mythruna application may be a little different on a Mac, basically whatever directory it stuck the mythruna.db directory in is the one where you can create a mods directory as described.  So mythruna.db and mods will be siblings.
That is quite a better way to explain it Tongue
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 on: October 12, 2013, 09:42:54 PM »

And to the OP, if you do figure it out then please report back.  The next version of Mythruna (whenever that is) keeps the mythruna.db directories in a different place but mods would still be where they are now.
Logged
TryKM
Newbie
*
Posts: 2


View Profile
« Reply #7 on: October 13, 2013, 01:25:52 PM »

Thanks for the help! I'm sorry I just have a lot of blonde moments sometimes.  Tongue
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!