Skip to content

Instantly share code, notes, and snippets.

package miun.se.ant;
import com.dsi.ant.message.ChannelId;
import com.dsi.ant.message.ChannelType;
public class DefaultChannelParameters {
public static final ChannelType TYPE = ChannelType.BIDIRECTIONAL_SLAVE;
@kl
kl / yotsubato.rb
Last active December 19, 2015 15:28
Yotsubato TTS downloader
#encoding: utf-8
require 'fileutils'
require 'open-uri'
require 'sanitize'
#require 'pry'
class YotsubatoDownloader
API = ARGV[1] || "http://208.109.168.116/GetAudio1.ashx?speaker=302&content="
@kl
kl / battle_positions.rb
Created June 19, 2013 15:52
Version p1
module BattlePositionsKal
SKILL_ID = 200
ENEMY_START = 0
PARTY_START = 10
ENEMY_INC = 2
DEFAULT_SKILL_RANGE = 1
FONT_COLOR = "1ACDE8"
end
@kl
kl / equippictures.rb
Last active December 18, 2015 13:09
RPG Maker VX Ace show equip item pictures instead of stats
#
# KalEquipPictures 1.0 by Kal
# ---------------------------
# Changes the equip status window to display an item picture.
# Usage: First import you pictures to the Graphics/Pictures folder.
# Then in the item note box but a tag like this: <TAG_NAME filename>
# Example: <image sword01.png>
#
module KalEquipPictures
@kl
kl / gist:5760030
Created June 11, 2013 19:51
RPG Maker VX Ace run common event on state removal
module StateRemoveCommonEventsKal
TAG_NAME = "srce"
class IDExtractor
def get_common_event_id_for_state(state_id)
rpg_state = get_rpg_state(state_id)
extract_common_event_id(rpg_state.note)
end
# TODO: extract_download_url_entries fails some times because stream_map is nil. why?
# TODO: sometimes get permission denied. it seemed that the itag value got concatenated to the end of the
# download url (removing it makes it work again). not sure how that is possible.
require "pry"
class YoutubeNew < PluginBase
VIDEO_INFO_URL = "http://www.youtube.com/get_video_info?video_id="
@kl
kl / requirevx.rb
Created August 4, 2012 10:25
Implements require and load for RPG Maker VX
module RequireVXConfig
#
# -Configure options here-
#
# What they do:
#
# :make_default_load_paths
# Initializes the $LOAD_PATH variable to it's default values (not the
# paths that are used to require C files becauset hey will not work).
# If this is done the Ruby standard library can be copy/pasted
@kl
kl / gist:2044957
Created March 15, 2012 16:01
Alex REPL for VX Ace
# Alex REPL for VX ACE
# Author: Kal
# Version: 1.0
#
# --- Usage ---
#
# First you should now what a binding in Ruby is. A binding is a context
# that you can get from some point in your program and it encapsulates the
# value of self, all instance varaibles and methods at that point.
# These can later be accessed via the binding object.
@kl
kl / gist:1953684
Created March 1, 2012 22:27
"Turn movement" for VX Ace - events move only when the player moves
module Kal
module TurnMove
# Enable or disable turn movement.
ENABLE = true
# If you want to use a switch to enable turn movement.
SWITCH = nil
# Only events that have the following comment string as a comment
# on their first page are affected. Set to nil or false if you don't
# want to use this option.
COMMENT = "turn-move"
@kl
kl / gist:1886328
Created February 22, 2012 17:59
Overkill System -- Victory Aftermath compatibility
#
# Various patches to make Overkill compatiable with Yanfly Aftermath
# v1.1 - by Kal
# - exp bar now displays overkill exp correctly
#
if $imported && $imported["YEA-VictoryAftermath"]
module Kal
module Overkill_Aftermath