New feature: new drug system[message #303950]
|
Thu, 26 April 2012 23:23
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
<font size="">New drug system</font>
I made an overhaul to the drug system. You can now select several drug components and build your own drugs from them.
First, a look at the new Drugs.xml. A drug component has the following tags:
...
<DRUG>
<ubType>1</ubType>
<ubDrugTravelRate>4</ubDrugTravelRate>
<ubDrugWearoffRate>2</ubDrugWearoffRate>
<ubDrugEffect>15</ubDrugEffect>
<ubDrugSideEffect>20</ubDrugSideEffect>
<ubDrugSideEffectRate>2</ubDrugSideEffectRate>
<ubMoralBacklash>1</ubMoralBacklash>
</DRUG>
...
Now, what do these tags mean?
<ubType> is the number of the component, the specific effects are hardcoded (couldn't externalise those, or I'd need A LOT more tags).
<ubDrugTravelRate> determines how fast the drug comes to its full effect.
<ubDrugWearoffRate> determines how fast the drug effect will wear out.
<ubDrugEffect> measures the effect a drug has. As long as this value is > 0 the drug will have its main effect.
<ubDrugSideEffect> measures the drugs sideeffect. This starts once <ubDrugEffect> hits 0. This starts the second effect, which is mostly negative.
<ubDrugSideEffectRate> determines how fast the sideeffect will wear out.
<ubMoralBacklash> determines if there will be a morale drop once the <ubDrugEffect> hits 0.
So, in the above example, we have a drug that will have its ubDrugEffect raised by 4 every turn, until it hits 15. Then, every turn that value is lowered by 2. Once the ubDrugEffect is below 0, we lose a bit of morale, and the side effect starts at 20. This is again lowered by 2 every turn.
Due to coding restrictions, do not enter values above 126, or weird stuff will happen.
How do you make an item a drug? Simple, just look at these tags:
<usItemClass>268435456</usItemClass> // always set this
<Medical>1</Medical> // always set this
<DrugType>30824</DrugType>
The only new tag is <DrugType>. This is a flag mask that determines the different components used. For a clearer example, just look at the new drugs I made in Items.xml (entries 1535 - 1538).
What drug components exist, and what do they do? Here is the answer:
#define DRUG_ADRENALINE //0x00000001 //1 vanilla adrenaline
#define DRUG_ALCOHOL //0x00000002 //2 vanilla alcohol
#define DRUG_REGENERATION //0x00000004 //4 vanilla health regeneration
#define DRUG_DAMAGERESISTANCE //0x00000008 //8 damage resistance of up to 25%/-20%
#define DRUG_STRENGTH //0x00000010 //16 increases strength up to 25 points, lowers it by up to 10 as a side effect
#define DRUG_AGILITY //0x00000020 //32 increases agility up to 25 points, lowers it by up to 10 as a side effect
#define DRUG_DEXTERITY //0x00000040 //64 increases dexterity up to 25 points, lowers it by up to 10 as a side effect
#define DRUG_WISDOM //0x00000080 //128 increases wisdom up to 25 points, lowers it by up to 10 as a side effect
#define DRUG_PERCEPTION //0x00000100 //256 +/- 1 level during interrupts
#define DRUG_PSYCHO //0x00000200 //512 merc gets the 'psycho' disability while drug/side effect lasts
#define DRUG_NERVOUS //0x00000400 //1024 merc gets the 'nervous' disability while drug/side effect lasts
#define DRUG_CLAUSTROPHOBIC //0x00000800 //2048 merc gets the 'claustrophobic' disability while drug/side effect lasts
#define DRUG_HEATINTOLERANT //0x00001000 //4096 merc gets the 'heat intolerant' disability while drug/side effect lasts
#define DRUG_FEAROFINSECTS //0x00002000 //8192 merc gets the 'fear of insects' disability while drug/side effect lasts
#define DRUG_FORGETFUL //0x00004000 //16384 merc gets the 'forgetful' disability while drug/side effect lasts
#define DRUG_BLIND //0x00008000 //32768 merc goes blind for 2 turns once side effect hits 1
#define DRUG_KNOCKOUT //0x00010000 //65536 heart attack once side effect hits 1 (lose all breath and fall down)
#define DRUG_VISION //0x00020000 //131072 increases sight range 10% on drug effect, decreases it 10% as a side effect
#define DRUG_TUNNELVISION //0x00040000 //262144 increases tunnelvison, side effect only
I made 4 new drugs to test this out. For example, the new drug 'Occulin' has a <DrugType>425984</DrugType>. This gives it the effects of DRUG_BLIND, DRUG_VISION and DRUG_TUNNELVISION. I've set the effects so that
- once you take the drug, your sight range increases 10%
- once the side effect starts, your sight range is lowered 10% nad you get up to 25% tunnelvison
- Once that is over, you are blinded for 2 turns
Purely for demonstration reasons, I equipped the most dutch merc I could find with a wide array of, ehm, medical supplies:
This is her normal vision...
... she just took the drug, her vision is enhanced.
The side effect kicked in.
Now she doesn't see anything (note the icon on her portrait).
Drugged dutch girls go berserker. APs on drugs are now shown in pink, the old blue-on black wasn't very readable.
Buns has all drugs in her Kit 5 for demonstration purposes. They are not available on BRs, but perhaps Arulco's drug dealers might have some?
Other drugs I made have the effect of raising strength, but having the risk of a heart attack, as well as your merc becoming a psychopath. But you can think of drugs of your own, become an alchemist with the <DrugType>-tag.
I'll send this to RoWa.
Happy Alchemy!
[Updated on: Wed, 17 June 2015 21:37] Report message to a moderator
|
|
|
|
|
|
|
Re: New feature: new drug system[message #303993]
|
Sat, 28 April 2012 02:56
|
|
|
Tao ethusisastically rubs his hands together..."excellent..."
Time to juice my mercenaries up with:
1) Steroids
2) Methamphetamine
3) PCP
Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: New feature: new drug system[message #316382]
|
Tue, 19 March 2013 23:08
|
|
grim |
|
Messages:344
Registered:July 2006 Location: France |
|
|
About energy drugs, i am having great difficulties using them with any efficiency.
My mercs get action points up to 100, but no more, even when they have more whithout the drug: APs are capped to 100
However, (as someone said), any action exept movement cost a lot more. So in the end, i can do less things with the drug than without!
Finally, the stamina bar degrades immidiately after taking the drug, and a lot! I end up either unconscious (very fast, without doing anything), or using all my APs drinking one or two full canteens, just to stay awake.
I don't see the point of using them, and they seem "kind of" broken. In the original game, i remember using them with efficiency, they seemed to give a boost to a merc, what i don't feel now. I don't know if something can be done about it (removing the 100AP cap, delaying the stamina drop...?).
Report message to a moderator
|
Master Sergeant
|
|
|
|
|
Re: New feature: new drug system[message #316544]
|
Mon, 25 March 2013 17:00
|
|
PasHancock |
|
Messages:720
Registered:February 2011 Location: Estonia,Tallinn |
|
|
Hey, maybe you can try making a new feature, where Merc can Inject a Drug on another Merc? so for example if my Merc is dying and i dont have a Health kit but i have Regen booster, i could inject it on my Dying buddy?
Or even possibly make new Drug that is Poison? you know like in Hitman, you inject it and Enemy Dies, or Drug that makes you lose consciousness ( fall aslee, like Dart )
EDIT: I can TRY making or at least finding a Syringe Icon for injection, if you will make this Feature :O`
Also, Success or Fail of injection depends on Med skill
[Updated on: Mon, 25 March 2013 17:02] by Moderator Report message to a moderator
|
First Sergeant
|
|
|
|
|
|
|
|
|
|
|
|
Re: New feature: new drug system[message #316606]
|
Tue, 26 March 2013 21:43
|
|
Thor |
|
Messages:423
Registered:February 2007 Location: Belgium |
|
|
Any suggestions, Flugente? Just extracted the cursors, so I can make one based on those... For instance, I can make a variant to the hand or cross cursor? Like in a different color? Or something entirely different...
Any inspiration?
[Updated on: Tue, 26 March 2013 21:47] by Moderator Report message to a moderator
|
Master Sergeant
|
|
|
|
|
Re: New feature: new drug system[message #316610]
|
Wed, 27 March 2013 01:55
|
|
Thor |
|
Messages:423
Registered:February 2007 Location: Belgium |
|
|
Here you have an animation. It's based on the hand cursor, the one used to pick up items and to open doors. (That's how I have tested it in-game.)
However, the images are in a different order and in a different direction, and there is also a different movement. Apart from that I added a small green cross to explicitly refer to an addition "+", as the animation is not used to take objects, but to add/apply objects to somebody. The green is in contrast to the red healing cross as this animation can be used for all kinds of drugs, supplements, poison, etc.
http://www.filefactory.com/file/8z9irprj4e5/n/APPLY_zip
EDIT: As it is the case for several animations, I suggest to use the red colorful variant for the action and the colorless for non-action (cf. the other hand cursor, the fist, etc.).
[Updated on: Wed, 27 March 2013 02:06] by Moderator Report message to a moderator
|
Master Sergeant
|
|
|
|
|