Released T 80UD tank (shoots and working turret)

Discussion in 'Land' started by AnD_FiS, May 8, 2020.

  1. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,057
    The model is still not his, tbh no idea who even made the model for this
     
  2. Andryusha

    Andryusha
    Expand Collapse

    Joined:
    Jan 28, 2020
    Messages:
    652
    I have conducted a research and found out that this very model was taken from 2012 game lock on 2, converted to gta san andreas by Den8660 in 2017 and then made its way to beamng
     
    • Like Like x 1
  3. mrjesyblox

    mrjesyblox
    Expand Collapse

    Joined:
    Jun 9, 2022
    Messages:
    1
    Interesting...
     
  4. DominkG

    DominkG
    Expand Collapse

    Joined:
    May 19, 2022
    Messages:
    13
    Good tank.
     
  5. marco0020

    marco0020
    Expand Collapse

    Joined:
    Aug 11, 2018
    Messages:
    28
    Hellooo.
    I edited the tank and i changed a lot of things like:
    Engine sound
    shooting sound
    turbo sound
    engine toqrque curve (more realistic)
    turbo curve
    steering logic
    trasmission
    bullet texture ecc.
    For more info, look at the images

    I just have 3 problems.
    1. I use a 5 speeds automatic trasmission (with torque converter) but when i put in Drive, it doesn't change the gear, it remains in first
    2. It has infinite fuel because i didn't understand how to script the fuel tank (I tried but the engine turns off and doesnt crank anymore)
    3. How do i set the exhaust? I want use two different sound (one for engine one for exhaust), make smoke and enabling thermal
    Please HELP ME

    Old torque graph

    New torque graph


     

    Attached Files:

    • Like Like x 2
  6. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    Automatic transmissions in this game don't shift when the wheels are not on the ground. In the T-80UD there's no wheel to begin with
     
    • Agree Agree x 1
  7. marco0020

    marco0020
    Expand Collapse

    Joined:
    Aug 11, 2018
    Messages:
    28
    Is there a way to bypass this feature?
     
  8. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    Sorry, I don't know, may be some lua editing is needed.
     
  9. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,057
    I think it might be related to the game preventing shifting when wheels are slipping, the slippage might not be detected correctly
     
  10. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    They are slightly different. Check the Barstow Drag transmission, which has slip threshold set to 99999 i.e. always upshift even the rear wheels are slipping. However if you use nodegrabber to lift the rear wheels and floor it, the Barstow Drag still remains in 1st gear.
     
  11. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,057
    Slip treshold can't bypass the hasGroundContact variable in updateWheelSlip function though. So it's done on purpose that the game thinks the wheels are slipping when they are not touching the ground. The default value for that variable is false, so if there are no wheels to check, the game will assume that they are not touching the ground. It is a weird gameplay decision tbh. I added a modified vehicle controller that sets it to true by default instead of false, and that fixes it. I might update the mod further later.
     

    Attached Files:

    • Like Like x 2
  12. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    The biggest problem with tanks in BeamNG is constant oversteering.
    1. The turning angular velocity makes the front of the tracks slip inward and rear of the tracks slip outward.
    2. The turning centrifugal force makes the tracks, as a whole, slip outward.
    These two factors add up, making rear slip higher than front. And in BeamNG(simulates classic friction physics) the higher the slip, the lower the friction, this makes the tank always oversteery. IRL tank on the other hand, tracks are not made of rubber, the friction is constant most of the time and if there's ground deformation, the higher the slip the (slightly)more the friction.

    Does anyone know how to fix it?
     
  13. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,057
    Maybe by messing around with the sliding to static friction ratio we can lower the oversteer? Now I really want to mess around with this mod and see what more I can do.
    --- Post updated ---
    I'm updating this mod further, and I have a question, does anyone here know how to make the shooting sound not depend on some random cs file outside of the vehicle's folder? I tried to add a sound source with LUA instead but it says the profile is missing then, I've never had this happen before, any help?
    safdfse.png
     
    • Like Like x 3
  14. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    Check out this file, it only has T-80UD in the vehicles folder
     
    • Like Like x 1
  15. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,057
    That still uses the cs file though, I want to get rid of it and replace with LUA for compatibility. If you haven't heard, cs files are at this point the last leftover from Torque3D and they are getting deprecated in 0.26 because the backwards compatibility for them already lasted way too long. So the mod will break in 0.26 if it still has this file inside. I already converted the materials to PBR so they are not needed in this file, the sound is the last leftover. Thanks for moving tracks though, will try to finish them.
     
    • Like Like x 1
  16. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,319
    Ah, the wonders of TorqueScript.
    To use
    Code:
    obj:playSFXOnce()
    or any derivate from that you need to give the function the sound name, so the unique string that's specified on source creation.
    Though I don't see where the sound depends on a TS script, the only sound related function called is in lua\vehicle, that being sounds.lua, which just uses
    Code:
    obj:playSFXOnceStaticCT()
     
  17. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,057
    It doesn't depend on a TS script, it depends on a materials.cs file. And please explain in more detail, I don't get what is wrong with my LUA that plays the sound if the exact same thing works on other mods I have seen.
     
  18. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,319
    Which is a TS file, it creates datablocks when executed. It doesn't even matter which type.
    By the looks of it this file is used to create a SFX profile, of course when removed the game is missing one.
    You can create a profile through lua like this:
    Code:
    obj:createSFXSource2("/vehicles/T-80UD/tankgun.ogg", <DESCRIPTOR PLEASE REPLACE>, <UNIQUE STRING NAME PLEASE REPLACE>, <SOUND NODE ID PLEASE REPLACE>, 0)
    Available sound descriptors are:
    Code:
    //-----------------------------------------------------------------------------
    // 3D Sounds
    //-----------------------------------------------------------------------------
    
    //-----------------------------------------------------------------------------
    // Single shot sounds
    //-----------------------------------------------------------------------------
    
    singleton SFXDescription( AudioDefault3D : AudioEffect )
    {
       is3D              = true;
       ReferenceDistance = 20.0;
       MaxDistance       = 100.0;
    };
    
    singleton SFXDescription( AudioSoft3D : AudioEffect )
    {
       is3D              = true;
       ReferenceDistance = 20.0;
       MaxDistance       = 100.0;
       volume = 0.4;
    };
    
    singleton SFXDescription( AudioClose3D : AudioEffect )
    {
       is3D              = true;
       ReferenceDistance = 10.0;
       MaxDistance       = 60.0;
    };
    
    singleton SFXDescription( AudioClosest3D : AudioEffect )
    {
       is3D              = true;
       ReferenceDistance = 5.0;
       MaxDistance       = 10.0;
    };
    
    //-----------------------------------------------------------------------------
    // Looping sounds
    //-----------------------------------------------------------------------------
    
    singleton SFXDescription( AudioDefaultLoop3D : AudioEffect )
    {
       isLooping         = true;
       is3D              = true;
       ReferenceDistance = 20.0;
       MaxDistance       = 100.0;
    };
    
    singleton SFXDescription( AudioCloseLoop3D : AudioEffect )
    {
       isLooping         = true;
       is3D              = true;
       ReferenceDistance = 18.0;
       MaxDistance       = 25.0;
    };
    
    singleton SFXDescription( AudioClosestLoop3D : AudioEffect )
    {
       isLooping         = true;
       is3D              = true;
       ReferenceDistance = 5.0;
       MaxDistance       = 10.0;
    };
    
    //-----------------------------------------------------------------------------
    // 2d sounds
    //-----------------------------------------------------------------------------
    
    // Used for non-looping environmental sounds (like power on, power off)
    singleton SFXDescription( Audio2D : AudioEffect )
    {
       isLooping         = false;
    };
    
    // Used for Looping Environmental Sounds
    singleton SFXDescription( AudioLoop2D : AudioEffect )
    {
       isLooping         = true;
    };
    
    singleton SFXDescription( AudioStream2D : AudioEffect )
    {
       isStreaming       = true;
    };
    singleton SFXDescription( AudioStreamLoop2D : AudioEffect )
    {
       isLooping         = true;
       isStreaming       = true;
    };
    
    //-----------------------------------------------------------------------------
    // Music
    //-----------------------------------------------------------------------------
    
    singleton SFXDescription( AudioMusic2D : AudioMusic )
    {
       isStreaming       = true;
    };
    
    singleton SFXDescription( AudioMusicLoop2D : AudioMusic )
    {
       isLooping         = true;
       isStreaming       = true;
    };
    
    singleton SFXDescription( AudioMusic3D : AudioMusic )
    {
       isStreaming       = true;
       is3D              = true;
    };
    
    singleton SFXDescription( AudioMusicLoop3D : AudioMusic )
    {
       isStreaming       = true;
       is3D              = true;
       isLooping         = true;
    };
    
    These were taken from the T3D version BeamNG uses as a base.
    In this case I'd use Audio2D to achieve a full explosion effect and avoid off-balance, however AudioDefault3D also works fine and is currently used for the sound.

    To play the sound use this:
    Code:
    obj:playSFXOnceStaticCT(soundName, nodeID, volume, pitch)
    soundName being the unique string name specified during sound profile creation.
     
    • Like Like x 2
  19. Andryusha

    Andryusha
    Expand Collapse

    Joined:
    Jan 28, 2020
    Messages:
    652
    Omg, there is an insane amount of mods which still use materials.cs for things that don't necesarilly need PBR, I guess rip all of them when 0.26 drops :(
    And great idea about colored camo! Making winter/autumn/summer variants with it should be a blast.
     
  20. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,057
    Thanks, it works now!
    Help, I implemented your Jbeam changes on both tracks and now the tank does a weird sound when driving and also doesn't want to turn, what else should I change to fix it? I separated the suspension components to change it easier, maybe I messed something up there:
    sadwef.png
    But it was fine when only the left track was changed, the right one causes problems now
    --- Post updated ---
    You completely ruined the torque curve, it has 19 thousand horsepower now, not realistic at all
    sadwef.png
    --- Post updated ---
    Anyway I'm updating this thing and I'll need help with the steering because it stopped working, engine has some more modern stuff now
    sadwef.png
     
  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