Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New Feature: Drug System Overhaul
Re: New Feature: Drug System Overhaul[message #341542 is a reply to message #341541]
|
Sun, 28 June 2015 21:04
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
How does it work? An example
Let's just say that we really do want to create a machinegun that heals people and infects them with chlamydia. We also want anybody hit to sometimes become a non-swimmer. How do we do that?
Open up Drugs.xml, and start a new drug:
<DRUG>
<uiIndex>18</uiIndex> <!-- the number we link to in Items.xml -->
<szName>Awesome machinegun bullets</szName> <!-- not used anywhere, just here to help us remember what this is -->
<opinionevent>1</opinionevent> <!-- if set to 1 mercs will complain about anyone who 'uses' this drug - in this case the poor guy shot -->
<DRUG_EFFECT>
<effect>0</effect> <!-- DRUG_EFFECT_HP: this effect will add/remove life each turn -->
<duration>5</duration> <!-- this will last for 5 turns (turns also happen in realtime, so this always works) -->
<size>10</size> <!-- heal 10 HP per turn. If you want 'poison', make that negative. -->
<chance>100</chance> <!-- happens 100% of the time this is applied, thereby each time a bullet hits someone (and does damage, being stopped by armour doesn't count -->
</DRUG_EFFECT>
<DISEASE_EFFECT>
<disease>9</disease> <!-- Chlamydia (see Disease.xml) -->
<size>150</size> <!-- Outbreak is at 300,growth per hour is 7. In a few hours, awkward questions will arise. -->
<chance>75</chance> <!-- Let's say this happens most of the time -->
</DISEASE_EFFECT>
<DISABILITY_EFFECT>
<disability>4</disability> <!-- Nonswimmer -->
<duration>20</duration> <!-- This lasts a while -->
<chance>40</chance> <!-- This happens sometimes -->
</DISABILITY_EFFECT>
</DRUG>
Gorgeous! Now all that remains is too add this to some ammo in Items.xml:
<ITEM>
<uiIndex>521</uiIndex>
<szItemName>7.62x54R Box T</szItemName>
<szLongItemName>7.62x54R Box, Tracer</szLongItemName>
<szItemDesc>7.62x54R tracer rounds aid accurate burst fire.</szItemDesc>
... boring stuff here...
<DrugType>18</DrugType> <!-- tracer ammo just got a lot more confusing -->
</ITEM>
A few important things:
- If a drug is applied via bullets, the full drug effect (as if you were to consume it 100%).
- The drug will only be applied if at least 1 HP damage is done (it needs contact to blood, no?).
- This only works if your gun is loaded with this exact ammo item.
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
|
|
|
|
Goto Forum:
Current Time: Mon Dec 02 13:55:55 GMT+2 2024
Total time taken to generate the page: 0.01095 seconds
|