I'm a complete beginner to XML editing, but I've read the old threads about the layout files and I'm pretty comfortable learning the format, and I wonder if they're worth my time to edit. I know how XML editing of existing layout files let you reposition items that is already on the UI (e.g. moving the mini-map around), but how does functionality work with new layout files?
In other words, how does the new UI connect with functions, triggers, other stuff in your code?
Another question would be the template, panel dialog stuff. Panels just group dialog items together right? Whats this template stuff? Are they used to connect dialog items with the new UI layout files?
Apologies for so the numerous threads... I prefer keeping each question separated so discussion is focused. :P
First and foremost, I would like to ask one question...
Is there a big difference in the size between trigger[500] or 500 void functions? If there isn't, then I won't bother pursuing this.
The only reason why I'm using trigger[500] right now is because of the ability to execute a trigger based on an array. For example, running trigger a[230].
Is it possible to achieve this with functions? I can't think of any way to run a function based on a dynamically constructed name since you can't have arrays of a function name. Unless you can somehow use strings or something to construct a name of a function then run it... or something...
And there's a crude way of doing it using if then else clauses, but then it gets really slow for the functions at the end.
Yeah, as you guessed s3rius, there is a limit even on imported scripts. But would allowed size of my code drastically increase for me? It seems like triggers take a lot of space in the editor... I only have triggers for a few buttons and some debugging tools, the rest (the majority) of my code runs on functions.
What I'm scared of now, is to continue on coding until one day I reach a limit... but I wouldn't know how close I am. :(
Last question is... what are string literals? I know what strings are but "literals"? (I'm still a programming newbie)
Finally, I have a few questions concerning strings...
Character limit on strings?
I need around 600 strings 200 characters each and like another 600 strings 50 characters each, would I reach a limit?
I know there are trigger limits, and other stuff, but what about an imported script?
Using Andromeda as a compiler, all my dedicated code files (coded outside of editor) are compressed to one .galaxy file which is then imported into the map. But even after compilation my map is still 90 KB, and when I look at the overall manager thing, nothing about imported stuff is listed...
If there isn't a limit... why isn't everyone using this method? I have like 2.6k lines of code and I'm like less than 1% to the max file size...
Hmm, yes I'm aware of the fact that some effects do not have graphics associated with them... but as I've said, I have previously used previewer to see the graphic for the effect before I chose to use it, I wonder why it still didn't show...
Anyway, I'll take your advice and try out other effects, thanks for the swift reply.
I don't see any effect showing when it is actually ran. Being a complete effect newbie, all I did was search the effect up on previewer to grab that...
Static { } means it will start on map startup during initialization. It should say in the debugger window 1 then 1 but it shows 1 then 2... please have a look. The code in galaxy format is in the imports as Andromeda.galaxy.
0
Ah thanks. I'm already doing something similar to how the GUI creates a global variable then sets it to the local variables within the trigger.
I'm using triggers because of the ability to call them dynamically, whereas functions I cannot. So I guess this is my only option... thanks though. :)
0
Possible?
If not, any other way to pass variables into a trigger other than global variables?
0
I'm a complete beginner to XML editing, but I've read the old threads about the layout files and I'm pretty comfortable learning the format, and I wonder if they're worth my time to edit. I know how XML editing of existing layout files let you reposition items that is already on the UI (e.g. moving the mini-map around), but how does functionality work with new layout files?
In other words, how does the new UI connect with functions, triggers, other stuff in your code?
Another question would be the template, panel dialog stuff. Panels just group dialog items together right? Whats this template stuff? Are they used to connect dialog items with the new UI layout files?
0
Yes I'm working on a project which is a bit large scale.
As for string literals, thanks. :) Is it wise to store all constant messages and display them via variables rather than string literals then?
0
Apologies for so the numerous threads... I prefer keeping each question separated so discussion is focused. :P
First and foremost, I would like to ask one question... Is there a big difference in the size between trigger[500] or 500 void functions? If there isn't, then I won't bother pursuing this.
The only reason why I'm using trigger[500] right now is because of the ability to execute a trigger based on an array. For example, running trigger a[230].
Is it possible to achieve this with functions? I can't think of any way to run a function based on a dynamically constructed name since you can't have arrays of a function name. Unless you can somehow use strings or something to construct a name of a function then run it... or something...
And there's a crude way of doing it using if then else clauses, but then it gets really slow for the functions at the end.
0
Sorry for the late reply.
Here are the results: "Script load failed: Could not allocate Global Memory (try reducing the size)"
Using:
Yeah, as you guessed s3rius, there is a limit even on imported scripts. But would allowed size of my code drastically increase for me? It seems like triggers take a lot of space in the editor... I only have triggers for a few buttons and some debugging tools, the rest (the majority) of my code runs on functions.
What I'm scared of now, is to continue on coding until one day I reach a limit... but I wouldn't know how close I am. :(
Last question is... what are string literals? I know what strings are but "literals"? (I'm still a programming newbie)
Finally, I have a few questions concerning strings...
Character limit on strings?
I need around 600 strings 200 characters each and like another 600 strings 50 characters each, would I reach a limit?
0
I know there are trigger limits, and other stuff, but what about an imported script?
Using Andromeda as a compiler, all my dedicated code files (coded outside of editor) are compressed to one .galaxy file which is then imported into the map. But even after compilation my map is still 90 KB, and when I look at the overall manager thing, nothing about imported stuff is listed...
If there isn't a limit... why isn't everyone using this method? I have like 2.6k lines of code and I'm like less than 1% to the max file size...
0
Yeah alright, thanks.
So as long as I'm aware of using event responses and what comes along with it, I can do whatever with events. :)
0
If you added a second event for a trigger, would it overwrite the first one or would it add a second event?
If you can add a second one, is there a limit to how many you add?
0
Yeah, I know my operators, haha.
And I believe that it works as well because I vaguely remember using a function for power, meaning that ^ is in fact, the bit operator for XOR.
0
I use %, >>, << and can confirm those are working. ^ is reserved for power I think..? Not entirely sure.
0
Hmm, yes I'm aware of the fact that some effects do not have graphics associated with them... but as I've said, I have previously used previewer to see the graphic for the effect before I chose to use it, I wonder why it still didn't show...
Anyway, I'll take your advice and try out other effects, thanks for the swift reply.
0
Using:
PlayerCreateEffectUnit(EventPlayer(), "FrenzyWeaponImpact", SomeUnit);
I don't see any effect showing when it is actually ran. Being a complete effect newbie, all I did was search the effect up on previewer to grab that...
How do I get this effect to show?
0
Yeah its in the map as imports.
Thanks though, I managed to fix it... I'm so stupid that I didn't make a new instance, which is why the values are shared despite not being static.
That is the proper way of doing it... which gives me 1, 1. I should read the language specification more...
0
edit: scratch that... Here is a new map with only a sample code showing the problem.
Static { } means it will start on map startup during initialization. It should say in the debugger window 1 then 1 but it shows 1 then 2... please have a look. The code in galaxy format is in the imports as Andromeda.galaxy.