Instanced trash mobs
Instanced trash mobs
I'm wondering about the plans on how to handle multiple instances of the same actor. Right now they are all handled as unique actors in the database as far as I know, when in reality many of them are just clones.
Let's talk for instance of the Wasplings outside Khal. They should all have the same loot table, faction, abilities, and pathing. Pathing should be a random walk in a certain radius around the spawn point, so the LUA script should be identical. Maybe they should all have the same stats as well.
So how could we let a computer do most of the work instead of having a human make a lots of cut and paste errors?
There's at least three commonly used approaches for this...
1. Have a parent id in the database and fetch undefined fields from the parent instead.
2. Let the database tool handle it. For instance a 'copy all but location from other ID' functionality.
3. Let the designers handle it. They need something fun to do as well, so let them update 100 identical actors.
Let's talk for instance of the Wasplings outside Khal. They should all have the same loot table, faction, abilities, and pathing. Pathing should be a random walk in a certain radius around the spawn point, so the LUA script should be identical. Maybe they should all have the same stats as well.
So how could we let a computer do most of the work instead of having a human make a lots of cut and paste errors?
There's at least three commonly used approaches for this...
1. Have a parent id in the database and fetch undefined fields from the parent instead.
2. Let the database tool handle it. For instance a 'copy all but location from other ID' functionality.
3. Let the designers handle it. They need something fun to do as well, so let them update 100 identical actors.
Re: Instanced trash mobs
My main line of experience is with the Ragnarok Online emulator eAthena and this is how they do NPC spawns like that (where one enemy is spawned identically in various areas).
There is an NPC database housing the core values for the mob (mobID, HP, spriteID, drops, etc). The mob placement is scripted per zone. So if there are a possible ten spawns in a zone there will be ten entries indicating where they spawn, what their spawn time is, and what sort of pathing behavior they have is.
I haven't had a chance to look through our DB yet but I assume it is somewhat similar? There would be no reason to have multiple mob IDs if each one has the same core data associated with it.
There is an NPC database housing the core values for the mob (mobID, HP, spriteID, drops, etc). The mob placement is scripted per zone. So if there are a possible ten spawns in a zone there will be ten entries indicating where they spawn, what their spawn time is, and what sort of pathing behavior they have is.
I haven't had a chance to look through our DB yet but I assume it is somewhat similar? There would be no reason to have multiple mob IDs if each one has the same core data associated with it.
- John Adams
- Retired
- Posts: 4583
- Joined: Wed Aug 28, 2013 9:40 am
- Location: Phoenix, AZ.
- Contact:
Re: Instanced trash mobs
The point of my Unreal parser "consolidation" effort is to eradicate duplicates wherever possible. If a Waspling in Khal looks and acts exactly the same as 100 other wasplings, there is 1 spawn_id, and 100 spawn_location_placements. It is essentially 1 spawn, 100 times. Yes.
For their stats, we received no NPC stats via collector, so they are either going to need to be programmatically derived, or set by a tenacious content designer. If there is a base calc (str = level * 5 + 1) then we can apply that automatically either in the DB or via LUA script.
Which is my final point; LUA will be able to augment anything (when we're done with it), including stats and movement. All movement will be via LUA (as laid out in detail by me here). Random wanderers will be simple; they will get 1 script of varying types - small_circle.lua, large_circle.lua, random_path.lua, whatever. We can have a couple different LUA scripts just for movement, and assign 1,000,000 trash mobs to 3 scripts and call it done.
Usually an NPC gets a unique LUA script when it's more than just wandering around. If it interacts (dialogs/quests) or does something diabolical at 50% health, or explodes upon death. The system is sound (EQ2's) and we'll be pulling from that for much of our LUA implementation.
Great question, hope this answers it.
For their stats, we received no NPC stats via collector, so they are either going to need to be programmatically derived, or set by a tenacious content designer. If there is a base calc (str = level * 5 + 1) then we can apply that automatically either in the DB or via LUA script.
Which is my final point; LUA will be able to augment anything (when we're done with it), including stats and movement. All movement will be via LUA (as laid out in detail by me here). Random wanderers will be simple; they will get 1 script of varying types - small_circle.lua, large_circle.lua, random_path.lua, whatever. We can have a couple different LUA scripts just for movement, and assign 1,000,000 trash mobs to 3 scripts and call it done.
Usually an NPC gets a unique LUA script when it's more than just wandering around. If it interacts (dialogs/quests) or does something diabolical at 50% health, or explodes upon death. The system is sound (EQ2's) and we'll be pulling from that for much of our LUA implementation.
Great question, hope this answers it.