Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

resolution trouble

Status
Not open for further replies.
this idiot who made my starter kit has a resolution script which changes the RES to 480x320, which is fine, but he didn't change anything else concerning this!!!

in other words, it sometimes occurs that the game is going on in a screen you can't see! character centering in the screen doesn't work properly, and i don't want this CRAPPY resolution anymore!

simply deleting the script is just causing errors! how do i change this?

OR...

how can i change it so the screen is centered on the player no matter what?
 

Queue

Sponsor

When deleting the script, the errors will reference to what other script is having issues with it not being there. After an error, it usually saves it temporarily so when you open the scripts section in the maker (F11?) you will see where (Script + Line) the error was caused. The script will probably have that resolution somewhere within it, just change the input to 640 by 480 (640,480 / 650 x 480). Hope that slightly helps.

EDIT: And sephi's right, you aren’t exactly complimenting the scripter on a seemingly nice script set.
 
i know...just got angry with the guy for a minute...he's actually a bit of a genious! just had some REALLY dumb mistakes compared to how amazing his script is! and i do compliment him for the sk

edit: this is VERY angering! I cant find where he forces the screen parameters to 480 x 320!
 

Queue

Sponsor

Look the scripter up (locate) and ask s/he face to face (per-se) or post the project here to allow scripters / support people access to it. You can make a new project and copy the script file in the data folder to that projects data folder to preserve secrecy. That of’ course brings up the subject of whether or not you’re using the legal version.
 

Queue

Sponsor

So that's a "No" to having the legal edition? Either way, just post each script given to you by whoever scripted it for you. I'll check them over for my lunch break.

Use the spoiler tags for each script to preserve space.

EDIT:
I've just realised something, your screen resolution has been changed to use the Pokemon-like System hasn't it? I can probably still help you but I recommend using the 'Any Resolution' (Or whatever it is) instead of the one supplied with the SK which may in fact fix your problem. Or you can return the resolution back to 640 x 480.
 
ohhhh! uhhh, i don't know how to do spoiler tags, i don't think. I'll try...

ok, i wasn't sure what u needed, so i attached a few scripts here, need anymore, tell me->

it won't let me attach more than this, so if you need, say, Window_Base, post so i can post back.

what the? i though attachments let you view them!!! damn...

spoiler is that Show/Hide right? how do you do that?
 
[ /spoiler] #Without spaces

Also to change resolution just do
$width = amount
$height = amount

^^I think that will do the trick


Also please stop Offending the Scripter, I wouldn't like script something and then be insulted because od a Idiot *no offense intended* who doesn't know how to do something. We (scripters) can't do all the job for you (non-scripters), you will need to edit a few things so that it will work as you want. So hope I helped, and sorry If I offended you, it wasn't my intention.
 

Mac

Member

To be honest, anyone with an illegal edition of the RMXP doesn't deserve any help, you should pay for it like the rest of us did. RMXP.org does not support illegal users in any form.
 
Mac;135298 said:
To be honest, anyone with an illegal edition of the RMXP doesn't deserve any help, you should pay for it like the rest of us did. RMXP.org does not support illegal users in any form.

and u dont deserve that avatar...what's ur point?

i want to create, and not being wealthy and over 18 should not bar me from creating! so po!

by calling the guy an idiot, i meant (and i think i explained this, too!) that he overlooked some crucial parts to his scripts. that's all... ever been frustrated before? no, i guess u haven't...though chaos guy said he meant well, so dont take my venting on Mac's personal attack to badly.
 

Queue

Sponsor

Anybody could just not 'own' RPG Maker XP but use the Trial and rebuild their computer every 30 days. Owning it is better in all ways as Mac had said, you would get more support for owning it than not.

Also chaos_killer, I can't download any files including attachments. Just copy and paste the file's contents into Spoiler tags with a title labelling what they are.
 
yeah, i know...just found out how to spoil, here:

Game_Screen
#==============================================================================
# â–  Game_Screen
#------------------------------------------------------------------------------
#  色調変更やフラッシュなど、画面全体に関係する処理のデータを保持するクラスで
# す。このクラスのインスタンスは $game_screen で参照されます。
#==============================================================================

