Jump to content
Daniel Soltau

Vehicle and More

Recommended Posts

how can i activate the vehicles

This my Configs

events.xml

    <event name="VehicleCivilianSedan">
        <waves>0</waves>
        <nominal>8</nominal>
        <min>4</min>
        <max>8</max>
        <lifetime>300</lifetime>
        <restock>0</restock>
        <saferadius>500</saferadius>
        <distanceradius>500</distanceradius>
        <cleanupradius>200</cleanupradius>
        <flags deletable="0" init_random="1" remove_damaged="1" sec_spawner="0"/>
        <position>fixed</position>
        <limit>mixed</limit>
        <active>1</active>
        <children/>
    </event>

 

 

cfgeconomycore.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<economycore>
    <classes>
<!--
These are rootclasses to be used by economy.
Do not forget to add attribute act="character", if root class represents character (player, infected, animal)
Do not forget to add attribute act="car", if root class represents moveable vehicles
-->
        <rootclass name="DefaultWeapon" /> <!-- weapons -->
        <rootclass name="DefaultMagazine" /> <!-- magazines -->
        <rootclass name="HouseNoDestruct" /> <!-- houses, wrecks -->
        <rootclass name="Inventory_Base" /> <!-- inventory items -->
        <rootclass name="SurvivorBase" act="character" /> <!-- player characters -->
        <rootclass name="DZ_LightAI" act="character" /> <!-- infected, animals -->
        <rootclass name="Car_DZ" act="car" /> <!-- cars (sedan, hatchback, transitBus, V3S, ...) -->
    </classes>
</economycore>

Please Help

Share this post


Link to post
Share on other sites

Just because the vehicles are deactivated doesn't mean they can be reactivated and used. I do not believe they've been implemented yet, correct me if I'm wrong. 

Good luck. You might just have to wait til they're added back in. 

Share this post


Link to post
Share on other sites
23 minutes ago, mrwolv said:

think i may of enabled them will post back when i know more :)

Several are severely bugged, I went through a manual spawning method on player spawn and tested almost all of them (I assumed the V3S Chassis was the same as the V3S Cargo for function)

Having said that, I'm quite interested to find out more of your findings.

Edited by Aussie Cleetus

Share this post


Link to post
Share on other sites
1 hour ago, Aussie Cleetus said:

Several are severely bugged, I went through a manual spawning method on player spawn and tested almost all of them (I assumed the V3S Chassis was the same as the V3S Cargo for function)

Having said that, I'm quite interested to find out more of your findings.

how did you activate yours to get them to spawn ?

Edited by mrwolv

Share this post


Link to post
Share on other sites
       

    override void StartingEquipSetup(PlayerBase player, bool clothesChosen)

    {

        EntityAI oCar = EntityAI.Cast(GetGame().CreateObject("OffroadHatchback", player.GetPosition(), false, true));

        oCar.GetInventory().CreateAttachment("HatchbackWheel");

        oCar.GetInventory().CreateAttachment("HatchbackWheel");

        oCar.GetInventory().CreateAttachment("HatchbackWheel");

        oCar.GetInventory().CreateAttachment("HatchbackWheel");

        oCar.GetInventory().CreateAttachment("HatchbackDoors_CoDriver");

        oCar.GetInventory().CreateAttachment("HatchbackDoors_Driver");

        oCar.GetInventory().CreateAttachment("HatchbackHood");

        oCar.GetInventory().CreateAttachment("HatchbackTrunk");

        oCar.GetInventory().CreateAttachment("HeadlightH7");

        oCar.GetInventory().CreateAttachment("SparkPlug");

        oCar.GetInventory().CreateAttachment("EngineBelt");

        oCar.GetInventory().CreateAttachment("CarRadiator");

        oCar.GetInventory().CreateAttachment("CarBattery");

        

        oCar.SetAllowDamage(false);

}

add that to the function and u are done, vehicles are crashing client, correct me if i am wrong

Share this post


Link to post
Share on other sites

how would i get them to spawn on cords there fine for me :D

Edited by mrwolv

Share this post


Link to post
Share on other sites
// Code derived from TheKappatalist420 on reddit in r/dayz https://www.reddit.com/r/dayz/comments/9hamlp/the_dayz_server_owner_howto_and_faq/
// Use one or another only, using all at the same time will undoubtedly cause issues (spawning all vehicles into 1 location just seems silly)


