MV Environmental Mana

Hello everyone, I have an interesting and possibly difficult script request. I have begun working on the sequel to my last game, Blade Fiction. This new game will have a mechanic where the player has the option to cast spells using either their own MP or the mana floating naturally in the environment. If the player chooses to use mana from the environment then the spell will have a 25% damage boost.

In the world of my game, magus (i.e. magic energy) floats freely throughout the environment. It is a natural force flowing through the world that can be used by magic users. This raw magic energy is more powerful than the energy in a person's body. That's why using magus from the environment does more damage.

In battle this would work by the player selecting the spell they want to cast and then an option box will open. It will give the option to use their own MP or to draw from the MP in the environment. The environment MP would be shown by a big bar at the top of the screen. This MP resource is finite and it is shared by all the player characters as well as the enemies. (I would like the enemies to be able to use this shared MP bar 50% of the time as part of their "logic." But I imagine making it available to the enemies would be way harder to program, so this part of the request is totally optional.)

If the player's character runs out of MP they have the option of using the environmental mana. Using the environmental MP gives a 25% damage bonus which gives the player more incentive to use it.

Here is a picture of what it should look like:

battle_environ_MP_edit.png


Please note this mechanic only works in battle. Outside of battle the player would need to use their own MP for healing spells.

It might be interesting to have a set MP for each map the player visits that is a variable that carries over from battle to battle. But that would probably be complicated and I want to keep the request simple. Other games might be able to use a mechanic like that but it's not required for my needs. Thus the environmental MP would refill every battle.

If the environment MP is a variable, then it should be possible to make items that can refill environmental MP in battle as well.

Please let me know if this idea interests you and if you would be willing to work on it. If you need me to give any more details just let me know. Thank you in advance to anyone who checks out my request. This is for my new game Blade Fiction 2. I'm going to create a page for it in the near future.

Also check out my signature to play the first game.
Hmm. I think at its core, this wouldn't be all that different from the HP Cost plugin that ships in the dlc folder. It's little bit trickier due to all the unusual requirements, but… it sounds totally doable.

I also think your two bonus requests (map-specific MP and allowing enemies to use it) sound quite doable.

From a programming standpoint, I think it would make sense for "spell X cast from self" and "spell X cast from environment" to actually be two entirely separate skills, though that doesn't necessarily mean manually creating duplicates of every spell…

All this is just off the top of my head, so I could be wrong about some details. And I'm not sure I'd personally be willing to commit to making it, given that I'm focused on getting my own game ready for release soon.

I would recommend giving a little more detail about this (or perhaps even a visual mockup like you did with the MP bar):

In battle this would work by the player selecting the spell they want to cast and then an option box will open. It will give the option to use their own MP or to draw from the MP in the environment.

As an aside, personally, I think it might become rather awkward to be forced to choose this every time you cast a spell…
It probs be best to set up 2 Skill types.

1. Normal (uses actor MP)
2. Environment (Uses Enviroment MP, "EMP")

