RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
DP3's VXA Code Snippets

0 Members and 1 Guest are viewing this topic.

*
*crack*
Rep:
Level 64
2012 Most Unsung Member2012 Best NewbieFor frequently finding and reporting spam and spam bots
DP3's VXA Code Snippets
Version: ???
Author: DiamondandPlatinum3
Date: ???



Planned Future Versions

  • It's pretty much guaranteed
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

  • All Snippets are to be placed in a script slot between Materials and Main
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:
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.






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.




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.




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:
Spoiler for:
This script allows you to check if any actor currently has nothing equipped or if any actor currently has no weapons equipped




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:
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.




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:
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":
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:
Spoiler for:
This script simply stops Battle BGM from playing when you are battle testing



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:
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:
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.





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:
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:
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:
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:
Spoiler for:
This script allows you to run a common event when the player loads a save game.



Show Damage State Messages:
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.





Credit


  • DiamondandPlatinum3


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
« Last Edit: June 09, 2014, 06:35:12 PM by D&P3 »
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Most Mature Member2011 Favourite Staff Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
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.

*
*crack*
Rep:
Level 64
2012 Most Unsung Member2012 Best NewbieFor frequently finding and reporting spam and spam bots
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 :)
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

***
Rep:
Level 77
RMRK Junior
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?

*
*crack*
Rep:
Level 64
2012 Most Unsung Member2012 Best NewbieFor frequently finding and reporting spam and spam bots
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

All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

*
*crack*
Rep:
Level 64
2012 Most Unsung Member2012 Best NewbieFor frequently finding and reporting spam and spam bots
Updated. New Snippets include:
  • Common Event Menu Option
  • Show Damage State Messages
  • Collision Sound
  • Metronome Skill in Battle
  • Outside Event Self-Switch Control


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>
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

*
*crack*
Rep:
Level 64
2012 Most Unsung Member2012 Best NewbieFor frequently finding and reporting spam and spam bots
Updated. New Snippets include:
  • Check if Actor has Nothing Equipped
  • Always Deal at Least 1HP Damage
  • Don't Play Battle BGM on Battle Test

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.
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Most Mature Member2011 Favourite Staff Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Those sound like neat additions D&P3! It's good to see you scripting again.

****
Rep:
Level 43
Somewhat got a project? (\ô/)
GIAW 14: ParticipantParticipant - GIAW 11
There are some real cool snippets you posted, like:
  • Always Deal at Least 1HP Damage
  • Metronome Skill in Battle
  • Give NPCs Random Positions When Entering a Map
  • Collision Sound:

May I use some off them, but for sure great work. :)

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
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.
&&&&&&&&&&&&&&&&

*
*crack*
Rep:
Level 64
2012 Most Unsung Member2012 Best NewbieFor frequently finding and reporting spam and spam bots
Updated. New Snippets include:
  • Battler Breathing Effect
  • Battler Death Hue Transition
  • Block Areas From View
  • Run Common Event On Continue
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

*
Scripter
Rep:
Level 40
Crownless King
Hope this is not a necropost or anything, I just want to say you're amazing. :)  :police:


If you like my work, please do support me on Patreon.
https://www.patreon.com/Soulpour777?ty=h

*
The Hero of Rhyme
Rep:
Level 83
( ͡° ͜ʖ ͡°)
2014 Best RPG Maker User - StoryProject of the Year 20142014 Queen of RMRK2011 Best Newbie2014 Kindest Member2014 Best RPG Maker User - Creativity2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best RPG Maker User (Creativity)2012 Best Yuyubabe Smiley;o
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. ;_;
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]


*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
I love you. ;-;
I'm watching your tutorials.
&&&&&&&&&&&&&&&&

**
Rep: +0/-0Level 83
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?

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
Last Active: October 30, 2018, 07:29:21 AM
&&&&&&&&&&&&&&&&