Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: new drug system
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
|
|
|
|
|
|
New feature: new drug system
By: Flugente on Thu, 26 April 2012 23:23
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
By: Flugente on Thu, 21 February 2019 23:47
|
|
|
Re: New feature: new drug system
By: orcam3 on Fri, 01 March 2019 23:12
|
|
|
Re: New feature: new drug system
By: Parkan on Fri, 27 April 2012 11:45
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
By: Flugente on Sat, 28 April 2012 01:35
|
|
|
Re: New feature: new drug system
By: cdudau on Sat, 28 April 2012 02:56
|
|
|
Re: New feature: new drug system
By: tais on Sat, 28 April 2012 12:48
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
By: CapnJack on Thu, 07 February 2013 02:43
|
|
|
Re: New feature: new drug system
By: Flugente on Thu, 07 February 2013 21:53
|
|
|
Re: New feature: new drug system
By: Slax on Wed, 13 February 2013 21:39
|
|
|
Re: New feature: new drug system
By: Flugente on Wed, 13 February 2013 21:41
|
|
|
Re: New feature: new drug system
By: JAsmine on Wed, 13 February 2013 22:05
|
|
|
Re: New feature: new drug system
By: Slax on Wed, 13 February 2013 22:19
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
By: Nixou on Sun, 10 March 2013 18:38
|
|
|
Re: New feature: new drug system
By: grim on Tue, 19 March 2013 23:08
|
|
|
Re: New feature: new drug system
By: Flugente on Wed, 20 March 2013 22:10
|
|
|
Re: New feature: new drug system
By: grim on Wed, 20 March 2013 22:43
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
By: Thor on Mon, 25 March 2013 19:48
|
|
|
Re: New feature: new drug system
By: grim on Mon, 25 March 2013 20:30
|
|
|
Re: New feature: new drug system
By: Flugente on Tue, 26 March 2013 00:30
|
|
|
Re: New feature: new drug system
By: Thor on Tue, 26 March 2013 03:32
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
By: Thor on Tue, 26 March 2013 20:00
|
|
|
Re: New feature: new drug system
By: Flugente on Tue, 26 March 2013 21:19
|
|
|
Re: New feature: new drug system
By: Thor on Tue, 26 March 2013 21:43
|
|
|
Re: New feature: new drug system
By: Flugente on Tue, 26 March 2013 21:48
|
|
|
Re: New feature: new drug system
By: Thor on Tue, 26 March 2013 21:52
|
|
|
Re: New feature: new drug system
By: Thor on Wed, 27 March 2013 01:55
|
|
|
Re: New feature: new drug system
By: Slax on Wed, 27 March 2013 03:06
|
|
|
Re: New feature: new drug system
By: Flugente on Wed, 27 March 2013 20:54
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
By: Thor on Wed, 27 March 2013 21:21
|
|
|
Re: New feature: new drug system
By: Flugente on Wed, 27 March 2013 22:24
|
|
|
Re: New feature: new drug system
By: Thor on Wed, 27 March 2013 22:38
|
|
|
Re: New feature: new drug system
By: Flugente on Wed, 27 March 2013 23:06
|
|
|
Re: New feature: new drug system
|
|
|
Re: New feature: new drug system
By: Flugente on Mon, 08 April 2013 23:02
|
|
|
Re: New feature: new drug system
By: grim on Tue, 09 April 2013 02:25
|
|
|
Re: New feature: new drug system
By: Flugente on Tue, 09 April 2013 02:55
|
|
|
Re: New feature: new drug system
By: grim on Tue, 09 April 2013 04:19
|
|
|
Re: New feature: new drug system
By: Flugente on Tue, 09 April 2013 23:02
|
Goto Forum:
Current Time: Fri Nov 29 18:35:37 GMT+2 2024
Total time taken to generate the page: 0.02413 seconds
|