I found a script that did the following in ORK2.
How do I write it for ORK3?
I found the information that Weapons has been merged into Equipment, but it is missing in the Script.
Inventory > Weapons/Armors
Weapons and armors have been combined to Inventory > Equipment.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using ORKFramework;
using ORKFramework.Behaviours;
using TMPro;
using System.Linq;
using Unity.Linq;
//using GamingIsLove.ORKFramework;

var weapons = ORK.Weapons.data;
var weaponsList = weapons.Where(x => x.TypeID == typeID).ToList();
idList = weaponsList.Select(x => x.ID).ToList();
  • Equipment is accessed via ORK.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!
  • edited January 2022
    In ORK2
    ORK.Weapons.data

    How can I get it in ORK3?
    Which one in ORK.Equipment?
    Equipment.GetData()?
    I can't figure out how to extract Weapon from the data I got.

    I would like a list of All weapons and All armors.
    Post edited by joeee19 on
  • Weapons and armors are now both equipment, there is no distinction between them.
    There is no equivalent to the data field, as each equipment is now an individual asset.

    However, you can go through the equipment like this:
    for(int i = 0; i < ORK.Equipment.Count; i++)
    {
    Equipment equipment = ORK.Equipment.Get(i);
    }
    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!
  • ORK3.
    Available at: http://orkframework.com/guide/documentation/inventory/shops/
    http://orkframework.com/guide/tutorials/3d-rpg-playground/12-shop/
    I'm working on it, but I don't understand.

    In the Shop, how do I make everything an item for each ItemType?
    I want to sell all Weapons without having to add each one to Shops-Items every time.

    In games with only one Shop, it's a pain to add each new Weapon to the Shop each time you develop a new Weapon.
    Looking at the Help Text, it looks like Use Add Types is the relevant setting for this, but it doesn't work as expected.

    Set Use Add Type to Enable
    Empty all Items.

    →If you do this, you will not be able to sell any items.

    What if I only want to sell all Weapons?
  • The Use Add Type setting handles if item stacking is used according to the item's setup (or the default setup, if the item doesn't use a custom stacking option).

    Adding content to shops by item type is currently not possible. I'll look into adding it in the future.
    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 January 2022
    gamingislove said: I'll look into adding it in the future.
    Thank you very much.
    I took the explanation of Use Add Type in a different way.

    I still think that ORK has become so huge that it is difficult to convey the meaning with only text explanations.
    There are many such double-meaning settings that are difficult to learn.
    It is often difficult to grasp the intent of which RPG game GiL wants to mimic which movement.
    I believe this is the reason for the constant questions on the forums.

    It seems to me that the only way to solve this is as follows
    1: Make a GIF animation of the changes in play mode and post it in the document under the description of the setting name. (You can also post the animation on your Youtube channel and link to it)
    2: Make it so that when you change the ORK editor in Play mode, the game view reflects the movement changes in real time.

    I think it's either of these. It's very tedious, but...
    Post edited by joeee19 on
  • edited January 2022
    https://imgur.com/aLRnXRD.mp4

    Is it possible to create a Shop+Equip menu screen like this one using ORK3's MenuScreen and HUD?

    In ORK2, I was able to create and run a CustomC#Script, but in ORK3, various things stopped working.

    In ORK3, I can use Sprite and TextMesh, and the editor is by far the most convenient, so I would like to upgrade to ORK3.

    As for CustomC#, I don't understand the API in ORK3, especially the following points.
    1: How do I tell ORK that I have selected a weapon from the custom UI?
    2: How do I equip the selected weapon? (Can I do this using the Select Item node?) .
    3: If I change the Buy button to an Equip button, how do I tell ORK that I changed to a custom UI?
    4: How do I set up a preview camera in the ORK editor?

    The best way to do this is with the ORK editor, but it would be great if it could be done with just the ORK editor and the HUD without using CustomC#.

    It just fits with the current trend of mobile RPG UI layout, which I think will soon become obsolete again and move to a new layout design.
    I think the UI for VR RPG games will change more.
    I don't think it is possible to cover all these trends with ORK alone.
    Therefore, I think we need more CustomUI mechanisms like this HUD Player content provider (and for gameObject).
    like this..
    http://forum.orkframework.com/discussion/7012/how-to-use-the-ork3-single-not-prefab-hud#latest

    Without a mechanism to call all actions such as Buy, Equip, Select, GetItemList, etc. with UnityEvents, etc., I think development will be difficult.
    Would it be difficult to make it possible to register ORK's own types such as Item, Equip, Combatant, etc. as ORK Variable? If so, I think it will be easier to work with Out of ORK.
    Currently, there are only basic types such as int/float/vector, which are not flexible enough as variables.
    Post edited by joeee19 on
  • You can still do this like in ORK 2.
    ORK 3's API is a bit different in some cases - mainly the namespace is now GamingIsLove.ORKFramework (and other namespaces, e.g. GamingIsLove.ORKFramework.Components instead of ORKFramework.Behaviours).

    Some things are now also accessed via Makinom (namespace GamingIsLove.Makinom), e.g. check if the game is paused uses Maki.Game.Paused instead of ORK.Game.Paused.

    As for your API questions:

    1) This depends on what you want to tell ORK about that.
    E.g. if it's for notifying ORK about it as a tooltip:
    Maki.UI.Tooltip.TooltipContent = equip;

    2) E.g. on the player (equipping on the first slot it can):
    ORK.Game.ActiveGroup.Leader.Equipment.Equip(null, equip, fromInventory, unequipToInventory, true);
    equip is the EquipShortcut
    fromInventory is a Combatant, pass on null to not take the equipment from an inventory
    unequipToInventory is a combatant (e.g. the player again), the current equipped will be stored in

    3) Not sure what you mean here - if you're using a custom UI, that has nothing to do with ORK's shops?

    4) You mean for prefab view portraits?
    Just like in ORK 2.
    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!
  • gamingislove said: 3) Not sure what you mean here - if you're using a custom UI, that has nothing to do with ORK's shops?
    It's hard to tell. I'll try to think of some more things.
    gamingislove said: 4) You mean for prefab view portraits?
    A camera for shot previews of Ability shots (e.g. FireBall).
    For example, it's like the shot preview in the upper right corner of this video.


    Did you read my previous comment?
    http://forum.orkframework.com/discussion/6964/ork3-weapons-and-armors-scripting#:~:text=I took the explanation
    What do you think about this?
    I had another question today. Anyway, it's hard to understand where the behavior shows up with only text-only HelpText and HowTos and limited tutorials.
  • Such a preview should be doable via portraits - using the Unity UI module, a portrait can also be a prefab, i.e. you can set up a prefab that plays such a video (or an an animation, etc.). The prefab is spawned as part of the UI (via a UI portrait component in your HUD or UI box).

    I've read your previous comment - I'll try to make the explanation for some settings more accessible, if possible.
    I can't make videos or gifs for every setting, though.
    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 January 2022
    How to buy Equipment from a custom script?
    In ORK3, the following methods are missing.
    What should I do instead?

    ORK2
    Inventory.SubMoney(0, equipment.BuyPrice(player),true,true);

    Is it appropriate to use SetCurrency?
    player.Inventory.SetCurrency(ORK.Currencies.Get(0), player.Inventory.GetCurrency(ORK.Currencies.Get(0)) - itemEquipShortcut.BuyPrice(player),true,true);
    This seems to trigger a bug since it sets the value directly.

    Is it appropriate to use Inventory.Drop?
    If so, I don't know how to set the first argument "IShortcut item".
    I don't know how to convert the current player's currency to "IShortcut item". 
    Post edited by joeee19 on
  • Currencies are now treated like regular items, e.g. to remove currency in your example:
    player.Inventory.Remove(new CurrencyShortcut(ORK.Currencies.Get(0), itemEquipShortcut.BuyPrice(player)), -1, true, true);

    What kind of bug are you getting?
    Can you post the error from the Unity console?

    The currency implementation of IShortcut is CurrencyShortcut, which takes the currency (e.g. via ORK.Currencies.Get(0)) and the quantity.
    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 January 2022
    Thank you.
    I will use the Remove method.

    As for the bug, the translation app I'm using translated it wrong (it's DeepL).
    The bug has not been created yet.
    I meant to say that I might create a new bug.
    (For example, the calculation might incorrectly set a negative value directly)

    So, it is not a problem.
    Post edited by joeee19 on
  • Generally, you could also use that function and set the currency - it shouldn't actually be possible to set it to negative values :)
    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.