Jump to content

Converting existing basic NPC into a Companion Possible? (Scripting!)


Recommended Posts

I am just starting in modding. So apologies if this is a really old question that has been answered a thousand times already.

 

I've been trying to convert Ranger Ghost to a companion. I know this Mod already exists. But the mod changes her to her vanilla state, or one other modded version (Can't remember what it is called) I am wondering if there is a way to change her to a companion while still having her be effected by other Mods that alter her appearance?

 

I know I could make her with the assets provided by the other Mods, but I would like her to change with whatever new mods I might introduce. I've also figured out how to set up A.I. Packages, Change Stats, Apply appropriate Factions, and Traits. The biggest wall I've hit is with the scripting. The only tutorials I could find were for making new NPC's, and very poorly done. I will keep looking around, but having someone post WORKING script would help IMMENSELY!!!

 

Thank you so much! In advance for your time, and support.

Link to comment
Share on other sites

Hey there,

you can add AI packages also via script.

 

I personally have no experience with that, but you may check out the functions and think about how you want your NPC companion to react, by adding / removing / evaluating packages.

So you can set up your very own AI packages in your mod and add them dynamically ingame.

 

http://geck.technodeep.net/index.php/Category:AI_Functions

(The two packages listed in the link below are also included in the above function list, but be aware what you need for them. :wink:)

 

For these you need the JIP LN NVSE plugin:

http://geck.technodeep.net/index.php/Category:AI_Package_Functions_(JIP)

Link to comment
Share on other sites

Oh s#*!! Great resource! Thank you so much! At first glance. It doesn't seem to have anything for the "Been Hired" protocol. I am trying to get her to function as closely to a regular companion as humanly possible. Might even try to give her a functioning side quest to get a perk.

Link to comment
Share on other sites

What's missing from the tutorials you've been seeing? I've never made a companion but most of the tutorials I've seen would be theoretically fine to guide you. What is not working exactly? Have you used SetPlayerTeammate 1 anywhere?

 

Although I'm a little disappointed in some of the negative behaviour of the person that posted, given I know the person that was trying to help them and I have a feeling OP wasn't asking the questions in a clear way (their comments are all edited), but OP did then write up a lot of what they found they had to do to make a companion, which outweighs everything else in my opinion. It seems to be aimed towards helping people that were in a similar position to yourself, so here's hoping you find it useful:

https://forums.nexusmods.com/index.php?/topic/524584-how-to-add-a-companion-wheel-to-a-custom-npc-companion/

Edited by EPDGaffney
Link to comment
Share on other sites

Trying to get a functioning script is abysmally difficult, and the tutorial videos I found weren't great. None of the scripts, or alterations made were saving. I understand his frustration, but you're right. He shouldn't have started treating people like that for trying to help. I'm glad I didn't have to deal with the same thing (don't have two computers) This helped a lot. Seriously, thank you. This was exactly what I needed.
Link to comment
Share on other sites

Oh, really? I'm glad it's helping. I understand his frustration as well. I'd say doing that write-up makes up for a lot.

 

So, you're all right now?

 

In future, I'm assuming your scripts weren't saving because they weren't compiling, and the GECK by default doesn't tell you it's not compiling, and will actually just quit when you hit OK if it's in a dialogue result script rather than an actual script form. GECK Power-Up has a proof-reader that works really well for the most part, giving you error messages and explaining to some degree where the script is failing (sometimes down to the exact line and what's wrong with it). Grab the fork of it on the Nexus.

While you're at it, I would make sure the GECK is running with NVSE, in case you run into any tutorials that expect you to have it working, and I'd have JIP LN installed in your NVSE plug-ins (JIP LN will work with the GECK as soon as it's installed if NVSE is working with the GECK).

 

The NVSE and JIP LN stuff is optional. I don't think you'd outright need it, but it makes life so much easier for a modder. GECK Power-Up on the other hand, I'd say is all but a requirement if you're a beginner at scripting and you're feeling a bit lost.

Link to comment
Share on other sites

Wouldn't the easiest way to convert an existing NPC into companion .... be to just duplicate them.

That way you don't have conflicting ID's for the scripting. They are a different NPC upon hire , but just look like them. And its a simple "Disable" "Enable" upon hire in their place.

 

Err sorry , was that already mentioned in the links ?

Link to comment
Share on other sites

I am the one who made the Ranger Ghost mod. I created a duplicate of Ranger Ghost and I swap her for the duplicate in when you hire her, exactly as Mktavish said. This is MUCH easier than trying to make the existing Ranger Ghost into a companion.

 

I have played around with adding AI packages via scripts, and in my experience it doesn't work very well. The NPC tends to run the new script until they go through a doorway or otherwise teleport. Then it seems like they re-evaluate their AI packages and pick one from their existing packages and stop running the AI package that you added.

 

If you want to give Ghost a custom appearance, that's actually fairly easy to do with my mod. Install the mod that changes her appearance, then copy that custom appearance into her duplicate in my mod so that it matches.

 

If you need help, let me know.

Link to comment
Share on other sites

That's really cool, and I might actually do that. My computer doesn't seem to be able to handle the dialog box at all. Trying to do anything in that seems to result in a very hard crash for the GECK. Berfesder, and combination of s#*! computer are the culprits here. (If you know a patch for this, that would be awesome! It might help.)

 

I know this is difficult. That's why I chose for it to be my first MOD. I've been wanting to get seriously into modding, and general game design for a long time. I've been putting it off for... Well my whole life really. So I need to jump in the deep end so to speak. Try to learn as much as I can. I've already learned A LOT in the last two days (I'm Sure I'll have to unlearn some of it along the way.) However, if that dream is temporarily put off due to temporary hardware limitations. Then I'm probably just going to do what you said.

 

Honestly, really liking all the feedback. Appreciating the support. Thank you.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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