Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
- # DRG - XAS Module Simplifier
- # Version 1.02
- # Author : LiTTleDRAgo
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
- =begin
- Insert a comment in event at tool map, like this
- Comment :
- Link_Action_ID = 0
- Suflags = 60
- Durations = 100
- Self_Motions = _SKILL_01 (dont use quote marks "" / '')
- Attack_ID_Plans = 50
- Attack_Range_Types = SQUARE (LINE, RHOMBUS or SQUARE)
- Attack_Range_Plans = 0
- Blow_Powers = 1
- Self_Animation_Hit = 0
- Self_Animation_Plans[60] = 10
- Target_Invincibles_Durations = 10
- Animation_Speed = 1.5
- Force_Move = nil (FORWARD, BACKWARD or nil)
- Player_Cast_Time = 15
- Self_Animation_Plans[60] = 10
- -> means in 60 frame, the tool event will activate the animation with ID 10
- -> if you dont want to use animation, just dont insert it in the comment
- =end
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
- module XAS_SIMPLIFIER
- def self.all_tool
- tool_map = XAS::ACTION_TEMPLATE_MAP_ID
- map = sprintf("Data/Map%03d.rxdata", tool_map.to_i)
- map = load_data(map)
- event = map.events.values.find_all {|e| e.pages[0] &&
- e.pages[0].list[0] && e.pages[0].list[0].code == 108}
- return event
- end
- def self.notes
- notes = {}
- all_tool.each { |e|
- list = e.pages[0].list.find_all { |list|[108,408].include?(list.code)}
- notes[e.id] = list.collect { |list| list.parameters[0]}.join("\n") }
- return notes
- end
- end
- $imported ||= {}
- $imported[:xas_module_simplifier] = $xas_module_simplifier = 1.02
- if !$xrxs_xas
- raise "This script needs XAS to work"
- end
- #==============================================================================#
- # Ressurection
- #==============================================================================#
- module Database_Bullet
- XAS_SIMPLIFIER.notes.each {|key,value|
- action_id = key
- next if value == ''
- if value[/LINK_ACTION_ID = (\d+)/i]
- LINK_ACTION_ID[action_id] = $1.to_i
- end
- if value[/SUFLAGS = (\d+)/i]
- SUFLAGS[action_id] = $1.to_i
- end
- if value[/DURATIONS = (\d+)/i]
- DURATIONS[action_id] = $1.to_i
- end
- if value[/SELF_MOTIONS = (\w+)/i]
- SELF_MOTIONS[action_id] = $1.to_s
- end
- ATTACK_ID_PLANS[action_id] = []
- if value[/ATTACK_ID_PLANS = (\d+)/i]
- plan = []
- plan[$1.to_i] = action_id
- ATTACK_ID_PLANS[action_id] = plan
- end
- if value[/ATTACK_RANGE_TYPES = (\w+)/i]
- ATTACK_RANGE_TYPES[action_id] = eval $1
- end
- if value[/ATTACK_RANGE_PLANS = (\d+)/i]
- ATTACK_RANGE_PLANS[action_id] = [$1.to_i]
- end
- if value[/BLOW_POWERS = (\d+)/i]
- BLOW_POWERS[action_id] = $1.to_i
- end
- SELF_ANIMATION_PLANS[action_id] = []
- if value[/SELF_ANIMATION_PLANS\[(\d+)\] = (\d+)/i]
- plan = []
- plan[$1.to_i] = $2.to_i
- SELF_ANIMATION_PLANS[action_id] = plan
- end
- if value[/SELF_ANIMATION_HIT = (\d+)/i]
- SELF_ANIMATION_HIT[action_id] = $1.to_i
- end
- if value[/TARGET_INVINCIBLES_DURATIONS = (\d+)/i]
- TARGET_INVINCIBLES_DURATIONS[action_id] = $1.to_i
- end
- if value[/ANIMATION_SPEED = (\w+)/i]
- ANIMATION_SPEED[action_id] = $1.to_f
- end
- FORCE_MOVE[action_id] = nil
- if value[/FORCE_MOVE = (\w+)/i]
- FORCE_MOVE[action_id] = eval $1
- end
- if value[/PLAYER_CAST_TIME = (\w+)/i]
- PLAYER_CAST_TIME[action_id] = $1.to_i
- end }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement