CharActor


NameCharActor JSON
Version 0.9.8 PyPI version JSON
download
home_pagehttps://github.com/primal-coder/CharActor
SummaryA module for creating and managing rpg characters.
upload_time2023-12-11 08:28:52
maintainer
docs_urlNone
authorJames Evans
requires_python>=3.8
license
keywords rpg character dnd d&d dungeons and dragons dungeons & dragons player character actor charactor
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CharActor

### Description

CharActor provides a convenient collection of character-based operations. It allows you to easily create, modify and employ characters in a variety of different ways.

### Installation

```bash
pip install CharActor
```

## Usage

```python
from CharActor import character_bank, create

# Create a randomized character
character = create()

# Create a character with a specific name
character = create(name='John Doe')

# Create a character with a specific object name, character name, race, role, background and alignment
character = create('my_character', 'John Doe', 'Human', 'Fighter', 'Noble', 'Lawful Good')

# Access any of the characters
my_character = character_bank.my_character

# Access any of the characters' attributes
my_character.name # 'John Doe'
my_character.Strength # Str: 17 (+3)
```

## Characters

A character object contains a variety of attributes/methods which tend to differ from character to character.

### Attributes

* name
* _role (e.g my_character.Fighter)
* _race (e.g my_character.Human)
* _background (e.g my_character.Noble)
* _alignment (e.g my_character.LawfulGood)
* age
* Strength
* Dexterity
* Constitution
* Intelligence
* Wisdom
* Charisma
* actions
* armor_class
* character_sheet (e.g print(my_character.character_sheet))
* entity_id
* experience
* hp
* initiative
* inventory
* level
* saving_throws
* skill_points
* skillbook
* speed
* target

### Methods

* attack
* look_around
* move
* pickup
* saving_throw
* end_turn

## Character Bank

The character bank is a collection of all the characters that have been created. It is a dictionary of character objects, with the key being the name of the character. More conveniently, the character bank also allows you to access the characters as attributes. A saving system(using python's pickle) is currently under development. Until then your character's are only saved for the duration of the program.

```python
from CharActor import character_bank, create

# Create a character
character = create('my_character')

# Access the character
my_character = character_bank.my_character
print(my_character.character_sheet)
```


## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License

[MIT](https://choosealicense.com/licenses/mit/)

## Support

If you like this project or are just feeling generous, consider buying me a coffee.

[buymeacoffee](https://www.buymeacoffee.com/primalcoder)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/primal-coder/CharActor",
    "name": "CharActor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "rpg character dnd d&d dungeons and dragons dungeons & dragons player character actor charactor",
    "author": "James Evans",
    "author_email": "joesaysahoy@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f8/5b/35c33c6c15ad1ce74f742cdb33b88daf8c144a6a32658197e98e6e1e7fa9/CharActor-0.9.8.tar.gz",
    "platform": null,
    "description": "# CharActor\n\n### Description\n\nCharActor provides a convenient collection of character-based operations. It allows you to easily create, modify and employ characters in a variety of different ways.\n\n### Installation\n\n```bash\npip install CharActor\n```\n\n## Usage\n\n```python\nfrom CharActor import character_bank, create\n\n# Create a randomized character\ncharacter = create()\n\n# Create a character with a specific name\ncharacter = create(name='John Doe')\n\n# Create a character with a specific object name, character name, race, role, background and alignment\ncharacter = create('my_character', 'John Doe', 'Human', 'Fighter', 'Noble', 'Lawful Good')\n\n# Access any of the characters\nmy_character = character_bank.my_character\n\n# Access any of the characters' attributes\nmy_character.name # 'John Doe'\nmy_character.Strength # Str: 17 (+3)\n```\n\n## Characters\n\nA character object contains a variety of attributes/methods which tend to differ from character to character.\n\n### Attributes\n\n* name\n* _role (e.g my_character.Fighter)\n* _race (e.g my_character.Human)\n* _background (e.g my_character.Noble)\n* _alignment (e.g my_character.LawfulGood)\n* age\n* Strength\n* Dexterity\n* Constitution\n* Intelligence\n* Wisdom\n* Charisma\n* actions\n* armor_class\n* character_sheet (e.g print(my_character.character_sheet))\n* entity_id\n* experience\n* hp\n* initiative\n* inventory\n* level\n* saving_throws\n* skill_points\n* skillbook\n* speed\n* target\n\n### Methods\n\n* attack\n* look_around\n* move\n* pickup\n* saving_throw\n* end_turn\n\n## Character Bank\n\nThe character bank is a collection of all the characters that have been created. It is a dictionary of character objects, with the key being the name of the character. More conveniently, the character bank also allows you to access the characters as attributes. A saving system(using python's pickle) is currently under development. Until then your character's are only saved for the duration of the program.\n\n```python\nfrom CharActor import character_bank, create\n\n# Create a character\ncharacter = create('my_character')\n\n# Access the character\nmy_character = character_bank.my_character\nprint(my_character.character_sheet)\n```\n\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n## Support\n\nIf you like this project or are just feeling generous, consider buying me a coffee.\n\n[buymeacoffee](https://www.buymeacoffee.com/primalcoder)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A module for creating and managing rpg characters.",
    "version": "0.9.8",
    "project_urls": {
        "Homepage": "https://github.com/primal-coder/CharActor"
    },
    "split_keywords": [
        "rpg",
        "character",
        "dnd",
        "d&d",
        "dungeons",
        "and",
        "dragons",
        "dungeons",
        "&",
        "dragons",
        "player",
        "character",
        "actor",
        "charactor"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f85b35c33c6c15ad1ce74f742cdb33b88daf8c144a6a32658197e98e6e1e7fa9",
                "md5": "9d50edc4caaf4ee64e77342f25d0f6c8",
                "sha256": "a98b8750b73a5fee43ea5faf1f1193a54679c04938d057705d594521380c291d"
            },
            "downloads": -1,
            "filename": "CharActor-0.9.8.tar.gz",
            "has_sig": false,
            "md5_digest": "9d50edc4caaf4ee64e77342f25d0f6c8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 41342,
            "upload_time": "2023-12-11T08:28:52",
            "upload_time_iso_8601": "2023-12-11T08:28:52.763724Z",
            "url": "https://files.pythonhosted.org/packages/f8/5b/35c33c6c15ad1ce74f742cdb33b88daf8c144a6a32658197e98e6e1e7fa9/CharActor-0.9.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-11 08:28:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "primal-coder",
    "github_project": "CharActor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "charactor"
}
        
Elapsed time: 0.15311s