• 0

    posted a message on Importing .m3 to Blender error

    Without going highly technical you could think of this file as a map of M3 format. Which purpose is to describe how to turn the binary data behind it, to meaningfull a structure of nodes/elements. Where each node describes different part of the model. What in the end allows it to import/export data to modelling programs, as long as they follow the structure described.


    Even though this schema file is ambiguous, as in it could be used by other software, currently only m3addon does it.


    Due to complexity of the format, there's still a lot of quirks regarding it unkown/undocumented. Not to mention, it has been evolving through the years since the release (and still is). Each release has been versioned, and brought new features which affected how the binary data is distributed along it.


    There's simply no full coverage. The reason why certain models can't be imported, or are imported improperly is because model contains something, that hasn't been documented and included in the schema. Or there are bugs within the code translating already loaded data, into Blender environment.


    M3Addon actually attempts to load data in quite a strict mode. And often times, once it encounters something contrary to the schema, it will cease the process and output error.
    While other importers made for M3 have more speculative import process implemented I believe. And rather skip some unknown chunks of data, and attempt to load relevant sectors in usual manner. What always gives you something - even if incorrect. Other times, they crash hard :)


    Anyway, quite often import errors occuring in m3addon can be resolved by just filling missing gaps within the scheme file. Of course that requires some understanding of how is it all connected. Author of the plugin actually documented some of the common problems, and how can they be resolved.


    In this particular case, the problem was relatively easy to resolve - even with all things said above, my understanding of m3 format, modelling stuff, and general graphic rendering subjects is quite poor, really. Anyway, the cause of the error was a result of the strict behavior in method responsible of loading mesh vertices. There was one flag not covered by the schema file. And this flag turned out to to be relevant in this case, to get the model right.

    This was it: https://github.com/flo/m3addon/pull/38/commits/8f4ff44ee995dabeff83d41655627be02c3aaa42


    Unfortunately author doesn't actively work on the plugin anymore, and no one else competent stepped in to provide furher support for Blender. Partly because there is more focus given into 3ds Max, what's not suprising.


    Anyway, while my knowledge on this field is poor as I said, if you want badly some model imported into blender, and it results in error, I guess I could give it it a look.


    hmm.. for such a small question, I probably put up too long answer, haha

    Posted in: Artist Tavern
  • 0

    posted a message on Importing .m3 to Blender error

    The model in question stores vertices in a format currently unsupported by m3addon.

    However, I did investiagate it further and was able come up with a fix.

    Fix was sufficient to successfully to import and export back model to m3.


    Here is updated: structures.xml (schema file that plugin uses for a reference)

    You just have to replace it with the one currently exisiting in m3addon folder.

    (I'll later submit the patch to plugin maintainer.)

    Posted in: Artist Tavern
  • 0.962616822429907

    posted a message on Func Ref/Pointer Syntax
    void fn_prototype(int a);
    void some_function_that_must_match_above_signature(int param)
    void main()
        funcref<fn_prototype> ref;
        ref = some_function_that_must_match_above_signature;


    Some further explanation about _ref thingies can be found here:

    Posted in: Galaxy Scripting
  • 0

    posted a message on Galaxy IDE as Visual Studio Code extension

    Ah, it crashes because it attempts to report an error (about missing value for return statement) on non-existing node.
    Gonna release fixed version soon, in meantime you can just hotfix it, since it is JavaScript - no recompilation required :)



    with just

    Path to checker.js is in your logs.


    You mean use vscode to debug Galaxy script? You want to write a VM for galaxy or run SCII and get data and control the game? BLZ start to add features for SE, so it will be a continuous work. If you finish it, it will be great! As we know, BLZ have never supported a good debug tool, no matter WE of War3 and SE of SC2.

    Yes, plan is to use SC2 VM. Since SC2 already has debugger to control VM, I can utilize it by just hooking up relevant winapi controls.

    Of course I'd like to go a little beyond that - inject some additional binary code to SC2.exe that would allow to for example modify values of variables. But that requires further research..


    I am a original-edition-ism user. It is a bad habit of caring efficiency from the period of War3. I do not like vJass, cJass and other extensions of Jass2, the script language of War3. But for SC2, galaxy is enough efficient. So I have never used the extension of Galaxy++.

    Yes, I wouldn't like to implement features that would noticeably impact performance.

    I was thinking about features such as:

    - modularity/namespaces: Galaxy has single global module and everything is put into the same namping space - included files can access everything what was declared by parent files..

    - Tigger Library generation from Galaxy code

    - some syntatic sugar for things like passing variables as references (Galaxy requires you to wrap it with arrayref), iterator interfaces to provide foreach loops

    - maybe some C like preprocessing macros..?


    I really think there's a lot that can be done to make Galaxy "more friendly" - reduce the amount of boilerplate code it often requires to accomplish simple things. 

    Well, we'll see if I'll be motivated enough to put needed time into this.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Galaxy IDE as Visual Studio Code extension

    That's because you were previously accepting "AIEvalSetCustomIndex" as suggestion, when typing "else". For that reason, editor now assumes it is your preference over keyword "else", which previously was not available - look that "else" is now at the top of the list. As far as sorting goes it is fine. You probably just have to choose "else" once, and editor will remember your choice. It's actually recent feature of VSCode

    And do not check if return is exist.

    Added to the list.


    I'll probably slow down with work on new features in upcoming days/weeks, and switch my focus to other stuff. But keep reporting any issues you encounter - these are useful, as I don't work much with SC2 projects recently.


    However, as a long term plans.. or rather ideas. I'd like to implement frontend debugging UI for Galaxy in VSCode ( https://code.visualstudio.com/Docs/editor/debugging ). Which would utilize default TrigDebug window as a starting point. Primary reason is to make new frontend convenient to use, because default one is not so friendly... perhaps it would be possible to come up with some exclusive features. Although SC2 binaries got really hard to RE during these years (and I never was good at that to begin with :| ). I gotta dig more to see whether something like this would be feasiable at all.


    The other thing I'm considering is yet another Galaxy Language Extension - acting as transpiler. My focus on this would be on features meant to improve usability, while avoiding implementing dynamic capabilities like Galaxy++ did. As there's no easy way to emulate that - it quickly gets messy.
    But seeing how low interest there's about Galaxy related things within community, it might be simply too late for such project. If I'm however wrong about that, I'm open for collaboration.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Galaxy IDE as Visual Studio Code extension

    Released v1.7.0 (rough changelog)


    Most notable changes are probably:

    - find all references [1] & symbol rename

    - improvements to typechecking - it now respects order in which symbols are declared (only in scope of single file). That means if you'll try to reference variable/function declared X lines below it will print an error msg.


    Natives not declared in Galaxy files will now be auto-generated every release. There were quite a lot of them actually: 




    Posted in: Galaxy Scripting
  • 0

    posted a message on Galaxy IDE as Visual Studio Code extension

    Macro is a special galaxy syntax for galaxy which only use at custom script in function/action definition.

    Ahh, preprocessing macros.. I did know there's such thing, just forgot about it. Mostly because of the reason you mention, these are not actual Galaxy languages macros. This feature is exlusive to Trigger editor, thus I don't think it would be right to treat it as part of Galaxy language.. maybe it could be allowed as opt-in in configuration.
    I'll think about it - whether it is benefical to have this implemented and how much hassle would it require.


    And you may not add the new function of 4.0, such as BankBackup, this function is not in natives.galaxy and NativeLib.galaxy, but it is list in the Trigger Library.

    Yeah, I blame Blizzard for that :P They should include new natives into natives.galaxy instead of inserting them exlusively to TriggerLib :/
    Some old ones like PlayerOptionOverride are not there aswell.. I'll solve it in next version.


    Another is could you add the keywords into the Code completions? When I input else it always change to
    AIEvalSetCustomIndex. Because after input else, i need input Enter to start a new line.

    You can always cancel suggestion list (esc), and then hit enter :P (or force it with ctrl-enter.)

    But yes - of course it's valid suggestion. I'll add keywords. 


    I'll likely release new version later today or tomorrow. It will also include some fancy new features (find all references function and global symbol rename).

    Posted in: Galaxy Scripting
  • 0

    posted a message on Galaxy IDE as Visual Studio Code extension

    I copy the integer value from Calculator , and paste to the vscode.

    It is show me as a error.


    This may be a bug of vscode, I install the newest one

    in ASCII encode, the copied integer value with two chars (0x3f) as a prefix and suffix.

    Encountered invalid character
    There must be some invalid ASCII character (apparently invisible) pasted in. No idea why would calculator put something like that into clipboard .. 0x3f should be "?" (question mark sign), right? If so, I don't think this is it - otherwise VSCode should render it. It must have been something else (you can check with hex editor).
    In next version error message will also include character codes.


    PS: If you want to add other feature, support the Macro syntax of Trigger Function may a good one.

    Hmm, what you mean by "macro"?
    Perhaps snippets is what you refer to? https://code.visualstudio.com/docs/editor/userdefinedsnippets

    If so, there are some snippets included with extension: https://github.com/Talv/vscode-sc2-galaxy/blob/master/snippets/general.json

    For triggers there's tgs and tgc. But I'll have to change them, as its current template doesn't follow usual code style convetions of Galaxy, but rather my personal preference: snake_case instead of camelCase, and "{" on new line.


    As for the other 2 reports - it's done. But not released yet. Will make one later this week.


    Posted in: Galaxy Scripting
  • 0

    posted a message on Galaxy IDE as Visual Studio Code extension

    Ops, minor bug, but none of my test cases covered it. Fixed.

    Posted in: Galaxy Scripting
  • 0

    posted a message on [Celebration] New sc2mapster website one year anniversary !

    In reply to TChosenOne:

    You don't disagree then, because I never meant to imply that Discord can replace forum. It could sound like so, though.
    If sc2mapster would die, something fresh and better could fill its place. That's kinda naive, I know.. It's just sad that founders are no longer there. They had the passion needed to keep this site thriving. Today, we are left with Curse, who merely treat as an asset under their possession. And since the asset has no perspectives to grow, we are left on our own.
    Posted in: General Chat
  • 0

    posted a message on [Celebration] New sc2mapster website one year anniversary !

    I hope sc2mapster will die. I'm serious.

    I love the community, but I hate the fact that it is managed by Curse. Company that doesn't give a damn fuck about us. And at the same time don't give us any oppurtunity to contribute to the website, forum and all things related (by opening source code).

    Like half of the activity already shifted to Discord, just because how not user friendly this site has become.

    Posted in: General Chat
  • 0

    posted a message on Galaxy IDE as Visual Studio Code extension

    Released 1.6.0 with finalized typechecker!


    Posted in: Galaxy Scripting
  • 0

    posted a message on How to make SC2 editor language to English

    Make sure you've correct localization set in Battle.net game options, not just in-game options of SC2.

    Also you could try to force change of Editor options by overriding relevant config key in regedit



    reg add "HKCU\Software\Blizzard Entertainment\StarCraft II Editor\Preferences" /t REG_SZ /v Locale /d enUS /f

     I have no idea if it will work. But it should be done while editor is off. At next launch it wil either start downloading new localization files, or revert back to previous settings..

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Galaxy IDE as Visual Studio Code extension

    Released v1.5.0 - https://github.com/Talv/plaxtony/releases/tag/v1.5.0


    Quick highlight of new features:


    Code completions prioritize preset constants when valid (function must declare preset type within Triggers metadata).


    Gamelinks suggestions (units, effects etc.)


    Improved formating of function signature. It now also includes grammar text entry.



    Also, I have just realized I didin't package default SC2 archives other than core.sc2mod in last release... it is now fixed. Package size went up ~20MB.

    Configuration settings are described in docs CONFIGURATION.md


    I consider this release to be very stable.

    I'm gonna try to finalize typechecking for next release.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Galaxy IDE as Visual Studio Code extension

    No, just show the multibyte character as a warning or error. This issue always happen in the comment, so your parser can not find it, if the user want to use multibyte character, he can translate it as unicode type ('\x') himself. I have write a tool to do that.......

    Ahh, okay. Indeed my parser allows a lot of things that normally result in error when parsed by SC2.
    But I of course want it to be on pair, even if I'll have to explictly hardcode rules like 4096 characters single line limit..

    (as for the comments - it doesn't validate it yet, as I was sure SC2 could handle it there, but apparently not... will make it to next version.)

    My work in Forggy & Catty is write base system in galaxy, and another partner works for game with GUI (Delphinium works for art). I need encapsulate galaxy function to GUI function for him.

    Well, I'm not convinced to your workflow, but I'm sure you know what you're doing.


    Anyway, new version released.
    - When .sc2map or .sc2mod is present within the workspace, indexer will attempt to visit every dependency listed. If it fails to load at least one, it will revert to indexing only `core.sc2mod` and its native lib.
    - Typedef, funcref, arrayref are now entirely supported
    - Other minor improvements



    Feel free to report any issues you encounter, as well as feature requests if you've any.

    Posted in: Galaxy Scripting
  • To post a comment, please or register a new account.