Recent posts

Pages 1 2 3 4 ... 10
11
Script Troubleshooting / [XP] Blizz-ABS disables other ...
Last post by tsuchiphox - March 09, 2024, 10:26:24 am
I fixed the other issue this post was talking about, but now i'm having a new issue. Because Blizz-ABS overwrites the input module, another script i'm using for battles does not work correctly. For reference, I am using Timed Hit Add-On by Zephren to add timed hit functionality to the default RMXP battle system. I'm only using Blizz-ABS to have movement improvements and I'm having trouble with removing all the other stuff it does, like for example, making it so that I can't use button inputs in battles.
12
Welcome! / Hi!
Last post by lf567 - March 03, 2024, 12:45:11 pm
hi, i found this forum because i wanted to play an rpg maker game. but I don't actually use rpg maker to make games, i use other software called clickteam, but i enjoy rpg maker games so i decided to register  :D
13
RMXP Script Database / Re: [XP] Heretic's Collection ...
Last post by ItsUnagi - February 25, 2024, 12:22:28 am
Oh, it worked! I guess I just wasn't reading the replies in the thread very thoroughly, thank you for being patient.
14
RMXP Script Database / Re: [XP] Heretic's Collection ...
Last post by KK20 - February 24, 2024, 09:47:38 pm
https://forum.chaos-project.com/index.php?PHPSESSID=fc14dbfbe353909bbceceeb72412a45e&msg=197241
Last message on the page (if the above link doesn't auto-redirect you to it)
15
RMXP Script Database / Re: [XP] Heretic's Collection ...
Last post by ItsUnagi - February 24, 2024, 07:42:04 pm
Hi guys! I'm trying to run the demo, but it gives me an error about the 102E.dll file not being found. I tried following the instructions in the README file by changing the .ini and the .rxproj files to the latest versions (104E.dll and RPG XP 1.05 respectively), and while the error disappears, the game window turns completely black and stops responding every time I open it. I've also tried downloading RPG Maker XP's RTP, but that also has the same problem. Does anyone know why this happens?
16
Script Requests / Re: [RMXP] Adding Self-Scope T...
Last post by Wraith89 - February 21, 2024, 03:35:26 pm
Thanks a lot. I was thinking exactly as you did and attempted to add scope 7 to the conditional but was stuck on disabling the movement of the cursor. It works perfectly!
17
RMXP Script Database / Re: [XP] Global Day-and-Night ...
Last post by KK20 - February 20, 2024, 11:45:35 pm
So now you're using an older version of the script and removed the version check?  :???:

Can't really help you anymore without installing RMX-OS myself, which I'm not going to do.
18
Script Requests / Re: [RMXP] Adding Self-Scope T...
Last post by KK20 - February 20, 2024, 11:32:23 pm
Couple things need to be done. One is to obviously setup the arrow selection to point to the user. The other is to prevent the player from moving the arrow.

So in my script, I had rewritten the two methods update_phase3_skill_select and update_phase3_item_select. I'm just gonna focus on the former for now.
class Scene_Battle
  def update_phase3_skill_select
    # ...
    # If C button was pressed
    if Input.trigger?(Input::C)
      # ...
      # If effect scope is single ally
      elsif @skill.scope == 3 or @skill.scope == 5
        # Start actor selection
        start_actor_select
We can add the user scope in this conditional
elsif @skill.scope == 3 or @skill.scope == 5 or @skill.scope == 7
Now the arrow shows up but we're able to move it around from actor to actor. We'll need to rework the Arrow_Actor class. Add this class to the script:
class Arrow_Actor < Arrow_Base
  attr_accessor :disable_selection
 
  def initialize(viewport)
    @disable_selection = false
    super
  end
 
  alias update_actor_arrow_selection update
  def update
    return update_actor_arrow_selection unless @disable_selection

    super
    # Set sprite coordinates
    if self.actor != nil
      self.x = self.actor.screen_x
      self.y = self.actor.screen_y
    end
  end
end
I've added a disable_selection property to the class. If set to true, you will no longer be able to move the cursor left/right. So now let's set that property:
      elsif @skill.scope == 3 or @skill.scope == 5 or @skill.scope == 7
        # Start actor selection
        start_actor_select
        # Prevent actor selection if scope is the user
        @actor_arrow.disable_selection = @skill.scope == 7
Now just make the same edits to update_phase3_item_select (replacing @skill with @item obviously).
      elsif @item.scope == 3 or @item.scope == 5 or @item.scope == 7
        # Start actor selection
        start_actor_select
        @actor_arrow.disable_selection = @item.scope == 7
Start up your game and confirm that the arrow now appears on user scope and doesn't move.

19
Script Requests / [Resolved][RMXP] Adding Self-S...
Last post by Wraith89 - February 20, 2024, 12:05:15 am
Script referenced: here

One feature I like about this script is the addition of cursor confirming who you target before you select your skills as the default battle system doesn't indicate any of that. I even made it so wecoc's VX Ace random targets also worked with this by adding his respective scopes to the script. However I'm having trouble adding one for self (scope 7) as this isn't defined in the script. I suppose it wouldn't make sense to have it there because if you use a self targeting skill there is no need to point to the enemy side which a single ally scope skill would be able to do.

Basically what I'm asking is if it is possible to add a way to have a cursor point to self (scope 7) added into this script. Thank you.
20
RMXP Script Database / Re: [XP] Global Day-and-Night ...
Last post by Bahamut-XIV - February 19, 2024, 10:12:03 am
ok i got currently so far the server takes my current time but the hud clock keeps staying on 00:00
also when i set a night time nothing happens

the scripts i currently use now are as follow

ates now :

:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Advanced Time and Environment System (ATES) by Blizzard
# Version: 0.4
# Type: Autonomous Timeflow and Environment Controller
# Date v0.3: 11.3.2008
# Date v0.31: 8.4.2009
# Date v0.32: 13.4.2009
# Date v0.33: 4.5.2009
# Date v0.34: 5.5.2009
# Date v0.4: 28.12.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#   
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# #  You are free:
# #
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# #
# #  Under the following conditions:
# #
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# #
# #  Noncommercial. You may not use this work for commercial purposes.
# #
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# #
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# #
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# #
# #  - Nothing in this license impairs or restricts the author's moral rights.
# #
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 90% compatible with SDK 2.x. WILL corrupt old
#   savegames. Can cause incompatibilty issues with DNS-es.
#
#
# Features:
#
#   - complete control over and easy manipulating of time
#   - nice day and night tinting
#   - HUD clock optional
#   - easier to control and more powerful than DDNS
#
#
# IMPORTANT NOTES:
#
# - This system has a working preconfiguration, be aware that a custom setup
#   will need you to understand what each option does, so please read the
#   configuration instructions.
# - Why does this system use switches to determine whether it's day or night?
#   Simple: You can use conditions in enemy attacks to determine whether an
#   attack should be used only at night or only at day.
#
#
# Instructions:
#
# - Explanation:
#
#   This Time System will make your game have daytime and nighttime periods.
#   The screen will be tinted accordingly. You can set up the length of the
#   day. Other features are explained below. Please be sure to configure this
#   system appropriately.
#
#
# - Basic manipulation of ATES:
#
#   This system is based upon your eventing. It will work basically if you
#   want, but with a little bit of using the "Call Script" event command you
#   are able to control this system fully. You can call following commands:
#
#     ATES.on
#   Turns ATES on.
#
#     ATES.off
#   Turns ATES off.
#
#     ATES.tint_on
#   Turns ATES's screen tinting on.
#
#     ATES.tint_off
#   Turns ATES's screen tinting off.
#
#     ATES.clock_on
#   Turns ATES's clock display on.
#
#     ATES.clock_off
#   Turns ATES's clock display off.
#
#     ATES.active?
#   Returns true if ATES is turned on, otherwise false.
#
#     ATES.tinting?
#   Returns true if ATES tinting is turned on, otherwise false.
#
#     ATES.day?
#   Returns true if it's day, otherwise false. Alternatively you can check the
#   assigned switch instead.
#
#     ATES.night?
#   Returns true if it's night, otherwise false. Alternatively you can check
#   the assigned switch instead.
#   
#     ATES.advance(M, H)
#   This will make the time advanced by M minutes and H hours. Any negative
#   value used will cancel the execution of this command.
#   
#     ATES.make_it_day
#   This is a feature from DDNS which allows you to quickly jump to the
#   daytime.
#   
#     ATES.make_it_night
#   This is a feature from DDNS which allows you to quickly jump to the
#   nighttime.
#   
#
# - Enhancement hints:
#
#   If you wish to implement the DDNS further into your game and e.g. allow
#   different behavious of monsters during day and night, you only need to
#   check the the state of the appropriate switch. e.g. If NSWITCH is turned
#   on inflict "Sleep" on one enemy.
#
#
# Additional info:
#
#   The daytime and nighttime tintings were tested appropriately and optimal
#   tinting is being used.
#   Keep in mind that ATES is initially turned off, you need to turn it on by
#   using the ATES.on and ATES.tint_on commands together.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

module ATES
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # switch ID of the "day" switch
  DSWITCH = 51
  # switch ID of the "night" switch
  NSWITCH = 52
  # length of a day in seconds in-game, can't be less than 36, is being
  # quantized into intervals of 36 seconds
  LENGTH = 86400
  # how much time is it when the "day" starts
  DAY_START = 8
  # how much time is it when the "night" starts
  NIGHT_START = 43200
  # makes the screen brighter during "summer" days
  OVERLIGHTING = true
  # makes the screen darker during the night, not recommended
  OVERDARKENING = false
  # display HUD clock
  SHOW_CLOCK = true
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
  $ates = 0.4
 
  #============================================================================
  # ATES::Time
  #============================================================================
 
  class Time
   
    attr_accessor :hour
    attr_accessor :min
   
    def initialize(m = 0, h = 0)
      @hour, @min = h, m
    end
   
  end
 
  def self.on
    $game_system.ates.active = true
    return true
  end
 
  def self.off
    $game_system.ates.active = false
    return true
  end
 
  def self.tint_on
    $game_system.ates.tinting = true
    return true
  end
 
  def self.tint_off
    $game_system.ates.tinting = false
    return true
  end
 
  def self.clock_on
    $game_system.show_clock = true
    return true
  end
 
  def self.clock_off
    $game_system.show_clock = false
    return true
  end
 
  def self.active?
    return $game_system.ates.active
  end
 
  def self.tinting?
    return $game_system.ates.tinting
  end
 
  def self.day?
    $game_system.ates.day?
  end
 
  def self.night?
    $game_system.ates.night?
  end
 
  def self.make_it_day
    $game_system.ates.time.hour = DAY_START
    $game_system.ates.time.min = 0
    return true
  end
 
  def self.make_it_night
    $game_system.ates.time.hour = NIGHT_START
    $game_system.ates.time.min = 0
    return true
  end
 
  def self.day_start
    return DAY_START
  end
 
  def self.night_start
    return NIGHT_START
  end
 
  def self.advance(m = 1, h = 0)
    return false if m < 0 || h < 0
    h += ($game_system.ates.time.min + m) / 60
    $game_system.ates.time.hour = ($game_system.ates.time.hour + h) % 24
    $game_system.ates.time.min = ($game_system.ates.time.min + m) % 60
    return true
  end
 
end

if ATES::DAY_START > ATES::NIGHT_START
  raise 'ATEScfgError: A night can\'t start earlier than a day.'
elsif ATES::LENGTH < 36
  raise 'ATEScfgError: A day\'s length must be equal to or greater than 36 seconds!'
end

#==============================================================================
# Game_System
#==============================================================================

class Game_System
 
  attr_accessor :ates
  attr_accessor :show_clock
 
  alias init_ates_later initialize
  def initialize
    init_ates_later
    @ates = Game_ATES.new
    @show_clock = ATES::SHOW_CLOCK
  end

end

#==============================================================================
# Game_ATES
#==============================================================================

class Game_ATES
 
  attr_accessor :time
  attr_accessor :frame_count
  attr_accessor :active
  attr_accessor :tinting
 
  def initialize
    @time = ATES::Time.new(0, 0)
    @frame_count = 0
    @active = false
    @tinting = false
  end
 
  def update
    if @active
      update_progress
      update_ates_progress
    end
    update_switches
    update_screen
  end
 
  def update_progress
    @frame_count += 1
  end
 
  def update_ates_progress
    ATES.advance if @frame_count % (ATES::LENGTH / 36) == 0
  end
 
  def update_switches
    if ATES.day?
      $game_map.need_refresh = true if $game_switches[ATES::NSWITCH]
      $game_switches[ATES::DSWITCH] = true
      $game_switches[ATES::NSWITCH] = false
    else
      $game_map.need_refresh = true if $game_switches[ATES::DSWITCH]
      $game_switches[ATES::DSWITCH] = false
      $game_switches[ATES::NSWITCH] = true
    end
  end
 
  def update_screen
    $game_screen.start_tone_change(self.get_tint, 0) if @tinting
  end
 
  def day?
    return (@time.hour.between?(ATES::DAY_START, ATES::NIGHT_START - 1))
  end
 
  def night?
    return (!self.day)
  end
 
  def get_tint
    return (self.day? ? self.get_day_tint : self.get_night_tint)
  end
 
  def get_day_tint
    day, night = (ATES.day_start / 3600), (ATES.night_start / 3600)
    ratio = ((@time.hour - day) * 60 + @time.min) * 255 / (60 * (night - day))
    tone = Tone.new(0, 0, 0, 0)
    if ratio >= 224
      tone.red = (232 - ratio) * 4
      tone.green = (208 - ratio) * 2
    elsif ratio >= 192
      tone.red = ratio - 192
      tone.green = 192 - ratio
    elsif ATES::OVERLIGHTING
      if ratio >= 160
        tone.red = tone.green = tone.blue = 192 - ratio
      elsif ratio >= 96
        tone.red = tone.green = tone.blue = 32
      elsif ratio >= 64
        tone.red = tone.green = tone.blue = ratio - 64
      end
    end
    return tone
  end
 
  def get_night_tint
    day, night = (ATES.day_start / 3600), (ATES.night_start / 3600)
    hour = (@time.hour >= night ? @time.hour : @time.hour + 24)
    ratio = ((hour - night) * 60 + @time.min) * 255 / (60 * (day + 24 - night))
    tone = Tone.new(-96, -96, 0, 0)
    if ratio >= 224
      tone.red = (ratio - 256) * 2
      tone.green = (ratio - 256) * 2
      tone.blue = 255 - ratio
    elsif ratio >= 192
      tone.red = ratio - 288
      tone.green = ratio - 288
      tone.blue = ratio - 192
    elsif ATES::OVERDARKENING
      if ratio >= 160
        tone.red = ratio - 288
        tone.green = ratio - 288
        tone.blue = ratio - 192
      elsif ratio >= 96
        tone.red = -128
        tone.green = -128
        tone.blue = -32
      elsif ratio >= 64
        tone.red = -32 - ratio
        tone.green = -32 - ratio
        tone.blue = 64 - ratio
      end
    end
    return tone
  end
 
end


#==============================================================================
# Bitmap
#==============================================================================

class Bitmap

  if $tons_version == nil || $tons_version < 1.6
    alias draw_text_shaded_later draw_text
  end
  def draw_text_full(x2, y2, w2 = 0, h2 = 0, text2 = '', a2 = 0)
    if x2.is_a?(Rect)
      x, y, w, h, text, a = x2.x, x2.y, x2.width, x2.height, y2, w2
    else
      x, y, w, h, text, a = x2, y2, w2, h2, text2, a2
    end
    save_color = self.font.color.clone
    self.font.color = Color.new(0, 0, 0)
    draw_text_shaded_later(x - 1, y - 1, w, h, text, a)
    draw_text_shaded_later(x + 1, y - 1, w, h, text, a)
    draw_text_shaded_later(x - 1, y + 1, w, h, text, a)
    draw_text_shaded_later(x + 1, y + 1, w, h, text, a)
    self.font.color = save_color
    draw_text_shaded_later(x, y, w, h, text, a)
  end
 
end

#==============================================================================
# Clock_Sprite
#==============================================================================

class Clock_Sprite < Sprite
 
  def initialize
    super
    self.x, self.y, self.z = 480, 8, 5000
    self.bitmap = Bitmap.new(128, 32)
    if $fontface != nil
      self.bitmap.font.name = $fontface
    elsif $defaultfonttype != nil
      self.bitmap.font.name = $defaultfonttype
    end
    self.bitmap.font.size = 26
    @colon = true
    draw
  end
 
  def draw
    self.bitmap.clear
    hours, minutes = $game_system.ates.time.hour, $game_system.ates.time.min
    if @colon
      self.bitmap.draw_text_full(0, 0, 128, 32,
          sprintf('%02d %02d', hours, minutes), 2)
    else
      self.bitmap.draw_text_full(0, 0, 128, 32,
          sprintf('%02d:%02d', hours, minutes), 2)
    end
    @colon = !@colon
  end
   
end

#==============================================================================
# Scene_Map
#==============================================================================

class Scene_Map
 
  alias main_ates_later main
  def main
    @clock = Clock_Sprite.new if $game_system.show_clock
    $game_system.ates.update_screen
    main_ates_later
    @clock.dispose if @clock != nil
  end
 
  alias update_ates_later update
  def update
    $game_system.ates.update
    update_ates_later
    if $game_system.show_clock
      @clock = Clock_Sprite.new if @clock == nil
      @clock.draw if ATES.active? && $game_system.ates.frame_count % 40 == 0
    elsif @clock != nil
      @clock.dispose
      @clock = nil
    end
  end
 
  alias transfer_player_ates_later transfer_player
  def transfer_player
    $game_system.ates.update_screen
    transfer_player_ates_later
  end
 
end

server exstension


module RMXOS
 
  def self.load_current_extension
    return GlobalDNS
  end
 
  module Data
    GlobalDNSTimeNow  = '    > Global DNS Current Time: TIME'
  end
 
end

#======================================================================
# module GlobalDNS
#======================================================================

module GlobalDNS
 
  VERSION = 1.01
  RMXOS_VERSION = 2.00
  SERVER_THREAD = true
 
  # START Configuration (make sure it matches the one in the ATES script)
  MIDNIGHT_TIME = 0 # seconds after midnight when in game midnight starts (between 0 and 86400, use a divider of DAY_LENGTH!)
  DAY_LENGTH = 86400 # how many seconds does a full day take (between 24 and 86400, use a divider of 86400!)
  UPDATE_INTERVAL = 1 # how often is time data sent to clients (lower values can increase server load!)
  # END Configuration
 
  def self.initialize
    @mutex = Mutex.new
    @client_times = {}
    self.update_time
    puts RMXOS::Data::GlobalDNSTimeNow.sub('TIME') {self.time_to_timestring}
  end

  def self.mutex
    return @mutex
  end
 
  def self.main
    while RMXOS.server.running
      self.server_update
      sleep(0.1)
    end
  end
 
  def self.server_update
    self.update_time
    logged_in_clients = []
    $clients.each_value {|client| logged_in_clients.push(client) if client.player.user_id > 0}
    time = Time.now
    @client_times.each_key {|client|
      if time - @client_times[client] > UPDATE_INTERVAL
        self.send_time(client, time)
      end
    }
    (@client_times.keys - logged_in_clients).each {|key| @client_times.delete(key)}
    (logged_in_clients - @client_times.keys).each {|key| @client_times[key] = time}
  end
 
  def self.client_update(client)
    case client.message
    when /\ALRQ\Z/, /\AENT\Z/, /\AMEX\Z/ # send DNS time on load request, enter server and exit map
      self.send_time(client)
    end
    return false
  end
 
  def self.send_time(client, time = Time.now)
    client.send("DNS\t#{@time}")
    @client_times[client] = time
  end
 
  def self.update_time
    time = Time.now
    seconds = time.hour * 3600 + time.min * 60 + time.sec
    @time = (seconds - MIDNIGHT_TIME) % DAY_LENGTH
  end
 
  def self.time_to_timestring(time = @time)
    hour_length = DAY_LENGTH / 24.0
    hours = (hour_length > 0 ? (time / hour_length) : 0)
    minute_length = hour_length / 60.0
    minutes = (minute_length > 0 ? (time % hour_length / minute_length) : 0)
    return sprintf('%02d:%02d', hours.to_i, minutes.to_i)
  end
 
end
Pages 1 2 3 4 ... 10