The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: D&P3 on October 01, 2012, 05:48:38 PM

Title: DP3's VXA Code Snippets
Post by: D&P3 on October 01, 2012, 05:48:38 PM
DP3's VXA Code Snippets
Version: ???
Author: DiamondandPlatinum3
Date: ???



Planned Future Versions

Description


These are code snippets I have made over the course of a few months. Figure they may be of use to other people; posting them before I lose track of them in post counts. I know there are a couple I already have. ;9



Instructions

Scripts


Always Deal at Least 1HP Damage (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/battle-scripts/always-deal-at-least-1hp-damage/):
Spoiler for:
This script simply makes it so that damage is always at least 1.
No longer will enemies and yourself deal no damage.



Battle Menu At Top of Screen (http://www.diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/battle-scripts/battle-menu-at-top-of-screen/):
Spoiler for:
This script puts the battle menu at the top of the screen rather than at the bottom where it normally is. It also moves the skill and items box below the battle menu, looks nicer in my opinion.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1169.photobucket.com%2Falbums%2Fr519%2Fdiamondandplatinum3%2FDPs%2520Scripting%2520ScreenShots%2FBattleMenuAtTopOfScreen_ScreenShot01_zps0768d21d.png&hash=8f6264c096972b7d6b4b015e4dd60081b77ddb52)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1169.photobucket.com%2Falbums%2Fr519%2Fdiamondandplatinum3%2FDPs%2520Scripting%2520ScreenShots%2FBattleMenuAtTopOfScreen_ScreenShot02_zpse48d06cd.png&hash=383c8bd83b9c3b652cd0d2016ee24bac60132563)



Battler Breathing Effect (http://www.diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/battle-scripts/battler-breathing-effect/):
Spoiler for:
This script adds a breathing effect to battlers.
This means that enemies will change size when battling in accordance to their breathing.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FvPfNWGL.gif&hash=cdbef718a58a8fc474b6ef83ddc29ee9230ee4a4)



Battler Death Hue Transition (http://www.diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/battle-scripts/battler-death-hue-transition/):
Spoiler for:
This script grants enemy battlers with a Target Hue to reach upon death. What this means is that the more you attack and hurt the Battler, the closer their hue colour effect gets to the target.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FQisYiPh.gif&hash=fe142f7e29fe49c8b6a6ddb9a2e590a9b04f466c)



Block Areas From View (http://www.diamondandplatinum3.net/block-areas-from-view/):
Spoiler for:
This script simply allows you to input stop points for the camera on maps. ie. if you don’t want to have the map scroll to a certain area on the map because that’s a blank space filled with events or if you just purely don’t wish the player to know that area is there yet, you can use this script to stop the player from seeing it.

This script only affects the camera, if you don’t want the player to travel into the unseen area, you’ll need to block it off somehow with other things.



Check if an Actor has Nothing Equipped (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/system-utilities/check-if-an-actor-has-nothing-equipped/):
Spoiler for:
This script allows you to check if any actor currently has nothing equipped or if any actor currently has no weapons equipped

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg4host.net%2Fupload%2F270438415104a141368c1.png&hash=fe1b130208104364b023367bf2142f0ca0ec4643)



Collision Sound (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/system-utilities/collision-sound/):
Spoiler for:
This script plays a collision sound when you try walking on to an non-passable space. This is not used if you have ‘through’ checked on your player on the other hand. Collision sound only works for the Player, it does not play for other events if they try to walk into something they shouldn’t.



Common Event Menu Option (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/menu-scripts/common-event-menu-option/):
Spoiler for:
This script will allow you to put an option in the menu that will run a common event if selected, it also has the option of being disabled with an event switch.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1169.photobucket.com%2Falbums%2Fr519%2Fdiamondandplatinum3%2FDPs%2520Scripting%2520ScreenShots%2FCommonEventMenuOptionScreenShot1_zps921e01e0.png&hash=5b0e02a6bf8a9e55d7262b062ec274990ee80c3c)



