Out of combat talents (lockpick, jump, search...)

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
Tl : dr in Bold
I'm trying to implement 6 talents (named such a way to avoid confusion with skills) in my game.
Said talents should use a user defined base value (chosen at start) and a modifier derived from their stats.

I got a way "working" and completely home made, using 3 variables for each talent, and a common event refreshing in parallel the values of those talent, in case of gear change.

Seeing as i'm afraid to have (3 x Number of actors) parallel events running, i might have to restrict talents to the main character only.
Would having 60~ ish parallel events slow the game ?

My event looks like that :
Sans titre-1.jpg

I tried both the +10 and the ++10 and neither work.
* and / work fine in the script box, but + and - are no-no, why is that ? and how can i fix that ?

If you have a better way to do it, i'm obviously all ears, but i'd like to understand my hardships
Thanks for reading

Nol
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,883
First Language
English
Primarily Uses
RMVXA
Would having 60~ ish parallel events slow the game ?

Short answer is yes, it's going to slow the game down. (Long answer is - it depends on what else your game is doing, and how much of a "Wait" you add at the end of this Parallel event - but having this many PP's always running definitely increases the risk of slowdown.)

Why use Parallel Processes for this kind of thing in the first place? I'm not completely sure what you're trying to do with equipment and stats as they pertain to Talents, but usually for reconciling dynamic values, I recommend reconciling them right before they are needed. Right before a Talent is needed (e.g. when the player chooses to use a "Lockpicking" talent, before the calculation for it is made), make a call to a normal (non-Parallel) Common Event that reconciles the appropriate talent value like you've done above. This way, the processing will only be done when it's needed, rather than bogging down your game all the time.

