1. Hey Guest! We've announced our new game Wargroove, check out the new forums!
    Dismiss Notice

Modding Help Is there somewhere we can see the scripts used by console commands?

Discussion in 'Starbound Modding' started by xaliber, Feb 12, 2017.

  1. xaliber

    xaliber Orbital Explorer

    I've been trying to figure out if console commands such as /spawnmonster, /spawnitem, /spawnnpc, etc actually calls a Lua script somewhere in the assets. Because they have JSON parameters, so I think they might be calling a script hidden somewhere.

    Haven't been in any luck though finding them. Do those scripts exist, or is it hard-coded?
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    They are all hard coded.
     
  3. xaliber

    xaliber Orbital Explorer

    Completely hard coded? Nothing works similarly? :( That's unfortunate...

    I see there's Monster Spawner object but I guess it's not as configurable as /spawnmonster object.
     
  4. Inf_Wolf14

    Inf_Wolf14 Giant Laser Beams

    The vanilla commands themselves are hard-coded, but the Lua API provides plenty of functions to replicate, if not extend the functionality of those commands.


    EntityId world.spawnMonster(String monsterType, Vec2F position, [Json parameters])
    Attempts to spawn a monster of the specified type at the specified position. If parameters are specified they will be applied to the spawned monster. If they are unspecified, they default to an object setting aggressive to be randomly true or false. Level for the monster may be specified in parameters. Returns the EntityId of the spawned monster if successful and nil otherwise.

    But as with most things in these categories, don't jump in expecting results without a decent knowledge of Lua.
     

Share This Page