Skip to content

Commit

Permalink
smt4 whisper skills
Browse files Browse the repository at this point in the history
  • Loading branch information
aqiu384 committed Dec 3, 2024
1 parent 178bbdb commit bb4be59
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
15 changes: 15 additions & 0 deletions docs/how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@
* https://erikku.github.io/smt4tool/
* https://gamefaqs.gamespot.com/3ds/672441-shin-megami-tensei-iv/faqs/67766

### Skills That Cannot Be Whispered
* Estoma Sword
* Inferno of God
* Fallen Grace
* Hailstorm of God
* Lamentation
* Tornado of God
* Serpent of Sheol
* Lightning of God
* Kannuki-Throw
* Damnation
* Gaea Rage
* Curse Thy Enemy
* Guardian's Eye

### Fusion Accident Skill Inheritance
* If demons A x B = C, but produces a fusion accident resulting in D instead
* D's first 4 skills will be the highest ranked from the combined ABCD skill pool
Expand Down
4 changes: 2 additions & 2 deletions src/smt4/data/skill-ids.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,13 @@ SKILL_299
SKILL_300
Kannuki-Throw
Lightning of God
Tetrabreak
Tetracoerce
Stigmata Strike
Serpent of Sheol
Tornado of God
Lamentation
Hailstorm of God
Makarabreak
Makaracoerce
Archangel's Law
Fallen Grace
Inferno of God
Expand Down
15 changes: 9 additions & 6 deletions src/smt4/skill-data.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
]

with open('../../../megaten-fusion-tool/src/app/smt4/data/skill-data.json') as jsonfile:
OLD_SKILLS = { x['name']: x for x in json.load(jsonfile) }
OLD_SKILLS = { x['a'][0]: x for x in json.load(jsonfile).values() }
with open('data/skill-ids.tsv') as tsvfile:
SKILL_IDS = ['BLANK'] + [x.strip() for x in tsvfile]

Expand Down Expand Up @@ -60,12 +60,15 @@ def parse_active_skills(fname, start_offset, end_offset, line_len):
cost += 1000

entry = OLD_SKILLS[sname]
printif_notequal(sname, 'cost', cost, entry.get('cost', 0))
stats = [entry['rank'], cost, pwr, min_hit, max_hit, acc, crit, ail_acc]
printif_notequal(sname, 'cost', cost, entry['b'][1])
old_rank = entry['b'][0]
if 0 < old_rank and sum(whispers) == 0:
print(sname, sum(whispers))
stats = [entry['b'][0], cost, pwr, min_hit, max_hit, acc, crit, ail_acc]
prefix = [sname, elem, entry.get('target', '-')]
suffix = [str(ailment), '-', '-', entry.get('effect', '-')]
NEW_SKILLS[f"{s_id:03}"] = prefix + [str(x) for x in stats] + suffix
print(heal_pwr, s_id, sname)
# print(heal_pwr, s_id, sname)

def parse_passive_skills(fname, start_offset, end_offset, line_len):
with open(fname, 'rb') as binfile:
Expand All @@ -87,11 +90,11 @@ def parse_passive_skills(fname, start_offset, end_offset, line_len):

entry = OLD_SKILLS[sname]
SEEN_SKILLS[sname] = True
stats = [entry['rank']] + [0] * 7
stats = [entry['b'][0]] + [0] * 7
prefix = [sname, 'pas', '-']
suffix = ['-', '-', '-', entry.get('effect', '-')]
NEW_SKILLS[f"{s_id:03}"] = prefix + [str(x) for x in stats] + suffix
print(unk_parts, s_id, sname)
# print(unk_parts, s_id, sname)

parse_active_skills('data/battle/SkillData.bin', START_OFFSET, END_OFFSET, LINE_LEN)

Expand Down

0 comments on commit bb4be59

Please sign in to comment.