Skip to content

feat: align prompts to mechanics and enable player bored target#11

Open
freddyeleazar wants to merge 11 commits into
Dwemer-Dynamics:stobefrom
freddyeleazar:feat/mechanics-alignment-player-target
Open

feat: align prompts to mechanics and enable player bored target#11
freddyeleazar wants to merge 11 commits into
Dwemer-Dynamics:stobefrom
freddyeleazar:feat/mechanics-alignment-player-target

Conversation

@freddyeleazar

Copy link
Copy Markdown

Summary

Phase 1 — Kenshi Mechanics Alignment Prompt Block

  • Added stobeBuildKenshiMechanicsAlignmentPromptBlock() in lib/chat_helper_functions.php
  • New reusable prompt block injected into buildSystemPrompt() for all event types (chat, rechat, bored)
  • Supports tokens: #EVENT_TYPE#, #IN_PLAYER_FACTION#, #NPC_HEALTH#, #NPC_BLOOD#, #NPC_HUNGER#, #PLAYER_CATS#
  • DB seed added in data/schema.sql and migration 202605070101 in debug/db_updates.php

Phase 2 — Player Eligible as Bored Listener Target

  • In processor/bored.php, removed unconditional player exclusion from the listener candidate pool
  • Player can now be selected as a listener in bored events (NPC speaks to player)
  • Player remains excluded from speaker/bootstrap candidate selection

@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@freddyeleazar has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 47 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 30aca519-a1d2-49a7-92a8-8b50b07b3d00

📥 Commits

Reviewing files that changed from the base of the PR and between 640338d and 449ce79.

📒 Files selected for processing (7)
  • data/schema.sql
  • debug/db_updates.php
  • lib/chat_helper_functions.php
  • processor/bored.php
  • ui/controlpanel_hub.php
  • ui/settings.php
  • ui/world_knowledge_audit.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@RANGROO

RANGROO commented May 8, 2026

Copy link
Copy Markdown
Contributor

Hey thanks for contributing. Actually surprised someone found this repo lol.

Some feedback:

  1. For Kenshi Mechanics Alignment Prompt Block I don't think we actually need this. We are restating a lot of the current info from which seems a bit overkill. The rules are good and could be added to the prompt_head instead.

  2. I like player being eligible for rechat as its a neat gameplay style. Could we make this a toggle in general_settings, disabled by default. Similar to SPEAKER_RECHAT. It's good to give players a choice for what system they want to use.

  3. World Knowledge Audit is really cool! I might copy this into Herikaserver at somepoint. We need to make some improvements to the version over there.

4.Translation thing looks good and is a nice toggle!

Feel free to ping me on Discord if you have questions. Usually easiest way to reach me.

@RANGROO

RANGROO commented May 8, 2026

Copy link
Copy Markdown
Contributor

Also forgot to mention but could this PR be targeted to the unstable branch please. We usually do our code train from:
unstable -> dev -> stobe
Once merged in I will try and get this released soonish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants