Skip to content

Instantly share code, notes, and snippets.

View rutan's full-sized avatar

Rutan rutan

View GitHub Profile
@rutan
rutan / hzm_note2_augments.rb
Created September 27, 2014 14:13
「[hzm]メモ欄拡張共通部分さん+」オーグメントシステム競合回避スクリプト
#-------------------------------------------------------------------------------
# ■ 「[hzm]メモ欄拡張共通部分さん+」オーグメントシステム競合回避スクリプト
#-------------------------------------------------------------------------------
# 2014/09/27 Ru/むっくRu
#-------------------------------------------------------------------------------
# オーグメントシステムとの競合を回避し、
# アイテムが初期化された後にアイテム画面を開いた際に
# メモ情報を失ってしまうのを回避します。
#
# このスクリプトは
# coding: utf-8
rbenv_user = (node[:rtn_rbenv][:system] ? 'root' : node[:rtn_rbenv][:user])
if rbenv_user == 'root'
rbenv_root = '/usr/local/rbenv'
profile_path = '/etc/profile.d/rbenv.sh'
else
rbenv_root = "/home/#{rbenv_user}/.rbenv"
profile_path = "/home/#{rbenv_user}/.bash_profile"
end
@rutan
rutan / xor128.rb
Last active August 29, 2015 14:08
# 128bit Xorshift
class Xor128
MASK = 0xffffffff
# 初期化
# @param x [Integer] シード1
# @param y [Integer] シード2
# @param z [Integer] シード3
# @param w [Integer] シード4
def initialize(x = 123456789, y = 362436069, z = 521288629, w = 88675123)
# encoding: utf-8
module Torigoya
module PoorXml
class Parser
# 初期化
# @param [String] raw_doc XMLテキスト
def initialize(raw_doc)
@raw_doc = raw_doc
end
@rutan
rutan / exporter.rb
Created December 23, 2014 12:58
RGSS3 PNG出力案
# encoding: utf-8
module Torigoya
module Win32
# メモリのコピー
# @param [Integer, Object] destination コピー先のアドレス、またはバッファ
# @param [Integer, Object] source コピー元のアドレス、またはバッファ
# @param [Integer] size コピーする領域のサイズ
# @return [void]
def self.rtl_move_memory(destination, source, size)
# encoding: utf-8
#===============================================================================
# ■ Tweenアニメーション for RGSS3
#-------------------------------------------------------------------------------
# Ru/むっくRu
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# 【更新履歴】
#===============================================================================
@rutan
rutan / note.rb
Created July 11, 2015 06:00
メモ欄スクリプト
# encoding: utf-8
#===============================================================================
# ■ メモ欄取得スクリプト for RGSS3
#-------------------------------------------------------------------------------
# Ru/むっくRu
#-------------------------------------------------------------------------------
# メモ欄の指定フォーマット行を取得します
#-------------------------------------------------------------------------------
# 【更新履歴】
#===============================================================================
# encoding: utf-8
#===============================================================================
# ■ Input.repeat?速度調整スクリプト for RGSS3
#-------------------------------------------------------------------------------
# Ru/むっくRu
#-------------------------------------------------------------------------------
# RGSS組み込み機能のInput.repeatのキー入力間隔を調整します。
# アイテム入力欄などでのカーソル移動速度を早くできます。
#-------------------------------------------------------------------------------
# 【更新履歴】
@rutan
rutan / makeActionOrdersEx.rb
Created June 1, 2012 15:02
各行動ごとに行動順を設定さん for RGSS3
# coding: utf-8
#===============================================================================
# ■ 各行動ごとに行動順を設定さん for RGSS3
#-------------------------------------------------------------------------------
# 2012/06/01 Ru/むっくRu
#-------------------------------------------------------------------------------
# 戦闘中の行動順序をバトラー順ではなく,各行動順の順番に行うようにします.
#-------------------------------------------------------------------------------
# 【わかりやすい?解説】
# デフォルトのシステムだと,例えば2回行動のキャラクターが
@rutan
rutan / readNote_quickSkill.rb
Created June 1, 2012 15:06
[hzm]ターン消費無しスキル for RGSS3
# coding: utf-8
#===============================================================================
# ■ [hzm]ターン消費無しスキル for RGSS3
# ※ このスクリプトには「[hzm]メモ欄拡張共通部分 for RGSS3」が必要です
#-------------------------------------------------------------------------------
# 2012/06/01 Ru/むっくRu
#-------------------------------------------------------------------------------
# ターンを消費せずに,選択した瞬間に発動するスキルを設定します.
#
# 【使い方】