i found this code in a RPG maker XP game but i cant find it in english can anyone
if @character.animation#============================= =================================================
# 移動パターン増加 Ver 1.00
# 配布元・サポートURL
# By COGHWELL
# Ž•ŽÔ‚Ìé
#================================================= =============================
# O script permite que a imagem do character tenha mais
# que 4 frames.
#
# Para definir a quantidade de frames basta definir o nome
# da imagem da seguinte forma.
#
# Hero[X],png
#
# No lugar do X coloque a quantidade de frames desejada
#================================================= =============================
#================================================= =============================
# ■ Game_Character (分割定義 2)
#------------------------------------------------------------------------------
# キャラクターを扱うクラスです。このクラスは Game_Player クラスと Game_Event
# クラスのスーパークラスとして使用されます。
#================================================= =============================
class Game_Character
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# ジャンプ中、移動中、停止中で分岐
if jumping?
update_jump
elsif moving?
update_move
else
update_stop
end
# アニメカウントが最大値を超えた場合
# ※最大値は、基本値 18 から移動速度 * 1 を引いた値
# ファイル名に[n]が入っている場合、通常の(n-1)/4の速度でパターン更新
if @character_name[/\[(\d+)\]/]
@anime_count = 20 if @anime_count > 0 and @pattern == @original_pattern
if @anime_count * ($1.to_i - 1) / 4 > 18 - @move_speed * 2
# 停止時アニメが OFF かつ 停止中の場合
if not @step_anime and @stop_count > 0
# パターンをオリジナルに戻す
@pattern = @original_pattern
# 停止時アニメが ON または 移動中の場合
else
# パターンを更新
@pattern = @pattern % ($1.to_i - 1) + 1
end
# アニメカウントをクリア
@anime_count = 0
end
else
# 通常キャラのパターン更新処理(デフォルトの処理をコピペしただけ)
if @anime_count > 18 - @move_speed * 2
# 停止時アニメが OFF かつ 停止中の場合
if not @step_anime and @stop_count > 0
# パターンをオリジナルに戻す
@pattern = @original_pattern
# 停止時アニメが ON または 移動中の場合
else
# パターンを更新
@pattern = (@pattern + 1) % 4
end
# アニメカウントをクリア
@anime_count = 0
end
end
# ウェイト中の場合
if @wait_count > 0
# ウェイトカウントを減らす
@wait_count -= 1
return
end
# 移動ルート強制中の場合
if @move_route_forcing
# カスタム移動
move_type_custom
return
end
# イベント実行待機中またはロック状態の場合
if @starting or lock?
# 自律移動はしない
return
end
# 停止カウントが一定の値 (移動頻度から算出) を超えた場合
if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency)
# 移動タイプで分岐
case @move_type
when 1 # ランダム
move_type_random
when 2 # 近づく
move_type_toward_player
when 3 # カスタム
move_type_custom
end
end
end
end
#================================================= =============================
# ■ Sprite_Character
#------------------------------------------------------------------------------
# キャラクター表示用のスプライトです。Game_Character クラスのインスタンスを
# 監視し、スプライトの状態を自動的に変化させます。
#================================================= =============================
class Sprite_Character < RPG:prite
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
# タイル ID、ファイル名、色相のどれかが現在のものと異なる場合
if @tile_id != @character.tile_id or
@character_name != @character.character_name or
@character_hue != @character.character_hue
# タイル ID とファイル名、色相を記憶
@tile_id = @character.tile_id
@character_name = @character.character_name
@character_hue = @character.character_hue
# タイル ID が有効な値の場合
if @tile_id >= 384
self.bitmap = RPG:ache.tile($game_map.tileset_name,
@tile_id, @character.character_hue)
self.src_rect.set(0, 0, 32, 32)
self.ox = 16
self.oy = 32
# タイル ID が無効な値の場合
else
self.bitmap = RPG:ache.character(@character.character_name,
@character.character_hue)
# ファイル名に[n]が入っている場合、パターン数を横:n, 縦:4とみなす
if @character.character_name[/\[(\d+)\]/]
@cw = bitmap.width / $1.to_i
@ch = bitmap.height / 4
# ファイル名に[D]が入っていない場合、通常通り横:4, 縦:4とする
else
@cw = bitmap.width / 4
@ch = bitmap.height / 4
end
self.ox = @cw / 2
self.oy = @ch
end
end
# 可視状態を設定
self.visible = (not @character.transparent)
# グラフィックがキャラクターの場合
if @tile_id == 0
# 転送元の矩形を設定
sx = @character.pattern * @cw
sy = (@character.direction - 2) / 2 * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
# スプライトの座標を設定
self.x = @character.screen_x
self.y = @character.screen_y
self.z = @character.screen_z(@ch)
# 不透明度、合成方法、茂み深さを設定
self.opacity = @character.opacity
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
# アニメーション_id != 0
animation = $data_animations[@character.animation_id]
animation(animation, true)
@character.animation_id = 0
end
end
end
# ついでにメニュー画面でパターンが多いグラフィックを使用した場合の表記変更
#================================================= =============================
# ■ Window_Base
#------------------------------------------------------------------------------
# ゲーム中のすべてのウィンドウのスーパークラスです。
#================================================= =============================
class Window_Base < Window
#--------------------------------------------------------------------------
# ● グラフィックの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_graphic(actor, x, y)
bitmap = RPG:ache.character(actor.character_name, actor.character_hue)
if actor.character_name[/\[(\d+)\]/]
cw = bitmap.width / $1.to_i
ch = bitmap.height / 4
else
cw = bitmap.width / 4
ch = bitmap.height / 4
end
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
end
#================================================= =============================
# ■ Window_SaveFile
#------------------------------------------------------------------------------
# セーブ画面およびロード画面で表示する、セーブファイルのウィンドウです。
#================================================= =============================
class Window_SaveFile < Window_Base
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# ファイル番号を描画
self.contents.font.color = normal_color
name = "File #{@file_index + 1}"
self.contents.draw_text(4, 0, 600, 32, name)
@name_width = contents.text_size(name).width
# セーブファイルが存在する場合
if @file_exist
# キャラクターを描画
for i in 0...@characters.size
bitmap = RPG:ache.character(@characters[i][0], @characters[i][1])
if @characters[i][0][/\[(\d+)\]/]
cw = bitmap.width / $1.to_i
ch = bitmap.height / 4
else
cw = bitmap.width / 4
ch = bitmap.height / 4
end
src_rect = Rect.new(0, 0, cw, ch)
x = 300 - @characters.size * 32 + i * 64 - cw / 2
self.contents.blt(x, 68 - ch, bitmap, src_rect)
end
# プレイ時間を描画
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 8, 600, 32, time_string, 2)
# タイムスタンプを描画
self.contents.font.color = normal_color
time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
self.contents.draw_text(4, 40, 600, 32, time_string, 2)
end
end
end
#================================================= =============================
# ■ Game_Player
#------------------------------------------------------------------------------
# プレイヤーを扱うクラスです。イベントの起動判定や、マップのスクロールなどの
# 機能を持っています。このクラスのインスタンスは $game_player で参照されます。
#================================================= =============================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ● アニメーションアップデート
#--------------------------------------------------------------------------
def anime_update
# アニメカウントが最大値を超えた場合
# ※最大値は、基本値 18 から移動速度 * 1 を引いた値
# ファイル名に[n]が入っている場合、通常の(n-1)/4の速度でパターン更新
if @character_name[/\[(\d+)\]/]
@anime_count = 20 if @anime_count > 0 and @pattern == @original_pattern
if @anime_count * ($1.to_i - 1) / 4 > 18 - @move_speed * 2
# 停止時アニメが OFF かつ 停止中の場合
if not @step_anime and @stop_count > 0
# パターンをオリジナルに戻す
@pattern = @original_pattern
# 停止時アニメが ON または 移動中の場合
else
# パターンを更新
@pattern = @pattern % ($1.to_i - 1) + 1
end
# アニメカウントをクリア
@anime_count = 0
end
else
# 通常キャラのパターン更新処理(デフォルトの処理をコピペしただけ)
if @anime_count > 18 - @move_speed * 2
# 停止時アニメが OFF かつ 停止中の場合
if not @step_anime and @stop_count > 0
# パターンをオリジナルに戻す
@pattern = @original_pattern
# 停止時アニメが ON または 移動中の場合
else
# パターンを更新
@pattern = (@pattern + 1) % 4
end
# アニメカウントをクリア
@anime_count = 0
end
end
end
end
to find to game with the codeing its on this site.
Atelier RGSS - News
Results 1 to 13 of 13
- 26 Feb. 2010 02:07am #1
can someone plz help with this code
- 26 Feb. 2010 05:55am #2
- 26 Feb. 2010 05:59am #3
- 26 Feb. 2010 04:55pm #4
i need a code like it in english the code lets you make a rpg game where you can fight on the map insted of the random fights
- 26 Feb. 2010 08:54pm #5
You could always plus the Japanese characters into an online translator
- 26 Feb. 2010 09:25pm #6
I'm not going to spoon feed you. The lines beginning with # are likely comments. Remove those lines. Yourself.
If it doesn't work, chances are the code is broken anyway.
The syntax looks pretty shitty. It's probably not gonna work.
Even if it did work, you'd need to know how to use it.
- 26 Feb. 2010 10:07pm #7
It also looks like the person that coded it doesn't really know what they were doing. Might as well just try to code your own. It's always better. In ways.
- 26 Feb. 2010 10:42pm #8
idk how to make a code to fight on map
- 26 Feb. 2010 11:33pm #9
Use google
Programming isnt extremely simple, its not 'oh, ok i want to fight on the map' then write one line of code to fight on the map. Its going to be around 200-300 lines of code at the end for a decent fight code. You have to make your own functions, do all the math first making sure that damage makes since and all the weapons arnt over powered. etc etc. Its not going to take 10 secs. More like 4 or 5 hours.
EDIT::
LOL Using game maker >.<
i find that funny.
Do something real ok? Game maker is going to make it harder on you if you ever want to make a real game.
- 27 Feb. 2010 12:24am #10
"Translated" version (some would not be translated) ... The languages were Japanese and Spanish
#============================= if@character.animation =============== ==================================
# Increase in migration patterns Ver 1.00
Support URL # source distribution
# By COGHWELL
# Ž • zo, Ì? É
#================================================= =============================
# O script allows you to do character tenha mais imagem
# May 4 frames.
#
# To define a quantidade of frames enough to define o nome
# Da da seguinte imagem form.
#
# Hero [X] png
#
# Do not do X instead of frames put a quantidade desejado
#================================================= =============================
#================================================= =============================
# ■ Game_Character (define split 2)
#------------------------------------------------- -----------------------------
# Handle character classes. This class is a class Game_Player Game_Event
# Will be used as a superclass of the class.
#================================================= =============================
Game_Character class
#------------------------------------------------- -------------------------
# ● Update frame
#------------------------------------------------- -------------------------
def update
# During the jump, the move down branch
if jumping?
update_jump
elsif moving?
update_move
else
update_stop
end
# If the count Exceeds the maximum Anime
# ※ The maximum value is 18 speed from the base value minus 1 *
# The file name [n] containing the case, the normal (n-1) / 4 This pattern of speed
if @ character_name [/ \ [(\ d +) \] /]
@ Anime_count = 20 if @ anime_count> 0 and @ pattern == @ original_pattern
if @ anime_count * ($ 1.to_i - 1) / 4> 18 - @ move_speed * 2
# The case of suspended animation and OFF shutdown
if not @ step_anime and @ stop_count> 0
# Restore the original pattern
@ Pattern = @ original_pattern
# Shutdown animation on the move or if ON
else
# This pattern
@ Pattern = @ pattern% ($ 1.to_i - 1) + 1
end
# Clear the count Anime
@ Anime_count = 0
end
else
# Handle regular updating patterns of characters (just copy and paste the default processing)
if @ anime_count> 18 - @ move_speed * 2
# The case of suspended animation and OFF shutdown
if not @ step_anime and @ stop_count> 0
# Restore the original pattern
@ Pattern = @ original_pattern
# Shutdown animation on the move or if ON
else
# This pattern
@ Pattern = (@ pattern + 1)% 4
end
# Clear the count Anime
@ Anime_count = 0
end
end
# If you are weight
if @ wait_count> 0
# Reduce Ueitokaunto
@ Wait_count -= 1
return
end
# Case of forced migration route
if @ move_route_forcing
# Move Custom
move_type_custom
return
end
# If a lock or waiting for the event run
if @ starting or lock?
# Move to autonomy is not
return
end
# The value of the constant stop count (calculated from the frequency of moving) is exceeded
if @ stop_count> (40 - @ move_frequency * 2) * (6 - @ move_frequency)
# Branch move type
case @ move_type
when 1 # random
move_type_random
when 2 # approaches
move_type_toward_player
when 3 # custom
move_type_custom
end
end
end
end
#================================================= =============================
# ■ Sprite_Character
#------------------------------------------------- -----------------------------
# The character sprite for display. Game_Character an instance of the class
# To monitor, lets you automatically change the state of the sprite.
#================================================= =============================
class Sprite_Character <RPG:: Sprite
#------------------------------------------------- -------------------------
# ● Update frame
#------------------------------------------------- -------------------------
def update
super
# Tile ID, file name, if different from what is currently one of the hue
if @ TILE_ID! = @ Character.tile_id or
@ Character_name! = @ Character.character_name or
@ Character_hue! = @ Character.character_hue
# Tile ID and file name, remember the hue
@ TILE_ID = @ character.tile_id
@ Character_name = @ character.character_name
@ Character_hue = @ character.character_hue
# If tile ID value is valid
if @ TILE_ID> = 384
self.bitmap = RPG:: Cache.tile ($ game_map.tileset_name,
@ TILE_ID, @ character.character_hue)
self.src_rect.set (0, 0, 32, 32)
self.ox = 16
self.oy = 32
# If tile ID value is invalid
else
self.bitmap = RPG:: Cache.character (@ character.character_name,
@ Character.character_hue)
# The file name [n] when it contains, and next to the number of variations: No, vertical: 4 considers
if@character.character_name [/ \ [(\ d +) \] /]
@ Cw = bitmap.Width / $ 1.to_i
@ Ch = bitmap.Height / 4
# The file name [D] If you have not entered, the next as usual: 4, vertical: 4 to
else
@ Cw = bitmap.Width / 4
@ Ch = bitmap.Height / 4
end
self.ox = @ cw / 2
self.oy = @ ch
end
end
# Set the visible state
self.visible = (not@character.transparent)
# If the graphic character
== 0 if @ TILE_ID
# Set the source rectangle
sx = @ character.pattern * @ cw
sy = (@ character.direction - 2) / 2 * @ ch
self.src_rect.set (sx, sy, @ cw, @ ch)
end
# Setting the coordinates of the sprite
self.x = @ character.screen_x
self.y = @ character.screen_y
self.z = @ character.screen_z (@ ch)
# Opacity, synthesis methods, setting the depth of bush
self.opacity = @ character.opacity
self.blend_type = @ character.blend_type
self.bush_depth = @ character.bush_depth
# Animation _id! = 0
animation = $ data_animations [@ character.animation_id]
animation (animation, true)
@ Character.animation_id = 0
end
end
end
# Change if you use a graphic representation of the menu screen in passing patterns often
#================================================= =============================
# ■ Window_Base
#------------------------------------------------- -----------------------------
# Is the superclass of all windows in The Game.
#================================================= =============================
class Window_Base <Window
#------------------------------------------------- -------------------------
# ● drawing graphics
# Actor: actor
# X: X coordinate of first drawing
# Y: Y coordinate of the first draw
#------------------------------------------------- -------------------------
def draw_actor_graphic (actor, x, y)
bitmap = RPG:: Cache.character (actor.character_name, actor.character_hue)
if actor.character_name [/ \ [(\ d +) \] /]
cw = bitmap.Width / $ 1.to_i
ch = bitmap.Height / 4
else
cw = bitmap.Width / 4
ch = bitmap.Height / 4
end
src_rect = Rect.new (0, 0, cw, ch)
self.contents.blt (x - cw / 2, y - ch, bitmap, src_rect)
end
end
#================================================= =============================
# ■ Window_SaveFile
#------------------------------------------------- -----------------------------
# Display screen and loading screen save, save file window.
#================================================= =============================
class Window_SaveFile <Window_Base
#------------------------------------------------- -------------------------
# ● Refresh
#------------------------------------------------- -------------------------
def refresh
self.contents.clear
# Draw a file number
self.contents.font.color = normal_color
name = "File # (@ file_index + 1)"
self.contents.draw_text (4, 0, 600, 32, name)
@ Name_width = contents.text_size (name). width
# If there is a save file
if @ file_exist
# Draw a Character
for i in 0 ... @ Characters.size
bitmap = RPG:: Cache.character (@ characters [i] [0], @ characters [i] [1])
if @ characters [i] [0] [/ \ [(\ d +) \] /]
cw = bitmap.Width / $ 1.to_i
ch = bitmap.Height / 4
else
cw = bitmap.Width / 4
ch = bitmap.Height / 4
end
src_rect = Rect.new (0, 0, cw, ch)
x = 300 - @ characters.size * 32 + i * 64 - cw / 2
self.contents.blt (x, 68 - ch, bitmap, src_rect)
end
# Draw Play time
hour = @ total_sec / 60 / 60
min = @ total_sec / 60% 60
sec = @ total_sec% 60
time_string = sprintf ( "% 02d:% 02d:% 02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text (4, 8, 600, 32, time_string, 2)
# Draw a timestamp
self.contents.font.color = normal_color
time_string = @ time_stamp.strftime ( "% Y /% m /% d% H:% M")
self.contents.draw_text (4, 40, 600, 32, time_string, 2)
end
end
end
#================================================= =============================
# ■ Game_Player
#------------------------------------------------- -----------------------------
# Class dealing with players. Decision and start of the event, and scroll the map
# Have a function. Instance of this class is $ Game_Player reference.
#================================================= =============================
class Game_Player <Game_Character
#------------------------------------------------- -------------------------
# ● Update animation
#------------------------------------------------- -------------------------
def anime_update
# If the count Exceeds the maximum Anime
# ※ The maximum value is 18 speed from the base value minus 1 *
# The file name [n] containing the case, the normal (n-1) / 4 This pattern of speed
if @ character_name [/ \ [(\ d +) \] /]
@ Anime_count = 20 if @ anime_count> 0 and @ pattern == @ original_pattern
if @ anime_count * ($ 1.to_i - 1) / 4> 18 - @ move_speed * 2
# The case of suspended animation and OFF shutdown
if not @ step_anime and @ stop_count> 0
# Restore the original pattern
@ Pattern = @ original_pattern
# Shutdown animation on the move or if ON
else
# This pattern
@ Pattern = @ pattern% ($ 1.to_i - 1) + 1
end
# Clear the count Anime
@ Anime_count = 0
end
else
# Handle regular updating patterns of characters (just copy and paste the default processing)
if @ anime_count> 18 - @ move_speed * 2
# The case of suspended animation and OFF shutdown
if not @ step_anime and @ stop_count> 0
# Restore the original pattern
@ Pattern = @ original_pattern
# Shutdown animation on the move or if ON
else
# This pattern
@ Pattern = (@ pattern + 1)% 4
end
# Clear the count Anime
@ Anime_count = 0
end
end
end
end
1) Are these supposed to be in there? ( To lots of programming languages these mean nothing and can cause a runtime can occur : ※ , ■ , ● )
2) Try Replacing : elsif moving? With : elsif moving
3)Code:# The character sprite for display. Game_Character an instance of the class # To monitor, lets you automatically change the state of the sprite.
- 27 Feb. 2010 02:47am #11
- 27 Feb. 2010 03:24am #12
- 01 Mar. 2010 02:25am #13
a friend of mine said thay think the code is in spanish but sadly i can not read it so if anyone can read spanish plz let me know