Thx! =D
Guys, add this piece of code to the ABS to fix the teleport thing.
#==============================================================================
# Interpreter
#==============================================================================
class Interpreter
alias command_201_blizzabs_later command_201
def command_201
$game_temp.in_battle = false if $scene.is_a?(Scene_Map)
command_201_blizzabs_later
end
end
That would be version 0.91 then.
You need to make the background of the file transparent with a program like Photoshop. You can also re-import them with the Resource Manager (next to the test-play button in the on top menu) and set the background as "transparent".
If Mr. Mo's lags so much, use this Anti-Lag code from my ABS. It should work out.
#==============================================================================
# Blizz-ABS Event Anti-Lag (ABSEAL) by Blizzard
# Version: 1.0
# Date: 25.10.2006
#
#
# Compatibility:
#
# 99% compatible with SDK, not tested altough. 99% chance of compatibility with
# anything.
#
#
# Advantages compared to other Anti-Lag Systems:
#
# - much more compatible
# - faster and better processing
# - about 5 times less code
# - built-in option to disable in specific maps
# - configurable strength
#
#
# Introduction:
#
# This script will decrease the lag caused by too many events in maps by only
# updating the events visible on the screen and a little bit beyond.
# "Auto-Start" and "Parallel process" events are NOT affected by this script.
#
#
# Configuration:
#
# Put in "DISABLE_ANTI_LAG_IDS" any map IDs where the ABSEAL should be
# disabled. Change FACTOR to how many "tile squares" it should update beyond
# the screen. 2 is default, values under 1 will be corrected. Floating point
# numbers will be corrected.
#
#==============================================================================
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
DISABLE_ANTI_LAG_IDS = []
FACTOR = 2
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#==============================================================================
# Game_Event
#==============================================================================
class Game_Event
alias upd_player_blizzabs_later update
def update
upd_player_blizzabs_later if self.update?
end
def update?
return true unless $game_system.ABSEAL
return true if DISABLE_ANTI_LAG_IDS.include?($game_map.map_id)
return true if self.trigger == 3 or self.trigger == 4
factor = FACTOR < 1 ? 1 : FACTOR.to_i
return false if self.real_x <= $game_map.display_x - factor * 128
return false if self.real_y <= $game_map.display_y - factor * 128
return false if self.real_x >= $game_map.display_x + 2560 + factor * 128
return false if self.real_y >= $game_map.display_y + 1920 + factor * 128
return true
end
end
#==============================================================================
# Sprite_Character
#==============================================================================
class Sprite_Character
alias upd_player_blizzabs_later update
def update
unless $game_system.ABSEAL
upd_player_blizzabs_later
return
end
if @character.is_a?(Game_Event)
upd_player_blizzabs_later if @character.update?
else
upd_player_blizzabs_later
end
end
end
If the damage doesn't show up, google for the font "Arial Black" and re-install it. This should fix the problem. You cn reinstall it in C:\WINDOWS\Fonts , just copy the file there. If it says, there already is a file like that, just delete it and put in the new file.
Thx! =D
Guys, add this piece of code to the ABS to fix the teleport thing.
#==============================================================================
# Interpreter
#==============================================================================
class Interpreter
alias command_201_blizzabs_later command_201
def command_201
$game_temp.in_battle = false if $scene.is_a?(Scene_Map)
command_201_blizzabs_later
end
end
That would be version 0.91 then.
Aww man, I already started my game with a normal battle system. I'll use your ABS on my next game. I guess. WAIt! Thats'll be in like a year. lol
I'll look into it. But I don't know how the F12 thing works, so I don't know if I will be able to fix it.
Eh...kind of a noob question....I made and event in which the Character can't get out of the Stage until all the Enemies/Boss are defeated...but the even keeps saying what I wrote about defeat the Boss/Enemies.
Just use the "Call script" command and type
$game_variables[X] = $game_system.how_many_enemies_left
Replace X with the ID of a variable. After this, that variable will be set to the number of enemies that are left on the map. Use this together with cond. branch and parallel process to achieve the effect you want when the enemies left on the map are equal/greater than/whatever to a value.
Are you using the A* algorythm or something similar?
There is an implementation in Ruby of it here: http://www.dubealex.com/asylum/index.php?showtopic=11874
It IS crappy, but you might use some of the principles for inspiration.
Also can't you utilize the graph being sparse?
I am already much further than this. I didn't even think about using the Move_Command class.
I have tried different algorythms so far. Dijkstri's algorythm brings RMXP to its knees, lol! I have tried an algorythm based on a "neighbour-vertex matrix" but it takes too much of RAM. Now I am working on a hybrid between these two and it doesn't lag too much right now. I actually need to get rid of some extra processing and bring the algorythm down to a linear complexity. Any exponential complexity causes enormous lag. =/
I would use Near Fantastica's and just fix the glitch if there is actually no path to the goal, but his algorythm also increases the lag too much in bigger maps, so there is no point.
My algorythm so far basically uses a virtual map with a passability table similar to the map's own @passages variable and I try to check the current passability (because of events, player etc.) only around the character. The rest is being processed by the virtual map, but I the process time increases exponential according to the length of the path. =/ Shit~
I'll look into it. But I don't know how the F12 thing works, so I don't know if I will be able to fix it.
Eh...kind of a noob question....I made and event in which the Character can't get out of the Stage until all the Enemies/Boss are defeated...but the even keeps saying what I wrote about defeat the Boss/Enemies.
Just use the "Call script" command and type
$game_variables[X] = $game_system.how_many_enemies_left
Replace X with the ID of a variable. After this, that variable will be set to the number of enemies that are left on the map. Use this together with cond. branch and parallel process to achieve the effect you want when the enemies left on the map are equal/greater than/whatever to a value.
I followed instructions...but I get the feeling I did something wrong...the teleporter thingy I made to appear after the boss is defeated...doesn't appear yet.
Post the event code. Did you make it parallel process?
@Zeriab:
Still haven't changed it, since the other day. The virtual map is loaded into $game_map and is being access by any Game_Character sub-class. I think there is a bug. Just like I said, I didn't fix it yet. Ignore $lag, I use it to write out "Hi" when the algorythm is executed to see the difference between that case and the case where it isn't. It works 8-way, BTW.
#==============================================================================
# Virtual_Map
#==============================================================================
class Virtual_Map
def initialize
@matrix = Table.new($game_map.width, $game_map.height)
object = Game_Character.new
for i in 0...$game_map.width
for j in 0...$game_map.height
res = 0
res += 0x01 if object.v_passable?(i, j, 2)
res += 0x02 if object.v_passable?(i, j, 4)
res += 0x04 if object.v_passable?(i, j, 6)
res += 0x08 if object.v_passable?(i, j, 8)
@matrix[i, j] = res
end
end
end
def find_path(object, dest_x, dest_y)
return if object.x == dest_x and object.y == dest_y
x = object.x
y = object.y
st_dir = []
if object.passable?(x, y, 2)
st_dir.push(2)
st_dir.push(1) if object.passable?(x, y+1, 4)
st_dir.push(3) if object.passable?(x, y+1, 6)
end
if object.passable?(x, y, 4)
st_dir.push(4)
st_dir.push(1) if object.passable?(x-1, y, 2)
st_dir.push(7) if object.passable?(x-1, y, 8)
end
if object.passable?(x, y, 6)
st_dir.push(6)
st_dir.push(3) if object.passable?(x+1, y, 2)
st_dir.push(9) if object.passable?(x+1, y, 8)
end
if object.passable?(x, y, 8)
st_dir.push(8)
st_dir.push(7) if object.passable?(x, y-1, 4)
st_dir.push(9) if object.passable?(x, y-1, 6)
end
st_dir |= st_dir
return [] if st_dir == []
coos = [[x, y, 0]]
for i in st_dir
case i
when 1 then coos.push([x-1, y+1, 10-i])
when 2 then coos.push([x, y+1, 10-i])
when 3 then coos.push([x+1, y+1, 10-i])
when 4 then coos.push([x-1, y, 10-i])
when 6 then coos.push([x+1, y, 10-i])
when 7 then coos.push([x-1, y-1, 10-i])
when 8 then coos.push([x, y-1, 10-i])
when 9 then coos.push([x+1, y-1, 10-i])
end
end
path = []
next_x, next_y = dest_x, dest_y
coos.reverse!
coos.size.times do
for i in 0...coos.size
if coos[i][0] == next_x and coos[i][1] == next_y
case coos[i][2]
when 1
next_x -= 1
next_y += 1
when 2
next_y += 1
when 3
next_x += 1
next_y += 1
when 4
next_x -= 1
when 6
next_x += 1
when 7
next_x -= 1
next_y -= 1
when 8
next_y -= 1
when 9
next_x += 1
next_y -= 1
end
path.push(coos[i][2])
coos[i] = nil
break
end
end
coos.compact!
break if next_x == x and next_y == y
end
for i in 0...path.size
path[i] = 10 - path[i]
end
$lag = "Hi"
return path
end
end
#==============================================================================
# Game_Character
#==============================================================================
class Game_Character
def v_passable?(x, y, d)
new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
return false unless $game_map.valid?(new_x, new_y)
return false unless $game_map.v_passable?(x, y, d, self)
return true
end
end
#==============================================================================
# Game_Map
#==============================================================================
class Game_Map
attr_reader :vmap
alias setup_vmap_later setup
def setup(id)
setup_vmap_later(id)
@vmap = Virtual_Map.new
end
def v_passable?(x, y, d, self_event = nil)
return false unless valid?(x, y)
bit = (1 << (d / 2 - 1)) & 0x0f
for i in [2, 1, 0]
tile_id = data[x, y, i]
if tile_id == nil
return false
elsif @passages[tile_id] & bit != 0
return false
elsif @passages[tile_id] & 0x0f == 0x0f
return false
elsif @priorities[tile_id] == 0
return true
end
end
return true
end
end
Yeah, it's wrong. You don't need a common event for this, just use a usual event as parallel process in the map. Use this event code:
> Cond: Self-switch A == OFF
> Wait: 10 frames
> Message: "Defeat TERROR-KING ARCHFIEND!!!"
> Self-switch operation: Turn A ON
> End
> Script: $game_variables[1] =
$game_system.how_many_enemies_left
> Cond: Variable[0001] == 0
> Cond: Self-switch B == OFF
> Wait: 10 frames
> (put here what happens if you defeat your enemy)
> Self-switch operation: Turn B ON
> Switch operation: Turn [X] OFF
> End
> End
You only need to consider three things:
1. Switch X HAS TO be turned ON before entering the battle. Make the enemy event's condition to be this switch. This will ensure that he won't appear again in this room.
2. The message "Defeat..." will occur only the first time when entering the map. The code when he dies will also occur only once.
3. Set the parallel process event's own condition also to be that switch X. Safe is safe. ;)
@Sparten: Didn't I type it in the instructions? Name the additional spriteset the same like the usual, but add something to the name according to which sprite it is:
Attack sprite - _atk
Defend sprite - _def
Skill sprite - _skl
Item sprite - _itm
file Graphics/Characters/001-fighter_atk not found.
I cant atk :'(
file Graphics/Characters/001-fighter_atk not found.
I cant atk :'(
How about reading the two posts above:
when i added the script to the game it said:
FileGraphics/Characters/141-Bard01_atk not found
T_T help plz
Read the insctructions. You need attack/defend/etc. spritesets and you need to name them properly. You can also download the demo and see how it works in there.
@ rpg_Gnome
take out this part of the script: (line 2500)#==============================================================================
# Hud
#==============================================================================
class Hud < Window_Base
def initialize
super(-8, $game_system.hud_y, 656, 80)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
self.contents.font.size = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
end
self.opacity = 0
refresh
end
def refresh
self.contents.clear
actor = $game_player.actor
bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
rect = Rect.new(0, 0, bitmap.width/4, bitmap.height/8)
self.contents.blt(0, 12, bitmap, rect)
draw_actor_level(actor, 40, 8)
draw_actor_hp(actor, 100, 0, 160)
draw_actor_sp(actor, 280, 0, 160)
draw_actor_exp_alt(actor, 460, 0, 160)
@level = actor.level
@exp = actor.exp
@hp = actor.hp
@sp = actor.sp
end
def test_changes
a = $game_player.actor
if a.level != @level
a.recover_all
a.damage = "LvUp"
$game_player.animation_id = LVLUP_ANIMATION_ID
$game_player.damage.damage(a, a.hp, a.sp)
end
return (a.level != @level or a.exp != @exp or a.hp != @hp or a.sp != @sp)
end
end
and on these lines: 965, 1394, 1402, 2163, 2174-2118, 2557, 2567, 2597, 2629, 2776, 2809 take out the "hud" things.
(basicaly search for "hud" and delete any of the lines that have it)
try using
[IMG]http://www.deviantart.com/deviation/52577850/[/IMG]
if that dosen't work, try a different host
also, you're welcome