Option to make all cars spawn with turretsSolved
Do you have any concerns about what players might do with unlimited turrets (such as scrap them) or is that acceptable?
Also curious, are you using any kind of plugin to fill the turrets or do players have to do that?
So far, I'm thinking of having an option with a percent chance for a turret to spawn on each module. Then you could just set everything to 100% chance for your use case. It would only apply to car spawns, not module spawns.
I was thinking like
Cars spawn with turrets: true
Number of turrets to spawn (if number is higher than car has modules, max turrets will apply: 4
Are turrets removable from modules?: false
WhiteThunder
So far, I'm thinking of having an option with a percent chance for a turret to spawn on each module. Then you could just set everything to 100% chance for your use case. It would only apply to car spawns, not module spawns.
That actually sounds perfect.
Thank you
https://github.com/WheteThunger/CarTurrets/tree/develop
There is now a
EnableTurretPickup configuration option which you can set to false to disallow picking up car turrets, regardless of whether they were spawned automatically or manually added by a player. Also added compatibility with the popular RemoverTool plugin so players can't remove them that way either.There is now a
SpawnWithCar configuration section like below. "SpawnWithCar": {
"NaturalCarSpawns": {
"Enabled": true
},
"OtherCarSpawns": {
"Enabled": true,
"RequirePermission": false
},
"TurretChanceByModule": {
"vehicle.1mod.cockpit": 100,
"vehicle.1mod.cockpit.armored": 100,
"vehicle.1mod.cockpit.with.engine": 100,
"vehicle.1mod.engine": 100,
"vehicle.1mod.flatbed": 100,
"vehicle.1mod.passengers.armored": 100,
"vehicle.1mod.rear.seats": 100,
"vehicle.1mod.storage": 100,
"vehicle.1mod.taxi": 100,
"vehicle.2mod.flatbed": 100,
"vehicle.2mod.fuel.tank": 100,
"vehicle.2mod.passengers": 100
}
},The only issue with this design is that if a player removes a module from a car at a lift, it will no longer have a turret. I experimented with an alternate design that makes modules automatically spawn with a turret, but there were compatibility issues with Turret Loadouts since it's not easy to determine who placed the module, so I was just using the car owner which could result in some interesting behavior such as one player stealing a car and placing a turret which automatically authorizes the owner and turns on to kill the thief, so I just decided to leave that out for now until I decide if/how I want to solve that.
I didn't hear back from you about how this was working, so I've gone ahead and released it in the latest update: v1.1.0.