Jump to content

Problem implementing npc rathena


Yaziid91

Recommended Posts


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   0
  • Joined:  04/20/19
  • Last Seen:  

Hello, I have a question about implementing custom NPCs. I've added my IDs and names to my two source files, as well as to my two files in datainfo. I created a GRF file containing only the sprites in the npc folder, but the client indicates that sprites are missing from the ¸ó½ºÅÍ folder. I'd like to know how to keep the NPCs only in the npc folder and not in the monsters' folder. Thank you!

image.png?ex=6726037c&is=6724b1fc&hm=bbadd3edda5a17fd93bf5ce55538ff1d77d28734e2070447b92d6ac252271d9b&=

If i use only npc folder i have this error image.png.c54795fd21a456bf49e24cb7f14a57ea.png

Edited by Yaziid91
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   1
  • Joined:  03/15/22
  • Last Seen:  

OP, just a suggestion, I recommend changing GRF encoding to korean, so we can make the names a bit more readable.

 

Spoiler

Tools > Settings > General > Display Encoding >Korean (949)

This will not affect the performance of the game. However Windows will bitch a bit when it comes to managing files if you don't have the Korean language pack.

 

Anyways, to the Q.

몬스터 (¸ó½ºÅÍ) is indeed for monster. But know that the game can load monster sprites just as well as NPCs, regardless on which folder they are located  this is easely noticeable in older clients where talking to an NPC has an attack cursor on it, that means its using a monster sprite as if it was an NPC's

Your error is because it appears that it can not find the .SPR file, if that is true, please add the .SPR file alongside the .ACT with the SAME name.

Please go thru this checklist:

1. Made sure that the custom GRF is at the top (so it loads first).

2. Add the .SPR and .ACT file with same name in the SAME folder ,in this case npc ..

3. If that fails, that means something's off with the ID assignment. Make sure you placed the NPC ID in the correct Lua file. Im sure you know this already but overlooks can happen, just making sure its clear.

 

luafiles514 > lua files > datainfo > jobidentity.lub , jobname.lub and shadowtable.lub

a monster sprite requires jobidentity.lub, while a npc sprite needs to have their id palced in npcidentity.lub

jobidentity.lub

Assigns SPRITE ID to NPC AEGIS NAME. Has to be the same as the one you used

Spoiler

image.png.17ac57317d6845abfecaabac2eea7dab.png

 

jobname.lub

Reassigns AEGIS name, be careful that it is IDENTICAL to jobidentity. And the grey name has to be IDENTICAL to sprite name. Follow the format.

 

Spoiler

image.thumb.png.52755373403e91fde0e7a2680b91aedb.png

 

shadowtable.lub

Assigns a shadow size to NPC (irrelevant for this error but makes the NPC complete).

 

Spoiler

image.png.34d2b58ab5e3be3bf67919d425a392a7.png

 

4. Double check NPC script and make sure the ID used is the same as the one in jobidentity.lub

 

This example has a "mob NPC" (mob sprite being used as an NPC) so maybe its not the best, but the lua file arrangement is the same.

If that else fails please post the complete lua files. Good luck.

Edited by annicellin
correcting formatting
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
Reply to this topic...

×   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...