System (shop?) with custom currency

Level 6
Joined
Jul 22, 2021
Messages
49
I want to create a system where you can exchange raw meat for roasted meat via interaction with a campfire.
Raw meat would be picked from dead animals.

Now, I can see few ways how it can be approached:
  1. Raw meat drops from animals as an item.
  2. You pick raw meat as a resource (like gold/wood resource laying on the ground).
So, the campfire will most likely act as a shop with "raw meat" as a currency, where you buy roasted meat with that.

I tried to make a "campfire unit" and create triggers that would work like this: you give raw meat to the campfire, it gives you back/drops the roasted meat item.
But I gave up rather quickly because I wasn't really sure if it would lead me anywhere.

The question is, how can I create such a system with custom currency? Can I replace wood with raw meat?
Or is there another way to do it? Please note I'm a beginner so step-by-step advice and perhaps some patience would be greatly appreciated :)
 
Level 3
Joined
Sep 23, 2021
Messages
19
I tried to make a "campfire unit" and create triggers that would work like this: you give raw meat to the campfire, it gives you back/drops the roasted meat item.

Well if you prefer tested ways:

1. Just combine items like meat with salt in that campfire unit to get roasted meat while restrict the spawn of new item for just that target. By the way remains in the inventory not dropped.
Example: Dota carrier animal. -> but for the restriction trigger needs someone else who good with that

2. Use it as non-item collectible. Disadvantage: there is graphical representation.
Example: FT orc campaign when collect materials (for beer or from the lightning lizards)
 
Level 21
Joined
Mar 29, 2020
Messages
1,235
cool idea.

you could have it be an allied unit with an inventory, and trigger it so that when you give it the raw meat, cooked meat appears in your inventory. or have it be a unit you own and just when you put raw meat in it's inventory it gets instantly replaced by cooked meat. you could use one of the "item storage crates" from the rexxar campaign as a base unit.

you could have the campfire be a unit that when you place the meat close to it (in x range) it is instantly (or after 1 second and a fire SFX) replaced with cooked meat. if you want to do that you can also play around with the fire "unit" model size and collision so that it looks like placing the meat on the fire.
 
Level 6
Joined
Jul 22, 2021
Messages
49
Hey guys, thanks for the replies.
I will try to play around with it some more after reading your tips.
Although, I was thinking that making the campfire act as a shop with "raw meat" currency would be the easiest and most effective fix to that. I mean, is there a way to replace the name & icon of the resource? In this case, I'd like to change "wood" to "raw meat" and make certain units drop that resource.

UPDATE: I managed to rename the resource. The only toughie I experience is converting png to blp (is 54x54 base px size too small?), but that's an irrelevant detail for now.
Right now I'm working on "campfire shop".

UPDATE #2: Okay, I made it work! It turned out to be quite easy in the end. Now it's time to do some refinements.

If memory serves me right, there was in some campaign an item that visually appeared as a chunk of meat. I can't really find the model anywhere or maybe it was used in some custom map. Do you guys know any good models for that?
 
Last edited:
Level 6
Joined
Jul 22, 2021
Messages
49
Thanks for the links @Cheshire
Ultimately I've used Ham

But the problem is, upon picking up the item it has long dead animation. Actually, this model has no dead animation lol
How do I fix this? Please note that I've used the model for the item which is based on Bundle of Lumber - and that is a power-up kind of item, where you pick up a resource (wood in this case).
 

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,678
Try removing the item through triggers. A unit acquires an item -> Item = Ham -> Remove item being maniplulated

Otherwise, you could open it in a modeling program and add a death animation tag to it.
 
Top