Jump to content
  • 0
Echoes

Adding new own sprite error [npc_parseview]

Question

Hello c:
 
This time I want to ask for help about this,
I followed the instructions of how to create an .act and .spr and I think I got it correctly, and added it to my .grf file, but when I'm testing it, there is an error saying it's invalid or something, and the console shows this:

[Warning]: npc_parseview: Invalid NPC constant 'ROCA_NIVEL_01' specified in file 'npcnivel01.txt', line'60'. Defaulting to INVISIBLE_CLASS.

I declared the NPC in my .grf here: dataluafiles514lua filesdatainfoNPCIdentity.lub & dataluafiles514lua filesdatainfojobname.lub; and put the .act and .spr here dataspritenpc, where in the emulator I need to declare the new NPC?

I think I'm missing something, I read something about I need to do in the conf, but I'm not sure :C

 

Thanks in advance C:

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

I think you didn't do sprite assigning right. In jobname.lub you need to add name of sprite, in your case it'll be min_roca_n01.

[jobtbl.JT_MIN_ROCA_N01] = "min_roca_n01"

In npcidentity you need to assign same JT_ number, in this case 15000.

JT_MIN_ROCA_N01 = 15000,

Then in const.txt you need to assign 15000 to the constant you'll be naming NPC with in scripts, like:

ROCA_NIVEL_01 15000

And then inside script you need to use the constant you set in const.txt:

prt_fild08,224,128,4 duplicate(rocasuelta) Roca Suelta#01 ROCA_NIVEL_01

 

Or you can skip the constant setting and just use:

prt_fild08,224,128,4 duplicate(rocasuelta) Roca Suelta#01 15000
Edited by Garr

Share this post


Link to post
Share on other sites
  • 0

I think you should set it inside db/const.txt. NPCs start with "WARPNPC" declaration. Add your line in there:

ROCA_NIVEL_01 (number that you assigned to NPC)

Number that you assigned is the one you input into NPCidentity.lub

Share this post


Link to post
Share on other sites
  • 0

data/sprite/npc/ROCA_NIVEL_01.spr / ROCA_NIVEL_01.act

 

U data contain this files?

Nope, ROCA_NIVEL_01 is the name I gave in the jobname.lub:

 

[jobtbl.JT_min_roca_n01] = "ROCA_NIVEL_01"

 

The names of my .act and .spr are both min_roca_n01I will use the name as the .act and .spr, and ending like this:

prt_fild08,224,128,4	duplicate(rocasuelta)	Roca Suelta#01	min_roca_n01

 

_____________________________________

 

 

 

I think you should set it inside db/const.txt. NPCs start with "WARPNPC" declaration. Add your line in there:

ROCA_NIVEL_01 (number that you assigned to NPC)
Number that you assigned is the one you input into NPCidentity.lub

Ok, will try it now C:

 

 

 

Thanks for replying, both of you!

 

 

_______________________________

 

EDIT

 

 

Now I got this error ;0;

[Error]: status_set_viewdata (NPC): No view data for class 2000001.txt

Gave my NPC an ID of 15000

 

 

 

 

My const.txt:

MIN_ROCA_N01	15000

 

My NPCIdentity.lub:

JT_MIN_ROCA_N01 = 15000,

 

My jobname.lub:

[jobtbl.JT_MIN_ROCA_N01] = "MIN_ROCA_N01",
Edited by Echoes

Share this post


Link to post
Share on other sites
  • 0

 

Not good on this clientside, but try to use NPC ID# 15000 for that?

 

map,x,y<tab>script<tab>script_name<tab>15000,{

Yep already test that, and got the same error specified above.

 

_________________

 

 

I think you didn't do sprite assigning right. In jobname.lub you need to add name of sprite, in your case it'll be min_roca_n01.

[jobtbl.JT_MIN_ROCA_N01] = "min_roca_n01"
In npcidentity you need to assign same JT_ number, in this case 15000.
JT_MIN_ROCA_N01 = 15000,
Then in const.txt you need to assign 15000 to the constant you'll be naming NPC with in scripts, like:
ROCA_NIVEL_01 15000
And then inside script you need to use the constant you set in const.txt:
prt_fild08,224,128,4 duplicate(rocasuelta) Roca Suelta#01 ROCA_NIVEL_01
 

Or you can skip the constant setting and just use:

prt_fild08,224,128,4 duplicate(rocasuelta) Roca Suelta#01 15000

Does it neccesary has to be ROCA_NIVEL_01 at const.txt? In case I want to change the name of the sprite, what should I do?

 

I will test your suggestions now :D

 

_______

EDIT

_______

 

Not worked, still getting the error

[Error]: status_set_viewdata (NPC): No view data for class 1500001.txt

:C

Also getting the @disguise 15000 invalid NPC/monster ID error

Edited by Echoes

Share this post


Link to post
Share on other sites
  • 0

 

Not good on this clientside, but try to use NPC ID# 15000 for that?

 

 

map,x,y<tab>script<tab>script_name<tab>15000,{
Yep already test that, and got the same error specified above.

 

_________________

 

I think you didn't do sprite assigning right. In jobname.lub you need to add name of sprite, in your case it'll be min_roca_n01.

 

[jobtbl.JT_MIN_ROCA_N01] = "min_roca_n01"
In npcidentity you need to assign same JT_ number, in this case 15000.

JT_MIN_ROCA_N01 = 15000,
Then in const.txt you need to assign 15000 to the constant you'll be naming NPC with in scripts, like:

ROCA_NIVEL_01 15000
And then inside script you need to use the constant you set in const.txt:

prt_fild08,224,128,4 duplicate(rocasuelta) Roca Suelta#01 ROCA_NIVEL_01
 

Or you can skip the constant setting and just use:

prt_fild08,224,128,4 duplicate(rocasuelta) Roca Suelta#01 15000
Does it neccesary has to be ROCA_NIVEL_01 at const.txt? In case I want to change the name of the sprite, what should I do?

 

I will test your suggestions now :D

 

_______

EDIT

_______

 

Not worked, still getting the error

[Error]: status_set_viewdata (NPC): No view data for class 1500001.txt
:C

Also getting the @disguise 15000 invalid NPC/monster ID error

npc values are hardcoded in server, so for using that high npc id, you need to edit npc.h and recompile the server. So that server recognizes it as an npc.

Share this post


Link to post
Share on other sites
  • 0

npc values are hardcoded in server, so for using that high npc id, you need to edit npc.h and recompile the server. So that server recognizes it as an npc.

:o! Yeah, I remember something aboout I needed to edit something.h, since I created a new mob, its similar to NPC.. yeah...

 

..

 

It worked :D!!!! First time I created a NPC sprite *-* awesomeeeeeeeeeeeeeeeeeee!!!

 

Thank you all for all your support :D!

 

Cool C:!

 

___

 

Which one of you guys I choose to 'Mark Solved', everyone helped, so I don't know x_x

Edited by Echoes

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.