class Game_Screen
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :tone # 色調
attr_reader :flash_color # フラッシュ色
attr_reader :shake # シェイク位置
attr_reader :pictures # ピクチャ
attr_reader :weather_type # 天候 タイプ
attr_reader :weather_max # 天候 画像の最大数
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
@tone = Tone.new(0, 0, 0, 0)
@tone_target = Tone.new(0, 0, 0, 0)
@tone_duration = 0
@flash_color = Color.new(0, 0, 0, 0)
@flash_duration = 0
@shake_power = 0
@shake_speed = 0
@shake_duration = 0
@shake_direction = 1
@shake = 0
@pictures = [nil]
for i in 1..100
@pictures.push(Game_Picture.new(i))
end
@weather_type = 0
@weather_max = 0.0
@weather_type_target = 0
@weather_max_target = 0.0
@weather_duration = 0
end
#--------------------------------------------------------------------------
# ● 色調変更の開始
# tone : 色調
# duration : 時間
#--------------------------------------------------------------------------
def start_tone_change(tone, duration)
@tone_target = tone.clone
@tone_duration = duration
if @tone_duration == 0
@tone = @tone_target.clone
end
end
#--------------------------------------------------------------------------
# ● フラッシュの開始
# color : 色
# duration : 時間
#--------------------------------------------------------------------------
def start_flash(color, duration)
@flash_color = color.clone
@flash_duration = duration
end
#--------------------------------------------------------------------------
# ● シェイクの開始
# power : 強さ
# speed : 速さ
# duration : 時間
#--------------------------------------------------------------------------
def start_shake(power, speed, duration)
@shake_power = power
@shake_speed = speed
@shake_duration = duration
end
#--------------------------------------------------------------------------
# ● 天候の設定
# type : タイプ
# power : 強さ
# duration : 時間
#--------------------------------------------------------------------------
def weather(type, power, duration)
@weather_type_target = type
if @weather_type_target != 0
@weather_type = @weather_type_target
end
if @weather_type_target == 0
@weather_max_target = 0.0
else
@weather_max_target = (power + 1) * 4.0
end
@weather_duration = duration
if @weather_duration == 0
@weather_type = @weather_type_target
@weather_max = @weather_max_target
end
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
if @tone_duration >= 1
d = @tone_duration
@tone.red = (@tone.red * (d - 1) + @tone_target.red) / d
@tone.green = (@tone.green * (d - 1) + @tone_target.green) / d
@tone.blue = (@tone.blue * (d - 1) + @tone_target.blue) / d
@tone.gray = (@tone.gray * (d - 1) + @tone_target.gray) / d
@tone_duration -= 1
end
if @flash_duration >= 1
d = @flash_duration
@flash_color.alpha = @flash_color.alpha * (d - 1) / d
@flash_duration -= 1
end
if @shake_duration >= 1 or @shake != 0
delta = (@shake_power * @shake_speed * @shake_direction) / 10.0
if @shake_duration <= 1 and @shake * (@shake + delta) < 0
@shake = 0
else
@shake += delta
end
if @shake > @shake_power * 2
@shake_direction = -1
end
if @shake < - @shake_power * 2
@shake_direction = 1
end
if @shake_duration >= 1
@shake_duration -= 1
end
end
if @weather_duration >= 1
d = @weather_duration
@weather_max = (@weather_max * (d - 1) + @weather_max_target) / d
@weather_duration -= 1
if @weather_duration == 0
@weather_type = @weather_type_target
end
end
if $game_temp.in_battle
for i in 51..100
@pictures.update
end
else
for i in 1..50
@pictures.update
end
end
end
end


*Resolution
#==============================================================================
# â–  Game_Player
#------------------------------------------------------------------------------
#  remade to be compatible with change sreen size script
#==============================================================================

class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ● define constant
#--------------------------------------------------------------------------
CENTER_X = ($width/2 - 16) * 4 # X coordinate in the center of the screen
CENTER_Y = ($height/2 - 16) * 4 # Y coordinate in the center of the screen
end

#==============================================================================
# â–  Spriteset_Map //squall@loeher.zzn.com
#------------------------------------------------------------------------------
# remade to be compatible with change sreen size script
#==============================================================================

