CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.68k stars 4.19k forks source link

Base vehicles need a bit of a rework/ #19911

Closed 1skandar closed 6 years ago

1skandar commented 7 years ago

Ran across a working semi today and noticed it had a max speed of 21 mph. After a bit of poking I discovered that it was using a V6 diesel engine which is a wee bit underpowered. Several other vehicles are in similar boats, notably the RV and the ambulance are both much, much slower than they have any right to be. With the vehicle speed rebalance it might be a good idea to look at the included vehicles and upgrade their engines as appropriate so you don't have semis doing 20 or ambulances doing 50 ot RVs doing 40.

kevingranade commented 7 years ago

Just rescaled the reported vehicle speeds to be closer to the actual speeds, vehicles for the most part need to have their speeds increased a great deal.

1skandar commented 7 years ago

Yeah, but beyond that several of the vehicles have engines that are a tad underpowered for what they are. A hatchback and a SUV doing 60 to 70 mph is fine, an ambulance doing 50 is less so, all three are using the same engine, a gasoline v6. The ambulance should likely be moved to a v8 to account for its greater weight. And a semi with a v6 diesel 4.0L is laughably underpowered.

That said, I have noticed that speed drops wayyyyy to quickly as weight gets added, and diesels suffer from this the most. For their use in game, diesels should trade max speed for torque and suffer less degradation in speed as weight is added, but it almost seems the reverse is true.

keyspace commented 7 years ago

There are 76 vehicles in data/json/vehicles/*. How to review wholesale? A table with id/engine(s)/speeds?..

Tangently related: #19761 (diesel engines not exceeding 3rd gear)

1skandar commented 7 years ago

Yeah. There is a command line dump but my system is currently hating on it. It will also act as a way to make sure the vehicle rework is outputting reasonable speeds.

keyspace commented 7 years ago

@1skandar do you mean tools/json_tools/pluck.py? I've got a git stash with a "port" to Python 3.6 that almost retains compatibility with Python 2. Can share if needed.

A proper review, however, would probably require a unit test with safe/optimal/max speed dumps. Could attempt, no ETA.


EDIT: I guess what I meant was a comparative test, e.g.:

Seems unrelated to OP now. :/

1skandar commented 7 years ago

--dump-stats VEHICLE at the command line should do exactly what it says, but for me isn't is what I mean.

keyspace commented 7 years ago

Ah, OK. JIC, here it is at current master.

1skandar commented 7 years ago

Thanks for that.

Yeah, that makes things much clearer. Weight is impacting top speed much more than it should, especially for diesel powered vehicles. For most of the lighter vehicles the top speed is right around where you'd want it to be, upper 6s to lowers 7s, but the heavier vehicles have ended up too slow in the process. There is some balancing that needs to be done here, and I think at least part of it is that diesel engines have ended up underpowered for whatever reason.

keyspace commented 7 years ago

Revert of #19275 (Vehicle propulsion overhaul) might have made this obsolete.

The dump posted above is no longer actual.

keyspace commented 7 years ago

Here it is again, after the revert.

1skandar commented 7 years ago

Huh, that's revealing.

Yeah, ok I see a few problems here. Max speeds per engine being too high we knew about. Honestly, if those weren't exposed to the public and vehicles were locked to their safe speed that'd fix that nicely. You'd likely have to adjust that up or down a tad to zero things in a bit, but meh.

It also looks like there is little to no difference made between diesel and gas engines. A V8 is a V8, more or less. From a realistic standpoint, ok, yeah, sort of. Kinda. From an in-game POV, though, that needs changing. If it was me I'd give diesel engines less max potential speed, but a better power to weight curve.

And that is the really big problem I'm seeing here, the power to weight curve is effed up. Look at the Fire Engine versus the Fire Truck, Same engine in both, but the Fire Truck is over double the weight but loses only 20 mph off its safe speed. I'd have to look at the code but I'd say the power to weight curve flattens too fast on bigger engines, you get to the point where extra weight added makes little difference in safe speed too quickly. Again, something that can likely be tweaked until it feels better.

Lastly, there should be a penalty for putting an outsize engine on something. While a player should be allowed to put a V12 on a wheelchair, he should also should be penalized for doing so. I'm thinking that the higher up the power to weight curve you are the higher your driving skill should have to be to keep control of the vehicle. A driving skill 0 player who builds the aforementioned V12 wheelchair should have very little control on where it goes, nor how fast. Combine that with the lack of traction such a vehicle would have, well, a player could still have his fun but a practical vehicle it certainly would not be.

Zireael07 commented 7 years ago

@1skandar: Mugling's overhaul attempted to fix the issues you're pointing out, but it introduced its own problems.

1skandar commented 7 years ago

@Zireael07 I'm well aware of that. I'm considering what I want to do here. Now that I can see the problem a bit more clearly I might poke this myself. I a bit of a hack programmer, but I bet I could scootch the current system around a bit to fix the more egregious faults. I need a project, anyway.

Night-Pryanik commented 6 years ago

Closing as per lack of discussion.