Day 30: Crimes, Snitching and Arrests
Snitch, Question and Arrest
I created a jail cell in the security room out of existing assets. I added 4 prisoner stations for NPCs when the get arrested.
I created an arrest caution that throws the NPC in jail for 10 turns. All NPCs can snitch on each other and the player.
At this point testing was getting cumbersome and I needed to review my AI workflow.
Game Turn
- ai begins their turn
- gets players nearby rooms based on exit and enter room
- begin ai movement
- set npcs target room based on player location and ai_path
- s et order of potential rooms based on priority (rooms in between current location and target)
- attempt to fill station
- remove_effects
- release prisoners they get their npc action moves
- quest specific checks
- load level specifics, visuals, text scripts, …
then… this code:
Address Cautions
local watcher = tasksystem.address_cautions()
if watcher.npc ~= nil then confrontation_scene(watcher) end
- the dreaded address_cautions that i’ve needed to cleanup for a while
- add to game_turn function? - probably
Reviewed and Tweaked
I use two separate functions for witnessing the player steal and an NPC steal. I need to combine repeated code. Nothing really happens when the player is confronted. Needs a lot of consequences. Need to delete old cautions after they are addressed, like when someone is arrested. Addressing cautions needs to happen more often (each turn and interaction).
For confrontations, I need to add the npc’s current room and past room to their state and check to see if the pass each other through a “doorway”.
Stealing
instead of just stealing a random item I added 3 functions for stealing. Steal most valuable, the one that best aligns with your skills, the last item that was added or a random item.
I also added stat bonuses for every item.
Bugs Everywhere
Noticed when NPCs are sent to jail, they are cloned, and one of them is still walking around free.
I created logs to show what is going on in through the process of stealing and getting caught.
DEBUG:SCRIPT: Quest related checks:::
DEBUG:SCRIPT: steal attempt - visitor01 SEEN by: labor02 in grounds
DEBUG:SCRIPT: labor02 did not confront: visitor01
DEBUG:SCRIPT: consulation_checks: reckless
DEBUG:SCRIPT: labor02 saw visitor01 do theft and created caution: reckless
DEBUG:SCRIPT: consulation_checks: snitch
DEBUG:SCRIPT: RC::: visitor02 has NO effect but a caution: snitch because of gossip from labor02 that visitor01 was caught for theft
DEBUG:SCRIPT: visitor02 saw visitor01 do theft and created caution: snitch
I think what is interesting here is that V01 was seen stealing by L02, but L02 didn’t snitch to security. Instead L02 recklessly gossiped to V02 about the crime. Then V02 snitched to security third hand.
I thought it was fun to see the environment be a little “alive”.
Stashing
I wanted to mimic stealing, but instead NPCs could stash items. I could see in the future NPCs having hot, stolen items that they want to “hide” or cheap items they need to unload.
Now NPCs will either steal or stash. This should help keep inventories level and not have too much crime going on at once.
Also
My inventory code was messy but I ironed out the adding and removing of stat bonuses and also have them applying on “New Game”
Next:
- Doctor Quests again.
Files
Get Beeline Blvd.
Beeline Blvd.
Noir style turn-based relationship sim rpg with puzzles.
Status | Prototype |
Author | ferniss |
Genre | Strategy, Puzzle, Role Playing |
Tags | 2D, Casual, Noir, Singleplayer, Top-Down, Turn-based Strategy |
Languages | English |
More posts
- Day 24: Long Preamble then Quest Checkpoint LogicMay 08, 2024
- Day 21: Back to QuestsMay 04, 2024
- Day 15: Arrest Logic and Stuff I ForgotMay 03, 2024
- Day 13: A Long BreakMay 03, 2024
- Day 7 - Main Menu and 1st Quest BasicsOct 11, 2023
- Day 1 - Returning to the GameSep 23, 2023
Leave a comment
Log in with itch.io to leave a comment.