edited May 2016 in ORK Support
Hi there,

I've been informed that I'm to add upwards of 500k items to ORK; these items all come from a database that I can access.

I am going to write something to add the items to ORK (using some variation of ORK.Weapons.Add() and adjusting their data), do you expect anything to go wrong with this? Performance issues? Is Int32.Max my limit of items I can add? I plan on doing this in a loading scene after the game starts so if an item is changed for balance reasons (or whatever) the data will just get downloaded again and imported to ORK.

I'm going to be doing the same thing with Abilities (although ORK.Abilities.Add) but I have to figure out a good way to adjust TargetSettings for each ability.

Thanks!
Post edited by deckrocket on
  • "I've been informed that I'm to add upwards of 500k items to ORK; these items all come from a database that I can access."

    I would HIGHLY recommend you use an extension outside of Ork for this.
    Either find another piece of inventory middleware with a bridge plugin or write something yourself.

    From experience I've found that once several hundred items have been added, moving an item up or down in the list can cause several seconds of lag.
    Now if you are adding items to a list of 500 thousand and doing so dynamically at runtime the results could be calamitous.

    Ork's ability to update items by their editor ID is a double-edged sword.
    The good part is that I can move items around and it automatically updates everything.
    That's a terrific feature for avoiding headaches with mislabeled IDs.
    For example if I have a silver dagger as number 3 in the list of Weapons in the editor and I move it up in the list, it ensures all the combatants I equipped with that silver dagger don't have to be manually reset.

    The downside is that if you ever need to reassign the editor ID it will cause massive lag.
    To see what I mean, try going into Ork and duplicating an item until you have about 500 items in the list.
    Now rename the one at the very bottom and then try moving it up to the top.

    Bottom line: Ork isn't really set up to deal with an astronomical item count.
    It's designed for convenience when dealing with 1,000 items or less.

  • Additionally, having this high amount of items/data will take a heavy memory toll.

    If these aren't 500k different items, just variations of several items, I'd strongly recommend only setting up base items and doing variations with other features, e.g. using the item variables and selected data.

    Also, the item settings/data set up in the editor and actual instances of the items in-game are separate things.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Maybe I am misunderstanding those features.

    How would I make a base item (say - stat modifying weapon), and then have multiple variations for the different combinations of stats and values?

    Purple Sword
    +1 Finesse, +1 Power

    Orange Sword
    +2 Finesse, -1 Power

    Green Sword
    +8 Luck

    Gold Sword
    +500 Health, -3 Power, +5 Luck

    I would assume these would all be the same base item, but I don't know how I would set them up with the different variations.
  • Selected Data is your friend.

    You may want to read this:
    http://orkframework.com/tutorial/howto/selected-data/

    And then follow this tutorial:
    http://orkframework.com/tutorial/gameplay/weapon-upgrade-npc/

    Of course you don't really need the shop components.
    It sounds more like you are making a Diablo-style weapons-with-traits system.
    The events to generate these weapons are runtime won't be complicated, but they will require a lot of nodes.
  • Having one item as a base for different instantiated items depends on the item.

    E.g.:
    If Purple Sword and Green Sword are individual items with different basic settings (e.g. different prefabs, basic stats that are fixed), you should set them up as individual items.
    However, if there are multiple variations of the Purple Sword, they'd all use a single Purple Sword base item and do variations of it by using random stats or (as Klep pointed out) use the selected data feature.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ah okay, thank you very much.
  • "However, if there are multiple variations of the Purple Sword, they'd all use a single Purple Sword base item and do variations of it by using random stats"

    how can you do that in ork? to have random generated to some stats when i loot them from boxes or drops from monsters?
  • You can define random status value bonuses in the settings of the equipment. They're defined per level and can be found in Level Settings > Random Status Value Bonuses.

    Random bonuses have a minimum and maximum value and can optionally only be added by chance. You can also either add all defined bonuses, a random bonus or only the first that will be added (e.g. when using chance).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited September 2016
    Yeap thank you.

    one more question, i m planning to implement Armor Sets, which is the best way to have set bonuses (when all parts equiped u get extra X defence)?
    Post edited by dlevel on
  • Hm, I don't think that's currently possible with equipment.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.