03-30-2023, 08:20 PM
(This post was last modified: 03-30-2023, 10:08 PM by DerVVulfman.)
(03-27-2023, 02:26 AM)DerVVulfman Wrote: The second feature is nearly done! I just now need to clean up the code and the temporary/test graphics. The feature... changing/substituted graphics based on what is worn.
. . .
. . .
. . .
SUBSTITUTE[41] = [ 42, [13,14,15,16,17,18,19,20] ]
ARRRRGH!!!! I was writing the instructions for this feature, and it just dawned on me....
The new substitution feature doesn't know if the gear you are testing ( [13,14,15,16,17,18,19,20] ) are pieces of armor or are weapons!!!!
In the above example the ID may change if the player is wearing any of Aluxes's or Basil's armor, or could be replaced if the player is equipped with any knife or bow. Likewise, it doesn't recognize if the item being replaced is a weapon or piece of armor.
SUBSTITUTE[10] = [ 12, [ [24,28] , [24,32] ] ]
Assuming the program was psychic, this would work, allowing me to swap the ID for the plain Felt Hat (#10) with the Saint's Hat if the actor was wearing the Saint's Robe (#24) while carrying either the Mythril Mace (#28) or Mythril Rod (#32). Currently, it only sees the ID numbers which could belong to either weapons or armor... with no way to discern.
So indeed, there is going to be a temporary delay in release of the Paperdoll system update.
EDIT: Okay, problems solved.
First, I now have two different Substition Arrays, SUBSTITUTE_A (for armor) and SUBSTITUTE_W (for weapons). The policy is that you can substitute one armor for another armor, or one weapon for another... but not an armor for a weapon. And this weapon/armor determination works even if the game uses MultiSlots and the player is using a two-weapons style. Pretty good, eh?
Ergo, I could have SUBSTITUTE_A[9] to check for changes to the cotton hat, and SUBSTITUTE_W[9]to check only for possible changes to the Bronze Axe.
Now, for the actual test values, the array of gear to test will no longer look like:
[13,14,15,16,17,18,19,20]
but will instead look like:
['a13','a14','a15','a16','a17','a18','a19','a20']
Before anyone asks ... "Why? If it is an armor testing array, why do you need to specify if the tested gear is armor too?" ... There is a reason. Consider the following test.
SUBSTITUTE_A[10] = [ 12, [ ['a24','w28'],['a24','w32'] ] ]
This array entry allows me to test the "Felt Hat" (#10), and change it into a Saint Hat (#12) if you have the Saint's Robe (#24) and either the Mythril Mace (#28) or Mythril Rod (#32). Clearly, both weapons and armor IDs can be tested, and tested quite well.
So the big dilemma I faced... I fixed. The issue that some would encounter when dealing with weapons or armor when they wished to use the substitution system has been fixed. Beta-testing has been completed.
Now back to RE-writing what I already wrote... and try to finish this up soon.