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

Nol

Regular
Regular
Joined
Oct 22, 2016
Messages
91
Reaction score
7
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

Regular
Regular
Joined
Mar 5, 2013
Messages
39,922
Reaction score
11,871
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

Regular
Regular
Joined
Oct 22, 2016
Messages
91
Reaction score
7
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

Regular
Regular
Joined
Mar 5, 2013
Messages
39,922
Reaction score
11,871
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

Regular
Regular
Joined
Oct 22, 2016
Messages
91
Reaction score
7
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

Regular
Regular
Joined
Mar 5, 2013
Messages
39,922
Reaction score
11,871
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

Regular
Regular
Joined
Oct 22, 2016
Messages
91
Reaction score
7
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

Regular
Regular
Joined
Mar 5, 2013
Messages
39,922
Reaction score
11,871
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

Regular
Regular
Joined
Oct 22, 2016
Messages
91
Reaction score
7
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 Profile Posts

Who would have thought an idea like "I wanna put the character bio in the equip screen" would turn into a bunch of work and fun collaboration @Puppet Knight . Now my Equip/Character screen is the way I want it.
Screenshot 2023-12-03 194313.png
Just one more week of grinding through semester finals and I'll be able to actually work on some games and stuff. Hopefully I'll be able to work on my game document to actually have my ideas somewhere outside of my cranium of madness.
With Day 4 of my advent calendar posted, it's time for y'all to choose what Day 5 will be!

We've seen Strength with our adventurers, so which DnD stat would you like to see in the next NPC: Charisma, Constitution, or Wisdom?
Hello everyone im back haha, so im planning to Restart my RPGMAKER project next year when i get new gear to work, But currently im working in Trading card games, if anyone is interested in this world please visit my website :

From there you will be able yo access to my social network profiles or my Discord server.
Good luck to everyone :)
Going back through and fixin' up the dialogue.
Thanks to @Iron_Brew for helping me with this one. Makes you think.
Jaminham.PNG

Forum statistics

Threads
136,728
Messages
1,269,230
Members
180,445
Latest member
RenkoUsami
Top