forked from DanielK314/DnDSimulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHow_to.txt
147 lines (124 loc) · 4.96 KB
/
How_to.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
Character Classes:
1. Fighter
1.3 Battle Master Maneuvers not imp
2. Barbarian
2.1 Berserker done up to lv5
2.2 Totem Spirits, bear, eagle, wolf, done
2.3 next: Aspect of the Beast
3. Cleric
3.1 Channel Devinity, turn undead, destroy undead
4. Druid
4.1 pretty far done, create more spells and Wild Shape Forms
5.Paladin
5.1 Fighting Style
5.2 Aura of protection implemented
6. Bard
6.1 Inspiration, Combat Inspiration
6.2 Cutting Words
Zu adden in Character Sheet:
Legendary Action
!!! If Team == 1 it is considered a Monster, every other tag like 0, 1, 2 is considered a PC for PvP for example
Also, Statistical Recap might not work for teams other then 0 vs 1
Creature Types:
normal
undead
beast
plant
construct
Damage Types:
acid
bludgeoning
cold
fire
force
lightning
necrotic
piercing
poison
psychic
radiant
slashing
thunder
heal
true
How To:
New BeastForms:
1.add Beast Entity to Archive
2.add to Beast Forms in Entity Class
New Abilities:
1.add Ability to Entity Class Init under special Abilites
1.1 If you using recources, reset them in long rest
1.2 If you add a recource, use exception to ensure backwards compatability
2.Implement the feature in the Entity class
2.1 If it involves a decision maybe add it to AI class
2.2 If it is something to do as action or bonus action, add it as a choice class
Add to GUI:
Bool Attributes:
1.Add the Name of the Ability to Controller self.All_Abilities
1.1 Attention: this list must be ordered in classes, so keep the right order
2. The Ability page is build according to the Controller self.Class dict:
2.1 Increse the Number value for the class you just added an Ability
Entry Attributes:
1.Add to Controller self.All_Other_Ability_Entries dict
1.1 Add Name, add the Text that should be displayed in GUI, add ClassName (like Fighter, or Bard)
1.2 Add 'AttributeName' which is the name of the Entities Attribute, like self.sorcery_points
1.3 If it is a Float, set that to true, else it is a Int
2. Add the Key to New Character.json
New Spells:
1. Add a new Spell Class for the Spell
1.1 Three types for spells are implemented: attack spells, save spells, and AOE spells. Use them as super classes for new spells if it makes sense
2. Add a __init__ function with self.spell_name (the one listed in GUI/Entity), self.spell_text (the name that should be printed when casted), self.spell_level, as well as self.is_bonus_action_spell, self.is_concentration_spell, self.is_reaction_spell, self.is_cantrip, self.is_twin_castable, self.is_range_spell if any is true
3. Add a score function, that will be called in the AI spell choice
3.1 must return a dmg equal score, target and cast level
3. Add a cast function
3.1 Use Tokens for Concentration spells
3.2 remember to reset counter or variables of the spell at end of turn or long rest, if used any
4. Add Spell to Spell Name List in Entity Class
4.1 Spell should be listed automatically in GUI and used if AI
New Token relation:
1. Create a Link Token, via the LinkToken class or via a subclass
1.1 if the token should set an attribute of the player, then add it to the TMs subtype_dict
2. Initiate one or more Link Token
3. Create a DockToken or a subclass of a DockToken
3.1 wenn Initiateing the DockToken, give a List of the Link Tokens.
3.2 The Link Tokens will be resolved if the Dock is, or vici verca if all links are resolved
3.3 For example: see Spell_class -> guiding_bolt.cast()
4. You can add resolve conditions to the Tokens
5. You might add smt to the update function of the TM
6. You can add Trigger conditions that activate but not resolve the Token
New Chreature Type:
1. Add to Controller __init__ as all types
New Conditional Choice
Conditional Choices are Choices that are added to the Choices list of the AI if a spell or ability is used that should be removed later, like with a token
1. Create the new Choice
2. Add Choice to AI and the self.conditionalChoicesList
3. Add Choice via a function, or preferably a token (which later removes it aswell) to AI with AI.add_choice()
3.1 Remember, the conditional Choices do not remove themselfs
4. Use AI.remove_choice() to remove Choice
4.1 remember, this function throws an error if Choice is not in Choices or not in conditional choices
DM.say():
1. If you want to print something use DM.say() (it will be disabled, if printing is disabled)
2. If you want this print to start a new line use DM.say(string, True)
Run Time Benchmark:
1. Configure Benchmark in run_time_benchmark.py
2. The Benchmark Entities are in a folder
3. Then run TimeAnalysis
Create a Exe File
Use the program pyinstall
'pyinstaller --onefile StartSimulator.py'
File is in dist folder
Add the rest of the Stuff and .zip it
Checkout Remote Repo:
git remote add name git://path/to/coworkers/repo.git (only once)
git fetch name
git check remotes/name/branch
Count the lines of code
git ls-files | grep '\.py' | xargs wc -l
Test ttkinter bootstrap
python -m ttkbootstrap
Uberspace Website
https://encosim.uber.space
restart fastAPI:
supervisorctl stop all
supervisorctl start all