DARLOS9D'S PROFILE
Darlos9D
0
Search
Filter
Draw Something! Kyle and Ellen!
Scripting a "queue" window in XP
Scripting a "queue" window in XP
Before, I had it set up to where it would pass in a new version if @queue every time I changed it in the battle programming (because that's where I actually operate on it), but I found out that all you have to do is pass it in once in initialize(), and from then on if you change the queue object in the battle scene code, it changes @queue in this code as well. Basically, it seems to be treating what I pass into initialize as a pointer to the queue I made in the battle programming, rather than a new copy of it. Like I said, the length of the queue box changes appropriately when new items get added to the queue. You can see in refresh() that it changes the height based on @queue.size. The size of the box wouldn't change if it didn't know that the queue's size was changing in the battle code.
Even when I had it set up to explicitly update it, I still had the same problem of the text not appearing. So it isn't the cause or a problem. Also, @queue is something new I added, it's not in Windows_Base.
Even when I had it set up to explicitly update it, I still had the same problem of the text not appearing. So it isn't the cause or a problem. Also, @queue is something new I added, it's not in Windows_Base.
Scripting a "queue" window in XP
So, I'm working on a combat system where control passes back and forth between the player party and the enemies (kind of like a lot of turn based strategy games, though this isn't TBS). On the player turn, they can go through their party members' attacks and abilities at their leisure, basically creating a custom queue of actions. Once they're done doing that, they chose a "done" command and then it moves into the phase where the actions are actually executed in the order that they were queued.
Functionally, I have this all working just fine. Visually, not so much. I want a queue window that shows you your queue as you build it, with a vertical list of the actions you've chosen, in the order you chose them. Unfortunately, my custom queue window class doesn't seem to display any action names beyond the first one you pick. It expands as you add items, but rather than showing the new actions names it's just empty space, like so:

That text box on the right side is supposed to be the queue. I think in this pic I've queued about 5 or 6 actions, but as you can see only the first one displays. The rest are just blank space.
Below is the script for the queue window. I've even tried printing out index numbers and action names to the console, from inside draw_item. It looks like it runs through the queue fine, and it's able to pull the names. Furthermore, the battle code I wrote seems to run through the queue and execute the skills in-game just fine. The damn window just isn't displaying properly for some reason. Any help?
Let me know if I'm not explaining myself correctly.
Functionally, I have this all working just fine. Visually, not so much. I want a queue window that shows you your queue as you build it, with a vertical list of the actions you've chosen, in the order you chose them. Unfortunately, my custom queue window class doesn't seem to display any action names beyond the first one you pick. It expands as you add items, but rather than showing the new actions names it's just empty space, like so:

That text box on the right side is supposed to be the queue. I think in this pic I've queued about 5 or 6 actions, but as you can see only the first one displays. The rest are just blank space.
Below is the script for the queue window. I've even tried printing out index numbers and action names to the console, from inside draw_item. It looks like it runs through the queue fine, and it's able to pull the names. Furthermore, the battle code I wrote seems to run through the queue and execute the skills in-game just fine. The damn window just isn't displaying properly for some reason. Any help?
Let me know if I'm not explaining myself correctly.
#==============================================================================
# ** Window_ActionQueue
#------------------------------------------------------------------------------
# This window displays queued party actions in battle
#==============================================================================
class Window_ActionQueue < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize(queue)
super(480, 64, 160, 0)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
@queue = queue
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.height = @queue.size * 32 + 32
for i in 0...@queue.size
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
# color : text color
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
x = 4
y = index * 32
rect = Rect.new(x, y, self.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.draw_text(x, y, self.width - 8, 32, @queue[index].name, 0)
end
end
Worst videogame character.
Oddly, in FFXII's cast of not terribly dynamic characters (not BAD characters, but not terribly dynamic) I actually found Vaan and Penelo to be the most dynamic. To start with, Vaan was fairly irresponsible and Penelo kinda just scolded him a lot. As the game went on, he became more responsible and serious and Penelo seemed to treat him with more respect. At the end, they actually seemed like decent couple material. Also I always thought it was cute when the two of them were goofing off in the background. It made them seem like they were actually long-time friends.
Though yeah, regardless they were basically just allies to the actual plot movers. Ashe is essentially the main character as far as that goes.
Though yeah, regardless they were basically just allies to the actual plot movers. Ashe is essentially the main character as far as that goes.
Worst videogame character.
post=132736Clearly, one's distaste for a character MUST be universally shared.
After you play Final Fantasy XII and see vaan you want to kill youself.
Oh wait, I haven't killed myself. :/
Opinions.
Some sketches for my project
Various Musical Compositions
Worst videogame character.
I like the cast of FF13 just fine. They're my favorite part of the game actually. And though the plot itself is alright, they was it's told is HORRIBLE. A little exposition now and again is not a bad thing.
Ultimately, on the general subject of disliked characters, there are so many times that I feel like people just WANT to have a character to hate or something. Except in some rare circumstances, most of the characters that seem to piss off 90% of the gamer population don't really piss me off. Navi? Never bothered me. I giggled the first few times I went through the HEY LISTEN thing, then never thought about it again for the rest of the game. Tidus? I liked him, he was decisive. Vanille? Her accent is weird, but she doesn't piss me off. Hope? He's a fucktwit to start with but his whole deal is that he develops OUT of that, making him respectable.
It seems like FF gets a lot of focus on this subject. Even when people play and generally like the games, they get really damn invested in hating particular characters. I've never understood it.
Ultimately, on the general subject of disliked characters, there are so many times that I feel like people just WANT to have a character to hate or something. Except in some rare circumstances, most of the characters that seem to piss off 90% of the gamer population don't really piss me off. Navi? Never bothered me. I giggled the first few times I went through the HEY LISTEN thing, then never thought about it again for the rest of the game. Tidus? I liked him, he was decisive. Vanille? Her accent is weird, but she doesn't piss me off. Hope? He's a fucktwit to start with but his whole deal is that he develops OUT of that, making him respectable.
It seems like FF gets a lot of focus on this subject. Even when people play and generally like the games, they get really damn invested in hating particular characters. I've never understood it.















