-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
419 lines (381 loc) · 13.1 KB
/
index.html
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Build a character for use in Dungeons and Dragons 5th Edition 2024!">
<meta name="keywords" content="DnD, 27, point, buy, 5e, 2024, 5e2024, characterbuilder, fifth, edition, dungeon, dragon, dungeonsanddragons, D&D">
<meta name="author" content="BirddieSoftware">
<script src="https://unpkg.com/[email protected]"></script>
<script src="https://unpkg.com/[email protected]"></script>
<script src="pdf-edit.js"></script>
<script src="form-source.js"></script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7415667802447961"crossorigin="anonymous"></script>
<link rel="stylesheet" href="style.css" type="text/css"/>
<title>DnD 5e 2024 Character Builder</title>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-YK0LP4TEFD"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-YK0LP4TEFD');
</script>
</head>
<body class="small-screen-fix"">
<h1>Dungeons and Dragons 5th Edition 2024 Character Builder</h1>
<div class="player-form">
<label for="playerName">Character Name:</label>
<input type="text" id="playerName" name="playerName" placeholder="Enter character name">
<label for="race">Species:</label>
<select id="race" name="race" onchange="handleRaceChange()">
<option value="" disabled selected>Select your species</option>
<option value="Aasimar">Aasimar</option>
<option value="Dragonborn">Dragonborn</option>
<option value="Dwarf">Dwarf</option>
<option value="Elf">Elf</option>
<option value="Gnome">Gnome</option>
<option value="Goliath">Goliath</option>
<option value="Halfling">Halfling</option>
<option value="Human">Human</option>
<option value="Orc">Orc</option>
<option value="Tiefling">Tiefling</option>
</select>
<!-- Subrace dropdown will be hidden initially -->
<div id="subrace-container" style="display: none;">
<label for="subrace">Subrace:</label>
<select id="subrace" name="subrace">
<!-- Options will be dynamically inserted based on race -->
</select>
</div>
<label for="class">Class:</label>
<select id="class" name="class" onchange="updateClassFeatures()">
<option value="" disabled selected>Select your class</option>
<option value="Barbarian">Barbarian</option>
<option value="Bard">Bard</option>
<option value="Cleric">Cleric</option>
<option value="Druid">Druid</option>
<option value="Fighter">Fighter</option>
<option value="Monk">Monk</option>
<option value="Paladin">Paladin</option>
<option value="Ranger">Ranger</option>
<option value="Rogue">Rogue</option>
<option value="Sorcerer">Sorcerer</option>
<option value="Warlock">Warlock</option>
<option value="Wizard">Wizard</option>
</select>
</div>
<div style="display: flex;flex-direction: row;">
<div class="container">
<div class="table-header">
<label for="roleSelect">Select Background: </label>
<select style="margin-left:10px" id="roleSelect" onchange="updateRole()">
<option value="">--Select a Background--</option>
<option value="Acolyte">Acolyte (Intelligence, Wisdom, Charisma)</option>
<option value="Artisan">Artisan (Strength, Dexterity, Intelligence)</option>
<option value="Charlatan">Charlatan (Dexterity, Constitution, Charisma)</option>
<option value="Criminal">Criminal (Dexterity, Constitution, Intelligence)</option>
<option value="Entertainer">Entertainer (Strength, Dexterity, Charisma)</option>
<option value="Farmer">Farmer (Strength, Constitution, Wisdom)</option>
<option value="Guard">Guard (Strength, Intelligence, Wisdom)</option>
<option value="Guide">Guide (Dexterity, Constitution, Wisdom)</option>
<option value="Hermit">Hermit (Constitution, Wisdom, Charisma)</option>
<option value="Merchant">Merchant (Constitution, Intelligence, Charisma)</option>
<option value="Noble">Noble (Strength, Intelligence, Charisma)</option>
<option value="Sage">Sage (Constitution, Intelligence, Wisdom)</option>
<option value="Sailor">Sailor (Strength, Dexterity, Wisdom)</option>
<option value="Scribe">Scribe (Dexterity, Intelligence, Wisdom)</option>
<option value="Soldier">Soldier (Strength, Dexterity, Constitution)</option>
<option value="Wayfarer">Wayfarer (Dexterity, Wisdom, Charisma)</option>
</select>
<div>
<button class="class-button" onclick="classStats()">Class Recommended Stats</button>
</div>
</div>
<div style="display:flex">
<table class="table-sel">
<thead>
<tr>
<th class="tab-head" style="width: 16%">Ability</th>
<th class="tab-head" style="width: 16%">Base Score</th>
<th class="tab-head" style="width: 10%"></th>
<th class="tab-head" style="width: 16%">Background Modifier</th>
<th class="tab-head" style="width: 10%"></th>
<th class="tab-head" style="width: 16%">Total</th>
<th class="tab-head" style="width: 16%">Ability Modifier</th>
</tr>
</thead>
<tbody>
<tr class="oddRow">
<td>Strength</td>
<td>
<div><table><tbody><tr>
<td>
<div class="value" id="value1">8</div>
</td>
<td>
<div class="value-control">
<button onclick="increment(1)">▲</button>
<button onclick="decrement(1)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">+</td>
<td>
<div class="mod" id="modBox1"><table><tbody><tr>
<td>
<div class="value" id="mod1">0</div>
</td>
<td>
<div class="value-control">
<button onclick="modIncrement(1)">▲</button>
<button onclick="modDecrement(1)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">=</td>
<td class="value" id="total1">8
</td>
<td class="value" id="abilityMod1">-1
</td>
</tr>
<tr class="evenRow">
<td>Dexterity</td>
<td>
<div><table><tbody><tr>
<td>
<div class="value" id="value2">8</div>
</td>
<td>
<div class="value-control">
<button onclick="increment(2)">▲</button>
<button onclick="decrement(2)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">+</td>
<td>
<div class="mod" id="modBox2"><table><tbody><tr>
<td>
<div class="value" id="mod2">0</div>
</td>
<td>
<div class="value-control">
<button onclick="modIncrement(2)">▲</button>
<button onclick="modDecrement(2)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">=</td>
<td class="value" id="total2">8
</td>
<td class="value" id="abilityMod2">-1
</td>
</tr>
<tr class="oddRow">
<td>Constitution</td>
<td>
<div><table><tbody><tr>
<td>
<div class="value" id="value3">8</div>
</td>
<td>
<div class="value-control">
<button onclick="increment(3)">▲</button>
<button onclick="decrement(3)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">+</td>
<td>
<div class="mod" id="modBox3"><table><tbody><tr>
<td>
<div class="value" id="mod3">0</div>
</td>
<td>
<div class="value-control">
<button onclick="modIncrement(3)">▲</button>
<button onclick="modDecrement(3)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">=</td>
<td class="value" id="total3">8
</td>
<td class="value" id="abilityMod3">-1
</td>
</tr>
<tr class="evenRow">
<td>Intelligence</td>
<td>
<div><table><tbody><tr>
<td>
<div class="value" id="value4">8</div>
</td>
<td>
<div class="value-control">
<button onclick="increment(4)">▲</button>
<button onclick="decrement(4)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">+</td>
<td>
<div class="mod" id="modBox4"><table><tbody><tr>
<td>
<div class="value" id="mod4">0</div>
</td>
<td>
<div class="value-control">
<button onclick="modIncrement(4)">▲</button>
<button onclick="modDecrement(4)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">=</td>
<td class="value" id="total4">8
</td>
<td class="value" id="abilityMod4">-1
</td>
</tr>
<tr class="oddRow">
<td>Wisdom</td>
<td>
<div><table><tbody><tr>
<td>
<div class="value" id="value5">8</div>
</td>
<td>
<div class="value-control">
<button onclick="increment(5)">▲</button>
<button onclick="decrement(5)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">+</td>
<td>
<div class="mod" id="modBox5"><table><tbody><tr>
<td>
<div class="value" id="mod5">0</div>
</td>
<td>
<div class="value-control">
<button onclick="modIncrement(5)">▲</button>
<button onclick="modDecrement(5)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">=</td>
<td class="value" id="total5">8
</td>
<td class="value" id="abilityMod5">-1
</td>
</tr>
<tr class="evenRow">
<td>Charisma</td>
<td>
<div><table><tbody><tr>
<td>
<div class="value" id="value6">8</div>
</td>
<td>
<div class="value-control">
<button onclick="increment(6)">▲</button>
<button onclick="decrement(6)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">+</td>
<td>
<div class="mod" id="modBox6"><table><tbody><tr>
<td>
<div class="value" id="mod6">0</div>
</td>
<td>
<div class="value-control">
<button onclick="modIncrement(6)">▲</button>
<button onclick="modDecrement(6)">▼</button>
</div>
</td>
</tr></tbody></table></div>
</td>
<td class="operator">=</td>
<td class="value" id="total6">8
</td>
<td class="value" id="abilityMod6">-1
</td>
</tr>
</tbody>
</table>
<div class="price-pool">
<p class="display-points">Total Points: <br><br><span id="pricePool">27 / 27</span></p><br>
<p class="display-points">Background<br>Points: <br><br><span id="modifierPool">3 / 3</span></p>
<label>
<input type="checkbox" id="removeRestrictions" />
Remove Restrictions<br>On Ability Scores<br>And Points
</label>
</div>
</div>
<button style="margin:auto" class="class-button" onclick="clearStats()">Clear</button>
<!-- Div to display the selected class features -->
<div id="class-features" class="class-features">
<!-- Class features will be populated here -->
</div>
<div>
<label for="skill1">Choose Skill Proficiency 1:</label>
<select id="skill1" onchange="updateSkillOptions2()">
<option value="">--Select Skill--</option>
<!-- Skill options populated dynamically -->
</select>
</div>
<div>
<label for="skill2">Choose Skill Proficiency 2:</label>
<select id="skill2" onchange="updateSkillOptions3()">
<option value="">--Select Skill--</option>
<!-- Skill options populated dynamically -->
</select>
</div>
<div id="skillBox3" style="display:none;">
<label for="skill3">Choose Skill Proficiency 3:</label>
<select id="skill3" onchange="updateSkillOptions4()">
<option value="">--Select Skill--</option>
<!-- Skill options populated dynamically -->
</select>
</div>
<div id="skillBox4" style="display:none;">
<label for="skill4">Choose Skill Proficiency 4:</label>
<select id="skill4">
<option value="">--Select Skill--</option>
<!-- Skill options populated dynamically -->
</select>
</div>
<button style="margin:auto;margin-top:20px" class="class-button" onclick="fillForm()">Show Character Sheet</button>
<button style="margin:auto" class="class-button" onclick="fillFormPrinter()">Show Character Sheet (More printer friendly)</button>
<div class="kofi">
<script type='text/javascript' src='https://storage.ko-fi.com/cdn/widget/Widget_2.js'></script><script type='text/javascript'>kofiwidget2.init('Support Me on Ko-fi', 'e3eaf0', 'W7W1VL4Q9');kofiwidget2.draw();</script>
</div>
</div>
</div>
<footer style="width: 110%; background-color: #333; color: white; text-align: center; padding: 20px 0; margin-top: 80px;">
<div style="padding-bottom: 10px; border-bottom: 1px solid #777;">
<p>This site is not a replacement for the <em>Dungeons and Dragons</em> Player's Handbook and should only be used as a tool to assist with character creation.</p>
<p>For more information, visit the <a href="https://dnd.wizards.com/" target="_blank" style="color: #1E90FF;">official Dungeons and Dragons website</a>.</p>
</div>
<div style="padding-top: 10px;">
<p>Find me on <a href="https://x.com/BirddieSoftware" target="_blank" style="color: #1E90FF;">Twitter</a> | <a href="https://www.reddit.com/user/Birddie721/" target="_blank" style="color: #1E90FF;">Reddit</a></p>
<p>Email: <a href="mailto:[email protected]" style="color: #1E90FF;">[email protected]</a></p>
</div>
</footer>
</body>
</html>