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 Go to next message
Flugente

 
Messages:3509
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 cheeky).

[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

Captain

Re: New drug system 2: Electric Boogaloo[message #341446 is a reply to message #341445] Wed, 17 June 2015 23:13 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
So far this gets the Smeag stamp of approval.

I like it, especially if it was possible to have different kinds of addiction.

Also different "sized" regen effects seems possible with this as well.

Energy drinks not having the absurd effect of an adrenalin syringe anymore, caffeine addiction, smokers... endless possibilities. happy

Maybe add a randomizer for some effects?

Report message to a moderator

Lieutenant

Re: New drug system 2: Electric Boogaloo[message #341455 is a reply to message #341446] Thu, 18 June 2015 13:13 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
I'm really, really not a fan of random effects. One would then have to define what can be randomised and how much, which results in double the amount of tags. Urgs.
I guess one could also add the stat-change effects again (not included in above list).



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

Captain

Re: New drug system 2: Electric Boogaloo[message #341466 is a reply to message #341455] Fri, 19 June 2015 13:10 Go to previous messageGo to next message
Flugente

 
Messages:3509
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

Captain

Re: New drug system 2: Electric Boogaloo[message #341467 is a reply to message #341466] Fri, 19 June 2015 13:41 Go to previous messageGo to next message
Randok is currently offline Randok

 
Messages:321
Registered:March 2004
Quote:
the forum is pretty much dead nowadays.

New mod + new map with large sectors + two additional levels + a lot of new tileset + moving vehicles = fun for months, years. Fun with creation, fun playing this mod.



Many thanks to all those who make new features for Jagged Alliance 2.

Report message to a moderator

Master Sergeant
Re: New drug system 2: Electric Boogaloo[message #341468 is a reply to message #341466] Fri, 19 June 2015 14:04 Go to previous messageGo to next message
edmortimer is currently offline edmortimer

 
Messages:1533
Registered:January 2015
Location: Home Free
Quote:
Or barely anybody reads this, as the forum is pretty much dead nowadays.


I hit the forum multiple times everyday to make sure I catch all the news! I know what you mean, though. There's not enough feedback on new stuff. Myself, I'm still wrapped up in r7609 and fleshing out Arulco Vacations. I am grateful for what little feedback I get on AV, and act immediately on every one of the few comments I get in hope of getting more feedback.

You are doing great work, and although there is a deafening silence at times it is not a reflection of your intensity. People are playing and enjoying your work. Unfortunately, most people tend to be vocal only when they encounter something they don't like. I am grateful to every one who has modded this game, and am especially grateful for your efforts..

Report message to a moderator

Sergeant Major
Re: New drug system 2: Electric Boogaloo[message #341470 is a reply to message #341455] Fri, 19 June 2015 15:16 Go to previous messageGo to next message
grim is currently offline grim

 
Messages:344
Registered:July 2006
Location: France
Flugente wrote on Thu, 18 June 2015 12:13
I 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 #341506 is a reply to message #341470] Wed, 24 June 2015 08:32 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
I also recommend adding stat modifiers. Thought they were planned already... Would be a big loss for modding opportunities, if those were left out.

Report message to a moderator

Lieutenant

Re: New drug system 2: Electric Boogaloo[message #341507 is a reply to message #341506] Wed, 24 June 2015 13:14 Go to previous messageGo to next message
Flugente

 
Messages:3509
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 cheeky)

Current list of smokers:
  • Bernie
  • Shank

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

Captain

Re: New drug system 2: Electric Boogaloo[message #341529 is a reply to message #341507] Sat, 27 June 2015 13:18 Go to previous message
smeagol is currently offline 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

Report message to a moderator

Lieutenant

Previous Topic: Idea: Outside Organizations
Next Topic: Game translators needed for Stable Release!
Goto Forum:
  


Current Time: Fri Apr 19 23:00:44 GMT+3 2024

Total time taken to generate the page: 0.01039 seconds