@Kueken531: Go
Okay.. I think I've hit my daily data frustration quota for today. I've been able to clone your example almost entirely except for the fact that my command card is resetting whenever I learn an ability. How do I stop this from happening? *tries very hard to suppress his frustration...*
Will be testing out the learn ability catalog set tomorrow.. Hopefully i won't have that random catalog set failure problem anymore once I shift the code to my spell learn handler..
You mean the command card closes, when you spent a learning point? Thats a tricky one :)
The Galaxy Editor does not show all data values of an object when viewed with Combine Structure Values option. If you uncheck this option, some new fields for the command card will appear; one of them is called SubmenuIsSticky.
However, you still cannot change it; if you try to change the individual value, it will still open the standard edit command card window, which misses this option.
So the only way I know of for editing this (besides raw XML editing, of course) is switching to raw data view and manually typing a "1" at the correct place of the field (however you can simply replace all "0"s with "1"s; they represent the different buttons and if a button doesn't open a command card, this field will have no influence).
Didn't see your map until now, btw. I will have a look at it.
€ A note for your map: You can remove the Gui trigger, if you include the trigger librarys in your Custom Scripts. Just add
include"TriggerLibs/NativeLib"
to your script.
For some reason, your map laggs pretty hard on my PC; just to let you know.
constfixedc_tPeriod=0.05;//Fixed Timer period
SC2 can only handle a timer period in multiples of 0.0625 (On second thought, the accuracy of a fixed is actually the same thing; so nothing should change here. Still I would change it for consistency). For more accurate calculations, you should use this value.
Quote:
In the end I went with cataloging and the effect amount parameter because I personally feel having to manually edit the tooltips one by one is just too tedious.
Thanks so much Kueken, Your map helped my understanding on this a lot. Theres some wierd stuff though.. When I change stuff in the data editor, it sometimes causes the set catalog value trigger to fail randomly for some unknown reason. It's not clear whether this is trigger or data related. After a few tries it works perfectly as it should though. Urgh.. its happening again. The values aren't updating and there is no error message. It seems to work fine when I remove my "run trigger" function..
Edit: Okay, its not the run trigger function. It's just not updating randomly and not spitting any error messages -_-
Could you elaborate when the malfunction happens? Everything seems to work fine for me.
Sure, I hope it won't intimidate you though =/ It's pretty long and I use a lot of custom functions.
Don't worry ;)
Quote:
Still mid way working on the learn ability thing. The current trigger that handles spell level ups is t_SpellHandler. Basically it levels up the spell whenever it's cast, and it's supposed to update the catalog too.
Seems to work fine
Quote:
Oh, and if you see any potential ways I can improve my coding, please do let me know.
I try to ;)
Quote:
And uh.. forgive me, its not exactly cleaned up yet.
Compared to my usual mess its like heaven ;)
Quote:
Thinking back about this.. i did notice something else wierd. Under the abilities cost, you have 5 indexes to represent the number of spells. In my code, I put 4 (Intending to have a 4 level spell) But my ability was jumping to level 5.
I was not able to reproduce; your ability never surpassed level 4 for me.
€ Ah, now I see. You reduced the ability to 3 cost values, but it still reaches level 4. This seems to be an issue with the UnitAbilityChangeLevel function. If you use UnitAbilityMaxLevel it returns 3; probably this value is compared to the current level internally, but ability levels in galaxy start at 0, while the max level counts each level including the 0; so the correct check would be current level + 1 < max level. Try to implement this check yourself.
Also I was referring to the command index of the learn ability, which you do not use at all.
Quote:
I suspect this may be happening as your snipe ability begins unlearned, whilst mine doesn't.. But still.. that doesn't seem logical at all. Anyway.. back to working on the learn ability.
SC2 can only handle a timer period in multiples of 0.0625. For more accurate calculations, you should use this value. Quote:
Good to know, thanks for the information. I'll fix this up when I'm not feeling tired :P Were you running in window mode? or Full screen? It will lag in window mode because of the debugger. When i tried on full screen I had no problem at all. If i spam the spell like 50+ times (using he order queue), the framerate doesn't seem to drop below 50. Running on medium settings here. I noticed framerate drops alot when viewing the stetmans. I really hope there aren't any variables leaking.. If you've skimmed through the code, you might have noticed I use structs (as a ring buffer) to store spell instances and constants. I wonder if this may be the cause.
I won't be removing the GUI so soon as I use it to find out what parameters certain functions can take.
Quote:
Could you elaborate when the malfunction happens? Everything seems to work fine for me.
Basically, the spell values should be 4/6/8/10 and 60/95/130/165. However, sometimes the effect catalog doesn't get updated as of that old version of the map, and i'd have to try cast the spell multiple times before it updates.
Quote:
I was not able to reproduce; your ability never surpassed level 4 for me.
Have you taken a look at the data entry for the ability yet? if you check raw data, the ID should be A001, under cost, there should be only 3 entries as of that version. Despite which, it levels to level 4. This was resolved after I put in the learn ability.
Quote:
Also I was referring to the command index of the learn ability, which you do not use at all.
Haven't touched on this just yet, but i think i have an idea of what you mean. The command index of the second submenu should be 1. Whilst the first is 0. I enquired on this on a thread in the galaxy forum a few days back.
Have you taken a look at the data entry for the ability yet? if you check raw data, the ID should be A001, under cost, there should be only 3 entries as of that version. Despite which, it levels to level 4. This was resolved after I put in the learn ability.
Yep, seen it shortly after, check my edit
Quote:
Good to know, thanks for the information. I'll fix this up when I'm not feeling tired :P Were you running in window mode? or Full screen? It will lag in window mode because of the debugger. When i tried on full screen I had no problem at all. If i spam the spell like 10+ times, the framerate doesn't seem to drop below 50. Running on medium settings here. I noticed framerate drops alot when viewing the stetmans. I really hope there aren't any variables leaking.. If you've skimmed through the code, you might have noticed I use structs (as a ring buffer) to store spell instances and constants. I wonder if this may be the cause.
It was indeed the Stetmans, setting shaders to medium or replacing the Stetmans fixes the lag entirely (or killing some of the Stetmans; the problem seems to be the flashlight which turns off when incapacitated. So actually using your spell multiple times causes the map to lag less :D)
For the test I used full screen and deactivated the debugger btw.
Quote:
I won't be removing the GUI so soon as I use it to find out what parameters certain functions can take.
Did you ever try this program? Its awesome for such things.
Did you ever try this program? Its awesome for such things.
Nope. Does it tell me what constants are available for each of the parameter inputs?
I should have elaborated a bit more.
I have no problem finding out the types of the parameters taken by each function. I usually just manually check it at the wiki. But sometimes even knowing the type, you have no idea what kinda input gamelinks or strings or the functions accept, and its through GUI that I find this. One example would be effect creation. I have no idea what the effect constants gamelink strings are, I can only find this out by first manually popping them in GUI, then viewing the generated script.
The fact that theres no autocomplete in the vanilla editor is the reason why I decided to code my own quick functions. I find it extremely tedious to type out the original function names, much less remember them in my head when i want to use them.
Edit: Glad to say everything works just as I'd like it to.
@Kueken531: Go Okay.. I think I've hit my daily data frustration quota for today. I've been able to clone your example almost entirely except for the fact that my command card is resetting whenever I learn an ability. How do I stop this from happening? *tries very hard to suppress his frustration...*
Will be testing out the learn ability catalog set tomorrow.. Hopefully i won't have that random catalog set failure problem anymore once I shift the code to my spell learn handler..
You mean the command card closes, when you spent a learning point? Thats a tricky one :)
The Galaxy Editor does not show all data values of an object when viewed with Combine Structure Values option. If you uncheck this option, some new fields for the command card will appear; one of them is called SubmenuIsSticky.
However, you still cannot change it; if you try to change the individual value, it will still open the standard edit command card window, which misses this option.
So the only way I know of for editing this (besides raw XML editing, of course) is switching to raw data view and manually typing a "1" at the correct place of the field (however you can simply replace all "0"s with "1"s; they represent the different buttons and if a button doesn't open a command card, this field will have no influence).
Didn't see your map until now, btw. I will have a look at it.
€ A note for your map: You can remove the Gui trigger, if you include the trigger librarys in your Custom Scripts. Just add
to your script.
For some reason, your map laggs pretty hard on my PC; just to let you know.
SC2 can only handle a timer period in multiples of 0.0625 (On second thought, the accuracy of a fixed is actually the same thing; so nothing should change here. Still I would change it for consistency). For more accurate calculations, you should use this value.
Could you elaborate when the malfunction happens? Everything seems to work fine for me.
Don't worry ;)
Seems to work fine
I try to ;)
Compared to my usual mess its like heaven ;)
I was not able to reproduce; your ability never surpassed level 4 for me.
€ Ah, now I see. You reduced the ability to 3 cost values, but it still reaches level 4. This seems to be an issue with the UnitAbilityChangeLevel function. If you use UnitAbilityMaxLevel it returns 3; probably this value is compared to the current level internally, but ability levels in galaxy start at 0, while the max level counts each level including the 0; so the correct check would be current level + 1 < max level. Try to implement this check yourself.
Also I was referring to the command index of the learn ability, which you do not use at all.
This should not be a problem.
Yeah thats the one, i tried your fix and it works :)
Good to know, thanks for the information. I'll fix this up when I'm not feeling tired :P Were you running in window mode? or Full screen? It will lag in window mode because of the debugger. When i tried on full screen I had no problem at all. If i spam the spell like 50+ times (using he order queue), the framerate doesn't seem to drop below 50. Running on medium settings here. I noticed framerate drops alot when viewing the stetmans. I really hope there aren't any variables leaking.. If you've skimmed through the code, you might have noticed I use structs (as a ring buffer) to store spell instances and constants. I wonder if this may be the cause.
I won't be removing the GUI so soon as I use it to find out what parameters certain functions can take.
Basically, the spell values should be 4/6/8/10 and 60/95/130/165. However, sometimes the effect catalog doesn't get updated as of that old version of the map, and i'd have to try cast the spell multiple times before it updates.
Have you taken a look at the data entry for the ability yet? if you check raw data, the ID should be A001, under cost, there should be only 3 entries as of that version. Despite which, it levels to level 4. This was resolved after I put in the learn ability.
Haven't touched on this just yet, but i think i have an idea of what you mean. The command index of the second submenu should be 1. Whilst the first is 0. I enquired on this on a thread in the galaxy forum a few days back.
Yep, seen it shortly after, check my edit
It was indeed the Stetmans, setting shaders to medium or replacing the Stetmans fixes the lag entirely (or killing some of the Stetmans; the problem seems to be the flashlight which turns off when incapacitated. So actually using your spell multiple times causes the map to lag less :D)
For the test I used full screen and deactivated the debugger btw.
Did you ever try this program? Its awesome for such things.
@Kueken531: Go
Nope. Does it tell me what constants are available for each of the parameter inputs?
I should have elaborated a bit more. I have no problem finding out the types of the parameters taken by each function. I usually just manually check it at the wiki. But sometimes even knowing the type, you have no idea what kinda input gamelinks or strings or the functions accept, and its through GUI that I find this. One example would be effect creation. I have no idea what the effect constants gamelink strings are, I can only find this out by first manually popping them in GUI, then viewing the generated script.
The fact that theres no autocomplete in the vanilla editor is the reason why I decided to code my own quick functions. I find it extremely tedious to type out the original function names, much less remember them in my head when i want to use them.
Edit: Glad to say everything works just as I'd like it to.
Thanks for the help everyone!