Hello,
I'm trying to recreate a Pokemon-style fighting system using modifiers for strengths and weaknesses. The modifiers are set up on the combatants and I've been trying to recreate the formulas to match the Pokemon damage system.
There's two formulas, I'm working on.
One that takes into account the accuracy of the specific ability divided by the opponent's evasion and if there's any modifier to enhance/decrease accuracy.
The other one is the damage formula. Which takes into account the power of the ability.
My question is whether there is a way of adjusting the power and accuracy of abilities and then using that data in formulas.
If you're using custom modifiers, e.g. status values or variables, that needs to be set up in your formulas. E.g. if your ability has an accurcy variable (see ability variables), you can get that in formulas via the Selected Data variable origin and action data key (the ability the formula is calculating for is always stored in that, also in schematics of the ability).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I tried this based on your above response text,
If it's not too much trouble, could you post an image of how it's supposed to be set up in the editor?
Thank you!
Do you have any recommendations for how to learn the syntax for schematics and formula? They are so unlike Blue Prints, Play Maker, and Blender Nodes that I'm totally baffled. I finished the 2D RPG tutorial, and went through the schematic and formula documentation, but there is still so much not talked about.
Thanks Again!
Honestly with schematic stuff, for me it's just been a lot of experimenting (and asking GiL haha).
Using one of my schematics as an example, this is how I went about making it so that you can talk to an NPC and answer yes/no to a test battle. If yes, the character runs to their position and so does a new enemy, and a grid battle starts. If they say no, the NPC gives a quip and then that's it.
0. I have some game objects in Scene that I want to use for precise positioning, so first I grab them as an Actor in the Schematic Settings using Find Object.
1. To start, we call into another Schematic I have (you can nest them for shared behaivor) that just runs some start up functionality that I want shared in all of my Dialogue schematics but without having to remember and duplicate, similar to moving shared code into it's own method. This schematic just zooms in the camera and rotates the NPC and player to face each other.
2. Following that, I display my first dialogue asking if the player wants to do a battle. If they say no or press Cancel, I then display another dialogue saying "come back if you change your mind" and then call into my end schematic, which basically just undoes what I did in the start schematic.
3. If they say yes, then I give another dialogue box saying "run up and we'll get you a partner"
4. Here I run the end stuff again (mainly zooms back out the camera).
5. I need my enemy so I spawn an enemy combatant, and tell it to spawn at one of my Actor positions (off screen for immersion), and use the Store in Selected Data option so I can reference them later, but I keep this local since only this schematic will use them.
6. Since I don't want the normal AI controls to kick in, I then manually Block Move AI using the Selected Data key and origin from step 5, so normal NPCs can still wander around in the background.
7. This is a custom node for my customer move controller, but basically it just forwards the position of an Actor (the Enemy battle spot) and has the enemy start moving there. Since Wait isn't checked, we go to the next node instead of waiting for them to get there.
8. Same thing, but this time for the player and we do wait so that both characters are in position.
9. Small wait time to ensure things are in place.
10. Start the battle manually (Battle object is found from the Actors).
(The regenerate node is for testing, ignore it).
And in the end it looks like this:
https://streamable.com/rw3ndo
I've found it best to break things apart to their smallest bits, and then search for those nodes. Using my example, we spawn the combatant and that is a node, then we move the combatant and that is a node.
You can also code it manually and then use a Call Function node to just call that programming if needed too.
Here are all of the nodes with a small description of each that can help searching too:
https://orkframework.com/guide/documentation/features/schematic-nodes/
https://makinom.com/guide/documentation/features/schematic-nodes/
Lastly, don't be afraid to pull open the source and search for the Nodes themselves to see what exactly is going on (or to copy and paste to make your own if needed).
Edit: Hopefully that helped a little, but don't be afraid to ask on the forums or Discord, GiL will give you the official answer here, but I try to help out on the Discord too and cover the other time zones :)
Schematics (and formulas or battle AI) are not visual scripting, so they work differently than e.g. blueprints.
Each node handles a task and defines all it needs for that in it's own settings. E.g. moving object X to position A with speed Z for B seconds. Those values are defined in the node itself and aren't 'plugged in' from any other node.
And each node defines which one comes next, creating the 'flow' of the schematic.
Similarly in formulas, each node also performs a task, e.g. adding something to the formula value, checking something, etc.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!