BlueGit

blue-star tribegen

stuff

timfa Tim · pushed by timfa

Authored 2026-01-27 · 9 months ago

Hash
32b42d3d8560833fa3f82633e871a966b9449b0c
Parent
49730f61
20 files changed +99 −1455
.gitignore +2 −0
@@ -13,3 +13,5 @@ Thumbs.db
13 13 *.log
14 14 data/users/*
15 15 !data/users/.gitkeep
16
17 web/data/
@@ -13,3 +13,5 @@ Thumbs.db
13*.log
13*.log
14data/users/*
14data/users/*
15!data/users/.gitkeep
15!data/users/.gitkeep
16
17web/data/
web/data/saves/1/1/items.json deleted +0 −1
@@ -1 +0,0 @@
1 []
@@ -1 +0,0 @@
1[]
web/data/saves/1/1/kobolds.json deleted +0 −442
@@ -1,442 +0,0 @@
1 [
2 {
3 "id": "kob_69792c23573bd",
4 "name": "Kobold 1",
5 "age": 16,
6 "stats": {
7 "vitality": 80,
8 "intelligence": 97,
9 "tinkering": 57,
10 "medicine": 28,
11 "crafting": 70,
12 "personality": 78,
13 "will": 79
14 },
15 "sprite_morph": null,
16 "is_leader": false,
17 "is_alive": true,
18 "is_expelled": false,
19 "injuries": [],
20 "items": [],
21 "father_id": null,
22 "mother_id": null
23 },
24 {
25 "id": "kob_69792c2358404",
26 "name": "Kobold 2",
27 "age": 9,
28 "stats": {
29 "vitality": 39,
30 "intelligence": 85,
31 "tinkering": 16,
32 "medicine": 11,
33 "crafting": 8,
34 "personality": 68,
35 "will": 91
36 },
37 "sprite_morph": null,
38 "is_leader": false,
39 "is_alive": true,
40 "is_expelled": false,
41 "injuries": [],
42 "items": [],
43 "father_id": null,
44 "mother_id": null
45 },
46 {
47 "id": "kob_69792c2358ea1",
48 "name": "Kobold 3",
49 "age": 10,
50 "stats": {
51 "vitality": 65,
52 "intelligence": 6,
53 "tinkering": 78,
54 "medicine": 52,
55 "crafting": 25,
56 "personality": 64,
57 "will": 25
58 },
59 "sprite_morph": null,
60 "is_leader": false,
61 "is_alive": true,
62 "is_expelled": false,
63 "injuries": [],
64 "items": [],
65 "father_id": null,
66 "mother_id": null
67 },
68 {
69 "id": "kob_69792c2359963",
70 "name": "Kobold 4",
71 "age": 9,
72 "stats": {
73 "vitality": 90,
74 "intelligence": 24,
75 "tinkering": 56,
76 "medicine": 74,
77 "crafting": 30,
78 "personality": 87,
79 "will": 81
80 },
81 "sprite_morph": null,
82 "is_leader": false,
83 "is_alive": true,
84 "is_expelled": false,
85 "injuries": [],
86 "items": [],
87 "father_id": null,
88 "mother_id": null
89 },
90 {
91 "id": "kob_69792c235a165",
92 "name": "Kobold 5",
93 "age": 18,
94 "stats": {
95 "vitality": 80,
96 "intelligence": 99,
97 "tinkering": 92,
98 "medicine": 39,
99 "crafting": 87,
100 "personality": 34,
101 "will": 40
102 },
103 "sprite_morph": null,
104 "is_leader": false,
105 "is_alive": true,
106 "is_expelled": false,
107 "injuries": [],
108 "items": [],
109 "father_id": null,
110 "mother_id": null
111 },
112 {
113 "id": "kob_69792c235a988",
114 "name": "Kobold 6",
115 "age": 18,
116 "stats": {
117 "vitality": 17,
118 "intelligence": 58,
119 "tinkering": 89,
120 "medicine": 38,
121 "crafting": 69,
122 "personality": 34,
123 "will": 69
124 },
125 "sprite_morph": null,
126 "is_leader": false,
127 "is_alive": true,
128 "is_expelled": false,
129 "injuries": [],
130 "items": [],
131 "father_id": null,
132 "mother_id": null
133 },
134 {
135 "id": "kob_69792c235b30b",
136 "name": "Kobold 7",
137 "age": 13,
138 "stats": {
139 "vitality": 42,
140 "intelligence": 51,
141 "tinkering": 20,
142 "medicine": 26,
143 "crafting": 39,
144 "personality": 96,
145 "will": 90
146 },
147 "sprite_morph": null,
148 "is_leader": false,
149 "is_alive": true,
150 "is_expelled": false,
151 "injuries": [],
152 "items": [],
153 "father_id": null,
154 "mother_id": null
155 },
156 {
157 "id": "kob_69792c235bc80",
158 "name": "Kobold 8",
159 "age": 16,
160 "stats": {
161 "vitality": 98,
162 "intelligence": 1,
163 "tinkering": 96,
164 "medicine": 81,
165 "crafting": 58,
166 "personality": 93,
167 "will": 37
168 },
169 "sprite_morph": null,
170 "is_leader": false,
171 "is_alive": true,
172 "is_expelled": false,
173 "injuries": [],
174 "items": [],
175 "father_id": null,
176 "mother_id": null
177 },
178 {
179 "id": "kob_69792c235c46d",
180 "name": "Kobold 9",
181 "age": 11,
182 "stats": {
183 "vitality": 36,
184 "intelligence": 32,
185 "tinkering": 63,
186 "medicine": 1,
187 "crafting": 66,
188 "personality": 99,
189 "will": 58
190 },
191 "sprite_morph": null,
192 "is_leader": false,
193 "is_alive": true,
194 "is_expelled": false,
195 "injuries": [],
196 "items": [],
197 "father_id": null,
198 "mother_id": null
199 },
200 {
201 "id": "kob_69792c235d37a",
202 "name": "Kobold 10",
203 "age": 11,
204 "stats": {
205 "vitality": 78,
206 "intelligence": 88,
207 "tinkering": 24,
208 "medicine": 92,
209 "crafting": 37,
210 "personality": 89,
211 "will": 83
212 },
213 "sprite_morph": null,
214 "is_leader": false,
215 "is_alive": true,
216 "is_expelled": false,
217 "injuries": [],
218 "items": [],
219 "father_id": null,
220 "mother_id": null
221 },
222 {
223 "id": "kob_69792c235ddd6",
224 "name": "Kobold 11",
225 "age": 6,
226 "stats": {
227 "vitality": 82,
228 "intelligence": 77,
229 "tinkering": 36,
230 "medicine": 24,
231 "crafting": 90,
232 "personality": 44,
233 "will": 89
234 },
235 "sprite_morph": null,
236 "is_leader": false,
237 "is_alive": true,
238 "is_expelled": false,
239 "injuries": [],
240 "items": [],
241 "father_id": null,
242 "mother_id": null
243 },
244 {
245 "id": "kob_69792c235e6e7",
246 "name": "Kobold 12",
247 "age": 15,
248 "stats": {
249 "vitality": 22,
250 "intelligence": 69,
251 "tinkering": 29,
252 "medicine": 82,
253 "crafting": 18,
254 "personality": 63,
255 "will": 48
256 },
257 "sprite_morph": null,
258 "is_leader": false,
259 "is_alive": true,
260 "is_expelled": false,
261 "injuries": [],
262 "items": [],
263 "father_id": null,
264 "mother_id": null
265 },
266 {
267 "id": "kob_69792c235efe9",
268 "name": "Kobold 13",
269 "age": 11,
270 "stats": {
271 "vitality": 74,
272 "intelligence": 15,
273 "tinkering": 3,
274 "medicine": 21,
275 "crafting": 19,
276 "personality": 68,
277 "will": 48
278 },
279 "sprite_morph": null,
280 "is_leader": false,
281 "is_alive": true,
282 "is_expelled": false,
283 "injuries": [],
284 "items": [],
285 "father_id": null,
286 "mother_id": null
287 },
288 {
289 "id": "kob_69792c235f806",
290 "name": "Kobold 14",
291 "age": 13,
292 "stats": {
293 "vitality": 89,
294 "intelligence": 79,
295 "tinkering": 6,
296 "medicine": 48,
297 "crafting": 63,
298 "personality": 82,
299 "will": 77
300 },
301 "sprite_morph": null,
302 "is_leader": false,
303 "is_alive": true,
304 "is_expelled": false,
305 "injuries": [],
306 "items": [],
307 "father_id": null,
308 "mother_id": null
309 },
310 {
311 "id": "kob_69792c235ff99",
312 "name": "Kobold 15",
313 "age": 9,
314 "stats": {
315 "vitality": 91,
316 "intelligence": 91,
317 "tinkering": 9,
318 "medicine": 85,
319 "crafting": 18,
320 "personality": 81,
321 "will": 46
322 },
323 "sprite_morph": null,
324 "is_leader": false,
325 "is_alive": true,
326 "is_expelled": false,
327 "injuries": [],
328 "items": [],
329 "father_id": null,
330 "mother_id": null
331 },
332 {
333 "id": "kob_69792c2360769",
334 "name": "Kobold 16",
335 "age": 13,
336 "stats": {
337 "vitality": 65,
338 "intelligence": 78,
339 "tinkering": 39,
340 "medicine": 78,
341 "crafting": 82,
342 "personality": 72,
343 "will": 61
344 },
345 "sprite_morph": null,
346 "is_leader": false,
347 "is_alive": true,
348 "is_expelled": false,
349 "injuries": [],
350 "items": [],
351 "father_id": null,
352 "mother_id": null
353 },
354 {
355 "id": "kob_69792c236147b",
356 "name": "Kobold 17",
357 "age": 6,
358 "stats": {
359 "vitality": 10,
360 "intelligence": 68,
361 "tinkering": 26,
362 "medicine": 45,
363 "crafting": 88,
364 "personality": 74,
365 "will": 44
366 },
367 "sprite_morph": null,
368 "is_leader": false,
369 "is_alive": true,
370 "is_expelled": false,
371 "injuries": [],
372 "items": [],
373 "father_id": null,
374 "mother_id": null
375 },
376 {
377 "id": "kob_69792c2361ced",
378 "name": "Kobold 18",
379 "age": 7,
380 "stats": {
381 "vitality": 9,
382 "intelligence": 29,
383 "tinkering": 13,
384 "medicine": 81,
385 "crafting": 95,
386 "personality": 91,
387 "will": 65
388 },
389 "sprite_morph": null,
390 "is_leader": false,
391 "is_alive": true,
392 "is_expelled": false,
393 "injuries": [],
394 "items": [],
395 "father_id": null,
396 "mother_id": null
397 },
398 {
399 "id": "kob_69792c23627bf",
400 "name": "Kobold 19",
401 "age": 7,
402 "stats": {
403 "vitality": 0,
404 "intelligence": 56,
405 "tinkering": 54,
406 "medicine": 61,
407 "crafting": 53,
408 "personality": 89,
409 "will": 65
410 },
411 "sprite_morph": null,
412 "is_leader": false,
413 "is_alive": true,
414 "is_expelled": false,
415 "injuries": [],
416 "items": [],
417 "father_id": null,
418 "mother_id": null
419 },
420 {
421 "id": "kob_69792c2362fbb",
422 "name": "Kobold 20",
423 "age": 10,
424 "stats": {
425 "vitality": 11,
426 "intelligence": 71,
427 "tinkering": 75,
428 "medicine": 94,
429 "crafting": 76,
430 "personality": 98,
431 "will": 55
432 },
433 "sprite_morph": null,
434 "is_leader": false,
435 "is_alive": true,
436 "is_expelled": false,
437 "injuries": [],
438 "items": [],
439 "father_id": null,
440 "mother_id": null
441 }
442 ]
@@ -1,442 +0,0 @@
1[
2 {
3 "id": "kob_69792c23573bd",
4 "name": "Kobold 1",
5 "age": 16,
6 "stats": {
7 "vitality": 80,
8 "intelligence": 97,
9 "tinkering": 57,
10 "medicine": 28,
11 "crafting": 70,
12 "personality": 78,
13 "will": 79
14 },
15 "sprite_morph": null,
16 "is_leader": false,
17 "is_alive": true,
18 "is_expelled": false,
19 "injuries": [],
20 "items": [],
21 "father_id": null,
22 "mother_id": null
23 },
24 {
25 "id": "kob_69792c2358404",
26 "name": "Kobold 2",
27 "age": 9,
28 "stats": {
29 "vitality": 39,
30 "intelligence": 85,
31 "tinkering": 16,
32 "medicine": 11,
33 "crafting": 8,
34 "personality": 68,
35 "will": 91
36 },
37 "sprite_morph": null,
38 "is_leader": false,
39 "is_alive": true,
40 "is_expelled": false,
41 "injuries": [],
42 "items": [],
43 "father_id": null,
44 "mother_id": null
45 },
46 {
47 "id": "kob_69792c2358ea1",
48 "name": "Kobold 3",
49 "age": 10,
50 "stats": {
51 "vitality": 65,
52 "intelligence": 6,
53 "tinkering": 78,
54 "medicine": 52,
55 "crafting": 25,
56 "personality": 64,
57 "will": 25
58 },
59 "sprite_morph": null,
60 "is_leader": false,
61 "is_alive": true,
62 "is_expelled": false,
63 "injuries": [],
64 "items": [],
65 "father_id": null,
66 "mother_id": null
67 },
68 {
69 "id": "kob_69792c2359963",
70 "name": "Kobold 4",
71 "age": 9,
72 "stats": {
73 "vitality": 90,
74 "intelligence": 24,
75 "tinkering": 56,
76 "medicine": 74,
77 "crafting": 30,
78 "personality": 87,
79 "will": 81
80 },
81 "sprite_morph": null,
82 "is_leader": false,
83 "is_alive": true,
84 "is_expelled": false,
85 "injuries": [],
86 "items": [],
87 "father_id": null,
88 "mother_id": null
89 },
90 {
91 "id": "kob_69792c235a165",
92 "name": "Kobold 5",
93 "age": 18,
94 "stats": {
95 "vitality": 80,
96 "intelligence": 99,
97 "tinkering": 92,
98 "medicine": 39,
99 "crafting": 87,
100 "personality": 34,
101 "will": 40
102 },
103 "sprite_morph": null,
104 "is_leader": false,
105 "is_alive": true,
106 "is_expelled": false,
107 "injuries": [],
108 "items": [],
109 "father_id": null,
110 "mother_id": null
111 },
112 {
113 "id": "kob_69792c235a988",
114 "name": "Kobold 6",
115 "age": 18,
116 "stats": {
117 "vitality": 17,
118 "intelligence": 58,
119 "tinkering": 89,
120 "medicine": 38,
121 "crafting": 69,
122 "personality": 34,
123 "will": 69
124 },
125 "sprite_morph": null,
126 "is_leader": false,
127 "is_alive": true,
128 "is_expelled": false,
129 "injuries": [],
130 "items": [],
131 "father_id": null,
132 "mother_id": null
133 },
134 {
135 "id": "kob_69792c235b30b",
136 "name": "Kobold 7",
137 "age": 13,
138 "stats": {
139 "vitality": 42,
140 "intelligence": 51,
141 "tinkering": 20,
142 "medicine": 26,
143 "crafting": 39,
144 "personality": 96,
145 "will": 90
146 },
147 "sprite_morph": null,
148 "is_leader": false,
149 "is_alive": true,
150 "is_expelled": false,
151 "injuries": [],
152 "items": [],
153 "father_id": null,
154 "mother_id": null
155 },
156 {
157 "id": "kob_69792c235bc80",
158 "name": "Kobold 8",
159 "age": 16,
160 "stats": {
161 "vitality": 98,
162 "intelligence": 1,
163 "tinkering": 96,
164 "medicine": 81,
165 "crafting": 58,
166 "personality": 93,
167 "will": 37
168 },
169 "sprite_morph": null,
170 "is_leader": false,
171 "is_alive": true,
172 "is_expelled": false,
173 "injuries": [],
174 "items": [],
175 "father_id": null,
176 "mother_id": null
177 },
178 {
179 "id": "kob_69792c235c46d",
180 "name": "Kobold 9",
181 "age": 11,
182 "stats": {
183 "vitality": 36,
184 "intelligence": 32,
185 "tinkering": 63,
186 "medicine": 1,
187 "crafting": 66,
188 "personality": 99,
189 "will": 58
190 },
191 "sprite_morph": null,
192 "is_leader": false,
193 "is_alive": true,
194 "is_expelled": false,
195 "injuries": [],
196 "items": [],
197 "father_id": null,
198 "mother_id": null
199 },
200 {
201 "id": "kob_69792c235d37a",
202 "name": "Kobold 10",
203 "age": 11,
204 "stats": {
205 "vitality": 78,
206 "intelligence": 88,
207 "tinkering": 24,
208 "medicine": 92,
209 "crafting": 37,
210 "personality": 89,
211 "will": 83
212 },
213 "sprite_morph": null,
214 "is_leader": false,
215 "is_alive": true,
216 "is_expelled": false,
217 "injuries": [],
218 "items": [],
219 "father_id": null,
220 "mother_id": null
221 },
222 {
223 "id": "kob_69792c235ddd6",
224 "name": "Kobold 11",
225 "age": 6,
226 "stats": {
227 "vitality": 82,
228 "intelligence": 77,
229 "tinkering": 36,
230 "medicine": 24,
231 "crafting": 90,
232 "personality": 44,
233 "will": 89
234 },
235 "sprite_morph": null,
236 "is_leader": false,
237 "is_alive": true,
238 "is_expelled": false,
239 "injuries": [],
240 "items": [],
241 "father_id": null,
242 "mother_id": null
243 },
244 {
245 "id": "kob_69792c235e6e7",
246 "name": "Kobold 12",
247 "age": 15,
248 "stats": {
249 "vitality": 22,
250 "intelligence": 69,
251 "tinkering": 29,
252 "medicine": 82,
253 "crafting": 18,
254 "personality": 63,
255 "will": 48
256 },
257 "sprite_morph": null,
258 "is_leader": false,
259 "is_alive": true,
260 "is_expelled": false,
261 "injuries": [],
262 "items": [],
263 "father_id": null,
264 "mother_id": null
265 },
266 {
267 "id": "kob_69792c235efe9",
268 "name": "Kobold 13",
269 "age": 11,
270 "stats": {
271 "vitality": 74,
272 "intelligence": 15,
273 "tinkering": 3,
274 "medicine": 21,
275 "crafting": 19,
276 "personality": 68,
277 "will": 48
278 },
279 "sprite_morph": null,
280 "is_leader": false,
281 "is_alive": true,
282 "is_expelled": false,
283 "injuries": [],
284 "items": [],
285 "father_id": null,
286 "mother_id": null
287 },
288 {
289 "id": "kob_69792c235f806",
290 "name": "Kobold 14",
291 "age": 13,
292 "stats": {
293 "vitality": 89,
294 "intelligence": 79,
295 "tinkering": 6,
296 "medicine": 48,
297 "crafting": 63,
298 "personality": 82,
299 "will": 77
300 },
301 "sprite_morph": null,
302 "is_leader": false,
303 "is_alive": true,
304 "is_expelled": false,
305 "injuries": [],
306 "items": [],
307 "father_id": null,
308 "mother_id": null
309 },
310 {
311 "id": "kob_69792c235ff99",
312 "name": "Kobold 15",
313 "age": 9,
314 "stats": {
315 "vitality": 91,
316 "intelligence": 91,
317 "tinkering": 9,
318 "medicine": 85,
319 "crafting": 18,
320 "personality": 81,
321 "will": 46
322 },
323 "sprite_morph": null,
324 "is_leader": false,
325 "is_alive": true,
326 "is_expelled": false,
327 "injuries": [],
328 "items": [],
329 "father_id": null,
330 "mother_id": null
331 },
332 {
333 "id": "kob_69792c2360769",
334 "name": "Kobold 16",
335 "age": 13,
336 "stats": {
337 "vitality": 65,
338 "intelligence": 78,
339 "tinkering": 39,
340 "medicine": 78,
341 "crafting": 82,
342 "personality": 72,
343 "will": 61
344 },
345 "sprite_morph": null,
346 "is_leader": false,
347 "is_alive": true,
348 "is_expelled": false,
349 "injuries": [],
350 "items": [],
351 "father_id": null,
352 "mother_id": null
353 },
354 {
355 "id": "kob_69792c236147b",
356 "name": "Kobold 17",
357 "age": 6,
358 "stats": {
359 "vitality": 10,
360 "intelligence": 68,
361 "tinkering": 26,
362 "medicine": 45,
363 "crafting": 88,
364 "personality": 74,
365 "will": 44
366 },
367 "sprite_morph": null,
368 "is_leader": false,
369 "is_alive": true,
370 "is_expelled": false,
371 "injuries": [],
372 "items": [],
373 "father_id": null,
374 "mother_id": null
375 },
376 {
377 "id": "kob_69792c2361ced",
378 "name": "Kobold 18",
379 "age": 7,
380 "stats": {
381 "vitality": 9,
382 "intelligence": 29,
383 "tinkering": 13,
384 "medicine": 81,
385 "crafting": 95,
386 "personality": 91,
387 "will": 65
388 },
389 "sprite_morph": null,
390 "is_leader": false,
391 "is_alive": true,
392 "is_expelled": false,
393 "injuries": [],
394 "items": [],
395 "father_id": null,
396 "mother_id": null
397 },
398 {
399 "id": "kob_69792c23627bf",
400 "name": "Kobold 19",
401 "age": 7,
402 "stats": {
403 "vitality": 0,
404 "intelligence": 56,
405 "tinkering": 54,
406 "medicine": 61,
407 "crafting": 53,
408 "personality": 89,
409 "will": 65
410 },
411 "sprite_morph": null,
412 "is_leader": false,
413 "is_alive": true,
414 "is_expelled": false,
415 "injuries": [],
416 "items": [],
417 "father_id": null,
418 "mother_id": null
419 },
420 {
421 "id": "kob_69792c2362fbb",
422 "name": "Kobold 20",
423 "age": 10,
424 "stats": {
425 "vitality": 11,
426 "intelligence": 71,
427 "tinkering": 75,
428 "medicine": 94,
429 "crafting": 76,
430 "personality": 98,
431 "will": 55
432 },
433 "sprite_morph": null,
434 "is_leader": false,
435 "is_alive": true,
436 "is_expelled": false,
437 "injuries": [],
438 "items": [],
439 "father_id": null,
440 "mother_id": null
441 }
442]
web/data/saves/1/1/save.json deleted +0 −8
@@ -1,8 +0,0 @@
1 {
2 "name": "Tester",
3 "current_month": 0,
4 "current_season": "spring",
5 "food_count": 0,
6 "created_at": "2026-01-27 21:20:35",
7 "last_played": "2026-01-27 21:20:35"
8 }
@@ -1,8 +0,0 @@
1{
2 "name": "Tester",
3 "current_month": 0,
4 "current_season": "spring",
5 "food_count": 0,
6 "created_at": "2026-01-27 21:20:35",
7 "last_played": "2026-01-27 21:20:35"
8}
web/data/saves/1/2/items.json deleted +0 −1
@@ -1 +0,0 @@
1 []
@@ -1 +0,0 @@
1[]
web/data/saves/1/2/kobolds.json deleted +0 −442
@@ -1,442 +0,0 @@
1 [
2 {
3 "id": "kob_69792c4ca960e",
4 "name": "Kobold 1",
5 "age": 7,
6 "stats": {
7 "vitality": 44,
8 "intelligence": 16,
9 "tinkering": 27,
10 "medicine": 69,
11 "crafting": 48,
12 "personality": 54,
13 "will": 77
14 },
15 "sprite_morph": null,
16 "is_leader": false,
17 "is_alive": true,
18 "is_expelled": false,
19 "injuries": [],
20 "items": [],
21 "father_id": null,
22 "mother_id": null
23 },
24 {
25 "id": "kob_69792c4ca9d99",
26 "name": "Kobold 2",
27 "age": 20,
28 "stats": {
29 "vitality": 77,
30 "intelligence": 43,
31 "tinkering": 23,
32 "medicine": 39,
33 "crafting": 74,
34 "personality": 48,
35 "will": 75
36 },
37 "sprite_morph": null,
38 "is_leader": false,
39 "is_alive": true,
40 "is_expelled": false,
41 "injuries": [],
42 "items": [],
43 "father_id": null,
44 "mother_id": null
45 },
46 {
47 "id": "kob_69792c4caa90b",
48 "name": "Kobold 3",
49 "age": 10,
50 "stats": {
51 "vitality": 35,
52 "intelligence": 64,
53 "tinkering": 74,
54 "medicine": 16,
55 "crafting": 95,
56 "personality": 85,
57 "will": 54
58 },
59 "sprite_morph": null,
60 "is_leader": false,
61 "is_alive": true,
62 "is_expelled": false,
63 "injuries": [],
64 "items": [],
65 "father_id": null,
66 "mother_id": null
67 },
68 {
69 "id": "kob_69792c4cab2b6",
70 "name": "Kobold 4",
71 "age": 8,
72 "stats": {
73 "vitality": 91,
74 "intelligence": 26,
75 "tinkering": 56,
76 "medicine": 87,
77 "crafting": 60,
78 "personality": 49,
79 "will": 94
80 },
81 "sprite_morph": null,
82 "is_leader": false,
83 "is_alive": true,
84 "is_expelled": false,
85 "injuries": [],
86 "items": [],
87 "father_id": null,
88 "mother_id": null
89 },
90 {
91 "id": "kob_69792c4caba83",
92 "name": "Kobold 5",
93 "age": 8,
94 "stats": {
95 "vitality": 36,
96 "intelligence": 4,
97 "tinkering": 55,
98 "medicine": 69,
99 "crafting": 11,
100 "personality": 35,
101 "will": 28
102 },
103 "sprite_morph": null,
104 "is_leader": false,
105 "is_alive": true,
106 "is_expelled": false,
107 "injuries": [],
108 "items": [],
109 "father_id": null,
110 "mother_id": null
111 },
112 {
113 "id": "kob_69792c4cac2a6",
114 "name": "Kobold 6",
115 "age": 19,
116 "stats": {
117 "vitality": 40,
118 "intelligence": 15,
119 "tinkering": 18,
120 "medicine": 51,
121 "crafting": 45,
122 "personality": 51,
123 "will": 65
124 },
125 "sprite_morph": null,
126 "is_leader": false,
127 "is_alive": true,
128 "is_expelled": false,
129 "injuries": [],
130 "items": [],
131 "father_id": null,
132 "mother_id": null
133 },
134 {
135 "id": "kob_69792c4caca28",
136 "name": "Kobold 7",
137 "age": 14,
138 "stats": {
139 "vitality": 6,
140 "intelligence": 53,
141 "tinkering": 81,
142 "medicine": 52,
143 "crafting": 86,
144 "personality": 10,
145 "will": 42
146 },
147 "sprite_morph": null,
148 "is_leader": false,
149 "is_alive": true,
150 "is_expelled": false,
151 "injuries": [],
152 "items": [],
153 "father_id": null,
154 "mother_id": null
155 },
156 {
157 "id": "kob_69792c4cad1d9",
158 "name": "Kobold 8",
159 "age": 8,
160 "stats": {
161 "vitality": 36,
162 "intelligence": 37,
163 "tinkering": 95,
164 "medicine": 53,
165 "crafting": 37,
166 "personality": 65,
167 "will": 76
168 },
169 "sprite_morph": null,
170 "is_leader": false,
171 "is_alive": true,
172 "is_expelled": false,
173 "injuries": [],
174 "items": [],
175 "father_id": null,
176 "mother_id": null
177 },
178 {
179 "id": "kob_69792c4cad987",
180 "name": "Kobold 9",
181 "age": 14,
182 "stats": {
183 "vitality": 90,
184 "intelligence": 54,
185 "tinkering": 44,
186 "medicine": 85,
187 "crafting": 51,
188 "personality": 41,
189 "will": 77
190 },
191 "sprite_morph": null,
192 "is_leader": false,
193 "is_alive": true,
194 "is_expelled": false,
195 "injuries": [],
196 "items": [],
197 "father_id": null,
198 "mother_id": null
199 },
200 {
201 "id": "kob_69792c4cae21f",
202 "name": "Kobold 10",
203 "age": 11,
204 "stats": {
205 "vitality": 64,
206 "intelligence": 80,
207 "tinkering": 30,
208 "medicine": 15,
209 "crafting": 16,
210 "personality": 9,
211 "will": 44
212 },
213 "sprite_morph": null,
214 "is_leader": false,
215 "is_alive": true,
216 "is_expelled": false,
217 "injuries": [],
218 "items": [],
219 "father_id": null,
220 "mother_id": null
221 },
222 {
223 "id": "kob_69792c4caee65",
224 "name": "Kobold 11",
225 "age": 10,
226 "stats": {
227 "vitality": 74,
228 "intelligence": 8,
229 "tinkering": 74,
230 "medicine": 17,
231 "crafting": 65,
232 "personality": 22,
233 "will": 82
234 },
235 "sprite_morph": null,
236 "is_leader": false,
237 "is_alive": true,
238 "is_expelled": false,
239 "injuries": [],
240 "items": [],
241 "father_id": null,
242 "mother_id": null
243 },
244 {
245 "id": "kob_69792c4caf800",
246 "name": "Kobold 12",
247 "age": 7,
248 "stats": {
249 "vitality": 37,
250 "intelligence": 58,
251 "tinkering": 78,
252 "medicine": 73,
253 "crafting": 82,
254 "personality": 32,
255 "will": 61
256 },
257 "sprite_morph": null,
258 "is_leader": false,
259 "is_alive": true,
260 "is_expelled": false,
261 "injuries": [],
262 "items": [],
263 "father_id": null,
264 "mother_id": null
265 },
266 {
267 "id": "kob_69792c4caff89",
268 "name": "Kobold 13",
269 "age": 8,
270 "stats": {
271 "vitality": 33,
272 "intelligence": 67,
273 "tinkering": 27,
274 "medicine": 83,
275 "crafting": 100,
276 "personality": 11,
277 "will": 46
278 },
279 "sprite_morph": null,
280 "is_leader": false,
281 "is_alive": true,
282 "is_expelled": false,
283 "injuries": [],
284 "items": [],
285 "father_id": null,
286 "mother_id": null
287 },
288 {
289 "id": "kob_69792c4cb06b5",
290 "name": "Kobold 14",
291 "age": 19,
292 "stats": {
293 "vitality": 79,
294 "intelligence": 15,
295 "tinkering": 94,
296 "medicine": 81,
297 "crafting": 3,
298 "personality": 65,
299 "will": 96
300 },
301 "sprite_morph": null,
302 "is_leader": false,
303 "is_alive": true,
304 "is_expelled": false,
305 "injuries": [],
306 "items": [],
307 "father_id": null,
308 "mother_id": null
309 },
310 {
311 "id": "kob_69792c4cb0eab",
312 "name": "Kobold 15",
313 "age": 8,
314 "stats": {
315 "vitality": 16,
316 "intelligence": 84,
317 "tinkering": 61,
318 "medicine": 89,
319 "crafting": 62,
320 "personality": 22,
321 "will": 27
322 },
323 "sprite_morph": null,
324 "is_leader": false,
325 "is_alive": true,
326 "is_expelled": false,
327 "injuries": [],
328 "items": [],
329 "father_id": null,
330 "mother_id": null
331 },
332 {
333 "id": "kob_69792c4cb16ad",
334 "name": "Kobold 16",
335 "age": 16,
336 "stats": {
337 "vitality": 56,
338 "intelligence": 43,
339 "tinkering": 43,
340 "medicine": 57,
341 "crafting": 14,
342 "personality": 67,
343 "will": 13
344 },
345 "sprite_morph": null,
346 "is_leader": false,
347 "is_alive": true,
348 "is_expelled": false,
349 "injuries": [],
350 "items": [],
351 "father_id": null,
352 "mother_id": null
353 },
354 {
355 "id": "kob_69792c4cb1f22",
356 "name": "Kobold 17",
357 "age": 20,
358 "stats": {
359 "vitality": 29,
360 "intelligence": 13,
361 "tinkering": 25,
362 "medicine": 21,
363 "crafting": 98,
364 "personality": 65,
365 "will": 1
366 },
367 "sprite_morph": null,
368 "is_leader": false,
369 "is_alive": true,
370 "is_expelled": false,
371 "injuries": [],
372 "items": [],
373 "father_id": null,
374 "mother_id": null
375 },
376 {
377 "id": "kob_69792c4cb2bb3",
378 "name": "Kobold 18",
379 "age": 15,
380 "stats": {
381 "vitality": 74,
382 "intelligence": 93,
383 "tinkering": 43,
384 "medicine": 65,
385 "crafting": 37,
386 "personality": 7,
387 "will": 34
388 },
389 "sprite_morph": null,
390 "is_leader": false,
391 "is_alive": true,
392 "is_expelled": false,
393 "injuries": [],
394 "items": [],
395 "father_id": null,
396 "mother_id": null
397 },
398 {
399 "id": "kob_69792c4cb3356",
400 "name": "Kobold 19",
401 "age": 12,
402 "stats": {
403 "vitality": 37,
404 "intelligence": 64,
405 "tinkering": 100,
406 "medicine": 12,
407 "crafting": 98,
408 "personality": 25,
409 "will": 23
410 },
411 "sprite_morph": null,
412 "is_leader": false,
413 "is_alive": true,
414 "is_expelled": false,
415 "injuries": [],
416 "items": [],
417 "father_id": null,
418 "mother_id": null
419 },
420 {
421 "id": "kob_69792c4cb3d8c",
422 "name": "Kobold 20",
423 "age": 6,
424 "stats": {
425 "vitality": 95,
426 "intelligence": 67,
427 "tinkering": 46,
428 "medicine": 64,
429 "crafting": 62,
430 "personality": 32,
431 "will": 98
432 },
433 "sprite_morph": null,
434 "is_leader": false,
435 "is_alive": true,
436 "is_expelled": false,
437 "injuries": [],
438 "items": [],
439 "father_id": null,
440 "mother_id": null
441 }
442 ]
@@ -1,442 +0,0 @@
1[
2 {
3 "id": "kob_69792c4ca960e",
4 "name": "Kobold 1",
5 "age": 7,
6 "stats": {
7 "vitality": 44,
8 "intelligence": 16,
9 "tinkering": 27,
10 "medicine": 69,
11 "crafting": 48,
12 "personality": 54,
13 "will": 77
14 },
15 "sprite_morph": null,
16 "is_leader": false,
17 "is_alive": true,
18 "is_expelled": false,
19 "injuries": [],
20 "items": [],
21 "father_id": null,
22 "mother_id": null
23 },
24 {
25 "id": "kob_69792c4ca9d99",
26 "name": "Kobold 2",
27 "age": 20,
28 "stats": {
29 "vitality": 77,
30 "intelligence": 43,
31 "tinkering": 23,
32 "medicine": 39,
33 "crafting": 74,
34 "personality": 48,
35 "will": 75
36 },
37 "sprite_morph": null,
38 "is_leader": false,
39 "is_alive": true,
40 "is_expelled": false,
41 "injuries": [],
42 "items": [],
43 "father_id": null,
44 "mother_id": null
45 },
46 {
47 "id": "kob_69792c4caa90b",
48 "name": "Kobold 3",
49 "age": 10,
50 "stats": {
51 "vitality": 35,
52 "intelligence": 64,
53 "tinkering": 74,
54 "medicine": 16,
55 "crafting": 95,
56 "personality": 85,
57 "will": 54
58 },
59 "sprite_morph": null,
60 "is_leader": false,
61 "is_alive": true,
62 "is_expelled": false,
63 "injuries": [],
64 "items": [],
65 "father_id": null,
66 "mother_id": null
67 },
68 {
69 "id": "kob_69792c4cab2b6",
70 "name": "Kobold 4",
71 "age": 8,
72 "stats": {
73 "vitality": 91,
74 "intelligence": 26,
75 "tinkering": 56,
76 "medicine": 87,
77 "crafting": 60,
78 "personality": 49,
79 "will": 94
80 },
81 "sprite_morph": null,
82 "is_leader": false,
83 "is_alive": true,
84 "is_expelled": false,
85 "injuries": [],
86 "items": [],
87 "father_id": null,
88 "mother_id": null
89 },
90 {
91 "id": "kob_69792c4caba83",
92 "name": "Kobold 5",
93 "age": 8,
94 "stats": {
95 "vitality": 36,
96 "intelligence": 4,
97 "tinkering": 55,
98 "medicine": 69,
99 "crafting": 11,
100 "personality": 35,
101 "will": 28
102 },
103 "sprite_morph": null,
104 "is_leader": false,
105 "is_alive": true,
106 "is_expelled": false,
107 "injuries": [],
108 "items": [],
109 "father_id": null,
110 "mother_id": null
111 },
112 {
113 "id": "kob_69792c4cac2a6",
114 "name": "Kobold 6",
115 "age": 19,
116 "stats": {
117 "vitality": 40,
118 "intelligence": 15,
119 "tinkering": 18,
120 "medicine": 51,
121 "crafting": 45,
122 "personality": 51,
123 "will": 65
124 },
125 "sprite_morph": null,
126 "is_leader": false,
127 "is_alive": true,
128 "is_expelled": false,
129 "injuries": [],
130 "items": [],
131 "father_id": null,
132 "mother_id": null
133 },
134 {
135 "id": "kob_69792c4caca28",
136 "name": "Kobold 7",
137 "age": 14,
138 "stats": {
139 "vitality": 6,
140 "intelligence": 53,
141 "tinkering": 81,
142 "medicine": 52,
143 "crafting": 86,
144 "personality": 10,
145 "will": 42
146 },
147 "sprite_morph": null,
148 "is_leader": false,
149 "is_alive": true,
150 "is_expelled": false,
151 "injuries": [],
152 "items": [],
153 "father_id": null,
154 "mother_id": null
155 },
156 {
157 "id": "kob_69792c4cad1d9",
158 "name": "Kobold 8",
159 "age": 8,
160 "stats": {
161 "vitality": 36,
162 "intelligence": 37,
163 "tinkering": 95,
164 "medicine": 53,
165 "crafting": 37,
166 "personality": 65,
167 "will": 76
168 },
169 "sprite_morph": null,
170 "is_leader": false,
171 "is_alive": true,
172 "is_expelled": false,
173 "injuries": [],
174 "items": [],
175 "father_id": null,
176 "mother_id": null
177 },
178 {
179 "id": "kob_69792c4cad987",
180 "name": "Kobold 9",
181 "age": 14,
182 "stats": {
183 "vitality": 90,
184 "intelligence": 54,
185 "tinkering": 44,
186 "medicine": 85,
187 "crafting": 51,
188 "personality": 41,
189 "will": 77
190 },
191 "sprite_morph": null,
192 "is_leader": false,
193 "is_alive": true,
194 "is_expelled": false,
195 "injuries": [],
196 "items": [],
197 "father_id": null,
198 "mother_id": null
199 },
200 {
201 "id": "kob_69792c4cae21f",
202 "name": "Kobold 10",
203 "age": 11,
204 "stats": {
205 "vitality": 64,
206 "intelligence": 80,
207 "tinkering": 30,
208 "medicine": 15,
209 "crafting": 16,
210 "personality": 9,
211 "will": 44
212 },
213 "sprite_morph": null,
214 "is_leader": false,
215 "is_alive": true,
216 "is_expelled": false,
217 "injuries": [],
218 "items": [],
219 "father_id": null,
220 "mother_id": null
221 },
222 {
223 "id": "kob_69792c4caee65",
224 "name": "Kobold 11",
225 "age": 10,
226 "stats": {
227 "vitality": 74,
228 "intelligence": 8,
229 "tinkering": 74,
230 "medicine": 17,
231 "crafting": 65,
232 "personality": 22,
233 "will": 82
234 },
235 "sprite_morph": null,
236 "is_leader": false,
237 "is_alive": true,
238 "is_expelled": false,
239 "injuries": [],
240 "items": [],
241 "father_id": null,
242 "mother_id": null
243 },
244 {
245 "id": "kob_69792c4caf800",
246 "name": "Kobold 12",
247 "age": 7,
248 "stats": {
249 "vitality": 37,
250 "intelligence": 58,
251 "tinkering": 78,
252 "medicine": 73,
253 "crafting": 82,
254 "personality": 32,
255 "will": 61
256 },
257 "sprite_morph": null,
258 "is_leader": false,
259 "is_alive": true,
260 "is_expelled": false,
261 "injuries": [],
262 "items": [],
263 "father_id": null,
264 "mother_id": null
265 },
266 {
267 "id": "kob_69792c4caff89",
268 "name": "Kobold 13",
269 "age": 8,
270 "stats": {
271 "vitality": 33,
272 "intelligence": 67,
273 "tinkering": 27,
274 "medicine": 83,
275 "crafting": 100,
276 "personality": 11,
277 "will": 46
278 },
279 "sprite_morph": null,
280 "is_leader": false,
281 "is_alive": true,
282 "is_expelled": false,
283 "injuries": [],
284 "items": [],
285 "father_id": null,
286 "mother_id": null
287 },
288 {
289 "id": "kob_69792c4cb06b5",
290 "name": "Kobold 14",
291 "age": 19,
292 "stats": {
293 "vitality": 79,
294 "intelligence": 15,
295 "tinkering": 94,
296 "medicine": 81,
297 "crafting": 3,
298 "personality": 65,
299 "will": 96
300 },
301 "sprite_morph": null,
302 "is_leader": false,
303 "is_alive": true,
304 "is_expelled": false,
305 "injuries": [],
306 "items": [],
307 "father_id": null,
308 "mother_id": null
309 },
310 {
311 "id": "kob_69792c4cb0eab",
312 "name": "Kobold 15",
313 "age": 8,
314 "stats": {
315 "vitality": 16,
316 "intelligence": 84,
317 "tinkering": 61,
318 "medicine": 89,
319 "crafting": 62,
320 "personality": 22,
321 "will": 27
322 },
323 "sprite_morph": null,
324 "is_leader": false,
325 "is_alive": true,
326 "is_expelled": false,
327 "injuries": [],
328 "items": [],
329 "father_id": null,
330 "mother_id": null
331 },
332 {
333 "id": "kob_69792c4cb16ad",
334 "name": "Kobold 16",
335 "age": 16,
336 "stats": {
337 "vitality": 56,
338 "intelligence": 43,
339 "tinkering": 43,
340 "medicine": 57,
341 "crafting": 14,
342 "personality": 67,
343 "will": 13
344 },
345 "sprite_morph": null,
346 "is_leader": false,
347 "is_alive": true,
348 "is_expelled": false,
349 "injuries": [],
350 "items": [],
351 "father_id": null,
352 "mother_id": null
353 },
354 {
355 "id": "kob_69792c4cb1f22",
356 "name": "Kobold 17",
357 "age": 20,
358 "stats": {
359 "vitality": 29,
360 "intelligence": 13,
361 "tinkering": 25,
362 "medicine": 21,
363 "crafting": 98,
364 "personality": 65,
365 "will": 1
366 },
367 "sprite_morph": null,
368 "is_leader": false,
369 "is_alive": true,
370 "is_expelled": false,
371 "injuries": [],
372 "items": [],
373 "father_id": null,
374 "mother_id": null
375 },
376 {
377 "id": "kob_69792c4cb2bb3",
378 "name": "Kobold 18",
379 "age": 15,
380 "stats": {
381 "vitality": 74,
382 "intelligence": 93,
383 "tinkering": 43,
384 "medicine": 65,
385 "crafting": 37,
386 "personality": 7,
387 "will": 34
388 },
389 "sprite_morph": null,
390 "is_leader": false,
391 "is_alive": true,
392 "is_expelled": false,
393 "injuries": [],
394 "items": [],
395 "father_id": null,
396 "mother_id": null
397 },
398 {
399 "id": "kob_69792c4cb3356",
400 "name": "Kobold 19",
401 "age": 12,
402 "stats": {
403 "vitality": 37,
404 "intelligence": 64,
405 "tinkering": 100,
406 "medicine": 12,
407 "crafting": 98,
408 "personality": 25,
409 "will": 23
410 },
411 "sprite_morph": null,
412 "is_leader": false,
413 "is_alive": true,
414 "is_expelled": false,
415 "injuries": [],
416 "items": [],
417 "father_id": null,
418 "mother_id": null
419 },
420 {
421 "id": "kob_69792c4cb3d8c",
422 "name": "Kobold 20",
423 "age": 6,
424 "stats": {
425 "vitality": 95,
426 "intelligence": 67,
427 "tinkering": 46,
428 "medicine": 64,
429 "crafting": 62,
430 "personality": 32,
431 "will": 98
432 },
433 "sprite_morph": null,
434 "is_leader": false,
435 "is_alive": true,
436 "is_expelled": false,
437 "injuries": [],
438 "items": [],
439 "father_id": null,
440 "mother_id": null
441 }
442]
web/data/saves/1/2/save.json deleted +0 −8
@@ -1,8 +0,0 @@
1 {
2 "name": "Tester",
3 "current_month": 0,
4 "current_season": "spring",
5 "food_count": 0,
6 "created_at": "2026-01-27 21:21:16",
7 "last_played": "2026-01-27 21:21:16"
8 }
@@ -1,8 +0,0 @@
1{
2 "name": "Tester",
3 "current_month": 0,
4 "current_season": "spring",
5 "food_count": 0,
6 "created_at": "2026-01-27 21:21:16",
7 "last_played": "2026-01-27 21:21:16"
8}
web/data/saves/1/3/items.json deleted +0 −1
@@ -1 +0,0 @@
1 []
@@ -1 +0,0 @@
1[]
web/data/saves/1/3/kobolds.json deleted +0 −442
@@ -1,442 +0,0 @@
1 [
2 {
3 "id": "kob_69792c6084f10",
4 "name": "Kobold 1",
5 "age": 13,
6 "stats": {
7 "vitality": 13,
8 "intelligence": 41,
9 "tinkering": 4,
10 "medicine": 91,
11 "crafting": 43,
12 "personality": 40,
13 "will": 78
14 },
15 "sprite_morph": null,
16 "is_leader": false,
17 "is_alive": true,
18 "is_expelled": false,
19 "injuries": [],
20 "items": [],
21 "father_id": null,
22 "mother_id": null
23 },
24 {
25 "id": "kob_69792c6085b9c",
26 "name": "Kobold 2",
27 "age": 17,
28 "stats": {
29 "vitality": 29,
30 "intelligence": 53,
31 "tinkering": 13,
32 "medicine": 67,
33 "crafting": 13,
34 "personality": 83,
35 "will": 20
36 },
37 "sprite_morph": null,
38 "is_leader": false,
39 "is_alive": true,
40 "is_expelled": false,
41 "injuries": [],
42 "items": [],
43 "father_id": null,
44 "mother_id": null
45 },
46 {
47 "id": "kob_69792c60867c2",
48 "name": "Kobold 3",
49 "age": 9,
50 "stats": {
51 "vitality": 23,
52 "intelligence": 89,
53 "tinkering": 53,
54 "medicine": 58,
55 "crafting": 62,
56 "personality": 46,
57 "will": 45
58 },
59 "sprite_morph": null,
60 "is_leader": false,
61 "is_alive": true,
62 "is_expelled": false,
63 "injuries": [],
64 "items": [],
65 "father_id": null,
66 "mother_id": null
67 },
68 {
69 "id": "kob_69792c6086fc3",
70 "name": "Kobold 4",
71 "age": 20,
72 "stats": {
73 "vitality": 88,
74 "intelligence": 21,
75 "tinkering": 96,
76 "medicine": 59,
77 "crafting": 23,
78 "personality": 6,
79 "will": 7
80 },
81 "sprite_morph": null,
82 "is_leader": false,
83 "is_alive": true,
84 "is_expelled": false,
85 "injuries": [],
86 "items": [],
87 "father_id": null,
88 "mother_id": null
89 },
90 {
91 "id": "kob_69792c60877f2",
92 "name": "Kobold 5",
93 "age": 19,
94 "stats": {
95 "vitality": 51,
96 "intelligence": 64,
97 "tinkering": 90,
98 "medicine": 72,
99 "crafting": 28,
100 "personality": 62,
101 "will": 28
102 },
103 "sprite_morph": null,
104 "is_leader": false,
105 "is_alive": true,
106 "is_expelled": false,
107 "injuries": [],
108 "items": [],
109 "father_id": null,
110 "mother_id": null
111 },
112 {
113 "id": "kob_69792c608800b",
114 "name": "Kobold 6",
115 "age": 11,
116 "stats": {
117 "vitality": 41,
118 "intelligence": 49,
119 "tinkering": 81,
120 "medicine": 14,
121 "crafting": 33,
122 "personality": 65,
123 "will": 85
124 },
125 "sprite_morph": null,
126 "is_leader": false,
127 "is_alive": true,
128 "is_expelled": false,
129 "injuries": [],
130 "items": [],
131 "father_id": null,
132 "mother_id": null
133 },
134 {
135 "id": "kob_69792c60887eb",
136 "name": "Kobold 7",
137 "age": 11,
138 "stats": {
139 "vitality": 77,
140 "intelligence": 67,
141 "tinkering": 6,
142 "medicine": 56,
143 "crafting": 12,
144 "personality": 81,
145 "will": 5
146 },
147 "sprite_morph": null,
148 "is_leader": false,
149 "is_alive": true,
150 "is_expelled": false,
151 "injuries": [],
152 "items": [],
153 "father_id": null,
154 "mother_id": null
155 },
156 {
157 "id": "kob_69792c6088ff7",
158 "name": "Kobold 8",
159 "age": 12,
160 "stats": {
161 "vitality": 88,
162 "intelligence": 15,
163 "tinkering": 75,
164 "medicine": 64,
165 "crafting": 35,
166 "personality": 61,
167 "will": 72
168 },
169 "sprite_morph": null,
170 "is_leader": false,
171 "is_alive": true,
172 "is_expelled": false,
173 "injuries": [],
174 "items": [],
175 "father_id": null,
176 "mother_id": null
177 },
178 {
179 "id": "kob_69792c60899df",
180 "name": "Kobold 9",
181 "age": 15,
182 "stats": {
183 "vitality": 0,
184 "intelligence": 10,
185 "tinkering": 94,
186 "medicine": 46,
187 "crafting": 21,
188 "personality": 84,
189 "will": 99
190 },
191 "sprite_morph": null,
192 "is_leader": false,
193 "is_alive": true,
194 "is_expelled": false,
195 "injuries": [],
196 "items": [],
197 "father_id": null,
198 "mother_id": null
199 },
200 {
201 "id": "kob_69792c608a371",
202 "name": "Kobold 10",
203 "age": 8,
204 "stats": {
205 "vitality": 100,
206 "intelligence": 15,
207 "tinkering": 80,
208 "medicine": 98,
209 "crafting": 50,
210 "personality": 15,
211 "will": 84
212 },
213 "sprite_morph": null,
214 "is_leader": false,
215 "is_alive": true,
216 "is_expelled": false,
217 "injuries": [],
218 "items": [],
219 "father_id": null,
220 "mother_id": null
221 },
222 {
223 "id": "kob_69792c608ac34",
224 "name": "Kobold 11",
225 "age": 14,
226 "stats": {
227 "vitality": 89,
228 "intelligence": 5,
229 "tinkering": 10,
230 "medicine": 61,
231 "crafting": 11,
232 "personality": 23,
233 "will": 33
234 },
235 "sprite_morph": null,
236 "is_leader": false,
237 "is_alive": true,
238 "is_expelled": false,
239 "injuries": [],
240 "items": [],
241 "father_id": null,
242 "mother_id": null
243 },
244 {
245 "id": "kob_69792c608b4e1",
246 "name": "Kobold 12",
247 "age": 6,
248 "stats": {
249 "vitality": 95,
250 "intelligence": 78,
251 "tinkering": 77,
252 "medicine": 22,
253 "crafting": 28,
254 "personality": 47,
255 "will": 30
256 },
257 "sprite_morph": null,
258 "is_leader": false,
259 "is_alive": true,
260 "is_expelled": false,
261 "injuries": [],
262 "items": [],
263 "father_id": null,
264 "mother_id": null
265 },
266 {
267 "id": "kob_69792c608be21",
268 "name": "Kobold 13",
269 "age": 10,
270 "stats": {
271 "vitality": 27,
272 "intelligence": 42,
273 "tinkering": 53,
274 "medicine": 52,
275 "crafting": 56,
276 "personality": 83,
277 "will": 70
278 },
279 "sprite_morph": null,
280 "is_leader": false,
281 "is_alive": true,
282 "is_expelled": false,
283 "injuries": [],
284 "items": [],
285 "father_id": null,
286 "mother_id": null
287 },
288 {
289 "id": "kob_69792c608c6e4",
290 "name": "Kobold 14",
291 "age": 17,
292 "stats": {
293 "vitality": 62,
294 "intelligence": 46,
295 "tinkering": 28,
296 "medicine": 53,
297 "crafting": 79,
298 "personality": 70,
299 "will": 44
300 },
301 "sprite_morph": null,
302 "is_leader": false,
303 "is_alive": true,
304 "is_expelled": false,
305 "injuries": [],
306 "items": [],
307 "father_id": null,
308 "mother_id": null
309 },
310 {
311 "id": "kob_69792c608d19b",
312 "name": "Kobold 15",
313 "age": 10,
314 "stats": {
315 "vitality": 82,
316 "intelligence": 32,
317 "tinkering": 15,
318 "medicine": 63,
319 "crafting": 24,
320 "personality": 30,
321 "will": 27
322 },
323 "sprite_morph": null,
324 "is_leader": false,
325 "is_alive": true,
326 "is_expelled": false,
327 "injuries": [],
328 "items": [],
329 "father_id": null,
330 "mother_id": null
331 },
332 {
333 "id": "kob_69792c608de63",
334 "name": "Kobold 16",
335 "age": 12,
336 "stats": {
337 "vitality": 31,
338 "intelligence": 70,
339 "tinkering": 95,
340 "medicine": 14,
341 "crafting": 36,
342 "personality": 93,
343 "will": 80
344 },
345 "sprite_morph": null,
346 "is_leader": false,
347 "is_alive": true,
348 "is_expelled": false,
349 "injuries": [],
350 "items": [],
351 "father_id": null,
352 "mother_id": null
353 },
354 {
355 "id": "kob_69792c608e89e",
356 "name": "Kobold 17",
357 "age": 14,
358 "stats": {
359 "vitality": 78,
360 "intelligence": 84,
361 "tinkering": 65,
362 "medicine": 17,
363 "crafting": 94,
364 "personality": 29,
365 "will": 42
366 },
367 "sprite_morph": null,
368 "is_leader": false,
369 "is_alive": true,
370 "is_expelled": false,
371 "injuries": [],
372 "items": [],
373 "father_id": null,
374 "mother_id": null
375 },
376 {
377 "id": "kob_69792c608f057",
378 "name": "Kobold 18",
379 "age": 12,
380 "stats": {
381 "vitality": 22,
382 "intelligence": 33,
383 "tinkering": 65,
384 "medicine": 10,
385 "crafting": 76,
386 "personality": 9,
387 "will": 97
388 },
389 "sprite_morph": null,
390 "is_leader": false,
391 "is_alive": true,
392 "is_expelled": false,
393 "injuries": [],
394 "items": [],
395 "father_id": null,
396 "mother_id": null
397 },
398 {
399 "id": "kob_69792c608f811",
400 "name": "Kobold 19",
401 "age": 12,
402 "stats": {
403 "vitality": 9,
404 "intelligence": 53,
405 "tinkering": 74,
406 "medicine": 8,
407 "crafting": 81,
408 "personality": 84,
409 "will": 80
410 },
411 "sprite_morph": null,
412 "is_leader": false,
413 "is_alive": true,
414 "is_expelled": false,
415 "injuries": [],
416 "items": [],
417 "father_id": null,
418 "mother_id": null
419 },
420 {
421 "id": "kob_69792c6090040",
422 "name": "Kobold 20",
423 "age": 20,
424 "stats": {
425 "vitality": 33,
426 "intelligence": 15,
427 "tinkering": 66,
428 "medicine": 16,
429 "crafting": 19,
430 "personality": 70,
431 "will": 55
432 },
433 "sprite_morph": null,
434 "is_leader": false,
435 "is_alive": true,
436 "is_expelled": false,
437 "injuries": [],
438 "items": [],
439 "father_id": null,
440 "mother_id": null
441 }
442 ]
@@ -1,442 +0,0 @@
1[
2 {
3 "id": "kob_69792c6084f10",
4 "name": "Kobold 1",
5 "age": 13,
6 "stats": {
7 "vitality": 13,
8 "intelligence": 41,
9 "tinkering": 4,
10 "medicine": 91,
11 "crafting": 43,
12 "personality": 40,
13 "will": 78
14 },
15 "sprite_morph": null,
16 "is_leader": false,
17 "is_alive": true,
18 "is_expelled": false,
19 "injuries": [],
20 "items": [],
21 "father_id": null,
22 "mother_id": null
23 },
24 {
25 "id": "kob_69792c6085b9c",
26 "name": "Kobold 2",
27 "age": 17,
28 "stats": {
29 "vitality": 29,
30 "intelligence": 53,
31 "tinkering": 13,
32 "medicine": 67,
33 "crafting": 13,
34 "personality": 83,
35 "will": 20
36 },
37 "sprite_morph": null,
38 "is_leader": false,
39 "is_alive": true,
40 "is_expelled": false,
41 "injuries": [],
42 "items": [],
43 "father_id": null,
44 "mother_id": null
45 },
46 {
47 "id": "kob_69792c60867c2",
48 "name": "Kobold 3",
49 "age": 9,
50 "stats": {
51 "vitality": 23,
52 "intelligence": 89,
53 "tinkering": 53,
54 "medicine": 58,
55 "crafting": 62,
56 "personality": 46,
57 "will": 45
58 },
59 "sprite_morph": null,
60 "is_leader": false,
61 "is_alive": true,
62 "is_expelled": false,
63 "injuries": [],
64 "items": [],
65 "father_id": null,
66 "mother_id": null
67 },
68 {
69 "id": "kob_69792c6086fc3",
70 "name": "Kobold 4",
71 "age": 20,
72 "stats": {
73 "vitality": 88,
74 "intelligence": 21,
75 "tinkering": 96,
76 "medicine": 59,
77 "crafting": 23,
78 "personality": 6,
79 "will": 7
80 },
81 "sprite_morph": null,
82 "is_leader": false,
83 "is_alive": true,
84 "is_expelled": false,
85 "injuries": [],
86 "items": [],
87 "father_id": null,
88 "mother_id": null
89 },
90 {
91 "id": "kob_69792c60877f2",
92 "name": "Kobold 5",
93 "age": 19,
94 "stats": {
95 "vitality": 51,
96 "intelligence": 64,
97 "tinkering": 90,
98 "medicine": 72,
99 "crafting": 28,
100 "personality": 62,
101 "will": 28
102 },
103 "sprite_morph": null,
104 "is_leader": false,
105 "is_alive": true,
106 "is_expelled": false,
107 "injuries": [],
108 "items": [],
109 "father_id": null,
110 "mother_id": null
111 },
112 {
113 "id": "kob_69792c608800b",
114 "name": "Kobold 6",
115 "age": 11,
116 "stats": {
117 "vitality": 41,
118 "intelligence": 49,
119 "tinkering": 81,
120 "medicine": 14,
121 "crafting": 33,
122 "personality": 65,
123 "will": 85
124 },
125 "sprite_morph": null,
126 "is_leader": false,
127 "is_alive": true,
128 "is_expelled": false,
129 "injuries": [],
130 "items": [],
131 "father_id": null,
132 "mother_id": null
133 },
134 {
135 "id": "kob_69792c60887eb",
136 "name": "Kobold 7",
137 "age": 11,
138 "stats": {
139 "vitality": 77,
140 "intelligence": 67,
141 "tinkering": 6,
142 "medicine": 56,
143 "crafting": 12,
144 "personality": 81,
145 "will": 5
146 },
147 "sprite_morph": null,
148 "is_leader": false,
149 "is_alive": true,
150 "is_expelled": false,
151 "injuries": [],
152 "items": [],
153 "father_id": null,
154 "mother_id": null
155 },
156 {
157 "id": "kob_69792c6088ff7",
158 "name": "Kobold 8",
159 "age": 12,
160 "stats": {
161 "vitality": 88,
162 "intelligence": 15,
163 "tinkering": 75,
164 "medicine": 64,
165 "crafting": 35,
166 "personality": 61,
167 "will": 72
168 },
169 "sprite_morph": null,
170 "is_leader": false,
171 "is_alive": true,
172 "is_expelled": false,
173 "injuries": [],
174 "items": [],
175 "father_id": null,
176 "mother_id": null
177 },
178 {
179 "id": "kob_69792c60899df",
180 "name": "Kobold 9",
181 "age": 15,
182 "stats": {
183 "vitality": 0,
184 "intelligence": 10,
185 "tinkering": 94,
186 "medicine": 46,
187 "crafting": 21,
188 "personality": 84,
189 "will": 99
190 },
191 "sprite_morph": null,
192 "is_leader": false,
193 "is_alive": true,
194 "is_expelled": false,
195 "injuries": [],
196 "items": [],
197 "father_id": null,
198 "mother_id": null
199 },
200 {
201 "id": "kob_69792c608a371",
202 "name": "Kobold 10",
203 "age": 8,
204 "stats": {
205 "vitality": 100,
206 "intelligence": 15,
207 "tinkering": 80,
208 "medicine": 98,
209 "crafting": 50,
210 "personality": 15,
211 "will": 84
212 },
213 "sprite_morph": null,
214 "is_leader": false,
215 "is_alive": true,
216 "is_expelled": false,
217 "injuries": [],
218 "items": [],
219 "father_id": null,
220 "mother_id": null
221 },
222 {
223 "id": "kob_69792c608ac34",
224 "name": "Kobold 11",
225 "age": 14,
226 "stats": {
227 "vitality": 89,
228 "intelligence": 5,
229 "tinkering": 10,
230 "medicine": 61,
231 "crafting": 11,
232 "personality": 23,
233 "will": 33
234 },
235 "sprite_morph": null,
236 "is_leader": false,
237 "is_alive": true,
238 "is_expelled": false,
239 "injuries": [],
240 "items": [],
241 "father_id": null,
242 "mother_id": null
243 },
244 {
245 "id": "kob_69792c608b4e1",
246 "name": "Kobold 12",
247 "age": 6,
248 "stats": {
249 "vitality": 95,
250 "intelligence": 78,
251 "tinkering": 77,
252 "medicine": 22,
253 "crafting": 28,
254 "personality": 47,
255 "will": 30
256 },
257 "sprite_morph": null,
258 "is_leader": false,
259 "is_alive": true,
260 "is_expelled": false,
261 "injuries": [],
262 "items": [],
263 "father_id": null,
264 "mother_id": null
265 },
266 {
267 "id": "kob_69792c608be21",
268 "name": "Kobold 13",
269 "age": 10,
270 "stats": {
271 "vitality": 27,
272 "intelligence": 42,
273 "tinkering": 53,
274 "medicine": 52,
275 "crafting": 56,
276 "personality": 83,
277 "will": 70
278 },
279 "sprite_morph": null,
280 "is_leader": false,
281 "is_alive": true,
282 "is_expelled": false,
283 "injuries": [],
284 "items": [],
285 "father_id": null,
286 "mother_id": null
287 },
288 {
289 "id": "kob_69792c608c6e4",
290 "name": "Kobold 14",
291 "age": 17,
292 "stats": {
293 "vitality": 62,
294 "intelligence": 46,
295 "tinkering": 28,
296 "medicine": 53,
297 "crafting": 79,
298 "personality": 70,
299 "will": 44
300 },
301 "sprite_morph": null,
302 "is_leader": false,
303 "is_alive": true,
304 "is_expelled": false,
305 "injuries": [],
306 "items": [],
307 "father_id": null,
308 "mother_id": null
309 },
310 {
311 "id": "kob_69792c608d19b",
312 "name": "Kobold 15",
313 "age": 10,
314 "stats": {
315 "vitality": 82,
316 "intelligence": 32,
317 "tinkering": 15,
318 "medicine": 63,
319 "crafting": 24,
320 "personality": 30,
321 "will": 27
322 },
323 "sprite_morph": null,
324 "is_leader": false,
325 "is_alive": true,
326 "is_expelled": false,
327 "injuries": [],
328 "items": [],
329 "father_id": null,
330 "mother_id": null
331 },
332 {
333 "id": "kob_69792c608de63",
334 "name": "Kobold 16",
335 "age": 12,
336 "stats": {
337 "vitality": 31,
338 "intelligence": 70,
339 "tinkering": 95,
340 "medicine": 14,
341 "crafting": 36,
342 "personality": 93,
343 "will": 80
344 },
345 "sprite_morph": null,
346 "is_leader": false,
347 "is_alive": true,
348 "is_expelled": false,
349 "injuries": [],
350 "items": [],
351 "father_id": null,
352 "mother_id": null
353 },
354 {
355 "id": "kob_69792c608e89e",
356 "name": "Kobold 17",
357 "age": 14,
358 "stats": {
359 "vitality": 78,
360 "intelligence": 84,
361 "tinkering": 65,
362 "medicine": 17,
363 "crafting": 94,
364 "personality": 29,
365 "will": 42
366 },
367 "sprite_morph": null,
368 "is_leader": false,
369 "is_alive": true,
370 "is_expelled": false,
371 "injuries": [],
372 "items": [],
373 "father_id": null,
374 "mother_id": null
375 },
376 {
377 "id": "kob_69792c608f057",
378 "name": "Kobold 18",
379 "age": 12,
380 "stats": {
381 "vitality": 22,
382 "intelligence": 33,
383 "tinkering": 65,
384 "medicine": 10,
385 "crafting": 76,
386 "personality": 9,
387 "will": 97
388 },
389 "sprite_morph": null,
390 "is_leader": false,
391 "is_alive": true,
392 "is_expelled": false,
393 "injuries": [],
394 "items": [],
395 "father_id": null,
396 "mother_id": null
397 },
398 {
399 "id": "kob_69792c608f811",
400 "name": "Kobold 19",
401 "age": 12,
402 "stats": {
403 "vitality": 9,
404 "intelligence": 53,
405 "tinkering": 74,
406 "medicine": 8,
407 "crafting": 81,
408 "personality": 84,
409 "will": 80
410 },
411 "sprite_morph": null,
412 "is_leader": false,
413 "is_alive": true,
414 "is_expelled": false,
415 "injuries": [],
416 "items": [],
417 "father_id": null,
418 "mother_id": null
419 },
420 {
421 "id": "kob_69792c6090040",
422 "name": "Kobold 20",
423 "age": 20,
424 "stats": {
425 "vitality": 33,
426 "intelligence": 15,
427 "tinkering": 66,
428 "medicine": 16,
429 "crafting": 19,
430 "personality": 70,
431 "will": 55
432 },
433 "sprite_morph": null,
434 "is_leader": false,
435 "is_alive": true,
436 "is_expelled": false,
437 "injuries": [],
438 "items": [],
439 "father_id": null,
440 "mother_id": null
441 }
442]
web/data/saves/1/3/save.json deleted +0 −8
@@ -1,8 +0,0 @@
1 {
2 "name": "Tester",
3 "current_month": 0,
4 "current_season": "spring",
5 "food_count": 0,
6 "created_at": "2026-01-27 21:21:36",
7 "last_played": "2026-01-27 21:21:36"
8 }
@@ -1,8 +0,0 @@
1{
2 "name": "Tester",
3 "current_month": 0,
4 "current_season": "spring",
5 "food_count": 0,
6 "created_at": "2026-01-27 21:21:36",
7 "last_played": "2026-01-27 21:21:36"
8}
web/data/saves/1/4/items.json deleted +0 −1
@@ -1 +0,0 @@
1 []
@@ -1 +0,0 @@
1[]
web/data/saves/1/4/kobolds.json deleted +0 −1
@@ -1 +0,0 @@
1 []
@@ -1 +0,0 @@
1[]
web/data/saves/1/4/save.json deleted +0 −8
@@ -1,8 +0,0 @@
1 {
2 "name": "Tester",
3 "current_month": 0,
4 "current_season": "spring",
5 "food_count": 0,
6 "created_at": "2026-01-27 21:21:59",
7 "last_played": "2026-01-27 21:21:59"
8 }
@@ -1,8 +0,0 @@
1{
2 "name": "Tester",
3 "current_month": 0,
4 "current_season": "spring",
5 "food_count": 0,
6 "created_at": "2026-01-27 21:21:59",
7 "last_played": "2026-01-27 21:21:59"
8}
web/data/saves/1/5/items.json deleted +0 −1
@@ -1 +0,0 @@
1 []
@@ -1 +0,0 @@
1[]
web/data/saves/1/5/kobolds.json deleted +0 −1
@@ -1 +0,0 @@
1 []
@@ -1 +0,0 @@
1[]
web/data/saves/1/5/save.json deleted +0 −8
@@ -1,8 +0,0 @@
1 {
2 "name": "Tester",
3 "current_month": 0,
4 "current_season": "spring",
5 "food_count": 0,
6 "created_at": "2026-01-27 21:24:58",
7 "last_played": "2026-01-27 21:24:58"
8 }
@@ -1,8 +0,0 @@
1{
2 "name": "Tester",
3 "current_month": 0,
4 "current_season": "spring",
5 "food_count": 0,
6 "created_at": "2026-01-27 21:24:58",
7 "last_played": "2026-01-27 21:24:58"
8}
web/data/saves/1/kobolds/0/sprites/adult.png deleted Binary file +0 −0

The contents of this binary file are not shown.

web/src/Classes/Kobold.php +94 −79
@@ -20,6 +20,10 @@ class Kobold
20 20 private $motherId;
21 21 private $saveManager;
22 22
23 private $colourPrimary;
24 private $colourSecondary;
25 private $colourTertiary;
26
23 27 private static $statNames = [
24 28 'vitality',
25 29 'intelligence',
@@ -40,25 +44,28 @@ class Kobold
40 44 $this->spriteMorph = $spriteMorph;
41 45 $this->isLeader = $isLeader;
42 46
47 $min = 120;
48 $mx = 240;
49
43 50 $this->colourPrimary = sprintf(
44 51 "#%02X%02X%02X",
45 random_int(50, 230),
46 random_int(50, 230),
47 random_int(50, 230)
52 random_int($min, $mx),
53 random_int($min, $mx),
54 random_int($min, $mx)
48 55 );
49 56
50 57 $this->colourSecondary = sprintf(
51 58 "#%02X%02X%02X",
52 random_int(50, 230),
53 random_int(50, 230),
54 random_int(50, 230)
59 random_int($min, $mx),
60 random_int($min, $mx),
61 random_int($min, $mx)
55 62 );
56 63
57 64 $this->colourTertiary = sprintf(
58 65 "#%02X%02X%02X",
59 random_int(50, 230),
60 random_int(50, 230),
61 random_int(50, 230)
66 random_int($min, $mx),
67 random_int($min, $mx),
68 random_int($min, $mx)
62 69 );
63 70
64 71 $this->saveManager = new SaveManager();
@@ -77,7 +84,6 @@ class Kobold
77 84
78 85 $spriteMorph = self::getRandomSpriteMorph();
79 86 $kobold = new self(uniqid('kob_'), $userId, $saveId, '', $age, $spriteMorph);
80
81 87 // Copy and transform sprite from assets to save folder
82 88 $kobold->initializeSprite();
83 89
@@ -123,6 +129,10 @@ class Kobold
123 129 $kobold->fatherId = $data['father_id'] ?? null;
124 130 $kobold->motherId = $data['mother_id'] ?? null;
125 131
132 $kobold->colourPrimary = $data['colour_primary'] ?? '#FFFFFF';
133 $kobold->colourSecondary = $data['colour_secondary'] ?? '#FFFFFF';
134 $kobold->colourTertiary = $data['colour_tertiary'] ?? '#FFFFFF';
135
126 136 return $kobold;
127 137 }
128 138
@@ -140,7 +150,10 @@ class Kobold
140 150 'injuries' => $this->injuries,
141 151 'items' => $this->items,
142 152 'father_id' => $this->fatherId,
143 'mother_id' => $this->motherId
153 'mother_id' => $this->motherId,
154 'colour_primary' => $this->colourPrimary,
155 'colour_secondary' => $this->colourSecondary,
156 'colour_tertiary' => $this->colourTertiary
144 157 ];
145 158 }
146 159
@@ -399,92 +412,94 @@ class Kobold
399 412 private function transformSprite()
400 413 {
401 414 $spritePath = $this->getSpritePath();
415 if (!file_exists($spritePath))
416 return;
402 417
403 if (!file_exists($spritePath)) {
404 return; // Base sprite not created yet
405 }
406
407 // Load the image
408 418 $image = imagecreatefrompng($spritePath);
409 if (!$image) {
410 return; // Failed to load image
411 }
419 if (!$image)
420 return;
412 421
413 // Apply injury markings if kobold has taken damage
414 $vitalityStat = $this->getStat('vitality');
415 if ($vitalityStat < 50) {
416 $this->applyInjuryMarkings($image);
422 // Ensure truecolour (important if PNG is palette-based)
423 if (!imageistruecolor($image)) {
424 imagepalettetotruecolor($image);
417 425 }
418 426
419 // Apply age-based color adjustments (desaturate for elderly)
420 if ($this->getAgeCategory() === 'old' || $this->getAgeCategory() === 'very_old') {
421 $this->desaturateImage($image);
422 }
427 $primaryRGB = $this->hexToRgb($this->colourPrimary);
428 $secondaryRGB = $this->hexToRgb($this->colourSecondary);
429 $tertiaryRGB = $this->hexToRgb($this->colourTertiary);
423 430
424 // Save modified image back to the sprite file
425 imagepng($image, $spritePath);
426 imagedestroy($image);
427 }
431 $width = imagesx($image);
432 $height = imagesy($image);
428 433
429 /**
430 * Draw injury marks (red scars) on the sprite
431 * Number of marks increases with injury level
432 */
433 private function applyInjuryMarkings(&$image)
434 {
435 $red = imagecolorallocate($image, 255, 0, 0);
436 $darkRed = imagecolorallocate($image, 139, 0, 0);
434 // For exact per-pixel alpha writes:
435 imagealphablending($image, false);
436 imagesavealpha($image, true);
437 437
438 // Number of scars based on vitality stat
439 $vitalityStat = $this->getStat('vitality');
440 $scarCount = intval((50 - $vitalityStat) / 10) + 1;
441 $scarCount = min(5, $scarCount);
438 $cache = []; // cache allocated colours "r,g,b,a" => int
442 439
443 $imageWidth = imagesx($image);
444 $imageHeight = imagesy($image);
440 for ($y = 0; $y < $height; $y++) {
441 for ($x = 0; $x < $width; $x++) {
442 $idx = imagecolorat($image, $x, $y);
443 $rgba = imagecolorsforindex($image, $idx);
445 444
446 // Draw scars at various positions
447 for ($i = 0; $i < $scarCount; $i++) {
448 $x = rand(10, $imageWidth - 10);
449 $y = rand(10, $imageHeight - 10);
450 $length = rand(5, 15);
445 $baseR = $rgba['red'];
446 $baseG = $rgba['green'];
447 $baseB = $rgba['blue'];
448 $baseA = $rgba['alpha']; // 0..127
451 449
452 // Draw a jagged line scar
453 imageline($image, $x, $y, $x + $length, $y, $darkRed);
454 imageline($image, $x, $y + 1, $x + $length, $y + 1, $red);
455 }
456 }
450 // If fully transparent, skip work (optional)
451 if ($baseA === 127) {
452 continue;
453 }
457 454
458 /**
459 * Desaturate the sprite image for elderly kobolds
460 * Reduces color saturation to make them appear older
461 */
462 private function desaturateImage(&$image)
463 {
464 $imageWidth = imagesx($image);
465 $imageHeight = imagesy($image);
455 $newR = 0;
456 $newG = 0;
457 $newB = 0;
458
459 $newR += (int) (($baseR / 255.0) * $primaryRGB['r']);
460 $newG += (int) (($baseR / 255.0) * $primaryRGB['g']);
461 $newB += (int) (($baseR / 255.0) * $primaryRGB['b']);
466 462
467 for ($y = 0; $y < $imageHeight; $y++) {
468 for ($x = 0; $x < $imageWidth; $x++) {
469 $rgb = imagecolorat($image, $x, $y);
463 $newR += (int) (($baseG / 255.0) * $secondaryRGB['r']);
464 $newG += (int) (($baseG / 255.0) * $secondaryRGB['g']);
465 $newB += (int) (($baseG / 255.0) * $secondaryRGB['b']);
470 466
471 // Extract color components
472 $r = ($rgb >> 16) & 0xFF;
473 $g = ($rgb >> 8) & 0xFF;
474 $b = $rgb & 0xFF;
475 $a = ($rgb >> 24) & 0xFF;
467 $newR += (int) (($baseB / 255.0) * $tertiaryRGB['r']);
468 $newG += (int) (($baseB / 255.0) * $tertiaryRGB['g']);
469 $newB += (int) (($baseB / 255.0) * $tertiaryRGB['b']);
476 470
477 // Calculate grayscale value using luminance formula
478 $gray = intval(0.299 * $r + 0.587 * $g + 0.114 * $b);
471 $newR = max(0, min(255, $newR));
472 $newG = max(0, min(255, $newG));
473 $newB = max(0, min(255, $newB));
479 474
480 // Blend original color with grayscale (60% desaturated)
481 $newR = intval($r * 0.4 + $gray * 0.6);
482 $newG = intval($g * 0.4 + $gray * 0.6);
483 $newB = intval($b * 0.4 + $gray * 0.6);
475 $key = $newR . ',' . $newG . ',' . $newB . ',' . $baseA;
476 if (!isset($cache[$key])) {
477 $cache[$key] = imagecolorallocatealpha($image, $newR, $newG, $newB, $baseA);
478 }
484 479
485 $newColor = imagecolorallocatealpha($image, $newR, $newG, $newB, $a);
486 imagesetpixel($image, $x, $y, $newColor);
480 imagesetpixel($image, $x, $y, $cache[$key]);
487 481 }
488 482 }
483
484 imagepng($image, $spritePath);
485 }
486
487
488 /**
489 * Convert HEX color string to RGB array
490 * @param string $hex HEX color in format #RRGGBB
491 * @return array ['r' => 0-255, 'g' => 0-255, 'b' => 0-255]
492 */
493 private function hexToRgb($hex)
494 {
495 // Remove # if present
496 $hex = ltrim($hex, '#');
497
498 // Convert HEX to RGB
499 return [
500 'r' => hexdec(substr($hex, 0, 2)),
501 'g' => hexdec(substr($hex, 2, 2)),
502 'b' => hexdec(substr($hex, 4, 2))
503 ];
489 504 }
490 505 }
@@ -20,6 +20,10 @@ class Kobold
20 private $motherId;
20 private $motherId;
21 private $saveManager;
21 private $saveManager;
22
22
23 private $colourPrimary;
24 private $colourSecondary;
25 private $colourTertiary;
26
23 private static $statNames = [
27 private static $statNames = [
24 'vitality',
28 'vitality',
25 'intelligence',
29 'intelligence',
@@ -40,25 +44,28 @@ class Kobold
40 $this->spriteMorph = $spriteMorph;
44 $this->spriteMorph = $spriteMorph;
41 $this->isLeader = $isLeader;
45 $this->isLeader = $isLeader;
42
46
47 $min = 120;
48 $mx = 240;
49
43 $this->colourPrimary = sprintf(
50 $this->colourPrimary = sprintf(
44 "#%02X%02X%02X",
51 "#%02X%02X%02X",
45 random_int(50, 230),
52 random_int($min, $mx),
46 random_int(50, 230),
53 random_int($min, $mx),
47 random_int(50, 230)
54 random_int($min, $mx)
48 );
55 );
49
56
50 $this->colourSecondary = sprintf(
57 $this->colourSecondary = sprintf(
51 "#%02X%02X%02X",
58 "#%02X%02X%02X",
52 random_int(50, 230),
59 random_int($min, $mx),
53 random_int(50, 230),
60 random_int($min, $mx),
54 random_int(50, 230)
61 random_int($min, $mx)
55 );
62 );
56
63
57 $this->colourTertiary = sprintf(
64 $this->colourTertiary = sprintf(
58 "#%02X%02X%02X",
65 "#%02X%02X%02X",
59 random_int(50, 230),
66 random_int($min, $mx),
60 random_int(50, 230),
67 random_int($min, $mx),
61 random_int(50, 230)
68 random_int($min, $mx)
62 );
69 );
63
70
64 $this->saveManager = new SaveManager();
71 $this->saveManager = new SaveManager();
@@ -77,7 +84,6 @@ class Kobold
77
84
78 $spriteMorph = self::getRandomSpriteMorph();
85 $spriteMorph = self::getRandomSpriteMorph();
79 $kobold = new self(uniqid('kob_'), $userId, $saveId, '', $age, $spriteMorph);
86 $kobold = new self(uniqid('kob_'), $userId, $saveId, '', $age, $spriteMorph);
80
81 // Copy and transform sprite from assets to save folder
87 // Copy and transform sprite from assets to save folder
82 $kobold->initializeSprite();
88 $kobold->initializeSprite();
83
89
@@ -123,6 +129,10 @@ class Kobold
123 $kobold->fatherId = $data['father_id'] ?? null;
129 $kobold->fatherId = $data['father_id'] ?? null;
124 $kobold->motherId = $data['mother_id'] ?? null;
130 $kobold->motherId = $data['mother_id'] ?? null;
125
131
132 $kobold->colourPrimary = $data['colour_primary'] ?? '#FFFFFF';
133 $kobold->colourSecondary = $data['colour_secondary'] ?? '#FFFFFF';
134 $kobold->colourTertiary = $data['colour_tertiary'] ?? '#FFFFFF';
135
126 return $kobold;
136 return $kobold;
127 }
137 }
128
138
@@ -140,7 +150,10 @@ class Kobold
140 'injuries' => $this->injuries,
150 'injuries' => $this->injuries,
141 'items' => $this->items,
151 'items' => $this->items,
142 'father_id' => $this->fatherId,
152 'father_id' => $this->fatherId,
143 'mother_id' => $this->motherId
153 'mother_id' => $this->motherId,
154 'colour_primary' => $this->colourPrimary,
155 'colour_secondary' => $this->colourSecondary,
156 'colour_tertiary' => $this->colourTertiary
144 ];
157 ];
145 }
158 }
146
159
@@ -399,92 +412,94 @@ class Kobold
399 private function transformSprite()
412 private function transformSprite()
400 {
413 {
401 $spritePath = $this->getSpritePath();
414 $spritePath = $this->getSpritePath();
415 if (!file_exists($spritePath))
416 return;
402
417
403 if (!file_exists($spritePath)) {
404 return; // Base sprite not created yet
405 }
406
407 // Load the image
408 $image = imagecreatefrompng($spritePath);
418 $image = imagecreatefrompng($spritePath);
409 if (!$image) {
419 if (!$image)
410 return; // Failed to load image
420 return;
411 }
412
421
413 // Apply injury markings if kobold has taken damage
422 // Ensure truecolour (important if PNG is palette-based)
414 $vitalityStat = $this->getStat('vitality');
423 if (!imageistruecolor($image)) {
415 if ($vitalityStat < 50) {
424 imagepalettetotruecolor($image);
416 $this->applyInjuryMarkings($image);
417 }
425 }
418
426
419 // Apply age-based color adjustments (desaturate for elderly)
427 $primaryRGB = $this->hexToRgb($this->colourPrimary);
420 if ($this->getAgeCategory() === 'old' || $this->getAgeCategory() === 'very_old') {
428 $secondaryRGB = $this->hexToRgb($this->colourSecondary);
421 $this->desaturateImage($image);
429 $tertiaryRGB = $this->hexToRgb($this->colourTertiary);
422 }
423
430
424 // Save modified image back to the sprite file
431 $width = imagesx($image);
425 imagepng($image, $spritePath);
432 $height = imagesy($image);
426 imagedestroy($image);
427 }
428
433
429 /**
434 // For exact per-pixel alpha writes:
430 * Draw injury marks (red scars) on the sprite
435 imagealphablending($image, false);
431 * Number of marks increases with injury level
436 imagesavealpha($image, true);
432 */
433 private function applyInjuryMarkings(&$image)
434 {
435 $red = imagecolorallocate($image, 255, 0, 0);
436 $darkRed = imagecolorallocate($image, 139, 0, 0);
437
437
438 // Number of scars based on vitality stat
438 $cache = []; // cache allocated colours "r,g,b,a" => int
439 $vitalityStat = $this->getStat('vitality');
440 $scarCount = intval((50 - $vitalityStat) / 10) + 1;
441 $scarCount = min(5, $scarCount);
442
439
443 $imageWidth = imagesx($image);
440 for ($y = 0; $y < $height; $y++) {
444 $imageHeight = imagesy($image);
441 for ($x = 0; $x < $width; $x++) {
442 $idx = imagecolorat($image, $x, $y);
443 $rgba = imagecolorsforindex($image, $idx);
445
444
446 // Draw scars at various positions
445 $baseR = $rgba['red'];
447 for ($i = 0; $i < $scarCount; $i++) {
446 $baseG = $rgba['green'];
448 $x = rand(10, $imageWidth - 10);
447 $baseB = $rgba['blue'];
449 $y = rand(10, $imageHeight - 10);
448 $baseA = $rgba['alpha']; // 0..127
450 $length = rand(5, 15);
451
449
452 // Draw a jagged line scar
450 // If fully transparent, skip work (optional)
453 imageline($image, $x, $y, $x + $length, $y, $darkRed);
451 if ($baseA === 127) {
454 imageline($image, $x, $y + 1, $x + $length, $y + 1, $red);
452 continue;
455 }
453 }
456 }
457
454
458 /**
455 $newR = 0;
459 * Desaturate the sprite image for elderly kobolds
456 $newG = 0;
460 * Reduces color saturation to make them appear older
457 $newB = 0;
461 */
458
462 private function desaturateImage(&$image)
459 $newR += (int) (($baseR / 255.0) * $primaryRGB['r']);
463 {
460 $newG += (int) (($baseR / 255.0) * $primaryRGB['g']);
464 $imageWidth = imagesx($image);
461 $newB += (int) (($baseR / 255.0) * $primaryRGB['b']);
465 $imageHeight = imagesy($image);
466
462
467 for ($y = 0; $y < $imageHeight; $y++) {
463 $newR += (int) (($baseG / 255.0) * $secondaryRGB['r']);
468 for ($x = 0; $x < $imageWidth; $x++) {
464 $newG += (int) (($baseG / 255.0) * $secondaryRGB['g']);
469 $rgb = imagecolorat($image, $x, $y);
465 $newB += (int) (($baseG / 255.0) * $secondaryRGB['b']);
470
466
471 // Extract color components
467 $newR += (int) (($baseB / 255.0) * $tertiaryRGB['r']);
472 $r = ($rgb >> 16) & 0xFF;
468 $newG += (int) (($baseB / 255.0) * $tertiaryRGB['g']);
473 $g = ($rgb >> 8) & 0xFF;
469 $newB += (int) (($baseB / 255.0) * $tertiaryRGB['b']);
474 $b = $rgb & 0xFF;
475 $a = ($rgb >> 24) & 0xFF;
476
470
477 // Calculate grayscale value using luminance formula
471 $newR = max(0, min(255, $newR));
478 $gray = intval(0.299 * $r + 0.587 * $g + 0.114 * $b);
472 $newG = max(0, min(255, $newG));
473 $newB = max(0, min(255, $newB));
479
474
480 // Blend original color with grayscale (60% desaturated)
475 $key = $newR . ',' . $newG . ',' . $newB . ',' . $baseA;
481 $newR = intval($r * 0.4 + $gray * 0.6);
476 if (!isset($cache[$key])) {
482 $newG = intval($g * 0.4 + $gray * 0.6);
477 $cache[$key] = imagecolorallocatealpha($image, $newR, $newG, $newB, $baseA);
483 $newB = intval($b * 0.4 + $gray * 0.6);
478 }
484
479
485 $newColor = imagecolorallocatealpha($image, $newR, $newG, $newB, $a);
480 imagesetpixel($image, $x, $y, $cache[$key]);
486 imagesetpixel($image, $x, $y, $newColor);
487 }
481 }
488 }
482 }
483
484 imagepng($image, $spritePath);
485 }
486
487
488 /**
489 * Convert HEX color string to RGB array
490 * @param string $hex HEX color in format #RRGGBB
491 * @return array ['r' => 0-255, 'g' => 0-255, 'b' => 0-255]
492 */
493 private function hexToRgb($hex)
494 {
495 // Remove # if present
496 $hex = ltrim($hex, '#');
497
498 // Convert HEX to RGB
499 return [
500 'r' => hexdec(substr($hex, 0, 2)),
501 'g' => hexdec(substr($hex, 2, 2)),
502 'b' => hexdec(substr($hex, 4, 2))
503 ];
489 }
504 }
490}
505}
web/src/System/SaveManager.php +2 −2
@@ -22,7 +22,7 @@ class SaveManager
22 22 */
23 23 public function getUserSavesPath($userId)
24 24 {
25 $path = $this->basePath . '/' . intval($userId);
25 $path = $this->basePath . '/' . ($userId);
26 26 if (!is_dir($path)) {
27 27 mkdir($path, 0755, true);
28 28 }
@@ -46,7 +46,7 @@ class SaveManager
46 46 */
47 47 public function getKoboldSpritePath($userId, $koboldId)
48 48 {
49 $path = $this->basePath . '/' . intval($userId) . '/kobolds/' . intval($koboldId) . '/sprites';
49 $path = $this->basePath . '/' . ($userId) . '/kobolds/' . $koboldId . '/sprites';
50 50 if (!is_dir($path)) {
51 51 mkdir($path, 0755, true);
52 52 }
@@ -22,7 +22,7 @@ class SaveManager
22 */
22 */
23 public function getUserSavesPath($userId)
23 public function getUserSavesPath($userId)
24 {
24 {
25 $path = $this->basePath . '/' . intval($userId);
25 $path = $this->basePath . '/' . ($userId);
26 if (!is_dir($path)) {
26 if (!is_dir($path)) {
27 mkdir($path, 0755, true);
27 mkdir($path, 0755, true);
28 }
28 }
@@ -46,7 +46,7 @@ class SaveManager
46 */
46 */
47 public function getKoboldSpritePath($userId, $koboldId)
47 public function getKoboldSpritePath($userId, $koboldId)
48 {
48 {
49 $path = $this->basePath . '/' . intval($userId) . '/kobolds/' . intval($koboldId) . '/sprites';
49 $path = $this->basePath . '/' . ($userId) . '/kobolds/' . $koboldId . '/sprites';
50 if (!is_dir($path)) {
50 if (!is_dir($path)) {
51 mkdir($path, 0755, true);
51 mkdir($path, 0755, true);
52 }
52 }
web/src/api/game.php +1 −1
@@ -26,7 +26,7 @@ if ($method === 'POST') {
26 26
27 27 // Generate 20 random kobolds
28 28 $kobolds = [];
29 for ($i = 0; $i < 20; $i++) {
29 for ($i = 0; $i < 10; $i++) {
30 30 $kobold = Kobold::generate($userId, $tribe->getSaveId());
31 31 $kobold->setName('Kobold ' . ($i + 1));
32 32 $tribe->addKobold($kobold);
@@ -26,7 +26,7 @@ if ($method === 'POST') {
26
26
27 // Generate 20 random kobolds
27 // Generate 20 random kobolds
28 $kobolds = [];
28 $kobolds = [];
29 for ($i = 0; $i < 20; $i++) {
29 for ($i = 0; $i < 10; $i++) {
30 $kobold = Kobold::generate($userId, $tribe->getSaveId());
30 $kobold = Kobold::generate($userId, $tribe->getSaveId());
31 $kobold->setName('Kobold ' . ($i + 1));
31 $kobold->setName('Kobold ' . ($i + 1));
32 $tribe->addKobold($kobold);
32 $tribe->addKobold($kobold);