Indefinite Item Leveling

BiGyElLoWhAt

New Member
Reaction score
1
I want to be able to level up items, which I can do via triggers. Is there a way to create new items within the game to replace the old one, without having to physically make each item and all of it's upgrades, plus trigger in each upgrade individually?

I'm looking for something like this:
Event
unit acquires an item
condition
item equal to (item)
action
set item level = item level + 1

that sets up the int variable which will be used for stat adjustment and upgrade cost. I was thinking the easiest way to upgrade would be to sell the item to a shop for 0 gold, then buy the upgraded item for the upgrade cost.
soo...
Event
unit sells an item
condition
item equal to (item)
action
neutral passive add item (item) +1 to shops inventory
set price = 500*item level

and then one thing I don't understand, I've been told you can't edit unit data variably, but they definitely use variables in the data (at least in tooltips). I have a shop that sells various upgrades of an ability basically fan of knives, and the tooltip changed as I adjusted the damage. Can I set the damage buff of an item = base + item level? If so, how?
 

jonas

You can change this now in User CP.
Reaction score
64
No. Object data can not be changed from code.

The tool tip uses static references of editor fields, no evaluation there whatsoever.

You can just create tons of items or trigger the whole thing; for tons of items, I suggest learning to use the object merger which allows you to generate hundreds of similar items (when you save the map, not when you run it).
 

afisakov

You can change this now in User CP.
Reaction score
37
I want to be able to level up items, which I can do via triggers. Is there a way to create new items within the game to replace the old one, without having to physically make each item and all of it's upgrades, plus trigger in each upgrade individually?
...
Can I set the damage buff of an item = base + item level? If so, how?
If the item just gives a stat bonus, str int, damage, etc. you could use item charges for upgrade and have a trigger give the hero bonus str or int every time the item levels up. take away the stats if unit drops item and add them again if item picked up x # of charges.
There are also tips somewhere on hero how to add direct atk damage through triggers, so you can have a trigger do that to mimic charges on item.
Hard to say more without knowing what exactly your item is supposed to do... it won't work so well for critical strike or evasion, but there are ways to trigger damage for a number of active abilities.

P.S. as far as I know you won't be able to have 2 copies of the same item on char if using this method, hard to control which gets upgraded without losing active ability otherwise.
 

BiGyElLoWhAt

New Member
Reaction score
1
So you're saying like keep track of the bonus with an int variable, then adjust that variable via events in an upgrade trigger(s)? That could work, but (maybe you can't do this) I would ideally like the tooltip to accurately represent the bonus that's given by the item. Also, the dual item thing won't be an issue. With the exception of some consumables, all item's will be unique (at least that's what I'm thinking).
Thanks for the idea.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Tooltips can not be changed during the game. If you want the tooltips to update you have to create lots and lots of items, each one with the unique tooltip.
 

afisakov

You can change this now in User CP.
Reaction score
37
Tooltips can not be changed during the game. If you want the tooltips to update you have to create lots and lots of items, each one with the unique tooltip.
Unless you want to write the formula in the tooltip. Less pretty for the players but useable if say, you write
"gives 3 intelligence and 2 agility per item level (charges)"
Becomes harder to use if non-linear stat scaling however.
Whether you want to do this or create lots of items probably depends on just how many levels you will have. 50 copies of an item will slow map loading, 8 copies would probably not be too bad.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top