Modding Help Crafting through tech/items?

Discussion in 'Starbound Modding' started by SpectralGhost, Mar 26, 2014.

  1. SpectralGhost

    SpectralGhost Master Chief

    Alright, so after searching for a few hours, I have yet to find how I could POSSIBLY implement this. I believe it's impossible with items, but is it possible to open EXISTING, vanilla crafting interfaces with lua scripts? Here's what I've got so far

    Modified blink.lua

    Code:
    function input(args)
      local currentPosition = tech.position() -- Gets your chars position that we can use later
      if args.moves["special"] == 1 then
        return "blink"
      end
      if args.moves["special"] == 2 then
        return { "OpenCraftingInterface", {config = "/interface/windowconfig/craftingtable.config",
            filter = { "plain" } }}
      end
      if args.moves["special"] == 3 then
        world.spawnMonster("glitchknight", { currentPosition[1] - 15, currentPosition[2] + 10 }, { level = 1, scale = 2 } )
      end
      return nil
    end
    All of it works except the interface part. The second that code runs the game crashes with this error in the log:
    Code:
    Error: VariantException: Cannot convert from list to string
      Variant::toString()
      TechController::tickMaster(float)
      Player::tickMaster()
      WorldClient::update()
      UniverseClient::update()
      ClientApplication::updateRunning()
      ClientApplication::update()
      StarApplicationBase::run()
      _SDL_main
      _console_main
    
    I'd appreciate any help you guys could offer... I'm at my wit's end trying to troubleshoot this.
     

Share This Page