Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Listing assembler materials inventory

Discussion in 'Programming Questions and Suggestions' started by Wax Robotic, Sep 25, 2016.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Wax Robotic Trainee Engineer

    Messages:
    3
    Hi -new here.

    I've just started with programming blocks, and my first project is to report various inventories on dedicated LCDs. I've got cargo containers down, and have figured out assembler output inventory. Maybe I'm missing something obvious, but I can't find how to list assembler materials inventory (ingots, etc). Can someone point me in the right direction?

    Thanks!
     
  2. Burillo Junior Engineer

    Messages:
    648
    Assembler has two inventories. So when you call IMyAssembler.GetInventory(0) you get the input inventory. Calling IMyAssembler.GetInventory(1) will give you the output inventory.

    i'm not sure why would you do that thought, there are many scripts on workshop which do this. if you want to do something with scripting, at least try not to reinvent the wheel :)
     
  3. Malware Master Engineer

    Messages:
    9,661
    Why not? How else to learn?

    Despite my experience, I still never use workshop scripts. I always write them myself. Why?

    Because I want to. Because it's fun. And who knows, maybe I can invent a better wheel! :p



    This is why I fight so hard to get an easy API to work with (yeah. right). Because game scripting are excellent entry portals to coding, a great way to recruit new coders.
     
    • Agree Agree x 5
  4. Wax Robotic Trainee Engineer

    Messages:
    3
    Oh right - seems obvious now. Thank you :)

    Yup! I'm still at the level where I'm giddy that I got my cargo container to display its contents on a LCD screen (maybe one or two steps past the 'hello world' of programmable blocks I'm guessing?). So I can just about guarantee about anything I come up with at this point has already been done if it's even remotely useful. But I learn by doing, and this is just a 'let's see if I can get this to work now' step in the learning process. I saw lots of examples of people accessing assembler output inventory, but had a hard time finding this. I really do appreciate it.

    I haven't ever messed with C#. It's a fun adventure. And with Space Engineers, it's my first time mixing programming and a game I am into - and I'm already really hooked on that combination. I can totally see why modders do what they do.

    Is there a complete reference somewhere? I've found a few scattered around, but everything seems outdated or incomplete.

    Thanks again.
     
  5. Burillo Junior Engineer

    Messages:
    648
    well, there used to be a convenient automatically updated API doc that was distributed with the game, but for some reason they are not any more. If you want something written, your best bet is to look at the game's source on Github. The "ModAPI/Ingame" parts of the API are the ones available in PB. However, since you're a novice, i would highly recommend setting up Visual Studio for SE development (there are a few guides for that around).
     
  6. Wax Robotic Trainee Engineer

    Messages:
    3
    I wonder what happened to the API doc. Sounds like exactly what I'm looking for.

    I've got Visual Studio for SE up and going now. There's a lot of conflicting info about what references to use, but I think I found something that works. Thanks! Intellisense is really helpful.
     
Thread Status:
This last post in this thread was made more than 31 days old.