diff --git a/frontend/palworld-pal-editor-webui/src/components/TopBar.vue b/frontend/palworld-pal-editor-webui/src/components/TopBar.vue
index 2bc3b23..1edecbf 100644
--- a/frontend/palworld-pal-editor-webui/src/components/TopBar.vue
+++ b/frontend/palworld-pal-editor-webui/src/components/TopBar.vue
@@ -39,36 +39,36 @@ watch(() => palStore.LOADING_FLAG, (newValue) => {
diff --git a/frontend/palworld-pal-editor-webui/src/components/modules/BarButton.vue b/frontend/palworld-pal-editor-webui/src/components/modules/BarButton.vue
new file mode 100644
index 0000000..27c830b
--- /dev/null
+++ b/frontend/palworld-pal-editor-webui/src/components/modules/BarButton.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/palworld-pal-editor-webui/src/components/modules/IconButton.vue b/frontend/palworld-pal-editor-webui/src/components/modules/IconButton.vue
new file mode 100644
index 0000000..43293ad
--- /dev/null
+++ b/frontend/palworld-pal-editor-webui/src/components/modules/IconButton.vue
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/palworld-pal-editor-webui/src/components/modules/InputArea.vue b/frontend/palworld-pal-editor-webui/src/components/modules/InputArea.vue
new file mode 100644
index 0000000..6acad0e
--- /dev/null
+++ b/frontend/palworld-pal-editor-webui/src/components/modules/InputArea.vue
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/palworld-pal-editor-webui/src/i18n/en.js b/frontend/palworld-pal-editor-webui/src/i18n/en.js
index fe00616..494b9b5 100644
--- a/frontend/palworld-pal-editor-webui/src/i18n/en.js
+++ b/frontend/palworld-pal-editor-webui/src/i18n/en.js
@@ -1,81 +1,81 @@
export default {
- AuthView_1: "Hello! It seems you have set a protection password 🔐.",
- AuthView_2: "Before continue, please enter the password:",
- AuthView_Btn_1: "Unlock",
+ AuthView_PW_Prompt_1: "Hello! It seems you have set a protection password 🔐.",
+ AuthView_PW_Prompt_2: "Before continue, please enter the password:",
+ AuthView_BTN_Unlock: "Unlock",
- EntryView_1: "Hello there!",
- EntryView_2: " > Thank you for using this tool!",
- EntryView_3:
+ EntryView_Greet_1: "Hello there!",
+ EntryView_Greet_2: " > Thank you for using this tool!",
+ EntryView_Greet_3:
" > If you are running this tool on webui mode, or from a docker container, consider setup a password to prevent unauthorized remote access.",
- EntryView_4: " > If you have any issue, or want to contribute, check out ",
- EntryView_5: " page.",
- EntryView_6: " > If you love this tool and wish to donate, check out my ",
- EntryView_7:
+ EntryView_Greet_4: " > If you have any issue, or want to contribute, check out ",
+ EntryView_Greet_5: " page.",
+ EntryView_Greet_6: " > If you love this tool and wish to donate, check out my ",
+ EntryView_Note_1:
" > If you are running this program for the first time, you will need to manually enter the correct path to your save folder, i.e. the parent folder of Level.sav.",
- EntryView_8:
+ EntryView_Note_2:
" > After a successful save loading, the path will be stored and automatically input for you the next time.",
- EntryView_9:
+ EntryView_Note_3:
" > If you are running from the docker container, please make sure you have mapped the directory correctly, and setup the correct file access permission. Then all you need is to enter the mapped path.",
- EntryView_Btn_1: "Select Path",
- EntryView_Btn_2: "Load Save",
+ EntryView_BTN_Path_Picker: "Select Path",
+ EntryView_BTN_Load: "Load Save",
- Editor_1: "THIS PAL IS LIKELY UNREFERENCED IN GAME",
- Editor_2: "BASIC INFO",
- Editor_3: "Species: ",
- Editor_4: "NickName: ",
- Editor_5: "Gender: ",
- Editor_6: "Variant: ",
- Editor_7: "Pal Instance ID: ",
- Editor_8: "Pal Guild ID: ",
- Editor_9: "Pal ContainerSlot: ",
- Editor_10: "Owner: ",
- Editor_11: "None (BASE WORKER)",
- Editor_12: "Computed MaxHP: ",
- Editor_13: "Computed Attack: ",
- Editor_14: "Computed Defense: ",
- Editor_15: "Computed CraftSpeed: ",
- Editor_16: "IVs",
- Editor_17: "HP IV: ",
- Editor_18: "DEF IV: ",
- Editor_19: "ATK IV: ",
- Editor_20: "MELEE IV (Unused): ",
- Editor_21: "SOUL RANKs (POWER STATUE)",
- Editor_22: "SoulBonus HP: ",
- Editor_23: "SoulBonus Attack: ",
- Editor_24: "SoulBonus Defence: ",
- Editor_25: "SoulBonus CraftSpeed: ",
- Editor_26: "CONDENSER RANK",
- Editor_27: "Condenser Rank: ",
- Editor_28: "PASSIVE SKILLS",
- Editor_29: "Add Skills",
- Editor_30: "EQUIPPED ACTIVE SKILLS",
- Editor_31: "Attack: ",
- Editor_32: "CT: ",
- Editor_33: "Element: ",
- Editor_34: "MASTERED ACTIVE SKILLS (SKILLS ARE AUTOMATICALLY ADDED WHEN LEVELING UP PALS)",
+ Editor_Note_Ghost_Pal: "THIS PAL IS LIKELY UNREFERENCED IN GAME",
+ Editor_Basic_Info: "BASIC INFO",
+ Editor_Species: "Species: ",
+ Editor_Nickname: "NickName: ",
+ Editor_Gender: "Gender: ",
+ Editor_Variant: "Variant: ",
+ Editor_Pal_ID: "Pal Instance ID: ",
+ Editor_Pal_Guild_ID: "Pal Guild ID: ",
+ Editor_Pal_Slot: "Pal ContainerSlot: ",
+ Editor_Pal_Owner: "Owner: ",
+ Editor_Pal_No_Owner: "None (BASE WORKER)",
+ Editor_Estimated_HP: "Estimated MaxHP: ",
+ Editor_Estimated_ATK: "Estimated Attack: ",
+ Editor_Estimated_DEF: "Estimated Defense: ",
+ Editor_Estimated_WorkSpeed: "Estimated CraftSpeed: ",
+ Editor_IV: "IVs",
+ Editor_IV_HP: "HP: ",
+ Editor_IV_DEF: "DEF: ",
+ Editor_IV_ATK: "ATK: ",
+ Editor_IV_MELEE: "MELEE (Unused): ",
+ Editor_Souls_Upgrade: "SOULS UPGRADE (Statue of Power)",
+ Editor_Souls_HP: "HP: ",
+ Editor_Souls_ATK: "Attack: ",
+ Editor_Souls_DEF: "Defence: ",
+ Editor_Souls_CraftSpeed: "CraftSpeed: ",
+ Editor_Condenser: "CONDENSER UPGRADE",
+ Editor_Condenser_Rank: "Rank: ",
+ Editor_Passive_Skills: "PASSIVE SKILLS",
+ Editor_Select_Skill: "Add Skills",
+ Editor_Equipped_Skills: "EQUIPPED ACTIVE SKILLS",
+ Editor_Skill_ATK: "Attack: ",
+ Editor_Skill_CD: "CT: ",
+ Editor_Skill_EL: "Element: ",
+ Editor_Mastered_Skills: "MASTERED ACTIVE SKILLS (SKILLS ARE AUTOMATICALLY ADDED WHEN LEVELING UP PALS)",
- Editor_Btn_1: "Dump Data",
- Editor_Btn_2: "Dupe Pal",
- Editor_Btn_3: "Del Pal",
- Editor_Btn_4: "Take Back",
- Editor_Btn_5: "Clear Worker Sick",
- Editor_Btn_6: "Revive Pal",
+ Editor_Btn_Export_Data: "Dump Data",
+ Editor_Btn_Dupe_Pal: "Dupe Pal",
+ Editor_Btn_Delete_Pal: "Del Pal",
+ Editor_Btn_Retrieve_Pal: "Take Back",
+ Editor_Btn_Heal_Pal: "Clear Worker Sick",
+ Editor_Btn_Revive_Pal: "Revive Pal",
- PalList_1: "PAL LIST",
+ PalList_Text: "PAL LIST",
- PlayerList_1: "PLAYER LIST",
- PlayerList_2: "Unlock Viewing Cage for ",
+ PlayerList_Text: "PLAYER LIST",
+ PlayerList_Viewing_Cage: "Unlock Viewing Cage for ",
- PlayerList_Btn_1: "BASE PAL",
+ PlayerList_Base_Pal: "BASE PAL",
- TopBar_Btn_1: "SAVE CHANGES",
- TopBar_Btn_2: "Reload Save",
- TopBar_Btn_3: "Return to Main Page",
- TopBar_Btn_4: "Show Out of Box Pal",
- TopBar_Btn_5: "Toggle Ghost Pal",
- TopBar_Btn_6: "Hide Invalid Options",
+ TopBar_Btn_Save: "SAVE CHANGES",
+ TopBar_Btn_Reload: "Reload Save",
+ TopBar_Btn_Main_Page: "Return to Main Page",
+ TopBar_Btn_Pal_OOB: "Show Out of Box Pal",
+ TopBar_Btn_Pal_Ghost: "Toggle Ghost Pal",
+ TopBar_Btn_Invalid_Options: "Hide Invalid Options",
- TopBar_1: "Display pals that are not in owner player pal containers, i.e. viewing cage, or taken by someone.",
- TopBar_2: "Show ghost pals, those no longer can be found in game, i.e. sold, dropped, butchered.",
- TopBar_3: "Hide invalid dropdown menu options."
+ TopBar_Pal_OOB_Tooltips: "Display pals that are not in owner player pal containers, i.e. viewing cage, or taken by someone.",
+ TopBar_Pal_Ghost_Tooltips: "Show ghost pals, those no longer can be found in game, i.e. sold, dropped, butchered.",
+ TopBar_Invalid_Options_Tooltips: "Hide invalid dropdown menu options."
};
diff --git a/frontend/palworld-pal-editor-webui/src/i18n/ja.js b/frontend/palworld-pal-editor-webui/src/i18n/ja.js
index 6eae3d2..2a57e4c 100644
--- a/frontend/palworld-pal-editor-webui/src/i18n/ja.js
+++ b/frontend/palworld-pal-editor-webui/src/i18n/ja.js
@@ -1,81 +1,81 @@
export default {
- AuthView_1: "こんにちは!保護用のパスワードが設定されているようです 🔐。",
- AuthView_2: "続ける前に、パスワードを入力してください:",
- AuthView_Btn_1: "アンロック",
+ AuthView_PW_Prompt_1: "こんにちは!保護用のパスワードが設定されているようです 🔐。",
+ AuthView_PW_Prompt_2: "続ける前に、パスワードを入力してください:",
+ AuthView_BTN_Unlock: "アンロック",
- EntryView_1: "こんにちは!",
- EntryView_2: " > このツールをご利用いただきありがとうございます!",
- EntryView_3:
+ EntryView_Greet_1: "こんにちは!",
+ EntryView_Greet_2: " > このツールをご利用いただきありがとうございます!",
+ EntryView_Greet_3:
" > WebUIモードやDockerコンテナでこのツールを実行している場合は、無許可のリモートアクセスを防ぐためにパスワードの設定を検討してください。",
- EntryView_4: " > 何か問題がある場合、または貢献したい場合は、",
- EntryView_5: " ページを確認してください。",
- EntryView_6: " > このツールが気に入って寄付を検討しているなら、私の",
- EntryView_7:
+ EntryView_Greet_4: " > 何か問題がある場合、または貢献したい場合は、",
+ EntryView_Greet_5: " ページを確認してください。",
+ EntryView_Greet_6: " > このツールが気に入って寄付を検討しているなら、私の",
+ EntryView_Note_1:
" > このプログラムを初めて実行する場合、正しい保存フォルダのパス(Level.savの親フォルダ)を手動で入力する必要があります。",
- EntryView_8:
+ EntryView_Note_2:
" > 読み込みに成功すると、次回からはパスが自動的に入力されます。",
- EntryView_9:
+ EntryView_Note_3:
" > Dockerコンテナから実行している場合は、ディレクトリが正しくマッピングされており、適切なファイルアクセス権限が設定されていることを確認してください。その後、マッピングされたパスを入力するだけです。",
- EntryView_Btn_1: "パスを選択",
- EntryView_Btn_2: "LOAD",
+ EntryView_BTN_Path_Picker: "パスを選択",
+ EntryView_BTN_Load: "ロード",
- Editor_1: "このパルはゲーム内に存在しない可能性があります",
- Editor_2: "基本情報",
- Editor_3: "種族: ",
- Editor_4: "ニックネーム: ",
- Editor_5: "性別: ",
- Editor_6: "バリアント: ",
- Editor_7: "パルインスタンスID: ",
- Editor_8: "パルギルドID: ",
- Editor_9: "パルコンテナスロット: ",
- Editor_10: "所有者: ",
- Editor_11: "なし(ベースキャンプ作業員)",
- Editor_12: "計算された最大HP: ",
- Editor_13: "計算された攻撃力: ",
- Editor_14: "計算された防御力: ",
- Editor_15: "計算されたクラフト速度: ",
- Editor_16: "個体値",
- Editor_17: "HP 個体値: ",
- Editor_18: "防御力 個体値: ",
- Editor_19: "攻撃力 個体値: ",
- Editor_20: "近接攻撃力 個体値 (Unused): ",
- Editor_21: "SOUL RANKs (POWER STATUE)",
- Editor_22: "SoulBonus HP: ",
- Editor_23: "SoulBonus 攻撃力: ",
- Editor_24: "SoulBonus 防御力: ",
- Editor_25: "SoulBonus クラフト速度: ",
- Editor_26: "CONDENSER RANK",
- Editor_27: "Condenser Rank: ",
- Editor_28: "パッシブスキル",
- Editor_29: "スキルを追加",
- Editor_30: "装備中のアクティブスキル",
- Editor_31: "攻撃力: ",
- Editor_32: "CT: ",
- Editor_33: "属性: ",
- Editor_34: "習得したアクティブスキル(パルをレベルアップすると自動的に追加されるスキル)",
+ Editor_Note_Ghost_Pal: "このパルはゲーム内に存在しない可能性があります",
+ Editor_Basic_Info: "基本情報",
+ Editor_Species: "種族: ",
+ Editor_Nickname: "ニックネーム: ",
+ Editor_Gender: "性別: ",
+ Editor_Variant: "バリアント: ",
+ Editor_Pal_ID: "パルインスタンスID: ",
+ Editor_Pal_Guild_ID: "パルギルドID: ",
+ Editor_Pal_Slot: "パルコンテナスロット: ",
+ Editor_Pal_Owner: "所有者: ",
+ Editor_Pal_No_Owner: "なし(拠点で作業中)",
+ Editor_Estimated_HP: "推定最大HP: ",
+ Editor_Estimated_ATK: "推定攻撃力: ",
+ Editor_Estimated_DEF: "推定防御力: ",
+ Editor_Estimated_WorkSpeed: "推定クラフト速度: ",
+ Editor_IV: "才能 (個体値)",
+ Editor_IV_HP: "HP: ",
+ Editor_IV_DEF: "防御力: ",
+ Editor_IV_ATK: "攻撃力: ",
+ Editor_IV_MELEE: "近接攻撃力 (Unused): ",
+ Editor_Souls_Upgrade: "パル強化 (力の石像)",
+ Editor_Souls_HP: "HP: ",
+ Editor_Souls_ATK: "攻撃力: ",
+ Editor_Souls_DEF: "防御力: ",
+ Editor_Souls_CraftSpeed: "クラフト速度: ",
+ Editor_Condenser: "パル濃縮",
+ Editor_Condenser_Rank: "濃縮ランク: ",
+ Editor_Passive_Skills: "パッシブスキル",
+ Editor_Select_Skill: "スキルを追加",
+ Editor_Equipped_Skills: "装備中のアクティブスキル",
+ Editor_Skill_ATK: "攻撃力: ",
+ Editor_Skill_CD: "CT: ",
+ Editor_Skill_EL: "属性: ",
+ Editor_Mastered_Skills: "習得したアクティブスキル(パルをレベルアップすると自動的に追加されるスキル)",
- Editor_Btn_1: "データをダンプ",
- Editor_Btn_2: "パルを複製",
- Editor_Btn_3: "パルを削除",
- Editor_Btn_4: "パルを取り戻す",
- Editor_Btn_5: "ワーカーの病気をクリア",
- Editor_Btn_6: "パルを復活",
+ Editor_Btn_Export_Data: "データをダンプ",
+ Editor_Btn_Dupe_Pal: "パルを複製",
+ Editor_Btn_Delete_Pal: "パルを削除",
+ Editor_Btn_Retrieve_Pal: "パルを取り戻す",
+ Editor_Btn_Heal_Pal: "ワーカーの病気をクリア",
+ Editor_Btn_Revive_Pal: "パルを復活",
- PalList_1: "パルリスト",
+ PalList_Text: "パルリスト",
- PlayerList_1: "プレイヤーリスト",
- PlayerList_2: "観賞用ケージのロックを解除する: ",
+ PlayerList_Text: "プレイヤーリスト",
+ PlayerList_Viewing_Cage: "観賞用ケージのロックを解除する: ",
- PlayerList_Btn_1: "ベースキャンプ パル",
+ PlayerList_Base_Pal: "拠点パル",
- TopBar_Btn_1: "変更を保存",
- TopBar_Btn_2: "セーブをリロード",
- TopBar_Btn_3: "メインページに戻る",
- TopBar_Btn_4: "Show Out of Box Pal",
- TopBar_Btn_5: "Toggle Ghost Pal",
- TopBar_Btn_6: "無効なオプションを非表示",
+ TopBar_Btn_Save: "変更を保存",
+ TopBar_Btn_Reload: "セーブをリロード",
+ TopBar_Btn_Main_Page: "メインページに戻る",
+ TopBar_Btn_Pal_OOB: "ボックス外パルを表示",
+ TopBar_Btn_Pal_Ghost: "ゴーストパルを表示",
+ TopBar_Btn_Invalid_Options: "無効なオプションを非表示",
- TopBar_1: "所有者のプレイヤーパルコンテナにないパルを表示します。例:観賞用ケージ、他の人に取られたパル。",
- TopBar_2: "ゲーム内で見つからないゴーストパルを表示します。例:売却された、落とされた、解体されたパル。",
- TopBar_3: "無効なドロップダウンメニューオプションを非表示にします。"
+ TopBar_Pal_OOB_Tooltips: "所有者のプレイヤーパルコンテナにないパルを表示します。例:観賞用ケージ、他の人に取られたパル。",
+ TopBar_Pal_Ghost_Tooltips: "ゲーム内で見つからないゴーストパルを表示します。例:売却された、落とされた、解体されたパル。",
+ TopBar_Invalid_Options_Tooltips: "無効なドロップダウンメニューオプションを非表示にします。"
};
diff --git a/frontend/palworld-pal-editor-webui/src/i18n/zh-CN.js b/frontend/palworld-pal-editor-webui/src/i18n/zh-CN.js
index 47dc34d..7c11617 100644
--- a/frontend/palworld-pal-editor-webui/src/i18n/zh-CN.js
+++ b/frontend/palworld-pal-editor-webui/src/i18n/zh-CN.js
@@ -1,81 +1,81 @@
export default {
- AuthView_1: "你好! 似乎你在运行这个工具时设置了认证密码 🔐。",
- AuthView_2: "你现在需要输入正确的密码,以进行后续操作:",
- AuthView_Btn_1: "解锁",
+ AuthView_PW_Prompt_1: "你好! 似乎你在运行这个工具时设置了认证密码 🔐。",
+ AuthView_PW_Prompt_2: "你现在需要输入正确的密码,以进行后续操作:",
+ AuthView_BTN_Unlock: "解锁",
- EntryView_1: "你好呀!",
- EntryView_2: " > 感谢你下载并使用Palworld Pal Editor!",
- EntryView_3:
+ EntryView_Greet_1: "你好呀!",
+ EntryView_Greet_2: " > 感谢你下载并使用Palworld Pal Editor!",
+ EntryView_Greet_3:
" > 如果你正在以WebUI模式,或远程访问Docker容器的方式使用这个工具,请考虑设置密码,以防止未经授权的远程访问。",
- EntryView_4: " > 如果你在使用这个工具的途中遇到了任何问题,可以访问项目的",
- EntryView_5: " 页面.",
- EntryView_6: " > 如果你喜欢这个工具,并且希望赞助,可以考虑查看我的",
- EntryView_7:
+ EntryView_Greet_4: " > 如果你在使用这个工具的途中遇到了任何问题,可以访问项目的",
+ EntryView_Greet_5: " 页面。",
+ EntryView_Greet_6: " > 如果你喜欢这个工具,并且希望赞助,可以考虑查看我的",
+ EntryView_Note_1:
" > 如果你是第一次使用这个工具,你需要手动输入或选择 (仅限GUI模式) 正确的存档路径,即包含 Level.sav 文件的那个文件夹的目录。",
- EntryView_8:
+ EntryView_Note_2:
" > 在成功载入存档后,存档的路径将会被保存,并在下次使用时自动为您输入。",
- EntryView_9:
+ EntryView_Note_3:
" > 如果你在通过Docker容器的方式使用这个工具,请确保已经正确的映射了存档的路径,并且容器具有合适的文件访问权限。这里你只需要输入映射的路径。",
- EntryView_Btn_1: "选择路径",
- EntryView_Btn_2: "载入存档",
+ EntryView_BTN_Path_Picker: "选择路径",
+ EntryView_BTN_Load: "载入存档",
- Editor_1: "这只帕鲁很可能不存在于游戏中",
- Editor_2: "基础信息",
- Editor_3: "种族: ",
- Editor_4: "昵称: ",
- Editor_5: "性别: ",
- Editor_6: "特殊种: ", // 不知道用什么词
- Editor_7: "帕鲁对象 ID: ",
- Editor_8: "帕鲁工会 ID: ",
- Editor_9: "帕鲁容器位置: ",
- Editor_10: "所有者: ",
- Editor_11: "无 (基地打工人)",
- Editor_12: "推算的 最大生命值: ",
- Editor_13: "推算的 攻击力: ",
- Editor_14: "推算的 防御力: ",
- Editor_15: "推算的 制作速度: ",
- Editor_16: "个体值",
- Editor_17: "生命值: ",
- Editor_18: "防御力: ",
- Editor_19: "攻击力: ",
- Editor_20: "近战 (未使用): ",
- Editor_21: "帕鲁魂强化等级 (力量雕像)",
- Editor_22: "生命值: ",
- Editor_23: "攻击力: ",
- Editor_24: "防御力: ",
- Editor_25: "制作速度: ",
- Editor_26: "帕鲁浓缩机等级",
- Editor_27: "浓缩机等级: ",
- Editor_28: "被动技能",
- Editor_29: "选择添加的技能",
- Editor_30: "装备的主动技能",
- Editor_31: "攻击力: ",
- Editor_32: "冷却时间: ",
- Editor_33: "元素: ",
- Editor_34: "学会的主动技能 (升级帕鲁时对应的技能会被自动添加)",
+ Editor_Note_Ghost_Pal: "这只帕鲁很可能不存在于游戏中",
+ Editor_Basic_Info: "基础信息",
+ Editor_Species: "种族: ",
+ Editor_Nickname: "昵称: ",
+ Editor_Gender: "性别: ",
+ Editor_Variant: "特殊种: ", // 不知道用什么词
+ Editor_Pal_ID: "帕鲁对象 ID: ",
+ Editor_Pal_Guild_ID: "帕鲁工会 ID: ",
+ Editor_Pal_Slot: "帕鲁容器位置: ",
+ Editor_Pal_Owner: "所有者: ",
+ Editor_Pal_No_Owner: "无 (基地打工人)",
+ Editor_Estimated_HP: "估算的最大生命值: ",
+ Editor_Estimated_ATK: "估算的攻击力: ",
+ Editor_Estimated_DEF: "估算的防御力: ",
+ Editor_Estimated_WorkSpeed: "估算的制作速度: ",
+ Editor_IV: "个体值",
+ Editor_IV_HP: "生命值: ",
+ Editor_IV_DEF: "防御力: ",
+ Editor_IV_ATK: "攻击力: ",
+ Editor_IV_MELEE: "近战 (未使用): ",
+ Editor_Souls_Upgrade: "帕鲁强化 (力量雕像)",
+ Editor_Souls_HP: "生命值: ",
+ Editor_Souls_ATK: "攻击力: ",
+ Editor_Souls_DEF: "防御力: ",
+ Editor_Souls_CraftSpeed: "制作速度: ",
+ Editor_Condenser: "帕鲁浓缩机",
+ Editor_Condenser_Rank: "浓缩等级: ",
+ Editor_Passive_Skills: "被动技能",
+ Editor_Select_Skill: "选择添加的技能",
+ Editor_Equipped_Skills: "装备的主动技能",
+ Editor_Skill_ATK: "攻击力: ",
+ Editor_Skill_CD: "冷却时间: ",
+ Editor_Skill_EL: "元素: ",
+ Editor_Mastered_Skills: "学会的主动技能 (升级帕鲁时对应的技能会被自动添加)",
- Editor_Btn_1: "导出数据",
- Editor_Btn_2: "复制帕鲁",
- Editor_Btn_3: "删除帕鲁",
- Editor_Btn_4: "取回帕鲁",
- Editor_Btn_5: "消除工作疾病",
- Editor_Btn_6: "复活帕鲁",
+ Editor_Btn_Export_Data: "导出数据",
+ Editor_Btn_Dupe_Pal: "复制帕鲁",
+ Editor_Btn_Delete_Pal: "删除帕鲁",
+ Editor_Btn_Retrieve_Pal: "取回帕鲁",
+ Editor_Btn_Heal_Pal: "消除工作疾病",
+ Editor_Btn_Revive_Pal: "复活帕鲁",
- PalList_1: "帕鲁列表",
+ PalList_Text: "帕鲁列表",
- PlayerList_1: "玩家列表",
- PlayerList_2: "为玩家解锁观赏笼: ",
+ PlayerList_Text: "玩家列表",
+ PlayerList_Viewing_Cage: "为玩家解锁观赏笼: ",
- PlayerList_Btn_1: "基地帕鲁",
+ PlayerList_Base_Pal: "基地帕鲁",
- TopBar_Btn_1: "保存更改",
- TopBar_Btn_2: "重新载入存档",
- TopBar_Btn_3: "返回主页",
- TopBar_Btn_4: "显示不在身边的帕鲁",
- TopBar_Btn_5: "显示不存在的帕鲁",
- TopBar_Btn_6: "隐藏不可用的选项",
+ TopBar_Btn_Save: "保存更改",
+ TopBar_Btn_Reload: "重新载入存档",
+ TopBar_Btn_Main_Page: "返回主页",
+ TopBar_Btn_Pal_OOB: "显示不在身边的帕鲁",
+ TopBar_Btn_Pal_Ghost: "显示不存在的帕鲁",
+ TopBar_Btn_Invalid_Options: "隐藏不可用的选项",
- TopBar_1: "显示不在玩家的帕鲁容器中的帕鲁,即,观赏笼中的帕鲁,或被其他人拿走的帕鲁。",
- TopBar_2: "显示不存在的帕鲁,即游戏中找不到的帕鲁,比如,你已将其出售,丢弃,宰杀。",
- TopBar_3: "隐藏菜单中的不可用选项."
+ TopBar_Pal_OOB_Tooltips: "显示不在玩家的帕鲁容器中的帕鲁,即,观赏笼中的帕鲁,或被其他人拿走的帕鲁。",
+ TopBar_Pal_Ghost_Tooltips: "显示不存在的帕鲁,即游戏中找不到的帕鲁,比如,你已将其出售,丢弃,宰杀。",
+ TopBar_Invalid_Options_Tooltips: "隐藏菜单中的不可用选项。"
};
\ No newline at end of file
diff --git a/frontend/palworld-pal-editor-webui/src/stores/paleditor.js b/frontend/palworld-pal-editor-webui/src/stores/paleditor.js
index 3a46a01..d3c80e9 100644
--- a/frontend/palworld-pal-editor-webui/src/stores/paleditor.js
+++ b/frontend/palworld-pal-editor-webui/src/stores/paleditor.js
@@ -8,8 +8,8 @@ export const usePalEditorStore = defineStore("paleditor", () => {
this.id = obj.id;
this.name = obj.name;
this.hasViewingCage = obj.hasViewingCage;
- this.OtomoCharacterContainerId = obj.OtomoCharacterContainerId
- this.PalStorageContainerId = obj.PalStorageContainerId
+ this.OtomoCharacterContainerId = obj.OtomoCharacterContainerId;
+ this.PalStorageContainerId = obj.PalStorageContainerId;
this.pals = new Map();
}
}
@@ -237,15 +237,8 @@ export const usePalEditorStore = defineStore("paleditor", () => {
const PAL_STATIC_DATA_LIST = ref([]);
const I18nList = ref({});
- // const TranslationKeyMap = ref({
- // en: en,
- // "zh-CN": cn,
- // "zh-TW": tw,
- // ja: ja
- // })
-
- const TranslationKeyMap = ref({})
- const I18nLoadingPromises = {}
+ const TranslationKeyMap = ref({});
+ const I18nLoadingPromises = {};
// flags
const LOADING_FLAG = ref(false);
@@ -257,9 +250,11 @@ export const usePalEditorStore = defineStore("paleditor", () => {
const UPDATE_PAL_RESELECT_CTR = ref(0);
const SHOW_UNREF_PAL_FLAG = ref(false);
const SHOW_OOB_PAL_FLAG = ref(true);
- const HIDE_INVALID_OPTIONS = ref(true)
+ const HIDE_INVALID_OPTIONS = ref(true);
+
+ const PAL_LIST_SEARCH_KEYWORD = ref("");
- const PAL_LIST_SEARCH_KEYWORD = ref("")
+ const IS_PAL_SAVE_PATH = ref(false);
// data
const BASE_PAL_MAP = ref(new Map());
@@ -282,8 +277,11 @@ export const usePalEditorStore = defineStore("paleditor", () => {
const I18n = ref(localStorage.getItem("PAL_I18n"));
const PAL_GAME_SAVE_PATH = ref(localStorage.getItem("PAL_GAME_SAVE_PATH"));
const HAS_PASSWORD = ref(false);
- const FilePickerAvailable = ref(false)
const PAL_WRITE_BACK_PATH = ref("");
+ const PATH_CONTEXT = ref(new Map());
+
+ const SHOW_FILE_PICKER = ref(false);
+ const PAL_FILE_PICKER_PATH = ref(PAL_GAME_SAVE_PATH.value);
// auth
let auth_token = "";
@@ -437,7 +435,7 @@ export const usePalEditorStore = defineStore("paleditor", () => {
if (response === false) return;
if (response.status == 0) {
- I18nList.value = response.data.I18nList
+ I18nList.value = response.data.I18nList;
if (!I18n.value || !I18nList.value[I18n.value]) {
I18n.value = response.data.I18n;
}
@@ -446,8 +444,6 @@ export const usePalEditorStore = defineStore("paleditor", () => {
PAL_GAME_SAVE_PATH.value = response.data.Path;
}
HAS_PASSWORD.value = response.data.HasPassword;
- FilePickerAvailable.value = response.data.FilePickerAvailable
- // console.log(I18n.value, PAL_GAME_SAVE_PATH.value, HAS_PASSWORD.value, IS_GUI.value);
} else if (response.status == 2) {
alert("Unauthorized Access, Please Login. ");
IS_LOCKED.value = true;
@@ -459,22 +455,79 @@ export const usePalEditorStore = defineStore("paleditor", () => {
if (!no_set_loading_flag) LOADING_FLAG.value = false;
}
+ function update_path_picker_result(data) {
+ IS_PAL_SAVE_PATH.value = data.isPalDir;
+ PAL_FILE_PICKER_PATH.value = data.currentPath;
+ PATH_CONTEXT.value = new Map(Object.entries(data.children));
+ SHOW_FILE_PICKER.value = true;
+ }
+
async function show_file_picker() {
- if (!FilePickerAvailable.value) {
- alert("This only works in GUI mode!")
- return;
+ let no_set_loading_flag = LOADING_FLAG.value;
+ if (!no_set_loading_flag) LOADING_FLAG.value = true;
+
+ let response = undefined;
+ if (PAL_GAME_SAVE_PATH.value) {
+ response = await POST("/api/save/path", {
+ path: PAL_GAME_SAVE_PATH.value,
+ });
+ if (response.status != 0) {
+ PAL_GAME_SAVE_PATH.value = undefined;
+ localStorage.removeItem("PAL_GAME_SAVE_PATH");
+ response = await GET("/api/save/path");
+ }
+ } else {
+ response = await GET("/api/save/path");
+ }
+
+ if (response === false) return;
+
+ if (response.status == 0) {
+ update_path_picker_result(response.data);
+ } else if (response.status == 2) {
+ alert("Unauthorized Access, Please Login. ");
+ IS_LOCKED.value = true;
+ reset();
+ } else {
+ alert(`- show_file_picker - Error occured: ${response.msg}`);
+ }
+
+ if (!no_set_loading_flag) LOADING_FLAG.value = false;
+ }
+
+ async function path_back() {
+ let no_set_loading_flag = LOADING_FLAG.value;
+ if (!no_set_loading_flag) LOADING_FLAG.value = true;
+
+ const response = await PATCH("/api/save/path");
+
+ if (response === false) return;
+
+ if (response.status == 0) {
+ update_path_picker_result(response.data);
+ } else if (response.status == 2) {
+ alert("Unauthorized Access, Please Login. ");
+ IS_LOCKED.value = true;
+ reset();
+ } else {
+ alert(`- show_file_picker - Error occured: ${response.msg}`);
}
-
+
+ if (!no_set_loading_flag) LOADING_FLAG.value = false;
+ }
+
+ async function update_picker_result(path) {
let no_set_loading_flag = LOADING_FLAG.value;
if (!no_set_loading_flag) LOADING_FLAG.value = true;
- const response = await GET("/api/save/file_picker");
+ const response = await POST("/api/save/path", {
+ path: path,
+ });
if (response === false) return;
if (response.status == 0) {
- if (response.data.path)
- PAL_GAME_SAVE_PATH.value = response.data.path
+ update_path_picker_result(response.data);
} else if (response.status == 2) {
alert("Unauthorized Access, Please Login. ");
IS_LOCKED.value = true;
@@ -502,8 +555,7 @@ export const usePalEditorStore = defineStore("paleditor", () => {
});
fetchPlayerPal(PAL_BASE_WORKER_BTN.value);
}
- if (!IS_LOCKED.value)
- fetchStaticData();
+ if (!IS_LOCKED.value) fetchStaticData();
} else if (response.status == 2) {
alert("Unauthorized Access, Please Login. ");
IS_LOCKED.value = true;
@@ -587,33 +639,36 @@ export const usePalEditorStore = defineStore("paleditor", () => {
}
function getTranslatedText(translationKey) {
- const I18nKey = I18n.value || "en"
+ const I18nKey = I18n.value || "en";
if (TranslationKeyMap.value[I18nKey]) {
- const i18nData = TranslationKeyMap.value[I18n.value]
- return i18nData[translationKey] || "I18N_MISSING"
+ const i18nData = TranslationKeyMap.value[I18n.value];
+ return i18nData[translationKey] || "I18N_MISSING";
}
if (!I18nLoadingPromises[I18nKey]) {
I18nLoadingPromises[I18nKey] = import(`../i18n/${I18nKey}.js`)
- .then(module => {
- console.log(`${I18nKey} imported`)
- TranslationKeyMap.value[I18nKey] = module.default
- delete I18nLoadingPromises[I18nKey]
+ .then((module) => {
+ console.log(`${I18nKey} imported`);
+ TranslationKeyMap.value[I18nKey] = module.default;
+ delete I18nLoadingPromises[I18nKey];
})
- .catch(error => {
- console.error(`Failed to load UI language file for ${I18nKey}, fallback to "en":`, error);
+ .catch((error) => {
+ console.error(
+ `Failed to load UI language file for ${I18nKey}, fallback to "en":`,
+ error
+ );
if (TranslationKeyMap.value["en"]) {
- TranslationKeyMap.value[I18nKey] = TranslationKeyMap.value["en"]
- delete I18nLoadingPromises[I18nKey]
+ TranslationKeyMap.value[I18nKey] = TranslationKeyMap.value["en"];
+ delete I18nLoadingPromises[I18nKey];
} else {
- import(`../i18n/en.js`).then(module => {
- console.log(`en imported`)
- TranslationKeyMap.value[I18nKey] = module.default
- delete I18nLoadingPromises[I18nKey]
- })
+ import(`../i18n/en.js`).then((module) => {
+ console.log(`en imported`);
+ TranslationKeyMap.value[I18nKey] = module.default;
+ delete I18nLoadingPromises[I18nKey];
+ });
}
- })
+ });
}
return I18nLoadingPromises[I18nKey].then(() => {
@@ -752,8 +807,6 @@ export const usePalEditorStore = defineStore("paleditor", () => {
await fetchStaticData();
SAVE_LOADED_FLAG.value = true;
-
- // save path to localstorage
localStorage.setItem("PAL_GAME_SAVE_PATH", PAL_GAME_SAVE_PATH.value);
PAL_WRITE_BACK_PATH.value = PAL_GAME_SAVE_PATH.value;
} else if (response.status == 2) {
@@ -1012,10 +1065,10 @@ export const usePalEditorStore = defineStore("paleditor", () => {
function isFilteredPal(pal) {
if (!SHOW_UNREF_PAL_FLAG.value && pal.Is_Unref_Pal) {
- return true
+ return true;
}
if (SHOW_UNREF_PAL_FLAG.value && !pal.Is_Unref_Pal) {
- return true
+ return true;
}
// if (SHOW_OOB_PAL_FLAG.value && pal.in_owner_palbox) {
@@ -1023,15 +1076,19 @@ export const usePalEditorStore = defineStore("paleditor", () => {
// }
if (!SHOW_OOB_PAL_FLAG.value && !pal.in_owner_palbox) {
- return true
+ return true;
}
- if (PAL_LIST_SEARCH_KEYWORD.value &&
- !pal.DisplayName.toLowerCase().includes(PAL_LIST_SEARCH_KEYWORD.value.toLowerCase())) {
- return true
+ if (
+ PAL_LIST_SEARCH_KEYWORD.value &&
+ !pal.DisplayName.toLowerCase().includes(
+ PAL_LIST_SEARCH_KEYWORD.value.toLowerCase()
+ )
+ ) {
+ return true;
}
-
- return false
+
+ return false;
}
function getNextElement(map, currKey) {
@@ -1161,8 +1218,8 @@ export const usePalEditorStore = defineStore("paleditor", () => {
function displayPalElement(DataAccessKey) {
const els = PAL_STATIC_DATA.value[DataAccessKey]?.Elements;
- if (!els) return
-
+ if (!els) return;
+
let str = "";
for (let e of els) {
str += displayElement(e);
@@ -1188,11 +1245,11 @@ export const usePalEditorStore = defineStore("paleditor", () => {
function skillIcon(atk) {
if (ACTIVE_SKILLS.value[atk]?.IsUniqueSkill) return "✨";
if (ACTIVE_SKILLS.value[atk]?.HasSkillFruit) return "🍐";
- return ""
+ return "";
}
function displayRating(rating) {
- if (rating === undefined) return ""
+ if (rating === undefined) return "";
if (rating < 0) return "🔴";
if (rating > 1) return "🟡";
return "⚪";
@@ -1214,12 +1271,16 @@ export const usePalEditorStore = defineStore("paleditor", () => {
SHOW_UNREF_PAL_FLAG,
SHOW_OOB_PAL_FLAG,
HIDE_INVALID_OPTIONS,
-
+
PAL_LIST_SEARCH_KEYWORD,
IS_LOCKED,
HAS_PASSWORD,
- FilePickerAvailable,
+
+ PATH_CONTEXT,
+ SHOW_FILE_PICKER,
+ PAL_FILE_PICKER_PATH,
+ IS_PAL_SAVE_PATH,
HAS_WORKING_PAL_FLAG,
BASE_PAL_BTN_CLK_FLAG,
@@ -1235,7 +1296,7 @@ export const usePalEditorStore = defineStore("paleditor", () => {
ACTIVE_SKILLS_LIST,
getTranslatedText,
-
+
isElementInViewport,
isFilteredPal,
@@ -1260,6 +1321,8 @@ export const usePalEditorStore = defineStore("paleditor", () => {
login,
auth,
- show_file_picker
+ show_file_picker,
+ update_picker_result,
+ path_back,
};
});
diff --git a/frontend/palworld-pal-editor-webui/src/views/AuthView.vue b/frontend/palworld-pal-editor-webui/src/views/AuthView.vue
index 97236bb..9ad8ead 100644
--- a/frontend/palworld-pal-editor-webui/src/views/AuthView.vue
+++ b/frontend/palworld-pal-editor-webui/src/views/AuthView.vue
@@ -10,13 +10,13 @@ const PW = ref("")
-
{{ palStore.getTranslatedText("AuthView_1") }}
-
{{ palStore.getTranslatedText("AuthView_2") }}
+
{{ palStore.getTranslatedText("AuthView_PW_Prompt_1") }}
+
{{ palStore.getTranslatedText("AuthView_PW_Prompt_2") }}
diff --git a/frontend/palworld-pal-editor-webui/src/views/EntryView.vue b/frontend/palworld-pal-editor-webui/src/views/EntryView.vue
index b5cb546..af392a7 100644
--- a/frontend/palworld-pal-editor-webui/src/views/EntryView.vue
+++ b/frontend/palworld-pal-editor-webui/src/views/EntryView.vue
@@ -1,41 +1,43 @@
+
-
{{ palStore.getTranslatedText('EntryView_1') }}
-
{{ palStore.getTranslatedText('EntryView_2') }}
-
{{ palStore.getTranslatedText('EntryView_3') }}
+
{{ palStore.getTranslatedText('EntryView_Greet_1') }}
+
{{ palStore.getTranslatedText('EntryView_Greet_2') }}
+
{{ palStore.getTranslatedText('EntryView_Greet_3') }}
-
{{ palStore.getTranslatedText('EntryView_4') }}
+
{{ palStore.getTranslatedText('EntryView_Greet_4') }}
GitHub
- {{ palStore.getTranslatedText('EntryView_5') }}
+ {{ palStore.getTranslatedText('EntryView_Greet_5') }}
-
{{ palStore.getTranslatedText('EntryView_6') }}
+
{{ palStore.getTranslatedText('EntryView_Greet_6') }}
ko-fi
- {{ palStore.getTranslatedText('EntryView_5') }}
+ {{ palStore.getTranslatedText('EntryView_Greet_5') }}
-
{{ palStore.getTranslatedText('EntryView_7') }}
-
{{ palStore.getTranslatedText('EntryView_8') }}
-
{{ palStore.getTranslatedText('EntryView_9') }}
+
{{ palStore.getTranslatedText('EntryView_Note_1') }}
+
{{ palStore.getTranslatedText('EntryView_Note_2') }}
+
{{ palStore.getTranslatedText('EntryView_Note_3') }}
{{ palStore.PAL_GAME_SAVE_PATH }}
-
diff --git a/pypi_publish.ps1 b/pypi_publish.ps1
index 64545ba..515d2cc 100644
--- a/pypi_publish.ps1
+++ b/pypi_publish.ps1
@@ -29,7 +29,8 @@ cd ".\frontend\palworld-pal-editor-webui"
cd "..\..\"
# Move the build directory
Remove-Item ".\src\palworld_pal_editor\webui" -Recurse -Force
-Move-Item -Path ".\frontend\palworld-pal-editor-webui\dist" -Destination ".\src\palworld_pal_editor\webui" -Force
+New-Item -Path ".\src\palworld_pal_editor\webui" -ItemType "directory"
+Move-Item -Path ".\frontend\palworld-pal-editor-webui\dist\*" -Destination ".\src\palworld_pal_editor\webui" -Force
# Determine the appropriate Python command
diff --git a/pyproject.toml b/pyproject.toml
index 2e1fc90..d8e7753 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,7 +12,7 @@ keywords = ["palworld", "editor", "pal"]
license = {file = "LICENSE"}
requires-python = ">=3.11"
readme = "README.md"
-version = "0.7.0"
+version = "0.8.0"
dependencies = [
"setuptools==69.1.0",
"palworld_save_tools==0.22.0",
diff --git a/setup_and_run.ps1 b/setup_and_run.ps1
index ca9f34d..f5aa925 100644
--- a/setup_and_run.ps1
+++ b/setup_and_run.ps1
@@ -29,7 +29,8 @@ cd ".\frontend\palworld-pal-editor-webui"
cd "..\..\"
# Move the build directory
Remove-Item ".\src\palworld_pal_editor\webui" -Recurse -Force
-Move-Item -Path ".\frontend\palworld-pal-editor-webui\dist" -Destination ".\src\palworld_pal_editor\webui" -Force
+New-Item -Path ".\src\palworld_pal_editor\webui" -ItemType "directory"
+Move-Item -Path ".\frontend\palworld-pal-editor-webui\dist\*" -Destination ".\src\palworld_pal_editor\webui" -Force
# Determine the appropriate Python command
@@ -49,15 +50,9 @@ if ($majorVersion -lt 3 -or ($majorVersion -eq 3 -and $minorVersion -lt 11)) {
Write-Host "Using $($PYTHON_CMD) (version $($majorVersion).$($minorVersion))"
-# Create and activate virtual environment
& $PYTHON_CMD -m venv venv
. .\venv\Scripts\Activate.ps1
-# Install dependencies
pip install -r requirements.txt
-
-# Install your package in editable mode
pip install -e .
-
-# Run your package in interactive mode
python -m palworld_pal_editor $args
diff --git a/setup_and_run.sh b/setup_and_run.sh
index 11b1156..23517e1 100755
--- a/setup_and_run.sh
+++ b/setup_and_run.sh
@@ -1,28 +1,3 @@
-#!/bin/bash
-
-# # modified for the use of docker image
-# # Default values
-# PY_INTERACTIVE_MODE=""
-# LANG=""
-# PORT=""
-# MODE=""
-# SAVE_PATH=""
-# PASSWORD=""
-
-# # Process command-line arguments
-# while [[ "$#" -gt 0 ]]; do
-# case $1 in
-# --i) PY_INTERACTIVE_MODE="-i"; shift ;;
-# --lang) LANG="--lang \"$2\""; shift ;;
-# --port) PORT="--port \"$2\""; shift ;;
-# --mode) MODE="--mode \"$2\""; shift ;;
-# --path) SAVE_PATH="--path \"$2\""; shift ;;
-# --password) PASSWORD="--password \"$2\""; shift ;;
-# *) echo "Unknown parameter passed: $1"; exit 1 ;;
-# esac
-# shift
-# done
-
if which npm > /dev/null; then
NPM_CMD=npm
else
@@ -59,24 +34,13 @@ fi
echo "Using ${PYTHON_CMD} (version ${PYTHON_VERSION})"
-# Create a virtual environment named 'venv' (skip if already created)
${PYTHON_CMD} -m venv venv
-# Activate the virtual environment
source venv/bin/activate
-# Install packages from requirements.txt
pip install -r requirements.txt
-
-# Install your package in editable mode
pip install -e .
-# COMMAND_ARGS="$MODE $LANG $PORT $SAVE_PATH $PASSWORD"
-
-# Log the arguments before invoking Python
-# echo "Running command: python $PY_INTERACTIVE_MODE -m palworld_pal_editor $COMMAND_ARGS"
-
-# Use eval to correctly handle spaces in paths and other arguments
launch_command="python -m palworld_pal_editor ${@}"
echo "Launching $launch_command..."
eval $launch_command
\ No newline at end of file
diff --git a/src/palworld_pal_editor/__main__.py b/src/palworld_pal_editor/__main__.py
index e4827fd..4abde2b 100644
--- a/src/palworld_pal_editor/__main__.py
+++ b/src/palworld_pal_editor/__main__.py
@@ -18,16 +18,19 @@ def setup_config_from_args():
parser = argparse.ArgumentParser(description="Palworld Pal Editor, developed by _connlost with ❤.")
parser.add_argument('--lang', type=str, help=f'Language for the application. options: {", ".join(DataProvider.get_i18n_options())}', default=Config.i18n)
- parser.add_argument('--debug', action='store_true', help='Debug option, only mimics interactive mode for VSCode debug launch.', default=Config.debug)
parser.add_argument('--path', type=str, help='Path to the save folder.', default=Config.path)
parser.add_argument('--mode', type=str, help='Running Mode, options: cli, gui, web', default=Config.mode)
parser.add_argument('--port', type=int, help='Port used for WebUI mode.', default=Config.port)
parser.add_argument('--password', type=str, help='Password for WebUI.', default=Config.password)
+
+ parser.add_argument('--debug', action='store_true', help='The debug option, only for VSCode debug launch. (Never saved to config.json)')
+ parser.add_argument('--nocli', action='store_true', help='Disable Interactive CLI on GUI/WEB mode. (Never saved to config.json)')
args = parser.parse_args()
try:
Config.set_configs({
- "debug": args.debug,
+ "debug": args.debug, # never saved to config.json
+ "nocli": args.nocli, # never saved to config.json
"path": args.path,
"mode": args.mode,
"port": args.port,
@@ -58,13 +61,12 @@ def main():
LOGGER.info(Config.__str__())
LOGGER.info(f"Running Palworld-Pal-Editor version: {VERSION}")
match Config.mode:
- # case "cli": globals().update(cli_main())
case "cli": cli_main()
case "gui":
- InteractThread.load()
+ if not Config.nocli: InteractThread.load()
gui_main()
case "web":
- InteractThread.load()
+ if not Config.nocli: InteractThread.load()
webui_main()
if __name__ == "__main__":
diff --git a/src/palworld_pal_editor/api/auth.py b/src/palworld_pal_editor/api/auth.py
index 94ce576..c91b9dc 100644
--- a/src/palworld_pal_editor/api/auth.py
+++ b/src/palworld_pal_editor/api/auth.py
@@ -1,7 +1,7 @@
from flask import Blueprint, jsonify, request
from flask_jwt_extended import create_access_token, jwt_required
from werkzeug.security import check_password_hash
-from palworld_pal_editor.api.util import reply
+from palworld_pal_editor.utils.util import reply
from palworld_pal_editor.config import Config
diff --git a/src/palworld_pal_editor/api/pal.py b/src/palworld_pal_editor/api/pal.py
index 0ff9cb1..5c9d384 100644
--- a/src/palworld_pal_editor/api/pal.py
+++ b/src/palworld_pal_editor/api/pal.py
@@ -3,7 +3,7 @@
from flask_jwt_extended import jwt_required
import traceback
-from palworld_pal_editor.api.util import reply
+from palworld_pal_editor.utils.util import reply
from palworld_pal_editor.core import SaveManager, PalEntity
from palworld_pal_editor.utils import LOGGER
diff --git a/src/palworld_pal_editor/api/player.py b/src/palworld_pal_editor/api/player.py
index 85c00e1..2d612a5 100644
--- a/src/palworld_pal_editor/api/player.py
+++ b/src/palworld_pal_editor/api/player.py
@@ -1,7 +1,7 @@
import traceback
from flask import Blueprint, jsonify, request
from flask_jwt_extended import jwt_required
-from palworld_pal_editor.api.util import reply
+from palworld_pal_editor.utils.util import reply
from palworld_pal_editor.core import SaveManager
from palworld_pal_editor.utils import LOGGER, DataProvider
diff --git a/src/palworld_pal_editor/api/save.py b/src/palworld_pal_editor/api/save.py
index f412e3a..2362faf 100644
--- a/src/palworld_pal_editor/api/save.py
+++ b/src/palworld_pal_editor/api/save.py
@@ -1,3 +1,5 @@
+import os
+from pathlib import Path
import platform
import traceback
from flask import Blueprint, jsonify, request
@@ -6,22 +8,13 @@
from palworld_pal_editor.config import PROGRAM_PATH, Config
from palworld_pal_editor.core import SaveManager
from palworld_pal_editor.utils import LOGGER, DataProvider
-from palworld_pal_editor.api.util import reply
+from palworld_pal_editor.utils.util import get_path_context, reply
save_blueprint = Blueprint("save", __name__)
@save_blueprint.route("/fetch_config", methods=["GET"])
def fetch_config():
- tk_status = False
- if Config.mode == "gui" and platform.system() != "Darwin":
- try:
- import tkinter as tk
- tk_status = True
- except:
- trace = traceback.format_exc()
- LOGGER.error(f"Hiding File Picker Since It Will Not Work: {trace}")
-
return reply(
0,
{
@@ -29,7 +22,6 @@ def fetch_config():
"I18nList": DataProvider.get_i18n_map(),
"Path": Config.path,
"HasPassword": Config.password != None,
- "FilePickerAvailable": Config.mode == "gui" and tk_status
},
)
@@ -113,20 +105,6 @@ def get_active_skills():
return reply(0, {"dict": atk_dict, "arr": atk_arr})
-# def displayElement(element):
-# elementEmojis = {
-# 'Water': "💧",
-# 'Fire': "🔥",
-# 'Dragon': "🐉",
-# 'Grass': "☘️",
-# 'Ground': "🪨",
-# 'Ice': "❄️",
-# 'Electric': "⚡",
-# 'Neutral': "😐",
-# 'Dark': "🌑"
-# }
-# return elementEmojis.get(element) or "❓"
-
@save_blueprint.route("/i18n", methods=["PATCH"])
# @jwt_required()
def update_i18n():
@@ -160,27 +138,60 @@ def get_pal_data():
pal_arr.append(data)
return reply(0, {"dict": pal_dict, "arr": pal_arr})
-@save_blueprint.route("/file_picker", methods=["GET"])
+
+@save_blueprint.route("/path", methods=["GET"])
+@jwt_required()
+def get_path():
+ try:
+ current_path = Path(Config.path).resolve()
+ if not current_path.exists():
+ raise Exception(f"Path {current_path} not exist.")
+ except:
+ pal_local_path = Path(os.environ.get('LOCALAPPDATA', "/")) / 'Pal' / 'Saved' / 'SaveGames'
+ if pal_local_path.exists():
+ current_path = pal_local_path
+ else:
+ current_path = PROGRAM_PATH
+
+ old_path = Config.path
+ Config.path = str(current_path)
+
+ try:
+ return reply(0, get_path_context(current_path))
+ except:
+ Config.path = old_path
+ LOGGER.error(traceback.format_exc())
+ return reply(1, msg=f"Error, cannot open path {current_path}.")
+
+
+@save_blueprint.route("path", methods=["POST"])
+@jwt_required()
+def update_path():
+ path = Path(request.json.get("path")).resolve()
+ if not path.exists():
+ return reply(1, msg="Path Not Found")
+
+ old_path = Config.path
+ Config.path = str(path)
+
+ try:
+ return reply(0, get_path_context(path))
+ except:
+ Config.path = old_path
+ LOGGER.error(traceback.format_exc())
+ return reply(1, msg=f"Error, cannot open path {path}.")
+
+
+@save_blueprint.route("path", methods=["PATCH"])
@jwt_required()
-def show_file_picker():
- if Config.mode != "gui":
- msg = "File picker only supports GUI mode."
- LOGGER.warning(msg)
- return reply(1, msg=msg)
+def path_back():
+ path = Path(Config.path).parent.resolve()
+ old_path = Config.path
+ Config.path = str(path)
try:
- import tkinter as tk
- from tkinter import filedialog
-
- root = tk.Tk()
- root.withdraw()
- root.attributes('-topmost', True)
- folder_selected = filedialog.askdirectory(parent=root)
- root.destroy()
- LOGGER.info(f"File picker result: {folder_selected}")
- return reply(0, {"path": folder_selected or ""})
+ return reply(0, get_path_context(path))
except:
- trace = traceback.format_exc()
- LOGGER.error(f"Failed Open File Picker: {trace}")
- LOGGER.error(f"Please Manually Type in the Path.")
- return reply(1, msg="Failed open file picker (check log for detail), please manually type in the path.")
\ No newline at end of file
+ Config.path = old_path
+ LOGGER.error(traceback.format_exc())
+ return reply(1, msg=f"Error, cannot open path {path}.")
\ No newline at end of file
diff --git a/src/palworld_pal_editor/api/util.py b/src/palworld_pal_editor/api/util.py
deleted file mode 100644
index 9eec5d8..0000000
--- a/src/palworld_pal_editor/api/util.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from flask import jsonify
-
-def reply(status, data=None, msg=None):
- return jsonify({"status": status, "data": data, "msg": msg})
diff --git a/src/palworld_pal_editor/assets/data/pal_passives.json b/src/palworld_pal_editor/assets/data/pal_passives.json
index b8ec2f8..c661384 100644
--- a/src/palworld_pal_editor/assets/data/pal_passives.json
+++ b/src/palworld_pal_editor/assets/data/pal_passives.json
@@ -1300,6 +1300,10 @@
"zh-CN": {
"Name": "魔女",
"Description": "暗属性攻击伤害增加20%, 冰属性攻击伤害增加20%"
+ },
+ "ja": {
+ "Name": "魔女",
+ "Description": "闇属性ダメージ+20.0%,氷属性ダメージ+20.0%"
}
}
},
@@ -1314,6 +1318,10 @@
"zh-CN": {
"Name": "手下留情",
"Description": "和平主义者 使攻击目标的生命值不会小于1"
+ },
+ "ja": {
+ "Name": "手加減",
+ "Description": "平和主義者 攻撃対象のHPを1未満にできない。"
}
}
}
diff --git a/src/palworld_pal_editor/config.py b/src/palworld_pal_editor/config.py
index 638cba7..5ea3803 100644
--- a/src/palworld_pal_editor/config.py
+++ b/src/palworld_pal_editor/config.py
@@ -13,7 +13,7 @@
CONFIG_PATH = PROGRAM_PATH / 'config.json'
-VERSION = "0.7.0"
+VERSION = "0.8.0"
class Config:
i18n: str = "en"
@@ -22,6 +22,7 @@ class Config:
debug: bool = False
path: str = None
password: str = None
+ nocli: bool = False
_password_hash: str = None
JWT_SECRET_KEY: str = "X2Nvbm5sb3N0"
diff --git a/src/palworld_pal_editor/utils/__init__.py b/src/palworld_pal_editor/utils/__init__.py
index 8941409..02c8da3 100644
--- a/src/palworld_pal_editor/utils/__init__.py
+++ b/src/palworld_pal_editor/utils/__init__.py
@@ -3,5 +3,5 @@
LOGGER = Logger(log_directory=PROGRAM_PATH / "logs")
-from palworld_pal_editor.utils.util import alphanumeric_key, clamp, check_or_generate_port
+from palworld_pal_editor.utils.util import *
from palworld_pal_editor.utils.data_provider import DataProvider
\ No newline at end of file
diff --git a/src/palworld_pal_editor/utils/util.py b/src/palworld_pal_editor/utils/util.py
index beca2f9..9cd0b0d 100644
--- a/src/palworld_pal_editor/utils/util.py
+++ b/src/palworld_pal_editor/utils/util.py
@@ -1,3 +1,4 @@
+from pathlib import Path
import re
from functools import wraps
import sys
@@ -6,6 +7,32 @@
from palworld_pal_editor.utils import LOGGER
+from flask import jsonify
+
+def reply(status, data=None, msg=None):
+ return jsonify({"status": status, "data": data, "msg": msg})
+
+
+def get_path_context(path: Path) -> dict:
+ current_path = path.resolve()
+ children = {
+ str(child.resolve()): {
+ "filename": child.name,
+ "isDir": child.is_dir(),
+ }
+ for child in sorted(current_path.iterdir(), key=lambda x: (x.is_file(), x.name))
+ }
+
+ names = [child.name for child in current_path.iterdir()]
+ is_pal_dir = "Level.sav" in names and "Players" in names
+
+ return {
+ "currentPath": str(current_path),
+ "children": children,
+ "isPalDir": is_pal_dir
+ }
+
+
def alphanumeric_key(key: str):
"""Converts a string into a list of integer and string fragments for sorting."""
convert = lambda text: int(text) if text.isdigit() else text.lower()
diff --git a/src/palworld_pal_editor/webui.py b/src/palworld_pal_editor/webui.py
index b34202a..7e3255c 100644
--- a/src/palworld_pal_editor/webui.py
+++ b/src/palworld_pal_editor/webui.py
@@ -4,11 +4,10 @@
from flask import Flask, send_from_directory
from flask_jwt_extended import JWTManager
from werkzeug.security import generate_password_hash
-from palworld_pal_editor.api.util import reply
from palworld_pal_editor.config import ASSETS_PATH, Config
from palworld_pal_editor.api import *
-from palworld_pal_editor.utils import LOGGER
+from palworld_pal_editor.utils import LOGGER, reply
import mimetypes
# attempt to fix MIME TYPE error for some user