Jump to content

A couple of (presumably) simple companion questions.


PAPVAFS11

Recommended Posts

Question 1: How do I track downs?

This is the easiest by far and probably a dumb question, too.

 

I want to track how many times an essential NPC has been knocked out and apply gradually worsening debuffs depending on how many incapacitations they've been through. I already have the debuffs prepared, but I don't really know what I need to use for the scripting side of things.

 

 

Question 2: How do I keep a companion from equipping armor?

This one might be a bit trickier, but I doubt it's terribly hard - I just have no idea how to do it.

 

I want that same NPC to stay with a very limited set of non-playable armors and refuse all others. I had a look at some of the faction armor scripts to see if I could figure it out on my own, but those only stumped me further. I have the armors developed (conceptually, at least), but the scripting once again eludes me.

Link to comment
Share on other sites

  • 3 months later...

I've done more hard testing on the companion and I feel the need to resurrect this thread now that I have more information.

 

I've noticed in the course of gameplay that GetKnockedState isn't very reliable. Sometimes, it'll properly return 1 when a character has been incapacitated, but, more often than not, it'll stay at 0 when they've been knocked out. I need a more dependable way to track downs as this is a critical component of a major mechanic for this character. I'd considered tracking health, but I found out quickly after that an incapacitated character returns their max health instead of 0 when "GetAV Health" is called.

 

Is there any way I can check for incapacitation that's more reliable than this?

Link to comment
Share on other sites

there is a dialogue line that the companion says when they wake up (vanilla veronica for example will say "how long was I out?" as well as some other lines.)

 

you could add blank audio to these dialogue lines (or fill them if youre already doing so) and add a counter script, so that every time they say any of these lines, it adds +1 to your counter.

 

it's a round-about way of doing it, but it getknockedstate isnt working, it may be your only option before resorting to new script variables included in NVSE (of which i'm sure there are ones that would work for you, i just am unfamiliar with them)

Link to comment
Share on other sites

If you wish to use your current methodology, you could try GeHealthPercentage. Not sure how your character is being "knocked out" so hard to offer up specific answers rather than general ideas such as possibly using GetUnconscious/SetUnconscious commands for greater control.

Link to comment
Share on other sites

there is a dialogue line that the companion says when they wake up (vanilla veronica for example will say "how long was I out?" as well as some other lines.)

 

you could add blank audio to these dialogue lines (or fill them if youre already doing so) and add a counter script, so that every time they say any of these lines, it adds +1 to your counter.

 

it's a round-about way of doing it, but it getknockedstate isnt working, it may be your only option before resorting to new script variables included in NVSE (of which i'm sure there are ones that would work for you, i just am unfamiliar with them)

 

Not a bad idea. I'm not sure of how reliable it is as I've noticed many combat dialogues don't play consistently, but I'll definitely give this a shot and see how well it works. Thanks for the idea!

 

 

If you wish to use your current methodology, you could try GeHealthPercentage. Not sure how your character is being "knocked out" so hard to offer up specific answers rather than general ideas such as possibly using GetUnconscious/SetUnconscious commands for greater control.

 

Just general combat. I haven't checked GetHealthPercentage, though (and I really should've given I've used it just about everywhere in dialogue), so I'll definitely do that in my next test.

 

Edit: Unfortunately, it's as I feared. GetHealthPercentage returns 1 when an essential NPC has been incapacitated.

Edited by PAPVAFS11
Link to comment
Share on other sites

 

there is a dialogue line that the companion says when they wake up (vanilla veronica for example will say "how long was I out?" as well as some other lines.)

 

you could add blank audio to these dialogue lines (or fill them if youre already doing so) and add a counter script, so that every time they say any of these lines, it adds +1 to your counter.

 

it's a round-about way of doing it, but it getknockedstate isnt working, it may be your only option before resorting to new script variables included in NVSE (of which i'm sure there are ones that would work for you, i just am unfamiliar with them)

 

Not a bad idea. I'm not sure of how reliable it is as I've noticed many combat dialogues don't play consistently, but I'll definitely give this a shot and see how well it works. Thanks for the idea!

 

 

I may be mistaken, but i do believe unless certain conditions are unmet, or the "say once per day" etc options are selected, the "wake up" dialogue plays every time, unlike battle cries and damage dialogue. not 100% sure though. Let me know if it ends up working for you or not, otherwise like I said, i'm sure theres a NVSE variable that might work for you that I can look around for

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...