Jump to content
  • 0

question in 2 or more iteminfo.lua file


AinsLord

Question


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

is this still working in a new iteminfo.lua files?

if yes can anyone have like a walkthrough on how to apply

seems different in the guide and in my iteminfo

 

thanks

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1190
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

1 hour ago, AinsLord said:

is this still working in a new iteminfo.lua files?

if yes can anyone have like a walkthrough on how to apply

seems different in the guide and in my iteminfo

 

thanks

yes stil working

first prepare new iteminfolua file to collect all item info files

here my example for collect data for chris item info file and you can add add new custom item at this rile

dofile("System/itemInfo_EN.lua") 

tbl_custom = {
	[15035] = {
		unidentifiedDisplayName = "Unidentified Armor",
		unidentifiedResourceName = "¿ìµç¸ÞÀÏ",
		unidentifiedDescriptionName = { "Can be identified by using a ^990099Magnifier^000000." },
		identifiedDisplayName = "2010 Love Dad",
		identifiedResourceName = "2010·¯ºê´ëµð",
		identifiedDescriptionName = {
			"Bonus Allstat +1.",
			"_______________________",
			"MaxHP +150",
			"_______________________",
			"MaxSP+150.",
			"_______________________",
			"Increases ^663399Stone Curse^000000 resistance by 90%.",
			"Increases ^663399Frozen^000000 resistance by 90%.",
			"Increases ^663399Stun^000000 resistance by 90%.",
			"Increases ^663399Sleep^000000 resistance by 90%.",
			"Increases ^663399Silence^000000 resistance by 90%.",
			"Increases ^663399Curse^000000 resistance by 90%.",
			"Increases ^663399Confusion^000000 resistance by 90%.",
			"Increases ^663399Blind^000000 resistance by 90%.",
			"Increases ^663399Poison^000000 resistance by 90%.",
			"Increases ^663399Bleeding^000000 resistance by 90%.",
			"_______________________",
			"^0000CCType:^000000 Armor",
			"^0000CCDefense:^000000 6",
			"^0000CCWeight:^000000 10",
			"^0000CCArmor Level:^000000 1",
			"^0000CCEnchantable:^000000 No",
			"_______________________",
			"^0000CCRequirement:^000000",
			"Base Level 1",
			"All Job"
		},
		slotCount = 0,
		ClassNum = 0,
		costume = false
	},
}


-- 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
			if nil ~= DESC.EffectID then
			result, msg = AddItemEffectInfo(ItemID, DESC.EffectID)
			end
			if not result == true then
			return false, msg
			end
			if nil ~= DESC.costume then
			result, msg = AddItemIsCostume(ItemID, DESC.costume)
			end
			if not result == true then
			return false, msg
			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, msg
end

please look at this part

dofile("System/itemInfo_EN.lua") 

here the main function to get data from other item info files.

and make sure your client to read this iteminfo file.

Edited by hendra814
  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

4 hours ago, hendra814 said:

yes stil working

first prepare new iteminfolua file to collect all item info files

here my example for collect data for chris item info file and you can add add new custom item at this rile

dofile("System/itemInfo_EN.lua") 

tbl_custom = {
	[15035] = {
		unidentifiedDisplayName = "Unidentified Armor",
		unidentifiedResourceName = "¿ìµç¸ÞÀÏ",
		unidentifiedDescriptionName = { "Can be identified by using a ^990099Magnifier^000000." },
		identifiedDisplayName = "2010 Love Dad",
		identifiedResourceName = "2010·¯ºê´ëµð",
		identifiedDescriptionName = {
			"Bonus Allstat +1.",
			"_______________________",
			"MaxHP +150",
			"_______________________",
			"MaxSP+150.",
			"_______________________",
			"Increases ^663399Stone Curse^000000 resistance by 90%.",
			"Increases ^663399Frozen^000000 resistance by 90%.",
			"Increases ^663399Stun^000000 resistance by 90%.",
			"Increases ^663399Sleep^000000 resistance by 90%.",
			"Increases ^663399Silence^000000 resistance by 90%.",
			"Increases ^663399Curse^000000 resistance by 90%.",
			"Increases ^663399Confusion^000000 resistance by 90%.",
			"Increases ^663399Blind^000000 resistance by 90%.",
			"Increases ^663399Poison^000000 resistance by 90%.",
			"Increases ^663399Bleeding^000000 resistance by 90%.",
			"_______________________",
			"^0000CCType:^000000 Armor",
			"^0000CCDefense:^000000 6",
			"^0000CCWeight:^000000 10",
			"^0000CCArmor Level:^000000 1",
			"^0000CCEnchantable:^000000 No",
			"_______________________",
			"^0000CCRequirement:^000000",
			"Base Level 1",
			"All Job"
		},
		slotCount = 0,
		ClassNum = 0,
		costume = false
	},
}


-- 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
			if nil ~= DESC.EffectID then
			result, msg = AddItemEffectInfo(ItemID, DESC.EffectID)
			end
			if not result == true then
			return false, msg
			end
			if nil ~= DESC.costume then
			result, msg = AddItemIsCostume(ItemID, DESC.costume)
			end
			if not result == true then
			return false, msg
			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, msg
end

please look at this part

dofile("System/itemInfo_EN.lua") 

here the main function to get data from other item info files.

and make sure your client to read this iteminfo file.

so for this part no need to put this in the original lua?

dofile("System/itemInfo_EN.lua") 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1190
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

14 minutes ago, AinsLord said:

