Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Weighted randomizer output problems
Archive: 7 posts
I tried doing a search for this problem I encountered, but - as unlikely as it may seem to me - it seems nobody had the exact same scenario. I hope it's not me not knowing something completely obvious regarding wire/microchip management or something... Anyway, here goes: What I want to do is a randomizer that produces one kind of output 33% of the time, a second kind of output 33% of the time, a third kind of output yet another 33% of the time and a fourth output 1% of the time. What I originally tried was to simply have three 33-input OR gates and wire the output of the randomizer to each of their inputs one by one. After like 10-12 connections the problems started occuring. Editing the microchip started getting more and more laggy and the cables were all over the place instead of overlapping each other - for some reason the game wanted to show each cable separately for their entire length. After 25 connections to one of the OR gates I could barely move the cursor, the lag was so bad. Finally at 30 connections the randomizer refused to be connected to any more inputs, simply because there was no room for the wires anymore (and this was with the largest possible microchip size...). I then tried moving the OR gates to separate microchips, only to find that that way the output of the randomizer that goes into the microchip is no longer considered separate for each connection to the OR gate's inputs. Once the signal reaches the microchip with the OR gate in it, ALL its inputs were turned on, rendering it pointless for creating a weighted randomization. Finally I discovered that you can place down circuit nodes by tapping X. I quickly stamped down 33 next to the inputs of another OR gate (which was still on the same microchip as the randomizer itself), relishing the fact that the cables were no longer jumbled this way, and were neatly overlapping each other all the way until they reached the inputs of the OR gate. When I got around to testing whether this setup worked, however, I found out that for some reason - which is completely beyond me - the 33 circuit nodes are activated all at the same time by the randomizer. So now I'm back to where I was before. After I turned off the PS3 another idea occured to me, which was to randomize in two steps, each step having ten choices. Thus there would be a main randomizer which turns on one of 10 microchips with randomizers in them, which in turn enable one of 10 outputs that can later be combined to produce the weighted percentages I need. However, I'm not sure this would work at all... maybe it can't even produce the same probabilities as when using just one randomizer. If anyone has a solution for this problem, or just some helpful thoughts, I'd appreciate any input I can get, since this weighted randomness is at the heart of the first LBP2 level I'm working on, without this I have to come up with a new idea. | 2011-02-06 22:44:00 Author: sny Posts: 144 |
Hey, Just off the top of my head, wouldn't a randomiser with 10 outputs have the disired results (or close enough) Input > randomiser with 10 outputs >3 outputs to option A >3 outputs to option B >3 outputs to option C >1 output to option D Thats how I would go with something along those lines. Hope this helps and if this isn't the solution I hope it helps you get to one! Littlebig Peggles. | 2011-02-07 00:10:00 Author: Unknown User |
How about using 2 randomizers with 10 outputs each. Lets call them A & B. Each output will be A1, A2, A3 .... A10 and B1, B2, B3 ... B10. A1 -> spin randomizer B. A2-A4-> outcome 1 (30% chance). A5-A7-> outcome 2 (30% chance). A8-A10-> outcome 3 (30% chance). B1 -> outcome 4 (1% chance). B2-B4-> outcome 1 (3% chance). B5-B7-> outcome 2 (3% chance). B8-B10-> outcome 3 (3% chance). This gets you the 33%, 33%, 33%, 1% odds that you wanted. Hope this is clear enough. | 2011-02-07 05:24:00 Author: dcf Posts: 468 |
Thanks, that sounds like a working alternative, and much less space (and work) intensive than the one I posted last. I'll be sure to try it out when I get some play time again! | 2011-02-07 05:54:00 Author: sny Posts: 144 |
You can also create nodes on the circuit board itself, just drag your wire from your input to right in front of each 30 OR gate, then click on the circuit board. This will create a node that you can drag additional wires from. You can then drag short wires from the node to the or gate and it won't make a billion wires all over the place. By the way, you'll probably find that the randomizers won't actually be random. The pattern they have is set down once you place or tweak them. If you want them to be random you will have to end up emitting them and having them activated by tags. I had huge problems with my slot machine level, which in principle is similar to what you want (certain things have a higher percentage to activate than others). Good luck!! | 2011-02-07 11:24:00 Author: kemengjie Posts: 42 |
You can also create nodes on the circuit board itself, just drag your wire from your input to right in front of each 30 OR gate, then click on the circuit board. This will create a node that you can drag additional wires from. You can then drag short wires from the node to the or gate and it won't make a billion wires all over the place. I actually tried doing this already, as described in my original post, but it didn't work for me, as the output signal of the randomizer activated all the circuit nodes for some reason, instead of just one of them. This is by far the most puzzling aspect of the problem for me, since I can't find any logical explanation for it. Does anyone have any idea why they aren't considered as separate outputs? By the way, you'll probably find that the randomizers won't actually be random. The pattern they have is set down once you place or tweak them. If you want them to be random you will have to end up emitting them and having them activated by tags. I had huge problems with my slot machine level, which in principle is similar to what you want (certain things have a higher percentage to activate than others). Good luck!! Yes, I've heard of this problem before, but right now I'd be content with figuring out an answer for the first issue I'm having. I don't even want to think on how I'll replace the wires coming from my randomizers if I have to emit them... *shudders* Thanks for the warning, though! Oh, and one question: can you emit objects onto a microchip? | 2011-02-07 11:55:00 Author: sny Posts: 144 |
I actually tried doing this already, as described in my original post, but it didn't work for me, as the output signal of the randomizer activated all the circuit nodes for some reason, instead of just one of them. This is by far the most puzzling aspect of the problem for me, since I can't find any logical explanation for it. Does anyone have any idea why they aren't considered as separate outputs? That does seem odd. The only thing that comes to mind is if you have the pattern set to add without reset, it will continue to activate them (without deactivating) until they are all activated. If you set it to "Override Pattern" then it will just randomize once per trigger. Yes, I've heard of this problem before, but right now I'd be content with figuring out an answer for the first issue I'm having. I don't even want to think on how I'll replace the wires coming from my randomizers if I have to emit them... *shudders* Thanks for the warning, though! Oh, and one question: can you emit objects onto a microchip? You cannot emit onto a MC. But what you can do is place your MC on invisible holo, then emit tags (or in this case, emit a randomizer) on invisible holo that collides/overlaps with the holo that your main MC is on. Use coded (named/colored) collision detectors on the MC to know what has been triggered. I hope this made sense and was helpful. | 2011-02-07 13:35:00 Author: v0rtex Posts: 1878 |
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.