Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6 dynamic npc generation #24

Merged
merged 34 commits into from
Sep 18, 2023
Merged

6 dynamic npc generation #24

merged 34 commits into from
Sep 18, 2023

Conversation

SverreNystad
Copy link
Owner

@SverreNystad SverreNystad commented Sep 18, 2023

New Features:

  • NPC Profiles: Generate detailed profiles

    • Name: Generate names based on the world's lore, cultural background, or specific requests.
    • Age: Offer a range or specific age based on the role and narrative needs.
    • Occupation: Define the NPC's profession or role in society.
    • Background Story: Provide a brief or detailed history of the NPC's past, shedding light on their current situation. What interactions with the player or other characters.
    • Appearance Descriptions: Offer vivid descriptions of the NPC's physical appearance, attire, and distinguishing features.
  • Personality & Motivations: Assign unique personalities, quirks, and motivations to each NPC, ensuring they feel distinct and memorable.

    • Personality Traits: Assign a combination of traits to make the NPC's behavior consistent and believable.
    • Quirks: Give the NPC unique habits or mannerisms.
    • Motivations: Outline what drives the NPC, be it a personal goal, a duty, or a deep-seated desire.

SverreNystad and others added 26 commits September 17, 2023 13:38
Co-authored-by: Knolaisen <[email protected]>
…CRelation, Create methods, generate_alignment, generate_general_background

Co-authored-by: Knolaisen <[email protected]>
Feat: add NPC psychology generation

Added a new class `NPCPsychology` to represent the psychology of non-player characters (NPCs). This class includes attributes such as personality traits, ideals, bonds, flaws, and goals.

Also added a new function `generate_npc_psychology` to generate the psychology for an NPC. This function takes the NPCProfile, background, and NPCRelations as inputs and returns an NPCPsychology object.

Furthermore, added a helper function `get_psychology_template` to provide a template for generating an NPC psychological profile. This template includes information about the NPC's background, race, age, alignment, and relations. The user is prompted to generate a psychological profile using a specific format.
Fix: Correct generate_name
@SverreNystad SverreNystad linked an issue Sep 18, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2023

Codecov Report

Patch coverage: 72.31% and project coverage change: -1.22% ⚠️

Comparison is base (7cb6192) 74.50% compared to head (68c67ac) 73.29%.
Report is 1 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
- Coverage   74.50%   73.29%   -1.22%     
==========================================
  Files           4        8       +4     
  Lines         102      397     +295     
==========================================
+ Hits           76      291     +215     
- Misses         26      106      +80     
Files Changed Coverage Δ
tests/test_npc_generation.py 52.38% <52.38%> (ø)
src/npc_generation.py 70.29% <70.29%> (ø)
tests/test_npc_templates.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SverreNystad SverreNystad merged commit 804e655 into main Sep 18, 2023
1 check passed
@SverreNystad SverreNystad self-assigned this Nov 11, 2023
@SverreNystad SverreNystad added the enhancement New feature or request label Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic NPC Generation
2 participants