Recover Mp = Variable (x) + item bonus to var (y)

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
I'd like to limit Mp regen in my world, by making it so that Mages only regenerate when sleeping, and 10% of their Mmp + (bonus from a stat) + (bonus from items)


I envision creating a variable :


Var 1 = Bonus from stat of Actor 1


Var 2 = Bonus from equipement of actor 1


Var 3 = Var 1 + Var 2 + 10% Mmp


Regen MP : Add Var 3


Etc for each actor, (probably the long and painfull way, but if it works...)


but i dont know how i could give items a bonus to a variable, while having this bonus be lost if said item is unequiped.


Also... Is there another more elegant way to do this ?


Thanks for reading


Nol
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,307
Reaction score
8,750
First Language
German
Primarily Uses
RMMV
Since that sleep is an event, you can simply set the regular MP regeneration to zero outside that event and give a calculated number of MP when the event is processed.


The only problem is the time of the equipped parts - it is simple if you only check what is equipped when the event is processed, but that would allow the player to use different equipment during day and only equip the special bonus item when planning to sleep. That way the equipment doesn't give a direct bonus but is checked and gives a bonus by the event.


It is possible to count the time the player has the items equipped when not sleeping, but that would require a bit more on mathematics and the use of a carefully designed parallel process.
 

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
Since that sleep is an event, you can simply set the regular MP regeneration to zero outside that event and give a calculated number of MP when the event is processed.

 Indeed my reasoning so far, the calculation is the part that has me thinking still ;

The only problem is the time of the equipped parts - it is simple if you only check what is equipped when the event is processed, but that would allow the player to use different equipment during day and only equip the special bonus item when planning to sleep. That way the equipment doesn't give a direct bonus but is checked and gives a bonus by the event.



Spoken like a true Munchkin lol


I'm tempted to let this one slide, the game is not an easy "hold my hand" type, but while that way of abusing the system wouldn't hurt it much, it does have some Lore-related problems..

It is possible to count the time the player has the items equipped when not sleeping, but that would require a bit more on mathematics and the use of a carefully designed parallel process.



Reading your post on debugging has made me warry of parralel processes !


In the home made table top game this project is derived from, it take 24h (or a sleep cycle) for an items effect to come into action ; but that feels impossible to replicate here, doesn't it ?


Do you know by any chance how i can add a variable modification to an item, and if said modification will, by default be linked to the equipped state ?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,307
Reaction score
8,750
First Language
German
Primarily Uses
RMMV
 Reading your post on debugging has made me warry of parralel processes !


Do you know by any chance how i can add a variable modification to an item, and if said modification will, by default be linked to the equipped state ?



You can't link a variable to an equipped item (or any other passive object) directly, that's why I said you'll need a parallel process. And while parallel processes can cause problems when used without thinking, they are in the engine for a reason - because sometimes you need them.


What you need to do is a combination of two parallel processes - one to create time, because without a time process the game has no time.


And the second parallel process needs to check everything that needs time to take action, counting the time cycles the equipment is worn and comparing it to the conditions for the effects. That is the process that needs to be written carefully, because you need one process checking everything (it would be very bad to have different parallel processes checking different items as that will cause confusion).
 

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
The only problem is the time of the equipped parts - it is simple if you only check what is equipped when the event is processed

Oh i thought that meant there was a "simple way" of doing it ?


Did you mean conditional checks by naming all the Mp regen items, and checking for their presence or not ?


I'm not up to the task of parralel processes yet, it feels daunting to someone who doesnt have the syntax for most basic damage formulas
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,307
Reaction score
8,750
First Language
German
Primarily Uses
RMMV
yes, if you ignore the time just use a conditional branch for checking which items are equipped, and add a bonus based on that.


That way is simple, but not short - you still need one conditional branch for each item and each actor.


Anything else requires a plugin or a combination of script commands.
 

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
Yeah that's impossible, with over 300 anticipated items, even if only 1/5 give a bonus, and with 30 actors... it's my life that will be conditionnal ^^


What about a stacking state added by the item ? and said state using a script line to add a Var ?


My worry is that those wont be removed with the item
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,307
Reaction score
8,750
First Language
German
Primarily Uses
RMMV
no, in such a case you should either ask for a small plugin handling that directly or look for a way to gain the same effect from existing plugins.


One possibility that comes to mind is using a passive state plugin. Those plugins activate states on notetags, and those notetags can (depending on the plugin) be placed on equipment. This is what you could try with such a plugin:


make your equipments give states to the actors, and have those states do nothing (and no icen etc).


Then in the event you only need to check the actors for states, and it doesn't matter from which item the states come.


Still a lot of work on eventing, and has the problem that each state can only be there once on the actor.


Another option is a plugin that runs a common event on equip - in that case the common event can count up or down the variable.


Again an indirect way, but possible.


A third way is requiring a bit of scripting knowledge: you can use the meta function (see help file) to access the tags you write yourself, and use a small script to add the values of the tags in your equipment. That might be the best option, but I don't know how the meta function handles several notetags of the same type, you'll probably need help writing that scripted loop.
 

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
I've asked for too many plugins already ; The State workaround is something that speaks to me, so i'll head that way for now, and possibily change it later when i understand more about coding.


As usual, this was very helpful, thank you.
 

Latest Threads

Latest Posts

Latest Profile Posts

So much game make... I needs to rest. The foods call.
-Casino with bunnysuit green check.png
1638563168795.png
Monday December 6th 2021 at 7PM Hawkzombie will stream A Thief's Voyage on his Twitch.

Hawkzombie Twitch

Check it out.​
Ladies and gentlepeeps, I'm working on a Chuck E Cheese horror game! Did you know that in the 80's, in the Pizza Time Theater, Helen Henny was a separate character who performed in a separate room called the Cabaret? She was one of the possible guest stars there, and she was a Hollywood star at the time. But this particular unit seems to have a dark secret...
I'm a little creator who work on a little game project...
Love drawing and 2D animation, my goal is to make a little RPG with my artstyle ! :kaojoy:

Forum statistics

Threads
117,157
Messages
1,105,037
Members
153,241
Latest member
psycopat27
Top