1. Stuck or having problems creating your mod?
  2. GPU Fatal Error? Intel HD Graphics 620/630 Crashes? Help us solve them!
    Dismiss Notice

Skin Selector (v0.5)

Discussion in 'User Interface Apps' started by Incognito, Jun 30, 2014.

  1. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    This app lets you change the skin of vehicle in the game.

    How to use
    Download any skin, create a folder for this skin in <game_folder>\content\vehicles\<vehicle_name>\skins (if skins folder does not exist - create it) and copy the skin files to this folder.

    How to install
    1. Just extract the archive in <game_folder>\html\apps ;
    2. Add Skin selector app on the screen:
    [webm=]http://www.beamng.com/attachment.php?attachmentid=38670&d=1408386211[/webm]

    Example
    You need to install two skins: Pigeon-Crash-Test-Skin and Pigeon-Security-Skin for Pigeon.
    Download the archive of the first skin and extract it in <game_folder>\content\vehicles\pigeon\skins\Carsh Test Skin .
    Do the same thing with the second skin, but the file should be extracted to a different folder: <game_folder>\content\vehicles\pigeon\skins\Security Skin .
    Now run the game, select the Pigeon and choose the desired skin.

    How does it work
    App changes the path to the .dds files in materials.cs .



    Github
     

    Attached Files:

    #1 Incognito, Jun 30, 2014
    Last edited by a moderator: Oct 21, 2015
  2. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,271
    Re: Skin Selector

    Great work! :). Now we don't need to use one skin at a time.
     
  3. Jujune

    Jujune
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    1,076
    Re: Skin Selector

    Wow! Thats what we needed! Thank you very much :)
     
  4. Nivracer

    Nivracer
    Expand Collapse

    Joined:
    Jan 23, 2014
    Messages:
    328
    Re: Skin Selector

    Lol. I just made a suggestion of this. I'll have to try this out. Thank you so much for making this!

    - - - Updated - - -

    Can you make a tutorial with screenshots or a video? I usually have a hard time understanding stuff without them.
     
  5. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Skin Selector

    Which one: how to install app or how to install skins?
     
  6. Nivracer

    Nivracer
    Expand Collapse

    Joined:
    Jan 23, 2014
    Messages:
    328
    Re: Skin Selector

    app please.
     
  7. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,271
    Re: Skin Selector

    Just noticed your CSS file has a little problem and sets the button width and input width globally among non-styled button and inputs. :p
     
    #7 Dummiesman, Jun 30, 2014
    Last edited by a moderator: Jun 30, 2014
  8. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Skin Selector

    Thanks, fixed.

    https://www.youtube.com/watch?v=QmhPcJUoVwM
     
  9. theshark

    theshark
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    138
    Re: Skin Selector (v0.2)

    Please always use
    Code:
    .app .your_app_name .your_class {}
    for cssrules to make sure you don't override other styles :)

    EDIT: i just looked through your app.js and wrote some comments, i hope this helps :)
    (I had to zip it since the attachmentsystem appearently doesn't like js-files)
     

    Attached Files:

    #9 theshark, Jul 1, 2014
    Last edited: Jul 1, 2014
  10. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Skin Selector (v0.2)

    theshark, thanks, but:
    I just hide the form. The user does not need to see it all the time, it might interfere etc. If i will try to hide this.rootElement (maybe, self.rootElement, because "jQuery destroys the 'this' reference" :)) - I will get a gray rectangle.
    Yeah. And then i will get error:
    2014-07-01 10-39-45 CEF Dev window.png
     
  11. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,271
    Re: Skin Selector (v0.2)

    You could also set the app class style to hidden
     
  12. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Skin Selector (v0.2)

    And will be the same.


    This hides the form well:
    Code:
    $('.SkinSelector').parent().hide( 'slow' );
     
    #12 Incognito, Jul 1, 2014
    Last edited: Jul 1, 2014
  13. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,271
    Re: Skin Selector (v0.2)

    Ah yes, *ahem* Excuse me for misinterpreting what was going on yet again :p
     
  14. theshark

    theshark
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    138
    Re: Skin Selector (v0.2)

    The error happens because you have a stream defined in your app.json. as soon as a stream is listed in data.streams, the appengine tries to invoke the update-method.
    So just empthy your streamlist to make that error go away :)

    for the grey rectangle:
    The best solution would be to use the "transparent"-style for the app and create your own div with a background where you put all your elements.
    hiding this div should do the trick.
    The problem with your current implementation is, that you leave the area you should work. outside of this.rootElement, an app has no right to change anything. You are modifying the defaultbehaviour of an app by modifying the visibility of htmlelements outside your scope. Since the appengine is in development you could break the system really bad, if things outside the appcontext change.
     
  15. SoHigh00

    SoHigh00
    Expand Collapse

    Joined:
    Nov 11, 2013
    Messages:
    506
  16. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Skin Selector (v0.2)

    The problem is that the app is changing the path to the textures in materials.cs . Materials.cs does not contain paths to super_interior_d.dds and super_wheel_d.dds .
     
  17. SoHigh00

    SoHigh00
    Expand Collapse

    Joined:
    Nov 11, 2013
    Messages:
    506
    Re: Skin Selector (v0.2)

    I see, thanks for your reply. I fixed that by modifying the materials.cs by adding a path to super_interior_d.dds and the app works perfectly now ^^

    Edit. But I can't find the wheel texture of the bolide...that's weird it has to be somewhere else.
     
    #17 SoHigh00, Jul 2, 2014
    Last edited: Jul 2, 2014
  18. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Re: Skin Selector (v0.3)

    Update. theshark recommendations are implemented :)
     
  19. GTR2legend

    GTR2legend
    Expand Collapse

    Joined:
    Aug 29, 2013
    Messages:
    216
    Re: Skin Selector (v0.3)

    WOW that's amazing thanks:D
     
  20. bhorton

    bhorton
    Expand Collapse

    Joined:
    Aug 15, 2013
    Messages:
    667
    Re: Skin Selector (v0.3)

    SoHigh00, how would I add such a path to Materials.cs?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice