Skip to content

Commit f05df00

Browse files
committed
Allow editing primary identifiers (Name/Ability) for all content types in Manager GUI
1 parent 3c216f9 commit f05df00

4 files changed

Lines changed: 166 additions & 36 deletions

File tree

Lines changed: 121 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,122 @@
11
[
2-
{ "Name": "AutoQuest I", "Description": "Allows a Quest to be looped indefinitely" },
3-
{ "Name": "Refine Fire", "Description": "Refine items into fire magic" },
4-
{ "Name": "Refine Ice", "Description": "Refine items into ice magic" },
5-
{ "Name": "Refine Wood", "Description": "Refine logs into herbs" },
6-
{ "Name": "Refine Mixology", "Description": "Refine herbs into potions" },
7-
{ "Name": "Refine Scrap", "Description": "Refine basic items into gold" },
8-
{ "Name": "Augment Strength", "Description": "Directly increase physical power" },
9-
{ "Name": "Augment Vitality", "Description": "Directly increase health and defense" },
10-
{ "Name": "Augment Magic", "Description": "Directly increase magical power" },
11-
{ "Name": "Augment Speed", "Description": "Directly increase action speed" },
12-
{ "Name": "Mass Refine", "Description": "Reduces refinement costs." },
13-
{ "Name": "Essence Harvest", "Description": "Increases drop rates." },
14-
{ "Name": "J-Str", "Description": "Allows junctioning magic to the Strength stat" },
15-
{ "Name": "J-Magic", "Description": "Allows junctioning magic to the Magic stat" },
16-
{ "Name": "J-Vit", "Description": "Allows junctioning magic to the Vitality stat" },
17-
{ "Name": "J-Speed", "Description": "Allows junctioning magic to the Speed stat" },
18-
{ "Name": "Magic Pocket I", "Description": "Increases global magic capacity to 60" },
19-
{ "Name": "Magic Pocket II", "Description": "Advanced space-folding techniques further expand magic storage to 100." },
20-
{ "Name": "Logistics I", "Description": "Allows a character to perform two tasks at once" },
21-
{ "Name": "Logistics II", "Description": "Allows a character to perform three tasks at once" },
22-
{ "Name": "AutoQuest II", "Description": "Enables auto-restart for the second task slot" },
23-
{ "Name": "Mountain Crush", "Description": "Gather rare minerals with high strength" },
24-
{ "Name": "Deep Dive", "Description": "Explore the depths with high speed" },
25-
{ "Name": "Master Slayer", "Description": "Defeat high-tier threats" },
26-
{ "Name": "Refine Life", "Description": "Refine ancient components into life magic" },
27-
{ "Name": "Refine Earth", "Description": "Refine minerals into earth magic" },
28-
{ "Name": "Refine Water", "Description": "Refine coral into water magic" },
29-
{ "Name": "Refine Haste", "Description": "Refine ancient parchment into haste magic" },
30-
{ "Name": "Refine Lightning", "Description": "Refine shards into lightning magic" }
31-
]
2+
{
3+
"Name": "AutoQuest I",
4+
"Description": "Allows a Quest to be looped indefinitely"
5+
},
6+
{
7+
"Name": "Refine Fire",
8+
"Description": "Refine items into fire magic"
9+
},
10+
{
11+
"Name": "Refine Ice",
12+
"Description": "Refine items into ice magic"
13+
},
14+
{
15+
"Name": "Refine Wood",
16+
"Description": "Refine logs into herbs"
17+
},
18+
{
19+
"Name": "Refine Mixology",
20+
"Description": "Refine herbs into potions"
21+
},
22+
{
23+
"Name": "Refine Scrap",
24+
"Description": "Refine basic items into gold"
25+
},
26+
{
27+
"Name": "Augment Strength",
28+
"Description": "Directly increase physical power"
29+
},
30+
{
31+
"Name": "Augment Vitality",
32+
"Description": "Directly increase health and defense"
33+
},
34+
{
35+
"Name": "Augment Magic",
36+
"Description": "Directly increase magical power"
37+
},
38+
{
39+
"Name": "Augment Speed",
40+
"Description": "Directly increase action speed"
41+
},
42+
{
43+
"Name": "Mass Refine",
44+
"Description": "Reduces refinement costs."
45+
},
46+
{
47+
"Name": "Essence Harvest",
48+
"Description": "Increases drop rates."
49+
},
50+
{
51+
"Name": "J-Str",
52+
"Description": "Allows junctioning magic to the Strength stat"
53+
},
54+
{
55+
"Name": "J-Magic",
56+
"Description": "Allows junctioning magic to the Magic stat"
57+
},
58+
{
59+
"Name": "J-Vit",
60+
"Description": "Allows junctioning magic to the Vitality stat"
61+
},
62+
{
63+
"Name": "J-Speed",
64+
"Description": "Allows junctioning magic to the Speed stat"
65+
},
66+
{
67+
"Name": "Magic Pocket I",
68+
"Description": "Increases global magic capacity to 60"
69+
},
70+
{
71+
"Name": "Magic Pocket II",
72+
"Description": "Advanced space-folding techniques further expand magic storage to 100."
73+
},
74+
{
75+
"Name": "Logistics I",
76+
"Description": "Allows a character to perform two tasks at once"
77+
},
78+
{
79+
"Name": "Logistics II",
80+
"Description": "Allows a character to perform three tasks at once"
81+
},
82+
{
83+
"Name": "AutoQuest II",
84+
"Description": "Enables auto-restart for the second task slot"
85+
},
86+
{
87+
"Name": "Mountain Crush",
88+
"Description": "Gather rare minerals with high strength"
89+
},
90+
{
91+
"Name": "Deep Dive",
92+
"Description": "Explore the depths with high speed"
93+
},
94+
{
95+
"Name": "Master Slayer",
96+
"Description": "Defeat high-tier threats"
97+
},
98+
{
99+
"Name": "Refine Life",
100+
"Description": "Refine ancient components into life magic"
101+
},
102+
{
103+
"Name": "Refine Earth",
104+
"Description": "Refine minerals into earth magic"
105+
},
106+
{
107+
"Name": "Refine Water",
108+
"Description": "Refine coral into water magic"
109+
},
110+
{
111+
"Name": "Refine Haste",
112+
"Description": "Refine ancient parchment into haste magic"
113+
},
114+
{
115+
"Name": "Refine Lightning",
116+
"Description": "Refine shards into lightning magic"
117+
},
118+
{
119+
"Name": "Alchemy I",
120+
"Description": "Convert items into gold. Think of it like selling your goods. "
121+
}
122+
]

Mythril.Blazor/wwwroot/data/content_graph.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,5 +2875,32 @@
28752875
}
28762876
]
28772877
}
2878+
},
2879+
{
2880+
"id": "recipe_autoquest_i_basic_gem_gold",
2881+
"type": "Refinement",
2882+
"name": "AutoQuest I - Gold",
2883+
"data": {
2884+
"primary_stat": "Speed"
2885+
},
2886+
"in_edges": {
2887+
"requires_ability": [
2888+
"ability_autoquest_i"
2889+
]
2890+
},
2891+
"out_edges": {
2892+
"consumes": [
2893+
{
2894+
"targetId": "item_basic_gem",
2895+
"quantity": 1
2896+
}
2897+
],
2898+
"produces": [
2899+
{
2900+
"targetId": "item_gold",
2901+
"quantity": 250
2902+
}
2903+
]
2904+
}
28782905
}
28792906
]

Mythril.Blazor/wwwroot/data/refinements.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,17 @@
142142
"OutputQuantity": 5
143143
}
144144
]
145+
},
146+
{
147+
"PrimaryStat": "Speed",
148+
"Recipes": [
149+
{
150+
"InputItem": "Basic Gem",
151+
"InputQuantity": 1,
152+
"OutputItem": "Gold",
153+
"OutputQuantity": 250
154+
}
155+
],
156+
"Ability": "AutoQuest I"
145157
}
146158
]

modules/contentManager/app.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ def edit_cadence_abilities(abilities_list, key_prefix):
213213
with st.form(f"edit_{page}_{selected_name}"):
214214
st.subheader(f"Editing: {selected_name}")
215215

216-
if page != "Refinements": # Refinements use 'Ability' as name, handled in data_io
217-
name = st.text_input("Name", item["Name"])
218-
description = st.text_area("Description", item.get("Description", ""))
216+
if page == "Refinements":
217+
name = st.selectbox("Linked Ability", [a["Name"] for a in manager.unified_data["abilities"]], index=[a["Name"] for a in manager.unified_data["abilities"]].index(item["Name"]) if item["Name"] in [a["Name"] for a in manager.unified_data["abilities"]] else 0)
219218
else:
220-
name = st.selectbox("Ability Base", [a["Name"] for a in manager.unified_data["abilities"]], index=[a["Name"] for a in manager.unified_data["abilities"]].index(item["Name"]) if item["Name"] in [a["Name"] for a in manager.unified_data["abilities"]] else 0)
221-
description = "" # Not used for refinements
219+
name = st.text_input("Name", item["Name"])
220+
221+
description = st.text_area("Description", item.get("Description", "")) if "Description" in item else ""
222222

223223
if page == "Quests":
224224
col1, col2, col3 = st.columns(3)
@@ -238,7 +238,7 @@ def edit_cadence_abilities(abilities_list, key_prefix):
238238
i_type = st.selectbox("Type", ["Material", "Currency", "Consumable", "Spell", "KeyItem"], index=["Material", "Currency", "Consumable", "Spell", "KeyItem"].index(item["ItemType"]))
239239

240240
elif page == "Refinements":
241-
stat = st.selectbox("Primary Stat", [s["Name"] for s in manager.unified_data["stats"]], index=[s["Name"] for s in manager.unified_data["stats"]].index(item["PrimaryStat"]))
241+
stat = st.selectbox("Primary Stat", [s["Name"] for s in manager.unified_data["stats"]], index=[s["Name"] for s in manager.unified_data["stats"]].index(item["PrimaryStat"]) if item["PrimaryStat"] in [s["Name"] for s in manager.unified_data["stats"]] else 0)
242242

243243
if st.form_submit_button("Update Basic Info"):
244244
item["Name"] = name

0 commit comments

Comments
 (0)