(If you need visual values updated and always available to the player, you'll want to use coding to have the values update when they are changed, rather than always updating.)

I tried both the +10 and the ++10 and neither work.
* and / work fine in the script box, but + and - are no-no, why is that ? and how can i fix that ?

Not 100% sure but my guess is that it has to do with Order of Operations. Since x += y is the same as "x = x + y", writing x += y + 10 without parentheses might be confusing to the parser, whereas x += (y + 10) should be fine and x += y * 10 would also be fine since the "y * 10" part naturally calculates before anything else due to Order of Ops.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,390
Reaction score
5,082
First Language
English
Primarily Uses
RMMZ
I'm not sure why + and - aren't working for you, as I can do $gameVariables.value(39) + 10 just fine and it works.

60 parallel process events running at once might cause some slight slowdown, but on anything but the most potato-esque of computers it shouldn't be that bad. Depends on how many instructions they're processing I guess.

On that note, for a system like this you may be better off using actual Javascript rather than event commands so you can loop through all the characters in a single process.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,282
Reaction score
10,163
First Language
German
Primarily Uses
RMMV
Just as an added info: parallel processes automatically loop, so placing a loop around the commands will do nothing more.
And breaking the loop will only restart the loop if it is done that way inside a parallel process.

That said, to your question: It depends on what the parallel processes do and how they are programmed.
A single badly designed parallel process can lag even the most powerfull computer in existance while a hundred parallels with good designs might not be noticed on an older computer.
But the more parallel processes you have, the bigger is the risk of something wrong, especially of timing problems.
So you should combine parallels whereever possible.
 

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
@Wavelength
(If you need visual values updated and always available to the player, you'll want to use coding to have the values update when they are changed, rather than always updating.)

I do indeed need visual updates, and i tried to do that with (mem) and (t), basically my event checks if the value it had in MEMory is still identical to the t time value, and if not, it updates the mem and the value itself.

I didn't see a way to do that without constantly checking in the background.

Not 100% sure but my guess is that it has to do with Order of Operations. Since x += y is the same as "x = x + y", writing x += y + 10 without parentheses might be confusing to the parser, whereas x += (y + 10) should be fine and x += y * 10 would also be fine since the "y * 10" part naturally calculates before anything else due to Order of Ops.

Tried with said parenthesis, the addition is still not applied, rest of the event works, no error message.

@Trihan
I'm not sure why + and - aren't working for you, as I can do $gameVariables.value(39) + 10 just fine and it works.

Color me jelly : (

On that note, for a system like this you may be better off using actual Javascript rather than event commands so you can loop through all the characters in a single process.

I.. I can't ^^ i'm just fiddling, i litteraly did the best i could using only my brain.

@Andar
Just as an added info: parallel processes automatically loop, so placing a loop around the commands will do nothing more.
And breaking the loop will only restart the loop if it is done that way inside a parallel process.

Duly noted

So you should combine parallels whereever possible.

I'm not sure how to go simultaneous through all the loops while resetting for the right ones, but i'll look into that as soon as i get my "+" fixed, thanks
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,390
Reaction score
5,082
First Language
English
Primarily Uses
RMMZ
If I get some free time later I'll see if I can make you a plugin for this.
 

LadyBaskerville

Hell-poodle
Veteran
Joined
Sep 12, 2016
Messages
706
Reaction score
636
First Language
German
Primarily Uses
RMMV
I wrote a plugin a while ago that allows automatic variable changes based on equipment. From looking at your screenshots, what you want to do seems a bit more complicated that what the plugin allows for at the moment, but if you want to take a look, the link is in my signature (RMMV Plugins -> Equipment Variables)
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
715
Reaction score
234
First Language
English
Primarily Uses
RMMZ
on Variable 34, you have an error it says $gameVariables.value (39) ++ 10 it shoukd have just 1 +.
 

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
@LadyBaskerville While it is an interesting plugin, my variables will be adjusted by the parameters, which are the ones in turn being affected by item equips.
The connexion is much simpler between those.

@Trihan That would be lovely thank you.

@Zarsla Yeah i mention in the OP trying different methods of having the addition work ; to no avail
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
715
Reaction score
234
First Language
English
Primarily Uses
RMMZ
You could use Quasi Params Plus Plugin, create each as stat and then when you set it up for each actor, use the eval features to set what you want it to be equal to and it'll update for you automatically.
 

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
While this could be a solution, albeit a complex one, it would open new perspectives ;
Sadly i'm weary of stacking multiple large plugins from different scriptwriters, and after a day of fidgetting with it, I can't get it to work.

Either I fumbled, or have an incompatibility ; The 404 you get on help files didn't help either ^^
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,390
Reaction score
5,082
First Language
English
Primarily Uses
RMMZ
This is still on my to-do list Nol, just haven't gotten around to it yet. :)
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
715
Reaction score
234
First Language
English
Primarily Uses
RMMZ
While this could be a solution, albeit a complex one, it would open new perspectives ;
Sadly i'm weary of stacking multiple large plugins from different scriptwriters, and after a day of fidgetting with it, I can't get it to work.

Either I fumbled, or have an incompatibility ; The 404 you get on help files didn't help either ^^
Well what are you trying to do?

For example if I was doing the example from the OP.
in the note tages I'd have this:
SUB: a.agi +10

where Sub is subterfuge and a.agi= the agility of the actor.
 

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
I made the Parameters.json, i wrote
[
{"abr": "STF", "name": "Subterfuge", "default": 0}
]

On actor 1 I added a :
<params>STF: (a.mat-10)*0.5</params>

Then made a skill whose damage was a.STF
Resulted in a 0 (broken formula)

I've rephrased the three needs I had :

- The talent level must be dependant on a parameter AND a user chosen value, susceptible to be modified at a later time

- The talent level must be compatible with status menu core (YF) so as to be shown there

- The talent level must be updated in real time to reflect quick changes to an actor's gear

So far with Quasi's, aside from the whole non working part, i have a hard time making STF show up in the menu, and adding the user input (If
STF: (a.mat-10)*0.5, how is it going to handle STF +1, will it default back to STF: (a.mat-10)*0.5, or STF: (a.mat-10)*0.5 + 1
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
715
Reaction score
234
First Language
English
Primarily Uses
RMMZ
I made the Parameters.json, i wrote
[
{"abr": "STF", "name": "Subterfuge", "default": 0}
]

On actor 1 I added a :
<params>STF: (a.mat-10)*0.5</params>

Then made a skill whose damage was a.STF
Resulted in a 0 (broken formula)

I've rephrased the three needs I had :

- The talent level must be dependant on a parameter AND a user chosen value, susceptible to be modified at a later time

- The talent level must be compatible with status menu core (YF) so as to be shown there

- The talent level must be updated in real time to reflect quick changes to an actor's gear

So far with Quasi's, aside from the whole non working part, i have a hard time making STF show up in the menu, and adding the user input (If
STF: (a.mat-10)*0.5, how is it going to handle STF +1, will it default back to STF: (a.mat-10)*0.5, or STF: (a.mat-10)*0.5 + 1
If your using the damage fotmula STF needs to be lower case, also STF in the parameters json needs to be lower case as well.
If you're using Yanfly Status Menu, you can use DreamX's Show Parameters plugin, to get your stats showing it.

I tend to find that with Quasi's it tends to act like:
STF: (a.mat-10)*0.5 + 1.


Also for your eval code may I recommend using Math.floor(eval code)[Round down always], Math.ceil(eval code)[Round Up always], or Math.round(eval code)[round regular], as the eval code sometimes stays a decimal and it can give damage formulas.
 

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
I'll look into it, but i'm not comfortable using a plugin to allow another plugin to do what I'm needing, it seems to ask for the compatibility stick as soon as RMMV drops a core update.

I'll look into it nevertheless albeit as a last resort, thanks for giving me the option mate
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
715
Reaction score
234
First Language
English
Primarily Uses
RMMZ
DreamX is one of the few plugin makers that I personally trust for compatiblty when it comes to Yanfly Plugins. Basically they work really well together, and I haven't had compatibility problems. (Though most of my plugins are Yanfly, SRD, Himeworks and a few others here and there)
 

Latest Threads

Latest Posts

Latest Profile Posts

Finished the layout for the mansion where the gameplay will mostly occur in! It was kinda tricky to make it work both mechanically and logically, but I made it..!
Mockup for new sprites and tiles.
Demo available-> https://fungolem.itch.io/frozen-soil

Hey folks, I'm looking for just a handful of people to beta test my game and provide some feedback. If you do video/live streaming stuff that is great too (but not required.) Send me a PM if want to try it out!
Banner.png

Forum statistics

Threads
126,853
Messages
1,181,936
Members
166,657
Latest member
Kalibak23
Top