add docs and notes
This commit is contained in:
122197
doc/2026-01-05-global.sql
Normal file
122197
doc/2026-01-05-global.sql
Normal file
File diff suppressed because it is too large
Load Diff
150
doc/README.md
Normal file
150
doc/README.md
Normal file
@@ -0,0 +1,150 @@
|
||||
# doc
|
||||
|
||||
This is documentation relevant to the project.
|
||||
SQL files are master.mdb dumps labeled by date and region.
|
||||
This file is my notes from exploring the database.
|
||||
|
||||
# text_data categories
|
||||
|
||||
- 6 is character names, 4 is [variant] character name, 5 is [variant], 14 is variant
|
||||
- 47 is skill names, 48 is skill descriptions
|
||||
- 75 is support card names incl. variant, 76 is support card variant, 77 is support card character
|
||||
- 147 is spark names, 172 is spark descriptions
|
||||
- 33 is race names
|
||||
- 65 is player titles, 66 is title descriptions - ties with honor_data?
|
||||
|
||||
# succession factor (sparks)
|
||||
|
||||
tables are succession_factor and succession_factor_effect
|
||||
|
||||
factor_type:
|
||||
- 1 stat
|
||||
- 2 aptitude
|
||||
- 5 race
|
||||
- 4 skill
|
||||
- 6 scenario
|
||||
- 3 unique
|
||||
|
||||
target_type:
|
||||
- 1 speed; value 1 is amount, value 2 is 0
|
||||
- 2 stam
|
||||
- 3 power
|
||||
- 4 guts
|
||||
- 5 wit
|
||||
- 11 turf; value 1 is number of levels (1 or 2), value 2 is 0
|
||||
- 12 dirt
|
||||
- 21 front
|
||||
- 22 pace
|
||||
- 23 late
|
||||
- 24 end
|
||||
- 31 sprint
|
||||
- 32 mile
|
||||
- 33 medium
|
||||
- 34 long
|
||||
- 41 is skill; value 1 is skill id, value 2 is hint level (1-5)
|
||||
|
||||
every possible result has a row in succession_factor_effect.
|
||||
effect_id distinguishes possibilities; factors with multiple effects (race and scenario sparks) have multiple rows with equal effect_id.
|
||||
effect_group_id determines the pmf, but no tables have non-empty joins with the same column name, so the distribution values are mystery.
|
||||
even searching for 51 and 52 (effect group ids for 1\* and 2\* race and scenario sparks) on consecutive lines gives nothing.
|
||||
|
||||
sf.grade = 1 unless it is a unique (green) spark, then sf.grade = 2.
|
||||
=> sf.grade = 2 iff sf.factor_type = 3
|
||||
|
||||
getting all interesting spark data, fully expanded with all effects:
|
||||
```sql
|
||||
WITH spark AS (
|
||||
SELECT
|
||||
n."index" AS "id",
|
||||
n."text" AS "name",
|
||||
d."text" AS "description"
|
||||
FROM text_data n
|
||||
LEFT JOIN text_data d ON n."index" = d."index" AND d."category" = 172
|
||||
WHERE n.category = 147
|
||||
)
|
||||
SELECT
|
||||
spark.name,
|
||||
spark.description,
|
||||
sf.factor_id,
|
||||
sf.factor_group_id,
|
||||
sf.factor_type,
|
||||
sf.effect_group_id,
|
||||
sfe.effect_id,
|
||||
sfe.target_type,
|
||||
sfe.value_1,
|
||||
sfe.value_2
|
||||
FROM spark
|
||||
JOIN succession_factor sf ON spark.id = sf.factor_id
|
||||
JOIN succession_factor_effect sfe ON sf.factor_group_id = sfe.factor_group_id
|
||||
ORDER BY sf.factor_id, sfe.effect_id, sfe.target_type
|
||||
```
|
||||
|
||||
(change joins to left to include sparks that aren't implemented yet, mostly uniques)
|
||||
|
||||
getting all skills' levels that each spark can give:
|
||||
```sql
|
||||
WITH spark AS (
|
||||
SELECT
|
||||
n."index" AS "id",
|
||||
n."text" AS "name",
|
||||
d."text" AS "description"
|
||||
FROM text_data n
|
||||
LEFT JOIN text_data d ON n."index" = d."index" AND d."category" = 172
|
||||
WHERE n.category = 147
|
||||
), spark_skills AS (
|
||||
SELECT DISTINCT
|
||||
factor_group_id,
|
||||
value_1,
|
||||
value_2
|
||||
FROM succession_factor_effect
|
||||
WHERE target_type = 41
|
||||
)
|
||||
SELECT
|
||||
spark.name,
|
||||
spark.description,
|
||||
sf.factor_id,
|
||||
sf.factor_group_id,
|
||||
sf.factor_type,
|
||||
sf.effect_group_id,
|
||||
ss.value_1 AS skill,
|
||||
JSON_GROUP_ARRAY(ss.value_2) AS levels
|
||||
FROM spark
|
||||
JOIN succession_factor sf ON spark.id = sf.factor_id
|
||||
JOIN spark_skills ss ON sf.factor_group_id = ss.factor_group_id
|
||||
GROUP BY sf.factor_id
|
||||
ORDER BY sf.factor_id
|
||||
```
|
||||
although realistically you can just use effect_group_id to determine both probabilities and support.
|
||||
race sparks with skills always give +1, skill sparks always give +1-5, unique sparks always give +1-3.
|
||||
|
||||
# support cards
|
||||
|
||||
- hints are defined in single_mode_hint_gain, grouped by hint_group
|
||||
- hint_gain_type is 0 for skill, 1 for stat or skill points
|
||||
- hint_value_1 is skill id or stat target 1 = speed 2 = stam ... 5 = guts; 30 = skill points
|
||||
- hint_value_2 appears to be base skill hint level (1 always) or stat amount (6, 2, 1 for guts speed/pow, 5 for wit skill points)
|
||||
|
||||
# skills
|
||||
|
||||
- single_mode_skill_need_point is base number of skill points to buy each skill
|
||||
- support card skill hints are defined in single_mode_hint_gain
|
||||
- skill_set is NOT trainee skills, seems to be npcs
|
||||
|
||||
# races
|
||||
|
||||
- group 1, grade: g1 100, g2 200, g3 300, op 400, pre-op 700
|
||||
- group 61 is ....?? don't match anything
|
||||
- takarazuka kinen, kikuka sho, and tenno sho spring are defined twice???
|
||||
single_mode_wins_saddle defines titles (classic triple crown, tenno sweep, &c.) using win_saddle_type = 0
|
||||
|
||||
# trainee definitions
|
||||
|
||||
- card_data has universal trainee stats: base skill set, stat growth bonuses ("talent"), default running style
|
||||
- card_rarity_data has per-star-level stats: initial numbers, stat caps (!!), aptitudes (!!)
|
||||
- card_talent_upgrade has costs to increase potential level, but it doesn't seem to have skill sets
|
||||
- card_talent_hint_upgrade has costs to raise hint levels, but it's actually universal, only six rows
|
||||
|
||||
|
||||
# unrelated to everything
|
||||
|
||||
try doober with E long, all-seeing eyes, gold recovery, and lots of stamina running in g3 diamond stakes senior year late february
|
||||
Reference in New Issue
Block a user