[In-progress] Base mod! generators

Expanding on previous answer a bit more:

The solution I’d like see looks like this:

  • There would be JSON for multiple vehicle parts that are generator versions of the current engines, so “v2 gasoline generator” or “large gas turbine generator”. They would probably lighter than the current engines (no implicit transmission) but occupy the same location in a vehicle and consume the same amount of fuel when operating.
  • There would be a new bunch of code for dealing with these, but the short version is that generators act like engines EXCEPT you can install multiple generators without instruction, generators don’t contribute to the motive power of the vehicle, and generators don’t count as extra engines for multiple engine motive power penalties.
  • There would be a bunch of new code for “appliances”. Internally to the code, appliances would be vehicles (though usually without wheels) but you’d interact with them as though they were items, mostly.
  • Your stand-alone generator (SAG) would be represented in JSON as a wheelless vehicle (or appliance) with a special frame, a small combustion engine, a car or motorcycle alternator, and a 2L fuel tank. You’d interact with the SAG as an item via some special commands, so there would be an action to refill the tank, an action to connect the generator to other appliances, etc. Notably, you’d use the craft menu (and not the vehicle interaction menu) to craft a new SAG or build a recharging station from a SAG and a recharging station, and you wouldn’t be able to remove parts from the SAG like you can with a vehicle, but only disassemble it like any other item. You could store a SAG in large container like a duffel bag (well, maybe, depending on the size). But the code would treat it as a vehicle, so the existing code to handle fuel consumption and power production would work just fine.

Now, this version of appliances is, as I’ve said a lot of work and I’m not going to do it. But I’m also not going to do the work to add a generator item that consumes fuel and generates electrical power when it’s on the active item list. The difference is I’m going to help someone else implement the appliance idea, and I’m going to work against anyone trying to implement the active item version.

Now I am reasonably sure that you don’t understand all of what I just said, which isn’t a problem except that it makes it difficult for you to make convincing arguments for your version of the solution to the problem. I can try to help you understand this stuff, if you’d like, but it means understanding elements of how CDDA is written in C++ and I don’t know if you want to do that.