Armed Caesar BTT?

Armed Caesar BTT?

« posted: Nov 25, 2016, 01:25 PM »
This has been in high demand by players on my server for awhile now (They want dogfighting). Initially dismissed the idea assuming client side mod would be required to work well, it would cause lag, or depending on implementation may get blocked by antihack.

Recently one of my admins pointed me to a mission which allows customization of all vehicles with player weapons(http://getwrecked.info/). I unpacked the pbo and discovered it was actually simulating the effect of the weapons. The weapons attached to vehicles are just props, and everything from muzzle flash, to gunfire sounds, spawning projectile, assigning velocity to projectile is all scripted. It even simulates ammo magazines and reload times since technically it is not a real weapon being fired. Within the draw loop it checks to see if a mousedown event is active, if so it checks for a player vehicle, loops all attached objects, if they are weapons it begins firing.

I extracted the code I wanted and got a Caesar BTT to fire from attached weapons on my Wasteland Dev server. I'm probably going to go with MK200 rounds if I release it. So technically I already have this working.This dev server is not running battleye though, and I suspect the createVehicle on the bullets may get blocked since it is done client side.

A note on lag... What I noticed in testing so far is that setVelocity creates lag/choppy animations when issued server side, but when done client side it is smooth. Even for other clients (Not tested with large number of players). More testing is required, but my initial assumption is that the client responsible for applying force to the object ends up doing more physics processing and the other clients/server simply validate the state of an object on some kind of interval. Maybe AgentRev or another dev here knows more regarding this behaviour.

Anyway, I am more or less just doing this for fun. If anyone has any feedback or suggestions let me know.








  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1072
  • ^_^;;

Re: Armed Caesar BTT?

« Reply #1 posted: Dec 30, 2016, 11:29 AM »
This has been in high demand by players on my server for awhile now (They want dogfighting). Initially dismissed the idea assuming client side mod would be required to work well, it would cause lag, or depending on implementation may get blocked by antihack.

Recently one of my admins pointed me to a mission which allows customization of all vehicles with player weapons(http://getwrecked.info/). I unpacked the pbo and discovered it was actually simulating the effect of the weapons. The weapons attached to vehicles are just props, and everything from muzzle flash, to gunfire sounds, spawning projectile, assigning velocity to projectile is all scripted. It even simulates ammo magazines and reload times since technically it is not a real weapon being fired. Within the draw loop it checks to see if a mousedown event is active, if so it checks for a player vehicle, loops all attached objects, if they are weapons it begins firing.

I extracted the code I wanted and got a Caesar BTT to fire from attached weapons on my Wasteland Dev server. I'm probably going to go with MK200 rounds if I release it. So technically I already have this working.This dev server is not running battleye though, and I suspect the createVehicle on the bullets may get blocked since it is done client side.

A note on lag... What I noticed in testing so far is that setVelocity creates lag/choppy animations when issued server side, but when done client side it is smooth. Even for other clients (Not tested with large number of players). More testing is required, but my initial assumption is that the client responsible for applying force to the object ends up doing more physics processing and the other clients/server simply validate the state of an object on some kind of interval. Maybe AgentRev or another dev here knows more regarding this behaviour.

Anyway, I am more or less just doing this for fun. If anyone has any feedback or suggestions let me know.

attachTo the correct stuff on spawn when purchasing is done server side i believe ( spawnStoreObject.sqf i think it was ) - no issues with BE.

I used to add DAGR missles to my Pawnee's in a similar fashion.

- from the grassy knoll -
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2174

Re: Armed Caesar BTT?

« Reply #2 posted: Jan 11, 2017, 06:36 PM »
It's actually very easy to add any weapon to any vehicle, using a much simpler method than GetWrecked, although the effects might be unpredictable.

Here's my favorite one; go in the editor, place a kart, and set this as init:

Code: [Select]
this addWeaponTurret ["Gatling_30mm_Plane_CAS_01_F",[-1]]; this addMagazineTurret ["1000Rnd_Gatling_30mm_Plane_CAS_01_F",[-1]];
This method is used by A3Armory to replace DGAR missiles by unguided DAR on some helis. In fact, I included a script that allows you to customize the default weapons and magazines by vehicle class: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/dev/server/functions/fn_setVehicleLoadout.sqf

Here's a loadout that could be interesting for the Caesar:

Code: [Select]
case (_class isKindOf "Plane_Civil_01_base_F"):
{
_mags =
[
["5000Rnd_762x51_Belt", [-1]]
];
_weapons =
[
["M134_minigun", [-1]]
];
};

(I don't know if that one works, your job to try it)

Note that the weapons defined in that file override all the default ones, so if you want to add stuff to a vehicle with existing weapons then you need to include all the default stuff in the config.
  • Offline Matt76
  • Mercenary
  • *****
  • Posts: 290
  • co founder of customcombatgaming.com

Re: Armed Caesar BTT?

« Reply #3 posted: Jan 11, 2017, 08:36 PM »
i can confirm this works well Rev,

i think this will be a fun edition for the players and utilise such an underused plane :)
  • Offline eldrich
  • First Blood
  • ***
  • Posts: 55
  • 40-1 Clan

Re: Armed Caesar BTT?

« Reply #4 posted: Jan 13, 2017, 02:18 PM »
works fine so far thanks Rev :)