class Spriteset_Map
#--------------------------------------------------------------------------
# ● Initialize
#--------------------------------------------------------------------------
def initialize
if $game_map.width >= 25 and $game_map.height >= 19
$width2 = $width
$height2 = $height
elsif $game_map.width >= 25 and $game_map.height < 19
$width2 = $width
$height2 = 480
elsif $game_map.width < 25 and $game_map.height >= 19
$width2 = 640
$height2 = $height
elsif $game_map.width < 25 and $game_map.height < 19
$width2 = 640
$height2 = 480
else
$width2 = $width
$height2 = $height
end
@viewport1 = Viewport.new(0, 0, $width2, $height2)
@viewport2 = Viewport.new(0, 0, $width2, $height2)
@viewport3 = Viewport.new(0, 0, $width2, $height2)
@viewport4 = Viewport.new(640, 0, $width2-640, 480)
@viewport5 = Viewport.new(0, 480, 640, $height2-480)
@viewport6 = Viewport.new(640, 480, $width2-640, $height2-480)

@viewport2.z = 200
@viewport3.z = 5000

@tilemap = Tilemap.new(@viewport2)
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)

for i in 0..6
autotile_name = $game_map.autotile_names
@tilemap.autotiles = RPG::Cache.autotile(autotile_name)
end
@tilemap.map_data = $game_map.data
@tilemap.priorities = $game_map.priorities

@panorama = Plane.new(@viewport2)
@panorama.z = -1000

@fog = Plane.new(@viewport2)
@fog.z = 3000

@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport2, $game_map.events)
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport2, $game_player))

@weather = RPG::Weather.new(@viewport2)

@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2, $game_screen.pictures))
end

@timer_sprite = Sprite_Timer.new

@tilemap2 = Tilemap.new(@viewport4)
@tilemap2.tileset = RPG::Cache.tileset($game_map.tileset_name)
@tilemap3 = Tilemap.new(@viewport5)
@tilemap3.tileset = RPG::Cache.tileset($game_map.tileset_name)
@tilemap4 = Tilemap.new(@viewport6)
@tilemap4.tileset = RPG::Cache.tileset($game_map.tileset_name)

for i in 0..6
autotile_name = $game_map.autotile_names
@tilemap2.autotiles = RPG::Cache.autotile(autotile_name)
@tilemap3.autotiles = RPG::Cache.autotile(autotile_name)
@tilemap4.autotiles = RPG::Cache.autotile(autotile_name)
end

@tilemap2.map_data = $game_map.data
@tilemap3.map_data = $game_map.data
@tilemap4.map_data = $game_map.data

update
end
#--------------------------------------------------------------------------
# ● Dispose the sprite
#--------------------------------------------------------------------------
def dispose

@tilemap.tileset.dispose
@tilemap2.tileset.dispose
@tilemap3.tileset.dispose
@tilemap4.tileset.dispose

for i in 0..6
@tilemap.autotiles.dispose
@tilemap2.autotiles.dispose
@tilemap3.autotiles.dispose
@tilemap4.autotiles.dispose
end

@tilemap.dispose
@tilemap2.dispose
@tilemap3.dispose
@tilemap4.dispose

@panorama.dispose
@fog.dispose

for sprite in @character_sprites
sprite.dispose
end

@weather.dispose

for sprite in @picture_sprites
sprite.dispose
end

@timer_sprite.dispose
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose

@viewport4.dispose
@viewport5.dispose
@viewport6.dispose
end
#--------------------------------------------------------------------------
# ● Update the sprite
#--------------------------------------------------------------------------
def update

if @panorama_name != $game_map.panorama_name or
@panorama_hue != $game_map.panorama_hue
@panorama_name = $game_map.panorama_name
@panorama_hue = $game_map.panorama_hue
if @panorama.bitmap != nil
@panorama.bitmap.dispose
@panorama.bitmap = nil
end
if @panorama_name != ""
@panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
end
Graphics.frame_reset
end

if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
@fog_name = $game_map.fog_name
@fog_hue = $game_map.fog_hue
if @fog.bitmap != nil
@fog.bitmap.dispose
@fog.bitmap = nil
end
if @fog_name != ""
@fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
end
Graphics.frame_reset
end

@tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
@tilemap.update

@tilemap2.ox = @tilemap.ox + 640
@tilemap2.oy = @tilemap.oy
@tilemap2.update

@tilemap3.ox = @tilemap.ox
@tilemap3.oy = @tilemap.oy + 480
@tilemap3.update

@tilemap4.ox = @tilemap.ox + 640
@tilemap4.oy = @tilemap.oy + 480
@tilemap4.update

@panorama.ox = $game_map.display_x / 8
@panorama.oy = $game_map.display_y / 8

@fog.zoom_x = $game_map.fog_zoom / 100.0
@fog.zoom_y = $game_map.fog_zoom / 100.0
@fog.opacity = $game_map.fog_opacity
@fog.blend_type = $game_map.fog_blend_type
@fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
@fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
@fog.tone = $game_map.fog_tone

for sprite in @character_sprites
sprite.update
end

@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.ox = $game_map.display_x / 4
@weather.oy = $game_map.display_y / 4
@weather.update

for sprite in @picture_sprites
sprite.update
end

@timer_sprite.update

@viewport3.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
@viewport3.color = $game_screen.flash_color
@viewport1.update
@viewport3.update
end
end

class Game_Map
#--------------------------------------------------------------------------
# ● Scroll the map down
# distance : Distance to scroll in real units (4 = 1 pixel).
#--------------------------------------------------------------------------
def scroll_down(distance)
if $height / 32.0 < self.height - 1
@display_y = [@display_y + distance, (self.height - ($height / 32.0)) * 128].min
else
@display_y = [@display_y + distance, (self.height - 15) * 128].min
end
end
#--------------------------------------------------------------------------
# ● Scroll the map left
# distance : Distance to scroll in real units (4 = 1 pixel).
#--------------------------------------------------------------------------
def scroll_left(distance)
@display_x = [@display_x - distance, 0].max
end
#--------------------------------------------------------------------------
# ● Scroll the map right
# distance : Distance to scroll in real units (4 = 1 pixel).
#--------------------------------------------------------------------------
def scroll_right(distance)
if $width / 32.0 < self.width - 1
@display_x = [@display_x + distance, (self.width - ($width / 32.0)) * 128].min
else
@display_x = [@display_x + distance, (self.width - 20) * 128].min
end
end
#--------------------------------------------------------------------------
# ● Scroll the map up
# distance : Distance to scroll in real units (4 = 1 pixel).
#--------------------------------------------------------------------------
def scroll_up(distance)
@display_y = [@display_y - distance, 0].max
end
end


spriteset_battle
#==============================================================================
# â–  Spriteset_Battle
#------------------------------------------------------------------------------
#  バトル画面のスプライトをまとめたクラスです。このクラスは Scene_Battle クラ
# スの内部で使用されます。
#==============================================================================