// Spawn Sedan at Player - Sedan is terribly uncontrollable, traction is practically non-existent. Doors, trunk and hood cannot be opened unless someone is already inside the vehicle (the option does not seem to cause an update on the model). Terrible storage capacity

EntityAI oCar = EntityAI.Cast(GetGame().CreateObject("CivilianSedan", player.GetPosition(), false, true));
oCar.GetInventory().CreateAttachment("CivSedanWheel");
oCar.GetInventory().CreateAttachment("CivSedanWheel");
oCar.GetInventory().CreateAttachment("CivSedanWheel");
oCar.GetInventory().CreateAttachment("CivSedanWheel");
oCar.GetInventory().CreateAttachment("CivSedanWheel");
oCar.GetInventory().CreateAttachment("CivSedanDoors_Driver");
oCar.GetInventory().CreateAttachment("CivSedanDoors_CoDriver");
oCar.GetInventory().CreateAttachment("CivSedanDoors_BackLeft");
oCar.GetInventory().CreateAttachment("CivSedanDoors_BackRight");
oCar.GetInventory().CreateAttachment("CivSedanTrunk");
oCar.GetInventory().CreateAttachment("CivSedanHood");
oCar.GetInventory().CreateAttachment("SparkPlug");
oCar.GetInventory().CreateAttachment("EngineBelt");
oCar.GetInventory().CreateAttachment("CarRadiator");
oCar.GetInventory().CreateAttachment("CarBattery");
oCar.GetInventory().CreateAttachment("HeadlightH7");

// Spawn Bus at Player - This is terribly broken. The doors do not open, and dialog to enter the vehicle as driver or passenger are absent. List may be missing some parts. Storage is not wide enough to fit an SVD, Mosin9130 or IZH18 Rifles (1 column short).

EntityAI oBus = EntityAI.Cast(GetGame().CreateObject("TransitBus", player.GetPosition(), false, true));
oBus.GetInventory().CreateAttachment("GlowPlug");
oBus.GetInventory().CreateAttachment("TruckBattery");
oBus.GetInventory().CreateAttachment("TruckExhaust");
oBus.GetInventory().CreateAttachment("TruckRadiator");
oBus.GetInventory().CreateAttachment("BusDoors_Left");
oBus.GetInventory().CreateAttachment("BusDoors_Right");
oBus.GetInventory().CreateAttachment("BusHood");
oBus.GetInventory().CreateAttachment("TransitBusWheel");
oBus.GetInventory().CreateAttachment("TransitBusWheel");
oBus.GetInventory().CreateAttachment("TransitBusWheelDouble");
oBus.GetInventory().CreateAttachment("TransitBusWheelDouble");
oBus.GetInventory().CreateAttachment("HeadlightH7");

// Spawn Van at Player - Incomplete. There is no interaction programmed, from what I can manage to achieve, so Doors and Trunk do not open. List may be missing some parts. Terrible storage capacity

EntityAI oVan = EntityAI.Cast(GetGame().CreateObject("CivilianVan", player.GetPosition(), false, true));
oVan.GetInventory().CreateAttachment("CivVanWheel");
oVan.GetInventory().CreateAttachment("CivVanWheel");
oVan.GetInventory().CreateAttachment("CivVanWheel");
oVan.GetInventory().CreateAttachment("CivVanWheel");
oVan.GetInventory().CreateAttachment("CivVanDoors_Driver");
oVan.GetInventory().CreateAttachment("CivVanDoors_CoDriver");
oVan.GetInventory().CreateAttachment("CivVanDoors_BackRight");
oVan.GetInventory().CreateAttachment("CivVanTrunk");
oVan.GetInventory().CreateAttachment("SparkPlug");
oVan.GetInventory().CreateAttachment("EngineBelt");
oVan.GetInventory().CreateAttachment("CarRadiator");
oVan.GetInventory().CreateAttachment("CarBattery");
oVan.GetInventory().CreateAttachment("HeadlightH7");

// Spawn Offroad Hatchback at Player. Doors, trunk and hood cannot be opened unless someone is already inside the vehicle (the option does not seem to cause an update on the model). Drives reasonably well. Terrible storage capacity

