sc2c.org

Go Back   Sc2C.org > Developer's Corner > Scripting
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 07-26-2010, 01:04 AM   #11
s3rius
Junior Member
 
Join Date: Jul 2010
Posts: 13
Default

It's a function automatically created by the Editor when I integrated my script into a SC2Library.
s3rius is offline   Reply With Quote
Old 07-26-2010, 03:51 AM   #12
JademusSreg
Laughs Derisively
 
JademusSreg's Avatar
 
Join Date: Apr 2010
Posts: 112
Default

If it isn't necessary to the function of the library, it's a good idea to delete it.

For example:
Code:
//-------------------------------------------------------------------------------------------------- // Library Initialization //-------------------------------------------------------------------------------------------------- bool lib1_InitLib_completed = false; void lib1_InitLib () { if (lib1_InitLib_completed) { return; } lib1_InitCustomScript(); lib1_InitLib_completed = true; }
__________________
Seek always to excel in whatever you do.
My sense of value is redshifted.
JademusSreg is offline   Reply With Quote
Old 07-26-2010, 11:52 AM   #13
s3rius
Junior Member
 
Join Date: Jul 2010
Posts: 13
Default

This script part is automatically created.
Everytime you open a map containing this library, when these functions are not there, they will be recreated.

It's part of Blizzard's library handling and might even be of some use somewhen later (if I ever need to specify an initializer function).


PS: One thing I really would be interested in is to optimize the BigNum functions. I'm no mathematician, so I just searched for a way that would work. So if anybody got an idea..

Last edited by s3rius : 07-26-2010 at 11:59 AM.
s3rius is offline   Reply With Quote
Old 07-26-2010, 04:53 PM   #14
JademusSreg
Laughs Derisively
 
JademusSreg's Avatar
 
Join Date: Apr 2010
Posts: 112
Default

Right, those are artifacts. When copying the script into a map, rather than importing a library, those functions are unnecessary.
__________________
Seek always to excel in whatever you do.
My sense of value is redshifted.
JademusSreg is offline   Reply With Quote
Old 07-26-2010, 08:11 PM   #15
s3rius
Junior Member
 
Join Date: Jul 2010
Posts: 13
Default

Well, I put everything into a library to have a neat package with GUI support wrapped around my source. I'll have to accept these functions then.

A person who'll just include the source code itself to work with it should have enough knowledge to quickly get rid of it.
s3rius is offline   Reply With Quote
Old 07-26-2010, 09:25 PM   #16
Deaod
Junior Member
 
Join Date: Apr 2010
Location: Germany
Posts: 12
Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default

Do those functions matter to anyone who doesnt have sufficient knowledge to remove those functions?
If not, then why are you keeping them? Its just bloat, and the majority of users wont give a shit about artifacts of the editor.
Deaod is offline   Reply With Quote
Old 07-26-2010, 10:20 PM   #17
s3rius
Junior Member
 
Join Date: Jul 2010
Posts: 13
Default

As I said, the Galaxy Editor is automatically recreating them if they're amiss. I tried it. I do not keep them by choice.
These belong to the library and if I want to keep it as a library (which I do), then these functions have to stay.

I begin to think that the sc2c community doesn't actually have interest in my system, but instead only cares about trivialities and the format in which I post my stuff.
Please don't misunderstand - It's not that I can't stand critique, but I'd prefer something constructive.
s3rius is offline   Reply With Quote
Old 07-27-2010, 01:33 AM   #18
Ammorth
I blink therefore I am
 
Ammorth's Avatar
 
Join Date: Apr 2010
Posts: 65
Default

Quote:
Originally Posted by s3rius
I begin to think that the sc2c community doesn't actually have interest in my system, but instead only cares about trivialities and the format in which I post my stuff.
Please don't misunderstand - It's not that I can't stand critique, but I'd prefer something constructive.

I agree. This nit-picking about a single function is useless to the development of this resource. To keep the script in the realm of GUI within the editor, the function is included automatically by Blizzard. Case Closed.

Personally, until there is an all-encompassing mod for the editor that allows scripting directly in GALAXY (think Jass New Gen Pack), I would rather see code adopting GUI support.
__________________
Ammorth is offline   Reply With Quote
Old 07-27-2010, 07:38 AM   #19
JademusSreg
Laughs Derisively
 
JademusSreg's Avatar
 
Join Date: Apr 2010
Posts: 112
Default

Speaking of scripting galaxy in the editor:
DerisiveDemonstration.jpg

Given the notorious 2MB limit on the galaxy VM, maintaining clean and efficient code is more important here than it ever was in WC3.

Since the script can be implemented independently of the GUI-library in a custom script within the map, the aforementioned functions can be safely removed from the script without any negative consequences. It's removal is a non-issue and the effort is trivial.

EDIT: Seems the IMG tag doesn't like me. Using ATTACH tag instead.

EDIT: Honestly, besides the artifacts, I don't see anything obviously wrong with the script. I look forward to testing it in game, when able.
__________________
Seek always to excel in whatever you do.
My sense of value is redshifted.

Last edited by JademusSreg : 07-27-2010 at 08:15 AM.
JademusSreg is offline   Reply With Quote
Old 07-27-2010, 11:09 AM   #20
s3rius
Junior Member
 
Join Date: Jul 2010
Posts: 13
Default

I have implemented the script in a seperate custom script section.
That is actually the reason of one of these two functions, as it serves as an initializer to the custom script.

I can only remove it completely by not using a library. And I think the bonus of having the complete library stuffed together and neatly packed into a seperate list is worth keeping the two unused functions. Also makes updating easier.

To be honest, when I'll use STARCODE I'll just scrap all the GUI functions and put there source code somewhere in my script. The easy packaging and GUI functions are mostly useful for mappers who're not using custom scripts.

I hope that STARCODE (or some similar system) will be eventually used extensively in maps that need to store a lot of information in banks (or use save codes). Just thought I'd spread the word to sc2c, too.
s3rius is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 06:48 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.