Ah, right. Simply displaying and using the spell's database cost (through a confirmation window sort of deal. "Summon x [y mp]?" Yes/No) would probably be best. It'd probably be easiest for me to manage in game and easiest for you to code. The "mix" skill itself would be free of mp cost and handled as command-menu option (not displayed through the skills menu).
FF5 "Mix"
RGSS3 Scripts (RMVX Ace)No, but it seems like an interesting learning challenge. By this do you mean something that would pretty much handle things such as user-defined costs, cost checks and cost payment?
I don't quite understand what you're describing. Are you looking for a battle-related skill or a crafting system?
Not sure whether it will handle it (really depends on your design), but there's definitely more abstraction and thus less need to know what I'm doing or how I'm doing it.
You would define a couple methods that must be defined, explain what the return value should be, and then write your mix code to behave based on the return values
If all it takes for me to add my own cost checking is to define a method called `check_cost` which returns true/false based on whatever code I write which could be accessing all sorts of data that you have no idea about, then my job is a whole lot easier.
I can write all the complex cost checking I want, and then just tell you whether I satisfy the cost requirements or not.
Same for cost-payment: you just need to say "pay_mix_cost" and then off it goes.
Though I guess how you would actually design it is not so obvious, because you'd have to figure out how to actually get the appropriate Cost class. Maybe you check what kinds of objects are the input. Didn't really think that far, but to me it makes sense to have some abstraction on the costs cause eventually you might have a mixing system that supports all types of RPG::BaseItem objects with all sorts of different behaviors depending on which ones are used.
Actually, on further analysis, it'd probably be better if I had a more flexible comparison algorithm in the first place. The only reason the "mixed" objects need to be the same class is because I only chose to compare id numbers. This allowed me to create a very simple algorithm that relies on Array#sort and <=> (I wanted to be considerate to people who had hundreds of potential item combinations made and avoid potential slow down during battle). Since database objects can have the same ID number, the algorithm is limited.
It'd be a lot simpler all around if I had just made an algorithm that compared an array of database objects directly such as [$data_items[1], $data_weapons[1]]
I'm not sure if a whole new class for costs is needed (I'm inclined to just make new methods in Game_Battler/Game_Actor since that's where all other cost-related stuff is also done), but I wholeheartedly agree with having abstraction to ease other scripters though and I will try to be considerate of that. Game_Battler#make_damage_value annoys me to no end.
I am not looking for more than two different types of items to be mixed at once, but a flexible amount per item that can be different in given situations - mostly just for party size and enemy count.
Basically, for each target affected by the Mix increases either the cost or amount of items required to use it. For example, if I want to do an area of effect Potion heal, it costs 4 Potions when I have 4 party members. One of the two ways I had in mind was to alter formulas based on the party/enemy count, or have it automatically get the amount based on what items you select.
Sorry for my bad explanation, hopefully that was more clear and thanks.
Updated to allow any number of item combinations.
v2.00
v2.00
- You can now mix any amount of items together.
- You can now create mix formulae with any number of items, not just two.
- Combination search algorithm changed.
- The <mix> tag has changed.
- Script call 'get_mix_id_result' has changed. (5/25/2013)
This gem of a script just got shinier. Thanks.
Is it possible to make this script compatible with Archeia's Press turn battle system script? I'm also using Yanfly's battle system and battle commands scripts. If you can't, that's fine. I might be able to find a workaround or just ditch mixing entirely.
Original thread: https://forums.rpgmakerweb.com/threads/ff5-mix.3710/