Jump to content

Custom stimpaks won't heal downed companions - can't figure out why


XI57

Recommended Posts

For the life of me I cannot solve this. I've made a mod that makes new chems, one of those chems is a stimpak. Everything about it works, except for the fact that it can't be used to revive downed companions, and i can't get to the bottom of the issue.

 

To test and track down the problem, I've tried simply duplicating the vanilla stimpak and only changing its EditorID, so it is identical to the vanilla stimpak in every way other than the EditorID, and EVEN THEN it won't pick up downed companions. So that makes me think it's a script, which points to the specific vanilla stimpak ID via a property, but the only scripts i've found concerning stimpaks are those that only reference keywords, such as "objectTypeStimpak", or "playerCanStimpak". None of them use a property that points directly to the vanilla stimpak.

I'm at my wit's end with this, can anyone shed some light on this?

 

Thanks

Link to comment
Share on other sites

There are forms called 'Default Objects', which let's the game engine access forms used for certain hardcoded features. I can't bring up the CK at the moment to verify, but I believe there is a default object that points to the stimpack. It could explain why your stimpack (even if an identical copy) doesn't work as the standard stimpack. Unfortunately I don't know if there's a way around it :S

 

/Sabrina

Link to comment
Share on other sites

I can answer this one with some authority. I've been banging my head against stims for almost a year now.

 

Basically the answer is this: "Stimpak" seems to be a hardcoded archetype, and so if your custom stim uses that archetype, it's also going to have a lot of the default effects. If you create a custom stimpak and simply CALL it a stimpak, but it's not the archetype, it won't recover companions. (It's also possible that "archetype" means its a one-of-a-kind hardcoded item. I don't know - I simply went around the problem.)

 

What you have to do is emulate the recovery step via a script. There's a software switch in HC_Manager that enables and disables companion autorecovery, and you have to flip the switch on for a few seconds and then shut it off again, and then check back to make sure they got up. It's a bit tricky, but when it works, it's virtually indistinguishable from the vanilla archetype recovery process.

 

Take a look at the script source for my mods Companion Heal Thyself and Insult to Injury. They both do exactly that.

Edited by Greslin
Link to comment
Share on other sites

Thanks for the information Greslin. I took a look through some of the scripts, however I was unable to view the source for a couple due to (i think) them being .psc, and not .pex.

I see that it's a hardcore mod only, was that a design choice or a limitation? As in, could this work-around be tailored to other difficulties?

 

And to clarify, having the companion heal themselves with it would be great, but the main issue here is the player manually reviving their downed companion with the custom stim.

When you look at the downed companion, and you only have the custom stim in your inventory and no vanilla, the on-screen prompt doesn't even show up to complete the revive.

Edited by XI57
Link to comment
Share on other sites

.psc files are regular text files that can be loaded in any text editor. It's the .pex files that are compiled. All my mods include the original .psc source files.

 

As to your second question, I had to go back and recheck the code. It's actually SetNoBleedoutRecovery() from the Actor script:

 

https://www.creationkit.com/index.php?title=SetNoBleedoutRecovery_-_Actor

 

My script flips that switch manually to get companions back on their feet. Should work at any difficulty level.

Link to comment
Share on other sites

I'm an idiot, haha, I didn't realize that there were essentially only 2 files, I saw the two different file types and thought there were 4.

Thank you for taking the time to help out by the way, it's easy to feel very alone when you hit a wall and don't know what to do. I'll take another look at them now.

 

Edit: Your script is so f***ing advanced for me, haha. :facepalm: mine are super basic, i'm learning all of this from scratch with no prior knowledge.

Any tips on what lines to grab out in particular to get this on the right track?

And of course, if you'll allow it, you'll get the credit.

 

I'm thinking the proper steps will be:

Add new quest, similar to yours.

Add all companion aliases to that quest.

Attach script to each companion alias.

 

Sound right?

 

Basically the macro plan is to just ditch the whole, "use this new stimpak to revive your follower" idea for, "your follower gets up on their own with this mod".

Edited by XI57
Link to comment
Share on other sites

I'm an idiot, haha, I didn't realize that there were essentially only 2 files, I saw the two different file types and thought there were 4.

Thank you for taking the time to help out by the way, it's easy to feel very alone when you hit a wall and don't know what to do. I'll take another look at them now.

 

Edit: Your script is so f***ing advanced for me, haha. :facepalm: mine are super basic, i'm learning all of this from scratch with no prior knowledge.

Any tips on what lines to grab out in particular to get this on the right track?

And of course, if you'll allow it, you'll get the credit.

 

I'm thinking the proper steps will be:

Add new quest, similar to yours.

Add all companion aliases to that quest.

Attach script to each companion alias.

 

Sound right?

 

Basically the macro plan is to just ditch the whole, "use this new stimpak to revive your follower" idea for, "your follower gets up on their own with this mod".

 

That's mostly the deal, yes. The early versions of CHT were basically that.

 

Take a look at the StimpakHealCompanionEmulate.psc file in "Insult to Injury". It's the process stripped down to the most basic. IIRC, I have a custom health regen effect attached to the fake Stimpak, and that script is attached to the effect.

Edited by Greslin
Link to comment
Share on other sites

I'm getting rather turned around trying to learn from both mods simultaneously.

 

In CHT, you added scripts to the companion aliases attached to a quest.

And in ITI, you edited the main vanilla stimpak and attached a MGEF containing the StimpakHealCompanionEmulate.psc script.

 

Which of these approaches should I be attempting?

 

I can't do what you did in ITI or they'll be compatibility issues, bc there's only 1 true stimpak the game understands as the base object, and you edited it.

And if i'm going to try the CHT approach, I literally have no idea what to pull and what not to pull. There's a ton of features in your mod that I simply don't need to meet my core objective; the quick stim, stuns, dogmeat.

If people want those features, i'll just direct them to download your mod.

I just need my custom stim to be put into their inventory, and when they go down, they get up. And that's it.

 

Also, if CHT requires all dlc's and f4se, will what I try to implement require all dlc's and f4se?

Edited by XI57
Link to comment
Share on other sites

  • Recently Browsing   0 members

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