Damage during battle from Weather

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
624
Reaction score
159
First Language
English
Primarily Uses
RMMZ
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!
 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
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.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
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:

Stats Before Weather:



Turning Weather On:



Showing Stats After Weather Turned On:

Script Link

Hope that doesn't disappoint ^_^
 

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
624
Reaction score
159
First Language
English
Primarily Uses
RMMZ
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?
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
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' :/

^_^
 

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
624
Reaction score
159
First Language
English
Primarily Uses
RMMZ
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
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
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) ^_^
 

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
624
Reaction score
159
First Language
English
Primarily Uses
RMMZ
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%?
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
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. :)
 

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
624
Reaction score
159
First Language
English
Primarily Uses
RMMZ
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.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
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.
 

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
624
Reaction score
159
First Language
English
Primarily Uses
RMMZ
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!
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
624
Reaction score
159
First Language
English
Primarily Uses
RMMZ
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
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Sorry about that. I have now fixed that issue. If you redownload the script it will work fine :)
 

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
624
Reaction score
159
First Language
English
Primarily Uses
RMMZ
Sweet. When I get back on my computer tomorrow, Ill do just that!
 

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
624
Reaction score
159
First Language
English
Primarily Uses
RMMZ
[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...
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
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 :)
 

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
624
Reaction score
159
First Language
English
Primarily Uses
RMMZ
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.. :/
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top