just posting the code again in case anyone needs it (okay it is really broken since I do not have the original )
-- Load the original file. As you might have guessed you can also load your translated file here instead
-- (just make sure the "tbl" array contains your item info)dofile("System/iteminfo.lub")
-- Now as a simple example . I am simply going to change name of Red Potion to Crimson Potion.
-- But you can add anything in the same way. Format is same as the original one, just
-- the table name is different
tbl_custom = {
[501] = {
unidentifiedDisplayName = "Crimson Potion",
unidentifiedResourceName = "»¡°£Æ÷¼Ç",
unidentifiedDescriptionName = {
"A potion made from",
"grinded Red Herbs that",
"restores ^000088about 45 HP^000000.",
"^ffffff_^000000",
"Weight: ^7777777^000000"
},
identifiedDisplayName = "Crimson Potion",
identifiedResourceName = "»¡°£Æ÷¼Ç",
identifiedDescriptionName = {
"^000088HP Recovery Item^000000",
"A potion made from",
"grinded Red Herbs that",
"restores ^000088about 45 HP^000000.",
"^ffffff_^000000",
"Weight: ^7777777^000000"
},
slotCount = 0,
ClassNum = 0
}
,}
-- Now for a helper function because i hate repetitions
-- It adds items from curTable if it is not present in refTable
function itemAdder(curTable, refTable)
for ItemID,DESC in pairs(curTable) do
if refTable == nil or refTable[ItemID] == nil then
result, msg = AddItem(ItemID,DESC.unidentifiedDisplayName,DESC.unidentifiedResourceName,DESC.identifiedDisplayName,DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)
if not result then
return false, msg
end
for k,v in pairs(DESC.unidentifiedDescriptionName) do
result, msg = AddItemUnidentifiedDesc(ItemID, v)
if not result then
return false, msg
end
end
for k,v in pairs(DESC.identifiedDescriptionName) do
result, msg = AddItemIdentifiedDesc(ItemID, v)
if not result then
return false, msg
end
end
end
end
return true, "good"
end
-- And the newly designed main function
function main()
result, msg = itemAdder(tbl_custom, nil)
-- add custom items (including official overrides)
if result then
result, msg = itemAdder(tbl, tbl_custom)
-- add non-overridden official items
end
return result, msgend