CleverRaven / Cataclysm-DDA

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

Prototyping #27521

Closed neugchr closed 5 years ago

neugchr commented 5 years ago

Is your feature request related to a problem? Please describe.
I find it strange that the character needs recipe books for many recipes even when he has skills much higher than the required difficulty. For many recipes it would be plausible that a character with a sufficiently high skill could come up with the solution on his own given he spends enough time and resources on designing and prototyping.

On the other hand the PC auto-learns some recipes where it is rather implausible that they would be able to craft them perfectly on the first try. Pneumatic bolt driver anyone? The survivor really gets the sealing, the ballistics, the action etc. perfected the first time he tries to build one.

Examples:

Describe the solution you'd like
A character can sit down and create a blueprint. This consumes paper, requires a pencil and time like reading a book. The blueprint has a quality attribute (hidden to the player). The higher the skill is above the difficulty of the recipe the better the chance for higher quality blueprints. With the blueprint the player can craft a prototype. This results in minor skill gain (the character learned something about the topic for sure) and a finished prototype item. The Prototype item has hidden stats and must be tested (probably easiest introduced with a test item action).

Prototype qualities could be "dangerous", "defective", "normal" and "finished". -Dangerous prototypes have a 10% chance of dealing massive potentially deadly damage (more for medicines) and a 20% chance for annoying but generally survivable consequences. -Defective prototypes have a 20% chance for annoying but generally survivable mishaps (damaging/destroying equipment, causing hallucinations, etc). -Normal prototypes have a 5% chance for annoying consequences and a 5% chance for learning the recipe. -Finished prototypes have a 10% chance for learning the prototype and turn into the item itself after testing for 10 times.

Exact percentages could be adjusted for specific "high risk" recipes like explosives and medicines. (Perhaps have different dangers by category? Tailoring should probably just waste materials while serums/medicine should have the worst disastrous results if fucked up.)

Test conditions could also vary by category - electrical items could just be turned on to see if they start a fire in your base or electrocute you while weapons could require using them in combat. Could suck to find out in the middle of combat that your prototype armour has a weak spot, or some plating shifted and is now much more encumbering etc.

Describe alternatives you've considered
Modding this, but that would require to create multiple specific recipes per item and the risk mechanic couldn't be implemented by a mod as far as I understand.

Additional context
This could resolve things like mentioned in #27132 where concerning home crafted guncotton for handloading @kevingranade said

I never said it wasn't possible, I said it wasn't practical.

Simply make a recipe that can only be acquired by prototyping. That way skilled characters who are willing to invest the time could establish a difficult recipe, characters who overestimated their skills will probably blow up/electrocute/poison themselves. If it takes about a season to develop a prototype to production it also means characters will be unable to master too many theoretically possible but difficult to realize recipes.

Would also open up quest lines where NPCs ask you to test their prototypes, or NPC factions ask you to develop a prototype for stuff they want to craft.

kevingranade commented 5 years ago

I'm very in favor of the general concept to bridge between "I know the basic theory" and "I can make an example of this thing". In fact, depending on the difficulty, this could be used for "found" crafting recipes as well. In other words many many recipes would become "autolearn" in that your player can figure out the basics once they reach an appropriate skill level, but only very complete recipes would be clear enough to do, "here's the recipe, you know what you're doing so it'll work the first time". found recipes would provide a shortcut to a usable "blueprint".

the player can craft a prototype. This results in ... and a finished prototype item.

To be clear, the only thing you can do with the prototype item is test it? So a "prototype crossbow" can only be used in firing tests, has a chance of breaking and injuring the player, and only becomes usable as a crossbow if it is "complete" AND passes it's tests.

This could resolve things like mentioned in #27132 where concerning home crafted guncotton for handloading

It would not, the issue with nitrocellulose production is not that it's hard to "figure out", it's that it's fundamentally dangerous to do.

However gunpowder (black powder) crafting (and firearm crafting) is a great candidate for this kind of thing. The fact that gunpowder is a mixture of charcoal, sulphur and saltpetre is common knowledge, but the ratios and production methods are not.

