AtomicTorch Studio Forums

VoidExpanse => Help section => Topic started by: loudent on April 19, 2015, 01:26:09 PM

Title: Can anyone help me understand why this mod is not running
Post by: loudent on April 19, 2015, 01:26:09 PM
Hey All,

Creating a new thread here although it is a culmination of a lot of help requests here. I have a mod who's sole purpose is to verify the script is being loaded when run in a server. I've put it in the right location and used the "check" function in the server to verify the script is being loaded and is valid. It's in the modconfig.xml and in the correct mod directory

It's extremely simple. All it does is, OnInit() call console.PrintError to output as message that the function has initialized

However, when I start the server the message does not appear in the console so I can only assume it's not being loaded. Can anyone advise.

The mod is posted here:
https://www.dropbox.com/s/sx03m6laqynukkl/testserverload.zip?dl=0

Title: Re: Can anyone help me understand why this mod is not running
Post by: MenschMaschine on April 19, 2015, 01:59:19 PM
Let me refer you to a different topic, which might help you: http://forums.atomictorch.com/index.php?topic=679.0
Title: Re: Can anyone help me understand why this mod is not running
Post by: loudent on April 19, 2015, 02:06:06 PM
Ok, here's what I learned.

1)For some reason the scripts will only run if there are in the global directory.
2) If you call PrintError instead of Print to the console then the game will think there is an error and it won't load.

So I have it working now. Although I thought you could put your script anywhere. Guess not.
Title: Re: Can anyone help me understand why this mod is not running
Post by: MenschMaschine on April 19, 2015, 02:18:25 PM
Regarding #1:
My guess is that there is some form of catalogue, which tells the game where to expect the files
that came with the game and how they are supposed to be named.
However, any files that the game does not -know- of, new scripts as an example, have to be put into the GLOBAL folder.

About #2:
That's also why i have shown you that thread about the Game.SendNotification-method ;)
Title: Re: Can anyone help me understand why this mod is not running
Post by: loudent on April 19, 2015, 02:21:16 PM
Yeah, I missed your replay because I was testing the PrintError vs Print theory
Title: Re: Can anyone help me understand why this mod is not running
Post by: ai_enabled on April 20, 2015, 02:45:43 AM
We've updated the wiki to mention that the OnInit() is invoked only for Global and Internal scripts.
Sorry we didn't make it clear before.
Regards!