Editing UI Elements
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Editing UI Elements
I'm wanting to edit some UI elements (menu headers). I have no idea where to start or what to really even look for. Any help would be greatly appreciated.
Trying to edit Mayhem's new 'job' ui so that jobs only have 1 header instead of each individually.
https://www.dropbox.com/s/l24d8f7v64n3q ... I.png?dl=0
Would very much appreciate some guidance. Next step is to hopefully edit the new DA's to quit being stupid
Trying to edit Mayhem's new 'job' ui so that jobs only have 1 header instead of each individually.
https://www.dropbox.com/s/l24d8f7v64n3q ... I.png?dl=0
Would very much appreciate some guidance. Next step is to hopefully edit the new DA's to quit being stupid
Pretty sure I've managed to find the correct 'line'. But I'm unsure of which element is dictating which one determines how the data is listed. Namely why each job is listed with a separate header... No idea what I'm doing here.
Managed to find the file and what I think is the correct 'string?' Forfeit! again tomorrow... Guess I'll actually go play for now!
Managed to find the file and what I think is the correct 'string?' Forfeit! again tomorrow... Guess I'll actually go play for now!
<line linenr="031" indent=" ">
<var>$jobs</var>
<text> </text>
<text>=</text>
<text> </text>
<text>table</text>
<text> </text>
<text>get</text>
<text> </text>
<var>$logistics</var>
<text> </text>
<text>(</text>
<text> </text>
<text>'jobs'</text>
<text> </text>
<text>)</text>
</line>
<line linenr="032" indent=" ">
<comment>* Collect data to sort the array.</comment>
</line>
--
Not sure the appropriate format for linking this but I'm pretty sure this is what determines how it's sorted? Any insight would be appreciated.
<var>$jobs</var>
<text> </text>
<text>=</text>
<text> </text>
<text>table</text>
<text> </text>
<text>get</text>
<text> </text>
<var>$logistics</var>
<text> </text>
<text>(</text>
<text> </text>
<text>'jobs'</text>
<text> </text>
<text>)</text>
</line>
<line linenr="032" indent=" ">
<comment>* Collect data to sort the array.</comment>
</line>
--
Not sure the appropriate format for linking this but I'm pretty sure this is what determines how it's sorted? Any insight would be appreciated.
- X2-Illuminatus
- Moderator (Deutsch)
- Posts: 24950
- Joined: Sun, 2. Apr 06, 16:38
First of all, you cannot edit X3 scripts in an ordinary text or xml editor. The somewhat readable part at the top of the script file (everything between the <sourcetext></sourcetext> tags) is only responsible for displaying the script in your browser. Doubleclicking an xml script file within the "scripts" folder, or any other folder where the x2script.xsl is present, will open a readable view of that script in your browser. If you want to reference or ask about about specific code snippets, copy the relevant part of this view into bbcode code-tags in your post. The actual script code, however, is listed between the <codearray></codearray> tags.
To edit a script you either need to use the ingame Script Editor or a specialised external Script Editor like X-Studio by mr.bear. (If you haven't worked with MSCI scripts/the Script Editor before, you may want to read the MSCI manual.)
As for your headline issue, you need to find the script which is creating the menu in question. The line you're looking for is "add custom menu heading to array <Value>: text=<Var/String>" which adds a heading text defined in "text=<Var/String>" to the menu specified in "<Value>". See also this tutorial on creating custom menus in X3TC/AP.
To edit a script you either need to use the ingame Script Editor or a specialised external Script Editor like X-Studio by mr.bear. (If you haven't worked with MSCI scripts/the Script Editor before, you may want to read the MSCI manual.)
As for your headline issue, you need to find the script which is creating the menu in question. The line you're looking for is "add custom menu heading to array <Value>: text=<Var/String>" which adds a heading text defined in "text=<Var/String>" to the menu specified in "<Value>". See also this tutorial on creating custom menus in X3TC/AP.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
So slightly more progress, Seems I've possibly found the lines (probably not).
https://www.dropbox.com/s/cc8bymizseegg ... b.png?dl=0
I'm fairly positive this is the dynamic menu. But from what I could understand it should be labeled with dynamic in it? Not sure. Maybe there's a reference to make it dynamic that I'm not seeing.
https://www.dropbox.com/s/ai8ki58rg1y1e ... y.png?dl=0
Seeing *collect data to sort array* makes me think this is the dynamic line? If I'm understanding how this works correctly.
I also haven't been able to find $logistics or $jobs. Seems like that's something else other than a script? Is it just a internal reference?
TL;DR : Pretty sure I've found the line but don't see whats making it create individual headers.
https://www.dropbox.com/s/cc8bymizseegg ... b.png?dl=0
I'm fairly positive this is the dynamic menu. But from what I could understand it should be labeled with dynamic in it? Not sure. Maybe there's a reference to make it dynamic that I'm not seeing.
https://www.dropbox.com/s/ai8ki58rg1y1e ... y.png?dl=0
Seeing *collect data to sort array* makes me think this is the dynamic line? If I'm understanding how this works correctly.
I also haven't been able to find $logistics or $jobs. Seems like that's something else other than a script? Is it just a internal reference?
TL;DR : Pretty sure I've found the line but don't see whats making it create individual headers.
...
Menu.DWM.Get.Logistics.Jobs, line 98
replace by:
Menu.DWM.Get.Logistics.Jobs, line 98
Code: Select all
add custom menu heading to array $menu: title=$t
Code: Select all
add non selectable menu item: $menu, text=$t
So your suggestion wasn't quite what I was trying to do. But after some more 'figuring' it's this simple. DELETE line 108.
https://www.dropbox.com/s/8g2fdfjf81tyh ... 1.png?dl=0
It's so clean! Thanks for all the help! Lock thread?
Edit. I'm guessing this means that all lines below 108 to the 'end' are now junk (for my game) probably should delete them as well?
https://www.dropbox.com/s/8g2fdfjf81tyh ... 1.png?dl=0
It's so clean! Thanks for all the help! Lock thread?
Edit. I'm guessing this means that all lines below 108 to the 'end' are now junk (for my game) probably should delete them as well?