• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Unsolved] Galaxy Editor Presets Bug, which corrupts every other preset in the trigger editor.

Status
Not open for further replies.
Level 5
Joined
Aug 27, 2008
Messages
126
The map is released on the Americas and Europe under the name "Problematic Presets BUG".
It's a custom map, unlocked for you to see.
Careful with the presets and functions inside as they seem to be heavily corrupted.
It's like the Fel I am telling you, possibly worse.

Try to publish the map after enabling the condition in the only trigger to get the error.
I need a fix to the error, I know the presets can rather be deleted and remade but I've made
whole system around this and I will have to spend A LOT of time rewriting everything.
And as it seems the presets corrupt every other preset that was in the map, that means that my whole
map has to become garbage.
If anyone understands galaxy, maybe he could help me out by pinpointing the problem.

I've also uploaded the map here.

WARNING! Careful what you do with this, don't copy/paste the presets in your own map, IT WILL CORRUPT EVERY PRESET IN IT!

Thanks,
- Ed.

Edit: After uploading the file I worked on trying to fix the problem.
Some time passed, I think I managed to fix it but it seems like I was unable to recreate it again to know what exactly fixed it.
I tried to load the map I uploaded here in Galaxy Editor and it's now publishing perfectly.
Needless to say I am confused. It seems like the map is now working.

Edit2: The problem still persists in my own map.
 

Attachments

  • Testing.SC2Map
    25.4 KB · Views: 71
Last edited:
Level 5
Joined
Aug 27, 2008
Messages
126
Okay I managed to reproduce the bug.

What was happening was that after I was pasting the broken Trigger, Function and Preset into an example map, the condition in the trigger was getting disabled and the parameter was marked as none selected.
It seems like it was detecting its own fault. I managed to break it again by disabling "use as bit flags" on the preset.
Now it's broken again and you can see what the bug is about when publishing the map (trying to).

Edit:
Copy/pasting the triggers from my map into a new one identifies all broken parameters, this DOES NOT WORK when done in my own map.

I will try to copy paste the whole code into a new map and see if it pinpoints the problems.

Edit: Nope. Only when I copy/paste small parts of the triggers, only then it pinpoints the problematic parameters. I will have to copy/paste every trigger, fix it's contents and then copy/paste them back into the original trigger.

Edit: Copy Pasting no-longer helps.

Edit: Copy Pasting identifies the problematic parameters only in some rare cases. Seems like if I paste a lot of triggers it won't work, but only selected few ones, not more than 10 (which is sometimes impossible as its all connected), then it recognizes them.

Edit: Copy/pasting doesn't work. After I paste them in a separate map and then repair them, pasting them back into my own map deletes their current values, now fixed values. Assigning them new values pops the same problem.
 

Attachments

  • BROKEN.SC2Map
    13.5 KB · Views: 90
Last edited:
Level 5
Joined
Aug 27, 2008
Messages
126
Okay, I've decided that the example BROKEN map won't be enough
for a person that is trying to help me as it's rather a bug with the Galaxy Editor that seemingly only Blizzard have the power to fix.
Here's a big chunk of part of my code that is giving me problems.

What you see is an algorithm that copies all needed information from the Data Editor to be used in variables to ease the programmer.
Try to publish it to get the error, I am 99% sure you will get the same error as I do. If you do not, then please tell me, maybe I have to reinstall Starcraft 2.

Note: Do remember that this is my original map, stripped away from some if its content. Copy-pasting the content into another map will make it work again (in some cases), but that's not the point, tho I might wind up doing just that sooner or later. Or maybe deleting half the content only to recreate it.

Edit: Deleting all presets and creating them again and modifying the triggers to use the new presets returns the same error when publishing. "Invalid parameter, possibly an incorrect variable name" at line 213:
"lv_FE67BBE1 = gf_E143227E(gf_68021E56(lp_E199CC55), ge_TechType_Upg);"
This is insane... the preset name is Tech Type and the Preset Value name is Upg. So where's the problem?

Edit: Come to think of it, I haven't tried to upload the map ever since I had a problem with the localization. Blizzard took out the UK localization and all my text in my map went corrupt. I had to switch to US using some trickery that I dare not even talk about (I've posted somewhere about it). After I did that all my triggers were blank and I had to rename them. Thing is that I see no errors in the Text Editor, but it might be this.
 

Attachments

  • Example Broken.SC2Map
    3.6 MB · Views: 109
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Blizzard took out the UK localization and all my text in my map went corrupt.
Something that was a 30 second job to fix permanently. I did this for many maps.
I had to switch to US using some trickery that I dare not even talk about (I've posted somewhere about it).
You just needed to export the UK and US text, merge them together, and then delete the UK and import the merge results as US. Could be done outside editor if map was saved as components. After it is done English is fixed for good.

They really should not have had separate UK/US locales in the first place. Both regions use identical text in all Blizzard games, including incorrect spelling of words like colour as "color" for the UK locale. The removal of UK and migration to US was something that was long overdue and solved far more problems in the long term than it created in the short term.
After I did that all my triggers were blank and I had to rename them.
You likely forgot to tick the "include editor only text" field. As such only the in game text was exported/imported (not trigger/variable names as those are editor only).

As for your main problem... You are using galaxy script directly while trying to use the obfuscate code feature. As stated by the feature, it only works if the map is 100% GUI (any form of custom script anywhere will break it). The argument ge_TechType_Upg is custom script of sorts, it is referencing a non-existent variable name because the obfuscator has renamed it to something seemingly random.

Map script is only obfuscated when compiling the map for publication online. Local saves will not have obfuscated scripts. This is why the map saves/tests normally but fails with a syntax error when publishing.

There are two solutions. The easiest and recommended is to disable the map script obfuscator. This can be done inside one of the tabs of the editor preferences/options window. When disabled the human readable names will be used in the map script instead of badly/poorly implemented obfuscated names. The other approach is to painfully remove all custom script variable references from your triggers. This might not be possible as GUI has limitations that Galaxy does not.
 
Level 5
Joined
Aug 27, 2008
Messages
126
I can't believe they didn't note that somewhere, I had no way to know a preset was considered as script. Or maybe I didn't look hard enough.
I will disable the obfuscator. Though I am guessing that that will make the script in my map easy to extract and copy.. which isn't much of a problem to be honest.

One more question, do you think JASS is more productive than GUI? I know C and Cpp to a certain extent, but I've always thought that learning JASS will be somewhat of a waste of time as I am very productive with GUI.

Thank you for helping, I was going out of my mind. Do you mind being credited somewhere in my map? You've helped me a lot before with Warcraft 3, too.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
One more question, do you think JASS is more productive than GUI? I know C and Cpp to a certain extent, but I've always thought that learning JASS will be somewhat of a waste of time as I am very productive with GUI.
Yes using JASS is more productive than GUI because of how nonsense the Warcraft III GUI trigger system is. However I do not see what this has to do with StarCraft II...

If you mean learning Galaxy then it is not necessary because StarCraft II GUI can do most of the language features (not all, but near enough all) and is at least equally productive.
Do you mind being credited somewhere in my map?
I have no problem with that and am already credited on many maps, even some popular ones.
 
Level 5
Joined
Aug 27, 2008
Messages
126
Okay the map is called StarBox and it's a sandbox unit tester. The most capable one out there if you ask me. I will credit you on the loading screen.

And yeah I meant GALAXY I got confused for some reason. Tho it's good to know your opinion on JASS too.

I've got no idea how to change the topic prefix to Solved
 
Status
Not open for further replies.
Top