Jump to content

Home

Recruit script not working??


Ferc Kast

Recommended Posts

I was working on my recruit mod when the script to recruit my NPC didn't work; Can anyone tell me what I did wrong? (It did compile perfectly, it just didn't work in-game.)

 

void main()
{
  RemoveAvailableNPC(NPC_G0T0);
  AddAvailableNPCByTemplate(NPC_G0T0, "p_kast");
  DelayCommand(1.5,ShowPartySelectionGUI());
}

Link to comment
Share on other sites

I was working on my recruit mod when the script to recruit my NPC didn't work; Can anyone tell me what I did wrong? (It did compile perfectly, it just didn't work in-game.)

 

In what way doesn't it work? Does it not do anything at all, or does the party member selection screen show but your new party member isn't available to choose on it?

 

The second time it says, "NPC_G0T0" it should have a number; G0-T0's number is 3.

 

NPC_G0T0 is an integer constant, it will be replaced with the value 3 automatically when the script is compiled. Thus it is correctly used in the script.

Link to comment
Share on other sites

In what way doesn't it work? Does it not do anything at all, or does the party member selection screen show but your new party member isn't available to choose on it?

 

The party member selection screens shows, but my new party member isn't available to choose.

Link to comment
Share on other sites

My original portraits are in-game (though not my most updated)...I'll check to see if I pointed my NPC to the right portrait line.

EDIT: Nope, I didn't even point my NPC to a portrait line...let alone the correct one.

 

 

Just for kicks: At the end of the script, I'm gonna add a ExecuteScript function to use a debug script that I found searching around the forum. That way, I can be sure that the script fired.

 

Hopefully, one of these two things should help correct it.

 

EDIT II: It didn't even fire the script for some reason.

Link to comment
Share on other sites

The party member selection screens shows, but my new party member isn't available to choose.

 

Is the p_kast.utc file located in the module where the script is run, or in the game's override folder? Also try to spawn an NPC from this template to see that it isn't corrupted or something.

 

I can't see anything directly wrong with that script, so the problem likely lies elsewhere.

Link to comment
Share on other sites

The spawn script seemed to spawn my NPC correctly.

 

Could it be that I originally added the NPC into the module via the GIT file? (Which too required the Tag and TemplateResRef field.) I think that may be what the problem is.

 

EDIT: The recruit script works perfectly now; Though, I can't tell what the difference is from before...Now, I just have to eliminate the twin.

 

EDIT II: I combined both scripts and it worked perfectly. So, that is all solved.

 

To rejoice in said solution, here is my pic from the party selection screen (with the outdated portrait):

K2_00278.png

 

EDIT III: I realized that the reason it didn't work before was that I didn't set the tag of my recruitable NPC to the NPC tag that I was going to replace.

Link to comment
Share on other sites

I now need a script to check if G0-T0 is in the party. (Apparently, the game thought I had G0-T0 after I was done with the Red Eclipse fight; Therefore, it didn't let me continue the main quest.)

 

EDIT: Never mind; I searched the forum and found exactly what I needed.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...