Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Bot Emotions

Archive: 41 posts


Well i was bored and was trying to make Emotion logic for a Bot.

I was wanted it to work in a control pattern like this.

lets say I push up (Happy) and then down (Sad).
i want it to turn to Plain in the middle of the two.
The logic I made has the problem of every button has 4 levels of emotions,
like Up has (Plain). Then up again (Somewhat happy) then 3th UP
(Happy) then 4th UP (Really happy) so everytime i pushed one way to the other like
I push Up, then right, then down, then left and so on, it would stay on plain
because that was the first one on the list of all 4 emotions
but that's not how i want it to work. I want it so it will only go to plain once
when I change from one type of emotion to the other like from sad to mad...
Like here’s a Chart
http://www.freewebs.com/chaoswinds/Sozo/Emos.png
Hopefully you guys understand what I mean now

Yes what I want more or less will work much better then what I've seen as of yet
other people normally make As it will always change to Plain if you go to a different type of
Emotion and they will be reset to the first one on the list.
2011-04-29 20:46:00

Author:
Lord-Dreamerz
Posts: 4261


What you really need is an ordered input solution. Comphermc has a really good tutorial. (http://www.youtube.com/watch?v=nCryeXkKpDQ)

This way, as long as the player pushes up, it will cycle through. if they push any other direction, it will reset. with some slight modding you should be able to get it working.
2011-04-29 22:35:00

Author:
shane_danger
Posts: 283


Simple. 1 selector, each output for diffrent emotion, dpad go to inputs, reset to plain on top priority input of selector and trigger when condition is meet :>2011-04-29 22:48:00

Author:
Shadowriver
Posts: 3991


^
:0 really? i can do all emotions that simple?
all levels of all emotions? well I'll see but man...
it little sounds to good to be true.

Edit: Ummm nevermind i don't get how
I'm suppose to make it reset from what you said.

I'll just keep trying or use the thing from the Video above
2011-04-29 22:53:00

Author:
Lord-Dreamerz
Posts: 4261


Hi there
When PSN is back up I will send you the chip, that will do the job. Just look me up as sean88.

I will try to explain it here.
we
Firstly make your sackbot up. and on his base, place a microchip and DCS. I will show the setup and how it works.
Place a SELECTOR with 5 ports on it.
from the d-pads L/R bring a wire to a DIRECTION SPLITTER and from its positve output connect it to port 1 input on the selector. Connect the negative output on the splitter ot input port 2 on the selector.
from the d=pads Up/Dwn bring another wire to another DIRECTION SPLITTER and from its positve output connect it to input port 3 on the selector. Connect the negative output on 'this' direction splitter to input port 4.
Now, place an OR GATE with 2 inputs on the chip below these splitters. Wire the d-pads left/right to one of its inputs and the d-pads up/dwn to the other input. Wire the Or gate to a NOT GATE and wire the Not gate to input port 5 on the selector.

Now heres the tricky part as yopur going to have to make this chip quite large.
On the other side of this chip, place 4 selectors, each with 5 ports (these will represent the different d-pad directions/ states- its helpful to col.our code them. I used RED-ANGRY,GREEN-HAPPY,BLUE-SAD,YELLOW-SCARED)

Let me explain how the first part works first.- When you push the d-pad down for example it sends a comnined up/down signal to the splitter. This splits the signal into two states, a positive (up) and a negative (down). In turn each output goes to its own port on the selector. as does the split positve (right) and negative (left) of the other splitter. The OR and NOT gate setto activate the last input on the selector fires when no d-pad is pressed (this breaks the 'constantly on state of the selector.

Next...
Go over to the 4 selectors you placed on the other side of the chip. The wiring can get a little messy so give yourself loads of room on the chip. I'm gonig to assume were using d-pad up and down (happy/sad). We'll make the happy selector first. Colour it green and place 5 behaviour chips (one connected to each output port). Make the first 2 (output 1/2) neutral expressions. the third will be Happy-cheerful, the fourth will be Happy-happy and the fifth will be Happy-eccstatic.
Now, make the other 3 selectors in connected to behaviour chips in the same way, but changing the behaviour states on each chip.
So, you should have A green selector with 2 neutral and 3 states of happy, A blue selector with 2 neutral and 3 stated of sad and so on.

First, lets connect up the UP d-pad or 'Happy emotion. As Up on the d-pad is going to port one on our first selector, bring a wire from port ones output and connect it to the cycle tab on the 'green happy' selector. Also from this output port on the first selector bring a second wire and connect it to port ones input on the 'blue sad' selector, a third wire and connect to port ones input on the 'yellow scared' selector, and a fourth wire to input port one on the 'red-angry' selector.
Each of the inital first selectors output ports will need to be wired up thia way- so eventuall you will have 4 wires coming out of the first selector going to port one on each of the other 4 selectors, 4 wirse coming from port 2 on the first selector going to port one on the other selectors and so on.

It sounds confusing but if you give yourself enough space it wont be.

Ok so heres how the full logic works
When you press down on the d-pad it sends a signal to the up/down Splitter. The splitter splits the signal to give you a negative (down) signal and sends it to port one. As port one on the selector is active now Its output fires. From here a signal goes to the selector controlling the sad emotion. Every timw down is pushed the Cycle tab cycles to the next port (and the next state of sadness. However at the same time a signal is sent to all the other emotions selectors to set each one to the neutral port one emotion. The reason the first 2 ports on each selector are neutral states is because whenever you puse a new direction, that directions selector jumps to port 2 and as that is also a neutral behaviur state not matter what way you push, all the oher emotion selectors will flip to a neutral, port 1 state, EXCEPT if you keep pushing tapping in the same direction, 'that' selector cycles through the different states.

Sorry if the explination was confusing my friend- it does work, and I'll be happy to send you the chip if needed
2011-04-30 05:14:00

Author:
Sean88
Posts: 662


A slight correcion. You will need to use a 3 slot OR GATE connected to the first port of emotion selector so you can connect multiple wires into the first ports.2011-04-30 05:29:00

Author:
Sean88
Posts: 662


^OK I'll try it. i got pretty close even before i posted this topic
and yes i know about the Direction Splitter and DCS and selector,
like i said i got a model that was close to right, it even worked, but not in the
control pattern i was wanting. and i was at a loss how to fix it.
but hopefully what you showed me is the control pattern i am needing.
I'll give it a try. *mew
2011-04-30 05:30:00

Author:
Lord-Dreamerz
Posts: 4261


This really will solve your problem but it may sound a little confusing. Any problems with my setup just ask cos i spent the last hour making it and it works just as you want. 2011-04-30 05:33:00

Author:
Sean88
Posts: 662


This really will solve your problem but it may sound a little confusing. Any problems with my setup just ask cos i spent the last hour making it and it works just as you want.

wow an hour? i hope you needed it for your own reasons too
as for me i been at it for over a day. so thanks for the help.
i'll try it soon here.
2011-04-30 05:34:00

Author:
Lord-Dreamerz
Posts: 4261


Excuse any bad spelling buddy.. its 5am here lol. I wish i could just send the chip or a picture to explain it clearly.2011-04-30 05:36:00

Author:
Sean88
Posts: 662


Excuse any bad spelling buddy.. its 5am here lol. I wish i could just send the chip or a picture to explain it clearly.

Nah i have to make it by hand anyways or I'll never learn
tho a pic would have been nice, but it's fine.
2011-04-30 05:37:00

Author:
Lord-Dreamerz
Posts: 4261


Think og it thiss way. Youll have five selectors. The 'first'one literally will just differenciate between which d-pad direction is pushed. That in turn will got to the other 4. So the second selector and its 5 connected behaviour chips will deal with 'happy. The third selector and its 5 behaviour chups will deal with sad. The fourth and its behaviour chips will deal with Scared and the fifth will deal with angry.

lol. Ah, im glad to help mate. I usually get carried away with the game and creating stuff. I will eventually get a level mde lol :=D
2011-04-30 05:42:00

Author:
Sean88
Posts: 662


lol. Ah, im glad to help mate. I usually get carried away with the game and creating stuff. I will eventually get a level mde lol :=D

Yohoho~ OK OK. I'll post to let you know if it was what i wanted.
I'll try it in a hour or 2.
*mew
2011-04-30 05:54:00

Author:
Lord-Dreamerz
Posts: 4261


he he, go goodnight my friend. :-D2011-04-30 06:00:00

Author:
Sean88
Posts: 662


This seems interesting, but sadly I have no idea. Someone really needs to put a chip like this in the Creator's Toolkit thingymajig.2011-04-30 17:01:00

Author:
Jakest123
Posts: 319


I have a chip made out to do this, but dont know how to put it in creators toolkit.2011-04-30 19:38:00

Author:
Sean88
Posts: 662


just so you r aware if you work it out the way sean has told you it will reset to nuetral when you go in any direction...if you r wanting the sackbot to imitate sackboys emotions perfectly it should only reset when you push the opposite direction...ie from happy to sad/Vice versa or angry to frightened/vica versa. if you want to know how this can be accomplished let me know i made it last night after reading this. also you only need 3 emot chips for each expression...put nuetral on its own chip w a 4 port OR gate leading to it2011-04-30 19:57:00

Author:
Unknown User


Good call Babyface. It can be done both ways :-)2011-04-30 20:04:00

Author:
Sean88
Posts: 662


just offering lol2011-04-30 20:09:00

Author:
Unknown User


@babyface - i also made an emotion chip after reading this thread

Mine is a cross between the two of yours. I have an AND gate set up so that if all four emotions are 'neutral,' only then will the neutral chip be activated. sackboy does revert to neutral if you hit UP four times...

So I have the 3 input OR gate on each of the selectors' 4th inputs (which is just where i decided to put neutral). then if all four selectors are on output 4, they route back to an AND gate that goes to the neutral chip.

I'm just trying to come up with a way to have only one microchip active at a time... i was thinking one more selector that would activate the microchip. this way when you hit another direction, it goes back to neutral before cycling through the next emotion. I'll let you know if it works.

The sad part is that I know there are emotion chips out there and we are kinda reinventing the wheel... but we can't get to them without psn lol
2011-04-30 20:47:00

Author:
shane_danger
Posts: 283


just so you r aware if you work it out the way sean has told you it will reset to nuetral when you go in any direction...if you r wanting the sackbot to imitate sackboys emotions perfectly it should only reset when you push the opposite direction..

Ah if you read my first post i was wanting it to be better then MM's emotions.
and this was the idea i came up with. so no i did not want it to work like MM's way.
i find their way seems like a Bug IMO.
2011-04-30 22:43:00

Author:
Lord-Dreamerz
Posts: 4261


Yes what I want more or less will work much better then what I've seen as of yet
other people normally make As it will always change to Plain if you go to a different type of
Emotion and they will be reset to the first one on the list.

actually, now that i reread your first post, that is exactly how my emotion chip works... i can give it to you when the network comes back on. I also thought you wanted to imitate sackboy...

When PSN is back add me and I'll give it to you.
2011-04-30 22:52:00

Author:
shane_danger
Posts: 283


actually, now that i reread your first post, that is exactly how my emotion chip works... i can give it to you when the network comes back on. I also thought you wanted to imitate sackboy...

When PSN is back add me and I'll give it to you.

No i don't want it. i Just wanted someone to tell me how to make it
so i could go do it my self so i could learn from it. I'm not one
to use things people just give me as is. at the very least i like to put it together my self
even if someone told me how
2011-04-30 23:06:00

Author:
Lord-Dreamerz
Posts: 4261


Okay then, I will try to describe my version. It is pretty similar to Sean88's.

The sackbot's main chip (the one you can't move) is the (only) neutral chip.

Then I have two direction splitters - one attached to the up/down output, one attached to the left/right output. The positive output of the up/down is up, the negative down. The positive output of the left/right is right, the negative is left.

I then have a microchip with four microchips on it (to keep it organized). Each microchip is configured in essentially the same way. You'll need an OR gate with 3 inputs and a selector with 4 inputs/outputs. Let's say you're doing 'happy' (up) first. You'll place 3 behavior chips, one for each level of happy, on the microchip. You'll then take the positive output from the up/down direction splitter and put that into the selector's cycle switch. Selector output 1 - 3 will correspond to each level of happy, the first being happy level 1, the next level 2, etc. The other three outputs from the direction splitters will go to your OR gate. The OR gate will be wired to selector input 4.

You'll repeat this for the other emotions. Once you have all four set up, you'll put an AND gate with four inputs wired to the main sackbot chip (neutral). On each of your four emotion microchips, you should have selector output 4 still open. Wire each of these back to the AND gate.

Now, if you are in the second level of happy and hit angry, you will go to angry - NOT neutral.

I think that's everything... Let me know if I need to clarify anything Good luck.
2011-04-30 23:39:00

Author:
shane_danger
Posts: 283


good job shane..i think he wanted to go thru nuetral every time tho...seans would be closer to this tho on reading into what he put down two really annoying things will occur 1 when you cycle all the way thru you will go through 2 nuetral states...2nd if you hit happy then sad then angry you will stay in nuetral...so i went back and made you another1...ok...i was going to type it all out but im using my ps3 controller to type and what i wrote which was practically evrything...disappeared i said im not sure s/he even wants me to..i will write up my solution if you would like it.2011-05-01 01:08:00

Author:
Unknown User


Sean I got lost somewhere with your modal~ xD
http://www.freewebs.com/chaoswinds/Sozo/A%20Photo_26.jpg
I got lost what to do after this point and did not understand what you said to do next.

and Shane danger i messed up on yours and could not find out what i was doing wrong.
think you need to give me a more step by step run down of your logic.


.ok...i was going to type it all out but im using my ps3 controller to type and what i wrote which was practically evrything...disappeared i said im not sure s/he even wants me to..i will write up my solution if you would like it.

Oh yeah i forgot to say. what you said sounds right. I think?
I'm not very good at logic talk, and to go ahead and type it out if ya can.

*mew
2011-05-01 05:46:00

Author:
Lord-Dreamerz
Posts: 4261


http://www.flickr.com/photos/62368488@N06/5675044590/in/photostream/2011-05-01 07:59:00

Author:
Unknown User


http://www.flickr.com/photos/62368488@N06/5675044590/in/photostream/

Tip, flickr can't work with tag type code
but i got your pic anyways by Quoting you and looking it up by hand.

EDit: nevermind i found out how for you. you put in the wrong link.
[IMG]http://farm6.static.flickr.com/5304/5675044590_b538227280_z.jpg
http://farm6.static.flickr.com/5228/5675044522_dab6a23f86_z.jpg
http://farm6.static.flickr.com/5263/5674480507_931802c0cd_z.jpg
http://farm6.static.flickr.com/5261/5674480459_62587f4ecd_z.jpg
http://farm6.static.flickr.com/5303/5674480565_1263ee7485_z.jpg
http://farm6.static.flickr.com/5268/5674480547_cd7e12c8d8_z.jpg
2011-05-01 08:05:00

Author:
Lord-Dreamerz
Posts: 4261


Tip, flickr can't work with [IMG] tag type code
but i got your pic anyways by Quoting you and looking it up by hand.
...



So I think you may need to right click and open in a new tab or window. I'm not sure how to embed pics within the post
http://farm6.static.flickr.com/5304/5675044590_b538227280_z.jpg
ok so this first picture you can see is the overview of all the chips. when I made this chip I kept in mind that you'd probably be building seans first so it won't be that much different. I also tried to align everything to look like the d pad. Just place 6 chips on a chip on the sackbot

http://farm6.static.flickr.com/5261/5674480459_62587f4ecd_z.jpg
you can see that I wired the L stick but this was just so I could test things out. wire up/down to on direction splitter and left/right to the other wire a NOT gate to input one of the first selector then
+1 to the 2nd -1 to the 3rd. +2 to the 4th and -2 to the 5th input.

http://farm6.static.flickr.com/5268/5674480547_cd7e12c8d8_z.jpg
this is the far right chip and obviously contains all the emots. the chip in the center contains a 4 port or gate wired to a nuetral chip

http://farm6.static.flickr.com/5228/5675044522_dab6a23f86_z.jpg
this is the angry emot Microchip. the reason it's yellow is because I wanted it to be easier for you to see the wires. otherwise it would be red. you will make for of these. fun and redundant. pretend like the is up or happy. wire the 2nd output of the first selector on the controlinator to the cycle of the selecttor on this MC, one of the inputs on both of those and gates and to one of the inputs on the 3 port OR gate on all other emot Microchips. that is a .1 sec count up timer. selector outputs go as follows 1-nothing 2- 4 port Or gate to nuetral, 3, 4, and 5 go to their proper emot chips...happy, happier, happiest 5-also goes to the .1 second timer input. output of timer goes to one of the AND gates which then in turn goes to the reset of that timer as well as input 2 of the selector wire the other AND gate to input 3 and leave it alone for now. rinse and repeat for all emotions.

http://farm6.static.flickr.com/5263/5674480507_931802c0cd_z.jpg
this is the far left chip in the overview. it contains 2 4 port OR gates and 4 .3 second count up timers. wire one OR gate to the reset of these timers and the ouput of the timers to the other OR gate these are color coded timers for ease of wiring.

http://farm6.static.flickr.com/5303/5674480565_1263ee7485_z.jpg

this final pic kind of shows it and the emot MC in action it also gives you a clear vision of what to wire next. ok so wire the OR gate on the right to the open input on that final AND gate in all emot MCs then wire the output to the input of the OR gate on the left...do this for all emot chips. now wire the 2nd output (which is nuetral) of all selectors and wire the to the input of their respective timers now you have a working and operating emotion chip just how you wanted it.
2011-05-01 08:34:00

Author:
Unknown User


Thanks Babyface i got what i wanted
but even with you telling me what to do. it still took me like
2 hours to put this all together :S and there was some small things you forgot to
say what to do. so it left me guessing and having to go over everything you said, the pics
and what i was making all very carefully. but in the end i got it working...

but Logic sure is hard work sometimes. something like this seems like
it be super easy... but it never ends up that way least when it comes with me :S

and now to work on another logic that been giving me pain xD Yohohooho~
*mew
2011-05-01 13:16:00

Author:
Lord-Dreamerz
Posts: 4261


wow babyface, nice post..2011-05-01 16:11:00

Author:
shane_danger
Posts: 283


wow babyface, nice post..
can't tell if that's sarcasm lol
2011-05-01 16:42:00

Author:
Unknown User


can't tell if that's sarcasm lol

not at all! very detailed and easy to follow.
2011-05-01 20:59:00

Author:
shane_danger
Posts: 283


1 thing I noticed. when i change from one emotion to another it's mouth opens big
for less then a second while between changing to Plain.
I played around, but it seems the bot will do it no matter what?
is it a bug? it seems to me Bots always do it no matter the type of logic.
2011-05-01 23:11:00

Author:
Lord-Dreamerz
Posts: 4261


do you have a sackbot costume on it? or a sackboy?2011-05-01 23:31:00

Author:
Unknown User


do you have a sackbot costume on it? or a sackboy?

Sackperson costume.
2011-05-01 23:33:00

Author:
Lord-Dreamerz
Posts: 4261


I've noticed that, too. The switch between emotions is not as natural as when it's on sackboy.2011-05-01 23:43:00

Author:
shane_danger
Posts: 283


that's weird i'll check it out again but I'm pretty sure that it worked fine with mine. if that is the case maybe its just a latency issue where it takes a few seconds for the event to happen. like if you ever go to a basketball game and sit behind the announcers you'll see these little televisions, that are relaying the game live but it's still a few seconds behind because of all the wires it has to go through2011-05-01 23:57:00

Author:
Unknown User


Well anyways. thanks for all the help guys
if anyone like to talk more to me just send me a friend request on here and message me sometime.

so yeah this topic can be closed i think now.
unless you guys got other things to talk about it.
2011-05-01 23:58:00

Author:
Lord-Dreamerz
Posts: 4261


Okay then, I will try to describe my version. It is pretty similar to Sean88's.

The sackbot's main chip (the one you can't move) is the (only) neutral chip.

