Page 1 of 4

In-game HUD settings mixup with <custom_ui>, script, XML-RPC

Posted: 25 Jul 2014, 21:17
by undef.de
As longer as i working on my controller, i think about the mixup how to setup the in-game hud in TM²:

With the <custom_ui> block we can turn on/off some of the in-game Panels/Widgets, but it seems that some of the settings takes no effects or some of the in-game Panels has been already removed:

Code: Select all

<custom_ui>
  <global visible="true"/>              // Works for all working settings below
  <challenge_info visible="true"/>      // Works
  <chat visible="true"/>                // Works
  <scoretable visible="true"/>          // Works
  <notice visible="true"/>              // No effect, because this messages are removed(?)
  <net_infos visible="true"/>           // No effect
  <checkpoint_list visible="true"/>     // No effect
  <round_scores visible="true"/>        // No effect -> UI_DisplaySmallScoresTable
</custom_ui>
With the XML-RPC Method UI_DisplaySmallScoresTable we can setup the <round_scores> of a <custom_ui> block.

With the script setting S_DisplayTimeDiff we can setup the TimeGap-Panel on a checkpoint.

------------------------------

So in my eyes it would be nice to change all of these to be changed only by a 'SetModeScriptSettings' call.

I already have wished something like this at New options for TM² UI.Script.txt, Options for MultilapLayer, Option for "RankingLayer" in Score in TM² Titles and WarmUp.Script.txt new options/possibilities.

That would clean-up the current mixup and gives us the controll over the HUD.

Please nadeo think about this. :thx:

Re: In-game HUD settings mixup with <custom_ui>, script, XML

Posted: 18 Sep 2014, 09:23
by Eole
I pushed an update on the Test branch of the repository that should ease the control on the UI. The files are available here (you can download the whole branch to be sure to have all necessary files).

I wrote a quick documentation explaining how the new methods and callbacks work. Basically you have access to a new XmlRpc method "UI_SetProperties" that take an XML string as parameter. This XML contains the visibility and position of the various UI elements of Trackmania. Almost all of them can be shown/hidden and some can be moved. It only work for TM now, but I'll adapt it to Shootmania later.

Example :

Code: Select all

<ui_properties>
  <map_info visible="true" />
  <opponents_info visible="true" />
  <chat visible="true" offset="0. 0." linecount="20" />
  <checkpoint_list visible="true" pos="0. 0. 0." />
  <round_scores visible="true" pos="0. 0. 0." />
  <countdown visible="true" />
  <go visible="true" />
  <chrono visible="true" pos="0. 0. 0." />
  <speed_and_dist visible="true" />
  <personnal_best_and_rank visible="true" pos="0. 0. 0." />
  <position visible="true" />
  <checkpoint_time visible="true" pos="0. 0. 0." />
  <chat_avatar visible="true" />
  <warmup visible="true" pos="0. 0. 0." />
</ui_properties>

Re: In-game HUD settings mixup with <custom_ui>, script, XML

Posted: 18 Sep 2014, 10:19
by Eole
Small update adding control over the warm-up UI.

Re: In-game HUD settings mixup with <custom_ui>, script, XML

Posted: 18 Sep 2014, 11:25
by spaii
Nice :thumbsup:

BTW, is there a solution to disable ladder ranking at podium ? (at top center of screen)

Image

Re: In-game HUD settings mixup with <custom_ui>, script, XML

Posted: 18 Sep 2014, 12:59
by Eole
Not right now, but as soon as it will be possible to do it, I'll add it. Same thing for the multilap UI displaying the number of turns.

Re: In-game HUD settings mixup with <custom_ui>, script, XML

Posted: 18 Sep 2014, 14:14
by spaii
Ok, thx a lot :thumbsup:

Re: In-game HUD settings mixup with <custom_ui>, script, XML

Posted: 18 Sep 2014, 16:53
by undef.de
Eole wrote: Example :

Code: Select all

<ui_properties>
  <personnal_best_and_rank visible="true" pos="0. 0. 0." />
</ui_properties>
Possible typo: <personnal_best_and_rank> instead of <personal_best_and_rank>? Same in the UI documentation.

For what exactly is the <opponents_info>? Missing the description for that option. ;)

Thanks for this and for adding the others things like <chat_avatar>, <chrono>, <go>...! I love the new possibilities. :yes: Going right now to test them. =)

Re: In-game HUD settings mixup with <custom_ui>, script, XML

Posted: 18 Sep 2014, 17:23
by undef.de
This seems to not work for me, the 3...2...1...GO! animation is always visible:

Code: Select all

<go visible="false" />
All others works fine. :thx:


I've taken the default values for every attribute from the Scripts. Eole, feel free to add them to the documentation:

Code: Select all

<ui_properties>
	<map_info visible="true" />
	<opponents_info visible="true" />
	<chat visible="true" offset="0. 0." linecount="7" />
	<checkpoint_list visible="true" pos="40. -90. 5." />
	<round_scores visible="true" pos="104. 14. 5." />
	<countdown visible="true" />
	<go visible="true" />
	<chrono visible="true" pos="0. -80. 5." />
	<speed_and_dist visible="true" />
	<personnal_best_and_rank visible="true" pos="158. -61. 5." />
	<position visible="true" />
	<checkpoint_time visible="true" pos="-8. 31.8 -10." />
	<chat_avatar visible="true" />
	<warmup visible="true" pos="170. 27. 0." />
</ui_properties>
I personaly dislike things like <speed_and_dist>, i prefer the longer <speed_and_distance>. But thats only my humble opinion. ;)

Re: In-game HUD settings mixup with <custom_ui>, script, XML

Posted: 18 Sep 2014, 18:38
by oliverde8
Thanks a lot, this is great :thumbsup:

Re: In-game HUD settings mixup with <custom_ui>, script, XML

Posted: 18 Sep 2014, 19:05
by Suma
:o coool stuff :clap:

... could you please add also pos to <speed_and_dist visible="true" /> ?

It would be extremely usefull for fast but not yet FS TM, where time is often too short to move the eyes to the right corner of the screen.
At least for old men^^