XP 스크립트

http://www.gamebaker.com/rmxp/scripts/settings-control.htm
  sandgolem씨의 스크립트 설정을 조작하거나 저장하는 역할을 하는 스크립트로, 다른 스크립트들 위에 있어야 합니다.  몇몇 스크립트 사용시 필수.


#=============================================================================
# ** SG Settings Control
#=============================================================================
# sandgolem
# Version ZERO.b
# 3.04.06
#=============================================================================
#
# Thanks Saucetenuto, SephirothSpawn & Trickster!
# This script wouldn't exist without their help
#
#=============================================================================
#
# To check for updates or find more scripts, visit:
# http://www.gamebaker.com/rmxp/scripts/
#
# To use this script, copy it and insert it in a new section above "Main",
# under the default scripts and the SDK if you're using it. This script
# MUST be above all the SG Scripts and any that rewrite loading/saving.
#
# This script controls and saves all settings for the SG Scripts
#
# If you're adding new scripts to an old game and need to convert people's
# saved games, check the above site soon for SG Settings Converter
#
# Have problems? You can leave me a message at:
# http://www.gamebaker.com/users/sandgolem
#
#=============================================================================
#
# Commands added, can be used in event script:
#  sg_on('name')                    - turns that name to true
#  sg_off('name')                    - turns that name to nil (off)
#  sg_set('name','word')            - turns name to the following setting
#    or sg_set('name',#)             
#  sg_ar('name','','',#,...)        - creates a new array, replacing another
#                                      that has the same name
#  sg_ast('name','word','newword')  - turns the spot where word is in the
#                                      array to the newword
#  sg_ast('name',#,'newword') or    - turns what's placed at spot # in the
#    sg_ast('name',#,#)                array to the third option. Note: The
#                                      arrays start at 0, not 1
#
# Be careful while setting arrays in the event script window, if it splits the
# line during a string your string will have a n attached (and won't work).
#
# I'll see about releasing a fix for that before this script is ver 1
#
#=============================================================================

$game_sg = { 'enabled' => true }

def sg_on(name)
  $game_sg[name.downcase] = true
end
 
def sg_off(name)
  $game_sg[name.downcase] = false
end
 
def sg_set(name,set)
  $game_sg[name.downcase] = set
end

def sg_ar(array_name_string, *args)
  for i in 0...args.size
    if args[i].is_a?(String)
      args[i] = args[i].chomp
    end
  end
  $game_sg[array_name_string.downcase] = args
end

def sg_ast(array_name_string, changing, new)
  sg_temp = $game_sg[array_name_string]
  sg_temp2 = 0
  if changing.is_a?(String)
    loop do
      if sg_temp2 > sg_temp.size
        p 'Setting to change with sg_ast does not exist! Contact game creator'
        p 'Array named:', array_name_string, sg_temp
        p 'Attempted to change:', changing
        return
      end
      if sg_temp[sg_temp2] == changing
        sg_temp[sg_temp2] = new.chomp
        $game_sg[array_name_string] = sg_temp
        return
      end
      sg_temp2 += 1
    end
  else
    sg_temp[changing] = new.chomp
    $game_sg[array_name_string] = sg_temp
  end
end

begin
  SDK.log("SG Script Control", "Sandgolem", 1, "24.03.06")
  @temp == true
  class Scene_Save < Scene_File
   
    alias sandgolem_control_save_write write_data   
    def write_data(file)
      sandgolem_control_save_write(file)
      Marshal.dump($game_sg, file)
    end   
  end   
   
  class Scene_Load < Scene_File     
     
    alias sandgolem_control_load_read read_data   
    def read_data(file)
      sandgolem_control_load_read(file)
      $game_sg = Marshal.load(file)
    end     
  end
 
  rescue
  if @temp != true # if no sdk
    class Scene_Save < Scene_File
     
      alias sandgolem_control_save_write write_save_data     
      def write_save_data(file)
        sandgolem_control_save_write(file)
        Marshal.dump($game_sg, file)
      end     
    end   
   
    class Scene_Load < Scene_File     
     
      alias sandgolem_control_load_read read_save_data
      def read_save_data(file)
        sandgolem_control_load_read(file)
        $game_sg = Marshal.load(file)
      end     
    end
  end
  @temp = nil
end

# Don't change this unless you know what you're doing

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
61 기타 Near Fantastica's SDK Test Bed 3 file 백호 2009.02.22 885
60 메뉴 Customizable Ring Menu by SephirothSpawn 백호 2009.02.22 884
» 기타 SG_Settings Control by sandgolem 백호 2009.02.22 884
58 기타 [XP/VX/VXA] Drago Core Engine Alkaid 2014.02.13 883
57 아이템 Easy Item & Gold Gain by SephirothSpawn (SDK호환) 백호 2009.02.22 880
56 기타 아래 스크립트에 대한 Guillaume777님의 개량판입니다. 백호 2009.02.22 880
55 기타 Dynamic Stores by Astro_mech@rmxp.net 1 file 백호 2009.02.22 878
54 온라인 인터넷 웹 상에서의 시간을 취득하는 스크립트 1 이우 2016.05.24 872
53 메뉴 1-Scene CMS 1.03 by LegACy@rmxp.org (SDK호환) file 백호 2009.02.22 871
52 기타 Difficulty Options by SephirothSpawn 백호 2009.02.22 869
51 기타 RM2K Facesets, Inn & Windowskin Colors by DerVVulfman@rmxp.org 1 file 백호 2009.02.22 866
50 스킬 [KGC] Skill Grouping 백호 2009.02.21 861
49 이동 및 탈것 SG_Wait for Move Completion Fix by sandgolem (SDK호환) 백호 2009.02.22 860
48 기타 Introduction & optional Splash 2.1 by SephirothSpawn (SDK호환) 1 백호 2009.02.22 860
47 기타 Quick Animations by SephirothSpawn (SDK호환) 백호 2009.02.22 851
46 기타 [XP/VX/VXA] Map Screenshot by LiTTleDRAgo 1 Alkaid 2014.02.13 850
45 아이템 SG_Escape Only Items by sandgolem (SDK호환) 백호 2009.02.22 850
44 이동 및 탈것 Memorize Location R2 by dubealex file 백호 2009.02.22 846
43 기타 Sized Events 0.1 by Toby@rmxp.org file 백호 2009.02.22 845
42 스킬 Grouping and Detail (Items/Skills) 1 file 백호 2009.02.21 839
Board Pagination Prev 1 ... 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 Next
/ 52