Author Topic: Removing the UI?  (Read 1309 times)

0 Members and 1 Guest are viewing this topic.

Offline MrSt3fan

  • Donator
  • *
  • Posts: 6364
    • View Profile
  • Nick: 33rd_Col_MrSt3fan
  • Side: Neutral
Removing the UI?
« on: June 19, 2014, 12:32:24 am »
Is there any way to completely remove the UI? Got a friend who wants to make some cinematic videos for NW

Offline Grozni

  • Second Lieutenant
  • *
  • Posts: 308
    • View Profile
  • Nick: RRA_10thRH_SoH_Grozni
  • Side: Neutral
Re: Removing the UI?
« Reply #1 on: June 19, 2014, 01:16:19 am »
Without coding your best bet is to use openBRF to somehow hide UI, for example replace all UI textures with blank transparent images.

You will find a lot of UI textures you want to hide in /CommonRes/core_materials.brf


Offline MrSt3fan

  • Donator
  • *
  • Posts: 6364
    • View Profile
  • Nick: 33rd_Col_MrSt3fan
  • Side: Neutral
Re: Removing the UI?
« Reply #2 on: June 20, 2014, 12:05:19 am »
Alright I'll give it a try, thanks for the help! :)

Offline Parrot

  • Donator
  • *
  • Posts: 762
  • Lieutenant Colonel - Equestrian Foreign Legion
    • View Profile
    • EQFL Homepage
  • Nick: ExParrot
  • Side: Neutral
Re: Removing the UI?
« Reply #3 on: June 20, 2014, 12:33:51 am »
I made some in the past. I did that by replacing ui textures with transparent ones (as Grozni suggested) and using the options menu to disable other things like unit flags and the crosshair. However, the one problem I always encountered was the chat; messages showed up when giving orders to bots, in certain modes the timer will be present in the corner, and you won't be able to remove the ammo count and "ready" dot for weapons.

The easiest way to remove those is to crop the footage when editing it. And if you're filing with bots where you need to give commands (in custom battle) factor in the time it takes for the chat message to disappear and when the bots will be on screen.
Check out mods I've worked on: Blood and Iron: Age of Imperialism, and North and South!

Offline DanyEle

  • FSE Associate
  • ***
  • Posts: 517
  • Sssh! I'm coding, don't disturb :D
    • View Profile
  • Nick: DanyEle
  • Side: Confederacy
Re: Removing the UI?
« Reply #4 on: June 20, 2014, 11:21:28 pm »
Unfortunately, the health bar and and the main GUI elements are hardcoded and there's no way to remove them via the code. So your only option would be using a transparent texture to cover them. Most other meshes can easily be hidden via setting a "0" mesh in module_meshes though. Also if you'd like to hide the chat, you can either mute the players by the in-game menu or a more fun way is via the Module System. You can create a script that is triggered on player_joined if you're working server-sidely or looped every 10 seconds on your client. If you chose to do it server-side, you'd have to type something like

(player_set_is_muted, ":player_id", 1),

And all the players would get muted once they join the server. Or, client-sidely you'd have to run a loop through all players every X seconds (We're just looping since new players could be joining, and they wouldnt get muted if you just did it once) and mute them all. So something like

Code
multiplayer_server_st3fan_mute_players  = 10, 0, 0, [(multiplayer_is_server),],
  [   
  (try_for_range, ":all_players_ids", 1, multiplayer_player_loops_end),
        (player_is_active, ":all_players_ids"),
        (player_set_is_muted, ":all_players_ids", 1),
 (try_end),

  ])

Then all you've got to do is append the trigger's name to the list of triggers run on your client (CTRL + F for #mm), compile and finally you'll get rid of players' chat.
« Last Edit: June 30, 2014, 06:54:25 pm by DanyEle »