[BETA] Custom Gui V0.8 - Update: 23/08/2007
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Moderator (Script&Mod)
- Posts: 22414
- Joined: Sun, 14. Nov 04, 23:26
i've got a new version available, this includes rendering of full videos in the gui windows, both AVI and MPG files work, as well as some others.
theres 2 new X3 scripts, one allows playing external sounds at any time, and doesn't require a GUI to be open.
the other is for Cut Scenes, allows playing videos in full screen while halting inputs to the game.
theres 2 new X3 scripts, one allows playing external sounds at any time, and doesn't require a GUI to be open.
the other is for Cut Scenes, allows playing videos in full screen while halting inputs to the game.
-
- Posts: 1874
- Joined: Thu, 1. Mar 07, 09:21
Wow! This is what dreams are made of!
Now we can all actually make our own proper missions and stuff. You really are amazing cycrow!
Now we can all actually make our own proper missions and stuff. You really are amazing cycrow!
Archeo Avis wrote:So what you're saying is, if you ignore everything that's different and focus only on the one thing that's the same, they're same.if you take out phrasing and root notes and just look at the notes, they are the same
Good God.
-
- Posts: 184
- Joined: Thu, 9. Mar 06, 02:32
-
- Posts: 683
- Joined: Fri, 17. Feb 06, 20:54
Hi, Cycrow.
Just a question for you...
You'll recall that I couldn't get the GUI.exe file to do anything, even after updating my DirectX files, yes? Though updating said files did at least put an end to error messages - it's just that the Gui.exe then failed to start up X3.
Just a refresh for you there.
Anyway, I have noted that later posts in this thread claimed that the GUI was failing to execute the game if X3's path had any spaces in its name - needless to say, mine does, such as "Program files" and "X3 Reunion" - and I've now DL'd your latest version, which reckons to have this problem solved...
...BUT, in order to install the latest version, do I need to UNinstall the previous one, or will the new one just overwrite it? And if I do need to uninstall the old one first, how do I go about it? I couldn't find and "Uninstall.exe" file in with the old GUI files, and I don't want to uninstall the game by mistake!!! Lol!
Can you advise me?
Many thanks, Sir.
Adam.
Just a question for you...
You'll recall that I couldn't get the GUI.exe file to do anything, even after updating my DirectX files, yes? Though updating said files did at least put an end to error messages - it's just that the Gui.exe then failed to start up X3.
Just a refresh for you there.

Anyway, I have noted that later posts in this thread claimed that the GUI was failing to execute the game if X3's path had any spaces in its name - needless to say, mine does, such as "Program files" and "X3 Reunion" - and I've now DL'd your latest version, which reckons to have this problem solved...
...BUT, in order to install the latest version, do I need to UNinstall the previous one, or will the new one just overwrite it? And if I do need to uninstall the old one first, how do I go about it? I couldn't find and "Uninstall.exe" file in with the old GUI files, and I don't want to uninstall the game by mistake!!! Lol!
Can you advise me?
Many thanks, Sir.

