Ronyunderen

Veteran
Veteran
Joined
Jun 2, 2017
Messages
102
Reaction score
90
First Language
English
Primarily Uses
N/A
Hello, anyone can help me to make a script so battle log show with window? Like Dragon Quest Battle Log. Thank you!
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,133
Reaction score
1,109
First Language
English
Primarily Uses
RMVXA
Taking the idea from Wcoulliard FF battle log
Ruby:
class Window_BattleLog < Window_Selectable
  def show_log
    self.opacity = 255
    self.back_opacity = 255
  end
  def add_text(text)
    show_log
    @lines.push(text)
    refresh
  end
  def clear
    @num_wait = 0
    @lines.clear
    self.opacity = 0
    self.back_opacity = 0
    refresh
  end
  def max_line_number
    return 2
  end
end
 
Last edited:

Ronyunderen

Veteran
Veteran
Joined
Jun 2, 2017
Messages
102
Reaction score
90
First Language
English
Primarily Uses
N/A
@Roninator2 thank you! But it's too big. Can you make it just for 1-2 lines? and if you can, please make the text at center align too. :rswt

1651514038905.png
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,133
Reaction score
1,109
First Language
English
Primarily Uses
RMVXA
Can you make it just for 1-2 lines? and if you can, please make the text at center align too. :rswt
Those are exactly the conditions that WCoulliards script does.
So I would suggest you use that.
 

Ronyunderen

Veteran
Veteran
Joined
Jun 2, 2017
Messages
102
Reaction score
90
First Language
English
Primarily Uses
N/A
:rsad:Untitled-1.png
@Roninator2 still error. What happened?

Edit: Sorry ma bad. I think i did the wrong way.
Edit2: Still error my friend.
Edit3: I will try with another script.
Edit4: Sorry brother, i need this. The other script can't fit to my game.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,133
Reaction score
1,109
First Language
English
Primarily Uses
RMVXA
Yes, it seems there is a dependency for something else that has windowskin a part of game_system.
This will fix it
Ruby:
class Game_System
  def windowskin
    return "Window"
  end
end
 
Last edited:

Ronyunderen

Veteran
Veteran
Joined
Jun 2, 2017
Messages
102
Reaction score
90
First Language
English
Primarily Uses
N/A
@Roninator2 thank you! But still error. Enemy battlers can't hide when they died. It's okay btw, i will try another script that i found.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,133
Reaction score
1,109
First Language
English
Primarily Uses
RMVXA
Enemy battlers can't hide when they died
Yes this script seems to be relying on other scripts like yanfly battle engine.

I have added on the changes you wanted.
If this is not good then whatever the other script you said you are using must be the answer.
Ruby:
class Window_BattleLog < Window_Selectable
  def initialize
    super(Graphics.width / 2 - window_width / 2, 0, window_width, window_height)
    self.z = 200
    self.opacity = 0
    @lines = []
    @num_wait = 0
    create_back_bitmap
    create_back_sprite
    refresh
  end
  def show_log
    self.opacity = 255
    self.back_opacity = 255
  end
  def add_text(text)
    show_log
    @lines.push(text)
    refresh
  end
  def clear
    @num_wait = 0
    @lines.clear
    self.opacity = 0
    self.back_opacity = 0
    refresh
  end
  def max_line_number
    return 2
  end
  def draw_line(line_number)
    rect = item_rect_for_text(line_number)
    contents.clear_rect(rect)
    draw_text(rect.x, rect.y, window_width - 24, line_height, @lines[line_number], 1)
  end
end
 

Latest Threads

Latest Profile Posts

Map034.png
First try making a temple- looking thing.
NUMINA Part 1 is finally out ✨ Get it now with a 10% launch discount!
Made this simple Training Dummy :D

obraz_2022-07-01_095700524.png
I'm still undecided weather or not I should add minor swearing to my game. Like I'm going for an all ages demographic... but the idea of a cartoon character saying dammit, hell, or crap in normal conversation is really funny to me.

Forum statistics

Threads
123,223
Messages
1,155,047
Members
161,606
Latest member
smashjay
Top