• Home
  • Unreal Engine
  • C++
  • Blog
  • About

Projects Blog

AI Social Deduction: Week 7

7/11/2021

0 Comments

 

All About Dialogue

In the video above, Red kills Brown. Brown's body is eventually found, sparking a discussion amongst the survivors who the killer may be!

Dead Body Discovery

To start off, I had to make it so that crewmates were capable of starting a discussion scene whenever they spotted a dead body. However, they had to first approach the dead body, because there is a range limit in which a player can report a body in Among Us. To do this, I set it up so that dead bodies will stop the Innocent's Behavior Tree and turn a "Body in Sight" bool to true (indicating the crewmate sees a dead body). Once this is complete, the Behavior tree is restarted and follows this behavior:
Picture
This branch consists of what an Innocent should do upon seeing a dead body. If there is one visible, the crewmate will get the body's location, move to it, and then indicate to the AIDeductionGameMode that a discussion/voting scene should be started. The AIDeductionGameMode will then record who found the body, the information of the body's location and owner, and then the Game Mode will proceed to set all Crewmates around the discussion table while also deactivating their trees. Lastly, the Game Mode will clean up and remove all dead bodies currently on the ship.

This is all done in this manner to set up the discussion scene to have everything it needs to be performed and so as to match what occurs in the game Among Us when a body is found.


The Discussion Scene

The discussion scene consists of UI that display what the Crewmates "Know" about the victim and the room the murder took place in. The actual discussion is managed by a loop. In order the events as of currently are:
  1. The finder of the body gives a short summary of the victim, mentioning who it was and the location of their death. This finder is considered the lead for the conversation.
  2. The lead then asks what was the last time every Crewmate saw the victim alive.
  3. Every living Crewmate (including the lead) searches their memories for the last time they saw the victim. They then mention what they know. If they don't know the last time they saw the victim alive, they just say they haven't seen anything. I am planning to use the most recent time the victim was seen alive to slim down the number of memories the Crewmates search through to be in a certain time frame around that time.
  4. The lead will then ask who was the last person everyone saw in/entering/leaving the murder room.
  5. Similar to step 3, the Crewmates mention what they've seen when it comes to the murder room. The most recent person seen in/entering/leaving the room will then be determined as the killer. I could use the time of the murder room sighting and the time of the most recent victim sighting to give a percent chance that the suspect is the killer. This percentage could be used to spread out votes between the suspicious Crewmates, making the voting more like a natural game of Among Us. If not, I can just have all Crewmates vote for the most recent Crewmate in/entering/leaving the murder room.
Picture
An image of the blueprint for the discussion loop. Based on the question given, the crewmates have a different set of memories they search through and the response they give.
Picture
This image shows Purple, the lead of this discussion, asking the question of when everyone last saw Pink alive and each Crewmate saying when and where they last saw Pink.

Crewmate Portraits

Picture
The last part I'd like to discuss for this project is that each Crewmate now has a portrait! This is helpful for quickly recognizing which Crewmate is being observed on the Knowledge Bar and who is talking in discussions! The image being shown is bound to the name of the Crewmate being observed/the Crewmate who is "speaking".

What's Next?

The Discussion Scene isn't quite finished. To wrap up the implementation for now, I will be working on:
  • Having the Crewmates determine who the likely killer is. 
  • Having the discussion scene end and transition to the voting scene where the suspect will be voted on by all other Crewmates.
  • Making it so that the Discussion/Voting scene ends and the Crewmates return to their business as usual.
  • If I can, I would also like to have the voting scene kill off whichever Crewmate got the most votes against them.

As always, a nice bonus (if I can find time to do so):
  • Work on the visuals of the game. Updating the ship, the skybox around the ship, and the UI.

Want to Download the Project?


​Click Here:
Github Repository
0 Comments



Leave a Reply.

    Coleman Levy

    Welcome to my blog! 

    Archives

    August 2021
    July 2021
    June 2021
    May 2021

    Project

    All
    AI Social Deduction

    RSS Feed

  • Home
  • Unreal Engine
  • C++
  • Blog
  • About