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.
[VXA] Geomancy 1.0

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best Member2012 Most Mature 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
Geomancy [VXA]
Version: 1.0a
Author: modern algebra
Date: April 28, 2012

Version History


  • <Version 1.0a> 2012.04.28 - Fixed an error with Battle Test
  • <Version 1.0> 2011.12.01- Original Release

Description


This script allows you to set it so that specified skills can only be used on particular types of terrain.

Features

  • Allows you to prevent actors from using certain skills depending on the terrain they are at. This allows you to, for instance, only allow the use of air spells while above ground, or only allow earth spells when not in the water, etc...
  • Very easy to configure

Instructions

To install this script in the demo, see this tutorial. If you wish, you can download a copy of the Scripts.rvdata2 with this script included and test it out.

For instructions on setting the terrains on which skills can be used, see the header of the script.

Script


Code: [Select]
#==============================================================================
#    Geomancy [VXA]
#    Version: 1.0a
#    Author: modern algebra (rmrk.net)
#    Date: April 28, 2012
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#    This script allows you to set it so that certain skills can only be used
#   on particular types of terrain.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    To set it so that a skill can only be used on particular terrain tags,
#   simply put the following code in the notebox of the skill:
#
#        \Terrains[x, y, ..., z]
#
#   where x, y, ..., z are the terrain tags you want to enable it for. If you
#   don't set this code at all, then the skill can be used on any non-excluded
#   terrains.
#
#    You can also do it backwards - if you want the skill to be usable on all
#   terrains EXCEPT specified terrains, then you use the following code:
#
#        \!Terrains[x, y, ..., z]
#
#   where x, y, ..., z are this time the tags you DON'T want to be able to use
#  the skill on.
#==============================================================================

#==============================================================================
# ** RPG::Skill
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new method - valid_terrain?
#==============================================================================

class RPG::Skill
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Valid Terrain?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def valid_terrain?(terrain_tag)
    if !@valid_terrains
      @valid_terrains, @invalid_terrains = [], []
      self.note.scan (/\\(!?)TERRAINS\[(.+?)\]/i) { |match|
        match[1].scan (/\d+/) { |tag|
          if match[0].empty? 
            @valid_terrains.push (tag.to_i)
          else
            @invalid_terrains.push (tag.to_i)
          end
        }
      }
    end
    return false if @invalid_terrains.include?(terrain_tag)
    return true if @valid_terrains.empty? || @valid_terrains.include?(terrain_tag)
    false
  end
end

#==============================================================================
# ** Game_BattlerBase
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - skill_conditions_met?
#==============================================================================

class Game_BattlerBase
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Skill Available?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mal_vxageo_sklconds_6gc1 skill_conditions_met?
  def skill_conditions_met?(skill, *args, &block)
    return false if (!$BTEST && !skill.nil? && !skill.valid_terrain?($game_player.terrain_tag))
    mal_vxageo_sklconds_6gc1(skill, *args, &block) # Run Original Method
  end
end

Credit


  • modern algebra

Thanks


Support


Please post in this topic at RMRK for support.
« Last Edit: April 29, 2012, 01:50:30 AM by modern algebra »

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
So nice of EB to reintroduce terrain tags. Scripts don't get any simpler than that!

Nice work, MA!

*
Small Bat Dev
Rep:
Level 76
2012 Best Artistf*ck u >:(2011 Best Artist2010 Best NewbieParticipant - GIAW 11Bronze - GIAW 92011 Most Attractive Female MemberBronze - Game In A Week VII
And the prize for fastest script made for VXA goes to Modern Algebra!


*
Rep:
Level 82
I wonder if he would have done it had there not been a post about VXAce not being used until scripts were made.

Also, was the OP copy/pasted and edited from the original thread for the VX script? I'm not quite sure if Komodo Frog requests this script for VXAce in particular. I just find it amusing.

Still, nice little script for when we can make use of it. In fact, it might just get used by me for my little project I'm working on for VXAce.
(Why do I always feel like it's the end of the world and I'm the last man standing?)

**
Rep:
Level 65
I tought that Yanfly made it first with his Core Engine. Not sure anyway, but hey! this is awesome. I'll move my project from VX to VXace when it gets full released.

Sorry but, does anyone know how to setup regions? (they are the new areas isn't it?) I don't see a tab on database or a dropdown on troops tab

*
The Hero of Rhyme
Rep:
Level 83
( ͡° ͜ʖ ͡°)
2014 Best RPG Maker User - Story2014 Queen of RMRKProject of the Year 20142011 Best Newbie2014 Best RPG Maker User - Creativity2014 Kindest Member2013 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 Yuyubabe Smiley2012 Best RPG Maker User (Creativity);o
Sorry but, does anyone know how to setup regions? (they are the new areas isn't it?) I don't see a tab on database or a dropdown on troops tab

I downloaded a fan translation patch that has most of the game translated. I've not got a chance to look much at Ace yet. So, i'm not sure, but is this what you're looking for? Or are you asking how exactly to set up the regions?
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 65
I was asking on how to setup region, it was not very intutive but then i found that you can set them doing a right click on a map name (the only that bothers me is that u only can set 3 monsters by region number, but well more that 36 regions must be strange). In that menu you can setup the display name of maps too and general monster encounter like VX had.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best Member2012 Most Mature 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
Well, regions are set using a paint tool, which is what yuyubabe screenshotted.

With regard to monsters, you can set as many monsters as you want per region - you can only set a monster to be in three regions. However, you can easily get around that by making more than one slot with the same monster in it, and setting different regions for the identical troop.

But yeah, regions don't have a specific setup screen like areas did in RMVX. But given that, I think it makes sense to have encounters set up in the map with all other encounters.

**
Rep:
Level 65
true true, but i find weird to find slimes on sea, so general monster encounter is not so good however. With regions we can create sea monsters locations easily :3. I'll create another topic on this board if something else about regions shows up.


Sorry for go out of topic MA', and by the way your new avatar is awesome!.


Edit: My English grammar get worse everyday.
« Last Edit: December 10, 2011, 04:21:17 AM by oriceles »

**
Rep: +0/-0Level 67
RPGVX Advanced (I Do Not Script Tough)
you made so much scripts so far, so i was wondering if SOME wer compatible witth VXA

**
Rep: +0/-0Level 67
RPGVX Advanced (I Do Not Script Tough)
Vx Scripts of course

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best Member2012 Most Mature 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
Without any modifications at all, none of them would be.

Some, however, would only require very little to make them compatible.

**
Rep: +0/-0Level 83
I tried this script in a blank project, and battle test throws me this:


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best Member2012 Most Mature 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
Thanks.

I updated the first post and it should work now. Mind you, it basically turns the script off during battle test so the terrain requirements of the script do not apply. This is because the script depends on terrain tags, and in battle test there are none.
« Last Edit: April 29, 2012, 01:53:07 AM by modern algebra »