Skip to content

Commit

Permalink
Implement Enchant User Interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Asheraf committed Oct 29, 2022
1 parent 113a894 commit 4b4da99
Show file tree
Hide file tree
Showing 26 changed files with 27,439 additions and 526 deletions.
3 changes: 3 additions & 0 deletions conf/map/battle/misc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,6 @@ dynamic_npc_timeout: 60000
// The range for dynamic npc location search
// Aegis: 2
dynamic_npc_range: 2

// The maximum number of full iterations that server can do when rolling enchant ui random enchants.
enchant_ui_max_loop: 10
2 changes: 2 additions & 0 deletions conf/messages.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1707,5 +1707,7 @@
1542: Failed to complete quest.
1543: Quest was marked as complete in your log.

1544: Please enter an enchant group id.

// Custom translations
import: conf/import/msg_conf.txt
95 changes: 95 additions & 0 deletions db/pre-re/enchant_db.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
//================= Hercules Database =====================================
//= _ _ _
//= | | | | | |
//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2021-2022 Hercules Dev Team
//= Copyright (C) 2021-2022 Asheraf
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
//= the Free Software Foundation, either version 3 of the License, or
//= (at your option) any later version.
//=
//= This program is distributed in the hope that it will be useful,
//= but WITHOUT ANY WARRANTY; without even the implied warranty of
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//= GNU General Public License for more details.
//=
//= You should have received a copy of the GNU General Public License
//= along with this program. If not, see <http://www.gnu.org/licenses/>.
//=========================================================================

enchant_db: (
/**************************************************************************
************* Entry structure ********************************************
**************************************************************************
{
// ================ Mandatory fields ==============================
Id: (int) The ID for the enchanting group.
TargetItems: [ "Item_Const" ] (string, array) An array of target items.
SlotOrder: [] (int, array) An array with enchanting slots order
also used to determine the maximum amount of possible enchants.
// ================ Optional fields ===============================
MinRefine: (int, defaults to 0) The minimum refine required for TargetItems.
MinGrade: (int, defaults to 0) The minimum grade required for TargetItems.
AllowRandomOptions: (bool, defaults to false) Whether to accept TargetItems with random options.
ResetInfo: {
Rate: (int, defaults to 0) Enchant reset success rate from 1 to 100000 (0.001% - 100%)
Zeny: (int, defaults to 0) The minimum refine required for TargetItems.
Materials: {
<Item_Const>: <amount> (string, int)
...
}
}
SlotInfo: (
{
SlotId: (int, defaults to 0) Slot id of the group
SuccessRate: (int, defaults to 0) Success rate from 1 to 100000 (0.001% - 100%)
GradeBonus: {
Grade<ID>: <Bonus> (string, int) Success rate bonus based on grade level
},
NormalEnchants: {
Zeny: (int, defaults to 0) Zeny amount required for enchanting.
Materials: { List of items required for enchanting.
<Item_Const>: <amount> (string, int)
...
},
ItemList: {
Grade<ID>: {
<Item_Const>: <Rate> (string, int)
...
}
}
},
PerfectEnchants: {
<BaseItem>: {
Zeny: (int, defaults to 0) Zeny amount required for enchanting.
Materials: { List of items required for enchanting.
<Item_Const>: <amount> (string, int)
...
}
}
},
UpgradeInfo: {
<Base_Item_Const>: {
ResultItem: (string) Item constant of the result upgrade item
Zeny: (int, defaults to 0) Zeny amount required for enchant upgrade.
Materials: { List of items required for enchant upgrade.
<Item_Const>: <amount> (string, int)
...
}
}
}
}
... up to MAX_SLOTS
)
}
**************************************************************************/
)
Loading

0 comments on commit 4b4da99

Please sign in to comment.