Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

[ENHANCEMENT?] World-based vehicle repair item type

boot2big opened this issue ยท 10 comments

commented

It has occurred to me that if opPickupVehiclesOnly or creativePickupVehiclesOnly are set to true, a normal player would obviously not be able to pick up a vehicle.

In that case, how are they supposed to repair a vehicle's health? I would not be so sure to assume that having either of those configs set to true would mean that a server owner or modpack maker doesn't want players to repair their vehicles. That would make sense in a war setting (where you obviously don't have the resources to restore a totaled tank or fighter plane!) but for basically any other setting I've been able to think of, there's no reason you couldn't repair a vehicle. (Apocalyptic Mad-Max, regular ol' economy server, GTA in minecraft, etc.)

commented

That is true. In that case, how would you go about repairing a vehicle? I'd assume that since you can't pick up the vehicle (which would still be intended for the server since you can't just go and pick up your deathmobile and carry it across the map into another base), you'd need some way to repair the vehicle while placed. Therefore, it would logically follow that such repair would require clicking on the vehicle. Presumably, with an item, yes?

commented

Yes, item to repair vehicles is something i wanted to ask for for quite some time. And it would be nice if we could make such items and define how much health they restore. So things like "small repair kit" "medium repair kit" and so on are possible

commented

That brings up the question: should any pack's kits work with any pack? Or should they be part of the core mod?

commented

One should be a part of core mod, but it should be possible to add your own kit in your pack and define how much does it repair the vehicle in hp

commented

Wooh, we got activity a-quickly.
I agree with Wartich on having a sort of repair-kit item for simpler repairs like this. In addition I don't think a repair kit should necessarily repair a certain amount of HP, rather it should repair a percentage of the vehicle's total HP.

For example, say we have three kits, a small repair kit, a regular repair kit and a full repair kit. Small repairs by 25%, regular by 50% and full by 100%. Then we have two vehicles, a small bicycle with 100hp and a regular sedan with 1000hp. Both are 75% damaged meaning a small repair kit + medium repair kit would repair both to 0% damage even though the bike is receiving 75hp and the sedan is receiving 750hp. (And obviously one could just spring for two medium repair kits or a full repair kit as well.)

Another factor for repair kits could be a canRepairTotaled parameter which prevents this repair kit from bringing a vehicle back from the dead/being totaled (because ain't no paint job kit gonna give you a new frame and drivetrain!!)

Both of these examples are just suggestions as to where these repair kits could go for now. And at the moment I'm split on whether repair kits should repair parts or not since you are able to remove parts from a vehicle to repair an engine or wheel, regardless of whether you can pick up the vehicle or not. Plus that could possibly result in many complaints of a hard-to-distinguish-from-the-vehicle part eating somebody's repair kit when they were trying to repair the vehicle itself (vs we don't do anything, or we have a separate part-side parameter that needs to be enabled in order for said part to be world-repairable)

commented

i think having fixed hp value repair is better. It gives more flexibility

commented

I disagree on account of the example I mentioned. One pack's small repair kit will become another pack's full repair kit and vice versa. Having it done via total health percentage may be less "flexible" (unsure how repairing it based on a set health amount is flexible so do tell me how) but it is guaranteed to work with any vehicle across any pack.

(The bicycle's full repair kit would only store 100hp compared to the sedan's full repair kit, which would restore a whopping 1000hp. Even if we do something dumb like having the full repair kit restore 2,147,483,647hp, that doesn't solve the problem of smaller repair kits!)

commented

That's what i don't want. I don't think it's good to have everything repaired with the same things. For example, it would be stupid if you could repair tank to a 100% in one go with bicycle repair kit. As for compatibility, sometime soon new weapons convention will be made and military vehicle health values will be somewhat standardized. As for civilian vehicles, i don't think it would be a really big issue.

commented

If you don't mind I'd like to be included in on the weapons convention unless nobody minds me having missiles that (quite literally) do over 9000 damage. I had not accounted for the missile's acceleration when balancing the damage, which in of itself was balanced around vehicles having 2x their emptyMass in health.
I already sort of roped Trin into that though, with my reasoning being that the vehicle can be made to go squirrely before being totaled (various wiring harnesses being damaged, leaking hydraulics, etc.) and that you can't dump bullets into just anywhere on a vehicle to kill it, particularly since the engine itself forwards damage to the vehicle anyways.

That does give me an idea, but that's for later and not within the scope of this ticket which is focused on repairs, not damage

commented

Addressed in 22.10.0.