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
94 기타 Weather Script 1.02 by ccoa 1 file 백호 2009.02.22 809
93 기타 Upload & Download files with RGSS 2.1 by berka (XP/VX 공용) 5 Alkaid 2010.11.20 2134
92 기타 Trailing Characters ver.1 by SephirothSpawn 6 file 백호 2009.02.22 1551
91 기타 The General Monster Generator 1.1 by DerVVulfman 1 file Alkaid 2011.03.02 1496
90 기타 Text to RGSS by DerVVulfman Alkaid 2011.04.18 1319
89 기타 Text Scroll by Dubealex (Release 3) 2 file 백호 2009.02.22 939
88 기타 Tetris Attack by trickster 1 file 백호 2009.02.22 986
87 기타 Terrain Encounter Areas by SephirothSpawn 백호 2009.02.22 778
86 기타 Tax Script 1.2 by The Darklord@rmxp.org 2 file 백호 2009.02.22 1130
85 기타 Steal Script (SDK Required) file 백호 2009.02.21 1182
84 기타 Sphere Grid System file 백호 2009.02.21 765
83 기타 Sized Events 0.1 by Toby@rmxp.org file 백호 2009.02.22 845
82 기타 Shift Puzzles v2 by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1170
81 기타 Shift Puzzles by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 1389
80 기타 SG_Window Control v2 by sandgolem 백호 2009.02.22 823
79 기타 SG_Transfer Player Music Fix v2 by sandgolem (SDK호환) 1 백호 2009.02.22 824
» 기타 SG_Settings Control by sandgolem 백호 2009.02.22 884
77 기타 SG_Multiple Currencies v3 by sandgolem (SDK호환) 백호 2009.02.22 803
76 기타 SG_Call Script Fix by sandgolem (SDK호환) 백호 2009.02.22 802
75 기타 SFont 사용 스크립트 by Trickster Alkaid 2010.10.05 1512
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 Next
/ 13