EXPPOC Posted May 14, 2024 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 11/12/22 Last Seen: November 6, 2024 Share Posted May 14, 2024 (edited) Can you teach me how to get the value from the server and dynamically display it in the item's description? How to write iteminfo.lua to get the server value? like this : Edited May 14, 2024 by EXPPOC Quote Link to comment Share on other sites More sharing options...
0 Poring King Posted May 15, 2024 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 1016 Reputation: 190 Joined: 11/27/14 Last Seen: Sunday at 02:15 PM Share Posted May 15, 2024 On 5/14/2024 at 8:28 AM, EXPPOC said: Can you teach me how to get the value from the server and dynamically display it in the item's description? How to write iteminfo.lua to get the server value? like this : Open you client files goto System folder find Iteminfo.lua you can change the information there so your server will display the data that you have been change . You just simply re-open your client and login your account once you change something and see if it goes thru Quote Link to comment Share on other sites More sharing options...
0 EXPPOC Posted May 16, 2024 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 11/12/22 Last Seen: November 6, 2024 Author Share Posted May 16, 2024 9 hours ago, Poring King said: Open you client files goto System folder find Iteminfo.lua you can change the information there so your server will display the data that you have been change . You just simply re-open your client and login your account once you change something and see if it goes thru Are there any examples? I know that I need to modify the main function of iteminfo.lua. I can get the value of the item tpl hash table defined by the client, but how do I get the value which sent from the server? For example, attack value, which variable is it?  Quote Link to comment Share on other sites More sharing options...
0 ckx_ Posted May 16, 2024 Group: Members Topic Count: 7 Topics Per Day: 0.01 Content Count: 26 Reputation: 4 Joined: 06/29/22 Last Seen: January 31 Share Posted May 16, 2024 (edited) 2 hours ago, EXPPOC said: Are there any examples? I know that I need to modify the main function of iteminfo.lua. I can get the value of the item tpl hash table defined by the client, but how do I get the value which sent from the server? For example, attack value, which variable is it?  For item descriptions, it's purely clientside. That data is set up in ItemInfo.lua—Item descriptions never get any information from the server. If you edit the ATK of an item on the server, you must make a corresponding edit to the client description. The entire tbl{ } in ItemInfo.lua is loaded into memory at launch time. In your initial post, you show properties for Random Options, which are separate from the item descriptions. If you _really_ want dynamic item descriptions from the server, you could try to find a way to call AddItemIdentifiedDesc which is a function referenced in main() at the bottom of ItemInfo.lua. But as this doesn't appear to be a global function, and the item descriptions are set in memory at launch time, it will require you figuring out a clever injection point that has access to this function to see if you can overwrite the runtime value. I propose a few alternatives; If you are making a server where item stats can "grow", e.g. you get a Club and its ATK can be evolved, then I think you're best off making separate Item IDs for each Club iteration and making npc script to copy overall the properties. If you are making a server where the ATK of an item can change dynamically, frequently, then I think you're best off making an item that checks the stat of your items via npcscript, e.g. a usable called "Stat Sheet" that calls a mes window, and that shows you the dynamic properties on your items in an item function that uses getitemdata. If you are doing one-off edits then I think editing ItemInfo.lua is best, you could write a quick script that crawls your yaml item db and inserts the correct values into the lua file for you. Otherwise you might consider enchant or ropt slots for this data, which do read from the server. Edited May 16, 2024 by ckx_ formatting Quote Link to comment Share on other sites More sharing options...
Question
EXPPOC
Can you teach me how to get the value from the server and dynamically display it in the item's description?
How to write iteminfo.lua to get the server value?
like this :

Edited by EXPPOCLink to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.