Jump to content
  • 0

Instancing NPCs


Azura Skyy

Question


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  545
  • Reputation:   220
  • Joined:  03/01/13
  • Last Seen:  

Is it possible to instance NPCs on an existing map (Prontera for example) while having them entirely disabled on the non-instanced version?

 

OnInit:
	disablenpc "Example#1";
	end;
OnInstanceInit:
	enablenpc instance_npcname("Example#1");
	end;

Using this sort of setup (even when trying to trigger the label directly with 'donpcevent,' I can't get the NPC to hide in the instance. I could easily fix the issue by making a 1@prontera (as all other instances do), but it just seems like a developing shortcoming of rAthena if it is unable to instance NPCs without assigning them to a different map.

I should clarify that I've played through the Nydhoggur's Nest ad Sara's Memory instance and referenced both of those files while creating my own instance and they both rely on a map that is exclusively used for the instance.

Thanks in advance,
~Azura Skyy

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

I've been using 

OnInit:
	hideonnpc strnpcinfo(0);
	end;

OnInstanceInit:
	hideonnpc instance_npcname(strnpcinfo(0));
	end;

Successfully for a while now.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  545
  • Reputation:   220
  • Joined:  03/01/13
  • Last Seen:  

The problem with hiding an NPC on a map is the shadow it leaves. In this case you will see like 15-20 shadows in a 10x10 cell area and it'll look really bizarre. I guess I'm struggling to understand why we have OnInstanceInit and OnInit if you can't toggle enable/disable on them as desired.

Needless to say, in your experience, a different map is the only way to fix it?

Regards,
~AzuraSkyy

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

Only people with GM sprites are able to see the shadows. They are invisible to regular players, though they still take the cell. The thing is, disablenpc does the same.

You could also try moving the npc under the OnInit: label, and leaving the instance NPC in place. Not sure how that'd respond.

Edited by Nova
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  545
  • Reputation:   220
  • Joined:  03/01/13
  • Last Seen:  

Only people with GM sprites are able to see the shadows. They are invisible to regular players, though they still take the cell. The thing is, disablenpc does the same.

You could also try moving the npc under the OnInit: label, and leaving the instance NPC in place. Not sure how that'd respond.

Taking up the cells would be quite bothersome. I've gone ahead and started to pull maps from my grf. 1@maps incoming. It's all good, this'll be fine. Just an extra step.

Thanks for your replies,

~Azura Skyy

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

Don't mention it, the cell taking issue is something that's bothered me as well. I've considered modifying my source so that disabled/hidden NPCs don't count as if they're taking a cell myself.

Edited by Nova
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...