Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab » New drug system 2: Electric Boogaloo
New drug system 2: Electric Boogaloo[message #341445]
|
Wed, 17 June 2015 22:59
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Drugs are bad.
To be precise, the new drug system is flawed. When I overhauled the old system in '12, I left as much of the vanilla system intact as possible. As a result, there are a few problems:
- Items are designated to be drugs via a special flag, like <DrugType>1081344</DrugType>. This is indecipherable to anyone not having the list of drug flags, and combining drug effects (which was the original intention) requires a calculator.
- It is not possible to have 2 drugs have the same effect, but with different sizes of the intended effect.
- In Drugs.xml, there are <ubDrugTravelRate>, <ubDrugWearoffRate>, <ubDrugEffect>, <ubDrugSideEffect> and <ubDrugSideEffectRate>. This is much more complicated than it should be.
- Related to the above, drug effects over time are weird. Vanilla adrenaline has always been more or less broken.
- Curing diseases via drugs is possible, but as this has been added later, not as smooth as it could be.
- Internal handling of consumables (items that are consumed when we drop them onto the merc silhouette, like camo, food, drugs, clothes...) is ugly. We have to cross-check several times in order not to consume an item too early. Yuk.
- Applying drugs via projectiles (darts!) is a popular request. Works somewhat, but again, not as easy or functional as it could.
- If one wants a drug to have several 'shots', one has to declare it food, as only food allows an item to have a fixed, <100% consumption per 'bite'.
- Drugs forcing the merc to have a different personality is possible, but adding a new disability here requires new flags, xml entries etc. Not coder/modder-friendly.
- Altering personality is not possible.
- The drug overdose effect of taking too many drugs is only possible of consuming a lot of drugs very rapidly. I've never even heard of that happening unless intentional. Which is sad, as this would be a logical counter to taking too many drugs.
I plan to address all this... and more. I am not sure when I will have the time for that though.
The xml structure I have in mind should give you an idea:
- Drugs.xml: To be completely redone.
<DRUG>
<ubIndex>1</ubIndex> index of drug - Items.xml has the <DrugType>-tag that uses this number. No more flags here.
<name>Adrenaline</name> name, used in editor, does not show up ingame directly
<opinionevent>1<opinionevent> 1 - consumption causes dynamic opinion event OPINIONEVENT_ADDICT where other mercs complain about drug consumption
every effect can be defined individually - if you want multiple effects, add multiple of these
you can define for how many turns an effect lasts after consumption
planned effects:
+/- HP regen
+/- AP
+/- BP
+/- morale
+/- phys. resistance in %
others?
<EFFECT>
<effect>2</effect> type of effect
<size>5</size> size of effect
<duration>10</duration> turns this effect lasts
</EFFECT>
A drug can add points to a disease (defined in Disease.xml). This happens instantly (there is no point in doing this over time).
We can add points (cause or increase a disease) or substract points (heal a disease).
Multiple disease effects are possible.
If we define a new disease 'DRUG ADDICTION', we can finetune exactly how much each drug causes us to be addicted, what the effects are, hwo long they last etc. etc.
We could even define different addiction effects to different drugs.
<DISEASE>
<disease>2</disease> refers to a disease in Disease.xml
<points>10</points> disease points added
</DISEASE>
We can define what disability/personality we get after taking the drug. If coded smartly, adding a new one in the code doesn't require any changes in Drug code or xmls.
If we ever get to the point where we can have multiple disabilities/personalities at once, this should still work (duration would have to get a mean value though).
<DISABILITY>
<disability>5</disability> new disability we get after taking drug
<duration>10</duration> turns this effect lasts
</DISABILITY>
<PERSONALITY>
<personality>5</personality> new personality we get after taking drug
<duration>10</duration> turns this effect lasts
</PERSONALITY>
</DRUG>
- Food.xml: Remove <ubPortionSize>-tag
- AmmoTypes.xml: Remove <ammoflag>-tag flags that deal with drugs.
- Lookup/DrugType.xml: Can be removed entirely? Not sure, depends on Xml Editor
- Items.xml:
- Change <DrugType>-tag, which uses a flagmask, to <Drug>, which simple refers to a number in Drugs.xml
- Add <ubPortionSize>-tag. This now works for all consumables, so no need to define items as food that aren't supposed to. Ignored by camo, as camo items decide how much is consumed depending on soldier. Somewhat odd for clothes, but perhaps useful if someone defines a 'stack of T-Shirts' item.
- Evaluate <Drug> not only for misc items, but also for ammo (applied when a soldier is hit by bullet that came from this mag), explosives (applied when soldier is hit by explosion from this item), melee items (applied when soldier is hit by this item)... This allows for truly wacky items. Camo paint that gives you cancer. A gun that heals people. A grenade that causes pregnancy. This is what modders want, I am sure of it.
As I've received some feedback on the old system over the years, I would very much welcome it if others, especially heavy users (modders) were to have a look at this. Whether its not-thought-out mechanisms, obvious flaws, or even further requests (don't overdo it, smeagol ).
[Updated on: Thu, 18 June 2015 13:10]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
Re: New drug system 2: Electric Boogaloo[message #341466 is a reply to message #341455]
|
Fri, 19 June 2015 13:10
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
I should probably also point out that I do not plan for effects to be delayed. This means that any effects that happen over several turns start instantly.
Apparently nobody has a problem with that. Or barely anybody reads this, as the forum is pretty much dead nowadays.
[Updated on: Fri, 19 June 2015 13:10]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
Re: New drug system 2: Electric Boogaloo[message #341470 is a reply to message #341455]
|
Fri, 19 June 2015 15:16
|
|
grim |
|
Messages:344
Registered:July 2006 Location: France |
|
|
Flugente wrote on Thu, 18 June 2015 12:13I guess one could also add the stat-change effects again (not included in above list).
Stats modifications could be useful, yes.
Quote:In Drugs.xml, there are <ubDrugTravelRate>, <ubDrugWearoffRate>, <ubDrugEffect>, <ubDrugSideEffect> and <ubDrugSideEffectRate>. This is much more complicated than it should be.
The complexity brought depth to the feature, but yeah, sometimes complexity just brings headache instead. Tweaking the evolution of an effect could be painful, and the result for the player not that entertaining, even if (maybe) more immersive.
Another worthy project!
Report message to a moderator
|
Master Sergeant
|
|
|
|
Re: New drug system 2: Electric Boogaloo[message #341507 is a reply to message #341506]
|
Wed, 24 June 2015 13:14
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
I plan on stat modifiers (AGI, STR, DEX & WIS) to be in (2nd post).
You asked for a 'smoker' property in backgrounds earlier. This would be very closely integrated into this, so I'm simply including it in the planning. For that, I need a list of all smokers (mercs that will actively consume cigarettes if found in inventory) and all radical non-smokers (mercs that refuse to consume cigarettes and dont like smokers) from you (you asked for it, so thats your job now )
Current list of smokers:
Current list of non-smokers:
- Thor
- Dr. Q
- Hurl
- Danny
- Mitch
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
Re: New drug system 2: Electric Boogaloo[message #341529 is a reply to message #341507]
|
Sat, 27 June 2015 13:18
|
|
smeagol |
|
Messages:2705
Registered:June 2008 Location: Bremen, Germany |
|
|
I made a complete list for all mercs with smoker/non-smoker, likes smokers (range from -2 to +2) and likes non-smokers (also range from -2 to +2). What's missing is someone who actually smokes but doesn't like other smokers.
I have only very few people who actively (+2 or -2 value) like or dislike someone for smoking. Most either have a slight preference (+1 or -1) towards smokers or non-smokers, some like one group more than the other, a big chunk doesn't care at all (+/- 0 for both). Some mercs are probably up for debate, though.
Warning, long list (130 mercs).
Toggle Spoiler
JA2 Smoker / non-Smoker List
Merc
<Smoker> 1
<Likes Smokers>
<Likes Non-Smokers>
Like Range -2 to +2
Barry
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> +1
Blood
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Lynx
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Grizzly
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Vicky
<Smoker> 0
<Likes Smokers> 1
<Likes Non-Smokers> 0
Trevor
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Grunty
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Ivan
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Steroid
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Igor
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Shadow
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 0
Red
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Reaper
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Fidel
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Fox
<Smoker> 0
<Likes Smokers> 1
<Likes Non-Smokers> 0
Sidney
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Gus
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Buns
<Smoker> 0
<Likes Smokers> -2
<Likes Non-Smokers> +1
Ice
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Spider
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Cliff
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Bull
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Hitman
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Buzz
<Smoker> 1
<Likes Smokers> -1
<Likes Non-Smokers> 0
Raider
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Raven
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Static
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Len
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Danny
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Magic
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Stephen
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Scully
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Malice
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> -1
Dr.Q
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Nails
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> -1
Thor
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Scope
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Wolf
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
MD
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Meltdown
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> -1
Biff
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 0
Haywire
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> -1
Gasket
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Razor
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Flo
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Gumpy
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Larry
<Smoker> 0
<Likes Smokers> -2
<Likes Non-Smokers> 1
Stoned Larry
<Smoker> 1
<Likes Smokers> 2
<Likes Non-Smokers> -2
Cougar
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Numb
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Bubba
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Miguel
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Carlos
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Ira
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Dimitri
<Smoker> 0
<Likes Smokers> 1
<Likes Non-Smokers> 0
Devin
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Hamous
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Slay
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Dynamo
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Shank
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Iggy
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Vince
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Conrad
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Maddog
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> -1
Mike
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Gaston
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Stogie
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> -1
Tex
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Biggins
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Monk
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 0
Brain
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Lennart
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Henning
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Luc
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> -1
Laura
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Grace
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Rudolf
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Spooky
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Skitz
<Smoker> 1
<Likes Smokers> 2
<Likes Non-Smokers> -1
Weasel
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
It
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Bernie
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Pops
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> -1
Wally
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Eli
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Mitch
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Carp
<Smoker> 1
<Likes Smokers> -1
<Likes Non-Smokers> 1
Lance
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Raffi
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Wink
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Speck
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
John Kulba
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Elio
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Juan
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Wahan
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Postie
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> -1
Reuban
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Leon
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Gary
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 1
Sparky
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Beth
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Sam
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Hurl
<Smoker> 0
<Likes Smokers> -2
<Likes Non-Smokers> 1
Doc
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Manuel
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Boss
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Snake
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Spam
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Spike
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Jimmy
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Leech
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> -1
Bob
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Kelly
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Vinny
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Kaboom
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Bud
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Russel
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Needle
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Screw
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Elroy
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Mouse
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 1
Hector
<Smoker> 1
<Likes Smokers> 1
<Likes Non-Smokers> 0
Rev
<Smoker> 0
<Likes Smokers> -1
<Likes Non-Smokers> 0
Stella
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Ears
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Moses
<Smoker> 1
<Likes Smokers> 0
<Likes Non-Smokers> 0
Smoke
<Smoker> 1
<Likes Smokers> 2
<Likes Non-Smokers> -1
Dyno
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Turtle
<Smoker> 0
<Likes Smokers> 0
<Likes Non-Smokers> 0
Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Tue Nov 12 01:12:49 GMT+2 2024
Total time taken to generate the page: 0.01057 seconds
|