[BETA] Custom Gui V0.8 - Update: 23/08/2007

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20543
Joined: Mon, 15. Nov 04, 00:26

[BETA] Custom Gui V0.8 - Update: 23/08/2007

Post by Cycrow » Tue, 31. Jul 07, 14:30

This is a fully customizable Direct3D Overlay for the game that is controlled via included scripts.

:arrow: Introduction

Displays can either be a fixed message, or a completly custom GUI created by an external script

There are various examples include on how to create the external scripts as well as using them in the game and sending varibles to them

:arrow: Downloading and Using

:arrow: Download Site 1
:arrow: Download Site 2
:arrow: Download Site 3

To use it, simply extract the files to the X3 directory. Most of the files are found in the Overlay directory, this includes sprites, textures, sounds and external scripts.

The includes exe, X3_Gui.exe is what you need to run instead of the normal X3.exe. This allows hooking the Direct3D DLL to use the Custom Gui.

:arrow: Screen Shot

http://homepage.ntlworld.com/cycrow/addons/gui/gui.jpg

:arrow: Features
  • Allows creation of Custom Dialog to overlay the game
  • Includes Animated Sprites
  • Fully Programmable Custom Dialogs
  • Ability to get variables from the game to setup the GUI
  • Includes Time-Based animation sequences for each object
  • Can display text, textures and sprites
  • Includes playing of sound files at set times, both wav and mp3
  • Fully Customisable Gui Border
  • Capture and control the mouse
  • Can close on mouse click
  • Move Over Event to change gui when highlighted
  • Allows playing of external sound and voice files directly from scripts
  • Can play full videos in the GUI Window
  • Includes Cut Scene mode for playing of full screen videos
:arrow: Sprites

Sprites are a custom file (stx) that allows for animated textures.

To create stx files, use the SpriteCreator program

:arrow: Examples

Example1: Basic display, same as the screen shot, shows text and a texture
Example2: Shows no border, and use of animated sprites
Example3: Shows how to use a custom border, and varibles
Example4: Shows animation sequences
Example5: Shows the new animation sequences for sprites, using sounds and Close Events.
Example6: Menu System, shows use of mouse cursor and the MouseOver event
Example7: Menu System, shows functions, OnClick event, and script callbacks
Last edited by Cycrow on Tue, 15. Jan 08, 16:36, edited 11 times in total.

User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53

Post by defiant1 » Tue, 31. Jul 07, 14:46

CY check PM...sent u one related to this
Teladi Next Minute Shipping®

User avatar
Diskun
Posts: 33
Joined: Sun, 15. Jul 07, 19:15

Post by Diskun » Tue, 31. Jul 07, 14:49

Holy cow! This is an awesome innovation!
I'm interested in custom overlay GUI design too. Send me a PM if you want a tester and translator :P

Greets
Image

User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53

Post by defiant1 » Tue, 31. Jul 07, 14:52

same...and i will have another way of putting it through the gauntlet...hehehe
Teladi Next Minute Shipping®

User avatar
dragonsblade71uk
Posts: 236
Joined: Sat, 8. Jul 06, 00:01

Post by dragonsblade71uk » Tue, 31. Jul 07, 15:35

Man looks like someone might get EGOSOFT to hire him for the next version.
Definately some great work here!
GO go Cycrow!

sphr
Posts: 119
Joined: Tue, 15. Aug 06, 17:16

Post by sphr » Tue, 31. Jul 07, 15:51

hmmm... did you do this by creating a directx surface and bind it as a child over the x3 game surface? any input or performance issues?

perhaps could open up a whole new realm of possibilities.... e.g. work around the limited ui currently in the game :)

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20543
Joined: Mon, 15. Nov 04, 00:26

Post by Cycrow » Tue, 31. Jul 07, 15:55

i did it by hooking the directx dll and adding to the rendering cycle to render on top of the current display.

then it jsut uses ingame scripts to control whats displays on the gui

im currently working on making it fully customizable so you can design the display how you want.

it also hooks directinput so you can get key presses as well

sphr
Posts: 119
Joined: Tue, 15. Aug 06, 17:16

Post by sphr » Tue, 31. Jul 07, 16:44

Cycrow wrote: it also hooks directinput so you can get key presses as well
ahhh.. possibilities.... :)

User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53

Post by defiant1 » Tue, 31. Jul 07, 17:06

