[resolved]CCOA's Weather

Started by Tazero, December 31, 2008, 11:47:11 pm

Previous topic - Next topic

Tazero

December 31, 2008, 11:47:11 pm Last Edit: January 01, 2009, 01:54:13 pm by MetaKnight
I NEED Help using ccoas wheather script i get and error each time i start my file
Error 'Weather' Line 223 Syntax error occured
I'm using Babs,Tons,ATES,CLRS
.......
Heres the code for you to ponder on


# Random Weather Generator
# Broken Wire
# Version: 3.0
# Date: 1/28/07
module BSR
  # Constructer Event ID
  CONSTRUCT_ID = 1
  # Region IDs ####Please do not edit, though you may add to the list!
  ALL = 'All'
  PLAINS = 'Plains'
  FOREST = 'Forest'
  DESERT = 'Desert'
  ARCTIC = 'Arctic'
  OCEAN  = 'Ocean'
  # Weather Hash
  WEATHER = {
  ALL => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19],
  PLAINS => [1, 2, 4, 5], FOREST => [1, 2, 4, 5, 6, 7, 8, 9],
  DESERT => [18], ARCTIC => [3, 16], OCEAN => [1, 2, 4, 5]
  }
end

class Scene_Map
  #Aliases
  alias brkn_init initialize
  alias brkn_updt update
 
  #Init
  def initialize
    @weather_on = true
    @weather = [0, 0] #Current weather [type, power]
    @memorized = [0, 0] #Memorized weather data [type, power]
    @fade_active = false
    @rage_actice = false
    @count = 0 #Count value for update method
  end
 
  # Memorize Weather
  def memorize_weather
    if !memorized?
      @memorized[0] = @weather[0]
      @memorized[1] = @weather[1]
      @weather[0] = 0
      @weather[1] = 0
      $game_screen.weather(@weather[0], @weather[1], 0)
    end
  end
 
  # Memorized?
  def memorized?
    if @memorized[0] != nil
      return true
    end
    return false
  end
 
  # Restore Weather
  def restore_weather
    if memorized?
      @weather[0] = @memorized[0]
      @weather[1] = @memorized[1]
      @memorized[0] = 0
      @memorized[1] = 0
      $game_screen.weather(@weather[0], @weather[1], 0)
    end
  end
 
  # Enragen the Weather
  def rage_weather
    power = @weather[1] + rand(10)
    $game_screen.weather(@weather[0], power, rand(19) + 1)
    if rand(5) > 3
      @rage_active = true
    else
      @rage_active = false
    end
    update
  end
 
  # Fade the Weather
  def fade_weather
    power = @weather[1] - rand(10)
    $game_screen.weather(@weather[0], power, rand(19) + 1)
    if rand(5) > 3
      @fade_active = true
    else
      @fade_active = false
    end
    update
  end
 
  # Update
  def update
    # Update regularly
    brkn_updt
    if @weather_on == true
      if memorized?
        restore_weather
      end
      types = []
      # Fade Weather
      if @fade_active == true
        fade_weather
      # Rage Weather
      elsif @rage_active == true
        rage_weather
      end
      event = $game_map.events[CONSTRUCT_ID]
      unless event.erased
        unless event.list.nil?
          event.list.each do |event_command|
          if event_command.code == 108 && event_command.code == 408
            line0 = event_command.parameters[0]
            #Weather Update
            if line0.include?(BSR::ALL)
              @count = (@count + 1) % 1400
              if @count == (rand(99) + 1) + 100 and @fade_active == false and @rage_active == false
                #use special Fade or Rage features here if weather_type != 0
                if $game_screen.weather_type != 0
                  if $game_screen.power? > 25
                    @fade_active = true #Make the weather fade out a little.
                    update
                  elsif $game_screen.power? <= 25
                    @rage_active = true #Make the weather get heavier/harsher
                    update
                  end
                end
                #Otherwise, create a random weather effect at low power!
                $game_screen.weather(rand(BRW::WEATHER.keys.size - 1) + 1, rand(10), rand(9) + 1)
              end
            elsif line0.include?(BSR::PLAINS)
              @count = (@count + 1) % 1400
              if @count == (rand(99) + 1) + 100 and @fade_active == false and @rage_active == false
                plains = BSR::WEATHER[BSR::PLAINS].values
                #use special Fade or Rage features here if weather_type != 0
                if $game_screen.weather_type != 0
                  if $game_screen.power? > 25
                    @fade_active = true #Make the weather fade out a little.
                    update
                  elsif $game_screen.power? <= 25
                    @rage_active = true #Make the weather get heavier/harsher
                    update
                  end
                end
                #Otherwise, create a random weather effect at low power!
                n_weather = plains[rand(plains.size - 1)]
                $game_screen.weather(n_weather, rand(10), rand(9) + 1)
              end
            elsif line0.include?(BSR::FOREST)
              @count = (@count + 1) % 1400
              if @count == (rand(99) + 1) + 100 and @fade_active == false and @rage_active == false
                forest = BSR::WEATHER[BSR::FOREST].values
                #use special Fade or Rage features here if weather_type != 0
                if $game_screen.weather_type != 0
                  if $game_screen.power? > 25
                    @fade_active = true #Make the weather fade out a little.
                    update
                  elsif $game_screen.power? <= 25
                    @rage_active = true #Make the weather get heavier/harsher
                    update
                  end
                end
                #Otherwise, create a random weather effect at low power!
                n_weather = forest[rand(forest.size - 1)]
                $game_screen.weather(n_weather, rand(10), rand(9) + 1)
              end
            elsif line0.include?(BSR::DESERT)
              @count = (@count + 1) % 1400
              if @count == (rand(99) + 1) + 100 and @fade_active == false and @rage_active == false
                desert = BSR::WEATHER[BSR::DESERT].values
                #use special Fade or Rage features here if weather_type != 0
                if $game_screen.weather_type != 0
                  if $game_screen.power? > 25
                    @fade_active = true #Make the weather fade out a little.
                    update
                  elsif $game_screen.power? <= 25
                    @rage_active = true #Make the weather get heavier/harsher
                    update
                  end
                end
                #Otherwise, create a random weather effect at low power!
                n_weather = desert[rand(desert.size - 1)]
                $game_screen.weather(n_weather, rand(10), rand(9) + 1)
              end
            elsif line0.include?(BSR::ARCTIC)
              @count = (@count + 1) % 1400
              if @count == (rand(99) + 1) + 100 and @fade_active == false and @rage_active == false
                arctic = BSR::WEATHER[BSR::ARCTIC].values
                #use special Fade or Rage features here if weather_type != 0
                if $game_screen.weather_type != 0
                  if $game_screen.power? > 25
                    @fade_active = true #Make the weather fade out a little.
                    update
                  elsif $game_screen.power? <= 25
                    @rage_active = true #Make the weather get heavier/harsher
                    update
                  end
                end
                #Otherwise, create a random weather effect at low power!
                n_weather = arctic[rand(arctic.size - 1)]
                $game_screen.weather(n_weather, rand(10), rand(9) + 1)
              end
            elsif line0.include?(BSR::OCEAN)
              @count = (@count + 1) % 1400
              if @count == (rand(99) + 1) + 100 and @fade_active == false and @rage_active == false
                ocean = BSR::WEATHER[BSR::OCEAN].values
                #use special Fade or Rage features here if weather_type != 0
                if $game_screen.weather_type != 0
                  if $game_screen.power? > 25
                    @fade_active = true #Make the weather fade out a little.
                    update
                  elsif $game_screen.power? <= 25
                    @rage_active = true #Make the weather get heavier/harsher
                    update
                  end
                end
                #Otherwise, create a random weather effect at low power!
                n_weather = ocean[rand(ocean.size - 1)]
                $game_screen.weather(n_weather, rand(10), rand(9) + 1)
              end
            end
          end
        end
      end
    elsif @weather_on == false
      memorize_weather
    end
  end
