- Сообщений: 5
- Спасибо получено: 0
Правила раздела:
1 Задавайте конкретные вопросы. Для болтовни есть свободный раздел.
2 По возможности давайте конкретные ответы.
3 Один вопрос=одна тема. Если хотите задать ещё вопрос, то начинайте новую тему.
4 Название темы должно составлять сам вопрос, и быть максимально конкретным. Рекомендуется начинать тему словами "Как", "Что", "Почему". А первый пост повторяет вопрос и даёт расширенные сведения.
5 Рекомендуется указывать версию мейкера (2000, 2003, RMXP, RMVX, ACE, IGM, и.т.д.. Это важно, и всё равно ведь спросят.
6 Темы "Пара вопросов", "Помогите", и подобные им - самый лёгкий путь к бану.
7 Поиск находится вверху справа.
А. Названия подразделов этого раздела уточняются. Советы принимаются.
1 Задавайте конкретные вопросы. Для болтовни есть свободный раздел.
2 По возможности давайте конкретные ответы.
3 Один вопрос=одна тема. Если хотите задать ещё вопрос, то начинайте новую тему.
4 Название темы должно составлять сам вопрос, и быть максимально конкретным. Рекомендуется начинать тему словами "Как", "Что", "Почему". А первый пост повторяет вопрос и даёт расширенные сведения.
5 Рекомендуется указывать версию мейкера (2000, 2003, RMXP, RMVX, ACE, IGM, и.т.д.. Это важно, и всё равно ведь спросят.
6 Темы "Пара вопросов", "Помогите", и подобные им - самый лёгкий путь к бану.
7 Поиск находится вверху справа.
А. Названия подразделов этого раздела уточняются. Советы принимаются.
Нужна помощь - вам сюда!
16 года 11 мес. назад #26886
от h3nd
h3nd ответил в теме Нужна помощь - вам сюда!
Буду рад
Тема заблокирована.
- Boris_Britv@
-
- Не в сети
- Бывалый
-
Скрыть
Больше
- Сообщений: 75
- Спасибо получено: 1
16 года 11 мес. назад - 16 года 11 мес. назад #26888
от Boris_Britv@
~Boris_Britv@
Boris_Britv@ ответил в теме Нужна помощь - вам сюда!
~Boris_Britv@
Последнее редактирование: 16 года 11 мес. назад пользователем Boris_Britv@.
Тема заблокирована.
- FeyVongFong
-
- Не в сети
- Новый участник
-
Скрыть
Больше
- Сообщений: 9
- Спасибо получено: 0
16 года 11 мес. назад #26889
от FeyVongFong
FeyVongFong ответил в теме Нужна помощь - вам сюда!
объясните как пользоваться tailset remaker
Тема заблокирована.
- Dr. Nick To
-
- Не в сети
- Живу я здесь
-
Скрыть
Больше
- Сообщений: 2158
- Спасибо получено: 24
16 года 11 мес. назад #26890
от Dr. Nick To
На седьмом столбе мудрости дома клана Тайра в Эдо написано: Каждый, кто не понимает разницу между небрежностью и качеством, старанием и поспешностью, - достоин сожаления.
Dr. Nick To ответил в теме Нужна помощь - вам сюда!
Если ты про тот что я выложил, то могу рассказать. А если просто про тайлсет мейкер, то он не для мейкера и применить его правильно можно, но муторно.
На седьмом столбе мудрости дома клана Тайра в Эдо написано: Каждый, кто не понимает разницу между небрежностью и качеством, старанием и поспешностью, - достоин сожаления.
Тема заблокирована.
- FeyVongFong
-
- Не в сети
- Новый участник
-
Скрыть
Больше
- Сообщений: 9
- Спасибо получено: 0
16 года 11 мес. назад #26891
от FeyVongFong
FeyVongFong ответил в теме Нужна помощь - вам сюда!
про тот что ты выложил
Тема заблокирована.
- FeyVongFong
-
- Не в сети
- Новый участник
-
Скрыть
Больше
- Сообщений: 9
- Спасибо получено: 0
16 года 11 мес. назад #26893
от FeyVongFong
FeyVongFong ответил в теме Нужна помощь - вам сюда!
кстати, никто не подскажет как скачать всю галлерею?
Тема заблокирована.
- Dr. Nick To
-
- Не в сети
- Живу я здесь
-
Скрыть
Больше
- Сообщений: 2158
- Спасибо получено: 24
16 года 11 мес. назад #26894
от Dr. Nick To
На седьмом столбе мудрости дома клана Тайра в Эдо написано: Каждый, кто не понимает разницу между небрежностью и качеством, старанием и поспешностью, - достоин сожаления.
Dr. Nick To ответил в теме Нужна помощь - вам сюда!
Сначала выбери тайлсет с которым будешь работать.
Отметь как в мейкере прозрачный и полупрозрачный цвет.
Потом так же загрузи второй сет.
А потом просто хватай тайлы и перетаскивай.
Если надо другой сет, просто подгружаешь его.
Если нужно удлиннить сет, то есть такая строчка в меню.
Отметь как в мейкере прозрачный и полупрозрачный цвет.
Потом так же загрузи второй сет.
А потом просто хватай тайлы и перетаскивай.
Если надо другой сет, просто подгружаешь его.
Если нужно удлиннить сет, то есть такая строчка в меню.
На седьмом столбе мудрости дома клана Тайра в Эдо написано: Каждый, кто не понимает разницу между небрежностью и качеством, старанием и поспешностью, - достоин сожаления.
Тема заблокирована.
- alexian
- Новый участник
-
Скрыть
Больше
- Спасибо получено: 0
16 года 11 мес. назад #26917
от alexian
alexian ответил в теме Нужна помощь - вам сюда!
Как цвет текста поменять?
Тема заблокирована.
16 года 11 мес. назад #26918
от dark32
Тьма, тьма, и ничего кроме тьмы...
ПОМОГИТЕ!!! или как быстро получить бан!
dark32 ответил в теме Нужна помощь - вам сюда!
Смотря где:
если в диалоге, то смотри файл справки, если нужного цвета нет, то добавлять его в скриптах;
если где-то в меню то нужно лезть в скрипты.
если в диалоге, то смотри файл справки, если нужного цвета нет, то добавлять его в скриптах;
если где-то в меню то нужно лезть в скрипты.
Тьма, тьма, и ничего кроме тьмы...
ПОМОГИТЕ!!! или как быстро получить бан!
Тема заблокирована.
- Boris_Britv@
-
- Не в сети
- Бывалый
-
Скрыть
Больше
- Сообщений: 75
- Спасибо получено: 1
16 года 11 мес. назад #26919
от Boris_Britv@
~Boris_Britv@
Boris_Britv@ ответил в теме Нужна помощь - вам сюда!
Цвета некоторых текстов можно поменять использовав поиск среди всех скриптов.
Искать надо font.color , если цвет можно сменить,то после должны будут написаны скобки с тремя значениями.
Пример строки self.bitmap.font.color.set(255, 255, 255). Изменяя значения в скобках можно поменять цвет.
Искать надо font.color , если цвет можно сменить,то после должны будут написаны скобки с тремя значениями.
Пример строки self.bitmap.font.color.set(255, 255, 255). Изменяя значения в скобках можно поменять цвет.
~Boris_Britv@
Тема заблокирована.
- Dr. Nick To
-
- Не в сети
- Живу я здесь
-
Скрыть
Больше
- Сообщений: 2158
- Спасибо получено: 24
16 года 11 мес. назад #26922
от Dr. Nick To
На седьмом столбе мудрости дома клана Тайра в Эдо написано: Каждый, кто не понимает разницу между небрежностью и качеством, старанием и поспешностью, - достоин сожаления.
Dr. Nick To ответил в теме Нужна помощь - вам сюда!
Или использовать UMS. Скажем спасибо Мефису за нормальный перевод.
На седьмом столбе мудрости дома клана Тайра в Эдо написано: Каждый, кто не понимает разницу между небрежностью и качеством, старанием и поспешностью, - достоин сожаления.
Тема заблокирована.
16 года 11 мес. назад - 16 года 11 мес. назад #26923
от Джекил
Не мертво то, что в вечности пребудет. со смертью времени и смерть умрет.
Джекил ответил в теме Нужна помощь - вам сюда!
Можно ли как то без скрипта сделать возможность активации умения через определенную кнопку прямо на карте на версии VX? То есть скажем, знает персонаж заклинание огненный шар и вызывает его на монстра, находясь прямо на карте локации.
Не мертво то, что в вечности пребудет. со смертью времени и смерть умрет.
Последнее редактирование: 16 года 11 мес. назад пользователем Джекил.
Тема заблокирована.
16 года 11 мес. назад #26924
от Ice
Ice ответил в теме Нужна помощь - вам сюда!
Джекил написано:
№1. делаешь 4 общих события, для 4-ч сторон для умений и расстояние для него.
№2. пишешь ветвление условия на проверку, выучил ли умение персонаж.
№3. в нем делаешь проверку в какую сторону смотрит персонаж и в зависимости от этого вызываешь №1.
№4 для события рисуешь что с прикосновением враг исчезает.
если нужна сила, то можно применить переменные.
ну вижу это таки образом:Можно ли как то без скрипта сделать возможность активации умения через определенную кнопку прямо на карте на версии VX? То есть скажем, знает персонаж заклинание огненный шар и вызывает его на монстра, находясь прямо на карте локации.
№1. делаешь 4 общих события, для 4-ч сторон для умений и расстояние для него.
№2. пишешь ветвление условия на проверку, выучил ли умение персонаж.
№3. в нем делаешь проверку в какую сторону смотрит персонаж и в зависимости от этого вызываешь №1.
№4 для события рисуешь что с прикосновением враг исчезает.
если нужна сила, то можно применить переменные.
Тема заблокирована.
16 года 11 мес. назад #26925
от Ice
Ice ответил в теме Нужна помощь - вам сюда!
alexian написано:
перед текстом рисуешь \c[n] где n - число от 0 - ...Как цвет текста поменять?
Тема заблокирована.
16 года 11 мес. назад #26926
от @lex TGM
@lex TGM ответил в теме Нужна помощь - вам сюда!
Уже спрашивал, но спрошу еще:
Допустим, я хочу, чтобы при нажатии на определенную кнопку (Q например) загружался скрипт, сам я сделать это не могу, не скриптер я (( . Помогите кто может, пожалуйста...
Допустим, я хочу, чтобы при нажатии на определенную кнопку (Q например) загружался скрипт, сам я сделать это не могу, не скриптер я (( . Помогите кто может, пожалуйста...
Тема заблокирована.
16 года 11 мес. назад - 16 года 11 мес. назад #26927
от Джекил
Не мертво то, что в вечности пребудет. со смертью времени и смерть умрет.
Джекил ответил в теме Нужна помощь - вам сюда!
Ice
Проблема в вызове общего события. Когда и при каких условиях его вызывать. То есть в мэйкере два варианта вызова атких событий - авто и параллельное. Парраллельное событие уже есть, а при автозапуске ничего не произойдет, пока событие не закончится. Меня эта трудность и смущает
Проблема в вызове общего события. Когда и при каких условиях его вызывать. То есть в мэйкере два варианта вызова атких событий - авто и параллельное. Парраллельное событие уже есть, а при автозапуске ничего не произойдет, пока событие не закончится. Меня эта трудность и смущает
Не мертво то, что в вечности пребудет. со смертью времени и смерть умрет.
Последнее редактирование: 16 года 11 мес. назад пользователем Джекил.
Тема заблокирована.
- Boris_Britv@
-
- Не в сети
- Бывалый
-
Скрыть
Больше
- Сообщений: 75
- Спасибо получено: 1
16 года 11 мес. назад #26928
от Boris_Britv@
~Boris_Britv@
Boris_Britv@ ответил в теме Нужна помощь - вам сюда!
@lex TGM
Создаёшь событие, включаешь паралельный запуск, в событии включаешь ветвление условий,там выбераеш последнюю вкладку, в ней есть функция: "конпка" Выбираешь какая кнопка тебе нужна. Только не забудь нажать f1, когда войдёшь в игру и настроить управление. К примеру кнопка А в редакторе обозначает кнопку Z в игре.
Создаёшь событие, включаешь паралельный запуск, в событии включаешь ветвление условий,там выбераеш последнюю вкладку, в ней есть функция: "конпка" Выбираешь какая кнопка тебе нужна. Только не забудь нажать f1, когда войдёшь в игру и настроить управление. К примеру кнопка А в редакторе обозначает кнопку Z в игре.
~Boris_Britv@
Тема заблокирована.
- Nameless
- Новый участник
-
Скрыть
Больше
- Спасибо получено: 0
16 года 11 мес. назад #26929
от Nameless
Nameless ответил в теме Нужна помощь - вам сюда!
Boris_Britv@ написано:
Но необходимо учесть, что параалельный эвент требует включенного Switch. По этому не забудь на карте создать эвент который активирует этот свитч
@lex TGM
Создаёшь событие, включаешь паралельный запуск, в событии включаешь ветвление условий,там выбераеш последнюю вкладку, в ней есть функция: "конпка" Выбираешь какая кнопка тебе нужна. Только не забудь нажать f1, когда войдёшь в игру и настроить управление. К примеру кнопка А в редакторе обозначает кнопку Z в игре.
Но необходимо учесть, что параалельный эвент требует включенного Switch. По этому не забудь на карте создать эвент который активирует этот свитч
Тема заблокирована.
16 года 11 мес. назад #26930
от Zellgadis
Zellgadis ответил в теме Нужна помощь - вам сюда!
Nameless. вот полный скрипт
ВНИМАНИЕ: Спойлер!
CREDITS_FONT = "Times New Roman"
CREDITS_SIZE = 24
CREDITS_OUTLINE = Color.new(0,0,127, 255)
CREDITS_SHADOW = Color.new(0,0,0, 100)
CREDITS_FILL = Color.new(255,255,255, 255)
#==============================================================================
# ¦ Scene_Credits
#
# Scrolls the credits you make below. Original Author unknown. Edited by
# MiDas Mike so it doesn't play over the Title, but runs by calling the following:
# $scene = Scene_Credits.new
#==============================================================================
class Scene_Credits
# This next piece of code is the credits.
CREDIT=<<_END_
Forgotten Soul (Demo v1.1)
Director
Zellgadis
Scripts
-Ccoa
-Moghunter
Graphics
Zellgadis
Music and sound
Final Fantasy VII
Ромулу(с)
Mapping
Zellgadis
Отдельное спасибо Dr.Nick.To
Storyline
Zellgadis
Beta Testers
Злодей
Roket
Special Thanks
Злодей
Roket
Agckuu_Coceg
The Joker
А так-же ресурсу rpg-maker.info,
за предоставленный RPGmaker.
Cпасибо за то, что вы играли в эту игру.
Надеюсь вам понравилось ! Zellgadis.
_END_
def main
#
# Animated Background Setup
#
@sprite = Sprite.new
#@sprite.bitmap = RPG::Cache.title($data_system.title_name)
@backgroundList = ["MiDas"] #Edit this to the title screen(s) you wish to show in the background. They do repeat.
@backgroundGameFrameCount = 0
# Number of game frames per background frame.
@backgroundG_BFrameCount = 3.4
@sprite.bitmap = RPG::Cache.title(@backgroundList[0])
#
# Credits Setup
#
credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines
credit_bitmap.font.name = CREDITS_FONT
credit_bitmap.font.size = CREDITS_SIZE
x = 0
credit_bitmap.font.color = CREDITS_OUTLINE
credit_bitmap.draw_text(0 + 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 + 1,i * 32 - 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 - 1,640,32,line,1)
credit_bitmap.font.color = CREDITS_SHADOW
credit_bitmap.draw_text(0,i * 32 + 8,640,32,line,1)
credit_bitmap.font.color = CREDITS_FILL
credit_bitmap.draw_text(0,i * 32,640,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.z = 9998
@credit_sprite.oy = -430
@frame_index = 0
@last_flag = false
#
# Setup
#
# ME?BGS ??????
Audio.me_stop
Audio.bgs_stop
Audio.se_stop
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
@sprite.dispose
@credit_sprite.dispose
end
#Checks if credits bitmap has reached it's ending point
def last?
return (@frame_index >= @credit_sprite.bitmap.height + 480)
end
def last
if not @last_flag
@last_flag = true
@last_count = 300
else
@last_count += 1
end
if @last_count >= 300
end
end
#Check if the credits should be cancelled
def cancel?
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = Scene_Title.new
return true
end
return false
end
#
# ? ??????
#
def update
@backgroundGameFrameCount = @backgroundGameFrameCount + 1
if @backgroundGameFrameCount >= @backgroundG_BFrameCount
@backgroundGameFrameCount = 0
# Add current background frame to the end
@backgroundList = @backgroundList << @backgroundList[0]
# and drop it from the first position
@backgroundList.delete_at(0)
@sprite.bitmap = RPG::Cache.title(@backgroundList[0])
end
return if cancel?
last if last?
@credit_sprite.oy += 1
end
end
CREDITS_SIZE = 24
CREDITS_OUTLINE = Color.new(0,0,127, 255)
CREDITS_SHADOW = Color.new(0,0,0, 100)
CREDITS_FILL = Color.new(255,255,255, 255)
#==============================================================================
# ¦ Scene_Credits
#
# Scrolls the credits you make below. Original Author unknown. Edited by
# MiDas Mike so it doesn't play over the Title, but runs by calling the following:
# $scene = Scene_Credits.new
#==============================================================================
class Scene_Credits
# This next piece of code is the credits.
CREDIT=<<_END_
Forgotten Soul (Demo v1.1)
Director
Zellgadis
Scripts
-Ccoa
-Moghunter
Graphics
Zellgadis
Music and sound
Final Fantasy VII
Ромулу(с)
Mapping
Zellgadis
Отдельное спасибо Dr.Nick.To
Storyline
Zellgadis
Beta Testers
Злодей
Roket
Special Thanks
Злодей
Roket
Agckuu_Coceg
The Joker
А так-же ресурсу rpg-maker.info,
за предоставленный RPGmaker.
Cпасибо за то, что вы играли в эту игру.
Надеюсь вам понравилось ! Zellgadis.
_END_
def main
#
# Animated Background Setup
#
@sprite = Sprite.new
#@sprite.bitmap = RPG::Cache.title($data_system.title_name)
@backgroundList = ["MiDas"] #Edit this to the title screen(s) you wish to show in the background. They do repeat.
@backgroundGameFrameCount = 0
# Number of game frames per background frame.
@backgroundG_BFrameCount = 3.4
@sprite.bitmap = RPG::Cache.title(@backgroundList[0])
#
# Credits Setup
#
credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines
credit_bitmap.font.name = CREDITS_FONT
credit_bitmap.font.size = CREDITS_SIZE
x = 0
credit_bitmap.font.color = CREDITS_OUTLINE
credit_bitmap.draw_text(0 + 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 + 1,i * 32 - 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 - 1,640,32,line,1)
credit_bitmap.font.color = CREDITS_SHADOW
credit_bitmap.draw_text(0,i * 32 + 8,640,32,line,1)
credit_bitmap.font.color = CREDITS_FILL
credit_bitmap.draw_text(0,i * 32,640,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.z = 9998
@credit_sprite.oy = -430
@frame_index = 0
@last_flag = false
#
# Setup
#
# ME?BGS ??????
Audio.me_stop
Audio.bgs_stop
Audio.se_stop
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
@sprite.dispose
@credit_sprite.dispose
end
#Checks if credits bitmap has reached it's ending point
def last?
return (@frame_index >= @credit_sprite.bitmap.height + 480)
end
def last
if not @last_flag
@last_flag = true
@last_count = 300
else
@last_count += 1
end
if @last_count >= 300
end
end
#Check if the credits should be cancelled
def cancel?
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = Scene_Title.new
return true
end
return false
end
#
# ? ??????
#
def update
@backgroundGameFrameCount = @backgroundGameFrameCount + 1
if @backgroundGameFrameCount >= @backgroundG_BFrameCount
@backgroundGameFrameCount = 0
# Add current background frame to the end
@backgroundList = @backgroundList << @backgroundList[0]
# and drop it from the first position
@backgroundList.delete_at(0)
@sprite.bitmap = RPG::Cache.title(@backgroundList[0])
end
return if cancel?
last if last?
@credit_sprite.oy += 1
end
end
Тема заблокирована.
16 года 11 мес. назад - 16 года 11 мес. назад #26931
от Злодей
Злодей ответил в теме Нужна помощь - вам сюда!
Я нашёл скрипт для VX, который позволяет менять членов партии из меню, но я никак не могу заставить его работать. Если у кого есть время, можете попробовать довести его до ума и разобраться что в нём не так? По идее он рабочий.
Этот скрипт полезен всем, кто работает в VX.
Заранее спасибо.
Этот скрипт полезен всем, кто работает в VX.
ВНИМАНИЕ: Спойлер!
#======================================================================
# ** Party Changer
#
# � Dargor, 2008
# 08/03/08
# Version 1.1
#
# VERSION HISTORY:
# - 1.0 (08/03/08), Initial release
# - 1.1 (08/03/08), The party Changer is now available in battle
#==============================================================================
# Vocabulary
Vocab::Party = 'Party'
Vocab::PartyAccept = 'Accept'
Vocab::PartyArrange = 'Arrange'
Vocab::PartyReset = 'Reset'
#==============================================================================
# ** Game_Temp
#
# This class handles temporary data that is not included with save data.
# The instance of this class is referenced by $game_temp.
#==============================================================================
class Game_Temp
#
# * Public Instance Variables
#
attr_accessor :battle_party_changer
#
# * Public Instance Variables
#
alias dargor_vx_temp_party_changer_initialize initialize
#
# * Object Initialization
#
def initialize
dargor_vx_temp_party_changer_initialize
@battle_party_changer = true
end
def battle_party_changer?
return @battle_party_changer == true && $game_party.reserve_members.size > 0
end
end
#==============================================================================
# ** Window_Base
#
# This is a superclass of all windows in the game.
#==============================================================================
class Window_Base < Window
#
# * Remake Window Contents
#
def remake_contents(width, height)
self.width = width
self.height = height
create_contents
end
#
# * Draw Actor Walking Graphic
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#
def draw_actor_graphic(actor, x, y, opacity = 255)
draw_character(actor.character_name, actor.character_index, x, y, opacity)
end
#
# * Draw Character Graphic
# character_name : Character graphic filename
# character_index : Character graphic index
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#
def draw_character(character_name, character_index, x, y, opacity = 255)
return if character_name == nil
bitmap = Cache.character(character_name)
sign = character_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
end
end
#==============================================================================
# ** Game_Party
#
# This class handles the party. It includes information on amount of gold
# and items. The instance of this class is referenced by $game_party.
#==============================================================================
class Game_Party < Game_Unit
#
# * Public Instance Variables
#
attr_accessor :actors
attr_accessor :reserve_actors
#
# * Alias Listing
#
alias dargor_party_changer_party_initialize initialize
alias dargor_party_add_actor add_actor
alias dargor_party_remove_actor remove_actor
#
# * Object Initialization
#
def initialize
dargor_party_changer_party_initialize
@reserve_actors = []
end
#
# * Get Reserve Members
#
def reserve_members
result = []
for i in @reserve_actors
result.push($game_actors)
end
return result
end
#
# * Get All Members
#
def all_members
all_actors = (@actors + @reserve_actors).sort
array = []
for i in all_actors
array << $game_actors
end
return array.uniq
end
#
# * Add an Actor
# actor_id : actor ID
#
def add_actor(actor_id)
dargor_party_add_actor(actor_id)
add_reserve_actor(actor_id)
end
#
# * Remove Actor
# actor_id : actor ID
#
def remove_actor(actor_id)
dargor_party_remove_actor(actor_id)
remove_reserve_actor(actor_id)
end
#
# * Add an Actor from the Reserve
# actor_id : actor ID
#
def add_reserve_actor(actor_id, force=false)
if force
@reserve_actors.push(actor_id)
$game_player.refresh
return
end
if @actors.size == MAX_MEMBERS and not @reserve_actors.include?(actor_id)
@reserve_actors.push(actor_id)
$game_player.refresh
end
end
#
# * Remove Actor from the Reserve
# actor_id : actor ID
#
def remove_reserve_actor(actor_id)
@reserve_actors.delete(actor_id)
$game_player.refresh
end
end
#==============================================================================
# ** Window_Party
#
# This window displays party member status on the party changer screen.
#==============================================================================
class Window_PartyMembers < Window_Selectable
#
# * Public Instance Variables
#
attr_accessor :members
#
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#
def initialize
super(0, 0, 272, 416)
@members = []
@selection_rect = false
@selection_y = 0
refresh
self.active = false
self.index = -1
end
#
# * Refresh
#
def refresh
self.contents.clear
@item_max = @members.size
if @selection_rect
color = Color.new(0,0,0,160)
self.contents.fill_rect(2, @selection_y, contents.width-4, 92, color)
end
i = 0
for actor in @members
x = 104
y = i * 96 + WLH / 2 + 10
draw_actor_face(actor, 2, i * 96 + 2, 92)
draw_actor_name(actor, x, y - WLH)
draw_actor_level(actor, x, y)
draw_actor_hp(actor, x, y + WLH * 1)
draw_actor_mp(actor, x, y + WLH * 2)
i += 1
end
end
#
# * Add Member
#
def add_member(id)
return if @members.include?($game_party.all_members[id])
@members.push($game_party.all_members[id])
w = self.width
h = self.height = 416 + (96 * (@members.size-4))
remake_contents(w, h)
self.height = 416
refresh
end
#
# * Remove Member
#
def remove_member(id)
@members.delete($game_party.all_members[id])
w = self.width
h = self.height = 416 + (96 * (@members.size-4))
remake_contents(w, h)
self.height = 416
refresh
end
#
# * Clear Members
#
def clear_members
@members = []
w = self.width
h = self.height = 416 + (96 * (@members.size-4))
remake_contents(w, h)
self.height = 416
refresh
end
#
# * Set Selection Rect
#
def set_selection_rect(index)
@selection_rect = true
@selection_y = index * 96 - WLH / 2 + 14
refresh
end
#
# * Clear Selection Rect
#
def clear_selection_rect
@selection_rect = false
refresh
end
#
# * Update cursor
#
def update_cursor
if @index < 0
self.cursor_rect.empty
return
end
# Get top row
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
# Reset Top Row if at bottom of list
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
y = @index / @column_max * 96 - self.oy
# Draw the cursor
self.cursor_rect.set(0, y, contents.width, 96)
end
#
# * Get Top Row
#
def top_row
return self.oy / 96
end
#
# * Set Top Row
# row : row shown on top
#
def top_row=(row)
if row < 0
row = 0
end
if row > row_max - 1
row = row_max - 1
end
self.oy = row * 96
end
#
# * Get Number of Rows Displayable on 1 Page
#
def page_row_max
return 4
end
end
#==============================================================================
# ** Window_ReserveMembers
#
# This window displays reserve members on the party changer screen.
#==============================================================================
class Window_ReserveMembers < Window_Selectable
#
# * Public Instance Variables
#
attr_accessor :members
#
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#
def initialize
@members = $game_party.all_members.dup
height = 58 * (@members.size.to_f / 4).ceil
super(272, 128, 272, height)
@item_max = @members.size
@column_max = 4
@row_max = (@members.size.to_f / 4).ceil
refresh
self.height = 128
self.index = 0
end
#
# * Refresh
#
def refresh
self.contents.clear
i = 0
for actor in @members
opacity = 255
if actor.nil?
actor = $game_party.all_members
opacity = 160
end
x = 24 + i % 4 * 60
y = 40 + i / 4 * 48
draw_actor_graphic(actor,x,y,opacity)
i += 1
end
end
#
# * Set Member
#
def set_member(index, member_id)
@members[index] = member_id
refresh
end
#
# * Reset Members
#
def reset_members
@members = $game_party.all_members.dup
refresh
end
#
# * Update cursor
#
def update_cursor
x = @index % 4 * 60
y = @index / 4 * 48
y -= self.oy
if @index < 0 # No cursor
self.cursor_rect.empty
elsif @index < @item_max # Normal
self.cursor_rect.set(x, y, 48, 48)
end
# Get top row
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
# Reset Top Row if at bottom of list
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
end
#
# * Get Top Row
#
def top_row
return self.oy / 48
end
#
# * Set Top Row
# row : row shown on top
#
def top_row=(row)
if row < 0
row = 0
end
if row > row_max - 1
row = row_max - 1
end
self.oy = row * 48
end
#
# * Get Number of Rows Displayable on 1 Page
#
def page_row_max
return 2
end
end
#==============================================================================
# ** Window_MemberStatus
#
# This window displays a member's status on the party changer screen.
#==============================================================================
class Window_MemberStatus < Window_Base
#
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#
def initialize
super(272, 0, 272, 128)
@member = nil
end
#
# * Refresh
#
def refresh
self.contents.clear
return if @member.nil?
actor = @member
x = 104
draw_actor_face(actor, 2, 2, 92)
draw_actor_name(actor, x, 0)
draw_actor_level(actor, x, WLH)
draw_actor_hp(actor, x, WLH * 2)
draw_actor_mp(actor, x, WLH * 3)
end
#
# * Set Member
#
def set_member(member)
@member = $game_actors[member]
refresh
end
end
#==============================================================================
# ** Window_BattleStatus
#
# This window displays the status of all party members on the battle screen.
#==============================================================================
class Window_BattlePartyMembers < Window_Selectable
#
# * Public Instance Variables
#
attr_accessor :members
#
# * Object Initialization
#
def initialize
@members = $game_party.all_members - $game_party.members
#@members.push(nil)
height = 32 + (24 * @members.size)
super(64, 0, 416, height)
refresh
self.height = 128
self.active = false
self.index = 0
self.openness = 0
end
#
# * Dispose
#
def dispose
super
end
#
# * Refresh
#
def refresh
self.contents.clear
@item_max = @members.size
for i in 0...@item_max
draw_item(i)
end
end
#
# * Draw Item
# index : Item number
#
def draw_item(index)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
actor = @members[index]
#if actor.nil?
# self.contents.draw_text(0,rect.y,contents.width,24,'- Remove -',1)
# return
#end
draw_actor_graphic(actor, 16, rect.y + 32)
draw_actor_name(actor, 48, rect.y)
draw_actor_state(actor, 114, rect.y, 48)
draw_actor_hp(actor, 174, rect.y, 120)
draw_actor_mp(actor, 310, rect.y, 70)
end
def reset_members
@members = $game_party.all_members - $game_party.members
#@members.push(nil)
height = 32 + (24 * @members.size)
remake_contents(416,height)
refresh
self.height = 128
end
end
#==============================================================================
# ** Window_PartyCommand
#
# This window is used to select whether to fight or escape on the battle
# screen.
#==============================================================================
class Window_PartyCommand < Window_Command
#
# * Object Initialization
#
def initialize
s1 = Vocab::fight
s2 = Vocab::escape
s3 = Vocab::Party
super(128, [s1, s2, s3], 1, 4)
draw_item(0, true)
draw_item(1, $game_troop.can_escape)
draw_item(2, $game_temp.battle_party_changer?)
self.active = false
end
end
#==============================================================================
# ** Scene_PartyChanger
#
# This class performs the Party Changer screen processing.
#==============================================================================
class Scene_PartyChanger < Scene_Base
#
# * Start processing
#
def start
super
create_menu_background
create_command_window
create_help_window
@party_window = Window_PartyMembers.new
@reserve_window = Window_ReserveMembers.new
@status_window = Window_MemberStatus.new
@status_window.set_member(@reserve_window.index)
end
#
# * Termination Processing
#
def terminate
super
dispose_menu_background
@party_window.dispose
@reserve_window.dispose
@command_window.dispose
@status_window.dispose
@help_window.dispose
end
#
# * Create Help Window
#
def create_help_window
@help_window = Window_Help.new
@help_window.x = 272
@help_window.y = 416 - 56
@help_window.width = 272
@help_window.create_contents
end
#
# * Create Command Window
#
def create_command_window
s1 = Vocab::PartyAccept
s2 = Vocab::PartyArrange
s3 = Vocab::PartyReset
@command_window = Window_Command.new(160, [s1, s2, s3])
@command_window.index = 0
@command_window.x = 272
@command_window.y = 256
@command_window.width = 272
@command_window.active = false
end
#
# * Frame Update
#
def update
@old_index = @reserve_window.index
super
update_menu_background
update_help
@command_window.update
@party_window.update
@reserve_window.update
@status_window.update
@help_window.update
if can_display_status?
@status_window.set_member(@reserve_window.index+1)
end
if @command_window.active
update_command_selection
return
end
if @party_window.active
update_party_selection
return
end
if @reserve_window.active
update_reserve_selection
return
end
end
#
# * Can Display Status?
#
def can_display_status?
return @reserve_window.index != @old_index
end
#
# * Frame Update : Help Window
#
def update_help
if @party_window.active
@help_window.set_text('Arrange position')
end
if @reserve_window.active
@help_window.set_text('Form your party')
end
if @command_window.active
case @command_window.index
when 0
@help_window.set_text('Accept selection')
when 1
@help_window.set_text('Arrange position')
when 2
@help_window.set_text('Reset selection')
end
end
end
#
# * Frame Update : Party Window
#
def update_party_selection
# Jump back to the command window
if Input.trigger?(Input::
@party_window.active = false
@party_window.index = -1
@command_window.active = true
@party_window.clear_selection_rect
@member1 = nil
@member2 = nil
return
end
# Arrange selection
if Input.trigger?(Input::C)
# Create first member variable
if @member1.nil?
@member1 = @party_window.members[@party_window.index]
@member1_index = @party_window.index
@party_window.set_selection_rect(@member1_index)
return
end
# Create second member variable
if @member2.nil?
@member2 = @party_window.members[@party_window.index]
@member2_index = @party_window.index
# Exchange members if they are not the same
if @member1 != @member2
@party_window.members[@member1_index] = @member2
@party_window.members[@member2_index] = @member1
end
@party_window.clear_selection_rect
@member1 = nil
@member2 = nil
end
end
end
#
# * Frame Update : Reserve Window
#
def update_reserve_selection
# Jump back to the command window if there's at least 1 actor in the party
if Input.trigger?(Input::
and @party_window.members.size > 0
@reserve_window.active = false
@command_window.active = true
return
end
# Add actor to the party
if Input.trigger?(Input::C)
@party_window.add_member(@reserve_window.index)
@reserve_window.set_member(@reserve_window.index, nil)
end
# Jump to command window if the party is full
if @party_window.members.size == $game_party.max_members
@command_window.active = true
@reserve_window.active = false
return
end
end
#
# * Frame Update : Command Window
#
def update_command_selection
if Input.trigger?(Input::C)
case @command_window.index
# Accept Selection
when 0
$game_party.actors.clear
for member in @party_window.members + @reserve_window.members
if @party_window.members.include?(member)
$game_party.add_actor(member.id)
end
$game_party.add_reserve_actor(member.id, true)
end
$game_player.refresh
$scene = Scene_Map.new
# Arrange Selection
when 1
@party_window.index = 0
@party_window.active = true
@command_window.active = false
# Reset Selection
when 2
@party_window.clear_members
@party_window.clear_selection_rect
@reserve_window.reset_members
@reserve_window.active
@reserve_window.active = true
@command_window.active = false
end
end
end
end
#==============================================================================
# ** Scene_Battle
#
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle < Scene_Base
#
# * Start processing
#
def start
super
$game_temp.in_battle = true
@spriteset = Spriteset_Battle.new
@message_window = Window_BattleMessage.new
@party_window = Window_BattlePartyMembers.new
@action_battlers = []
create_info_viewport
end
#
# * Frame Update
#
def update
super
update_basic(true)
update_info_viewport # Update information viewport
if $game_message.visible
@info_viewport.visible = false
@message_window.visible = true
end
unless $game_message.visible # Unless displaying a message
return if judge_win_loss # Determine win/loss results
update_scene_change
if @target_enemy_window != nil
update_target_enemy_selection # Select target enemy
elsif @target_actor_window != nil
update_target_actor_selection # Select target actor
elsif @skill_window != nil
update_skill_selection # Select skill
elsif @item_window != nil
update_item_selection # Select item
elsif @party_command_window.active
update_party_command_selection # Select party command
elsif @actor_command_window.active
update_actor_command_selection # Select actor command
elsif @party_window.active or @status_window.active
update_party_changer_selection # Select actor command
else
process_battle_event # Battle event processing
process_action # Battle action
process_battle_event # Battle event processing
end
end
end
#
# * Basic Update Processing
# main : Call from main update method
#
def update_basic(main = false)
Graphics.update unless main # Update game screen
Input.update unless main # Update input information
$game_system.update # Update timer
$game_troop.update # Update enemy group
@spriteset.update # Update sprite set
@message_window.update # Update message window
@party_window.update
end
#
# * Update Party Command Selection
#
def update_party_command_selection
if Input.trigger?(Input::C)
case @party_command_window.index
when 0 # Fight
Sound.play_decision
@status_window.index = @actor_index = -1
next_actor
when 1 # Escape
if $game_troop.can_escape == false
Sound.play_buzzer
return
end
Sound.play_decision
process_escape
when 2 # Party Changer
if $game_temp.battle_party_changer? == false
Sound.play_buzzer
return
end
Sound.play_decision
process_party
end
end
#
# * Process Party
#
def process_party
@status_window.active = true
@status_window.index = @actor_index = 0
@party_command_window.active = false
@party_window.open
@status_window.active = true
end
end
def update_party_changer_selection
if @status_window.active
if Input.trigger?(Input::
@party_command_window.active = true
@status_window.index = -1
@status_window.active = false
@party_window.close
return
end
if Input.trigger?(Input::C)
@party_window.index = 0
@party_window.active = true
@status_window.active = false
return
end
end
if @party_window.active
if Input.trigger?(Input::
@status_window.active = true
@party_window.active = false
return
end
if Input.trigger?(Input::C)
#if @party_window.index == @party_window.members.size - 1
# actor = $game_party.actors[@status_window.index]
# $game_party.remove_actor(actor)
# $game_party.add_reserve_actor(actor, true)
# @party_window.reset_members
# @status_window.refresh
# return
#else
new_actor = @party_window.members[@party_window.index]
old_actor = $game_party.actors[@status_window.index]
$game_party.add_reserve_actor(old_actor, true)
$game_party.actors[@status_window.index] = new_actor.id
@party_window.members.delete(new_actor)
@party_window.reset_members
@status_window.refresh
return
#end
end
end
end
end
# ** Party Changer
#
# � Dargor, 2008
# 08/03/08
# Version 1.1
#
# VERSION HISTORY:
# - 1.0 (08/03/08), Initial release
# - 1.1 (08/03/08), The party Changer is now available in battle
#==============================================================================
# Vocabulary
Vocab::Party = 'Party'
Vocab::PartyAccept = 'Accept'
Vocab::PartyArrange = 'Arrange'
Vocab::PartyReset = 'Reset'
#==============================================================================
# ** Game_Temp
#
# This class handles temporary data that is not included with save data.
# The instance of this class is referenced by $game_temp.
#==============================================================================
class Game_Temp
#
# * Public Instance Variables
#
attr_accessor :battle_party_changer
#
# * Public Instance Variables
#
alias dargor_vx_temp_party_changer_initialize initialize
#
# * Object Initialization
#
def initialize
dargor_vx_temp_party_changer_initialize
@battle_party_changer = true
end
def battle_party_changer?
return @battle_party_changer == true && $game_party.reserve_members.size > 0
end
end
#==============================================================================
# ** Window_Base
#
# This is a superclass of all windows in the game.
#==============================================================================
class Window_Base < Window
#
# * Remake Window Contents
#
def remake_contents(width, height)
self.width = width
self.height = height
create_contents
end
#
# * Draw Actor Walking Graphic
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#
def draw_actor_graphic(actor, x, y, opacity = 255)
draw_character(actor.character_name, actor.character_index, x, y, opacity)
end
#
# * Draw Character Graphic
# character_name : Character graphic filename
# character_index : Character graphic index
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#
def draw_character(character_name, character_index, x, y, opacity = 255)
return if character_name == nil
bitmap = Cache.character(character_name)
sign = character_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
end
end
#==============================================================================
# ** Game_Party
#
# This class handles the party. It includes information on amount of gold
# and items. The instance of this class is referenced by $game_party.
#==============================================================================
class Game_Party < Game_Unit
#
# * Public Instance Variables
#
attr_accessor :actors
attr_accessor :reserve_actors
#
# * Alias Listing
#
alias dargor_party_changer_party_initialize initialize
alias dargor_party_add_actor add_actor
alias dargor_party_remove_actor remove_actor
#
# * Object Initialization
#
def initialize
dargor_party_changer_party_initialize
@reserve_actors = []
end
#
# * Get Reserve Members
#
def reserve_members
result = []
for i in @reserve_actors
result.push($game_actors)
end
return result
end
#
# * Get All Members
#
def all_members
all_actors = (@actors + @reserve_actors).sort
array = []
for i in all_actors
array << $game_actors
end
return array.uniq
end
#
# * Add an Actor
# actor_id : actor ID
#
def add_actor(actor_id)
dargor_party_add_actor(actor_id)
add_reserve_actor(actor_id)
end
#
# * Remove Actor
# actor_id : actor ID
#
def remove_actor(actor_id)
dargor_party_remove_actor(actor_id)
remove_reserve_actor(actor_id)
end
#
# * Add an Actor from the Reserve
# actor_id : actor ID
#
def add_reserve_actor(actor_id, force=false)
if force
@reserve_actors.push(actor_id)
$game_player.refresh
return
end
if @actors.size == MAX_MEMBERS and not @reserve_actors.include?(actor_id)
@reserve_actors.push(actor_id)
$game_player.refresh
end
end
#
# * Remove Actor from the Reserve
# actor_id : actor ID
#
def remove_reserve_actor(actor_id)
@reserve_actors.delete(actor_id)
$game_player.refresh
end
end
#==============================================================================
# ** Window_Party
#
# This window displays party member status on the party changer screen.
#==============================================================================
class Window_PartyMembers < Window_Selectable
#
# * Public Instance Variables
#
attr_accessor :members
#
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#
def initialize
super(0, 0, 272, 416)
@members = []
@selection_rect = false
@selection_y = 0
refresh
self.active = false
self.index = -1
end
#
# * Refresh
#
def refresh
self.contents.clear
@item_max = @members.size
if @selection_rect
color = Color.new(0,0,0,160)
self.contents.fill_rect(2, @selection_y, contents.width-4, 92, color)
end
i = 0
for actor in @members
x = 104
y = i * 96 + WLH / 2 + 10
draw_actor_face(actor, 2, i * 96 + 2, 92)
draw_actor_name(actor, x, y - WLH)
draw_actor_level(actor, x, y)
draw_actor_hp(actor, x, y + WLH * 1)
draw_actor_mp(actor, x, y + WLH * 2)
i += 1
end
end
#
# * Add Member
#
def add_member(id)
return if @members.include?($game_party.all_members[id])
@members.push($game_party.all_members[id])
w = self.width
h = self.height = 416 + (96 * (@members.size-4))
remake_contents(w, h)
self.height = 416
refresh
end
#
# * Remove Member
#
def remove_member(id)
@members.delete($game_party.all_members[id])
w = self.width
h = self.height = 416 + (96 * (@members.size-4))
remake_contents(w, h)
self.height = 416
refresh
end
#
# * Clear Members
#
def clear_members
@members = []
w = self.width
h = self.height = 416 + (96 * (@members.size-4))
remake_contents(w, h)
self.height = 416
refresh
end
#
# * Set Selection Rect
#
def set_selection_rect(index)
@selection_rect = true
@selection_y = index * 96 - WLH / 2 + 14
refresh
end
#
# * Clear Selection Rect
#
def clear_selection_rect
@selection_rect = false
refresh
end
#
# * Update cursor
#
def update_cursor
if @index < 0
self.cursor_rect.empty
return
end
# Get top row
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
# Reset Top Row if at bottom of list
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
y = @index / @column_max * 96 - self.oy
# Draw the cursor
self.cursor_rect.set(0, y, contents.width, 96)
end
#
# * Get Top Row
#
def top_row
return self.oy / 96
end
#
# * Set Top Row
# row : row shown on top
#
def top_row=(row)
if row < 0
row = 0
end
if row > row_max - 1
row = row_max - 1
end
self.oy = row * 96
end
#
# * Get Number of Rows Displayable on 1 Page
#
def page_row_max
return 4
end
end
#==============================================================================
# ** Window_ReserveMembers
#
# This window displays reserve members on the party changer screen.
#==============================================================================
class Window_ReserveMembers < Window_Selectable
#
# * Public Instance Variables
#
attr_accessor :members
#
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#
def initialize
@members = $game_party.all_members.dup
height = 58 * (@members.size.to_f / 4).ceil
super(272, 128, 272, height)
@item_max = @members.size
@column_max = 4
@row_max = (@members.size.to_f / 4).ceil
refresh
self.height = 128
self.index = 0
end
#
# * Refresh
#
def refresh
self.contents.clear
i = 0
for actor in @members
opacity = 255
if actor.nil?
actor = $game_party.all_members
opacity = 160
end
x = 24 + i % 4 * 60
y = 40 + i / 4 * 48
draw_actor_graphic(actor,x,y,opacity)
i += 1
end
end
#
# * Set Member
#
def set_member(index, member_id)
@members[index] = member_id
refresh
end
#
# * Reset Members
#
def reset_members
@members = $game_party.all_members.dup
refresh
end
#
# * Update cursor
#
def update_cursor
x = @index % 4 * 60
y = @index / 4 * 48
y -= self.oy
if @index < 0 # No cursor
self.cursor_rect.empty
elsif @index < @item_max # Normal
self.cursor_rect.set(x, y, 48, 48)
end
# Get top row
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
# Reset Top Row if at bottom of list
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
end
#
# * Get Top Row
#
def top_row
return self.oy / 48
end
#
# * Set Top Row
# row : row shown on top
#
def top_row=(row)
if row < 0
row = 0
end
if row > row_max - 1
row = row_max - 1
end
self.oy = row * 48
end
#
# * Get Number of Rows Displayable on 1 Page
#
def page_row_max
return 2
end
end
#==============================================================================
# ** Window_MemberStatus
#
# This window displays a member's status on the party changer screen.
#==============================================================================
class Window_MemberStatus < Window_Base
#
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#
def initialize
super(272, 0, 272, 128)
@member = nil
end
#
# * Refresh
#
def refresh
self.contents.clear
return if @member.nil?
actor = @member
x = 104
draw_actor_face(actor, 2, 2, 92)
draw_actor_name(actor, x, 0)
draw_actor_level(actor, x, WLH)
draw_actor_hp(actor, x, WLH * 2)
draw_actor_mp(actor, x, WLH * 3)
end
#
# * Set Member
#
def set_member(member)
@member = $game_actors[member]
refresh
end
end
#==============================================================================
# ** Window_BattleStatus
#
# This window displays the status of all party members on the battle screen.
#==============================================================================
class Window_BattlePartyMembers < Window_Selectable
#
# * Public Instance Variables
#
attr_accessor :members
#
# * Object Initialization
#
def initialize
@members = $game_party.all_members - $game_party.members
#@members.push(nil)
height = 32 + (24 * @members.size)
super(64, 0, 416, height)
refresh
self.height = 128
self.active = false
self.index = 0
self.openness = 0
end
#
# * Dispose
#
def dispose
super
end
#
# * Refresh
#
def refresh
self.contents.clear
@item_max = @members.size
for i in 0...@item_max
draw_item(i)
end
end
#
# * Draw Item
# index : Item number
#
def draw_item(index)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
actor = @members[index]
#if actor.nil?
# self.contents.draw_text(0,rect.y,contents.width,24,'- Remove -',1)
# return
#end
draw_actor_graphic(actor, 16, rect.y + 32)
draw_actor_name(actor, 48, rect.y)
draw_actor_state(actor, 114, rect.y, 48)
draw_actor_hp(actor, 174, rect.y, 120)
draw_actor_mp(actor, 310, rect.y, 70)
end
def reset_members
@members = $game_party.all_members - $game_party.members
#@members.push(nil)
height = 32 + (24 * @members.size)
remake_contents(416,height)
refresh
self.height = 128
end
end
#==============================================================================
# ** Window_PartyCommand
#
# This window is used to select whether to fight or escape on the battle
# screen.
#==============================================================================
class Window_PartyCommand < Window_Command
#
# * Object Initialization
#
def initialize
s1 = Vocab::fight
s2 = Vocab::escape
s3 = Vocab::Party
super(128, [s1, s2, s3], 1, 4)
draw_item(0, true)
draw_item(1, $game_troop.can_escape)
draw_item(2, $game_temp.battle_party_changer?)
self.active = false
end
end
#==============================================================================
# ** Scene_PartyChanger
#
# This class performs the Party Changer screen processing.
#==============================================================================
class Scene_PartyChanger < Scene_Base
#
# * Start processing
#
def start
super
create_menu_background
create_command_window
create_help_window
@party_window = Window_PartyMembers.new
@reserve_window = Window_ReserveMembers.new
@status_window = Window_MemberStatus.new
@status_window.set_member(@reserve_window.index)
end
#
# * Termination Processing
#
def terminate
super
dispose_menu_background
@party_window.dispose
@reserve_window.dispose
@command_window.dispose
@status_window.dispose
@help_window.dispose
end
#
# * Create Help Window
#
def create_help_window
@help_window = Window_Help.new
@help_window.x = 272
@help_window.y = 416 - 56
@help_window.width = 272
@help_window.create_contents
end
#
# * Create Command Window
#
def create_command_window
s1 = Vocab::PartyAccept
s2 = Vocab::PartyArrange
s3 = Vocab::PartyReset
@command_window = Window_Command.new(160, [s1, s2, s3])
@command_window.index = 0
@command_window.x = 272
@command_window.y = 256
@command_window.width = 272
@command_window.active = false
end
#
# * Frame Update
#
def update
@old_index = @reserve_window.index
super
update_menu_background
update_help
@command_window.update
@party_window.update
@reserve_window.update
@status_window.update
@help_window.update
if can_display_status?
@status_window.set_member(@reserve_window.index+1)
end
if @command_window.active
update_command_selection
return
end
if @party_window.active
update_party_selection
return
end
if @reserve_window.active
update_reserve_selection
return
end
end
#
# * Can Display Status?
#
def can_display_status?
return @reserve_window.index != @old_index
end
#
# * Frame Update : Help Window
#
def update_help
if @party_window.active
@help_window.set_text('Arrange position')
end
if @reserve_window.active
@help_window.set_text('Form your party')
end
if @command_window.active
case @command_window.index
when 0
@help_window.set_text('Accept selection')
when 1
@help_window.set_text('Arrange position')
when 2
@help_window.set_text('Reset selection')
end
end
end
#
# * Frame Update : Party Window
#
def update_party_selection
# Jump back to the command window
if Input.trigger?(Input::
@party_window.active = false
@party_window.index = -1
@command_window.active = true
@party_window.clear_selection_rect
@member1 = nil
@member2 = nil
return
end
# Arrange selection
if Input.trigger?(Input::C)
# Create first member variable
if @member1.nil?
@member1 = @party_window.members[@party_window.index]
@member1_index = @party_window.index
@party_window.set_selection_rect(@member1_index)
return
end
# Create second member variable
if @member2.nil?
@member2 = @party_window.members[@party_window.index]
@member2_index = @party_window.index
# Exchange members if they are not the same
if @member1 != @member2
@party_window.members[@member1_index] = @member2
@party_window.members[@member2_index] = @member1
end
@party_window.clear_selection_rect
@member1 = nil
@member2 = nil
end
end
end
#
# * Frame Update : Reserve Window
#
def update_reserve_selection
# Jump back to the command window if there's at least 1 actor in the party
if Input.trigger?(Input::
@reserve_window.active = false
@command_window.active = true
return
end
# Add actor to the party
if Input.trigger?(Input::C)
@party_window.add_member(@reserve_window.index)
@reserve_window.set_member(@reserve_window.index, nil)
end
# Jump to command window if the party is full
if @party_window.members.size == $game_party.max_members
@command_window.active = true
@reserve_window.active = false
return
end
end
#
# * Frame Update : Command Window
#
def update_command_selection
if Input.trigger?(Input::C)
case @command_window.index
# Accept Selection
when 0
$game_party.actors.clear
for member in @party_window.members + @reserve_window.members
if @party_window.members.include?(member)
$game_party.add_actor(member.id)
end
$game_party.add_reserve_actor(member.id, true)
end
$game_player.refresh
$scene = Scene_Map.new
# Arrange Selection
when 1
@party_window.index = 0
@party_window.active = true
@command_window.active = false
# Reset Selection
when 2
@party_window.clear_members
@party_window.clear_selection_rect
@reserve_window.reset_members
@reserve_window.active
@reserve_window.active = true
@command_window.active = false
end
end
end
end
#==============================================================================
# ** Scene_Battle
#
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle < Scene_Base
#
# * Start processing
#
def start
super
$game_temp.in_battle = true
@spriteset = Spriteset_Battle.new
@message_window = Window_BattleMessage.new
@party_window = Window_BattlePartyMembers.new
@action_battlers = []
create_info_viewport
end
#
# * Frame Update
#
def update
super
update_basic(true)
update_info_viewport # Update information viewport
if $game_message.visible
@info_viewport.visible = false
@message_window.visible = true
end
unless $game_message.visible # Unless displaying a message
return if judge_win_loss # Determine win/loss results
update_scene_change
if @target_enemy_window != nil
update_target_enemy_selection # Select target enemy
elsif @target_actor_window != nil
update_target_actor_selection # Select target actor
elsif @skill_window != nil
update_skill_selection # Select skill
elsif @item_window != nil
update_item_selection # Select item
elsif @party_command_window.active
update_party_command_selection # Select party command
elsif @actor_command_window.active
update_actor_command_selection # Select actor command
elsif @party_window.active or @status_window.active
update_party_changer_selection # Select actor command
else
process_battle_event # Battle event processing
process_action # Battle action
process_battle_event # Battle event processing
end
end
end
#
# * Basic Update Processing
# main : Call from main update method
#
def update_basic(main = false)
Graphics.update unless main # Update game screen
Input.update unless main # Update input information
$game_system.update # Update timer
$game_troop.update # Update enemy group
@spriteset.update # Update sprite set
@message_window.update # Update message window
@party_window.update
end
#
# * Update Party Command Selection
#
def update_party_command_selection
if Input.trigger?(Input::C)
case @party_command_window.index
when 0 # Fight
Sound.play_decision
@status_window.index = @actor_index = -1
next_actor
when 1 # Escape
if $game_troop.can_escape == false
Sound.play_buzzer
return
end
Sound.play_decision
process_escape
when 2 # Party Changer
if $game_temp.battle_party_changer? == false
Sound.play_buzzer
return
end
Sound.play_decision
process_party
end
end
#
# * Process Party
#
def process_party
@status_window.active = true
@status_window.index = @actor_index = 0
@party_command_window.active = false
@party_window.open
@status_window.active = true
end
end
def update_party_changer_selection
if @status_window.active
if Input.trigger?(Input::
@party_command_window.active = true
@status_window.index = -1
@status_window.active = false
@party_window.close
return
end
if Input.trigger?(Input::C)
@party_window.index = 0
@party_window.active = true
@status_window.active = false
return
end
end
if @party_window.active
if Input.trigger?(Input::
@status_window.active = true
@party_window.active = false
return
end
if Input.trigger?(Input::C)
#if @party_window.index == @party_window.members.size - 1
# actor = $game_party.actors[@status_window.index]
# $game_party.remove_actor(actor)
# $game_party.add_reserve_actor(actor, true)
# @party_window.reset_members
# @status_window.refresh
# return
#else
new_actor = @party_window.members[@party_window.index]
old_actor = $game_party.actors[@status_window.index]
$game_party.add_reserve_actor(old_actor, true)
$game_party.actors[@status_window.index] = new_actor.id
@party_window.members.delete(new_actor)
@party_window.reset_members
@status_window.refresh
return
#end
end
end
end
end
Заранее спасибо.
Последнее редактирование: 16 года 11 мес. назад пользователем Злодей.
Тема заблокирована.
Время создания страницы: 0.276 секунд
