Action RPG Framework

by Forum_account
Action RPG Framework
A framework for developing action RPGs.
ID:842017
 
Resolved
I didn't add a color picker but I added the tools to make it really easy for someone to implement one. See demo\custom-hud.dm for an example.

That custom HUD creates a list box that's used to display the player's abilities. You can pass the list_box.display() proc a list of many different things - abilities, items (or any kind of atom), or just an associative list. For example:

var/list/data = list()
data["blue"] = icon('colors.dmi', "blue")
data["green"] = icon('colors.dmi', "green")
data["red"] = icon('colors.dmi', "red")
data["yellow"] = icon('colors.dmi', "yellow")
data["brown"] = icon('colors.dmi', "brown")
data["black"] = icon('colors.dmi', "black")
data["white"] = icon('colors.dmi', "white")
data["pink"] = icon('colors.dmi', "pink")

list_box.display(data)

That will use the keys (blue, green, red, etc.) as the value for each slot in the list box and it'll use the associated icon as what's displayed there. If you call list_box.get_value() it'll return the name of the color.
Applies to:
Status: Resolved (10)

This issue has been resolved.
I just got done reading through the development post and figured I'd stop by and offer a couple of ideas incase it might help.

Alterable Equipment: This may be better as a module, but I think it would be good to provide some form of alteration options for equipment. This is handled in many different ways from game to game, but the implementation its self is often similar.

One game, like Diablo, might make it so its based off identifying the item and giving it a prefix and/or suffix. Another might use something like imbuing the item, and adding effects to it.

In either case, I'm pretty sure its a matter of handling lists and probability, but I'd like to see a proper way to implement something like this.

Color Selection Menu:This may or may not be necessary, but it would probably fit into the demo game. Not nearly all games would use this, but I believe a lot of games like to let a variety of things such as equipment, hair, etc be recolored.

It would be nice to see a nice menu for selecting your color, and if there isn't already; some support for changing both the icons overlay and icon color into something that can be saved and/or rebuilt in some way.

I know you have full support for overlays and recoloring, but I am unsure about the icon its self; so this is mainly a suggestion for the menu because input prompts and such are too common and ineffective for this. Most people dislike having to look up rgb values when they want to pick their color.

My apologies if most of this color stuff is already in, but I did not quite understand the icon generation folder. Including it just spammed the output when I logged in, and I didn't dive into there to fully learn whats available for coloring yet.


Closing Comments: I hope some of this proves useful, and that I'm not being too unreasonable with my suggestions. I would also happily assist with adding things in myself, but I am quite busy right now, and I don't feel I am skilled enough to implement much effectively enough just yet.

I do plan to use this framework in the future, though; so I'll be a supporter of it and more than happy to assist in any way I can.
Toddab503 wrote:
This may be better as a module, but I think it would be good to provide some form of alteration options for equipment. This is handled in many different ways from game to game, but the implementation its self is often similar.

I'd probably add this by expanding the sample game to show how you could create this. Right now the bonuses given by the items there are completely static. I would like to at least add variables to the items that determine how much power/speed/defense they grant and override the item's description() proc to dynamically generate the descriptions that list the stat bonuses you get.

Color Selection Menu: This may or may not be necessary, but it would probably fit into the demo game. Not nearly all games would use this, but I believe a lot of games like to let a variety of things such as equipment, hair, etc be recolored.

The icon generation folder is for generating the armor overlays. If you wanted to be able to re-color armor at runtime that would be something separate. It would make sense to have a color_prompt() proc and I'll put it on the list, but as it's not something that should be used that often it's not that high of a priority. Maybe I'll do this differently and create another prompt-like proc that takes a list and lets the user make a selection, but instead of showing the choices as text on buttons it shows them as icons arranged in a grid. This could be used for picking maps, teams, character classes, etc.
In response to Forum_account
Forum_account wrote:
I'd probably add this by expanding the sample game to show how you could create this. Right now the bonuses given by the items there are completely static. I would like to at least add variables to the items that determine how much power/speed/defense they grant and override the item's description() proc to dynamically generate the descriptions that list the stat bonuses you get.

Yeah, that would probably be the best way to implement it. Much more detailed than I imagined. Sounds great.

Forum_account wrote:
The icon generation folder is for generating the armor overlays. If you wanted to be able to re-color armor at runtime that would be something separate. It would make sense to have a color_prompt() proc and I'll put it on the list, but as it's not something that should be used that often it's not that high of a priority. Maybe I'll do this differently and create another prompt-like proc that takes a list and lets the user make a selection, but instead of showing the choices as text on buttons it shows them as icons arranged in a grid. This could be used for picking maps, teams, character classes, etc.

I definitely agree that it's not much of a priority, but that does sound like a good way to go about handling it when it is tended to.
Forum_account resolved issue with message:
I didn't add a color picker but I added the tools to make it really easy for someone to implement one. See demo\custom-hud.dm for an example.

That custom HUD creates a list box that's used to display the player's abilities. You can pass the list_box.display() proc a list of many different things - abilities, items (or any kind of atom), or just an associative list. For example:

var/list/data = list()
data["blue"] = icon('colors.dmi', "blue")
data["green"] = icon('colors.dmi', "green")
data["red"] = icon('colors.dmi', "red")
data["yellow"] = icon('colors.dmi', "yellow")
data["brown"] = icon('colors.dmi', "brown")
data["black"] = icon('colors.dmi', "black")
data["white"] = icon('colors.dmi', "white")
data["pink"] = icon('colors.dmi', "pink")

list_box.display(data)

That will use the keys (blue, green, red, etc.) as the value for each slot in the list box and it'll use the associated icon as what's displayed there. If you call list_box.get_value() it'll return the name of the color.