and lots of em....and now i see even more...hehe
Teladi Next Minute Shipping®

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15

Post by B-O'F » Tue, 31. Jul 07, 17:27

Hi Cycrow,

Sounds as though it could be useful....


The above is probably one of the greatest understatements ever......

Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

User avatar
ninjitsumonk
Posts: 1309
Joined: Thu, 1. Mar 07, 10:21

Post by ninjitsumonk » Tue, 31. Jul 07, 19:54

I think I'm in love..... With the gui of course :P
WOW! Can't wait to see this in full! I'd gladly help test! Pm me or whatever with a link.
You rule cycrow!

Bunny
Posts: 1138
Joined: Mon, 1. Dec 03, 20:44

Post by Bunny » Tue, 31. Jul 07, 21:03

It's official

Cycrow frightens me :o

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20543
Joined: Mon, 15. Nov 04, 00:26

Post by Cycrow » Tue, 31. Jul 07, 23:27

ok, i have a first test for you all to play with

http://x3.ircwhore.co.uk/Gui.rar

Files Include
Direct3d-Hook.dll - Main dll file to control the gui
X3_Gui.exe - The launcher application, it hooks the dll and launches x3
scripts/plugin.plugman.displaymessage.xml - script to display a message, has heading and main text as well as the size of the gui to display.
scripts/plugin.plugman.displaycustom.xml - displays a custom gui, reads a text file with settings in
scripts/example.showgui1.xml - First example to show a custom gui
scripts/example.showgui2.xml - displays the 2nd custom gui
Overlay/border.png - The border gfx
Overlay/face.png - Texture file used for first example
Overlay/explosion.stx - Sprite file used for 2nd example
Overlay/customgui1.txt - scripts for first gui display
Overlay/customgui2.txt - scripts for second gui display
Overlay/spriteCreator.exe - Program to create stx files for animated textures

========================

The custom displays requires a script file that lays out the display. You can add text, textures or sprites into the display, you can use the whole screen or just part it, it will automatically center to the screen.

Sprites are a custom file (stx) that allows for animated textures.

To create stx files, use the SpriteCreator program

eladan
Posts: 5317
Joined: Sat, 7. Jan 06, 17:01

Post by eladan » Wed, 1. Aug 07, 04:07

This has to be your best innovation yet, Cycrow. <shakes head> You continue to astound me with what you manage to come up with. 8)
dragonsblade71uk wrote:Man looks like someone might get EGOSOFT to hire him for the next version.
I find I've got mixed feelings on this... Iit would be great for Cycrow, and would benefit the X games, and from that point of view I hope it happens. But there's a small selfish part of me that says that he wouldn't be given the creative freedom he has now if he's part of ES, and also, he wouldn't be able to be part of the modding community anymore, which would be a huge loss.

sphr
Posts: 119
Joined: Tue, 15. Aug 06, 17:16

Post by sphr » Wed, 1. Aug 07, 04:59

@Cycrow, don't mind if I ask some more questions... please correct me if I'm wrong

1) Currently, it is mostly a statically templated GUI, meaning that the number of "UI components" is fixed in each GUI set but can switch between them, though each "component" can be dynamically driven by script. E.g. say you set a "text area" component, I can change the content of the text area dynamically, but I can't say create 3 text areas this time and 5 text areas the next time.

2) Is it possible to use that as a secondary command menu (launched after a command slot is invoked) that displays a secondary menu system using this? menu data can be script driven (e.g. putting things in an input Array in particular order) and menu input handling can also be script handled (e.g. returns a number representing which item is chosen, and let script decides what it does).

If 2) is not directly possible due to need to hardcode script calls (or is there a script command that can call a generic script specified by string variable and generic input variables?), would it be more possible if say I create a hard-coded dispatcher that takes in a string_script, value1, value2, ....,
and internally dispatches it to stuff like

Code: Select all

if $string_script == "!move.whatever" 
  $result = call script "!move.whatever": arg1=value1
  return $result
else if $string_script == "!move.somwherer" 
  $result = call script "!move.somewhere" : arg1=value1, arg2=value2
  return $result
else
...
so that the "menu" handler can be data-driven by just setting the generic string and values.

If this is feasible, we may have found a real way to get around the Command Slot shortage problem.

Post Reply

Return to “X³: Reunion - Scripts and Modding”