CharActor


NameCharActor JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://github.com/primal-coder/CharActor
SummaryA module for creating and managing rpg characters.
upload_time2024-07-07 01:13:00
maintainerNone
docs_urlNone
authorJames Evans
requires_python>=3.8
licenseNone
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": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "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/d8/da/58d926d1359e09993b9d24a122123c6e995f094dc59bb171dec640652c8b/CharActor-1.0.5.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": null,
    "summary": "A module for creating and managing rpg characters.",
    "version": "1.0.5",
    "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": "d8da58d926d1359e09993b9d24a122123c6e995f094dc59bb171dec640652c8b",
                "md5": "d8914000375a6bf724c1c216eeab9562",
                "sha256": "b56883245fbfa65b2847a092fe273a0f14d391fb58211857a8adc87683387563"
            },
            "downloads": -1,
            "filename": "CharActor-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "d8914000375a6bf724c1c216eeab9562",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 41496,
            "upload_time": "2024-07-07T01:13:00",
            "upload_time_iso_8601": "2024-07-07T01:13:00.976786Z",
            "url": "https://files.pythonhosted.org/packages/d8/da/58d926d1359e09993b9d24a122123c6e995f094dc59bb171dec640652c8b/CharActor-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-07 01:13:00",
    "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.27567s