DARLOS9D'S PROFILE
Darlos9D
0
Search
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
Various Musical Compositions
I'm no pro composer, but I've gotten better over time. Here's a link to some stuff I've done, in no particular order:
http://darlos.servehttp.com/Rendered/
I JUST finished Nature's Blessing today, so that's the most recent. Fight For Your LIfe is an incomplete boss theme, but I still like it. I'll finish it someday. Pandemonium is a City theme of sorts. Shambling Hoard is inspired by zombies (also incomplete). Heart of Ice and Stargazer are two takes on the same theme. I have a more recent version of Stargazer that I haven't rendered and uploaded yet though. I need to do that. Burning God is probably the oldest one, and it shows. It was supposed to be a theme for a fire level in an action game. Cold Providence is just supposed to sound like bad stuff is happening, and isn't exactly complete. I was just messing around I guess. And finally the two "melody" tracks you can just ignore as they were an attempt to prove to a friend that the two songs they come from are not the same song. Still, points to whoever can guess the song off of the few piano notes.
http://darlos.servehttp.com/Rendered/
I JUST finished Nature's Blessing today, so that's the most recent. Fight For Your LIfe is an incomplete boss theme, but I still like it. I'll finish it someday. Pandemonium is a City theme of sorts. Shambling Hoard is inspired by zombies (also incomplete). Heart of Ice and Stargazer are two takes on the same theme. I have a more recent version of Stargazer that I haven't rendered and uploaded yet though. I need to do that. Burning God is probably the oldest one, and it shows. It was supposed to be a theme for a fire level in an action game. Cold Providence is just supposed to sound like bad stuff is happening, and isn't exactly complete. I was just messing around I guess. And finally the two "melody" tracks you can just ignore as they were an attempt to prove to a friend that the two songs they come from are not the same song. Still, points to whoever can guess the song off of the few piano notes.
Some sketches for my project
I've been sketching some stuff for the RPG I'm working on, so I guess I'll post the results here. I just have a couple for one character right now. I'll just post links as I don't want to make my posts humongous.
http://img12.imageshack.us/img12/7192/shi1u.jpg
http://img30.imageshack.us/img30/7861/shi2k.jpg
http://img12.imageshack.us/img12/7192/shi1u.jpg
http://img30.imageshack.us/img30/7861/shi2k.jpg
Generic Combat System complaints
I've been playing RPGs since the first Dragon Warrior on the NES. I've seen lots of RPG combat, particularly from jRPGs, but also from western ones, and I've identified a lot of common elements that I feel are glaring issues that nobody has bothered to fix.
Probably my #1 beef is targeting AI. In most RPGs, all of your opponents, from the dumbest warg to the elder god end boss are dumber than a bag of hammers. In any game that is turn-based, active time, or anything of that sort where the characters don't actually move around a battlefield, enemies will just target whoever with no real rhyme or reason, and apparently NOBODY has ever seen fit to do any differently. Why is it that in one turn an enemy will put one of my characters to sleep, only to physically hit them in the next term, rendering the status effect pointless? Why is it that whenever I fight a group of enemies with a healer or powerful squishy wizard, I always make them my top priority target, but they never present any similar strategies and always go for my heavily armored guy? Or nobody in particular at all?
In other games, like MMOs, we get "aggro," where enemies go after the perceived biggest target. For some reason, it's always the heavily armored guy with a huge shield and tons of defense buffs. Perhaps this is understandable for some kind of "stupid animal" enemy, but when you're dealing with a group of soldiers, a powerful wizard, ninjas, or something that's supposed to be even SMARTER than you, you would think your opponent would be clever enough to, I dunno, NOT try to physically beat down the guy with the highest physical defense, and instead work to take out key targets like healers, snipers, and ranged casters.
There's really only a few arguments against designing these things better that I can imagine hearing, and they all suck, like "it's what people are used to," or "it would make the game too hard." Bollocks, different and challenging is what new games need.
Of course, the only way making the enemy targeting smarter would be fair would be to give the player tools to deal with it, such as ways to explicitly defend their high-value members, perhaps through the assistance of other members. A combat system that is actually fairly good about that is DnD's system, with it's attacks of opportunity that discourage people from just randomly running around the battlefield at different targets. There are likely other solutions though, even for combat systems that don't involve characters moving about a battlefield (like DQ or FF).
Thoughts?
Probably my #1 beef is targeting AI. In most RPGs, all of your opponents, from the dumbest warg to the elder god end boss are dumber than a bag of hammers. In any game that is turn-based, active time, or anything of that sort where the characters don't actually move around a battlefield, enemies will just target whoever with no real rhyme or reason, and apparently NOBODY has ever seen fit to do any differently. Why is it that in one turn an enemy will put one of my characters to sleep, only to physically hit them in the next term, rendering the status effect pointless? Why is it that whenever I fight a group of enemies with a healer or powerful squishy wizard, I always make them my top priority target, but they never present any similar strategies and always go for my heavily armored guy? Or nobody in particular at all?
In other games, like MMOs, we get "aggro," where enemies go after the perceived biggest target. For some reason, it's always the heavily armored guy with a huge shield and tons of defense buffs. Perhaps this is understandable for some kind of "stupid animal" enemy, but when you're dealing with a group of soldiers, a powerful wizard, ninjas, or something that's supposed to be even SMARTER than you, you would think your opponent would be clever enough to, I dunno, NOT try to physically beat down the guy with the highest physical defense, and instead work to take out key targets like healers, snipers, and ranged casters.
There's really only a few arguments against designing these things better that I can imagine hearing, and they all suck, like "it's what people are used to," or "it would make the game too hard." Bollocks, different and challenging is what new games need.
Of course, the only way making the enemy targeting smarter would be fair would be to give the player tools to deal with it, such as ways to explicitly defend their high-value members, perhaps through the assistance of other members. A combat system that is actually fairly good about that is DnD's system, with it's attacks of opportunity that discourage people from just randomly running around the battlefield at different targets. There are likely other solutions though, even for combat systems that don't involve characters moving about a battlefield (like DQ or FF).
Thoughts?
Preparing to do some heavy scripting
(I'm using XP. After writing the below post I figured it'd be best to put that info at the top)
If you can't tell from my post count, I'm pretty new here. The reason I'm here, though, is because I'm a game design hobbyist (also, I'm a professional programmer, though I'm new to Ruby) who really wants to make an RPG with some interesting combat and character building mechanics. I've got reams of text files with things planned out, and really the next step is to start programming. I figured that rather than start completely from scratch with XNA or some other toolset like that, I could start with something like RPGMaker, which seems to have some pretty powerful scripting available. The reason for this is simply because I didn't feel like going through the process of directly handling graphics, map editing, music handling, etc. I just wanted to use something that would let me get right down to business, so here I am.
Now, I have a pretty simple question: where do I go to throw in all-new stats and attributes for character? Right now it looks like it'd be in Game_Battler, but I noticed it references things like base_str, which I have no idea how to access. My primary concern is that if I go and add in stats in game_battler, I'll find out later that they don't really get saved permanently, since I see there in the initialize function is stuff like @str_plus which seems like its maybe some kind of temporary value.
I looked at the sticky post with tutorials, and glanced at tutorials on the site, and didn't really find any thing that was like "here's how scripting works" or "here's how you customize character attributes." Maybe I'm looking for the wrong terminology though.
Oh, and I'm probably gonna go with XP, because the combat system I have in mind would basically be like turn-based strategy with characters moving around the map, instead of a separate battle scene. XP's sprite graphic handling (variably sized characters) seems somewhat more appealing because of this.
If you can't tell from my post count, I'm pretty new here. The reason I'm here, though, is because I'm a game design hobbyist (also, I'm a professional programmer, though I'm new to Ruby) who really wants to make an RPG with some interesting combat and character building mechanics. I've got reams of text files with things planned out, and really the next step is to start programming. I figured that rather than start completely from scratch with XNA or some other toolset like that, I could start with something like RPGMaker, which seems to have some pretty powerful scripting available. The reason for this is simply because I didn't feel like going through the process of directly handling graphics, map editing, music handling, etc. I just wanted to use something that would let me get right down to business, so here I am.
Now, I have a pretty simple question: where do I go to throw in all-new stats and attributes for character? Right now it looks like it'd be in Game_Battler, but I noticed it references things like base_str, which I have no idea how to access. My primary concern is that if I go and add in stats in game_battler, I'll find out later that they don't really get saved permanently, since I see there in the initialize function is stuff like @str_plus which seems like its maybe some kind of temporary value.
I looked at the sticky post with tutorials, and glanced at tutorials on the site, and didn't really find any thing that was like "here's how scripting works" or "here's how you customize character attributes." Maybe I'm looking for the wrong terminology though.
Oh, and I'm probably gonna go with XP, because the combat system I have in mind would basically be like turn-based strategy with characters moving around the map, instead of a separate battle scene. XP's sprite graphic handling (variably sized characters) seems somewhat more appealing because of this.
Pages:
1













