Creating my first npc.

07/11/2013 06:28 CriticallyDev#1
I'm going to keep this brief and short just because it's already 12 am... ._.

I've been trying to implement my first Npc on Impulses base but I can't seem to make it happen. And for some reason the Npcs that spawn in-game are the ones I saw on the Albetros source which I use to mess around with before I realized I couldn't really do anything in terms of progress on it.

I did create a npcs table following the information given in the NpcSpawn packet but that however did not make a difference. I tried a couple of ways to change the Npcs name that appear in-game but i'm not sure if they even exist because there's no SQL table that stores NPC information.

The closest I was able to get towards moving/creating/changing an NPC was on the Npcs.txt.

If this is confusing I do apologize,

Here's an [Only registered and activated users can see links. Click Here To Register...]
summarizing my issue.

Thanks in advance.
07/11/2013 06:38 go for it#2
with common sense i would tell you that it's client side, there is an ini at the client for adding an effect on npc or even rename it (if i recall that correctly)
gimme a sec
edit :
it called npc.ini
here is a snippet from inside
Quote:
[NpcType1]
Name=Storekeeper
SimpleObjID=0211
StandByMotion=999001100
BlazeMotion=999001190
RestMotion=999001101
Effect=none
ASB=5
ADB=6
FixDir=0
i duno if that would work or not but it's definitely worth a shoot, maybe anyone could confirm what i just said
07/11/2013 07:33 CriticallyDev#3
That's one way of changing the Npc's name I suppose..

It is a successful method but wouldn't that require constant client-sided updates when changing and/or editing an NPC? :s
07/11/2013 08:10 go for it#4
Quote:
Originally Posted by CriticallyDev View Post
That's one way of changing the Npc's name I suppose..

It is a successful method but wouldn't that require constant client-sided updates when changing and/or editing an NPC? :s
well of what i know is that npc mesh isn't just a mesh, what i mean is
when server tell the client to show x npc, the client goes to the ini files and get the effect to add on the npc, it's name and other stuff (motion/face/whatsoever)
so yeah i think the only way possible is to constantly update clients, won't be a big deal with a nice auto-patching system/server (which what tq does anyway)

but i think it's possible with some reversing to change the client packet structure to get the name/effects from packets but this would definitely need a nice RE skills (which i personally don't have yet, i guess umm code cave with redirection both ways, saving the new bytes and patch the client to use them instead of the one at npc.ini, that's how i think it could be done but again im struggling to get better at asm)

anyway goodluck :)
07/11/2013 17:50 CriticallyDev#5
I don't think all of that is really necessary just to implement NPC's onto the world server. :x

I was wondering though if making the source read the npcs.ini(copied from the original client) would have the real npcs showing and could be edited/updated without the need to constantly update the client.
07/11/2013 20:08 Super Aids#6
You always need to update the client unless you're going to do some reverse engineering.

TQ is dumb and does everything static, rather than being dynamic.
07/11/2013 22:04 pro4never#7
Quote:
Originally Posted by Super Aids View Post
You always need to update the client unless you're going to do some reverse engineering.

TQ is dumb and does everything static, rather than being dynamic.
The client supports npc names being sent as part of the packet.

There's no need at all to force the client side files when you can just send the name from your server's db.
07/12/2013 01:50 CriticallyDev#8
Quote:
Originally Posted by pro4never View Post
The client supports npc names being sent as part of the packet.

There's no need at all to force the client side files when you can just send the name from your server's db.
Are you suggesting to have the source read the npcs SQL table and send npc updates to the client? o.o
07/12/2013 02:23 pro4never#9
... The server already has to send a spawn npc packet for the client to see npcs. As part of that spawn npc packet you can specify the npcs name (which the server already knows when it originally loaded the database)


Look at any number of public sources for how to add the npc name explicitly in the spawn packet. I know we did it in albetros and many other sources do the same.
07/12/2013 03:10 Super Aids#10
Quote:
Originally Posted by pro4never View Post
The client supports npc names being sent as part of the packet.

There's no need at all to force the client side files when you can just send the name from your server's db.
I know. I am storing the names on the server, you have to use flag 2 I think for it to work.

I was referring to updating the other things though lols. Just like how useless monster.dat is.