Then I have two direction splitters - one attached to the up/down output, one attached to the left/right output. The positive output of the up/down is up, the negative down. The positive output of the left/right is right, the negative is left.

I then have a microchip with four microchips on it (to keep it organized). Each microchip is configured in essentially the same way. You'll need an OR gate with 3 inputs and a selector with 4 inputs/outputs. Let's say you're doing 'happy' (up) first. You'll place 3 behavior chips, one for each level of happy, on the microchip. You'll then take the positive output from the up/down direction splitter and put that into the selector's cycle switch. Selector output 1 - 3 will correspond to each level of happy, the first being happy level 1, the next level 2, etc. The other three outputs from the direction splitters will go to your OR gate. The OR gate will be wired to selector input 4.

You'll repeat this for the other emotions. Once you have all four set up, you'll put an AND gate with four inputs wired to the main sackbot chip (neutral). On each of your four emotion microchips, you should have selector output 4 still open. Wire each of these back to the AND gate.

Now, if you are in the second level of happy and hit angry, you will go to angry - NOT neutral.

I think that's everything... Let me know if I need to clarify anything Good luck.

Sorry for bumping this, but I didn't see the point in creating a new thread for this topic.

My emotion chip is described as above... The problem I'm having now is that it only seems to work selectively. Sometimes, the emotions will change, but then I can't go back to neutral. I've watched the logic work, and everything is fine. The neutral chip is definitely selected, but my bot still has the last selected emotion..

Other times, it goes back to neutral no problem.

Any ideas? And to clarify my "neutral" chip is the one on the sackbot (the one you can't move). I don't know if that is making a difference, though I can't think of a reason it would.
2011-05-05 15:55:00

Author:
shane_danger
Posts: 283


just redo it like mine Problem solved2011-05-06 04:23:00

Author:
Unknown User


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.