Leaderboard


Popular Content

Showing content with the highest reputation on 06/10/2025 in File Comments

  1. 1 point
    Thanks N-DReW! I do hope to make one for K1, but some features may need a little re-working since they take advantage of TSL-only features or script functions. In effect, yes, though it's all handled via script so that they don't actually have anything in their inventory (using SpawnMine, TSL-only function). But in effect, if an enemy NPC can see the player (or any hostile creature) they'll have a chance to place a hostile mine down directly in front of them and between you. They'll then move back a bit so they can't get hurt by their own mine. The chance of placing it depends on whether the potential blast area is clear of creatures or other mines, how far the nearest hostile is (they won't just place one at your feet), and a little RNG. Their "inventory" so to speak is handled in the script, so that different enemies have different lists of mine types they can randomly choose from. The number of mines each NPC can place is stored in an unused local number, though I just capped it at 1 for everyone. There's not really much need or opportunity to have them place more than one. I will admit it's a wee bit hacky since it's handled outside the standard combat AI routines, though this allows for compatibility with mods like Improved AI or others which edit the default creature scripts, and it seems to work well from my testing!