RuAdam
Level: Master Delver
Rank Points: 157
Registered: 08-24-2004
IP: Logged
|
Scripting options for better custom monster integration (+1)
So now we have all sorts of neat stuff to script custom monsters with. Yet they still can't be seamlessly integrated. The issue I'm talking about is targeting. Custom monsters will ignore stealth/invisibility decoys and stalwalrts. Also stalwarts will ignore custom monsters. I'd like to give a few suggestions that could solve these issues.
Target of monsters/heroes imperatives.
I think these are pretty self explanatory.
I imagine that when monsters/stalwarts search for the closest target, they check the distance to every valid target. These imperatives would simply set the NPC to be a valid target.
Target monsters/heroes imperative.
Wait for valid target test
Target_X, Target_Y, Target_O script variables.
This is the other part that would solve all the problems with stealth and the like. Just like the game determines the closest valid target for monsters, it could do the same for NPCs based on their targeting imperatives. Obviously if the player is in stealth and outside their range, they wouldn't be a valid target.
Previously we'd use My_X/My_Y and Player_X/Player_Y to calculate the next move. But if we'd have these features, we could have much more seamlessly integrated custom monsters.
Finally an option to calculate distance between two points using one of the following three formulas:
1, abs(X1-X2) + abs(Y1-Y2)
2, max(abs(X1-X2) + abs(Y1-Y2)) (number of steps in an open area)
3, (X1-X2)^2 + (Y1-Y2)^2
4, Pathfinding distance (based on the pathability of the type of the invoking NPC)
This would help out greatly in scripting custom movement types.
|