I am looking to create a Trigger Library, but I want to write it in Galaxy Script not in the trigger editor, how can I go from a file structure of scripts to a Library file?
So I still need to create the SC2Lib File in the editor, but how can I Export the SC2Lib and the Related Scripts for Distribution, by default it just adds them right to the map file.
You can create a custom script element in the library in which you place your galaxy scripting. Then you create several action definitions or whatever is needed that just pass on calls to the functions that you've written in the custom script bit.
Does anyone know how Blizzard linkes their NativeLib.SC2Lib and NativeLib.galaxy files, they are attached below for reference, I can't figure it out yet.
Edit:
Looking over the files somemore, it appears like Ntve is the key for the name, all the Library references are to that, and in the script it is libNtve_{prefix}_{name}, in the Library they just use the name and the reset must be added by the Engine.
Sorry if this has been asked already but i really can't find the answer I'm looking for with search.
I'd actually like to create a trigger library as well. The triggers for the library are pretty much coded already, but I have no idea how to compile them into a library/resource that can be easily installed if i release it.
Does anyone know if there is a tutorial anywhere about creating trigger libraries? And from what I've read here and there, whats up with variables getting FUBARed?..
It's rather simple.
In the trigger editor you have a small frame in the upper left corner where all your included libraries are in.
Rightclick -> Library -> New Library to make your own library. Name it whatever you want.
The library acts just like a normal folder in the trigger editor. You can move all your created functions, actions, variables, etc into the library.
After that it's pretty much done already.
When you make a new action in any trigger you should be able to find your library's custom actions, for example.
You can then export the libraray (rightclick -> Library -> Export) and you get a xxx.SC2Lib file. You can upload that file anywhere and people can download it, import the library and got it ready already.
There are some other nice things such as own labels for your library objects, but with a little bit of experimenting everything is pretty easy to figure out.
About variable links getting broken: That usually happens when you update your library. Say, you make your library public and then notice that there's something missing. You include all the missing stuff, re-export the library and upload it again.
When someone already uses the old version of your library and then wants to import the new version, he'll break all the GUI references to your library.
So he needs to re-set every part where he uses your functions, variables, etc.
I think that's what they meant, at least.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I am looking to create a Trigger Library, but I want to write it in Galaxy Script not in the trigger editor, how can I go from a file structure of scripts to a Library file?
@chriscisco: Go
Trigger libraries are GUI based - you'll need to create a GUI wrapper for your library.
Alright,
So I still need to create the SC2Lib File in the editor, but how can I Export the SC2Lib and the Related Scripts for Distribution, by default it just adds them right to the map file.
@chriscisco: Go
You can create a custom script element in the library in which you place your galaxy scripting. Then you create several action definitions or whatever is needed that just pass on calls to the functions that you've written in the custom script bit.
Does anyone know how Blizzard linkes their NativeLib.SC2Lib and NativeLib.galaxy files, they are attached below for reference, I can't figure it out yet.
Edit:
Looking over the files somemore, it appears like Ntve is the key for the name, all the Library references are to that, and in the script it is libNtve_{prefix}_{name}, in the Library they just use the name and the reset must be added by the Engine.
Hi All,
Sorry if this has been asked already but i really can't find the answer I'm looking for with search.
I'd actually like to create a trigger library as well. The triggers for the library are pretty much coded already, but I have no idea how to compile them into a library/resource that can be easily installed if i release it.
Does anyone know if there is a tutorial anywhere about creating trigger libraries? And from what I've read here and there, whats up with variables getting FUBARed?..
@FuzzYD: Go
It's rather simple.
In the trigger editor you have a small frame in the upper left corner where all your included libraries are in.
Rightclick -> Library -> New Library to make your own library. Name it whatever you want.
The library acts just like a normal folder in the trigger editor. You can move all your created functions, actions, variables, etc into the library.
After that it's pretty much done already.
When you make a new action in any trigger you should be able to find your library's custom actions, for example.
You can then export the libraray (rightclick -> Library -> Export) and you get a xxx.SC2Lib file. You can upload that file anywhere and people can download it, import the library and got it ready already.
There are some other nice things such as own labels for your library objects, but with a little bit of experimenting everything is pretty easy to figure out.
About variable links getting broken: That usually happens when you update your library. Say, you make your library public and then notice that there's something missing. You include all the missing stuff, re-export the library and upload it again.
When someone already uses the old version of your library and then wants to import the new version, he'll break all the GUI references to your library.
So he needs to re-set every part where he uses your functions, variables, etc.
I think that's what they meant, at least.