In a window, after having created a command using add_command("text", :thing)
how can I change the text of that command (i.e. write "items" instead of "item") AFTEr it was created?
I think I found how to get the command using @list[index] but I cannot manage to find how to change that text.
Thanks
Well, I'm not entirely sure why you would want to change the text of a command, but you can do it by:
@list[index][:name] = ""
By itself, that won't be enough until you redraw the item's name in the window with:
draw_item(index)
You mind taking a screenshot or explaining what you want a little better, I'm afraid I'm not following.
What I'm trying to do is implement a new "equip-to-party" system, having party-featured items using "<party>" in the item's notes.
I so want to add a new item in the game's menu, Party items, in wich you will be able to fill 3 "party equipment" slots (that's where the commands come in play, and it's working well now, thank's to modern algebra).
Was there a better way to do this ?
The only missing thing now is my items not showing in the list but I'll figure it out by myself.
Thanks alot.
After the fact, you'd have to reassign it with a new value. The other way would be to write the code so that you can create the list of commands with the values you want them to have, rather than change them after a list has been made. Without seeing any code, however, I can only guess at what you're doing.
As for the items not showing, I can think of a few reasons, but again, with no code it's a guess at best. The first guess would be to check that the list containing the items actually has items in it, then to make sure that you are refreshing your contents bitmap properly. I've known a few times where I've had list not update properly and it's always been a simple and silly thing I've forgotten to do.
The "Words" themselves come from your System Database. You can change the name of each of those "Words" without a script there, but it sounds like in your case, I think you want the word displayed to be conditionally displayed, either for a single party member, or the entire group. You could do something like this in your script I suppose:
equip_word = (group_condition) ? "Equip to Group" : $data_system.words.equip
self.contents.draw_text(x, y, width, height, equip_word[, align])