Hi GiL,

I've got a list of weapons, and an item that increases the weapon bonus to status value.

Normally I'm guessing this would be done by increasing item level. However creating 50 - 99 levels for each of 20 items is a lot of adjustment and manual typing that would be prone to error.

I'm thinking instead of level up the item in the schematic I can just use the Change Equip Status Value node to increment the bonus to ATK, but don't know how to change the name to reflect how many times it's been upgraded. The Change Selected Data Name node appears to accept a string, but is there a way to check the existing name for a float after a separator e.g. sword +2; so + would be the separator, identify float = 2, so new name = sword +3?
  • Simple solution: Add a counter (int) variable on the item/equipment that is increased by each upgrade and use that for the text :)
    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!
  • Oh neat. Do I set it as a local and can use same counter for each name, or do I need a unique global counter for each weapon?
  • @fourscoopsplease You should be able to set it as local so each instance has its own. I do something sort of similar with abilities, where I track "AbilityPower" as a local variable on each ability with the same exact name.

    Rather than use the initial value or a unique schematic for each ability, I use this local variable to set the value for a generic formula and since its a variable on the ability, I can display it directly in the description HUD too from a single text code.
  • Can I get someone to look at these variables - it's not playing ball.
    Equipment setup
    image

    Equipment Name
    image

    Schematic
    image

    Weapon start
    image

    Weapon after schematic has been run.
    image
  • @fourscoopsplease just a guess maybe it's because your text code is using var.float but the variable is an integer.
  • edited December 2024
    I was like "Ofcourse, that's it!" but no, still same.
    Edit, I ran a console prompt at the end of my schematic and it doesnt fire. But my animation does play. SO that means it stops at updating the variable and isn't doing so.

    I moved the variable update and console to before the animation, and it updates now and the console shows. I also added a console to the start of the schematic, so what I should be seeing is it slowly updating. However it does not, it always starts the schematic at 0 and ends at 1. I would have hoped the 2nd use starts at 1 and ends at 2.

    My var was created as Set, so I changed that to Add, but it still behaves the same.

    EDIT EDIT: I changed to global variables, an now things count up. BUT I cant use the same var for each equipment otherwise they all share the same suffix, this means my weapon upgrade item needs to somehow find the variable on that piece of gear.
    Post edited by fourscoopsplease on
  • edited December 2024
    Edit
    I tested it and am able to increment the equipment variable in a schematic. Displaying it in the description, but doesn't work in the name as we already know. Could maybe display global variable in name, and in schematic Set the global variable to the local variable so that it always updates to the current item being displayed. Or use custom content maybe?

    Anyways, my Change Variable node is the same as yours is in your screenshot above. Also the variable on the equipment is set up the same as yours basically.

    I am doing it on an interaction machine on a rock in scene so I have my Select Equipment node on Starting Object, Equipment slot weapon.

    Also using var.int text code in Description of item to display the variable.

    It makes me think it's something with Select Equipment node or how the variable is being displayed, but the ATK mod increments correctly... Are you using Equipment Slot on that node?

    Edit here are screenshots, basically same setup as yours overall and works for me.
    https://imgur.com/a/PE8wAh2

    Post edited by GeneralK on
  • edited December 2024
    t makes me think it's something with Select Equipment node or how the variable is being displayed, but the ATK mod increments correctly... Are you using Equipment Slot on that node?
    Yes, here is that node setup
    image

    EDIT: I changed the variable source for the console from local to selected data like you had, and it updates now from 1 -> 2 -> 3 etc.
    But yes, still not reflected in name.

    EDITEDIT:
    I added the var.int=bonus to the description and it displays correctly. @gamingislove is this a bug that it doesn't update in the name?
    image
    Post edited by fourscoopsplease on
  • image

    I've had success using custom content instead of name.
    image

    then using that in the menu part
    image
  • The equipment variables aren't available in names, only in description and custom content (when enabled in the equipment's variable settings).
    The Change Selected Data Name node can use that variable via text code to change the name, though :)
    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.