Move lua_script to zonespawnentry

Old feature requests stored here for reference.
Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Move lua_script to zonespawnentry

Post by John Adams » Tue Aug 12, 2008 3:50 pm

Here's a problem Zcoretri and I were contemplating the other night. Again, we were playing with Invaders by using /spawn combine and getting our spawns cleaned up - when it occurred to me that "placeholder" spawns will likely need a different spawnscript than their rare/named pop.
Scenario:
We combined a bunch of sapswill grunts and invaders into the same spawn group. Now, occasionally an invader will pop, and mostly, a grunt. Well, the Grunts are not supposed to move... only invaders. But, in our setup, the grunt starts moving towards the guards.
Without putting NPC-checking logic into the spawnscript, I cannot think of a way to ensure they still behave like placeholders, yet act differently when they spawn.
Suggestions?

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Sat Aug 30, 2008 7:53 am

A better example of this is a sequence of placeholder mobs that pop until a Boss or rare pops.
Problem:
spawngroup_id 1 contains 4 spawns @ 25% change to pop each time. When you pop any of the placeholders, they have a spawn_script that has them act a certain way, sayings, emotes, shouts, whatever.
That 25% chance the Named/Rare/Boss pops, you might have that mob do something completely different. Give out a quest, attack everything in the zone, say different sayings, emotes, shouts, whatever... because, he's a completely different spawn. By forcing the spawn_script to cover every entry in the spawngroup, we are limited to how we can cause different interactions based on different spawns.
Solution 1:
Move the spawn_scripts field from zonespawngroup to zonespawnentry -or- zonespawns to allow attaching a single spawn entry to a script for optimal configuration. This will end up in more data to enter (the above example would have 1 unique script on the boss, but 3 entries identically the same on the other 3 spawns in the group) but offers the most configurability.
Solution 2:
Leave spawn_script in zonespawngroup, but ADD another spawn_script under zonespawnentry -or- zonespawns, and teach the server that if the zonespawnentry.spawn_script is blank, fall back to use the "general" one in the zonespawngroup.spawn_script field. If it is not blank for that particular zonespawnentry.spawn_script, load that script instead.
The effect would be that 3 placeholders spawn at 0,0,0 and shout "I'm gonna keel j00!" while the 4th, rare named spawns and shouts "I have an important mission for j00!".
Make sense?

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Sat Aug 30, 2008 8:20 am

Check out my post here: http://eq2emulator.net/forums/viewtopic.php?t=896
Let me know if that solves all your problems.

Locked

Who is online

Users browsing this forum: No registered users and 0 guests