so for this part no need to put this in the original lua?

dofile("System/itemInfo_EN.lua") 

 

yes, so at system folder you have 2 item info.lua with different name

here the example at my system folder

image.png.21905a48bc63de470f706d3e46071fe5.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

do i need to do something in Diff/nemo patches?

 

Edit:

image.png.27dc9555155df42a6145cf3946447d72.png

mine my client reads the itemInfo_EN.lua so i created itemInfo_EN_test.lua and put this

tell me if this correct

dofile("System/itemInfo_EN_test.lua") 

tbl_custom = {


	[30000] = {
		unidentifiedDisplayName = "Zeny",
		unidentifiedResourceName = "¹«ÇÑ°¡Á×ÁÖ¸Ó´Ï",
		unidentifiedDescriptionName = { "Unknown Item, can be identified by using a ^6666CCMagnifier^000000." },
		identifiedDisplayName = "Zeny",
		identifiedResourceName = "¹«ÇÑ°¡Á×ÁÖ¸Ó´Ï",
		identifiedDescriptionName = { "..." },
		slotCount = 0,
		ClassNum = 0,
		costume = false
	},
	[30001] = {
		unidentifiedDisplayName = "Cash Points",
		unidentifiedResourceName = "ÄíÆù",
		unidentifiedDescriptionName = { "Unknown Item, can be identified by using a ^6666CCMagnifier^000000." },
		identifiedDisplayName = "Cash Points",
		identifiedResourceName = "ÄíÆù",
		identifiedDescriptionName = { "..." },
		slotCount = 0,
		ClassNum = 0,
		costume = true
	},
	
}


-- 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
			if nil ~= DESC.EffectID then
			result, msg = AddItemEffectInfo(ItemID, DESC.EffectID)
			end
			if not result == true then
			return false, msg
			end
			if nil ~= DESC.costume then
			result, msg = AddItemIsCostume(ItemID, DESC.costume)
			end
			if not result == true then
			return false, msg
			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, msg
end

do i need to put something in the itemInfo_EN.lua?

 

EDIT:

figure this one out thanks

Edited by AinsLord
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1190
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

1 hour ago, AinsLord said:

do i need to do something in Diff/nemo patches?

 

Edit:

image.png.27dc9555155df42a6145cf3946447d72.png

mine my client reads the itemInfo_EN.lua so i created itemInfo_EN_test.lua and put this

tell me if this correct

dofile("System/itemInfo_EN_test.lua") 

tbl_custom = {


	[30000] = {
		unidentifiedDisplayName = "Zeny",
		unidentifiedResourceName = "¹«ÇÑ°¡Á×ÁÖ¸Ó´Ï",
		unidentifiedDescriptionName = { "Unknown Item, can be identified by using a ^6666CCMagnifier^000000." },
		identifiedDisplayName = "Zeny",
		identifiedResourceName = "¹«ÇÑ°¡Á×ÁÖ¸Ó´Ï",
		identifiedDescriptionName = { "..." },
		slotCount = 0,
		ClassNum = 0,
		costume = false
	},
	[30001] = {
		unidentifiedDisplayName = "Cash Points",
		unidentifiedResourceName = "ÄíÆù",
		unidentifiedDescriptionName = { "Unknown Item, can be identified by using a ^6666CCMagnifier^000000." },
		identifiedDisplayName = "Cash Points",
		identifiedResourceName = "ÄíÆù",
		identifiedDescriptionName = { "..." },
		slotCount = 0,
		ClassNum = 0,
		costume = true
	},
	
}


-- 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
			if nil ~= DESC.EffectID then
			result, msg = AddItemEffectInfo(ItemID, DESC.EffectID)
			end
			if not result == true then
			return false, msg
			end
			if nil ~= DESC.costume then
			result, msg = AddItemIsCostume(ItemID, DESC.costume)
			end
			if not result == true then
			return false, msg
			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, msg
end

do i need to put something in the itemInfo_EN.lua?

 

EDIT:

figure this one out thanks

if your client read itemInfo_EN.lua, you must put the script in the itemInfo_EN.lua file.

and original itemInfo_EN.lua put at itemInfo_EN_test.lua ( do file already correct for this option)

but, it you put the script in the iteminfo_en_test.lua change do file info iteminfo_en.lua

and diif/patch your client to read item info_en_test.lua

no change for iteminfo_en.lua for this part

Edited by hendra814
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

24 minutes ago, hendra814 said:

if your client read itemInfo_EN.lua, you must put the script in the itemInfo_EN.lua file.

and original itemInfo_EN.lua put at itemInfo_EN_test.lua ( do file already correct for this option)

but, it you put the script in the iteminfo_en_test.lua change do file info iteminfo_en.lua

and diif/patch your client to read item info_en_test.lua

no change for iteminfo_en.lua for this part

the morethan 2 itemInfo.lub is quite tricky

coz honestly i want to make like 3 custom lua

so i can separate my custom items from other server

so i know where the 99/70 custom item from 255 customs

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1190
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

21 minutes ago, AinsLord said:

the morethan 2 itemInfo.lub is quite tricky

coz honestly i want to make like 3 custom lua

so i can separate my custom items from other server

so i know where the 99/70 custom item from 255 customs

i think 2 item info already enough, 1 form chris translation project, and 1 from you custom iteminfo file.

if you want put custom item, you can add it at your custom item info file.

So when chris translation project have update, it's not impact to your custom item info file.

Edited by hendra814
  • Love 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...