class Spriteset_Battle
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :viewport1 # エネミー側のビューポート
attr_reader :viewport2 # アクター側のビューポート
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
# ビューポートを作成
@viewport1 = Viewport.new(0, 0, 640, 320)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport4 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 101
@viewport3.z = 200
@viewport4.z = 5000
# バトルバックスプライトを作成
@battleback_sprite = Sprite.new(@viewport1)
# エネミースプライトを作成
@enemy_sprites = []
for enemy in $game_troop.enemies.reverse
@enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
end
# アクタースプライトを作成
@actor_sprites = []
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
# 天候を作成
@weather = RPG::Weather.new(@viewport1)
# ピクチャスプライトを作成
@picture_sprites = []
for i in 51..100
@picture_sprites.push(Sprite_Picture.new(@viewport3,
$game_screen.pictures))
end
# タイマースプライトを作成
@timer_sprite = Sprite_Timer.new
# フレーム更新
update
end
#--------------------------------------------------------------------------
# ● 解放
#--------------------------------------------------------------------------
def dispose
# バトルバックビットマップが存在していたら解放
if @battleback_sprite.bitmap != nil
@battleback_sprite.bitmap.dispose
end
# バトルバックスプライトを解放
@battleback_sprite.dispose
# エネミースプライト、アクタースプライトを解放
for sprite in @enemy_sprites + @actor_sprites
sprite.dispose
end
# 天候を解放
@weather.dispose
# ピクチャスプライトを解放
for sprite in @picture_sprites
sprite.dispose
end
# タイマースプライトを解放
@timer_sprite.dispose
# ビューポートを解放
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
@viewport4.dispose
end
#--------------------------------------------------------------------------
# ● エフェクト表示中判定
#--------------------------------------------------------------------------
def effect?
# エフェクトが一つでも表示中なら true を返す
for sprite in @enemy_sprites + @actor_sprites
return true if sprite.effect?
end
return false
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# アクタースプライトの内容を更新 (アクターの入れ替えに対応)
@actor_sprites[0].battler = $game_party.actors[0]
@actor_sprites[1].battler = $game_party.actors[1]
@actor_sprites[2].battler = $game_party.actors[2]
@actor_sprites[3].battler = $game_party.actors[3]
# バトルバックのファイル名が現在のものと違う場合
if @battleback_name != $game_temp.battleback_name
@battleback_name = $game_temp.battleback_name
if @battleback_sprite.bitmap != nil
@battleback_sprite.bitmap.dispose
end
@battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
@battleback_sprite.src_rect.set(0, 0, 480, 320)
@battleback_sprite.zoom_x = 1
@battleback_sprite.zoom_y = 1

end
# バトラースプライトを更新
for sprite in @enemy_sprites + @actor_sprites
sprite.update
end
# 天候グラフィックを更新
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.update
# ピクチャスプライトを更新
for sprite in @picture_sprites
sprite.update
end
# タイマースプライトを更新
@timer_sprite.update
# 画面の色調とシェイク位置を設定
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
# 画面のフラッシュ色を設定
@viewport4.color = $game_screen.flash_color
# ビューポートを更新
@viewport1.update
@viewport2.update
@viewport4.update
end
end


Spriteset_Map
#==============================================================================
# â–  Spriteset_Map
#------------------------------------------------------------------------------
#  マップ画面のスプライトやタイルマップなどをまとめたクラスです。このクラスは
# Scene_Map クラスの内部で使用されます。
#==============================================================================

class Spriteset_Map
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
# ビューポートを作成
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 200
@viewport3.z = 5000
# タイルマップを作成
@tilemap = Tilemap.new(@viewport1)
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
for i in 0..6
autotile_name = $game_map.autotile_names
@tilemap.autotiles = RPG::Cache.autotile(autotile_name)
end
@tilemap.map_data = $game_map.data
@tilemap.priorities = $game_map.priorities
@tilemap.zoom_x = 0.5
@tilemap.zoom_y = 0.5
# パノラマプレーンを作成
@panorama = Plane.new(@viewport1)
@panorama.z = -1000
# フォグプレーンを作成
@fog = Plane.new(@viewport1)
@fog.z = 3000
# キャラクタースプライトを作成
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events)
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
# 天候を作成
@weather = RPG::Weather.new(@viewport1)
# ピクチャを作成
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures))
end
# タイマースプライトを作成
@timer_sprite = Sprite_Timer.new
# フレーム更新
update
end
#--------------------------------------------------------------------------
# ● 解放
#--------------------------------------------------------------------------
def dispose
# タイルマップを解放
@tilemap.tileset.dispose
for i in 0..6
@tilemap.autotiles.dispose
end
@tilemap.dispose
# パノラマプレーンを解放
@panorama.dispose
# フォグプレーンを解放
@fog.dispose
# キャラクタースプライトを解放
for sprite in @character_sprites
sprite.dispose
end
# 天候を解放
@weather.dispose
# ピクチャを解放
for sprite in @picture_sprites
sprite.dispose
end
# タイマースプライトを解放
@timer_sprite.dispose
# ビューポートを解放
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# パノラマが現在のものと異なる場合
if @panorama_name != $game_map.panorama_name or
@panorama_hue != $game_map.panorama_hue
@panorama_name = $game_map.panorama_name
@panorama_hue = $game_map.panorama_hue
if @panorama.bitmap != nil
@panorama.bitmap.dispose
@panorama.bitmap = nil
end
if @panorama_name != ""
@panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
end
Graphics.frame_reset
end
# フォグが現在のものと異なる場合
if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
@fog_name = $game_map.fog_name
@fog_hue = $game_map.fog_hue
if @fog.bitmap != nil
@fog.bitmap.dispose
@fog.bitmap = nil
end
if @fog_name != ""
@fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
end
Graphics.frame_reset
end
# タイルマップを更新
@tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
@tilemap.update
# パノラマプレーンを更新
@panorama.ox = $game_map.display_x / 8
@panorama.oy = $game_map.display_y / 8
# フォグプレーンを更新
@fog.zoom_x = $game_map.fog_zoom / 100.0
@fog.zoom_y = $game_map.fog_zoom / 100.0
@fog.opacity = $game_map.fog_opacity
@fog.blend_type = $game_map.fog_blend_type
@fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
@fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
@fog.tone = $game_map.fog_tone
# キャラクタースプライトを更新
for sprite in @character_sprites
sprite.update
end
# 天候グラフィックを更新
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.ox = $game_map.display_x / 4
@weather.oy = $game_map.display_y / 4
@weather.update
# ピクチャを更新
for sprite in @picture_sprites
sprite.update
end
# タイマースプライトを更新
@timer_sprite.update
# 画面の色調とシェイク位置を設定
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
# 画面のフラッシュ色を設定
@viewport3.color = $game_screen.flash_color
# ビューポートを更新
@viewport1.update
@viewport3.update
end
end