Control Escape Ratio (http://www.diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/battle-scripts/control-escape-ratio/):
Spoiler for:
This script will allow you to set a constant rate at which you can escape from battle, as well as setting an item that will guarantee you can escape.



Delay Time Transitions (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/miscellaneous/delay-time-transitions/):
Spoiler for:
This script will allow you to delay when the title screen and battle scene will enter their phase. Its only usefulness is for sound purposes



Determine if "in-battle" (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/system-utilities/determine-if-in-battle/):
Spoiler for:
This script will allow you to set an event switch that will turn on if you are in battle, and turn off if you are not.
It’s useful for changing what an item does if battling compared to if not battling.



Don't Play Battle BGM on Battle Test (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/database-utilities/dont-play-battle-bgm-on-battle-test/):
Spoiler for:
This script simply stops Battle BGM from playing when you are battle testing



Give NPCs Random Positions When Entering a Map (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/miscellaneous/give-npcs-random-positions-when-entering-a-map/):
Spoiler for:
This script allows you to set certain NPCs to have random positions when the game is setting up a map, this allows your NPCs to look somewhat less robot like. Whilst this can be done via events, this script also checks tile passability, so your NPCs won’t end up on a roof if they’re not supposed to.

Included is an event switch that turns off this feature, the purpose of turning off this feature is for cutscenes, wouldn’t want a random NPC to be in your way now would we?

You may also use Regions to give your NPCs specific tiles they can randomise to.



Map does not scroll with Player (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/graphical-utilities/map-does-not-scroll-with-player/):
Spoiler for:
This script stops the map from scrolling with the player. Its only use is to mimic old Zelda style games where the map would scroll when you would change rooms, otherwise staying still.
To scroll a map you will have to use the Scroll Map event.



Metronome Skill in Battle (http://www.diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/battle-scripts/metronome-skill-in-battle/):
Spoiler for:
This script puts in a skill similar to pokemon’s metronome, in the sense that skills will be chosen at random to be used if this skill is used.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1169.photobucket.com%2Falbums%2Fr519%2Fdiamondandplatinum3%2FDPs%2520Scripting%2520ScreenShots%2FBattleMenuAtTopOfScreen_ScreenShot01_zps0768d21d.png&hash=8f6264c096972b7d6b4b015e4dd60081b77ddb52)



Outside Event Self-Switch Control (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/system-utilities/outside-event-self-switch-control/):
Spoiler for:
This script allows you modify one event’s self-switch from another event. This can save you lots of event switches from being used if done correctly.



Play BGM on Load Menu (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/system-utilities/play-bgm-on-load-menu/):
Spoiler for:
This script allows you to play BGM on the Loading menu. When you select ‘Continue’ from the title screen and are taken to the file selection screen, new BGM will play instead of the same title screen music.
Similar to the original Pokemon Gold, Silver & Crystal.



Play SE on Critical Hit (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/battle-scripts/play-se-on-critical-hit/):
Spoiler for:
This script will allow you to play a Sound Effect when any active battler scores a critical hit.



Remove Vehicle Auto-Change BGM (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/system-utilities/remove-vehicle-auto-change-bgm/):
Spoiler for:
This script will allow you to stop vehicles from changing the bgm that is currently playing via the use of an event switch.



Run Common Event On Continue (http://www.diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/system-utilities/run-common-event-on-continue/):
Spoiler for:
This script allows you to run a common event when the player loads a save game.



Show Damage State Messages (http://diamondandplatinum3.net/rpg-maker-scripts/rgss3-vxa/battle-scripts/show-damage-state-message/):
Spoiler for:
This script show messages in battle when you have been dealt damage as a result of a state: such as poison or burn.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1169.photobucket.com%2Falbums%2Fr519%2Fdiamondandplatinum3%2FShowDamageStateMessageScreenShot1_zpsa02cb1f2.png&hash=3375fd76a92cda8a7a686e3c56becbe98c4e792e)




Credit




Thanks


Author's Notes


I will be posting more here as I finish them.

Terms of Use


You may find my Terms of Use Here (http://www.diamondandplatinum3.net/rpg-maker-scripts/terms-of-use/)
Title: Re: DP3's VXA Code Snippets
Post by: modern algebra on October 02, 2012, 03:15:30 AM
Very nice. It's always good to make useful little codes like this public.

The Scroll Prevention script especially is a very neat and simple way to recreate the Zelda feel.
Title: Re: DP3's VXA Code Snippets
Post by: D&P3 on October 02, 2012, 08:34:02 PM
Thanks Modern :) I'm not requiring any credit on that map scrolling script as I didn't do anything besides remove two lines of code and write a description.

I've updated the post with my VX snippets converted, and given the requesters their thanks.

I also noticed that I had a separate thread for the 'BGM on loading menu' script >_>
feel free to remove it if you think it's no longer needed :)
Title: Re: DP3's VXA Code Snippets
Post by: Wiimeiser on October 03, 2012, 02:08:36 PM
I think that first one should be map-specific. What if you want something more Link's Awakening or Oracle based where the dungeons still scroll, or only want one map to do this?
Title: Re: DP3's VXA Code Snippets
Post by: D&P3 on December 02, 2012, 11:05:57 AM
Added a new snippet 'Give NPCs Random Positions When Entering a Map', should have more coming... I'm in the scripting mood.


I think that first one should be map-specific. What if you want something more Link's Awakening or Oracle based where the dungeons still scroll, or only want one map to do this?
That's been fixed too

Title: Re: DP3's VXA Code Snippets
Post by: D&P3 on January 19, 2013, 01:55:19 AM
Updated. New Snippets include:


Also showing off the Metronome Script
<a href="http://www.youtube.com/watch?v=2n5zoZSbzas" target="_blank">http://www.youtube.com/watch?v=2n5zoZSbzas</a>
Title: Re: DP3's VXA Code Snippets
Post by: D&P3 on June 16, 2013, 07:28:29 PM
Updated. New Snippets include:

Also Updated the Random NPC Positions to include the ability to have them only Randomise to certain Region IDs on the map, plus you can now use the first comment to tag an event rather than their name if you'd like, though the first method still works just fine.
Title: Re: DP3's VXA Code Snippets
Post by: modern algebra on June 16, 2013, 09:52:30 PM
Those sound like neat additions D&P3! It's good to see you scripting again.
Title: Re: DP3's VXA Code Snippets
Post by: Gaming Princess Luna on June 16, 2013, 10:01:38 PM
There are some real cool snippets you posted, like:
May I use some off them, but for sure great work. :)
Title: Re: DP3's VXA Code Snippets
Post by: &&&&&&&&&&&&& on June 16, 2013, 10:28:04 PM
Terms of Use


Free for use in commercial or non-commercial projects with credit towards me. You may not claim any of these snippets as your own.
Title: Re: DP3's VXA Code Snippets
Post by: D&P3 on June 08, 2014, 01:10:34 AM
Updated. New Snippets include:
Title: Re: DP3's VXA Code Snippets
Post by: SoulPour777 on August 12, 2014, 10:45:47 AM
Hope this is not a necropost or anything, I just want to say you're amazing. :)  :police:
Title: Re: DP3's VXA Code Snippets
Post by: yuyu! on August 12, 2014, 04:51:01 PM
I'm glad you posted on this, because I entirely forgot about this thread. o.o Maybe I just missed it in the first place?

Man, these are really awesome ;_; My favorite is the NPC position randomizer. I'm thinking I might use that in, like...every game ever. ;_;
Title: Re: DP3's VXA Code Snippets
Post by: &&&&&&&&&&&&& on August 14, 2014, 02:59:14 AM
I love you. ;-;
I'm watching your tutorials.
Title: Re: DP3's VXA Code Snippets
Post by: GreenBanana on April 06, 2019, 01:33:59 PM
Unfortunately, some of your links are dead, preventing people from accessing them. Would you be able to please rehost and mirror them so that your work can survive?
Title: Re: DP3's VXA Code Snippets
Post by: &&&&&&&&&&&&& on April 09, 2019, 05:28:46 AM
Last Active: October 30, 2018, 07:29:21 AM