1. Please be advised of a few specific rules and guidelines for this section.

WIP Mob Invasion Spawner

Discussion in 'NPCs and Creatures' started by Doctor Shotgun, Jul 18, 2015.

  1. Doctor Shotgun

    Doctor Shotgun Lucky Number 13

    Hello folks, I'm a relatively new Starbound player and I'm here to attempt my first mod. I have a small amount of programming experience and no experience with LUA, so this is going to be a learning experience. I've extracted the game assets and been poking through the files to figure out how to do some stuff. If any experienced modders have advice, please share.

    The Idea:
    So, you've gathered a bunch of resources and built an amazing fortified base, complete with villagers, merchants, guards, defense turrets, and whatnot. But...nothing is even wandering near your base besides a couple lost monsters that get killed in seconds! Fear no more, the aim of this mod is to add an object (tentatively called the invasion beacon) that, when active, spawns in numerous hostiles to attack your base. Can you hold them off, or will your stronghold be overrun by the masses?

    Current Progress:
    -Implemented wave-based spawning! There's currently a 25 second delay before the next wave will spawn, regardless of whether or not the current wave was defeated.
    -Added large biped, Dreadwing, Shockhopper Mk I, and Dreadwing Redux (enhanced version of Dreadwing that has some extra tricks up his sleeve)
    -Waves begin spawning upon interaction with the beacon, beacon becomes uninteractible until all waves have finished spawning
    -Download removed until more progress is made

    I've cooked up a very rudimentary version of the mod by messing with a few vanilla files for the monster spawner and largequadruped, just to test if my concept seems to work. You can try it out if you want, but it's admittedly very feature-sparse at the moment.

    -Two invasion beacon items "invasionbeaconwest" and "invasionbeaconeast" that must be spawned in with admin commands, they summon mobs to attack from the west and east respectively (50 units to the west/east).
    -Modified copy of the largequadruped at level 1 is currently the only mob that spawns. The modded copy has no aggro sound, an aggro range of 250 tiles (arbitrarily large number), and only drops pixels on death.
    -During testing, spawned mobs immediately aggro onto the player or friendly NPCs (guards) and begin moving toward my small base to attack.

    -Rewrite the spawn logic to fit the purpose better (currently just a clone of the vanilla monster spawner code)
    -Spawn more types of mobs, obviously
    -Different types of invasions
    -Wire activation:
    *Mobs spawn directly on the beacon, so the player can place it at the optimal location and activate it using a wire. This would resolve any issues with terrain blocking the mob spawn locations (unless the player purposely places it to get the mobs stuck).
    *Initial activation by wire, then automatic shutdown when the invasion is complete/defeated​
    -Custom loot table for invasion mobs
    -Clean up the spawned mob behavior files so that they doesn't eat up a lot of CPU power when many are active

    Questions/Concerns for Experienced Modders:

    I'm not familiar with the names of built-in functions and variables within Starbound, so if there's a database of those it would be helpful.

    -Any tips on wire activation welcome - I've never even used the wiring system in-game, so you can probably guess my level of knowledge in this area.
    -Is there a way for the beacon's script to keep a kill count/score for spawned monster deaths?
    -Spawned mobs will only aggro to the base if they have line of sight on a player or NPC within the base (?)
    -Creating a custom set of loot tables for the invasion mobs

    Anyhow suggestions/tips are welcome, just be nice please :).
    Last edited: Jul 19, 2015
    RatixFarrence likes this.
  2. hurtlam34

    hurtlam34 Space Spelunker

    how do i get your mod i voted yes btw[DOUBLEPOST=1444941960][/DOUBLEPOST]and it seems great[DOUBLEPOST=1444942201][/DOUBLEPOST]hey i have an idea for the mod you should make tiered wooden all the way to titanium window and door barricade

Share This Page