Jump to content

Photo

I don't understand how cure disease works! Advice, please...


  • Please log in to reply
8 replies to this topic

#1
cumbrianlad

cumbrianlad

    Right turn, Clyde!

  • Premium Member
  • 1,042 posts

So I decided to make a trap disease that applies -0.8 to the player 'HealthRegen' actor value. I don't know if I can make this AV negative, but if not, I'll settle for making it 0. The idea is that once they have this disease, they will permanently and very slowly die (I'm nasty that way). If they're wearing an item of fortify health regen, I don't mind. I'll even leave a necklace somewhere to help (I'm kind that way).

 

They can also keep popping potions of fortify health regen. I don't mind that, either. I want the permanent cure to be one of a few potions thay can find in the dungeon.

 

Looking at the original disease system to see how to go about this, I just don't get it. The disease magic effects and enchantments have no special keywords, nor does the potion of cure disease, as far as I can see. I could find no formlist that is being used. There's just the effect archetypes 'disease' and 'cure disease'.

 

Unless I get how the system functions, I can't make progress with my new disease. Once I know this, applying it to the traps is no problem.

 

Any clues?



#2
Hanaisse

Hanaisse

    Fan

  • Members
  • PipPipPip
  • 274 posts

Effect Archetypes are essentially code-based effects that can be triggered by the MagicEffect.

Quoted from CK Wiki Magic Effect page.

 

So it's my understand that archetypes are hard-coded and "it just works!" All you'd need to do is create a new potion with a magic effect of the archetype Cure Disease. You could just use the existing magic effect 'AlchCureDisease' or duplicate it into your own unique magic effect if you wanted, for example, to change up some of the effect art.



#3
cumbrianlad

cumbrianlad

    Right turn, Clyde!

  • Premium Member
  • 1,042 posts

Hi, Hanaisse.

 

Hanaisse: "So it's my understand that archetypes are hard-coded and "it just works!" All you'd need to do is create a new potion with a magic effect of the archetype Cure Disease. You could just use the existing magic effect 'AlchCureDisease' or duplicate it into your own unique magic effect if you wanted, for example, to change up some of the effect art."

 

If that's right (and I'm not saying it isn't), that's the very thing that worries me! Will existing potions and altars cure my disease and will my new potion cure everything else?! I don't want either.



#4
Hanaisse

Hanaisse

    Fan

  • Members
  • PipPipPip
  • 274 posts

Hmm, you're probably right. You might have to go deeper into quests and/or scripting to keep your disease unique, similar to vampirism and lycanthrophy, the only two 'diseases' that can't be generically cured.

 

I was just spitballing off the top of my head, there's way more knowledgable people around who can probably think of other ways. :)



#5
cumbrianlad

cumbrianlad

    Right turn, Clyde!

  • Premium Member
  • 1,042 posts

Hanaisse, I'll check lycanthropy and vampirism. That's a good call. It fits with what I want. Lycanthropy seems the best bet, because once you've got it, you burn a witch head or stick with it. Vampirism is more complex. You do different things to cure yourself at different stages.



#6
dylbill

dylbill

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 1,337 posts

A simple way to do this would be just to use a spell ability instead of disease archetype, and some scripting. 

 

For your trap you can just use akTarget.AddSpell(MyDiseaseAbility) 

 

Then for your cure potion just use akTarget.RemoveSpell(MyDiseaseAbility)

 

You can add more disease ability spells if you want to cure it in stages.



#7
cumbrianlad

cumbrianlad

    Right turn, Clyde!

  • Premium Member
  • 1,042 posts

Dylbill,

 

That sounds good. Having looked at other things I was starting to think along the same lines.

 

It looks like it would be easy enough to make a new version of the script 'TrapHitBase' to add the ability in the existing disease section. I could use a global variable to add the disease in stages and remove it in stages.



#8
cumbrianlad

cumbrianlad

    Right turn, Clyde!

  • Premium Member
  • 1,042 posts

Thanks for the tip Dylbill! It works a treat.

 

I added three different Dwemer diseases.

 

Disease 1: Reduces health by 150, stops health regen and adds 75% weakness to fire (recommended min level for the dungeon is 24. if the player goes in way below that and gets killed by the combined physical damage and reduced health effect, that's their problem. Followers won't get killed by it because it's set to just add the disease to the player)

Disease 2: Reduces stamina by 100, stops stamina regen and adds 75% weakness to frost

Disease 3: Reduces magicka by 100, stops magicka regen and adds 75% weakness to shock

 

The chance of getting a disease is pretty high, so the player can quickly aquire all 3 diseases unless they spot the traps and avoid them. Since I've disguised the pressure plates to match the floor with no daft golden giveaway parts on them, that's easier said than done.

 

I then made duplicate trap activators, set can disease to 'True', set the chance of disease and added my 3 disease abilities to the spell properties for the 'TrapHitBase' script.

 

The potion was a bit more trouble because the form doesn't allow you to add a script, even though there is a script drop-down box on it. I used the 'ABblank' effect and added my script into that for the cure, set it to 'Fire And Forget' and added it as an effect to the potion... job done! The script needed a message property because the player gets informed when they catch my diseases but doesn't get told when the potion cures them. So a simple MyMessage.Show() line added into the script does the trick.

 

The player really must find those potions because all of my dwemer spiders and spheres are capable of shock and fire spells, plus there are fire, frost and shock traps dotted around... sweet.



#9
dylbill

dylbill

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 1,337 posts

Awesome, sounds like a good set up. Glad you got it working!






Page loaded in: 0.968 seconds