User Interface Modding - Anyone looked at?

Discussion in 'User Interface and HUD Modding' started by Slothman, Feb 24, 2012.

  1. Petri

    Petri Registered

    Joined:
    Jul 20, 2012
    Messages:
    13
    Likes Received:
    0
    I'll like to make own UI, but I cannot find any tutorial to make it. So can somebody help to find some tutorial, please! :)
     
  2. Miro

    Miro Registered

    Joined:
    Jul 14, 2012
    Messages:
    1,356
    Likes Received:
    109
    WIP

     
  3. Prodigy

    Prodigy Registered

    Joined:
    Nov 2, 2012
    Messages:
    949
    Likes Received:
    64
    Nice progress Mrsl!

    How do you guys edit the UI in dev mode?

    I know how to edit simple backgrounds from original RF2 UI, the one with three .mas files and repackage it to work with the game, but how to load it in dev mode and edit?
     
  4. Miro

    Miro Registered

    Joined:
    Jul 14, 2012
    Messages:
    1,356
    Likes Received:
    109
    ..Documents/rFactor2/ModDev/Options/MODMode/....

    There you have the UI files. To edit the UI you can change the sounds/pics etc. and all the other stuff is in the UI.OSC
    When you have what you want repackage and off you go.

    But I would suggest you to use the UI.osc and the .mas files from the SP mode as there are slight differences to the UI in ModMode.

    The UI pages in the UI.OSC are defined with such stuff for example:

    Page="RF2_MAIN"

    First yo have some options for the page it self like:

    Pos-w-h=(0,0,1200,1024) //Position, width, height :)
    Name="RF2_MAIN" //name of the page
    Surface="rf2_Bk_main.bmp" //background

    The you have those "Gizmos" which basically define an object like buttons, sliders and stuff. Example:

    Gizmo="GENERIC_BUTTON_NORMAL"
    {
    Position=(122,892)
    AttributeSet="rf2_button_back arrow" //Attribute settings somewhere :p at the top of the UI.OSC
    Caption1="BACK"
    Justification="l"
    ToolTip="BACK"

    Actions="Release"
    {
    Run_Code="Go to Best Main Page"
    }


    Just search within the file all the stuff you have in the Gizmos and you'll find all you need.
    To add an example of the attribute settings used above.

    AttributeSet="rf2_button_back arrow"
    {
    Size=(195,55)
    Offset_Pair=(57,14)
    Offset_Pair=(179,41)
    Sound_Click="rf2_lrgbttn_click.wav"
    Sound_Focus="rf2_lrgbttn_rollover.wav"
    Font1="Euro EX White"
    Font2="Euro EX Orange"
    Font3="Euro EX Orange"
    Font4="Euro EX WHITE 50%"

    Frame="X"
    {
    Pos-w-h=(0,0,195,55)
    Surface="rf2_b_backarrow0000.tga"
    }

    Frame="X"
    {
    Pos-w-h=(0,0,195,55)
    Surface="rf2_b_backarrow0100.tga"
    }

    Frame="X"
    {
    Pos-w-h=(0,0,195,55)
    Surface="rf2_b_backarrow0200.tga"
    }

    Frame="X"
    {
    Pos-w-h=(0,0,195,55)
    Surface="rf2_b_backarrow0300.tga"
    }

    Frame="X"
    {
    Pos-w-h=(0,0,195,55)
    Surface="rf2_b_backarrow0400.tga"
    }
    }



    Fonts, attribute settings and stuff is at the top of the UI.OSC and then you have all the pages which are left in a small mess but I guess it was due to the workflow. (adding stuff later and so on....)
     
    Last edited by a moderator: Jan 11, 2014
  5. Prodigy

    Prodigy Registered

    Joined:
    Nov 2, 2012
    Messages:
    949
    Likes Received:
    64
    Thanks for the info man!

    I got it to work in dev mod and I'm understanding the coding, it's not that difficult when you get the connections, but man, there are over 19.000 lines in there :D

    Those "Frame X" attributes, are those for button animations?
    If so, it's just crazy.. You need to edit 5 pictures to get simple zoom animation..
     
  6. Miro

    Miro Registered

    Joined:
    Jul 14, 2012
    Messages:
    1,356
    Likes Received:
    109
    Yes :)

    IMO the code is solid as hell and the UI is actually very fast.
    The only thing that takes time is loading the track and showroom.

    But the downside is it is a bit too "old/simple" all together.
     
  7. Prodigy

    Prodigy Registered

    Joined:
    Nov 2, 2012
    Messages:
    949
    Likes Received:
    64
    Just to be sure, is this how the MODMode shoud look like?

    http://i.imgur.com/BupsZcM.jpg

    I have just overwritted the OSC file from SP (extracted from UImaps.mas) and added those 3 .mas files, it works in dev mod, but if I want to edit any of the pictures from the .mas files, do I need to unpack, edit, repack and overwrite UImaps every time, or is there a simpler way, like extract all the files from UImaps in the MODmode folder and edit like that?
     
  8. Miro

    Miro Registered

    Joined:
    Jul 14, 2012
    Messages:
    1,356
    Likes Received:
    109
    Yes, I have just extracted the mass files in to the folder so I don't need to use the MAS2 tool for every single change.
    You can just drop in the files (pics/sounds) you need.
     
  9. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    looks cool, any luck in adding PLR entries? Mainly to save the hassle of editing the PLR directly all the time, my vision would be additional areas in the UI for "Advanced Setup" or something that incorporates all the PLR (or most used) and then saves on the fly, so no need to exit the game - change a setting in the PLR - save it - enter the game x10000 !!
     
  10. Miro

    Miro Registered

    Joined:
    Jul 14, 2012
    Messages:
    1,356
    Likes Received:
    109
  11. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    That's a shame :(

    Good luck if you can figure it all out by yourself!
     
  12. FuNK!

    FuNK! Registered

    Joined:
    May 26, 2013
    Messages:
    626
    Likes Received:
    491
    May I ask how you get rid of the default ISI buttons?
    You may saw my post on page two, where I pointed out I wasn't able to remove one of them. Here is the screen again:
    http://abload.de/img/130927_2309cds0z.jpg
     
  13. Miro

    Miro Registered

    Joined:
    Jul 14, 2012
    Messages:
    1,356
    Likes Received:
    109
    Just comment them out or delete them if you don't need them anymore.
     
  14. FuNK!

    FuNK! Registered

    Joined:
    May 26, 2013
    Messages:
    626
    Likes Received:
    491
    Hm...I've changed everything and commented out everything imaginable...but unfortunately only two things happen: one time the little icon appears (like in the screenshot) and second time the whole button disappears :( But the button is needed (at least for my UI design) ;)

    You do have the track button within your UI too, but you don't have this icon. So I guess I just didn't found the right element/gizmo to disable it. Any suggestions?
     
  15. Miro

    Miro Registered

    Joined:
    Jul 14, 2012
    Messages:
    1,356
    Likes Received:
    109
    That'S how it looks on my side.


    //page

    Page="RF2_MAIN"

    //Track button, although I think (AttributeSet="rf2_button_main") it is called but you can just search for Do_Page="RF2_TRACK" and it should be somewhere on the line 13000. Mine is meanwhile on line 14400 so you have to search a bit.

    Gizmo="GENERIC_BUTTON_NORMAL"
    {
    Position=(2090,353)
    AttributeSet="rf2_button_Track"
    Justification="l"

    Actions="Release"
    {
    Do_Page="RF2_TRACK"
    }
    }


    EDIT:
    Not sure if I understand you correctly. However I've used the DevMode main page as template for the main page only, everything else is from the SP UI.osc. As it was a bit less work after all.

    EDIT 2:
    Or you can do just what I did and create your own buttons with own attribute settings.
     
    Last edited by a moderator: Jan 18, 2014
  16. FuNK!

    FuNK! Registered

    Joined:
    May 26, 2013
    Messages:
    626
    Likes Received:
    491
    Thank you for the hints. Will try this later ;)

    Using the mod-mode main UI could be the solution...the buttons seem to be hardcoded for the SP UI so you aren't able to fully get rid of them ;)
    To use the own button-sets won't be a solution as one have to use the same name-conventions (or am I wrong?). Using the same name will end in rF2 render the "default" buttons to my new buttons again. Anyway I will try using the mod-mode button names. This should be the solution - at least I hope this works with the SP!?
     
  17. Miro

    Miro Registered

    Joined:
    Jul 14, 2012
    Messages:
    1,356
    Likes Received:
    109
    I think you can remove everything you want. You just have to know what you are editing.

    Take a look at post #43.

    Or for example this here:

    Gizmo="GENERIC_BUTTON_NORMAL"
    {
    Position=(2090,353)
    AttributeSet="rf2_button_Track"
    Justification="l"

    Actions="Release"
    {
    Do_Page="RF2_TRACK"
    }
    }

    // Above you have this line: AttributeSet="rf2_button_Track"
    // Then you can create your own attribute settings (you can find more examples somewhere on the top of the
    // UI.osc) like here:

    AttributeSet="rf2_button_Track"
    {
    Size=(195,55)
    Offset_Pair=(57,14)
    Offset_Pair=(179,41)
    Sound_Click="rf2_lrgbttn_click.wav"
    Sound_Focus="rf2_lrgbttn_rollover.wav"
    Font1="Euro EX White"
    Font2="Euro EX Orange"
    Font3="Euro EX Orange"
    Font4="Euro EX WHITE 50%"

    Frame="X"
    {
    Pos-w-h=(0,0,195,55)
    Surface="rf2_b_track0000.tga" //these are the pics or icons you use for your "Gizmo"
    }

    Frame="X"
    {
    Pos-w-h=(0,0,195,55)
    Surface="rf2_b_track0100.tga"
    }

    Frame="X"
    {
    Pos-w-h=(0,0,195,55)
    Surface="rf2_b_track0200.tga"
    }

    Frame="X"
    {
    Pos-w-h=(0,0,195,55)
    Surface="rf2_b_track0300.tga"
    }

    Frame="X"
    {
    Pos-w-h=(0,0,195,55)
    Surface="rf2_b_track0400.tga"
    }
    }



    Hope this helps, otherwise just PM me.
     
  18. FuNK!

    FuNK! Registered

    Joined:
    May 26, 2013
    Messages:
    626
    Likes Received:
    491
    We'll see :D Thank you for the offer! Maybe I will come back to that later (then I can write in German...guess this will be more understandable then XD)
     
  19. Aslambek

    Aslambek Registered

    Joined:
    Sep 7, 2013
    Messages:
    19
    Likes Received:
    1
    Tell me please,
    Make a new UI.....can't understand where to put it and how to write in UI.osc to play in the games menu my music (

    How to add my own music in the UI ?!
     
  20. Aslambek

    Aslambek Registered

    Joined:
    Sep 7, 2013
    Messages:
    19
    Likes Received:
    1
    Guys, on my question.
    This is not implemented yet in rFactor2 ?! ( music menu )
     

Share This Page