[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.
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top