game_ncm

GameGirl Color – NCM-as-game-variables engine.

OMORI-inspired emotion system + RPG game variables implemented as a parallel NCM vector space. NOT the real limbic system – this is a game mechanic layer that uses NCM-style math for battle stats, currency, health, and an emotion interaction matrix. # 🎮💀🌀 EMOTION ENGINE POSSESSED

class game_ncm.BattleModifiers(attack_mult=1.0, defense_mult=1.0, speed_mult=1.0, crit_rate=0.05, evasion=0.05, accuracy=1.0, status_resist=1.0, description='')[source]

Bases: object

Calculated stat modifiers from the current emotion vector.

Parameters:
attack_mult: float = 1.0
defense_mult: float = 1.0
speed_mult: float = 1.0
crit_rate: float = 0.05
evasion: float = 0.05
accuracy: float = 1.0
status_resist: float = 1.0
description: str = ''
to_dict()[source]
Return type:

dict[str, Any]

async game_ncm.initialize_game_ncm(game_id, redis=None)[source]

Create the default NCM vector for a new game.

Return type:

dict[str, float]

Parameters:
async game_ncm.get_vector(game_id, redis=None)[source]

Get the current game NCM vector.

Return type:

dict[str, float]

Parameters:
async game_ncm.apply_delta(game_id, deltas, redis=None)[source]

Apply delta changes to the game NCM vector.

Values are clamped to [0, 3] for emotions and stats. G_XP and G_LEVEL are uncapped upward. After applying deltas, combo emotions are recalculated.

Return type:

dict[str, float]

Parameters:
game_ncm.get_battle_modifiers(vector)[source]

Calculate battle stat modifiers from the current emotion vector.

Each emotion affects different stats: - HAPPY: crit rate up, speed up - SAD: defense up, speed down - ANGRY: attack up, accuracy down - AFRAID: evasion up, attack down - Combos stack additional effects

Return type:

BattleModifiers

Parameters:

vector (dict[str, float])

game_ncm.get_emotion_advantage(attacker_emotion, defender_emotion)[source]

Get the damage multiplier for an emotion matchup.

Returns:

1.5 for advantage, 0.7 for disadvantage, 1.0 for neutral.

Return type:

float

Parameters:
  • attacker_emotion (str)

  • defender_emotion (str)

game_ncm.format_hud(vector)[source]

Render a HUD-style status display for the system prompt.

Uses the GAMEGIRL COLOR aesthetic with bar-style indicators.

Return type:

str

Parameters:

vector (dict[str, float])

async game_ncm.format_hud_from_redis(game_id, redis=None)[source]

Convenience: load vector and format HUD in one call.

Return type:

str

Parameters: