FF5 "Mix"

Rello

GERGtheNERD
Veteran
Joined
May 15, 2012
Messages
207
Reaction score
13
First Language
Profanity
Primarily Uses
RMVXA
Fair enough. How should skill costs be handled? Keep in mind that currently with mixing items, there isn't a need to worry about costs. Yes, this is important to thoroughly reply to.
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).
 

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
Have you thought about something like a Cost interface and allow users to define how costs should be handled themselves by inheriting from your Cost class.



Code:
class ICost

end

class ItemMixCost : ICost

end

class SkillMixCost : ICost

end

This would give you more flexibility if you decide to add in different types of mix operations with all sorts of costs and whatever.

You could use the skill cost as an example implementation.
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 can explain my need for it if that would help any. Basically I have a character that can mix consumable items. The math behind it would not work with it as it stands. I'm not mixing items like Potion + Potion = Hi-Potion, my idea behind using this system is to mix party/enemy sized amounts, so that the quantity that is used is spread across everything. The skill would cost TP to use, so it would require more coordination than using a crafting system. I also do not like allocating items that I think I need. I was going to use your crafting system to do all of this, but it feels better to let the player choose how they use their items, and not force them to predict how they want to use them.
I don't quite understand what you're describing. Are you looking for a battle-related skill or a crafting system?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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?
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.
 
Last edited by a moderator:

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
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.
 

Helladen

Deviant Designer
Veteran
Joined
Jul 13, 2012
Messages
635
Reaction score
188
First Language
English
I don't quite understand what you're describing. Are you looking for a battle-related skill or a crafting system?
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.
 
Last edited by a moderator:

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
Updated to allow any number of item combinations.

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)
 
Last edited by a moderator:

Ravenith

Veteran
Veteran
Joined
Mar 27, 2012
Messages
263
Reaction score
15
First Language
Greek
Primarily Uses
This gem of a script just got shinier. Thanks.
 

Omega769

Warper
Member
Joined
Jul 26, 2016
Messages
1
Reaction score
0
First Language
English
Primarily Uses
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top