Window_Base
#==============================================================================
# â–  Window_Base
#------------------------------------------------------------------------------
#  ゲーム中のすべてのウィンドウのスーパークラスです。
#==============================================================================

class Window_Base < Window
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
# width : ウィンドウの幅
# height : ウィンドウの高さ
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super()
@windowskin_name = $game_system.windowskin_name
self.windowskin = RPG::Cache.windowskin(@windowskin_name)
self.x = x
self.y = y
self.width = width
self.height = height
self.z = 100
end
#--------------------------------------------------------------------------
# ● 解放
#--------------------------------------------------------------------------
def dispose
# ウィンドウ内容のビットマップが設定されていれば解放
if self.contents != nil
self.contents.dispose
end
super
end
#--------------------------------------------------------------------------
# ● 文字色取得
# n : 文字色番号 (0~7)
#--------------------------------------------------------------------------
def text_color(n)
case n
when 0
return Color.new(255, 255, 255, 255)
when 1
return Color.new(128, 128, 255, 255)
when 2
return Color.new(255, 128, 128, 255)
when 3
return Color.new(128, 255, 128, 255)
when 4
return Color.new(128, 255, 255, 255)
when 5
return Color.new(255, 128, 255, 255)
when 6
return Color.new(255, 255, 128, 255)
when 7
return Color.new(192, 192, 192, 255)
else
normal_color
end
end
#--------------------------------------------------------------------------
# ● 通常文字色の取得
#--------------------------------------------------------------------------
def normal_color
return Color.new(255, 255, 255, 255)
end
#--------------------------------------------------------------------------
# ● 無効文字色の取得
#--------------------------------------------------------------------------
def disabled_color
return Color.new(255, 255, 255, 128)
end
#--------------------------------------------------------------------------
# ● システム文字色の取得
#--------------------------------------------------------------------------
def system_color
return Color.new(192, 224, 255, 255)
end
#--------------------------------------------------------------------------
# ● ピンチ文字色の取得
#--------------------------------------------------------------------------
def crisis_color
return Color.new(255, 255, 64, 255)
end
#--------------------------------------------------------------------------
# ● 戦闘不能文字色の取得
#--------------------------------------------------------------------------
def knockout_color
return Color.new(255, 0, 0)
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
#super
# ウィンドウスキンが変更された場合、再設定
if $game_system.windowskin_name != @windowskin_name
@windowskin_name = $game_system.windowskin_name
self.windowskin = RPG::Cache.windowskin(@windowskin_name)
end
end
#--------------------------------------------------------------------------
# ● グラフィックの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_graphic(actor, x, y)
bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● 名前の描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y, state=false)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name,align=0, state)
end
#--------------------------------------------------------------------------
# ● クラスの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_class(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 236, 32, actor.class_name)
end
#--------------------------------------------------------------------------
# ● レベルの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_level(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
#--------------------------------------------------------------------------
# ● 描画用のステート文字列作成
# actor : アクター
# width : 描画先の幅
# need_normal : [正常] が必要かどうか (true / false)
#--------------------------------------------------------------------------
def make_battler_state_text(battler, width, need_normal)
# 括弧の幅を取得
brackets_width = self.contents.text_size("[]").width
# ステート名の文字列を作成
text = ""
for i in battler.states
if $data_states.rating >= 1
if text == ""
text = $data_states.name
else
new_text = text + "/" + $data_states.name
text_width = self.contents.text_size(new_text).width
if text_width > width - brackets_width
break
end
text = new_text
end
end
end
# ステート名の文字列が空の場合は "[正常]" にする
if text == ""
if need_normal
text = "[Normal]"
end
else
# 括弧をつける
text = "[" + text + "]"
end
# 完成した文字列を返す
return text
end
#--------------------------------------------------------------------------
# ● ステートの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
# width : 描画先の幅
#--------------------------------------------------------------------------
def draw_actor_state(actor, x, y, width = 120)
text = make_battler_state_text(actor, width, true)
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
self.contents.draw_text(x, y, width, 32, text)
end
#--------------------------------------------------------------------------
# ● EXP の描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_exp(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 24, 32, "E")
self.contents.font.color = normal_color
self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
end
#--------------------------------------------------------------------------
# ● HP の描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
# width : 描画先の幅
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 144)
# 文字列 "HP" を描画
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# MaxHP を描画するスペースがあるか計算
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
# HP を描画
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
# MaxHP を描画
if flag
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
end
end
#--------------------------------------------------------------------------
# ● SP の描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
# width : 描画先の幅
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y, width = 144)
# 文字列 "SP" を描画
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# MaxSP を描画するスペースがあるか計算
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end
# SP を描画
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
# MaxSP を描画
if flag
self.contents.font.color = normal_color
self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
end
end
#--------------------------------------------------------------------------
# ● パラメータの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
# type : パラメータの種類 (0~6)
#--------------------------------------------------------------------------
def draw_actor_parameter(actor, x, y, type)
case type
when 0
parameter_name = $data_system.words.atk
parameter_value = actor.atk
when 1
parameter_name = $data_system.words.pdef
parameter_value = actor.pdef
when 2
parameter_name = $data_system.words.mdef
parameter_value = actor.mdef
when 3
parameter_name = $data_system.words.str
parameter_value = actor.str
when 4
parameter_name = $data_system.words.dex
parameter_value = actor.dex
when 5
parameter_name = $data_system.words.agi
parameter_value = actor.agi
when 6
parameter_name = $data_system.words.int
parameter_value = actor.int
end
self.contents.font.color = system_color
parameter_name = ""
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
end
#--------------------------------------------------------------------------
# ● アイテム名の描画
# item : アイテム
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_item_name(item, x, y)
return if item == nil
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
self.contents.draw_text(x + 28, y, 212, 32, item.name)
end
end


EDIT: AH! stinkin smileys!
 

Mac

Member

What i said was not a personal attack in any form, without a legal copy of the RPG Maker XP you are breaking the law, and all those who assist you in a sense. RMXP.org does not condone the use of the illegal RPG Maker XP.

I've made my choice and i have spoken out.
 

Anonymous

Guest

There's no excuse for pirating RMXP. If you can't afford it right now, work on other aspects of your game, like story, graphics, and dialog, until you can. It's not that hard to make $60, shovel some snow, recycle (many recycling places will pay for tin and aluminum), get a part time job, ask your parents/neighbors/family members for odd jobs you can do around the house for cash, ask for it for a birthday.

Not having a credit card is not an excuse, as you can get a gift VISA or Mastercard, you can have someone else buy it for you and reimburse them, or you can get a Paypal debit card or a debit card for your own checking account.

RMXP.org does not condone software piracy. RPG Maker XP is not something that you need to survive, and thus "i want to create, and not being wealthy and over 18 should not bar me from creating! so po!" is no excuse for breaking the law to obtain it.

Closed.
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top