Im having a bit of trouble figuring out how to implement a custom item system.
I want to have the player be able to override the attack overrides of a weapon.
Say you have a book(weapon) equipped to a weapon slot, which adds 4 new equipment parts(page1,2,3,4) each page is also a weapon. If all 4 page slots contain pages, then the book's attack override[0] needs to equal page1's attack override, and book's attack override[1] should equal page2's attack override[0], ect...
basically the player can equip a book to his attack skills slot and the book overrides the players base attacks (I have that working just fine).
example:
book "Hand Skills Basic", when equipped to attack skill slot, overrides the players base attack with left jab, right jab, left hook, and right hook abilities. I accomplished this by simply setting the item up in the editor with those four attack overrides.
I have a control map that uses one of the 4 overrides from this book each time the attack key is pressed, makes for a nice smooth combo of punches that can be replaced with a combo of kicks when I replace the book with "foot Skills Basic", or slashes when I replace it with "Sword Skills basic"
the book "Custom Atk Skills", when equipped to the attack skill slot, has no attack overrides itself, but give the player four new equipment parts, (page1,2,3,4). Each page has its own attack override. Adding the page "FireLeftHook" to page 1, and "WindRoundhouseKick" to page 2 slot, StoneUppercut to page 3, and WaterRightJab to 4, should let the player use those 4 moves as a combo.
when I do this though I can only ever access the ability of the first page slot.
I have a second control map that checks page1slot @ index0, page2 slot @ index1, page3 slot @ index2, and page4 slot @ index3, when the attack key is pressed. this results in only page 1 ever playing its attack.
My question is, how can I change the attack override values of "custom atk skills" book to the values of each page at runtime, or how can I set up the controlmap to check each page instead of always defaulting to the first move page checked?
I wrote a small script that adds the pages attack overrides to the book, but its not persistant to game saves. I cant really tell from the API or any of the tuts how to create and add an item/equipment from script. Is there a way to do so? I want to be able to name the custom book and save its settings. I could possibly save the variables for it outside of ORK and recreate the item on startup, but i cant figure out how to create a weapon, name it, and add it to the current list.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!