Item Synthesis Variables (relative to time)

Jhessail

Warper
Member
Joined
Nov 7, 2018
Messages
2
Reaction score
1
First Language
English
Primarily Uses
RMMV
Note - tl;dr synopsis at bottom of post for your convenience.

So, I have this game I'm working on that makes heavy use of time.
Specifically every action taken uses up time and adds to the variables that track the time in game.
Every step passes a little time, every command usable from menu passes time, every combat tracks it's length and adds to the counter.

I love Yanfly's item synthesis plugin, it greatly simplifies item synthesis, but I'm wondering, and I'm not skilled at scripting so I might be missing a very obvious solution, but, what I'm trying to figure out is if there is a way to make this system add an amount to a variable (to pass the time it takes to craft the item) for each different craftable item.

For example, say if you were going to make a potion, that might take 5 minutes, so I'd want to be able to put something into the potion's crafting section that added 5 to the minute tracking variable.

I do see a workaround involving some extra common events to be called by the crafting system, but it would be very resource intensive (basically assign a variable to each craftable item, have it check each to see if they've changed and increase accordingly if they have, would work, but be very top heavy and in conjunction with other complex systems would contribute to slowdown running the game, an undesirable trait to say the least, not to mention the extra time it'd take, the additional variables reserved, and reduction to the effective modularity that the plugin provides).

tl;dr I'm looking for a way to change a variable anytime an item is crafted using Yanfly's Item Synthesis Plugin, set per item. I suspect it can be done through some lunatic mode script, but I'm not familiar enough with scripting to work out the details.

Additional Note - Doubt it matters, but in case it effects responses, the time system is not timer based and does not take real time into account.
 

Jhessail

Warper
Member
Joined
Nov 7, 2018
Messages
2
Reaction score
1
First Language
English
Primarily Uses
RMMV
So, I got this working, thanks to data I found in an old post on a related question by Sarah_yt (thank you) in answer to Yusha.

An example of the code I used for anyone else looking to solve this problem.

<Custom Synthesis Effect>

var x = $gameVariables.value(3);

x = x + 10;

$gameVariables.setValue(3, x);

</Custom Synthesis Effect>

To break that down, x is a created variable within the function, variable 3 is my game's variable that tracks minutes, and yeah, it just gets the variable (which I did not know how to do until reading the similar answer), modifies it according to need and sets it again. Nice and simple, easy peasy, problem resolved. Actually not sure why the searches I did previously didn't come up with the post in question (Yanfly's Item Synthesis and adding variables, posted Jul 18 2017 by Yusha) when I did my presearch before posting this question (likely something wrong on my end, either the computer, or some typo, still annoying because I searched for numerous combinations of words that should have gotten me that result, eh, no matter).
 

xDRAGOONx

Veteran
Veteran
Joined
Jan 22, 2019
Messages
87
Reaction score
69
First Language
English
Primarily Uses
RMMV
Thank you for posting this! It is exactly what I was looking for! After looking at the sample of Lunatic Mode: Custom Synthesis Effects, I knew it was possible to add to variables like this but I couldn't figure it out on my own.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

If you had some musical requests in line with me.. feel free to re post! Corona has killed me and have recently got my internet back <3
I'm now working on procedural generated World Maps for my own project.
Is there anyone who's interested in having this Plugin for his own game?
I have a dream where RMer are not blinded and too dependant on published script / plugins...
RM MV ACE? 2020? Super? Legends? Sword and Shield? 2.5D? RM Pixel? RM 2: Revenge of Squared RTP tiles? Don't mind me, I'm just wondering about what will be the name of the next engine.


So I came up with a new look for the paths, and along the way realized health bars are so overrated, so now a crazy red light trail follows her and gets shorter as her life decreases. :LZSexcite:

Forum statistics

Threads
98,210
Messages
950,357
Members
129,506
Latest member
TakuPlayz
Top