Karbonic

Off Brand OFF
Veteran
Joined
Dec 24, 2015
Messages
94
Reaction score
30
First Language
English
Primarily Uses
RMMV
tumblr_inline_pefmmsQ89p1smxsit_540.gif

I'm working to add a "Blessing" System to my game.
Essentially, when a player prays at a shrine,
they are given the blessing of that shrine until they pray at another shrine, at which point they receive that shrine's blessing.

This would act as a permanent Buff to one of their stats, for instance, Praying at the attack shrine means the player has a
permanent buff for attack, but that attack buff would be lost if they pray at the defense shrine.

Is there any way to do this, with or without plugins?
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,343
First Language
English
Primarily Uses
RMMZ
This should be pretty easy. Make praying at the shrine an event that grants the player a state that isn't removed when resting. I think there's a plugin out there for this (Hime, maybe). This and all of the other shrines should also call a Common Event that removes all of the state's that all of the shines bestow before applying the new one. That should be all there is to it.
 

Tai_MT

Veteran
Veteran
Joined
May 1, 2013
Messages
5,585
Reaction score
5,056
First Language
English
Primarily Uses
RMMV
To be honest, I'd just create a slot for "Blessing" in the inventory. When the player "prays" at the shrine, I'd just have the game automatically put an item in their inventory and then equip it. "Strength Blessing". Then, you can also view its effects at any time from the equip screen. I'd probably have this equipment also "lock" into the slot so a player couldn't swap it out and mess with it.

It'd be easy enough to event it and to reserve a few slots of equipment for it.
<Player Prays At Shrine>
--Unequip Blessing A
--Unequip Blessing B
--Unequip Blessing C
--Unequip Blessing D
--Remove 999 Blessing A From Inventory
--Remove 999 Blessing B From Inventory
--Remove 999 Blessing C From Inventory
--Remove 999 Blessing D From Inventory
--Add 4 Blessing E To Inventory
--Equip Blessing E to Party Member A
--Equip Blessing E to Party Member B
--Equip Blessing E to Party Member C
--Equip Blessing E to Party Member D
<Blessing E Seals Blessing Slot>
 

Otto

Veteran
Veteran
Joined
Apr 24, 2015
Messages
119
Reaction score
70
First Language
Engilsh
Primarily Uses
RM2k3
That should be pretty easy, you probably need just one variable:
Since the blessing is permanent untill you pray at another shine, all you need to do is alter the character's parameters via a normal event at the shrine; in this event the first thing you do is to check the value of said variable; at the beginning of the game it will be zero, because all variables - as we know - start at 0, and also because at the beginning of the game you haven't prayed at any shrine yet.
We make a mental scheme of which shrine equals to which variable value (example: Shrine of Attack = 1, Shrine of Defense = 2, and so on...)

At this ponint the player reaches the Attack shrine, and gets a +10 ATK (just trowing in a random number), the variable takes value "1".

The game progresses and the player now reaches the Defense shrine. He choses to pray at the defense shrine, the event will see that the variable equals 1, so this means that the player has previously visited the attack shrine, therefore the games removes the +10 ATK bonus to the player, then grants him a +10 DEF bonus (again, random value), and this time the value of the variable will be 2.

All and all, your event should look like this (assuming we are praying at the Attack Shrine:

Code:
Conditional Branch: If Variable [Shrine Visited] = 0
  nothing happens
ELSE
  If Variable [Shrine Visited] = 1
   change stats -> Atk -10
 ELSE
  IF Variable [Shrine Visited] = 2
  change stats -> Def - 10
 ELSE
  If Variable [Shrine Visited] = 3
  change stats -> Max HP - 100
 ELSE
  (continue with all existing shrines)
 END
change stats -> Atk + 10
Change Variable -> [Shrine Visited] = 1

and that's it. There's actually tons of ways to do it with eventing alone, this is an easy peasy method, but for example if you want the permanent buff to increase depending on the player's level, you may add a second variable to multiply the buff for the player's level and then increase Attack by that value... that depends on how you want this feature to work :)
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,464
Reaction score
1,474
First Language
Spanish
Primarily Uses
RMVXA
make a number of states, each adding a specific buff, plus another one adding the "resist state" trait negating the whole set, and itself.
your "praying" sequence would be to first add the negation (clean the set, and clean the negation) and then add the buff.
the order in which you add the negation is important, so add the resist to itself at the end.

that's called "multiplexing": you don't need 10 variables to store data, if you can do with 2, one stating where the data will go, and another one storing the data itself.
here, it's the same thing: you don't need a set of add/remove states if one of them can be used to remove the whole set, largely because it's designed that way (you made the system to only accept one state active at any time.)
 

Latest Threads

Latest Profile Posts

 …I think I might need to switch from standard ATK/DEF up/down buffs to parameter altering states. I just had an actor whose usual attack against an enemy does ~25 do a buffed attack against a debuffed enemy for ~600…
just saw that titan quest is free on steam until the 23rd
Zombie status is now complete. I didn't have to do much in the way of changing how healing is applied to undead targets, was just a simple 3 line code. I thought I had to overhaul Game_Action lol. Everything else was doable by events. So.. Zombie: You turn undead. Your element changes to darkness. You're weak to light, you're strong to physical attacks and healing hurts you and revival items will kill you.
My Overworld might be a mix of inspiration from 2D Final Fantasy games, Breath of Fire, Battlechasers: Nightwar, Super Mario World, and Pillars of Eternity. If I can make it more in-depth than just walking from point A to point B, that might do a lot for the gameplay experience. Hmm...

Forum statistics

Threads
115,222
Messages
1,088,193
Members
149,812
Latest member
manases0
Top