Modding Discussion ComputerBound

Discussion in 'Starbound Modding' started by Defiance3, Aug 3, 2016.

  1. Defiance3

    Defiance3 Phantasmal Quasar

    Yeah, it can be a bit annoying at times. Perhaps I'll take a look into contributing.

    I'd love to see how I could use these future functions. And thanks! I've actually always been working on the mod little by little, but I unfortunately got too tied up on one aspect of it, neglecting pretty much all other parts of it.
    But of course, that's definitely changing!

    Thanks! Hope that isn't the only thing drawing you to my mod! :)

    As far as mod progress goes:
    I got around to making the itemSlots functional; Computers simply won't boot without all the components in them.
    Sadly, there is a bit of a delay when using the itemSlots, though it's minimal. It's because I have to communicate with the computer's object script in order to ensure persistent storage.
    Interestingly enough though, the side effect of this is that computers won't drop their items upon object destruction. Not sure if I should keep this or not.
     
  2. DraikNova

    DraikNova Ketchup Robot

    Well, the thing is, I'm kind of unsure what it is that this mod's computers will be useful for. I haven't seen anything about ways for them to interact with the environment, which is what would make it functionally different from just opening a lua interpreter outside of starbound.
     
  3. Defiance3

    Defiance3 Phantasmal Quasar

    I'm not sure if you've played other computer mods such as ComputerCraft or OpenComputers, but I've found them rather fun to use on multiplayer and even singleplayer.
    Even if it were only the computers and no other peripherals/objects available (except a monitor and keyboard in the case of OpenComputers, I suppose), I'd imagine that they would still offer a much more pleasant experience as opposed to sitting in front of a Lua interpreter outside the game. Of course, I'm hoping my mod will offer that level of enjoyment as well.

    But I can definitely see your point. As of now, the only kind of environment interaction they have is with the in-game wiring system; you can hook switches and lights and whatnot to them and program the computer to send signals in and out.
    In the future though, I'd like to see the feasibility of adding robots and drones in to the mod, with many being available for either specialized or generic tasks. To sum it up, I do have a bunch more planned for the mod. :)
     
    theflamingchuthulu and MelOzone like this.
  4. MelOzone

    MelOzone Big Damn Hero

    Okay, I finally got some time and motivation to look into this.
    I understand the part about callbacks, somewhat familiar with them. However some examples of working put/equip functions would be nice. More for wiki, although it also would be interesting for me.

    What I don't understand is how exactly is that function of yours called by the game. It isn't listed in the callbacks for separate widgets, nor is it listed in scriptWidgetCallbacks. Is it hardcoded in SB?

    Upd.: Yes, it seems to be (yet another) undocumented hardcoded thing in Starbound. I found where it is used (new "Collections" panel) - there are no callbacks yet it works just fine. widget.inMember is not documented on the wiki as well. All I managed to find were some GH notes from the Build Mode MM mod.

    As far as I understand this new tooltip suppresses any other the widget would normally have (I don't remember if itemslots have tooltips but itemgrids do - they show tooltips of their contents). Do I get it right?

    Upd. 2: Unfortunately I have been unsuccessful in recreating tooltips in my code. I have the function, tooltip "dummy" structure and a table with descriptions but tooltips still don't show. Tried with itemslots and image widgets (both do work in other mods). Guess I'm missing something, but what exactly?
     
    Last edited: Jun 7, 2017
  5. Defiance3

    Defiance3 Phantasmal Quasar

    Sorry for not having posted/updated this thread in quite a while; been dealing with a lot of finals, had to study up quite a bit.

    Unfortunately, I can't say much without getting a look at the set up myself. I don't remember off the top of my head which in-game object/item used itemslots sadly, but I do remember having to reference it often, so it's probably not on you for not getting it to work immediately. I can perhaps try to help out if you let me see what you have so far.

    In other news with the mod, we all know that the 1.3 update came out. Only thing that it broke was monitors, which was a relief for me. I fixed the problem, and now there's a new one: whatever the new update did, it made the once super optimized drawing code ridiculously slow. I'm going to have to explore new options for now. Worse case scenario will be having something in line with how ComputerCraft operates: each character is a "pixel" and can have it's foreground/background colors modified. I'd much prefer having access to individual pixels so I'll see what I can do.

    Other than that, before the update, I was mostly working on code to make StarOS less bare-bones; I figured that it would be more beneficial to for people to program with ease so they can learn how the mod works first before embarking on creating their own, well, everything. I was also thinking about how tiers objects should be created and tiers/crafting implemented. Nothing set in stone right now, but I was thinking that players should be able to make cases from 1x1 up to 3x3, where the size dictates how many components can go in the computer. The allowed tiers of the components would be controlled by which ever motherboard is in the computer. So yeah, pretty much supposed to be "realistic" in that sense.

    If any of you have ideas for this or recipes or something, do tell; I'd be thrilled to know. But yeah. That's about it for now.
     
    MelOzone and Inf_Wolf14 like this.
  6. Storm_UK

    Storm_UK Existential Complex

    The canvas drawing now needs a call to clear() each update or it will add each called drawing function anew without removing those previously added, which I think is the cause of the lag you're seeing. If you set
    Code:
    self.canvas = widget.bindCanvas("mainCanvas")
    in your UI init for example you then
    Code:
    self:canvas:clear()
    each update.
     
    MelOzone and Defiance3 like this.
  7. Defiance3

    Defiance3 Phantasmal Quasar

    Yep, that was exactly it. Seems to be fine again for now. Thanks! Saved me from rewriting all the render code. :)
     
  8. MelOzone

    MelOzone Big Damn Hero

    If you would be so generous...

    Not a high priority; due to hardware problem my mod is currently on hiatus. But you can always take a look if you feel like it.
    LINK
    The source is available on Github (download link leads into the repository but you need to go a level or two "up"). As far as I remember I was trying to experiment with the lonely empty itemslot (to the right of the "magnifying glass" zoom icon).
     
  9. Defiance3

    Defiance3 Phantasmal Quasar

    Guess it's a bit of a bad habit of mine to take forever to post back. But, fear not! I post with good news. Mostly. :)

    Unfortunately, I didn't really spot anything that was wrong; made me scratch my head at what was wrong too. ):

    But, in other news, I had begun rewriting a large portion of the mod since much of the code was made when I was just trying to throw things together. The result? Configurability and extensibility are much more prominent.
    It was also rewritten with actually acquiring items in survival in mind this time! Since I can't actually control the speed of the Lua VM execution very well, certain components of computers are a lot more expensive than not.

    PROCESS OF GETTING A CPU:

    [​IMG] Silicon Ore! . . Albeit a tiny picture, but you get it. It can be mined for, being more abundant near the core of a planet.
    You'll need the Industrial Furnace (Tier 2) to do anything with silicon. Once there, you can refine the ore or cook some sand and coal to get . .

    [​IMG] Metallurgical Grade Silicon! . . Or just MG Silicon, this stuff is purer than what you started out with, but not pure enough for electronics; it's only like, 99.999999% pure or something lame like that.

    That's where this comes in. Crafted at the Engineer's Table (Tier 2):
    [​IMG] Silicon Crucible! . . That's just the icon, don't worry. It isn't that small. =P

    Using it, you can melt down your MG Silicon into:

    [​IMG] Silicon Boules! . . Basically giant silicon crystals.
    Now, these things are pure! We're talking 99.999999999% pure! Good enough for electronics.

    Obviously, we can't use it as is though. Much smaller slices are needed, so a quick run over to the
    [​IMG] Saw Mill! . . I really need a better name for it though. Something fancy. Also crafted at the Engineer's Table (Tier 2).

    Anyway, going to that, the boules are sliced right up into:
    [​IMG] Silicon Wafers! . . Lots and lots of them.

    Hope you're not ready to quit yet! Almost done here.

    Each silicon wafer can be turned into a die for a CPU, GPU, or stick of RAM. But how? With this!
    [​IMG] Photolithographer! . . It looks a lot cooler in game, trust me. Crafted at the Architect's Table (Tier 3).

    Anyway, you throw in your wafer, choose from a list of blueprints that you've unlocked, and the machine will etch away and create a die!
    Probably looks like this: [​IMG]

    And after all that, we finally arrive at the final step;
    <Insert some picture here> Hardware station! . . Where circuit boards and stuff are made and things are soldered.

    Put a die and a circuit board together and bam! You've made your first CPU. :)

    But . . why so much work? Is it even worth??

    Well, short answer? I think so.

    Long answer? Well, just trying to figure how to go about the crafting for my mod was a bit tricky; making the recipes either easy or difficult has it's pros and cons.
    But! Since Starbound seems to have many stages and tiers for things, I thought I'd might as well make my mod fit in more by playing along.

    The nice thing is that you'll only need to do this once for the Lua 5.3 CPU. I name it like so specifically since CPUs with different "architectures" can be added in.
    Other things, like RAM and GPUs? Yeah, you'll have to repeat the process for better versions of those.

    It's not too bad though; once you set up all four of your stations, the numbers essentially boil down to needing either 20 silicon ore or 50 sand and 20 coal to make 15 wafers at a time, each of which can be used to make a gpu, cpu, etc.
    So really, the only thing that sucks is having to wait for the silicon boule to be made (irl it takes an entire day, probably will make it take 10 mins in game) or for the etching to be done (few minutes give or take depending on complexity of blueprint).

    But . . that's just a few parts! What about everything else??

    Computer cases and peripherals will be made at the hardware station and cost drastically less than the process described above. Probably some metal plates (any metal = 4 plates at the sawmill) and a circuit board for a keyboard, for example.
    Unless I decide to make a process for plastics . . :sneaky:

    How about releases or even testing?

    While I've been making excellent process recently, there's still some other stuff I need to finish up first before a push is made on Github. Though, if you'd like to test the mod early, maybe give a bit of feedback on how balanced recipes or the process of getting everything as a whole feels, do shoot me a PM and I can have this build ready in a couple of days. Though, that's only if you really just wanna get your hands on this; once this is stable enough, I'll be pushing a release on github anyway.

    So yeah, that's just a few of the changes. There's lots, lots more, but I don't want to make this post any lengthier than it needs to be. Hope you guys look forward to this!
     
  10. Custos_Aeternam

    Custos_Aeternam Void-Bound Voyager

    Any news on this? :V
     
  11. projectmayhem

    projectmayhem Ketchup Robot

    Well, since the last post was made 2 years ago... Im assuming the new is "dead"
     
  12. theflamingchuthulu

    theflamingchuthulu Void-Bound Voyager

    Might be. If so that sucks. This looked really cool.
    (Plus, if not dead I'd learn Lua which would be nice just because
     
  13. Tisilvabr

    Tisilvabr Void-Bound Voyager

    Hello, I come back to know if the project really died. It is the only MOD I have found that proposes to do something of this magnitude.:catbigeyes:
    Computers that can script and automate tasks within the game. It would be amazing to see this released on Steam.
    The game is fine but mature now. Only logic gates and wiring, turns into an endless roll.
    This MOD falls like a glove on the game theme as well. :nuruhype:
     
  14. RainbowHannah

    RainbowHannah Void-Bound Voyager

    Yes, it's dead. You won't get confirmation from the mod author because the mod author doesn't come on the forums anymore (last time was may 2018 I believe). If they someday come back, they will likely reply to this thread. No need to keep asking. Just click the button to the top right of the post to watch the thread. This goes for anyone else who might ask the same question.
     

Share This Page