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 타이틀/게임오버 타이틀 화면 커스터마이즈 (타이틀 메뉴 바꾸는 스크립트) 9 file №1 2012.08.04 4390
60 메뉴 메뉴를 바꾸는 스크립트 14 №1 2012.08.04 4208
59 전투 Minkoff's Animated Battlers - Enhanced 13.8 by DerVVulfman 1 Alkaid 2012.08.26 1832
58 스킬 Miriam's Handicrafts! 1.3 by DerVVulfman Alkaid 2012.08.26 1204
57 그래픽 Composite Window Skins by PK8 (XP/VX/VXA) Alkaid 2012.08.26 1559
56 전투 Mr.Mo's ABS Ultimate 7.0 by DerVVulfman 4 Alkaid 2012.08.26 2587
55 전투 Etude87_Custom_Slip_Damage_XP ver.1.0 5 습작 2012.08.26 1856
54 그래픽 Event Transparency by DerVVulfman (XP/VX/VXA) Alkaid 2012.09.01 1485
53 그래픽 Pictures below Characters by PK8 (XP/VXA) Alkaid 2012.09.07 1640
52 메뉴 Leidy's Ring Command Window 1.2 by DerVVulfman Alkaid 2012.09.09 1430
51 장비 Auto Equipment Optimization for Guillaume777's Multi Slot Script by DerVVulfman Alkaid 2012.09.09 1497
50 맵/타일 Editor Tiles by PK8 (XP/VX/VXA) Alkaid 2012.09.11 1868
49 그래픽 부드럽게 화면이 움직이는 스크립트 입니다. 16 GangSin 2012.09.12 4589
48 변수/스위치 The Self Data Suite by PK8 (XP/VX/VXA) Alkaid 2012.09.14 1232
47 변수/스위치 Initial Switches and Variables by PK8 (XP/VX/VXA) Alkaid 2012.09.14 1296
46 변수/스위치 Switchless Common Events by PK8(XP/VX/VXA) Alkaid 2012.09.15 1199
45 스킬 Trickster's Bag of Skill Effects (SDK 필요) Alkaid 2012.09.17 1289
44 전투 Trickster씨의 전투 시스템 (SDK 필수?) Alkaid 2012.09.18 3256
43 오디오 Audio Module Rewrite mciSendString 1.1 by DerVVulfman Alkaid 2012.09.18 1367
42 그래픽 WhiteFlute - BitmapEX 4 file JACKY 2012.12.10 2951
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