Jump to content

Modder help and ressources.


Salminar

Recommended Posts

Hi,

 

Since the game is only at early stages and the documentation is not the main goal of the main developper for now, i feel like it would be interresting to have a place for modders to share their knowledge and ask questions to other on issues and progress they make, be it with scripts, the API or anything that can be helpfull for the game.

 

I think making all this together here would help a lot to find what we are seeking more easily without having to make huge searchs on the forum and having various request or suggestions showing up in the results.

 

So as a rule for this topic, please don't do requests and we talk only about technical issues related to ingame modding or documentation.

 

 

So here is a few things i came by that could help a lot.

 

Modding documentation

You can acces it in the folder of avorion "Avorion/Documentation/" in your steam folder and is HTML format. Incomplete but still helpfull.

 

Utility.lua and stringutility.lua

Those two files are really helpfull for debugging or trying things in the game, specially the printTable function that allows you to look easily what is stored in the game variables.

 

Console

Don't forget to asign a key to the showconsole in your game options, all the messages made with print as well as runtime errors are displayed in the console.

 

UI bug

I have reported it already, but it seem that the UI refuse to draw labels on scrollframes. Until a fix or a workaround is found keep that in mind.

 

 

 

Finally if people are using LUA for sometime now i have a question, is it possible to know if a function is present on the server before using invokeServerFunction or at least a way to track the error and prevent the error?

Link to comment
Share on other sites

Hello,

 

i think its a really good idea to make up a "knowledge base" like you intended until modding gets more officially supported (by complete and informative documentation and wiki stuff)!

 

But we should either have some kind of main post to collect all information or at least agree on some sort of layout and formatting so people can find info fast and easy, what do you think?

 

And, since its good practise nowadays, how about setting up a Discord server for the Avorion modding community? I always liked the idea of being able to find modding fellows easily and get my questions out fast  ;)

Link to comment
Share on other sites

  • 3 weeks later...

Something Linux users might be familiar with but Windows users will never have heard of: grep

 

If you're on Windows, download a utility program called GrepWin.

 

This will let you search all files in a directory and its sub directories for a string (or reg ex).

 

So if you're not sure how to use a particular function that you read in the Avorion documentation and you'd like to see an example, search for it in GrepWin and it will show you a list of every time it was used in the base scripts.

Link to comment
Share on other sites

Something Linux users might be familiar with but Windows users will never have heard of: grep

I'm a windows user and well aware of grep. However you don't need an additional tool for a deep search on windows.

You can use the build in search as well:

https://superuser.com/questions/60173/how-to-search-inside-files-on-windows-7

Just tick the .lua extension and you get the same results with the build in functions :D

Link to comment
Share on other sites

Grep is very useful, indeed (or the Windows equivalent, but I find that one to be very slow)

 

There are a ton more commandline linux/unix tools that are very handy in helping debug things.

 

I've installed gnuwin32 (http://gnuwin32.sourceforge.net/) on pretty much every Windows machine I've had since it's been available.

 

If for nothing else than being able to use 'less', which doesn't have any problems displaying and searching through a 9GB textfile.

Link to comment
Share on other sites

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