I'm setting up formulas to calculate a challenge rating for combatants in game, one of which needs to first check whether they have a weapon, then check the weapon's type to decide which skill bonuses apply. I thought a logical first step would be to create a 'Select Equipment' node:
Value Type - Value
Value - (not sure what to put hear. tried inputting a few things directly, including the name of an item, and nothing happens)
Change Type - Add
Equipment Settings
All equipment - not checked
Equipment Part - 1: Right Hand
Limit Item Type - not checked
Combatant Settings
Status Origin - User
Group Leader - not checked
The combatant I'm using for testing is set up with a weapon equipped in this slot, but nothing registers. the formula doesn't recognize any of the variables assigned to the item or their values. Also, for my next step, which is to run through a series of 'Check Status' nodes looking for 'Weapon Item Type' I always end up with the skill bonus assigned to 'Hand2Hand'-in other words, the checks always fail. What additional steps do I need to add between these two stages in order to correctly assign whatever weapon (or any piece of equipment) is currently being held by a combatant? Ideally, I'd like to simply check whether any weapon is assigned to them at all, regardless of which equipment slot currently holds it and excluding what's merely carried in their inventory. The tutorials weren't helpful to me in understanding this conundrum, though I'm sure there's a simple enough solution. In any case, figuring this out will help immensely going forward, as I know I'll need to understand this for other formulas as well.
- Value Type > Value
- Value > equipment
In the following nodes, the selected key must match these settings when using selected data for e.g. variables.
However, if you want to check if something is equipped, use a Check Status node, which allows checking for different stat related things like equipment, effects or other stuff.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Nope, that didn't work. I set up a 'Check Variable' right after the 'Select Equipment' node and branched to two separate values to check whether it succeeded.
Variable Origin- Selected
Value Type- Value
Value- equipment (decided to start simple)
Needed- All
Variable Condition 0
Condition Type- Variable
Variable Key
Value Type- Value
Value- Material_Blade (one of the variables attached to the item in the equipment slot)
Is Valid- Yup
Type- Float
Check Type- Is equal
Value- 3 (what it should be, according to the variable)
Failed every time. The 'Check Status' node isn't working for me either. Frankly, I don't believe it's checking in the right place, and I don't notice a setting to direct its target manually aside from selecting either 'User', 'Target' or 'Player', none of which do bubkis. As I stated above, what I'm searching for there is:
Status Needed- Weapon Item Type
Selection- (Should be '18: Sword')
Is Equipped- Check
I've set up a list for it to run through until it hits on something, and it never does. So, in that case, if you could please explain the nodes/steps between 'A' (Select Equipment) and 'Z' (Check Status) that I need to set up to ensure that it checks my equipment properly, that will probably be enough information for me to figure out the rest. Thanks.
Also if you're testing the check status node with a specific item, make sure it has the item type 18:sword, and not a sub category of it. For instance, if you have a category like that: 18:sword > 19:short sword > 20: long sword, and you test it with an equipped weapon an item type long sword, it won't work even though 20:long sword is a sub category of 18:sword.
Check Status allows you to check various status conditions on a combatant.
Select Equipment stores an equipment as selected data, e.g. to change or check variables on that equipment. Selected data stores references to data instances, e.g. of an equipment, a combatant, game object or an item. When using it for variables, it'll try to find them on the stored data, e.g. for game objects or combatants it'll try to find object variables, while for equipment it'll be the equipment variables.
I.e. if you want to use selected data for your equipment checks, it'll allow you to check for equipment variables.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
The initial node is just a basic node. Nothing to see here.
A 'Select Equipment' node follows.
Ignore the jumble of inactive nodes off to the side, they're just testing blocks. The node is named 'weapon' (lower camel). I don't know why. Still don't understand whether it matters what you assign for a value there. Indeed, according to GIL, it shouldn't even matter for what I'm attempting in this particular formula (though it will once I've gotten to its follow up steps), because all I'm trying to get it to do at this stage is check whether my weapon's Item Type matches the one assigned to the check field, like so...
That's the first node in a series of checks--the one following directly after 'Select Equipment'. The one that's actually supposed to trigger, according to the starting item I've assigned to my test combatant, is the very next one, marked 'Sword'.
But the check breezes past, all the way through to the end.
It always returns the value for that lowermost node chain you see leading to the 'Hand2Hand' skill. Some other relevant screens show the Item Type as listed on the Item my combatant is meant to be holding
A field where I placed it into his starting inventory, for good measure
A playful monkey
And where I've set up the weapon to appear as part of my combatant's starting inventory
The field there always appears as blank no matter what I set it to, so maybe that's the problem. If so, I'd like to know what I might be doing wrong there to proceed with troubleshooting. Also, here's a shot of a particular variable on that item I've been trying to reference without any luck.
It just doesn't seem to be linking. It's some basic setting or step that I've ignored, I'm sure, but I really need to figure out what I'm doing wrong here. Incidentally, I was also wondering whether variables set up on an item were also available to be referenced as global variables. In other words, if I create a few formulas intended to define the properties of a specific item variable and just write it in directly a'la 'Check Game Variable', 'Change Game Variable' etc., without first referencing a selected data variable will it still recognize it on an item if I call the formula through an event, and the item/equipment is selected as data in the event?