Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[CR] Biodiesel engine #5182
Conversation
desrik
added some commits
Dec 21, 2013
Rivet-the-Zombie
reviewed
Dec 23, 2013
| @@ -121,6 +121,22 @@ | |||
| }, | |||
| { | |||
| "type":"GENERIC", | |||
| "id" : "biodiesel_engine", | |||
This comment has been minimized.
This comment has been minimized.
Rivet-the-Zombie
Dec 23, 2013
Member
In the real world oldschool diesel engines will happily run on B100 (100% biodiesel) but the new ones won't. It wouldn't be too big of a simplification to just assume that all Cataworld diesels can run off of straight B100 though.
Maybe this could simply be a 'diesel engine' and we could also have a couple diesel pumps at gas stations. IRL they've usually got a couple diesel pumps on the edge of the lot at about half the stations you'll find in rural areas, and there's loads of farm trucks and older European cars that run off the stuff.
Granted, that would require the engine to be able to accept two types of fuel (diesel and B100) but that might not be that hard. It depends on if the engine's fuel system checks the actual id of the fuel, or the ammo_type of the fuel.
This comment has been minimized.
This comment has been minimized.
desrik
Dec 23, 2013
Author
Contributor
In that case why make a diesel engine at all? The point isn't that it's a new engine or a new fuel type. The point is this provides an alternative to gas stations that offer slight bonuses over gasoline but must be actually made.
This comment has been minimized.
This comment has been minimized.
Rivet-the-Zombie
Dec 23, 2013
Member
Because diesel would still be considerably less common than gasoline (less pumps = less fuel) and it would allow you to make your own fuel to supplement it.
This comment has been minimized.
This comment has been minimized.
ghost
commented
Dec 23, 2013
|
@desrik, I agree with Rivet - I'd rather see just a diesel engine with diesel fuel added instead. However, instead of having two fuel types, you could just abstract biodisel by making diesel craftable with cooking oil. Also, truck diesel engines are not especially powerful compared to their gasoline counterparts, they just have a lot more torque, and for game balance, the most powerful engine probably shouldn't run on food. I suggest dropping the power down to 700. Lastly, more of a flavour thing: I think the diesel engine should be an straight-6 (not a v8), since that's the most common diesel engine configuration. |
This comment has been minimized.
This comment has been minimized.
|
I like the idea of less reliance on fossil fuels, but I think cooking oil might be a little too un-renewable to be effective in the long run. What I'd love to see would be a fuel derived from processed zombie flesh! Run zombies over with your deathmobile, pick up the pieces, throw them in the fuel tank, and use them to run over MORE zombies! |
This comment has been minimized.
This comment has been minimized.
An excellent point. If it works exactly the same, why should it have to come with a special name? We don't bother to have special names for the batteries you make with vinegar and soup cans; they're just batteries. Same with the 'used cooking oil' couldn't it just be normal 'cooking oil' instead?
I have this feeling that the reek of that thing's exhaust would be the worst smell on Earth. |
This comment has been minimized.
This comment has been minimized.
dwarfkoala
commented
Dec 23, 2013
|
Yes, me too. On Mon, Dec 23, 2013 at 1:28 PM, Rivet notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
|
@Rivet-the-Zombie I don't see any reason not to use used cooking oil instead of regular cooking oil. Would you really expect to walk into any fast food restaurant in America and expect to find sparkling clean cooking oil in their fryers? |
This comment has been minimized.
This comment has been minimized.
Just to avoid making a whole separate item that only serves a single purpose, yet is nearly identical to one we already have. If it had some massive difference between the two, it'd make sense, but if the only reason to have a separate item is because you want it to have a slightly different name, it's rather silly.
If it's a decently-run establishment, yes. Any good restaurant filters and cleans that stuff at least three times per day, and if they don't you can tell. I know I don't eat at places that have french fries that taste like burnt garbage. |
This comment has been minimized.
This comment has been minimized.
|
I don't understand whats wrong with having some variety. I personally like being given multiple ways to achieve the same goal. Also, this game is utterly lacking redundant items. Damn near every mmo/rpg/MUD I have ever played had a variety of items that served absolutely no pourpose in-game. Why? Immersion, realism, ambiance, and more reasons. Currently, a player can walk into a room, and without looking at any items, realize that if he lives long enough, every single item in said room will be of value at some point. Utter game design fail. The player should actually have to actually look through the items to see if there is anything worthwhile. Anyways... As for filtering cooking oil... Filtering it does not make it anywhere near clean. The purpose of filtering is to remove the super-cooked pieces of food that may be floating in the oil to prevent them from sticking to the good food being cooked. |
This comment has been minimized.
This comment has been minimized.
|
I fail to see how a lack of redundant items within the game is a failure of any sort. In fact, I see it as being the other way around. Adding piles of stuff that all do the exact same thing is needless filler, and really only serves to make the game a larger download. If this were a graphical game it would make some sense to have identical items that are different colors or whatever, but since it's all in your imagination I don't think it's asking too much from the player to assume that not every sports jersey is for the same team and such. And not to sound like I'm trying to argue with you or anything, but it does indeed make oil 'clean' once it's been run through a filtering apparatus. I know this because I've worked in several restaurants and have a lot of experience with fryers (ugh) and their maintenance. One good trip through the filter and it's so clear that you can see the bottom of the fryer again. Come to think of it, I don't even see where the used oil comes into this. It doesn't appear to actually spawn anywhere and you can't use it to craft biodiesel, so what's the point of it? |
desrik
reviewed
Dec 23, 2013
| m->place_items("fast_food", 80, 8, 7, 8, 7, false, 0); | ||
| m->place_items("fast_food", 70, 7, 9, 7, 9, false, 0); | ||
| m->place_items("fast_food", 60, 11, 7, 11, 7, false, 0); | ||
| m->place_deep_fryer(9, 9, rng(0,4)); | ||
| m->place_deep_fryer(10, 9, rng(0,4)); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Rivet-the-Zombie
Dec 23, 2013
Member
Well from looking at the code, it appears that it spawns cooking_oil and not used_oil plus the biodiesel recipe only accepts cooking_oil so I still fail to see the point of the stuff.
This comment has been minimized.
This comment has been minimized.
desrik
Dec 23, 2013
Author
Contributor
Yeah that was my fault. I guess I had already made the decision to not use used oil and forgot :) I was coding this on near no-sleep...
This comment has been minimized.
This comment has been minimized.
|
So how about adding diesel pumps at gas stations? |
This comment has been minimized.
This comment has been minimized.
|
Like the idea but agree about not overdoing it with complexity. |
This comment has been minimized.
This comment has been minimized.
|
No reason to add diesel pumps to gas stations. At least not in this PR. The added engine doesn't run on diesel... |
This comment has been minimized.
This comment has been minimized.
|
Not even dedicated biodiesel pumps? |
This comment has been minimized.
This comment has been minimized.
|
But then it wouldn't be an alternative to gas stations.... Then again, I guess one or two pumps couldn't hurt. Wouldn't be something you would see at every station though. |
This comment has been minimized.
This comment has been minimized.
|
Yeah I'm thinking it could be as easy as a simple one_in statement when generating gas stations to check for turning a small number of their pumps a different color (and name) and loading them with biodiesel instead. |
This comment has been minimized.
This comment has been minimized.
|
The other thing about cooking oil is it's fairly easy to make with minimal The issue with disel is if we do add it, I want it to be handled right, Haven't looked at the code yet, will comment more thoroughly once I have a |
This comment has been minimized.
This comment has been minimized.
|
Right now the biodiesel has to be used in a biodiesel engine. However, there isn't anything ( that I added, not sure if there is other checks elsewhere in the code ) that stops a player from adding a biodiesel and gasoline engines to the same vehicle, they just require separate fuel tanks. As far as gas in a diesel engine and diesel in a gas engine, if you put gasoline in a diesel engine, it WILL run, the catch is that it will run, at very high RPMs, until there is no more gasoline. Shutting the engine off does not stop the engine. That said, if you really want to make engines accept any type of fuel, with various effects for wrong fuel types, I highly suggest implementing this action. Just imagine your driving through the city and stop for fuel, forgetting your vehicle is diesel you fill the tank with gasoline. After the tank is full you jump in and crank the engine only to speed off down the street, through a house, hardware store, and gun shop, then panic as you barrel through the wilderness at 150+ mph. Genius :D |
This comment has been minimized.
This comment has been minimized.
|
This will be good for areas with gas shortages. Adds gas shortage region trait to todo |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Dec 29, 2013
|
@desrik, note that engines shouldn't have the ALTERNATOR flag anymore, since alternators are now separate parts. Also, I suggest explicitly setting epower to 0 for this engine, since desiel engines don't use electrical power while running (unlike gas engines). (Leaving the epower setting out completely is the same code-wise as setting it to 0, but could be mistaken for an omission instead of an intentional setting.) |
This comment has been minimized.
This comment has been minimized.
Killer-of-Lawyers
commented
Dec 30, 2013
|
Triffids were used in the movie or the book as a fuel source, if I recall. Could there be a way to make oil/fuel from the triffids? It'd make their groves more interesting. (And explain their existence, which is to say they're around for the same reason they were around in the books, people were farming them.) |
This comment has been minimized.
This comment has been minimized.
|
Hey, what's happening with this one? |
This comment has been minimized.
This comment has been minimized.
|
Hope this isn't dead. Any news on this? |
This comment has been minimized.
This comment has been minimized.
|
Care to update this one? I'd hate for it to bitrot. D: |
This comment has been minimized.
This comment has been minimized.
|
Once the content freeze lifts I may try to rez this sucker. No promises, and if desrik wants it dead I'll leave it. |
This comment has been minimized.
This comment has been minimized.
ClockworkZombie
commented
Feb 20, 2014
|
I've also been looking at this, wasn't aware that there was a stale PR. Rather than just expanding the current system to more types of engines I was considering revamping the system a bit and adding ammunition categories that would be more generally applicable than a specific ammo type, Right now, the code requires adding one off "coal engines do this" "diesel engines do this" for everything and just ends up with massive if/else and or statements everywhere. Statements like "if this is an engine and it uses gasoline OR diesel OR ethanol OR etc..." get cumbersome REALLY fast and implies that any new items in the JSON have to conform to some pretty specific hard-coded requirements that more-or-less limit additions via that method to different sizes of existing engines. |
desrik
closed this
Apr 10, 2014
This comment has been minimized.
This comment has been minimized.
|
Replaced by PR #7151 |
desrik commentedDec 23, 2013
Added biodiesel engine. Not too sure on some of the numbers though so any input would be great :) That said, this engine should be louder and slightly more powerful than a normal gasoline v8 engine.
You may find deep fryers filled with cooking oil in some fast food restaurants.
New Item: Biodiesel engine
New fuel: Biodiesel
New vehicle parts: Biodiesel engine, biodiesel tank
New furniture: Deep fryer
New recipe: biodiesel - requires chemistry set, 2 charges of cooking oil, and 50 charges of lye powder