If I understand correctly, the dialog's you drag and drop will automatically generate script which can be rather lengthy. Forgive me if this is shameless advertising, but what do you think about the possibility of integrating GXML as a component of the drag and drop designer? Simply put, it's a script I wrote sometime back aimed at compressing dialog script from multiple lines into a single line of code.
For example:
Create new dialog
Set dialog full screen
Set dialog background hidden
Set the dialog title to "test"
Can be simplified to: "<d +full +off>Test</d>"
Whereby the sequence of parameters does not matter. At its current state, most testing has been done by myself, so there may be bugs; but function wise, it should work fine for most dialog item types, buttons, labels, images, drop menu's, sliders, etc.
The primary motivation of this is script compression. Since galaxy does seem to have some sort of script limit.
PS: Feel free to decline if you don't think it's a good idea, I won't have any hard feelings about it.
Has anyone really run into this script limit? I have a project with an output script on 15639 lines, and it runs just fine.. I have run into a problem about a single function having too many lines in it, but such a function can just be split. Right now, I'll focus on fixing bugs and implementing the missing features.
Has anyone really run into this script limit? I have a project with an output script on 15639 lines, and it runs just fine.. I have run into a problem about a single function having too many lines in it, but such a function can just be split. Right now, I'll focus on fixing bugs and implementing the missing features.
ok Im running your tool..... my system doesnt like your dialog editor though
at first it wouldnt show any thing when double clicking the new dialog I created .... now it loaded some image with a very vb looking dialog properties list on the far right .... but it doesnt show the dialog in the test screen....
yup dialog is not visible.
the back ground for it is set to be visible
when i mouse over the dialogs intended area I get the move object cursor.... and i can move it around.
its just not visible.
yeah dunno why its like this....
also is it possible to use a custom image as the back ground .....
maybe try doing it with out the back ground image at all....... its not really needed
added an image of the editor on my prior post.
Another thing.....
is it possible to just out put small segments of the code written in your + + editor to a text file?
personally i do all my maping in the trigger editor because I find it more usefull then anything else.
if I really need to I can write small custom scripts that I can run from the trigger editor. Such as a custom action defined by a custom script or some other such thing.
Id like to be able to write Dialog UI in your + + editor and just output the related dialog stuff to a text file that I can drop into a custom script.
I know i can scan through all the script code an just copy and paste as needed.... but I dunno just a thought
Anyway, the background image is not the issue - added that because it's more interesting to look at than a flat color.. And in game, you would have a similar background.
From what mexa told me, it sounds to me like its an issue with shader versions.. but both yours and mexa's card should have no trouble with pixel shaders v 3.0....
Not layout files..... but a layout file UI editor would be really nice.... Ive thought on creating my own editor for that ....,but its more work then I can currently fit on to my plate.
I can now see the dialog in the test screen..... what ever you did seems to have did the trick....
whats your thought about being able to use custom images in the dialog editor?
No. I couldn't find out where/if the stuff like buttons, checkboxes etc are defined in layout files, so it just mimics what it looks like in game. As for the output, that is galaxy script
I meant use a custom image for the back ground of the dialog designer... not the dialog itself
Would it be possible to resize the items by clicking on the corners of the objects like standard windows objects?
It looks like you already have some of this functionality built in.....
Sometimes when i create an edit box... I can rotate and resize ... but after I do it once... I can no longer get the cursor to cue up the rotate and resize cursor
I seem to have some issues with objects placed on the dialog.
I cant move objects after placing them
labels
edit boxes ( some times)
check boxes
objects dont appear to be rendered properly
edit boxes (some times)
list boxes (some times)
some times the objects appear to be created to small to locate again....
images
list boxes
edit boxes
also ... when I create a dialog .... and im editing it....... theres an option to create another dialog object....
now I dont believe you can have a dialog attached to another dialog... but it appears that this is what your dialog designer is doing when you use the add dialog object..... I can move the second dialog freely with the mouse but when I move the original one it moves the new one along with it.
not sure if the code will handle this correctly..... it does not appear to create an addition dialog object in the script for everything
Ive never programed anything that had to do with image rendering.... but isnt there a way you could do it with out having to use shaders and such?
Has anyone really run into this script limit? I have a project with an output script on 15639 lines, and it runs just fine.. I have run into a problem about a single function having too many lines in it, but such a function can just be split. Right now, I'll focus on fixing bugs and implementing the missing features.
Personally, its never happened to me, but I've heard cases of it before. If I'm not mistaken DarkRevenant managed to hit the script limit for Mafia. But then again, if you were to ask me, I believe mappers working with GUI are more likely to hit the limit, since the auto-generated code from triggers usually has a lot of redundant script (Ctrl+F11).
If I'm recalling correctly, another case was the mapper who was working on the curse of tristram, a diablo like map.
I would say if you have the physical designer in working condition you have half of the work done and would just require some backend work to implement Layouts. I would very much like to see a UI designer that makes use of the SC2Layout implementation. This allows for greatly reduced script overhead. A complex dialog item made up of hundreds of images, buttons, etc. requires only one line of script to create. You can also make use of SC2Font files and link to the Asset.txt instead of referencing assets directly. Seperation of these facets greatly simplifies multi-user projects. A team member working on UI layout does not interfere with someone working on script. Asset references in the Assets.txt allows chopping and changing of content without breaking UI/Script that relies upon it.
Every element of the game UI, most notebly story mode interfaces, are defined as SC2Layouts. You can be sure they provide a lot more flexability than script.
If you're interested, you can look at a project I put up a few days ago which is an XML schema for SC2Layouts. If you can make sense of it you will get a very good idea of how Layout files are structured.
I can make the background be loaded from an image in the folder instead.
Hmm. I haven't experienced issues with the resizing. Is it because the boxes are too small? Do anyone else have this issue? Do you have exact steps to replicate the problem on a fresh dialog?
This might be counter intuitive, but when you place dialog items, you should hold the mouse down and drag them out to the desired size..
In a future version, I might set a default size if this is not done.
The other dialogs are attached to the main dialog, or whatever dialog you set to be their parent. In the output, you might see
You can do image processing just with the cpu, yes. But since the whole point of a graphics card is image processing, it has a lot of tools for it which you would have to write for the cpu yourself. And doing it with the gpu gives you a performance boost.
I quite like the idea of putting it in layout files, since it feels like that's where it belongs. I haven't toyed around with them much though.. Can you set values pr player and pr race? Are there anything you can do there, but not in script? Anyway, as for now, I will keep rolling with script, but once I get bugs and features sorted, I might look into it.
Managed to dig up that the script limit is not based on the number of lines of code, but apparently the size of the compressed script. It is currently 2MB (According to Ahli), whereby the script file is MapScript.galaxy. Source
I'm not too sure if any workarounds are currently known.
Edit: Sneakervek seemed to find otherwise though, but his post about it was in Feb 2011, so it may not be accurate.
Your source says the uncompressed size. I doubt it's just the mapscript.galaxy file.. could just make that include a humongous script file, which would be a pretty easy workaround. Still.. it seems like kind of a silly limit.. Add Shakespeare's collected works in a comment, and you hit it with no code at all..
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'll just drop this in here..
And refer to this :)
http://www.sc2mapster.com/forums/resources/third-party-tools/19619-galaxy-editor/#posts
Amazing work you got here.
If I understand correctly, the dialog's you drag and drop will automatically generate script which can be rather lengthy. Forgive me if this is shameless advertising, but what do you think about the possibility of integrating GXML as a component of the drag and drop designer? Simply put, it's a script I wrote sometime back aimed at compressing dialog script from multiple lines into a single line of code.
For example:
Can be simplified to: "<d +full +off>Test</d>"
Whereby the sequence of parameters does not matter. At its current state, most testing has been done by myself, so there may be bugs; but function wise, it should work fine for most dialog item types, buttons, labels, images, drop menu's, sliders, etc.
The primary motivation of this is script compression. Since galaxy does seem to have some sort of script limit.
PS: Feel free to decline if you don't think it's a good idea, I won't have any hard feelings about it.
@SBeier: Go
So how do we get this UI for creating Dialogs in the editor?.....
Im not good with videos do you have a write up on how to do that?
@FuzzYD: Go
Has anyone really run into this script limit? I have a project with an output script on 15639 lines, and it runs just fine.. I have run into a problem about a single function having too many lines in it, but such a function can just be split. Right now, I'll focus on fixing bugs and implementing the missing features.
@SouLCarveRR: Go
Well, first of all, to run it, you need .net 4.0 and xna 3.1.
http://www.microsoft.com/download/en/details.aspx?id=17718
http://www.microsoft.com/download/en/details.aspx?id=15163
Once you start it up, it should just be a matter of creating a new project (right click the list to the right, and select new project), and then once the project is open, create a new dialog (right click same place, and select new dialog). Open that by double clicking it.
well I have .net 4.0 and just installed xna 3.1
Is there a 3rd party tool you created for this? If so where do I get that?
I put a refference to it in the top post ;)
You will find the latest version here
ftp://46.163.69.112/Releases/
@SBeier: Go
ok Im running your tool..... my system doesnt like your dialog editor though
at first it wouldnt show any thing when double clicking the new dialog I created .... now it loaded some image with a very vb looking dialog properties list on the far right .... but it doesnt show the dialog in the test screen....
yup dialog is not visible.
the back ground for it is set to be visible
when i mouse over the dialogs intended area I get the move object cursor.... and i can move it around.
its just not visible.
yeah dunno why its like this....
also is it possible to use a custom image as the back ground .....
As a AAA game company would say, "We are aware of this issue, and are currently working on a solution" :) I'll upload a new version momentarily.
Just out of curiosity.. what graphics card do you have?
@SBeier: Go
i have an ati radeon hd 5770
they are known to have serious issues......
maybe try doing it with out the back ground image at all....... its not really needed
added an image of the editor on my prior post.
Another thing.....
is it possible to just out put small segments of the code written in your + + editor to a text file?
personally i do all my maping in the trigger editor because I find it more usefull then anything else.
if I really need to I can write small custom scripts that I can run from the trigger editor. Such as a custom action defined by a custom script or some other such thing.
Id like to be able to write Dialog UI in your + + editor and just output the related dialog stuff to a text file that I can drop into a custom script.
I know i can scan through all the script code an just copy and paste as needed.... but I dunno just a thought
I uploaded a new version.
Anyway, the background image is not the issue - added that because it's more interesting to look at than a flat color.. And in game, you would have a similar background.
From what mexa told me, it sounds to me like its an issue with shader versions.. but both yours and mexa's card should have no trouble with pixel shaders v 3.0....
@SBeier: Go
got this error while updating
@SouLCarveRR: Go
Does this make use of script or layout files?
@Kalekin: Go
Not layout files..... but a layout file UI editor would be really nice.... Ive thought on creating my own editor for that ....,but its more work then I can currently fit on to my plate.
I can now see the dialog in the test screen..... what ever you did seems to have did the trick....
whats your thought about being able to use custom images in the dialog editor?
@SouLCarveRR: Go
Okay.. that's the directory.. Just delete it.. Ill fix the updater for next version.
@Kalekin: Go
No. I couldn't find out where/if the stuff like buttons, checkboxes etc are defined in layout files, so it just mimics what it looks like in game. As for the output, that is galaxy script
@SouLCarveRR: Go
If you import the custom images to your map, you should be able to select them from the list.
@SBeier: Go
I meant use a custom image for the back ground of the dialog designer... not the dialog itself
Would it be possible to resize the items by clicking on the corners of the objects like standard windows objects?
It looks like you already have some of this functionality built in.....
Sometimes when i create an edit box... I can rotate and resize ... but after I do it once... I can no longer get the cursor to cue up the rotate and resize cursor
I seem to have some issues with objects placed on the dialog.
also ... when I create a dialog .... and im editing it....... theres an option to create another dialog object....
now I dont believe you can have a dialog attached to another dialog... but it appears that this is what your dialog designer is doing when you use the add dialog object..... I can move the second dialog freely with the mouse but when I move the original one it moves the new one along with it.
not sure if the code will handle this correctly..... it does not appear to create an addition dialog object in the script for everything
Ive never programed anything that had to do with image rendering.... but isnt there a way you could do it with out having to use shaders and such?
Personally, its never happened to me, but I've heard cases of it before. If I'm not mistaken DarkRevenant managed to hit the script limit for Mafia. But then again, if you were to ask me, I believe mappers working with GUI are more likely to hit the limit, since the auto-generated code from triggers usually has a lot of redundant script (Ctrl+F11).
If I'm recalling correctly, another case was the mapper who was working on the curse of tristram, a diablo like map.
@SBeier: Go
I would say if you have the physical designer in working condition you have half of the work done and would just require some backend work to implement Layouts. I would very much like to see a UI designer that makes use of the SC2Layout implementation. This allows for greatly reduced script overhead. A complex dialog item made up of hundreds of images, buttons, etc. requires only one line of script to create. You can also make use of SC2Font files and link to the Asset.txt instead of referencing assets directly. Seperation of these facets greatly simplifies multi-user projects. A team member working on UI layout does not interfere with someone working on script. Asset references in the Assets.txt allows chopping and changing of content without breaking UI/Script that relies upon it.
Every element of the game UI, most notebly story mode interfaces, are defined as SC2Layouts. You can be sure they provide a lot more flexability than script.
If you're interested, you can look at a project I put up a few days ago which is an XML schema for SC2Layouts. If you can make sense of it you will get a very good idea of how Layout files are structured.
SC2Layout XML Schema
@SouLCarveRR: Go
I can make the background be loaded from an image in the folder instead.
Hmm. I haven't experienced issues with the resizing. Is it because the boxes are too small? Do anyone else have this issue? Do you have exact steps to replicate the problem on a fresh dialog?
This might be counter intuitive, but when you place dialog items, you should hold the mouse down and drag them out to the desired size..
In a future version, I might set a default size if this is not done.
The other dialogs are attached to the main dialog, or whatever dialog you set to be their parent. In the output, you might see
When you add a child dialog.
You can do image processing just with the cpu, yes. But since the whole point of a graphics card is image processing, it has a lot of tools for it which you would have to write for the cpu yourself. And doing it with the gpu gives you a performance boost.
@FuzzYD: Go
Okay.. any idea how many lines we are talking about?
@Kalekin: Go
I quite like the idea of putting it in layout files, since it feels like that's where it belongs. I haven't toyed around with them much though.. Can you set values pr player and pr race? Are there anything you can do there, but not in script? Anyway, as for now, I will keep rolling with script, but once I get bugs and features sorted, I might look into it.
@SBeier: Go
Managed to dig up that the script limit is not based on the number of lines of code, but apparently the size of the compressed script. It is currently 2MB (According to Ahli), whereby the script file is MapScript.galaxy. Source
I'm not too sure if any workarounds are currently known.
Edit: Sneakervek seemed to find otherwise though, but his post about it was in Feb 2011, so it may not be accurate.
Your source says the uncompressed size. I doubt it's just the mapscript.galaxy file.. could just make that include a humongous script file, which would be a pretty easy workaround. Still.. it seems like kind of a silly limit.. Add Shakespeare's collected works in a comment, and you hit it with no code at all..