EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
UI modding - support thread
Post new topic Reply to topic Goto page 1, 2, 3 ... 13, 14, 15  Next
View previous topic :: View next topic
Author Message
stefanEgo
EGOSOFT
EGOSOFT



Joined: 11 Apr 2013
Posts: 442 on topic

Thank you for registering your game
modified
PostPosted: Fri, 20. Feb 15, 02:21    Post subject: UI modding - support thread Reply with quote Print

This thread serves as the support thread for questions/issues you might have when modifying the UI.

Before you post anything here, it might be useful to:
- check out the UI modding documentation ( https://www.egosoft.com:8444/confluence/display/XRWIKI/UI+Modding+support )
- check out the X Rebirth Wiki ( https://www.egosoft.com:8444/confluence/display/XRWIKI/X+Rebirth+Wiki )
- check whether your issue is already reported in the bugtracker ( https://www.egosoft.com:8443/jira/browse/XRUIMOD/?selectedTab=com.atlassian.jira.jira-projects-plugin:issues-panel )
- check whether your issue/question was already answered in this thread or forum

If you still can't find any help with your bug/question, feel free to create a new issue on the bugtracker and/or post in this thread.

Some shortcuts for certain overviews of issues in the bugtracker:
UI Modding changelog: https://www.egosoft.com:8443/jira/browse/XRUIMOD/?selectedTab=com.atlassian.jira.jira-projects-plugin:changelog-panel
planned (but not yet confirmed!) changes for upcoming version(s): https://www.egosoft.com:8443/jira/browse/XRUIMOD/?selectedTab=com.atlassian.jira.jira-projects-plugin:roadmap-panel
direct link to issue list of unresolved/unreleased fixes/changes: https://www.egosoft.com:8443/jira/issues/?jql=project%20%3D%20XRUIMOD%20AND%20%28fixVersion%20in%20unreleasedVersions%28%29%20OR%20fixVersion%20is%20EMPTY%29%20ORDER%20BY%20priority%20DESC

Some shortcuts to certain pages in the Wiki system:
UI modding changelog: https://www.egosoft.com:8444/confluence/display/XRWIKI/Changelog


_________________
Stefan Hett, UI Engine Architect


Last edited by stefanEgo on Wed, 9. Sep 15, 10:25; edited 8 times in total
Back to top
View user's profile Send private message
YorrickVander





Joined: 29 Oct 2013
Posts: 2655 on topic
Location: The naughty corner
Thank you for registering your game
PostPosted: Fri, 20. Feb 15, 06:44    Post subject: Reply with quote Print

-hugs Egosoft team- Thanks very much!


_________________
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Back to top
View user's profile Send private message
BigBANGtheory





Joined: 23 Oct 2005
Posts: 2340 on topic

Thank you for registering your game
PostPosted: Fri, 20. Feb 15, 09:55    Post subject: Reply with quote Print

Ah now we get to the gem feature behind v3.5, this could be the start of something special... nice one.

Stefan you said in your documentation post about certain UI modifications not being possible atm. Could you please give us an example or two of what is not possible?

Back to top
View user's profile Send private message
stefanEgo
EGOSOFT
EGOSOFT



Joined: 11 Apr 2013
Posts: 442 on topic

Thank you for registering your game
PostPosted: Fri, 20. Feb 15, 10:54    Post subject: Reply with quote Print

@BigBANGtheory: I assume you are referring to this section of the documentation "Certain things are, unfortunately, out of the scope of what we can make available to everybody, but whatever we can provide to the community with, we will make every effort to do so. ".
If so then it's merely meant as a general statement. There are different cases which we have to live with.
One reason being license issues. Like every other company out there we license other tools/frameworks/libraries/etc. While we always try to find products which won't limit us with regards to making things later available for the community, there are a few which unfortunately have a restriction put on us. In these cases we cannot, even if we would like to, directly open up these things to everybody. Still we are always trying to find ways around these limitations (one example where we did that on the UI side is the widget system which circumvents one of these legal restrictions).
Other things are safety and security considerations. In certain cases we therefore have to limit the functionality (disabled byte-code support in Lua is one example for this case).
A last example is to limit certain functionality, so to provide a minimal level of safety against bugs in one mod having a backfiring-effect on other mods. While this cannot be totally ensured, we at least designed the UI engine with that goal in mind and in some cases this causes restrictions (each mod having its distinct ui.xml-file and no direct file access from the UI level on files/content in other mods is an example here).

There are of cause further cases, but I guess these examples already draw a picture on what the statement above means.


_________________
Stefan Hett, UI Engine Architect
Back to top
View user's profile Send private message
BigBANGtheory





Joined: 23 Oct 2005
Posts: 2340 on topic

Thank you for registering your game
PostPosted: Fri, 20. Feb 15, 13:12    Post subject: Reply with quote Print

ok I see what you mean ty for the explanation. You've disabled bytecode to stop people writing potentially harmful code then yes that makes sense.

This might seem like a silly question and apologies in advance if I'm being premature here Embarassed Where does one get started with modding the UI e.g. how does XR's UI Engine work, do you need to learn LUA programming (if so which version), location of the LUA source scripts?

Back to top
View user's profile Send private message
stefanEgo
EGOSOFT
EGOSOFT



Joined: 11 Apr 2013
Posts: 442 on topic

Thank you for registering your game
PostPosted: Fri, 20. Feb 15, 13:14    Post subject: Reply with quote Print

@BigBANGtheory: The documentation is currently being worked on and part of it should be available later today. So stay tuned. Smile


_________________
Stefan Hett, UI Engine Architect
Back to top
View user's profile Send private message
YorrickVander





Joined: 29 Oct 2013
Posts: 2655 on topic
Location: The naughty corner
Thank you for registering your game
PostPosted: Fri, 20. Feb 15, 17:50    Post subject: Reply with quote Print

Stefan - you say in the documentation :

Quote:
debug/os/io libraries are not available


In 3.20 I successfully dumped ware names to a text file with a modified version of (the 2.51 since that was the last version to decompile with ljd) trade window. I haven't tested it again yet, but if that ability has been removed, is there a reason for it? It would open up some interesting options for 3rd party apps running out of game or in the steam browser.


_________________
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Back to top
View user's profile Send private message
wysiwyg





Joined: 26 Feb 2004
Posts: 584 on topic
Location: DeVries
Thank you for registering your game
PostPosted: Fri, 20. Feb 15, 21:10    Post subject: Reply with quote Print

I guess the downside of allowing uncontrolled file io access is that someone with bad intentions could write please-format-hdd.bat to the windows start folder! More likely some bad html or such. Either way it would need a mechanism to restrict it to safe use if allowed.

Back to top
View user's profile Send private message
stefanEgo
EGOSOFT
EGOSOFT



Joined: 11 Apr 2013
Posts: 442 on topic

Thank you for registering your game
PostPosted: Fri, 20. Feb 15, 21:42    Post subject: Reply with quote Print

@YorrickVander: More or less exactly what wysiwyg stated. Most of the functions available in these libraries are of security or stability concerns. Therefore these libraries are disabled. If you have a certain use case which you can't realize with the existing functionality, we will certainly consider supporting that by other (more secure) means.
For instance we provide a GetDate() function which is a 1-to-1-replacement for os.date() or TraceBack() which is a replacement for the disabled debug.traceback() function.

In case of dumping data: Via the savegame- and or userdata-storage you do actually have means to store anything into external files. The userdata is stored in the uidata.xml-file located in the user's personal directory (for instance: C:\Users\[username]\Egosoft\X Rebirth\[SteamUserID]). Does that work for ur requirement?


_________________
Stefan Hett, UI Engine Architect
Back to top
View user's profile Send private message
YorrickVander





Joined: 29 Oct 2013
Posts: 2655 on topic
Location: The naughty corner
Thank you for registering your game
PostPosted: Fri, 20. Feb 15, 21:49    Post subject: Reply with quote Print

Concern understood, and yeah that could work Smile Certainly better than the debug log parsing I was forced to use to get market data into sql previously (http://www.nexusmods.com/xrebirth/mods/339/? for anyone that remembers it, back when the economy really needed watching)


_________________
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Back to top
View user's profile Send private message
bm01





Joined: 22 Jul 2009
Posts: 417 on topic

Thank you for registering your game
PostPosted: Sat, 21. Feb 15, 05:19    Post subject: Reply with quote Print

Is there a way to use both detailmonitor and fullscreen (viewtypes)?
Unless I'm missing something, that's what I need if I want to add a button on the sidebar which opens a window.
I naively tried this:
Code:
<addons>
  <addon name="x" viewtype="detailmonitor">
    ...
  </addon>
  <addon name="x" viewtype="fullscreen">
    ...
  </addon>
</addons>

Obviously it didn't work.


_________________
Automated Emergency Jump - X Rebirth
Back to top
View user's profile Send private message
stefanEgo
EGOSOFT
EGOSOFT



Joined: 11 Apr 2013
Posts: 442 on topic

Thank you for registering your game
PostPosted: Sat, 21. Feb 15, 10:12    Post subject: Reply with quote Print

@bm01: There are two possibilities atm:
1. Create two separate addons (one in the fullscreen environment, one in the detailmonitor environment)
2. In the fullscreen environment create your own distinct window after you clicking on your button (see DisplayView() and related functions)

Unfortunately the support for cross-environment use-cases is somehow limited atm (especially with respect to working with a single addon set-up).

Feel free to add a feature request to the bugtracker, if you feel like the current support is too limited.


_________________
Stefan Hett, UI Engine Architect
Back to top
View user's profile Send private message
BigBANGtheory





Joined: 23 Oct 2005
Posts: 2340 on topic

Thank you for registering your game
PostPosted: Sun, 22. Feb 15, 13:27    Post subject: Reply with quote Print

Stefan if we were to provide a list of UI modding objectives/projects would you be prepared to glance through them and advise in your opinion which of those are realistic (as of v3.5beta) and those that are better served by a feature request in the bug tracker?

Back to top
View user's profile Send private message
blackmilan



MEDALMEDAL

Joined: 22 Jan 2011
Posts: 123 on topic

Thank you for registering your game
PostPosted: Sun, 22. Feb 15, 13:36    Post subject: Reply with quote Print

The top UI modders and the UI Engine Architect in one place. I think I like this thread, it seems to be the perfect place for a few questions. Very Happy

One thing that is currently not clear to me is how modifications of existing UI LUA scripts provided by Egosoft are handled now. Let's say I want to make some changes to the trade menu (ui/addons/menu_trading_offers.lua). Do I still use the method of putting my modified file into a subst.cat or is this now somehow done via the ui.xml file?
I am thinking about importing an existing UI file, overriding the functions I want to change and telling the UI that it should load the modified file instead of the original one.

@stefanEgo
Thanks for adding the UI modding support!

Back to top
View user's profile Send private message
wysiwyg





Joined: 26 Feb 2004
Posts: 584 on topic
Location: DeVries
Thank you for registering your game
PostPosted: Sun, 22. Feb 15, 14:34    Post subject: Reply with quote Print

blackmilan wrote:
One thing that is currently not clear to me is how modifications of existing UI LUA scripts provided by Egosoft are handled now. Let's say I want to make some changes to the trade menu (ui/addons/menu_trading_offers.lua). Do I still use the method of putting my modified file into a subst.cat or is this now somehow done via the ui.xml file?
I am thinking about importing an existing UI file, overriding the functions I want to change and telling the UI that it should load the modified file instead of the original one.

That's a really good question. I had managed to avoid the subst_xx.dat/cat files by making sure the mod's version of the ui.xml file had the correct path so that the game could find it e.g.
Code:
 ../../../extensions/my_mod/ui/addons/ego_xxxx/my_lua_file.lua

However the ui.xml was still a diff file so that add/replace could be used to replace vanilla files as I do with my money transfer dialog replacement. Keen to know if we can still use the diff method.

And +1 for the support as well Wink

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3 ... 13, 14, 15  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Tue, 18. Sep 18, 22:53

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.11328 seconds, sql queries = 29