For EMP, I would use a Variable for it, then find a plugin to set that Variable as the cost for EMP.
I think you can also make the choice with SRD Skill Extender and use 2 versions of the skill (you can remove part of the code so it doesn't use the mechanic outside battle). Yanfly plugins allow you to set variable skill cost. You can google a plugin that lets you show a variable bar in battle. With enemies you can use Yanfly Battle AI. Also, shouldn't be too complex to set up for each map to have their own variable for the mana bar.
my choice of action.

1 skill => use lunatic code and if you dont use TP, use global TP bar as MP

so if in battle and MP <= mp skill cost use TP bar while in battle.

as if you check in battle, the skill can never be used on the map if MP is lower than 0.

so you basicly check first if its in battle, than check the MP pool else TP pool,
on the map, fall back outside battle => only check mp pool.

but you can make 2 skills 1 for map, 1 for battle, either way can work what the above
told you, but its a way you want for your mechanic.

a variable for this is clean that Solar_Flare suggested, but there are options
and methods that could be used.

there exist nested condition for the lunatic code, which can do exactly this.
Hmm. I think at its core, this wouldn't be all that different from the HP Cost plugin that ships in the dlc folder. It's little bit trickier due to all the unusual requirements, but… it sounds totally doable.

I also think your two bonus requests (map-specific MP and allowing enemies to use it) sound quite doable.

From a programming standpoint, I think it would make sense for "spell X cast from self" and "spell X cast from environment" to actually be two entirely separate skills, though that doesn't necessarily mean manually creating duplicates of every spell…

All this is just off the top of my head, so I could be wrong about some details. And I'm not sure I'd personally be willing to commit to making it, given that I'm focused on getting my own game ready for release soon.

I would recommend giving a little more detail about this (or perhaps even a visual mockup like you did with the MP bar):



As an aside, personally, I think it might become rather awkward to be forced to choose this every time you cast a spell…

Thank you for your insight into this request. It's helpful to get a sense of what's doable and what might be more challenging to implement. I am looking up some plugins suggested by rpgLord69. If I go that route it looks like I will have to create duplicate skills for every spells, which I want to avoid if possible.

What other details would be helpful to you? Here is a picture of how it should look when selecting the character's MP or the EMP (environment MP):

bat_skillPick_edit.png



I think you can also make the choice with SRD Skill Extender and use 2 versions of the skill (you can remove part of the code so it doesn't use the mechanic outside battle). Yanfly plugins allow you to set variable skill cost. You can google a plugin that lets you show a variable bar in battle. With enemies you can use Yanfly Battle AI. Also, shouldn't be too complex to set up for each map to have their own variable for the mana bar.

Thanks for the suggestion. I will give this a try. I found SRD Skill Extender and I will see if I can use the Yanfly Skill Core plug-in to create a custom skill requirement. If this ends up not working for whatever reason then I'll give you guys a holler. I'm really a novice at coding so it may take me some time to figure it all out.
If I go that route it looks like I will have to create duplicate skills for every spells, which I want to avoid if possible.
Awhile ago, I was working on an enchanting plugin which requires creating duplicates of the items, weapons, or armours that you are going to enchant. Instead of manually creating duplicates, I wrote code that automatically creates the duplicates when the game launches and appends them to the end of the database.

This sort of approach would avoid the tedious work of creating each variant (in your case, probably the environmental version of the skill). On the other hand, it would have the downside of rendering you unable to ever reference the environmental version independently of the regular version in event commands. They could still be referenced in script calls if absolutely necessary, though.

I think having the two versions of the skill be technically separate skills greatly simplifies the implementation. It would be possible to code a plugin where one skill offers both options, but that would be quite a bit more complicated, and also means it pretty much needs to be entirely custom – for example, you wouldn't be able to use SRD_SkillExtender for the user choice in that case and would instead need to code a new UI that does almost the same thing.
This looks like an interesting idea.

I'm curious as to how much of this have you already implemented in your game?

I see lots of mock-up pics and "should work" talk, but none of what is already done and working.

The coding seems feasible if you iron out a few details like how does the magus variable get set and if you need the skill insta-selectabke or via a sub menu as suggested above.

For the record, I agree that skill copies should be used as that way you can also consider adding affects to Magus Spells. There's lots of tweaks besides damage that could be useful depending on your battle system.
This looks like an interesting idea.

I'm curious as to how much of this have you already implemented in your game?

I see lots of mock-up pics and "should work" talk, but none of what is already done and working.

The coding seems feasible if you iron out a few details like how does the magus variable get set and if you need the skill insta-selectabke or via a sub menu as suggested above.

For the record, I agree that skill copies should be used as that way you can also consider adding affects to Magus Spells. There's lots of tweaks besides damage that could be useful depending on your battle system.
Thanks for the feedback. I have yet to implement this mechanic at all. I'm not trained in coding and I'm only able to work on the game in the evenings to a limited degree. I'm still reading over the suggested resources and figuring out how to stick them together to get this to work.

I was thinking the magus variable gets set by an event to 200 or 250 when the player initially enters a map. Maybe I can use a common event for that; each subsequent time you enter the map the variable refills by like 25 mp until it gets back to 200 again. Or something along those lines.
Sounds good.

I'm not "trained" in coding either, tho I did take some C++ in school.
That aside, your best bet would be to just try to make things work.
It won't blow up your PC and the forums are around to help (the 6 of us still regularly active here, anyway.)

For now, I'd just say you need the plugins that do this for you as well as one that can show the Magus bar.

To do the basic effect, I recommend Yanfly's Skill core as it can do custom requirements.
To pick the skill, SRD Skill Extender as shown above. (I use both and know they at least work together well.)

You MIGHT need another plugin to get the enemies to use the Magus versions of spells.
Like an advanced AI or something. You'll need to look for that one yourself, but I think Yanfly has one.

To show the bar, you'd need another plugin.
A cursory search pulled this free one
https://forums.rpgmakerweb.com/index.php?threads/bars-with-variables.47119/

It looks like you'd have to tweak things a bit, but the pics seem promising. The author hasn't been online in a few years, but you should be able to get someone to help if there are technically issues with it.

Last thing I'd add is the way you set the Magus variable.
Incrementing the value a bit each time the player enters the map sounds like they could take advantage of that reset at the edge of every map. This is something you might wanna think on as the way you deal with this might have story or world-building implications to your game.
I was thinking it could be that the Magus level resets in towns and once you leave a town, it gets set.
Or when you sleep at an inn. Like the Magus level resets overnight for the whole world. I dunno.

Just some stuff to consider.

Hope this helps!
I was thinking the magus variable gets set by an event to 200 or 250 when the player initially enters a map. Maybe I can use a common event for that; each subsequent time you enter the map the variable refills by like 25 mp until it gets back to 200 again. Or something along those lines.
Feels like you're missing something from this explanation. It sounds like you want each map to track a separate "Magus" level, but if you're doing that with variables, it would mean you need one variable per map. It could work if you don't have that many maps, or if it's one per "area" instead of one per "map" (with an "area" consisting of several linked maps), but I don't think I'd recommend that approach.

Original thread: https://forums.rpgmakerweb.com/threads/environmental-mana.181557/