Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Geomacy mini script
#1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


okay this is the easiest way for the scripting illiterate to do this......

first make a base skill... in the demo mine is at position 81 and is called geomancy, now make the skills that you are gonna have it change to based on the battle background... in the demo the skills are all the ones below skill #81 but i will only use two of them...


open up the script editor, make a new script, right click-->insert, call it geomancy or whatever...and paste this in there


Code:
#========================================
# Simple skill manipulation by makeamidget, emphasis on "simple"
#========================================
class Geomancy
  
  def initialize
    case $game_map.battleback_name
    when "001-Grassland01"
       $skill = $data_skills[86]
    when "001-Woods01"
      $skill = $data_skills[86]
    when "005-Beach01"
      $skill = $data_skills[87]
    end
    actor = $game_actors[1]
    actor.forget_skill(81)
    actor.learn_skill($skill.id)
  end
end


okay, i'll explain what this does, step-by-step, well from the initialize step anyway..

Code:
case $game_map.battleback_name

based on the name of the current map...

Code:
when "001-Grassland01"

when the battlebackground name is 001-Grassland01, it will execute whatever is between this line and either the next when statement, or until it comes to an end, so in the next line it assigns to the global variable $skill the skill you want it to use when you have the battleback 001-Grassland01

the same is true for the next statement, when you put in a new when statement, you must put in the name exactly as it appears in the battlebacks folder, and it must be inclosed by ""

Code:
actor = $game_actors[1]
    actor.forget_skill(81)
    actor.learn_skill($skill.id)

assigns $game_actors[1] to the instance variable actor, to change the person in the party that uses this skill, change the 1 to the number in the party that will use this... right now it is arsches(1)..

it then make him forget the base skill (geomancy) which i put in skillid 81, so change this to the skill that you will use as a base, this will also be the skill that is seen when you enter the skill menu from the map, and makes him learn the skill that was assigned to $skill, which is determined by the battleback

now go to Scene_Battle1 and right under main put

Code:
@skill_check  = Geomancy.new

this is so that it will run the check at the beginning of the battle and change the skill accordingly

still in Scene_Battle 1 search(ctrl+shift+f) for def battle_end(result) and right below that add

Code:
actor = $game_actors[1]
    actor.forget_skill($skill.id)
    actor.learn_skill(81)

this is to make him forget the skill that was based on the battleback and learn the base skill again, you have to learn and forget so that the skills are useable in battle...


if there are any questions please check out the demo first, if that doesn't help then ask away



.zip   geomancy.zip (Size: 209.72 KB / Downloads: 1)
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Change character script jaigai 0 2,737 11-19-2006, 01:00 PM
Last Post: jaigai
  Just a modification of Abyssos' facs script lumina... 0 2,592 11-01-2006, 01:00 PM
Last Post: lumina...
  Credit Script 1.1 acoole 0 2,417 10-24-2006, 01:00 PM
Last Post: acoole
  Script Dev Kit Nick 0 2,794 10-15-2006, 01:00 PM
Last Post: Nick
  Opening Image script sasuke89 0 2,020 07-24-2006, 01:00 PM
Last Post: sasuke89
  Change Color of The diferent Status Script MASTERLOKI 0 2,269 07-18-2006, 01:00 PM
Last Post: MASTERLOKI
  Event Name and ID Search Script Hadriel 0 2,026 06-21-2006, 01:00 PM
Last Post: Hadriel
  Currency Script Split 0 2,273 05-18-2006, 01:00 PM
Last Post: Split
  Book Script and Utility Bruth 0 2,218 05-07-2006, 01:00 PM
Last Post: Bruth
  Individuality Script DrakoShade 0 2,176 03-12-2006, 01:00 PM
Last Post: DrakoShade



Users browsing this thread: