14 April 2006

The first step in the new game has been achieved.

Or maybe the second step, the first being removing the non essential stuff from the EL client.
Anyway, right now I've managed to embed the Pawn script to the client, and add an NPC from Pawn.
Unlike the EL server, where an NPC is added by specifying all the details such as shirt, pants, noots, actor type, name, and so on, the single player version is slightly different.
There is a list of NPC types, such as rabbits, humans, elves, orcs, and so on. Each entry defines a type, and the following format is used:

[npc]
name: `Test npc 1`

actor_type: 1
shirt: 1
pants: 1
boots: 2
head: 2
skin: 3
hair: 3
shield: 0
weapon: 0
cape: 2
helmet: 0

portrait: 2
str: 30
dext: 20
intelligence: 15
luck: 8

affiliation_1: 2
affiliation_2: 1
affiliation_3: 7

unarmed_skill: 20
sword_skill: 15
staff_skill: 10
hammer_skill: 2
axe_skill: 3
[/npc]

[npc]

This format is still in the early stage, so things can change. But the idea is that all the NPCs* are defined in that file, even the NPCs that are unique such a specific person in the game, rather than a generic thing like, say, a rabbit or an orc.
So to add an NPC from small, I just have to call a function:
add_npc(npc_type,x_pos, y_pos,z_pos,z_rot,status)

*By NPC I mean anything but the players, including animals, monsters, and computer controlled people that give quests and stuff.

The next thing that I will work on is to be able to actually chat with some of the NPCs, so that they can give you quests and stuff.
If I am not lazy, I might finish that tomorrow, as it is pretty easy to do, especially since I've done it before on the server.

3 Comments:

Blogger Donny said...

Reminds me of some sort of in game editor you could even implement, allowing an Admin or GM to create NPC's at the location of their mouse or character. Would make changing the game world much easier, was this done in Eternal-lands? Or was it stored in the map. But sounds very cool will make editing a lot easier for non programming types. Gotta love scripts makes a programmers life so much easier later down the road.

14/4/06 19:39  
Blogger Radu said...

The admins can add animals and monsters on demand, in the invasions.
However, adding a quest NPC like that can't be done, since it has to be fully programmed, you can't just haveit there like a statue :)

17/4/06 21:21  
Anonymous Just Me said...

Hope you've considered the possability that bad mods might abuse this ability to get some personal monster spawns...

18/4/06 02:09  

Post a Comment

<< Home