You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-23Lines changed: 14 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,15 +47,15 @@ python manage.py runserver
47
47
48
48
# Using CharacterCreator
49
49
50
-
Now you are ready for the extra cool part, automatic character generation. It is currently achieved with a Python script called `setup.py`. You'll need to edit a few numbers in the `setup.py` script and then you'll be ready to start.
50
+
Now you are ready for the extra cool part, automatic character generation. It is currently achieved with two Python scripts called `setup.py` and `makecharacter.py`. You'll need to edit a few numbers in the `makecharacter.py` script to be ready for the character generation portion, described in detail below.
51
51
52
52
Make sure you already started your server. If you just did your setup you are fine, but if you have restarted your computer or shut down your server you will need to run the following command again. In a terminal navigated to the same folder from the "Getting Set Up" section above, type:
53
53
54
54
```
55
55
python manage.py runserver
56
56
```
57
57
58
-
## The first run of `setup.py`
58
+
## First run `setup.py` once
59
59
60
60
The first time you will need to have your YAML files ready and edit the `setup.py` to point to the absolute paths to those files on your computer or the relative paths from the code repository, like this:
You can make sample characters at the same time if you want, but don't have to. The important part is to only run `setup.py` once this way to initialize your database's history rolling and roles, stats, and skills.
67
+
Only run `setup.py` once to initialize your database's history rolling and roles, stats, and skills.
68
68
69
69
In another different terminal navigated to the same folder from the "Getting Set Up" section above, type:
70
70
@@ -76,36 +76,27 @@ It will print out a few messages about setting things up in your database.
76
76
77
77
## From then on
78
78
79
-
You need to open up the `setup.py` and comment out the two lines that are only supposed to run once:
80
-
81
-
```python
82
-
# ONE-TIME roles, stats, and skills definitions ONLY HAPPENS ONCE
83
-
# This should only be run once
84
-
# If it fails somehow, you should empty your database, adjust your YAML's, and try again
85
-
setup_skillstats(skillstats_yaml) # comment this out when you're done with it
86
-
87
-
# ONE-TIME history events and rolls definitions ONLY HAPPENS ONCE
88
-
# This should only be run once
89
-
# If it fails somehow, you should empty your database, adjust your YAML's, and try again
90
-
setup_history(history_yaml) # comment this out when you're done with it
91
-
```
92
-
93
-
You can choose to create any number of characters with any amount of stat and skill points by editing these variables at the top of the `main` function:
79
+
You can choose to create any number of characters with any amount of stat and skill points by editing these variables at the top of the `makecharacter.py``__main__` function:
94
80
95
81
```python
96
82
if__name__=='__main__':
83
+
# character count to make per run
97
84
character_count =5
98
-
center_stat_points =50
99
-
center_role_points =40
100
-
center_other_points =10
85
+
86
+
# mean (a.k.a. average) point values
87
+
mean_stat_points =50
88
+
mean_role_points =40
89
+
mean_other_points =10
101
90
```
102
91
103
-
Now you can run `setup.py` the same way every time you want more characters:
92
+
You can run `makecharacter.py` the same way every time you want more characters:
104
93
105
94
```
106
-
python setup.py
95
+
python makecharacter.py
107
96
```
108
97
98
+
Currently, by default, you enter `stat`, `role`, and `other` points as a mean which characters actual points are sampled from a normal distribution with 20% of the mean variance.
99
+
109
100
Now open a web browser and go to [`http://localhost:8000/cc/`](http://localhost:8000/cc/) to see all of your characters.
0 commit comments