end

class Game_Screen
  alias brkn_init initialize
  def initialize
    @power = 0
    brkn_init
  end
 
  def weather(type, power, duration)
    @weather_type_target = type
    if @weather_type_target != 0
      @weather_type = @weather_type_target
      @power = power
    end
    if @weather_type_target == 0
      @weather_max_target = 0.0
    else
      @weather_max_target = (power + 1) * 4.0
    end
    @weather_duration = duration
    if @weather_duration == 0
      @weather_type = @weather_type_target
      @weather_max = @weather_max_target
    end
  end
 
  def power?
    return @power
  end
end



If you were a fish...

Aqua

This isn't ccoa's... -_______-

Besides, it's easier to get help from the creator of the script; ccoa nor Broken Wire (whom I think made the script you posted) are part of this forum.

Hellfire Dragon

January 01, 2009, 05:41:16 am #2 Last Edit: January 01, 2009, 05:44:48 am by Hellfire Dragon
I have CCOA's weather script and that definetly isn't it. Her's (I think it's her, right?) is a better weather script not a random weather script. It makes things like better snow rain and storm, building on the default weather and then adds her own like blood rain and cherry blossom (sakura) pettles. I use all the time.

Considering that there's no instructions in the script (maybe there was instuctions on the site/forum where you found it?), how exactly do you use it? Enable or disable it with a call script command? Always on? And did you try using it without the other scripts, in a new project? And of course, do you have your scripts in the right order?

Shadonking

i use this script and i have no problems at all.

are you by any chance trying to use call script with it because that can cause errors when you type the wrong stuff.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Tazero

January 01, 2009, 01:53:56 pm #4 Last Edit: January 01, 2009, 04:35:31 pm by Starrodkirby86
Nope.....
And sorry got t Wrong it's OS' Script and i have a new bversion 7.0 ^^ so i have no compatability issues
:lock: :dance:

Remember you can't double post within 24 hours of the previous post! Take a look at this: http://forum.chaos-project.com/index.php?topic=4.0 ~Love, Starrodkirby86


If you were a fish...