The Inventory System Explained - Stationeers

Поділитися
Вставка
  • Опубліковано 12 гру 2024

КОМЕНТАРІ • 82

  • @malrift3027
    @malrift3027 2 роки тому +9

    You continue to exceed my understanding, but I can't wait to get into this and try to reverse engineer your system. Great job!

  • @emperador0815
    @emperador0815 2 роки тому +3

    Absolutely great! I've never seen anything so well thought out for the Stationeers game.

  • @qualityedits3083
    @qualityedits3083 Рік тому

    This is one of the most impressive things I've ever seen anyone do in a videogame

  • @novoca1n3
    @novoca1n3 Рік тому +1

    Mind blowing stuff. Must have taken ages to figure this all out.

  • @adamcolon
    @adamcolon Рік тому +1

    I was expecting a simple rundown of the games inventory system... what I got were highly detailed instructions on how to build a quantum computer complete with a quantum mechanics breakdown.

  • @nugget7236
    @nugget7236 2 роки тому +2

    Could you provide the example world? I can't seem to get it to work when I request an item to get ejected via the internal storage mem it just goes in a loop, when I use the external mem it does nothing

  • @emperador0815
    @emperador0815 2 роки тому

    Thank you for the quick answers to my questions!
    And here are 2 new questions:
    If I accidentally programmed a sorter on pin 005 in the router: Does the code ignore this command? or do I have to create new router chips?
    What happens if I accidentally programmed the same sorter number on 2 different pins?

    • @Elmotrix
      @Elmotrix  2 роки тому

      1: programming pin 5 is fine :) it's essentially ignored.
      2: you can have the same address on multiple pins. Items will go to the first one they come to. If you want to "remove" an address just program address 0. That's what they all have by default

    • @emperador0815
      @emperador0815 2 роки тому

      ​@@Elmotrix Thanks!

  • @Yotanido
    @Yotanido Рік тому

    Hey there! I've got two questions I hope you could answer:
    - Is there a reason your a-value is limited to 2 digits rather than 3? An address range of 0-99 seems a bit limiting, even if you never end up using all addresses.
    I thought maybe it wouldn't quite fit into the float, but I think it does. The item hashes seem to be 32-bit integers, adding on six nines for the B and C values, we get 4294967296999999, which needs log2(4294967296999999) = 51.9 bits. This fits in the 52 bit mantissa of a double precision float.
    (And I think you can even represent 53 bit integers with floats)
    - How does the router know if another router successfully handled a request? Or do you just rely on the timeout?

    • @Elmotrix
      @Elmotrix  Рік тому

      I'm not a computer science major, all i know for sure is that if you add more numbers the game starts to round things off. But doesn't floats use a bit for indicating negative /posiitive, and a few more for decimal marker place?
      - and yes, the other routers just time it out.

    • @Yotanido
      @Yotanido Рік тому +1

      @@Elmotrix So it actually does rounding already? Interesting... I might need to investigate that further, then.
      (Assuming you used a real hash. The same number of digits can cause rounding errors, but not with real hashes at the front)
      And yes, you are quite right with how floats work. You have one bit to indicate the sign, 11 bits for the exponent (Should be set to 1 for integers that fit into the mantissa) and 52 bits for the mantissa.
      The actual number then is basically the mantissa, and the exponent determines where in that number the decimal point goes. (All in base 2 here)
      For integers, this means if you filled out the mantissa, you can only move the decimal point to go bigger, which doubles your number. Of course, you can change the mantissa to get closer to your desired value, but this is where rounding errors will come it.
      All of this does mean, though, that a 32-bit hash in base ten, extended by another six nines, should be representable without rounding. I have not actually tested it in-game, though. I'll do that later.

    • @Yotanido
      @Yotanido Рік тому +1

      @@Elmotrix Just tried it in game. Indeed, it looks like it starts rounding a bit earlier than that. To make sure, I tested it with a very simple rust program (just storing the value in a float and printing it) and it worked fine, so I guess the game doesn't quite store it as a 64-bit float.
      I've been lied to. People on Discord said it was a 64-bit float.

    • @Yotanido
      @Yotanido Рік тому +1

      @@Elmotrix After Risu on the Discord pointed out that it might just be the tooltip that is wrong, I did another test. And indeed - the tooltip shows the wrong value. Opening it with a labeller shows the wrong value.
      Reading it with an IC, you get the correct one without rounding. Game is weird sometimes.
      It does mean that you can use the extra digit, but whenever you see a command on a tooltip, it might be wrong.

    • @Elmotrix
      @Elmotrix  Рік тому

      @@Yotanido interesting

  • @NoHypocrisy42
    @NoHypocrisy42 Місяць тому

    Where do you get the letters on the wall? Were they taken out of the game??

  • @alejandroramos8289
    @alejandroramos8289 2 роки тому

    Do you have this test room to download and understand better?

  • @dunravin
    @dunravin 7 місяців тому

    could you use less IC's now we have the "sbn" set batch named command?

  • @eternialogic
    @eternialogic 2 роки тому

    They need to give you a special motherboard so you can send data to it and show the entire inventory without you having to put in the Prehab Hash directly. I wouldn't dream of having a write-to display, but at least something better than the vending interface.

    • @Elmotrix
      @Elmotrix  2 роки тому

      game already has the Hash Generator (kit memory). if you're asking for an easy to use, searchable list of all possible items.
      If you're talking about just what is in storage, then having your trader on the storage network show you whatever you got in stock in the trader menu.

  • @CageStooge
    @CageStooge 2 роки тому

    This system is great. It took me quite a few hours and rewatching the video to figure most of it out. The only question I can't figure out is when you run a query to find out how many you have of an item in the inventory is the only place you can do that the logic memory external? I cannot work out how to do it from anywhere than physically going back to that one location (or summon a trader) but neither of those are particularly convenient. It's not a huge deal, but wanted to know if maybe I was missing something obvious. I even tried with logic mirrors but I can't work it out and it is driving me nuts.

    • @Elmotrix
      @Elmotrix  2 роки тому

      the only place to get that information is trough storage external, but you can setup an IC to "call" it for you trough mirrors or what not and give you a propper display. The AutoStocker code already include this functionality :)

    • @CageStooge
      @CageStooge 2 роки тому

      @@Elmotrix OK. Thanks. I'll take another look at the autostocker. See if I can figure out how it works.

    • @CageStooge
      @CageStooge 2 роки тому +3

      @@Elmotrix just a follow up. I have managed to get the system working very well and I've learned a lot about how the MIPS work. Created my own custom Stack Loaders and learned how to do that as well. By pouring through your code I have learned a great deal about MIPS and what it can do. You are still several levels better at it then I am, but I wanted to say thanks for helping me learn about it. I like to learn things -- even odd things that i might not directly encounter in my life -- and wanted to say thank you. I always appreciate people who help me learn and expand my skills by obtaining knowledge. I've even learned some things I can take to my mainstream job when it comes to writing scripts. A different way of thinking of solving problems (especially with if, then, else logic) so wanted to let you know that you helped one person become better at how to approach problems and improve their skills at their career.

  • @joakimeigestad
    @joakimeigestad Рік тому

    i'm getting an incorrect variable at line 41 in the crafter general code

  • @namehere973
    @namehere973 2 роки тому

    could you make ic tutorial series?

  • @the_ttr
    @the_ttr 2 роки тому

    Hey. So how this will look with big bases from power cabling. Looked on your Vulcan video and you did split those networks but they managed to communicate still. Was this that power side was split but data somehow was separated network? Or there is some way of bi-directional data routing between two power networks? Thanks.

    • @Elmotrix
      @Elmotrix  2 роки тому +1

      You can use Logic mirror to mirror the memories to as many networks you'd like. But on my vulcan world i only had two, so i connected the memories to differen networks on esch side of the memory devices.

  • @CageStooge
    @CageStooge 2 роки тому

    Hi, any idea why Heavy Filter (Polluntant) refuses to route? I have no issues with any other items routing. Even if I do it manually it won't work. I have to break the chutes before it gets to the stacker / sorter or it will just route it back into the vending machines.

    • @CageStooge
      @CageStooge 2 роки тому

      I figured it out. They have a % used, so if you ask for 1 and the filter is at 100% it won't work. It sees that as "100". If you ask for 100 of of a filter it will then send an unused one. I'm not sure if that's a bug you can work out or if I missed a step. I mean, I guess I just won't put used filters back in, but I'm also worried if I request a 100 filter it's going to build 100 of them if I don't have any at all. I'll test that and report back

    • @CageStooge
      @CageStooge 2 роки тому

      Yeah if you don't have any filters of that type and you order 1 it will make 1, but if the filter is already existing you have to request a 100 or the stacker won't route it to you. I am using the HMI, so it is possible I did something strange. It's not a huge deal.

    • @Elmotrix
      @Elmotrix  2 роки тому

      ye filters generally don't work well. it's because they use their filter quantity status in the normal stack count data. Sadly there really isn't any fix for it. not because it's impossible, but because there isn't enough lines available in the code to program in an exception. :)

  • @holgerh.1580
    @holgerh.1580 Рік тому

    I have the problem that the Furnace Crafter chip does not set the router correctly. The furnace is set to address 1 and when an order is placed, the furnace is changed correctly and the ore is sent from the Storage. However, the router sends the ore directly back to address 99. Everything is on the same network and I have no idea what's wrong. The CrafterControllerFurnace is probably not communicating with the router, but why? Router works fine itself, Storage System also works fine.

    • @Elmotrix
      @Elmotrix  Рік тому

      The messenges can be delayed slightly behind the item ejection, so if the storage output hits the return to storage (99) first the message might not have been processed yet.
      That or some pin is set wrong on the furnace interface.
      But kinda hard to debug over youtube comments, you're welcome to pm me on discord

    • @holgerh.1580
      @holgerh.1580 Рік тому

      If I found a link from your Discord I would love to check it out ;) But i can't find one

    • @Elmotrix
      @Elmotrix  Рік тому +1

      @@holgerh.1580you'll find me on the stationeers discord

  • @klarwasserofficial9878
    @klarwasserofficial9878 Рік тому

    It seems that the CrafterController isnt working anymore. I build the storage system and it works good if i do everything manually with the Labeler. I checked the CrafterController over and over. Downloaded your Venus Save and after i saved your World to a new Version and loaded it again it is broken there too.
    The CrafterController seems not to communicate with any of the LMs

    • @Elmotrix
      @Elmotrix  Рік тому

      no it still works. But if you're playing on a different language than English you need to translate all the type names. "Solder", "Gold" etc

    • @klarwasserofficial9878
      @klarwasserofficial9878 Рік тому

      @@Elmotrix thanks for your answer i forgot the stackloader :(

    • @Elmotrix
      @Elmotrix  Рік тому

      @@klarwasserofficial9878 that'll also do it :)

  • @emperador0815
    @emperador0815 2 роки тому

    Since at least the last update, my storage system has been completely out of order. I have already adopted some new code parts (Storage Master, Crafter Master, Router), but the delivery of material to Furnance and Printer is faulty or completely non-functional.
    What should I check?

    • @Elmotrix
      @Elmotrix  2 роки тому +1

      the updates did mess up quite a bit but from what i can tell the most recent updates should work fine. But if you could find and add me on discord/steam it'll be much easier to find out what's wrong.

  • @The3vilm0nk3y2200
    @The3vilm0nk3y2200 Рік тому

    I have gone and set this up, rechecked, and rechecked again.. But i'm having an issue where the storage system is not splitting stacks. It is requesting the item, it gets to the stacker, and just sits there for a few seconds, it is then ejected out and seems to randomly be sent to either the storage or the routing system. Any ideas on what could cause this to happen?

    • @The3vilm0nk3y2200
      @The3vilm0nk3y2200 Рік тому

      I have practically rebuilt the system again, and I am still getting the same issue. Going to say something in the newer versions has broken this system.

    • @The3vilm0nk3y2200
      @The3vilm0nk3y2200 Рік тому

      Turns out the splitter got set to logic mode when adjusting screws probably. Rebuilding the stacker worked. Thank you for your support in discord.

  • @jffish5149
    @jffish5149 2 роки тому +1

    Nice job.

  • @emperador0815
    @emperador0815 2 роки тому

    Where can I get the list of material groups for the blacklist or whitelist? For example, if you want to ban all ingots or all ores in a vending machine?

    • @Elmotrix
      @Elmotrix  2 роки тому

      stationeers-wiki.com/Sorter#Item_Classes

    • @emperador0815
      @emperador0815 2 роки тому

      @@Elmotrix Thanks very much! I should have thought of that myself.

  • @CageStooge
    @CageStooge 2 роки тому

    Me again ...
    From time to time the inventory system seems to get "locked up", and I can't quite work out why. Yesterday a request for copper just kept the entire system stuck. I reset all the chips, toggled things, even put in brand new vendor chips, but copper -- oddly enough only copper -- would just stop responding. I even exited the game completely thinking maybe it was some odd bug in the game code, but nothing worked.
    I finally went and took a break while letting the game run and then it "fixed" itself and it no longer has the issue with copper (or with anything else). Is there a reason it would behave that way? I know asking you to diagnose a problem you can't see is not easy, but I was hoping you had run across something similar and would know of a way I could either prevent it from happening or steps I could take to help reduce the time it was spending doing ... whatever it was doing. I have 12 vending machines (refriegerated -- side note the auto stackers in refigerated vending doesn't seem to work, but that is not the fault of your code) and they are mostly full. I don't have any white/black list setup so everything just goes wherever it goes. Would it be better to create white lists / black lists or would that possibly make it worse?
    Any ideas? The game does not make it easy to debug these things, but I love your system. I have even managed to "decouple" various sections so they use transmitters to relay information instead of stringing 200 kilometers of a common wire together with tons of sorters, stackers, vending machines, all having to be flipped through when setting up a new chip / module.
    I may just be over doing it and asking it to handle more than it was designed to handle. ?
    Thanks in advance, and I totally understand if you don't have any insight into the matter. I have created a rather intricate series of interactions that weren't covered in your video and I may very well have added something into the mix that makes it sort of spaz out randomly, albeit not often which is good.
    My next project is to see if I can write a bit of code that will "restack" all the items so they are more compact. 1,000 steel ingots spread out over 12 machines with many of them being 2 to 5g stacks is seriously inefficient and may very well be a part of the problem.
    Sorry for the long post, but it is a complicated system, and it's not easily boiled down to 2 or 3 sentences. :)

    • @Elmotrix
      @Elmotrix  2 роки тому

      ye this thing got a bit of a life of its own. some seemingly random hiccups happens. Everything is fitted with timeouts so as you have experienced, at least it will fix itself. But from the sound of it you have a big implementation, and probably something like 20-30 ICs connected together with a very rudimentary communication protocol. a hiccup every now and then is success in my eyes 😅.
      But when you encounter these problems it's best to let it timeout. resetting everything is mostly a last resort.
      for your vending machine problems: the input stacker only works when consecutive items is the same type i belive. when a new item types arrives it won't get stacked with existing items of same type in the machine, but it will stack if the next item is the same type. so functionally the same as if the stacker was separat.
      White/Black listing would help you a bit i would bet, but i like the "cleaning" script idea. it's something i had in mind while developing, i just never came around to it, but all the tools for setting it up should already be present. 🙂

    • @qualityedits3083
      @qualityedits3083 Рік тому

      I love the idea of performing physical defragmentation lol

  • @emperador0815
    @emperador0815 2 роки тому

    Hello Elmotrix! Thank you for your help!
    I have another question:
    I wanted to increase my existing order to produce steel from 50 to 100 for less than 500 units in AutoStocker. However, I had forgotten that this value may have a maximum of two digits.
    I now have an order in AutoStocker with a hash of -65479007715, which of course is unknown.
    It was created by entering: -6547900771500100
    How can I clear this error? Is it possible to block such erroneous entries in general?

    • @Elmotrix
      @Elmotrix  2 роки тому

      no that error will stay inside the autostacker. It won't do any harm, just not do anything.
      the only way currently to delete something from the autoStacker is to clear it completely and put in everything again.
      if you wish to clear it, edit the code and add "move StackPointerMax 0" right above the "start" tag.

    • @emperador0815
      @emperador0815 2 роки тому

      @@Elmotrix Okay, thanks!
      Is it possible that the output from the silo is regularly too small for larger requirements?
      I always have the problem that too little iron ore is delivered, for example when steel is requested.
      This also applies to the HMI. If I request 150 iron ore there, they generally only deliver 100, 2 stacks of 50.
      In addition, there may also be a timeout problem since the storage and the advanced furnace are a little further apart. I have already increased the CycleTime to 1800 in the AutoStacker code.

    • @Elmotrix
      @Elmotrix  2 роки тому

      @@emperador0815 The most likely cause is that when there is high router traffic and several identical messages come in rapid fire (for example 3 order for 50 iron ore to same address), some of those messages might get lost.
      in other words, the storage delivers, but the router don't get all messages.
      It's a general problem of publicly acknowledging a message. There is solutions but it would be a tailored solution.

    • @Elmotrix
      @Elmotrix  2 роки тому

      @@emperador0815 Timeouts can be adjusted. But i'd love it if you contacted me on discord instead of here :) would be easier to communicate.

    • @emperador0815
      @emperador0815 2 роки тому

      @@Elmotrix Hello and thanks for the answer. Since I speak English very poorly, direct communication without a translator tool is difficult for me. :-)
      I looked again at the problem and the code. I think this error only occurs when outputting from the silo with 2 or more stacks. What surprises me is that I can't find the "ExportCount" variable in the silo code, which you can use to control an exact output. Am I misunderstanding something?

  • @emperador0815
    @emperador0815 2 роки тому

    I built the HMI, but the Dial DSelection is fixed at 0. I can't select anything. What am I doing wrong?
    Shouldn't I be able to select things from storage or ingots to be crafted through the furnace?

    • @Elmotrix
      @Elmotrix  2 роки тому

      You got to add stuff to it. Put something in the chute and hit the power button (on the chute). If you hit the power button with no item in the chute you "forget" items :)

    • @emperador0815
      @emperador0815 2 роки тому

      @@Elmotrix Oh, ok, thanks! So things that were previously in storage or were not stored via the chute are not known?

    • @Elmotrix
      @Elmotrix  2 роки тому

      @@emperador0815 not known by the displayl (hmi). Every other module don't care.

    • @emperador0815
      @emperador0815 2 роки тому

      @@Elmotrix Too bad :-(. Otherwise it would be a machine-independent universal input and output unit. Which, for example, could also be used during larger conversions.

    • @Elmotrix
      @Elmotrix  2 роки тому

      @@emperador0815 well it is just that. you just got to teach it what to output. There is nothing that transmits a full list of all items that can be made, or is in storage.

  • @alpha110
    @alpha110 2 роки тому

    Great work. However, it's crap when you use undocumented things that a normal player will never find. Something like: "WaitForEject:"
    "move Stage WaitForEject"
    I didn't know until now that the line of the jump target then ends up there.

    • @Elmotrix
      @Elmotrix  2 роки тому +1

      i'm not expecting many people to be able to read and understand the code. I barely understand it my self. And "how to guide" isn't really my content either.
      The biggest issues with developing a system like this is to fit everything within 128 lines. Space for meaningful comments is a luxury i just don't have. Especially when it's littered with functions that makes no sense, but under the right circumstances causes an happy accident to happen.
      I originally started this project with the intention of code it in videos and explain everything. But it kinda grew out of hand and is now a product of several iterations. i don't belive enough people would be interested in listening to me rant about why that line 117 has no purpose but in the correct case it avoids an edge case bug.
      But for the extra interested my inbox is open and i'll happily explain every line to those that want to listen.

    • @alpha110
      @alpha110 2 роки тому

      @@Elmotrix we have already written to each other via Discord. the problem is not only with you and your code. my problem is rather. where do you find such things. Do you have to bug the developers to do it?
      there are some guys like you who program super things. then i try to understand it and then commands appear that are not explained anywhere. that frustrates.
      i am glad that something like "push LogicType.PressureExternal" works. but it is not written anywhere, Risu told me.

    • @Elmotrix
      @Elmotrix  2 роки тому

      @@alpha110 my inbox isn't overflowing with requests. most people aren't that interested. so yes. bug me all you want. :)
      I would much rather explain things where i can fully cover the details than try to squeeze in ambiguous comments in the code.

    • @Yotanido
      @Yotanido 2 роки тому

      That's not really anything special - that's how labels work. They get resolved to the line number.
      Usually you use that with jumps, since keeping the correct line number in a jump instruction is difficult, but technically the label can be used for anything that accepts a literal number.

  • @XD9rottie
    @XD9rottie Рік тому

    How do I setup AutoStocker ?

    • @Elmotrix
      @Elmotrix  Рік тому

      it's shown in the other video :)
      ua-cam.com/video/1Riu__VhmYo/v-deo.html

    • @XD9rottie
      @XD9rottie Рік тому

      @@Elmotrix oh thank you!

  • @joshperetti2757
    @joshperetti2757 2 роки тому +1

    wow just crazy

  • @dragnus12
    @dragnus12 2 роки тому +2

    I see you went with little endian, good for you

    • @Elmotrix
      @Elmotrix  2 роки тому

      never heard of that word before but i guess so :P

    • @dragnus12
      @dragnus12 2 роки тому +1

      @@Elmotrix fun hearsay: zelda link to the past and super metroid both used different formats for storing their memory on the cartridge. It just so happened that the blank space in each just happened to overlap with the written sections in the other, thus the link to the past and super metroid randomizer were born, because they could both be "on" the same "cartridge" at the same time in the emulator.

  • @fellpower
    @fellpower 2 роки тому +1

    Its horrible....nooo just joking...i think the stationeers community knows you - and your great projects. its sometimes hard to understand, how it works - but as with your furnace setup - if u understand, how it works, u can understand thats magic - and rebuild that on your own game.
    But one question: if we automate the WHOLE game - what we are doing ingame now? ;)

    • @Elmotrix
      @Elmotrix  2 роки тому +2

      Relax and eat pie ;)

  • @TheBrookemarley
    @TheBrookemarley 2 роки тому +2

    I am number one here, hahahaha