placing npc's

06/01/2012 00:34 t0pr0#1
hi everyone,

i'm kinda new with coding for conquer.
i know some C# and i've made some NPC's (which should work)
but now i want to place them into the game.
i've did some searching and but i didn't understand any.
i know you have to edit them in the client NPC.ini and the source.

could someone explain to me what i have to do to get those npc's in the game. i would very much appreciate it.

it's an 5565 server btw.

i also can't seem to find character.cs file... does anyone know's where i can find them?
(i'm using microsoft visual studios 2010)

i also have an auto invite that works, but the box keeps spawning unlimited till the one minute (the time that you can join) is over. it's really annoying becouse you can't talk thru that minute. any one knows how to fix this?

kind regards,

Lars
06/01/2012 00:48 diedwarrior#2
Well, first, it cant be a 5565 server, and the npcs coords are placed in the database, in npcs table, for the auto invite, maybe set a bool for it or so, bool SentInvite = false; for example. Good luck.
06/01/2012 03:29 Zeroxelli#3
To place an NPC you simply add it to your servers NPC database and reload the NPCs from the database or restart the server. You don't have to change NPC.ini at all.
06/01/2012 11:25 t0pr0#4
First of all, thanks for the reply's, i appreciate it. But im sure its a 5565 server... But im gonna try to take a look at the npc tables. Thanks for your support
06/02/2012 15:35 pro4never#5
Quote:
Originally Posted by t0pr0 View Post
First of all, thanks for the reply's, i appreciate it. But im sure its a 5565 server... But im gonna try to take a look at the npc tables. Thanks for your support
Unless you are incredibly good at reverse engineering and wrote it yourself, or spent thousands to purchase a source then it's NOT 5565.

I assume this is a trinity source knockoff closer to patch 5500 and they just advertised it as a different patch.

Are you aware what source you're using (patch number means nothing, + you're listing wrong number. Anyone can write a source to work on whatever patch they wish)? I'm guessing it's based on trinity sources as albetros has never been advertised by anything but 5518.


Regardless... you just need to change the npc spawn database and reload the server. Most sources should have a command for ingame placing of npcs (I know I added one in albetros). If there isn't a command in place, I'd suggest writing one as it makes adding new npcs so much easier.
06/02/2012 19:20 shadowman123#6
1st : Y Did u Edit on NPc.ini it isnt about NPC.Ini its About Adding the Npc Information At Your Database In npcs Table as DiedWarrior Stated Above

2nd : i Doubt its 5565 Source ...But u wanted to know where CharacterInfo.cs is Located well its in Source / Network / GamePackets Folder

3rd : Auto Invite seems to me that its Not coded to give any kind of Action beside it Keep spawning As it was sent like this way

Code:
if (DateTime.Now.Minute == 2)
{
   client.Send(new NpcReply(6, " Bla Bla Bla Started Would u like to join ") { OptionID = 70 for example });
}
so The Code means If the Minute is 2 it will keep spawning that MessageBox till the Minute Pass but if would like to fix that simple Check it with Secs too to be like that

Code:
if (DateTime.Now.Minute == 2 && DateTime.Now.Secound == 2)
{
   client.Send(new NpcReply(6, " Bla Bla Bla Started Would u like to join ") { OptionID = 70 for example });
}
Thats Gonna FIx the problem and to add Action Simply go to PacketHandler.cs Search for that packet 2031 and add Case of OptionID There and it should be The same OptionID that used by MessageBox FOr sure

Wish i helped you enough
06/02/2012 19:25 diedwarrior#7
Shadow, Second thingie is kinda gay, it works but meh, i rather use a bool.
06/02/2012 19:33 pro4never#8
To further the question on auto invite.....

If I was ever writing a new source I think I'd write a simple system to allow multiple questions for the user. Handling dialogue popups/invites is messy because if you send a new one, it overwrites the old one. This pisses off users and makes certain things messy to code.


Basically just a queue of popups waiting to be sent out. These popups contain a question string, npc id and linkback as well as an expiration time. When a popup is answered, you try to activate the next popup in queue (if not empty).

Expiration time allows you to invalidate old popups and not send them if the condition is no longer applicable (or process junk replies after the fact)


Would be a very simple system to write and would allow for some cool and more functional popups.
06/02/2012 19:47 shadowman123#9
Well i Made Good Timing for them such that they never pop up on each other beside I make Auto invites Just As Reminders Not Main Dialouge Options ..Main Dialouge would be just Normal
06/02/2012 19:55 pro4never#10
Quote:
Originally Posted by shadowman123 View Post
Well i Made Good Timing for them such that they never pop up on each other beside I make Auto invites Just As Reminders Not Main Dialouge Options ..Main Dialouge would be just Normal
There are a few times when multiple popups might be important.

EG: Logging in you might want user to vote, you might want them to select their language (auto translate npcs into their own language, even allow auto translation of player->player chat if you want), events starting, etc

It's a minor thing but still could come in handy and solve some small issues.
06/03/2012 15:36 t0pr0#11
i've been able to add my npc's and i've fixed the autoinvite problem that i had. thanks for your support. it really helped me a lot