Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet Vita [LBPV] Help!
#1
Help with an Inventory System
Archive: 11 posts
I'm attempting to create a way for players to pick up, sort, hotkey, and use items from the in-game menu. At first, I was attempting to use a pair of selectors to create a grid. It didn't take long to realize that wouldn't work. My second attempt utilized a single memorizor, tripped via tag sensors connected to or gates so the memorizor's cooresponding signals can pass through itself or connected components. Utilizing Pivottt's health meter circuit to instead keep track of stacks of items, I can pretty easily record items picked up or used. The issue I'm having is allowing the player to change the position of items in the inventory "subscreen" for the player's convenience or allow the system to automatically distribute picked up items across empty inventory slots. Any clues? Has anyone done anything like this before? | 2013-09-30 03:21:00 Author: DigiOps Posts: 111 |
I've done it a few times, never in the vita though so I have no idea how menorizers work. I made a grid with selectors as you said. Each square had a tag that the item tabs I made would follow, but the tags were turned off by a tag on the item tabs themselves. These tabs were locked in place by gravity tweakers. There was an invisible "spawner" that would move to the first open inventory slot and would emit whatever item was picked up from it, unless the item was a stackable one that the player already had one of, in which case the count would just increase. The selectors controller the tab that was selected through local tags on the chips that were placed in each inventory slot. This could probably be modified to hotkey things or rearrange things fairly easily, but I've never done so myself. It did have a dual wield that let you equip and two weapons or spells though. | 2013-09-30 11:49:00 Author: Tynz21 Posts: 544 |
Each item must have a priority chip attached to it. I.e. items, rock, paper, scissors. (Slot designation in that order as well) 3 Slots available, but u always want rock in the first slot, but u always want the first slot filled. so example cont. U pick up the paper. It goes it slot 1. Then u pick up the scissors, then lastly the rock. U would have the following on each. since scissor is designated for slot 3 u would havethe following on it: a tag designated "scissors", and 2 tag sensors labeled "rock" and the other "paper" . Now place a selector down with 3 outputs with each connected to a follower labeled as such "slot1" "slot2" "slot3". Now the inputs: input 1 have an "or" gate attached to it and attached to the "or" gate have outputs 2 and 3 of the selector plugged into it. input 2 have an "or" gate attached to it. Now attach the tag sensors for the "paper" and "rock" into it. input 3 have an "and" gate attached to it with the tag sensors for "paper" and "rock" plugged in. this in turn put the other items ahead of said item in your inventory. do this for the other items, but not exactly. For in between numbers u will have to use a not gate for precedence. Just remember to what u want priority over another. An easy way to do this would to assign each a number and go from that. if u need more help, just ask. K I have never attempted an inventory based system before, but this would be the route I would go. | 2013-09-30 17:51:00 Author: L-I-M-I Posts: 611 |
L-i-m-i is right except: don't put the priority chip on each item. Then they'll always end you in a certain order or not follow what they're supposed too. You want the priority tags to be localized to inventory slots. say we have 3 slots. Rather than each requiring a specified item's tag, all they need to require is an "item" take that's the same on every item. From there, the specification tags will be on the slot itself. For example: Slot 1 senses tag "item". This tag in range triggers "slot1full". Slot 2 only need be open when slot 1 is full, so the "slot1full" tag should be sensed by Slot 2 which will then activate whatever tag the invisible item spawner I mentioned follows. This spawner will always be lingering above the first open slot so that you don't accidentally emit between spots or something. | 2013-10-01 12:03:00 Author: Tynz21 Posts: 544 |
That method sounds more thermo friendly... | 2013-10-01 22:00:00 Author: L-I-M-I Posts: 611 |
I assume I'd have to make entries for every item inside the player's controlinator logic chips and, for placement inside the inventory "subscreen", give each item a follower for each inventory menu position so that when they are emitted, they automatically go to their respective spots. Sounds time consuming, but totally worth it. I apologize for the delayed reply, folks. I have been reading and testing. I'll post my results once I have a finished product. This particular set of logic has been the most complicated and time consuming I've ever worked on, but key for the experience I'm trying to give the player. Thank you all for your input thus far. Its been a great help pointing me in the right direction. | 2013-10-01 23:03:00 Author: DigiOps Posts: 111 |
I assume I'd have to make entries for every item inside the player's controlinator logic chips and, for placement inside the inventory "subscreen", give each item a follower for each inventory menu position so that when they are emitted, they automatically go to their respective spots. Sounds time consuming, but totally worth it. I apologize for the delayed reply, folks. I have been reading and testing. I'll post my results once I have a finished product. This particular set of logic has been the most complicated and time consuming I've ever worked on, but key for the experience I'm trying to give the player. Thank you all for your input thus far. Its been a great help pointing me in the right direction. Really you only need one tag being followed by the items keep in mind. In fact, a follower on the items themselves is not wholly necessary. You'll want that spawner that will automatically be at the first open inventory slot to be what's really determining the item positioning. Assuming you make all this on the grid, it should be fairly easy to spawn exactly in the slot from the spawner. | 2013-10-02 04:34:00 Author: Tynz21 Posts: 544 |
So in other words the spawner moves to whatever tag is on and emits said item when the player collects it. So if slot 1 is occupied its tag turns off and the tag in slot 2 turns on, hence moving the spawner to that location. And then when the player collects a 2nd item, it will emit into the 2nd slot. And then the emitter/spawner will move to the 3rd slot cause the tag in slot 2 will turn off and the tag in slot 3 will turn on. what if a player uses all of item 1? Will items 2 and 3 automatically move to slots 2 and 3? | 2013-10-02 17:37:00 Author: L-I-M-I Posts: 611 |
With the way I set this up, the spawner will be on the first available slot. So if you used up the item in slot 1, slot 1 would remain empty, but would be the first slot to be filled when a new item was obtained. It could probably be modified to move the items each back a slot but this is much less convoluted than the logic that would take. | 2013-10-02 19:44:00 Author: Tynz21 Posts: 544 |
any updates digiops? | 2013-10-09 16:15:00 Author: L-I-M-I Posts: 611 |
No real updates yet. I decided to work more on the item stack logic rather than UI elements. While UI elements are important and being able to save what the player does and does not have in their inventory is important, picking up, dropping, selling, and using crafting recipies is taking priority for the time being. This, of course, has created whole new problems. lol The original plan was to use Pivottt's health meter logic to cover a myriad of problems. It's the perfect solution for keeping track of individual skill and overall level-up's so the player can gain in strength and have a reason to use different skills. It does a wonderful job at keeping track of health, fatigue, and mana with charged swings, varying weights on weapons, and (un)charged spells. Pivottt, if you ever read this, know you'll be getting a lot of credit for it. <3 The way I envisioned the item stacks is having a maximum amount of 99. The current set up has the feedback loop going out to a sequencer set to positional with batteries on the sequencer outputting their percent starting at 1 (since sequencers start before any logic placed on them making the initial value zero) with the last pair of batteries outputting 90 + 9 for the grand total of 99. This works fantastically for increments of one, but in testing, attempting to add 3 to 98 doesn't just max out at 99, it instead goes past 99 to the very edge of the sequencer without even turning the 90 + 9 batteries on. Basically, I'm trying to check the value to be added against the total possible and if the value to be added causes the the total in inventory to go over 99 only increase by the difference of the value in inventory and the value to be added and return the left over if necessary. I'm have to apologize again for lack of replies. Life's been hectic. What with the government shut down messing with my gi bill on top of an already mostly full plate with school work, I've been having to shuffle things around to make ends meet and my LBP project hasn't been getting as much attention as it used to. | 2013-10-10 02:55:00 Author: DigiOps Posts: 111 |
LBPCentral Archive Statistics
Posts: 1077139
Threads: 69970
Members: 9661
Archive-Date: 2019-01-19
Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.