Damage during battle from Weather

I am looking for a script or method to cause damage or state change in battle based on the current weather. For instance: Snow could cause 10% chance of "Freeze" status or rain can weaken Fire attacks.

For those who know, it is pretty much like weather and how it works in Pokemon.

Thanks!
This request seems right up my street...
Well, firstly, in Ace's normal battle system, there is no weather by default. But I think there are some scripts that can enable weather in battle.

You might want to try a script from Yanfly called field state effects here. For actually applying the state on battle start, it depends on the script you use really.

For state's advanced effects (like 10% chance of freeze or something else), you need to use other scripts though.
And it has been done...

Possible Modifications List:

- Params        - Only requires $D13x - Core Script
- xParams       - Requires Statistic Control
- sParams       - Requires Statistic Control
- Atk Ele       - Requires Elements Control
- Def Ele       - Requires Elements Control
- Parent stats  - Requires ISPDS
- Atk Lvl       - Requires Atk | Def Levels
- Def Lvl       - Requires Atk | Def Levels
- Max TP        - Requires Max TP Control
- Skills        - No Additional Requirements
- States        - No Additional Requirements
 

Proof Of Working Features:

Spoiler
Stats Before Weather:

1394675943967668_zpsda28129a.png


Turning Weather On:

1394676083682629_zpsaa59409a.png


Showing Stats After Weather Turned On:

1394676175113414_zps3c3663ab.png
Script Link

Hope that doesn't disappoint ^_^
Wow, that was quick.. I sure hope I can use it the way I want. 

So for instance, if I make a state that Reduces Fire Attacks, and apply it with your [:state, state id] parameter during Rain, that State will apply to all characters (in and out of battle, even though it only matters while in battle)?

Also, during snow, I can increase Ice Attacks using another State?
Yep, it does that and so much more...

There isn't really any need to work with states really, I only added it as you asked in the OP. You can modify all stats, so there's not really much a state can add to that lol.

I only customized the :rain section of the settings for speed, simply add the [:block, value] of whatever stat you want into the other weather effects.

Also, I am THE KING of doing things quickly... Great for scripting... Not so 'Great' for 'lovemaking' :/

^_^
Don't you need your other Scripts for it? I'm trying to lower my amount of scripts (since I have many already), plus I can't find them on your website.

And I hear ya... XD
Only for certain features.

If you only need params / States / Skills it can do those standalone. If you want to get more creative, it requires more scripts.

All my scripts can be found using the $D13x Engine link below and scrolling to the bottom of the page (under all the screenshots) ^_^
Alright.

I don't mean to bug, but I guess I am having difficulty imagining how to do this, with or without States...

If an attack's Element is "Fire", how do I decrease that attack's damage by, lets say, 40%, without lowering the entire ATK parameter by 40%?
You need my core script and element control script. You then use one of these 'blocks' in your weather settings within the script.

[:atk_ele  ,  4,   0.01],[:def_ele  ,  4,  -0.01],The 4 represents the element id and the 0.01 represents the modification value.

With this, all element 4 (fire by default) damage (atk or def depending on block used) will be changed by value. 🙂
Alright... does your Core and Element Control Scripts do anything to the game by itself? Because I have quite a bit of different scrips already that I hope do not clash. If all they do is create methods/variables/etc. for your other scripts, it should be fine.
Thats all the code does.. Well, it also changes the vocab for stats and the font settings, but those are customizable. The element control script completely rewrites the way elements are handled to allow for both attack and defence element stats. The default ace element system fails badly due to the fact it makes no clear distinction between element defence/attacks.
Alright. I may just end up using States, because that is what I am most comfortable with, and I think I can get it to work, if I decide to for sure implement it. Thanks a ton for everything!
no problem 😀
For some reason, when I have rain set to add a state that makes ATK 110%, right after damage is applied, this error pops up:

Script 'Game_Battler' line 245: NoMethodError occurred.

undefined method '>' for nil:NilClass
Sorry about that. I have now fixed that issue. If you redownload the script it will work fine 🙂
Sweet. When I get back on my computer tomorrow, Ill do just that!
[Moderators, sorry for the double post, this is just to allow him to get notification of this post]

Something else is happening when it shouldnt.... 

When I am in a "Rain" battle, the state is applied nicely. However, when I Escape, it looks like it reapplies the state, because when I change the weather to Normal, and reenter a battle, the states still exist...

Also, is it possible to update the weather in battle when I use a common event to "change the weather"? Like if I wanted a skill to change it?

[Edit:]

There also seems to be a problem with this interacting with Yanfly's States Animations script (http://yanflychannel.wordpress.com/rmvxa/battle-scripts/state-animations/)

As the State animations I have set up dont show when your script is on...
Of course it reapplies the state. The state is constant while the weather is in effect. After you change the weather however, the state should be automatically removed.

Yes, you will be able to change the weather in battle, you may need to use the direct script call thought as Game_Interpreter doesn't allow use of the change weather event command whilst in battle (if i remember correctly).

As it simply adds a new state when the weather is in effect im not sure why it would be conflicting with a state animation script.

I am not at my home computer right now, so I cant check in vx ace. I will have a look when i return and let you know my findings 🙂
What is the direct script call for weather changing? Do you happen to know?

And I don't understand why it was interfering with a state animation script either.. but when I disabled your script, it worked again just fine.. :/

Original thread: https://forums.rpgmakerweb.com/threads/damage-during-battle-from-weather.24917/