Adam.
-
- Posts: 82
- Joined: Fri, 27. Jul 07, 00:10
Things are just about done with the project I started awhile back (had to take some time off for real life stuff), so I thought it'd be nice to help out on the dev of the Custom GUI. I've started writing a small class library for you that will let you create an array of your SmallText objects (temp placeholders at the moment, since I don't have a definition for your SmallText class). I came up with the idea as a partial solution to the menu support you were wanting to add in. Included would be a class for you to add to your parsing functions which takes a string that defines an array (one-dimensioned unless you want me to add support for multidimensioned arrays for later on) and parses it to an array of strings, since I'm designing the "menu template" class to take an array of string values for the menu option labels. The scripter could also have the option of setting an alignment (vertical for traditional menus or horizontal), the dimensions of the option "buttons", and the spacing between the options, if you don't mind adding a bit to your parser. I could also start prototyping the GUI script defs and some parsing algos to handle if you want me to go ahead with that.
I've already written a script that takes an array and dumps the elements to a formatted string; I've even set it up to handle n-nested arrays in case you ever decide that you want support for that later. I've written it so that all you'd need to do is replace the nested array in the "variables" array in your customdisplay script with the formatted string.
I'll be writing the library as I can along with the work I'm doing for SWTC (and college), so it might take a week or two to write and debug the library. Anyway, hope this helps things along. Cheers!
I've already written a script that takes an array and dumps the elements to a formatted string; I've even set it up to handle n-nested arrays in case you ever decide that you want support for that later. I've written it so that all you'd need to do is replace the nested array in the "variables" array in your customdisplay script with the formatted string.
I'll be writing the library as I can along with the work I'm doing for SWTC (and college), so it might take a week or two to write and debug the library. Anyway, hope this helps things along. Cheers!

-
- Moderator (Script&Mod)
- Posts: 22414
- Joined: Sun, 14. Nov 04, 23:26
im looking into adding dll support so you can create functions and rountines for the gui without having it to be added to the main code.
then the script parser can simply call up the dll functions.
i've not had too much time too work on it recently as i've been abit ill
but should be starting back up again, i've already written routines for push buttons and check boxes.
and i have fixed the crashing problems with alt tab
then the script parser can simply call up the dll functions.
i've not had too much time too work on it recently as i've been abit ill
but should be starting back up again, i've already written routines for push buttons and check boxes.
and i have fixed the crashing problems with alt tab
-
- Posts: 82
- Joined: Fri, 27. Jul 07, 00:10
Sounds great! Well, if you want me to pass along that library when I'm done (it probably won't take that long, despite what I said before), I'll be more than happy to...I suppose it'd make for some material for you to test your extensible framework with, though you'd still have to do the packaging. There might be a tutorial example somewhere in that. Up to you, mate.
-
- Posts: 82
- Joined: Fri, 27. Jul 07, 00:10
Well, I hate to be the bearer of bad news, but I'm having an interesting issue with passing values back to the scripts. The GUI doesn't appear to be using 9006 at all...I can't even confirm that it's being created in the first place as it doesn't show up in the \t folder (as I understand things, the GUI should be creating this on its own; I've double-checked your AL scripts and there aren't any instructions that create 9006 there).
I've tried diagnosing the problem a couple of different ways from your pollgui script: I've inserted an instruction to dump the results array to the logbook--the results array appears to be consistently empty, even after running your example 7 script (and clicking on Option 1, of course)--and I've tried commenting out the PURGE directive that's being written to 9005 just in case it's also telling the GUI to delete 9006. Just to be certain, I've also double-checked the permissions for the \t folder.
I'm really not sure what I could be doing (or not doing) on my end to cause the problem. Everything works as it should except for that. I'm running the latest release.
I've tried diagnosing the problem a couple of different ways from your pollgui script: I've inserted an instruction to dump the results array to the logbook--the results array appears to be consistently empty, even after running your example 7 script (and clicking on Option 1, of course)--and I've tried commenting out the PURGE directive that's being written to 9005 just in case it's also telling the GUI to delete 9006. Just to be certain, I've also double-checked the permissions for the \t folder.
I'm really not sure what I could be doing (or not doing) on my end to cause the problem. Everything works as it should except for that. I'm running the latest release.
-
- Moderator (Script&Mod)
- Posts: 22414
- Joined: Sun, 14. Nov 04, 23:26
its very rare you will actually see the 9006 file, simply because, when its written, the pollgui scripts should read in the data and store it internally then the file is removed.
have you made sure u've set the gui name so it can store it in the correct place ?
and made sure that the gui polling is enabled in the AL Settings menu
i shall test it further but it did work fine when i last tested it.
ill create an example script that will work with the menu example as well
have you made sure u've set the gui name so it can store it in the correct place ?
and made sure that the gui polling is enabled in the AL Settings menu
i shall test it further but it did work fine when i last tested it.
ill create an example script that will work with the menu example as well
-
- Posts: 82
- Joined: Fri, 27. Jul 07, 00:10
Yeah, I went through your scripts just to make absolutely sure I understood the logic of that several times. I'm giving the getgui script the same gui name and key that I'm passing to customdisplay and returning as the first parameter of the GUI script's "Send:" command, respectively.Cycrow wrote:have you made sure u've set the gui name so it can store it in the correct place ?
Yeah, double-checked that.Cycrow wrote:and made sure that the gui polling is enabled in the AL Settings menu
[Edited] I think the problems may be related to driver conflicts. I've also had problems with the game randomly crashing when launching through the GUI exe. Running in debug mode only partially prevents it. I've recently rebuilt my system and installed the latest drivers for my video card, which is an older GeForce series. Since then I've taken a huge hit to performance all across the board (X3 runs at a crawl now), so I wonder if the new nVidia drivers (which are probably updated for Vista compatibility) are making the XP Direct3D drivers unstable.Cycrow wrote:i shall test it further but it did work fine when i last tested it.
I'm not sure how or why that would prevent the GUI from writing to 9006 when everything else works just fine (at least when the game doesn't crash). If I can find an older set of drivers for the video card, I'll try installing those and see how many of these problems disappear.
-
- Posts: 82
- Joined: Fri, 27. Jul 07, 00:10
-
- Posts: 82
- Joined: Fri, 27. Jul 07, 00:10
Well, I have an update for you: Turning down the hardware acceleration and setting X3 to the lowest possible resolution seems to have almost completely stabilized the GUI. I'm not an expert by any stretch of the imagination, but my guess is that Windows is pushing the extra processing overhead created by the custom GUI onto the GPU since you're hooking into the Direct3D dll. My graphics card barely has the necessary memory to handle X3 graphics at resolutions above 1024x768 as it is, and I was testing in a busy sector.
Now we'll see about that 9006 business.
Now we'll see about that 9006 business.
-
- Moderator (Script&Mod)
- Posts: 22414
- Joined: Sun, 14. Nov 04, 23:26
interesting, sounds like the extra overhead caused by the rendering of the gui is having an impact on its ability to work, not sure how to fix that.
i've never had a problem coz my system handles x3 pretty well, even at 1900x1200.
however, if you still having difficulty, what ill do is create a debug version for you to use.
i will hopefully get back to working on it soon, as i've fractured my wrist its been difficult
i've never had a problem coz my system handles x3 pretty well, even at 1900x1200.
however, if you still having difficulty, what ill do is create a debug version for you to use.
i will hopefully get back to working on it soon, as i've fractured my wrist its been difficult
-
- Posts: 82
- Joined: Fri, 27. Jul 07, 00:10
Sorry to hear about the wrist
. I haven't had a chance to get back to testing the GUI callback yet, but the custom GUI continues to remain stable as long as I keep the resolution and hardware settings turned down, so at least it's being consistent. As I've said, I'm no expert on coding for Windows, but if the problems are being caused by running the GUI code in the dll, then couldn't you offload that back onto either the GUI launcher exe or another one?