EntityAI oAWD = EntityAI.Cast(GetGame().CreateObject("OffroadHatchback", player.GetPosition(), false, true));
oAWD.GetInventory().CreateAttachment("HatchbackWheel");
oAWD.GetInventory().CreateAttachment("HatchbackWheel");
oAWD.GetInventory().CreateAttachment("HatchbackWheel");
oAWD.GetInventory().CreateAttachment("HatchbackWheel");
oAWD.GetInventory().CreateAttachment("HatchbackWheel");
oAWD.GetInventory().CreateAttachment("HatchbackDoors_Driver");
oAWD.GetInventory().CreateAttachment("HatchbackDoors_CoDriver");
oAWD.GetInventory().CreateAttachment("HatchbackHood");
oAWD.GetInventory().CreateAttachment("SparkPlug");
oAWD.GetInventory().CreateAttachment("EngineBelt");
oAWD.GetInventory().CreateAttachment("CarRadiator");
oAWD.GetInventory().CreateAttachment("CarBattery");
oAWD.GetInventory().CreateAttachment("HeadlightH7");

// Spawn V3S Chassis at Player - Untested, but theoretically should work the same as V3S Cargo tests (except the tailgate as it doesn't exist)

EntityAI oV3S = EntityAI.Cast(GetGame().CreateObject("V3S_Chassis", player.GetPosition(), false, true));
oV3S.GetInventory().CreateAttachment("V3SWheel");
oV3S.GetInventory().CreateAttachment("V3SWheel");
oV3S.GetInventory().CreateAttachment("V3SWheel");
oV3S.GetInventory().CreateAttachment("V3SWheel");
oV3S.GetInventory().CreateAttachment("V3SWheelDouble");
oV3S.GetInventory().CreateAttachment("V3SWheelDouble");
oV3S.GetInventory().CreateAttachment("V3SWheelDouble");
oV3S.GetInventory().CreateAttachment("V3SWheelDouble");
oV3S.GetInventory().CreateAttachment("V3SDoors_Driver");
oV3S,GetInventory().CreateAttachment("V3SDoors_CoDriver");
oV3S.GetInventory().CreateAttachment("V3SHood");
oV3S.GetInventory().CreateAttachment("GlowPlug");
oV3S.GetInventory().CreateAttachment("TruckRadiator");
oV3S.GetInventory().CreateAttachment("TruckExhaust");
oV3S.GetInventory().CreateAttachment("TruckBattery");
oV3S.GetInventory().CreateAttachment("HeadlightH7");

// Spawn V3S Cargo at Player. Doors and hood cannot be opened unless someone is already inside the vehicle (the option does not seem to cause an update on the model). Tailgate does not show interactions for players, so rear passengers are unable to enter the vehicle. Storage is not wide enough to fit an SVD, Mosin9130 or IZH18 Rifles (1 column short).

EntityAI oTruck = EntityAI.Cast(GetGame().CreateObject("V3S_Cargo", player.GetPosition(), false, true));
oTruck.GetInventory().CreateAttachment("V3SWheel");
oTruck.GetInventory().CreateAttachment("V3SWheel");
oTruck.GetInventory().CreateAttachment("V3SWheel");
oTruck.GetInventory().CreateAttachment("V3SWheel");
oTruck.GetInventory().CreateAttachment("V3SWheelDouble");
oTruck.GetInventory().CreateAttachment("V3SWheelDouble");
oTruck.GetInventory().CreateAttachment("V3SWheelDouble");
oTruck.GetInventory().CreateAttachment("V3SWheelDouble");
oTruck.GetInventory().CreateAttachment("V3SDoors_Driver");
oTruck,GetInventory().CreateAttachment("V3SDoors_CoDriver");
oTruck.GetInventory().CreateAttachment("V3SHood");
oTruck.GetInventory().CreateAttachment("GlowPlug");
oTruck.GetInventory().CreateAttachment("TruckRadiator");
oTruck.GetInventory().CreateAttachment("TruckExhaust");
oTruck.GetInventory().CreateAttachment("TruckBattery");
oTruck.GetInventory().CreateAttachment("HeadlightH7");

I recommend commenting out the driver's door, because you'll have to remove it to enter the vehicle anyway

Vehicle Persistence does not save. So a server restart will make your vehicle disappear (at least spawned in this method).

The consensus is that it crashes the client after about 2 minutes of driving. It seems to show fine on the player side for the driver, but other players apparently see the car fly off into space on their screens when it drives, so they are not multiplayer friendly yet.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, BR_ASGARD said:

Hello how to define point location spawn (not players spawn?)

I'm not well versed enough in the code to understand the position system. Perhaps someone else might be able to help on that. I'm also curious. Though the cars suck. The v3s cargo wasn't so bad from my driving of it as long as you are solo playing (at which point you might as well be offline mode and use the admin tools that are out there by @Arkensor )

 
Edited by Aussie Cleetus

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×