[Data editor] Charge item with item

Eimtr

Member
Reaction score
1
[SOLVED] Charge item with item

I made an item that is Effects-based (the item data that allows you to set charges, Effect, etc), I set it to have say 5 starting out of 10 charges and pickable in inventory. I have another unit/item (the charger/ammo) also Effect-based with 1 charge. I want this charger item that also in inventory to be able to add 1 charge to the main item when the charger is used. It is ok this charger to be inventory item too and not a Powerup (Auto) because, it would be wasted if it were picked and auto-used without the weapon.

I read about Vulture Replenish Mine but it adds charge to an ability right? Not to an Effect as in my case, actually it should add to the Unit that is the pickable item. So how do I do that?

[SOLVED]
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
if you wanted to make it undroppable but give them ammo, you could create a behavior with no effects and no tooltip that is added 5 times whenever they pick the item up, and remove it every time they fire, that way it wouldnt even take an item slot, then you could display it with a progress bar dialog item displaying ammos
 

Eimtr

Member
Reaction score
1
Both the weapon and the charger are inventory items. Either dropping the weapon on the ground and targeting it with the charger item giving it +1 charge or even better - using the item in the inventory and giving the +1 charge to the weapon also in inventory, without having to target it. So a way to do that in data editor?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
sorry i dont think i can be of much help here unless you would like a dialog system displaying ammo
 

Eimtr

Member
Reaction score
1
I guess I will be forced to use triggers, others also couldn't help with that, like the Vulture Mine Replenish acts as a dummy ability, does nothing when you target another item, I could set charges after this ability is used through triggers. Thanks for trying to help.
 

Eimtr

Member
Reaction score
1
Umm no, but if it were an auto (powerup) would be pointless to auto use if the hero doesnt have the weapon in his inventory ^^ But if you mean picking the Ammo in the inventory then not being able to drop it and just use it within the inventory, im fine with that. But is there a way for that or you meant something else?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i mean the ammo not being in your inventory at all, but saved as a variable displayed in a dialog
 

Eimtr

Member
Reaction score
1
You mean triggers or stored values? Either way if it will require the use of some non-data stuff I would go with the triggers, since Vulture replenish mine does nothing and with trigger I can make it add a charge to the target unit of the ability. Thanks anyway
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
tonight ill make a system and post it with what i was meaning...
 

Eimtr

Member
Reaction score
1
Ok but I decided to go with triggers, but unlike war3 I dont see a trigger that can set the charges of a unit, wow.. Is there an Action to do that?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
sc2 can do every single thing that wc3 can do but more, a lot of times actions are burried in other actions, IE: instead of game text, you use dialog labels attached to the screen image
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Ok but I decided to go with triggers, but unlike war3 I dont see a trigger that can set the charges of a unit, wow.. Is there an Action to do that?

I haven't answered to this thread earlier because I personally find item charges and such to be very confusing. I've got it to work in Cruiser command now but it took a while. I wanted an automatic stacking system and some other functionality which was pretty hard to find. I found a library called "Item utility Library" that does a lot of nice stuff.

Link: http://www.sc2mapster.com/forums/re...ies/5636-library-galaxy-item-utility-library/

Exuvo(One of the other creators of Cruiser Command) then modified it to allow for different max charges on different item-types as well. I also had to add some special code so it adds charges directly if the inventory is full.

Have a look and see if it helps you.
 

Eimtr

Member
Reaction score
1
@Suretu
The library and the map has 2 triggers and nothing else, I didnt know how to use that library.Well I dont know how to use that library the creator said it is on GUI as well but do I need both? The map has almpst nothing I didnt see any instructions and what to do etc

UPDATE: SOLVED. So simple (because no one could find how to set charges with triggers too or didn't answer me...). So as I said I have inventory effect-based weapon and I want with effect-based inventory charges/ammo to add charges to the inventory weapon. The Charger item uses effect Vulture - Replenish Mines, which does nothing but with triggers, it does.

Since it is effect-based items, I use effect triggers:

Code:
Chrono Rift Charge
    Events
        Environment - Player Any Player uses Effect Vulture - Replenish Mines (Modify Mines charge count)
    Local Variables
    Conditions
        (Triggering Effect Unit Type(Target)) == Pickup - Chrono Rift Device
    Actions
        Unit - Add -1.0 charges used for charge "Item/PickupChronoRiftDevice" on unit (Triggering Effect Unit(Target))

Negative number adds charge DUH, positive removes it, since this action is to remove charge and there is no action to add one. You just take the charge "STRING" from the Link in Data Editor>Item tab>your item, see link under charge.

Because I wanted with my inventory item to target the inventory weapon on the ground, here is how. One can use any other Events, Items to add a charge to Unit. For example you may want to use powerup ammo not inventory item like me that adds instantly to the inventory weapon. The problem was - Is there a trigger that adds/takes out charges from unit not ability, and this is: Add Charge Used For Unit

That's what I wanted to do... I'm sure some are aware of the Action that increases charge but I thought I posted clear enough on Mapster, Hive, here. Thank you here for trying to help.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
LOL of course... epic fail... pretty sure everyone here was looking at the big picture and not even looking at the minor details, which are important to the big picture
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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