System Artificial's Recipe System

Discussion in 'Systems and Snippets' started by Artificial, Aug 8, 2008.

  1. Chao

    Chao Setting sail for fail in the sea of lame.

    Ratings:
    +63 / 0 / -0
    Shoot!
    I see what you're saying, Artie. Mind if I call you Artie? Thanks for the help, Artie, plus rep for Artie!
     
    • Like Like x 1
  2. Chao

    Chao Setting sail for fail in the sea of lame.

    Ratings:
    +63 / 0 / -0
    Sorry to be a double-poster, but I have encountered problems with the system's implementation and after several frustrating days of trying, now I'm posting to see if I can get some advice.

    I downloaded and ran NewGen, and then copied and pasted both triggers. It then goes error-happy. The JassHelper window then freezes, and I have to shut my map down cold for a reset. I really need an implementer :(
     
  3. wraithseeker

    wraithseeker Tired.

    Ratings:
    +122 / 0 / -0
    How did you do the check to check if the units has the specific recipe ingredients?
     
  4. Darkrider

    Darkrider Active Member

    Ratings:
    +3 / 0 / -0
    Hey this system is great ^^ congratz (Y)

    i'll start implementing it into my map because it will make me save a lot of space in triggers and i will be able to disassemble =D

    Thx a lot
     
  5. Darkrider

    Darkrider Active Member

    Ratings:
    +3 / 0 / -0
    Im not trying to double post. But i found some weird behavior after implementing the system...

    Most of the times (not always, but many times indeed) you can't shift+pick up items, coz the hero stops the shifted actions. For ie: you want to pick up 6 items while going back to base, but the hero picks up 2 or 3 and then stops. I don't know if this is because some of the items i wanted to pick up were in the system or not (im not sure), but happened.

    The other thing i found is: I ordered my hero to destroy an item (attacking it, duh!) but my hero attempted to pick it up :S... and that happened many times (also, i dont know if the item was or was not in the system)

    ok, i think that's all. Thx for the system again =D
     
  6. Artificial

    Artificial Without Intelligence

    Ratings:
    +325 / 0 / -0
    I'll look into this when I get access to WC. Might be the NEED_PICKUP stuff doesn't quite work with shift ordering.

    Oh lol, I forgot to check the command in the stuff that makes the inventory not need to be full to pick up the item. x) Should be an easy fix.

    I think you should be able to fix both of these problems by setting NEED_PICKUP to false (in case you don't really need that functionality). I'll try to fix these things when I get access to WC, though. Thanks for noting. =)
     
  7. Darkrider

    Darkrider Active Member

    Ratings:
    +3 / 0 / -0
    Np ^^

    yes, well, it is not THAAAT necessary, but i like it :p. I'll test after your fix and see if the game responds well, after that i'll decide if i use it or not :p
     
  8. Darkrider

    Darkrider Active Member

    Ratings:
    +3 / 0 / -0
    Ive been trying to make this thing of buying an item when your inventory is full...

    so i took a few looks at DotA and it seems (as far as i could see) that their shops are not really shops, they are allied units with abilities that looks like items. When you buy something, the item is created and the hero is ordered to pick that item. If we do the maths, your system will try to pick that item and then create the item in the inventory as normal (you cant buy an item, even if it is a rune, with your inventory full)

    am i correct? or im just hallucinating?

    but the part i can't understand is

    If they are abilities... how to make them look like this

    [​IMG]

    while abilities have the little mana icon
     
  9. RaiJin

    RaiJin New Member

    Ratings:
    +40 / 0 / -0
    is this compatiable with 1.24? because i tried it and it didn't work :/

    still a good recipe system though
     
  10. Darkrider

    Darkrider Active Member

    Ratings:
    +3 / 0 / -0
    they are charge gold abilities and you can change their order id (the little gold icons appears with that skill)

    But i can't figure out how to detect the triggering player of the ability instead of the owner of the triggering unit :/
     
  11. Artificial

    Artificial Without Intelligence

    Ratings:
    +325 / 0 / -0
    v0.7b

    Code:
    Fixed 1.24 compatibility issues (stupid patch). Remember to update your Table as well.
    Fixed some bugs with the NEED_PICK_UP stuff.
     When NEED_PICK_UP is true and a unit with full inventory is ordered 
     to pick up an item that's too far away for it to pick up, it won't 
     automatically be ordered to move to the item anymore. (This had
     to be done to fix a bug.)
    I'm also planning to recode this (though I might just be too lazy to do so), so if you have any ideas for functionality to add/remove/modify/etc, now'd be a good time to do so.

    @Darkrider
    What I heard quite a while ago is that DotA doesn't use abilities, but buying units instead of buying items. Anyway, I think the WEHZ is the correct place for that conversation, not this thread (as this system isn't related to buying items when your inventory is full).
     
  12. Darkrider

    Darkrider Active Member

    Ratings:
    +3 / 0 / -0
    actually... after hours and lots of tries test and etc... i could make your system to work with runes and full inventories to create items. But I had to use one of the bugs i mentioned xD... ill post my triggers here for you to see (perhaps you come out with an idea :O)

    Trigger:
    • Transfer Rune to Item
      • Events
        • Unit - A unit Acquires an item
      • Conditions
        • (Item-class of (Item being manipulated)) Equal to Powerup
      • Actions
        • For each (Integer V[56]) from 1 to Max_Items, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Item-type of (Item being manipulated)) Equal to Item_Rune[V[56]]
              • Then - Actions
                • Hero - Create ItemStorement[V[56]] and give it to (Triggering unit)
                • Unit - Order (Triggering unit) to Right-Click (Last created item)
                • Unit - Order (Triggering unit) to Attack Once (Last created item)
                • Unit - Order (Triggering unit) to Stop
                • Skip remaining actions
              • Else - Actions

    In this trigger what i do is: When my hero buys a rune (from shops) it actually uses the rune and can buy it even with its inventory full... so as the rune is removed automatically then i create the item the player wanted to buy and give it to the hero.
    Actually i know that
    Trigger:
    • Unit - Order (Triggering unit) to Right-Click (Last created item)
    doesn't pick up the item, while
    Trigger:
    • Unit - Order (Triggering unit) to Attack Once (Last created item)
    does... (so i order the hero to stop for it not to destroy the item).

    with this simple actions i made your system to create items with full inventory buying from shop. it is not a 100% but an acceptable 90%

    The only problem with this is that: If a player really wants to destroy an item, the hero will attempt to pick it up... so far, i cant fix this :p
     
  13. Artificial

    Artificial Without Intelligence

    Ratings:
    +325 / 0 / -0
    Trigger:
    • Then - Actions
      • Hero - Create ItemStorement[V[56]] and give it to (Triggering unit)
      • Unit - Order (Triggering unit) to Right-Click (Last created item)
      • Unit - Order (Triggering unit) to Attack Once (Last created item)
      • Unit - Order (Triggering unit) to Stop
      • Skip remaining actions

    You could change that part to
    Trigger:
    • Then - Actions
      • Hero - Create ItemStorement[V[56]] and give it to (Triggering unit)
      • Custom script: call RecipeSYS_Combine(bj_lastCreatedItem, GetTriggerUnit())
      • Skip remaining actions

    Then you don't need to use the attack-pickup bug.
     
  14. Darkrider

    Darkrider Active Member

    Ratings:
    +3 / 0 / -0
    =D... thx.

    this of being a guier and trying to implement jass systems sucks :/
     
  15. Darkrider

    Darkrider Active Member

    Ratings:
    +3 / 0 / -0
    hahahha now this is a funny bug xD

    ive been playing around with items and a system that is in my map to move items from hero inventories to a region in map... and i discovered a funny bug in recSYS xD


    pick up a couple of items shifting and not shifting to pick them up, now move the items inside your inventory with right click and clicking other items, and you will notice that your hero moves by it self to one of the positions where your shifted items used to be. What tells me that there might be a location leak too besides this bug
     
    • Like Like x 1
  16. Artificial

    Artificial Without Intelligence

    Ratings:
    +325 / 0 / -0
    You're not using 0.7b, are you? I think I know what the bug is caused by if you're using 0.7, but that's been fixed in 0.7b.

    Anyway, to fix it, you could try changing the line
    JASS:
    if GetOrderTargetItem() == null then

    (just CTRL + F it) to

    Haven't tested that, though, so it might not fix it. ;p

    > there might be a location leak
    There ain't. It's just that when you do GetItemX/Y for an item that's carried by a unit, it gives the X/Y of the location the item was picked up in.
     
  17. Darkrider

    Darkrider Active Member

    Ratings:
    +3 / 0 / -0
    oh, very well then ^^

    yes, i was using system 0.7 :p

    EDIT: yes, seems that condition fixed it ^^ thy
     
  18. shiFt

    shiFt Member

    Ratings:
    +8 / 0 / -0
    Could someone please post example usage of the disassemble function, I cant seem to get it to work.
     
  19. Laiev

    Laiev Hey Listen!!

    Ratings:
    +187 / 0 / -0
    the demomap has one, no?
     
  20. shiFt

    shiFt Member

    Ratings:
    +8 / 0 / -0
    this is what I made to test the function but no avail? Also I edited in the code to drop at the unit "u"s x y

    EDIT

    Working :)
     

Share This Page