My idea to start using native linux mud client failed!
I cannot find any documentation on how to create packages or modules. Also no help from IRC channel nor this forum.
While there is lot of documentation on lua functions, there are none on the anatomy of packages. And it is funny, because someone has spent lot of time on wiki, but forgot to add some package developing tutorials for beginners.
http://wiki.mudlet.org/w/Mudlet_Packages
This is the package development documentation?
I give up!
Re: I give up!
Hey Keevitaja,
As I said on the IRC channel when you asked, that wiki link is the best method for creating a shareable package in Mudlet. You can also try the Package Exporter (experimental). Another note is that packaged ZIP files cannot be used as modules for syncing across profiles. They will have to be in an XML file.
Is there something specific you're having trouble with that isn't explained in the wiki tutorial?
As I said on the IRC channel when you asked, that wiki link is the best method for creating a shareable package in Mudlet. You can also try the Package Exporter (experimental). Another note is that packaged ZIP files cannot be used as modules for syncing across profiles. They will have to be in an XML file.
Is there something specific you're having trouble with that isn't explained in the wiki tutorial?
Re: I give up!
Yes, i have specific questions. How do i create a module? What is the file structure and variable scope?
For instance i could not find any information what is the minimal xml for a package...
For instance i could not find any information what is the minimal xml for a package...
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.0">
<ScriptPackage>
<Script isActive="yes">
<script>
packagePath = getMudletHomeDir() .. "/../../aardwolf/"
function loadFile(file)
return dofile(packagePath .. file)
end
loadFile("plugin.lua")
</script>
</Script>
</ScriptPackage>
</MudletPackage>
Re: I give up!
If you want to create a module out of some Mudlet scripts, you should export them via the Mudlet editor, or use the Package Exporter. You can then load it in via the Module Manager and sync it. The Package Exporter and Module Manager are located under the Toolbox drop-down menu.
If you want to load in a separate Lua script you've written, I'd suggest putting it in a folder inside your getMudletHomeDir() directory, and use require(), not dofile(), since require controls whether a file has already been run to avoid duplicating the work.
If you want to load in a separate Lua script you've written, I'd suggest putting it in a folder inside your getMudletHomeDir() directory, and use require(), not dofile(), since require controls whether a file has already been run to avoid duplicating the work.
Re: I give up!
require is not working... not sure why
but how can i start a module from scratch? like what is the file structure and how does it work?
is module like collection of packages? what is the variable scope?
and these exporters/generators seem to be useless. well at least for packages as i have no desire to mess with xml.
but how can i start a module from scratch? like what is the file structure and how does it work?
is module like collection of packages? what is the variable scope?
and these exporters/generators seem to be useless. well at least for packages as i have no desire to mess with xml.
Re: I give up!
Re: I give up!
I asked about related issues in my thread here: import lua?
For the XML structure, just create a few scripts, timers, etc. via the Mudlet GUI. This seems to be the recommended way for most users. You can then export a package and look at the XML structure. I never bothered writing XML from scratch, instead modified only where needed. There are other packages which only have minimal XML and then import most lua logic from other files. Maybe take a look at those. I agree the documentation could be improved more, but it was a one-man-show for quite some time now. Feel free to support.
For the XML structure, just create a few scripts, timers, etc. via the Mudlet GUI. This seems to be the recommended way for most users. You can then export a package and look at the XML structure. I never bothered writing XML from scratch, instead modified only where needed. There are other packages which only have minimal XML and then import most lua logic from other files. Maybe take a look at those. I agree the documentation could be improved more, but it was a one-man-show for quite some time now. Feel free to support.
Re: I give up!
http://wiki.mudlet.org/w/Mudlet_Package ... et_package describes how to create a package, try following it and ask if you have any specific questions.
Re: I give up!
OK, tnx guys. I think i am finally getting somewhere. But the link above does not explain much