Just throwing out an idea I am planning on working on at some point:
[1] New static array: mob_info.
[2] New field on each monster: mob_idx.
[3] When a mob is generated, a mob_info record is initialized and all monsters in the mob get the same unique mob_idx.
[4] The mob_info controls AI for the entire pack.
[5] Different mobs can behave differently.
[6] Mobs can have a boss. Kill the boss, and the mob breaks morale (mob_info.ai = MOB_FLEE or something).
[7] Kill a member of the mob, and the entire mob rolls a morale check.
[8] Wake up a member of the mob, and it will attempt to wake up its buddies.
etc. But I think this sort of implementation would be rather efficient, and offer up a lot of opportunities for flexible monster behavior.
Anyway, I haven't done it yet ... but maybe somebody else can beat me to it and let me know how it works out
Cheers,
--Chris
[1] New static array: mob_info.
[2] New field on each monster: mob_idx.
[3] When a mob is generated, a mob_info record is initialized and all monsters in the mob get the same unique mob_idx.
[4] The mob_info controls AI for the entire pack.
[5] Different mobs can behave differently.
[6] Mobs can have a boss. Kill the boss, and the mob breaks morale (mob_info.ai = MOB_FLEE or something).
[7] Kill a member of the mob, and the entire mob rolls a morale check.
[8] Wake up a member of the mob, and it will attempt to wake up its buddies.
etc. But I think this sort of implementation would be rather efficient, and offer up a lot of opportunities for flexible monster behavior.
Anyway, I haven't done it yet ... but maybe somebody else can beat me to it and let me know how it works out
Cheers,
--Chris
Comment