-
- Moderator (Script&Mod)
- Posts: 22414
- Joined: Sun, 14. Nov 04, 23:26
unfortuatlly it doesn't work like that, the launcher simply hooks the dll to be used.
what happens, is when the game renders to screen, it uses the Direct3d DLL to do it, but the custom gui acts as a proxy to that dll, so it calls the functions from my dll to render instead of the Direct3D allowing it to render more.
ill have a look to c if i can improve performance in the GUI
what happens, is when the game renders to screen, it uses the Direct3d DLL to do it, but the custom gui acts as a proxy to that dll, so it calls the functions from my dll to render instead of the Direct3D allowing it to render more.
ill have a look to c if i can improve performance in the GUI
-
- Posts: 683
- Joined: Fri, 17. Feb 06, 20:54
-
- Moderator (Script&Mod)
- Posts: 22414
- Joined: Sun, 14. Nov 04, 23:26
have u made sure u've got the most recent version ?
most of the crashing problems are fixed.
althou there still might be some on some systems.
it works fine on mine, but i cant quarentee it'll be the same on other systems.
but i am working on a new version as well.
i assume it crashes as soon as u run any example script ?
which would suggest that its the render cycle thats causing a problem for what ever reason.
im going to make a debug version as well, that will dump a load of data to a text file, this should help tracking the cause of the crashing
most of the crashing problems are fixed.
althou there still might be some on some systems.
it works fine on mine, but i cant quarentee it'll be the same on other systems.
but i am working on a new version as well.
i assume it crashes as soon as u run any example script ?
which would suggest that its the render cycle thats causing a problem for what ever reason.
im going to make a debug version as well, that will dump a load of data to a text file, this should help tracking the cause of the crashing
-
- Posts: 1141
- Joined: Sun, 7. May 06, 03:53
Hey Cy is it at all possible to some how adapt this GUI thing of yourse to handel Audio basically the same way but dump the visual stuff? (to allow it to play random com traffic) and use a file say set in your X3/soundtrack/radio folder (or something similar that we could set with in the program/interface its self?
Teladi Next Minute Shipping®
-
- Posts: 683
- Joined: Fri, 17. Feb 06, 20:54
That would RULE to have proper comm traffic. Provided the interface lets you adjust the volume, as there'd be times when you're happy to have it loud, when you're just crossing a system to get from one gate to another, and times when you'd want it low(or even off), when you're dealing with factory management or reading through BBS messages.defiant1 wrote:Hey Cy is it at all possible to some how adapt this GUI thing of yourse to handel Audio basically the same way but dump the visual stuff? (to allow it to play random com traffic) and use a file say set in your X3/soundtrack/radio folder (or something similar that we could set with in the program/interface its self?
Ideally, it'd be good if the traffic were a little sporadic(so there are plenty of gaps), so that then the occasional mission-based comm message might cut across it, telling you for instance, that Kha'ak/Xenon ships have been sighted in sector x(in tandem with a script spawning them) or whatever.
*Ahem* Anyway, onto the subject of bugs/compatability and such.
Well, Cycrow, I think I'm running the latest version (0.8 ) but I'm not really sure how to tell. I tried right-clicking on the .exe file and choosing "properties" to see if this would tell me a version number, but it doesn't unfortunately.

Any other way I can tell, or should I just DL from this thread again? If I do that, is it safe to install the .zip's contents straight over the those already on my PC?
As for how many example scripts I checked... well, I confess I didn't do all of them - just two. That is my bad, but the simple reason is that I have the slowest hard drive in the Western Hemisphere, and loading a saved game on my machine takes longer than a Bavarian opera(or at least it feels that way), and thus I didn't have the enthusiasm for repeating the process again and again, having seen it crash twice.
But that I do confess is my own failing and lack of patience.
Arduous though it may well prove, I shall plug in the current version(assuming mine's not), and try out all the examples today.