neugchr commented 5 years ago

the player can craft a prototype. This results in ... and a finished prototype item.

To be clear, the only thing you can do with the prototype item is test it? So a "prototype crossbow" can only be used in firing tests, has a chance of breaking and injuring the player, and only becomes usable as a crossbow if it is "complete" AND passes it's tests.

Essentially I see two models. Model A: A prototype is an item that can be used and has 10 charges. Every time you consume a charge effects could happen. One possible effect is "Jep this prototype works as intended I now know how to produce this." Now if the perfect quality prototype has a 10% chance each use to make the player know the recipe he still has a roughly 34% chance of not learning the recipe. Since this kind of prototype should essentially be not different from the "production line item" I thought it should at least convert to the item. This would be easier to program because the prototypes are essentially the same only the "result tables" would need to be adjusted per category (tailoring recipes should never be fatal and only destroy resources upon failure, medicines should probably the most dangerous)

Model B: Prototypes are essentially items with hidden properties. Those properties get revealed to the player by using them. For example clothing will only show the warmth stat when character starts to overhead or chill. Guns show dispersion and damage when shooting at a target. Armour shows armour value when being hit. Medicines their effect when eaten (or taken to a hospital and put in a special analyzer, I think considering the futuristic setting it's quite reasonable to assume we have perfected this whole animal-free testing, just use a tox-test-kit plus machine plus first aid skill and it tells you if you produced poison). When all stats are revealed the prototype counts as tested and gives you the recipe when it was a "perfect" prototype. Non-perfect prototypes can be used after fully being tested but have sub par stats (and may still fail horribly so use at your own risk). Model B would of course be more work to program. As there would need to be special behaviour for every category of item.

This could resolve things like mentioned in #27132 where concerning home crafted guncotton for handloading

It would not, the issue with nitrocellulose production is not that it's hard to "figure out", it's that it's fundamentally dangerous to do.

However gunpowder (black powder) crafting (and firearm crafting) is a great candidate for this kind of thing. The fact that gunpowder is a mixture of charcoal, sulphur and saltpetre is common knowledge, but the ratios and production methods are not.

I had a pretty long paragraph about this but I deleted it because I don't want to derail the prototype topic. Suffice to say in real life a chemist with a bachelors degree should be able to do it without blowing up and 48 h washing and drying doesn't mean 48 h hands on time, you could do sth. else in that time, like go hunting or reading some books or do some quests for NPCs, ... I would say that high level cooking characters should be able to craft at least pre WW2 style ammo for revolvers, that eras self loading guns and manual bolt action rifles.

kevingranade commented 5 years ago

I much prefer model A, but with a few tweaks. Instead of charges, the tests would have an outcome of "failed prototype" that renders the item unusable for further testing. I suspect it would be a better player experience if there was a single test action per prototype, what's the rationale for multiple tests, are they super time consuming such that the player would want to do multiple test sessions? Instead of reaching a point where you can suddenly craft production-worthy items, the chances of success could simply continue to increase until the test is a mere formality, at which point it can be dispensed with. Significantly advanced items may never progress past the "working prototype" stage, but items crafted in bulk like ammunition would likely reach a point where they are produced routinely.

The one feature that Model B adds is the ability to craft a prototype and then use it immediately, but with a chance of catastrophic failure. This might be considered "exciting", but in reality it's a pretty silly way to proceed. I don't think the addition of that feature justifies the significant additional complexity it would require. In particular, instead of test failures being fairly generic, it would require us to somehow quantify exactly what happens on a failure, such as having firearms under perform or accumulate damage, or have melee weapons inflict to-hit and damage penalties.

I don't want to derail the prototype topic.

Good call, if you want to discuss it, use #27132

neugchr commented 5 years ago

I much prefer model A, but with a few tweaks. Instead of charges, the tests would have an outcome of "failed prototype" that renders the item unusable for further testing. I suspect it would be a better player experience if there was a single test action per prototype, what's the rationale for multiple tests, are they super time consuming such that the player would want to do multiple test sessions?

To understand my reasoning it's probably necessary to know that I imagined this mechanism as some kind of mechanism to fall back to only when unable to find the recipe. Something that a character only does rarely. And where the player after finishing says "YAY I did it!"

When prototyping a duster I think a test would probably be fairly quick, probably 15 min should be sufficient. Just wear it make some movements and check if it is unpleasant to wear or there is strain on some seems. But for armour and guns? I think you would want to test them really carefully because your life depends on them. Armour you'd probably carefully check for misaligning plates that create openings for attacks and then strike it with weapons and do some ballistic testing on it to see if it holds up to expectation. A gun you'd probably fire one shot, then disassemble it. Check all parts carefully. Then fire more rounds, disassemble, check mechanism, carefully inspect chamber and barrel for signs of wear. This could take 6 h to perhaps even a day.

Instead of reaching a point where you can suddenly craft production-worthy items, the chances of success could simply continue to increase until the test is a mere formality, at which point it can be dispensed with. Significantly advanced items may never progress past the "working prototype" stage, but items crafted in bulk like ammunition would likely reach a point where they are produced routinely.

Do I understand you correctly? Player crafts a prototype. Then tests it (can only be tested once then the prototype disappears or perhaps can be salvaged for some parts). At first it has a for example 10% change to become a functioning item a X % chance to harm the character based on difference between skill and difficulty and a 90-X% difficulty to do nothing. This means when skill is high enough the character never kills himself. Every time the prototype successfully converts to the item it increases success chance for future items by 30%. If success chance is capped by mishap chance this also means characters with too low skill will only ever blow up and never succeed. Something along this line?

Do we want this to be the way to find most recipes or should this be a rare exception to fall back to only if one can't find the appropriate book with the recipe? This would affect how the relation of skill to the difficulty affects the danger of the process. When its the norm skill = difficulty should generally be safe if it should be a rare feat something like skill should be 4 higher would be acceptable. This would also influence into how much time a complete cycle from start to learned recipe should take. If it's the general way for a recipe it should probably only take one day. If its only a rare occasion it could take up to a week.

kevingranade commented 5 years ago

A gun you'd probably fire one shot, then disassemble it. Check all parts carefully. Then fire more rounds, disassemble, check mechanism, carefully inspect chamber and barrel for signs of wear. This could take 6 h to perhaps even a day.

Cool, yes that's a good point, though perhaps something about the recipe entry will control wether that much time is necessary, simple items get one short test, complex items get many long tests.

can only be tested once

If it's complex, maybe it has something like 20/60/20 chance of success/inconclusive/fail in case it deserves multiple trials.

Every time the prototype successfully converts to the item it increases success chance for future items by 30%.

Yea something like that.

Do we want this to be the way to find most recipes or should this be a rare exception

I think particularly straightforward recipes are more common, so the majority probably wouldn't have prototyping attached.

This would affect how the relation of skill to the difficulty affects the danger of the process.

This would be based on the properties of the craft. Most aren't particularly long or dangerous, but I don't really care how many are, if they're difficult and dangerous IRL they should be difficult and dangerous in the game.

logros13 commented 5 years ago

How dangerous failures are we talking about here? while the idea seems interesting if prototyping ex a grenade or a mine has a chance to have it explode and kill the player outright then this will in practice just be the equivalent of removing the recipes from the game, since no one would take the risk of random instant death in anything but a "just for lulz" run.

neugchr commented 5 years ago

This would be based on the properties of the craft. Most aren't particularly long or dangerous, but I don't really care how many are, if they're difficult and dangerous IRL they should be difficult and dangerous in the game.

I'm sorry I used common language when I should have used professional language. "At what point does the residual risk drop below the acceptable risk for the game to no longer model it?"

EDIT: For those unfamiliar with the terms. (I hope my translations from german to english are correct). Danger is the severity of an effect (plane crash is dangerous because very deadly). Risk is danger multiplied by chance of event (planes only crash very rarely). That's why flying in a plane is safer than driving a car. The outcome of an accident is far worse in a plane but cars have so many more accidents that your overall survival chances are way higher when traveling by airplane. /EDIT.

What do I mean by this? In reality danger can be overcome by skill because it doesn't matter how dangerous an event is if it never occurs and with enough knowledge/skill one can implement measures that lower the chance of incidence below an acceptable level. A novice mountain climber may very well be able to climb a mountain, if weather doesn't change. But they lack the skill to evaluate if today is a good day to climb the mountain. If weather holds up they succeed and live but if weather suddenly changes they come into distress and may die or suffer more or less severe bodily harm.

Chemistry is a good example too, everyone can follow the instructions on a recipe that's generally not the problem. Let's assume a reaction that is carried out in diethyl ether and at the end of the reaction the solvent is removed by distillation. There's just a little problem: diethyl ether can form explosive peroxides. A chemist would know this and removes them before using the ether. Someone unskilled is not aware of the danger. The unskilled person may be lucky and use a batch that is fresh and peroxide free or he may be unlucky and has grabbed a flask with peroxides in it. For the unlucky one, during the removal of ether the explosive peroxide concentrates and at some point it explodes. Also recipes are almost never perfect they are written in a specific context. Said ether containing recipe may be written for a university training course, where the author knew the students would have to hand in a risk assessment before the experiment and this would be checked by a supervisor. So he need not include a detailed description how do deal with the peroxide, since any student that failed to address this in his risk assessment may not enter the course.

RDX and dynamite are difficulty 7 recipes in the game. I think it is probably a good idea to say if a skill 7 character has learned the recipe he will never kill himself while crafting those in the game. But what's the safe level to prototype this recipe? Will a skill 7 character be sufficiently knowledgeable to reduce risk as far as to never kill himself in the process? Will a skill 9 character?

Ninja post detected.

How dangerous failures are we talking about here? while the idea seems interesting if prototyping ex a grenade or a mine has a chance to have it explode and kill the player outright then this will in practice just be the equivalent of removing the recipes from the game, since no one would take the risk of random instant death in anything but a "just for lulz" run.

Yeah that's what I'm trying to get to. In real life there are dangerous professions like for example explosives disposal. Or pilot because nearly always fatal when plane crashes. But most of those people actually reach retirement age. It would simply be plain bad game design to have a bomb disposal expert be killed in 0.00005% (fictional number) of disposal actions because this mimics real life risk. The risk is too low to affect a players decision but at some point someone looses their character they have invested 250 hours playtime. This is just frustrating without adding anything to the gameplay experience.

There's essentially two ways to deal with this:

kevingranade commented 5 years ago

It's a tricky question I don't have a universal answer to.

In principle, I don't like either the, "with sufficient skill all recipes are safe", or the "outcomes are never fatal" option. They're both extremely arbitrary solutions to a complex problem.

Bomb disposal is a pretty great example. There are certainly bombs one can disarm manually with reasonable safety if proper procedures are followed, but there are also plenty of scenarios where a bomb cannot be manually disarmed with any real expectation of safety, so instead bomb disposal technicians will use robots, guns, other explosives etc to destroy the bomb.

There's a real tradeoff here, maybe you find some unexploded ordinance, and harvesting it would supply you with a great deal of material for your own bomb making uses, but it's never a safe thing to attempt. Maybe with sufficient skill you can fairly safely disarm the ordinance, but in this scenario, should the risk ever drop to nothing? I don't think so. On the other hand, what if there's a type of land mine that has a recovery feature? In that case it's IMO reasonable for a sufficiently skilled individual to have an actually safe way to disarm that kind of mine.

I do think that there should be mechanisms for managing risk, for example, when crafting dangerous chemicals, there could be a batch size where the side effects are manageable, but it's a tradeoff between safety and efficiency.

neugchr commented 5 years ago

Here comes the essay why I think prototyping should never be fatal when you have a sufficiently high skill. (As a caveat, the real situation is much more complex than I could establish here. I'm not a safety researcher, all I did was read up on what was accessible to me from the internet. I am however a studied biochemist with main courses in organic chemistry and toxicology, so I feel somewhat qualified to talk about laboratory safety, chemicals and risk-assessment.)

First let's talk about error modes: There's two extreme modes in which humans operate: Skill based and Knowledge based (there's also a rule based that's somewhere in between).

We perform roughly 90% of daily activity in skill based mode examples are driving a car and shifting the gear upwards or downwards or hitting the break when the signal turns red (we don't think about this like "oh I need to break, the break is right next to the gas pedal"). Here the error mode are slips: An example would be parking a car (manual shift) on a downward slope and engaging the shift for backwards driving (so that in case the handbreak fails the resistance of the motor will hold the car on the hill). The next day you start your car and forget to push down the pedal that decouples the motor from the gear-stack, so the car will make a jump backwards when turning the key. Or an electrician forgetting to remove a circuit from the power before starting to work on it. A typical harmless example is pouring orange juice in your breakfast coffee instead of milk, because you were distracted listening to traffic news on the radio.

Knowledge based actions are actions where we make conscious choices. For example when driving home from work we may choose one route over the other because we know that during the current time one route will have more traffic. Errors here are mistakes: They result by us not having a complete mental model of the situation. An example would be Propane-1,2,3-triyl trinitrate (Nitroglycerin) synthesis. It is common knowledge that it is a delicate explosive that can blow up by impact. But it is far less known that it is also a toxic compound that causes the blood pressure to go down (that's why today it is used as heart medication). NGL can be absorbed through the skin or its vapors can be inhaled, this can cause sleepiness and even unconsciousness to the worker. If you loose consciousness during synthesis you can't control the temperature of the reaction any longer and everything may blow up.

Then there's also violations. This is for example if a truck driver decides to speed to meet a deadline. Or if someone decides to continue to work in excessive heat and suffers a heat stroke (he was more afraid of his boss than of health consequences). This is when someone knows what they SHOULD do but decides to take a shortcut, because they feel the risk is acceptable.

How can we avoid the different types of errors: Slips: Just take more care. Looking at the example of grabbing the wrong bottle and pouring it in our coffee, this wouldn't have happened when acting in conscious mode and not auto-mode. This is also why for a long time the "solution" for workplace accidents was to tell the workers to just take more care. The problem is just that no one can hold active focus for a whole work day. You generally can hold up focus for 20 to 40 minutes a time. That's why for example real-time translators are working in pairs where everyone is working for 30 minutes and then the other takes over. (This is not the whole story, there may be factors that prevent someone from focusing, e.g. the partner may have told at breakfast that he/she wants a divorce. So the other person just CAN'T focus on the bottle with milk.) In railway and nuclear safety the human reliability limit is estimated to be 1:1000 for a single individual.

Mistakes: In the acute situation there is nothing that can be done because the person just doesn't know better, so they are doomed to make the decision in that way. But on the long term this can be fixed by better training. This is what I mean that you can handle danger by sufficient skill. At some point you know how to safely handle a situation.

Violations: We don't have to consider this, because it should be the players choice to be safe or to take risks.

Now should we model deadly accidents due to slips? I don't think so, this would mean there should be a random chance for the character to die when working on a vehicle with storage batteries installed because the PC forgot to disconnect batteries from the system. There should be a random chance for the character to get crushed by the tree he just felled (this is actually pretty realistic scenario). There should be a random chance for the character to die due to a fall when building a roof. There should be a random chance to get shot when putting a gun on the floor (character forgot to engage the safety, leaned the gun on the wall, the gun fell over and a shot fired). The list goes on and on and on ... (if you are interested just read this and look at the most common cause of death, falls are pretty common) To me this doesn't sound particularly fun. Also what we should realize is, that in reality accidents rarely have a slip as a root cause. First of all not all slips are non-recoverable (better training helps here too). For example when trying to prototype NGL synthesis, if the slip is forgetting to put the Nitric acid in the bottle we fail in a safe state. Usually temperature is held below 30°C but in some cases even below 10°C. Industry scale synthesis takes place at 70°C. Even if the character makes his synthesis at 20°C and he allows the temperature to rise above 30°C there is still some time to realize the error. Secondly usually there's multiple failures upstream that have happened. For NGL synthesis this could be failure to work under a fume hood and inhaling NGL fumes leading to reduced awareness causing the slip in attention. In real life we have constraints that to a certain extend force our hands. A roofing worker can't just not show up for work because he feels tired, or has a really bad day and can't focus properly. There may be a boss who is making pressure and who is perhaps lean on the money and decides to not renew worn out safety equipment in time. But a survivor is only his own boss, that means he can prototype whenever he wants. If he feels he has trouble concentrating today he just won't perform dangerous tasks. Also it is entirely up to him to set up his working environment. Also increased knowledge(skill in game terms) allows one to better foresee things that could go wrong and organize a process in a way that an error does not lead to disaster (like for example working behind a blast shield). I would be fine if we said a character above let's say 120 focus never makes errors due to slips and they get increasingly more likely the lower his focus drops. But then I also think we should attach the PC making slips to other tasks. Because there's not a fundamental difference in handling Nitrocellulose and electricity capable of moving your armoured mobile base (in my careful estimation the Nitrocellulose should probably be safer).

Should we model mistakes? Yes I think this is reasonable. I believe it is reasonable to say, the character tried their best but because of a lack of knowledge he did something wrong, that he couldn't foresee. But as stated above, with sufficient knowledge (skill) the mental model of the task will be sufficiently complete to avoid those.

As closing remarks: In Germany we have lot of bombs from allied bombardments in the ground. I've done the research and actual numbers for the state I come from are: 13 fatalities per 24.573 dispatched bombs. And this are essentially the worst conditions imaginable, it are warheads that have been fouling for over 70 years, partially with chemical primers that have corroded and could go off any time now. The disposal service states that the bombs are getting more and more dangerous by the year. Some of those bombs have timed fuses that were intended to explode hours or days after the initial bombings to hit people in the process of rescuing the wounded and starting recovery operations. Those timers may become active when the bomb is moved, for example when an excavator hits it. I've read an article from 2017 where they stated, that those fancy remote disarming devices aren't so great as the layman imagines, because they still need to manually drill holes in the bomb to attach the remote device. Also sometimes you find a bomb when building a house formerly used as a parking lot in the middle of a city. Now detonating the bomb in the middle of a city may cause severe damage to infrastructure and risk the livelihoods of many people. So they may be inclined to attempt a diffusal when on an open field they may just have detonated it. This is a 0.05% death chance under possibly the worst conditions imaginable when dealing with explosives. Prototyping a hand grenade, prototyping a synthesis for an explosive used in those bombs, manufacture of the explosives used in those bombs. All those tasks should be way less risky.

Sources: Trevor Kletz "An Engineer's view on Human error" (You can find several editions partially accessible over google books. I's hover a pain in the a.. to research with this as many parts are hidden). Stuttgarter Nachrichten (in German) Kampfmittelbeseitigungsdienst Baden-Württemberg - (ammunition disposal service) European OSH wiki

kevingranade commented 5 years ago

You can make most forms of research and production safe.

The survivor doesn't have the luxury of spending the amount of time and resources necessary to do that. Shortcuts are mandatory, working when tired is mandatory, working with substandard equipment is mandatory, taking risks is mandatory.

Your "boss" is the fact that if you don't achieve results fast enough, you may die from being underprepared.

Put more concretely: If the prerequisite for working with dangerous chemicals was assembling a modern chemical laboratory (~1 year of effort) and obtaining a high degree of proficiency with chemical handling (another year or more of effort), you might have a point, but that is not at all what the prerequisites would be.

If you don't think it's fair or fun to risk death when doing something very dangerous like bomb building or explosive compound synthesis or poison gas synthesis or any number of other dangerous things, the answer is simple, don't do it.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

stale[bot] commented 5 years ago

This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it