TUTORIAL 1.5 FILES
Here is the link to the files of the tutorial 1.5. Sorry, I didn't have time yesterday when I came back from work, I basically ate and went right to sleep. You can compare what you did wrong by seeing how I wrote the script.
https://drive.google.com/open?id=1ou6MxDkFtvkVN4NZyJwBS_TvZwJVSFJPYour line of code here doesn't seem to be wrong. My explanation wasn't really precise enough last time.
id = generator.AddNPCShipToSystem("Jonas Temple", "JonasTemple", 1, "special_jonas_temple", sys_id, chosenBase.coord.x, chosenBase.coord.y, { class: "agent", unique_id: "jonastemple", meta: "human", sex: "male" }); // Jonas Temple
Now you need to go Inside the generic_quests folder and open up your quest .js file. Inside of that file, you should have this function here:
function OnCheckRequirements()
{
var npc_id = topic.GetCurrentNpcShipId();
if (npc.GetTag(npc_id, "class") == "TUTORIALNPC")
{
return true;
}
return false;
}
As you can see, if you read between the lines it says: if the NPC Class is TUTORIALNPC, then "activate" this quest script for this NPC. So basically, if we use your code, the OnCheckRequirements that you should use should be:
function OnCheckRequirements()
{
var npc_id = topic.GetCurrentNpcShipId();
if (npc.GetTag(npc_id, "class") == "agent")
{
return true;
}
return false;
}
and that's because your NPC class is "agent". But if you use multiple NPC's with the class "agent", then all of those NPC's are gonna have this quest script available when you talk to them.