Forgottenserver: NPCs loading with npcs.xml.

Created on 10 Aug 2013  路  11Comments  路  Source: otland/forgottenserver

Hello,

I would like to suggest possibility to spawn NPCs from inside the npcs.xml file.
An example of it would be the following:

<?xml version="1.0" encoding="UTF-8"?>
<npcs>
    <npc name="Ahmet" file="Ahmet.xml" home="33126,32810,6" radius="2" />
</npcs>

home = spawn position
radius = walk radius

Thanks.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

enhancement

All 11 comments

Dont like this and I think this is unneeded if you ask me :-1:

I like this, but add also 'rotation' parametr.

This should be in the npc XML file not in another XML then I agree with this enhancement, also there are already a walk radius option

@conde2
Having this in the npc file will not let you spawn clones of it (unless the home will be a table then). Also, that would require the engine to parse whole npc/ directory which is not needed.

@EvulMastah

If you think better there are no reason of not reading the entire npc/ directory, if there will be only the npcs used in the server, although you paste useless files. I think this way is more clear to see where the npc is located, but yes this issue that you related is something relevant.

By the way i was thinking and there are another problem with this, all the map editors should need be adapted for this

I advise you not to think. This file is optional, you dont have to use it, map editors does not need to support it. This is only for the hosters comfort. You dont have to restart the server to change npc location, just reload them etc.

I like this suggestion and approve. Especially the organization of nps in folders of their respective cities. As for the Radius and Position is a good suggestion too, but not as an emergency as the loading of npcs through a main file that is sorely needed.

I think that's redundant considering we're moving towards revscriptsys direction in which we can just spawn npcs through Game.createNpc(...)

We don't spawn monsters or anything else this way (from xml directly) so there is no need for consistency. Last time I've seen pos in xml being used in places other than spawn file was readables for 7.6 ots iirc. We can move away from it.

7 years later xD

I'm looking through old issues to see what can be closed

I don't like it either, see no problem with the current spawning system on the spawn.xml file, also we would need to edit RME in order to make it work with this change

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GoularPink picture GoularPink  路  4Comments

RafaelVidaurre picture RafaelVidaurre  路  4Comments

zeeb92 picture zeeb92  路  4Comments

dudantas picture dudantas  路  4Comments

marksamman picture marksamman  路  3Comments