item system request (recipies and owner of item)

millzy

Ultra Cool Member
im after a item system that has the features to disable the item if u are not the owner of the item. but not all items some players can have another players items e.g items that drop on death, potions (a player may want to help his ally out by giving him a potion )

im after a recipie system that u can buy the recipie evan tho your inventory is full (and u have the needed items of course) i have not seen this any where.

i need the recipie system to work with 2 types of recipie ways e.g

like 2 rings of silver will make a gold ring.

and recipies where u need the items + a recipie to combine the items e.g boots, gloves of haste, boots of haste recipie will create boots of haste.
 

inevit4ble

Well-Known Member
You basically check the inventory for the required items, remove them if true and replace it with the new item.

Not sure how to allow a unit to buy items when inventory is full
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Well, that sort of system requires multiple copies of every item, and it's quite complicated to make recipes too:

What units buy/pick up from the ground will be a Powerup.

When a Powerup is picked up, a trigger runs. If the unit has an empty inventory slot, then Create the actual item for the unit. Otherwise, create
another Powerup at the same point.

The same thing happens when an item is bought.

When an item is created for a unit, set the item's Owner. Every recreation of the item (when dropped, picked up or disabled) will have the same Owner. If the Owner of the item is not the same as the Owner of the unit with the item, remove the item and replace it with a disabled version.

As for the last two, here's some examples.

Trigger:
  • Item with Recipe
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) has an item of type Ring of Regeneration) Equal to True
      • ((Hero manipulating item) has an item of type Bigger Ring of Regeneration Recipe) Equal to True
    • Actions
      • Item - Remove (Item carried by (Hero manipulating item) of type Ring of Regeneration)
      • Item - Remove (Item carried by (Hero manipulating item) of type Bigger Ring of Regeneration Recipe)
      • Special Effect - Create a special effect attached to the chest of (Hero manipulating item) using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
      • Special Effect - Destroy (Last created special effect)
      • Sound - Play RecipeCombo <gen> at 100.00% volume, attached to (Hero manipulating item)
      • Hero - Create Bigger Ring of Regeneration and give it to (Hero manipulating item)


Trigger:
  • Multiple Items
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) has an item of type Orb of Power) Equal to True
    • Actions
      • Set Counter = 0
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Simple Orb
            • Then - Actions
              • Set Counter = Counter + 1
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Counter Greater Than 2
        • Then - Actions
          • Item - Remove (Item carried by (Hero manipulating item) of type Simple Orb)
          • Item - Remove (Item carried by (Hero manipulating item) of type Simple Orb)
          • Special Effect - Create a special effect attached to the chest of (Hero manipulating item) using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Special Effect - Destroy (Last created special effect)
          • Sound - Play RecipeCombo <gen> at 100.00% volume, attached to (Hero manipulating item)
          • Hero - Create Special Orb and give it to (Hero manipulating item)
        • Else - Actions
 

inevit4ble

Well-Known Member
I thought of suggesting the power up idea as you said but what if the hero wants to carry the recipe without completing the "fusion" until later?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Then the recipe could have an active ability, that forms the resulting item if the unit already has all the required items. It would also mean inability to complete a recipe by picking up an ingredient while a unit's inventory is full, probably one of the reasons DotA doesn't have this function (it causes some annoyances).
 

inevit4ble

Well-Known Member
You've possibly misunderstood me or me to you.

I was referring to the dota system where by, say for "Treads" with the ingredients being "Boots of speed" and "Glove of haste" and stat adjustment item, you can hold the boots and the scroll and get the rest of the ingredients later on while hold the recipe and you can buy recipe while inventory is full.

So like the power up idea runs but if the required items aren't held then the scroll item would spawn in inventory instead.

I think that's what I was trying to say?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
In the same vein, that requires a Recipe item, as well as Disabled and Powerup copies.
 

millzy

Ultra Cool Member
i know how to create item recipies but im after how to do it if the inventory is full and im after a system to make it easyer instead off 1 trigger for each recipie


this is the only part of the system i have
the shops will sell tomes

just an example set up the variabes

real item[1] = boots
real item[2] = gem
real item[3] = plate

shop item[1] = boots(tome)
shop item[2] = gem(tome)
shop item[3] = plate(tome)


event unit buys and item
condition
actions
for each integer A do actions 1 to 3
if item being bought is = to shop item[loop A] then give real item[loop A]
 

inevit4ble

Well-Known Member
That is the system you want. I doubt there's a way to make it simpler because you have to set the items to variables.
And then the tome recipes will allow the hero to purchase with full inventory.
 
Do you understand Jass?

I could give you a copy of an old map I made with full-blown DotA style recipes in it, but it's all in Jass.
 

GFreak45

I didnt slap you, i high 5'd your face.
You can allow units to buy items while their inventory is full if you make the base item a rune, then when they pick it up you just give them or their backpack the item the rune is supposed to represent. Be carefull though, you need to remove any buffs on the rune.
 

millzy

Ultra Cool Member
Do you understand Jass?

I could give you a copy of an old map I made with full-blown DotA style recipes in it, but it's all in Jass.
jass is not my thing how much do i need to know of jass to use/edit it????

You can allow units to buy items while their inventory is full if you make the base item a rune, then when they pick it up you just give them or their backpack the item the rune is supposed to represent. Be carefull though, you need to remove any buffs on the rune.
you can do the same thing with tomes witch is what im doing....
 
You would need to know Jass pretty well.
It was the map I used to learn how to do stuff, so it would need a lot of work to get working properly because everything is kind of hacked together.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Jesus4Lyf Jesus4Lyf:
    Hmm, how to summarize... Moved to the USA and got married. Became a professional software engineer and solution lead. Learning Godot for game dev. :)
  • jonas jonas:
    So you are pursuing game dev as a hobby? What industry is your dayjob in?
  • jonas jonas:
    FAANG?
  • Jesus4Lyf Jesus4Lyf:
    Not quite FAANG, less pay for a less hours/stress. Yeah, game dev as a hobby.
  • jonas jonas:
    makes sense. Do we have a hobby game dev subforum to showcase some work?
  • Blackveiled Blackveiled:
    Happy Thursday
    +1
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    TGIF!
  • The Helper The Helper:
    hey tom_mai please do not archive anymore news
  • Ghan Ghan:
    AMD Ryzen 7000 next week :D
    +1
  • The Helper The Helper:
    noice!
  • tom_mai78101 tom_mai78101:
    "hey tom_mai please do not archive anymore news" ----> Got it. What should we do with the "News Archive" subforum?
  • The Helper The Helper:
    I think leave it for real old news that cannot be sorted the reason we had it in the first place was a server issue that we do not have anymore. I don't want to get rid of the archive just not put anything in it for now until we figure it out more
  • The Helper The Helper:
    The side chat has nothing on the discord. it is not possible but the biggest thing on my wish list right now is a sidechat channel on the disord that hooks up to this...
  • Ghan Ghan:
    I've been selected for the Diablo IV beta.
    +1
  • Ghan Ghan:
    Woo!
    +1
  • The Helper The Helper:
    that is so cool
  • V-SNES V-SNES:
    Eh just noticed the new discord section on the side. Looks great!
    +1
  • Blackveiled Blackveiled:
    :( feels bad I can't ever get selected for any beta I sign up for. It's annoying as heck.
    +1
  • The Helper The Helper:
    Hello mgarcia! Happy Monday everyone!
  • The Helper The Helper:
    Happy Tuesday! :)

    The Helper Discord

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top