Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - loudent

#61
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.
#62
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

#63
Follow up. It appears the problem is the location. I had both files in data\scripts\global in my mod structure. If I move the collisiox.js out of global (say down to the scripts directory) it works again.

Well, it loads. I have yet to get it to work with a script

#64
Quote from: MenschMaschine on April 18, 2015, 07:43:07 PM
That would help, yes.

Ok, here's a mod named coltesta.mpk
https://www.dropbox.com/s/akjy52r3widd88g/coltesta.mpk?dl=0

and here's a mod named coltestb.mpk
https://www.dropbox.com/s/jfz229bvyjno08x/coltestb.mpk?dl=0

The only difference (between module names) is that the script in coltesta is named collisiox.js and the file in coltestb.mpk is called collision.js

coltesta.mpk does not work (with the aforementioned error) and coltestb.mpk *does* work
#65
Modding info / Re: Ship modding
April 19, 2015, 11:01:23 AM
Quote from: Medevac on April 19, 2015, 10:36:05 AM
the ship is invisible (I can fly around in it, you only see engine trails). Anything obvious I missed, or did I mess something up with the textures/object?

That's impossible to know without seeing the .xml but it certain does appear that you messed something up.
#66
Mods / Re: tools for modding?
April 18, 2015, 07:04:32 PM
Quote from: Schattenjaeger on April 18, 2015, 06:53:18 PM
but can't seem to get them back to .mpk the same way.

If I could take a guess its probably because you still have one of the files in the zip open or a file manager that has one of the directories open

Quote
it doesn't sound like there are any .mpk builder apps in the wild, so how do the rest of you do it?

I freely rename the .mpk and.cpk to .zip (although my file manager knows enough to treat them as zips anyway).

to be fair, I never actually started with a zip. I think the first thing I did was copy the core.cpk file over, deleted everything in there and renamed it to <whatever-my-first-mod-was>.mpk and went from there. (sometimes renaming the .mpk to zip for convenience.

Nowadays, when I start a new mod I copy over my existing .mpk files and work from there (renaming to .zip while editing and then back to .mpk)
#67
Quote from: jeeplaw on April 18, 2015, 11:55:46 AM
In the header of the file, do you have any USING or INCLUDE statements?

Yes, of course.

Also, In my last test, I copied over the collision.js from the core pack into my mod, tested it and it worked, changed the name from collsion.js to something like lcollsion.js (no code changes) and it fails. If you want I could post the mod somewhere and you can look at it.
#68
No offense taken, but when I literally copied one of the existing scripts into mine I can be reasonably sure there are no errors. Only difference is the name.
#69
I'm not sure how significant this bug is because I haven't had actual damage to repair.

By Habit whenever I dock I hit both refuel and repair. I noticed that when I hit repair I get the message "repair failed. you don't have enough money" despite having plenty of money. This might only be a bug when the repair failed because there is nothing to repair and the message gets mixed up or it might be that repair always fails. Not sure.

-Loudent
#70
I tried different names. The last one was JettisonCargo.js

Does it matter?
#71
So I'm working on a relatively simple mod with a single script in it. Its got a on ship destroyed handler (does nothing but a console output right now). However, whenever I tried to start a game with it I get an error "Can't start local game server.

So I copied the contents from collision.js into my script and tried again. Same error. I changed the *name* of my script to collision.js and suddenly it works. Are we not allowed to add new scripts? we have to modify/use ones already there?

-Loudent
#72
Quote from: Lurler on April 10, 2015, 08:59:10 PM
What if I tell you that there is a third option and not just two that you already listed.

Ouch. I was really hoping it would do well.
#73
Another possible response would be "Modding" :)
#74
Thanks Kyokei