• Welcome to AtomicTorch Studio Forums.
 

Can anyone help me understand why this mod is not running

Started by loudent, April 19, 2015, 01:26:09 PM

loudent

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


MenschMaschine

Let me refer you to a different topic, which might help you: http://forums.atomictorch.com/index.php?topic=679.0
No Berries!

loudent

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.

MenschMaschine

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 ;)
No Berries!

loudent

Yeah, I missed your replay because I was testing the PrintError vs Print theory

ai_enabled

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!