I want to display a detailed description of an item on the inventory equipment screen.

After spending a lot of search and time, I got the following information.
This is my code.


public void Update () {
StatusPreviewInformation info = new StatusPreviewInformation (null);
equipItem.GetBonus (ref info); //equipShortcut
EquipOption1.text = info. .... // but what?? I don't know how to access the Specific bonusStatusValue I set.


1. The level 1 setting of Beserk Axe, one of my equipment, is as follows.

Random Status Value Bonuses-4 unit
[index4] STR-min 2 max 2
[index5] DEF-min 2 max 2
[index8] AGI-min 2 max 2

Bonus Settings (custom Bonus)
Status Value Bonus 0-[index15] Power
Status Bonus 400

I want to display the above values ​​in my UI.
But through StatusPreviewInformation info
I don't know how to access the bonus specific name or value.

2. The following functions exist in EquipShortcut.cs.
equipShortcut.ChangeStatusValueBonus()
equipShortcut.GetStatusValueBonus()
Should I use these functions??

3. As the level of equipment increases, I want to set the attack power to increase gradually.
I don't know how to set it up.
In the editor
Level 1 setting StatusValueBonus Power 500
Level 2 Setting StatusValueBonus Power 530
Level 3 setting StatusValueBonus Power 560

I want to make it increase by 30. If it is set as above, will it be 560 when it is level 3 or over 1500??


4. Changes in equipment bonuses should be reflected in real time.
Is it a good way to create a new object every time in the update function like the code uppermost this post?
Because, as a result of several tests,
If StatusPreviewInformation info is declared as a field,
In the update function, a new value is added each time, which increases infinitely.

5. I want the percent value attribute to exist in the random status value bonus setting. Do you have an update plan?
  • Generally, you can use the %bonus text code in your equipment's description to show the bonuses according to the Bonus Display settings in Menus > Text Display Settings.

    1) All information is accessible in the StatusPreviewInformation instance. E.g. the status values via info.statusValue (absolute bonus) and info.statusValuePercent (percent bonuses). E.g. your STR is still at inde 4, so info.statusValue[4] will give you the STR bonus.

    2) GetStatusValueBonus will get you the bonus for a specific status value ID, ChangeStatusValueBonus is used to change the bonus for a status value.
    The StatusPreviewInformation would have all the bonus info packaged together.

    3) The random bonuses are added to the current values, i.e. if level 2 should increase by 30, set it to 30.

    4) The preview info is just an information, changing anything in it doesn't change the equipment. You'll have to do that on the EquipShortcut itself.

    5) No, currently not.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.