[XP] Elements in equip and status screen

Started by Kaiph, March 03, 2016, 09:35:50 am

Previous topic - Next topic

Kaiph

One day I'll stop asking for help and actually contribute something.

In CP, Blizzard's equip screen has a feature where you can see the elemental (and status) affinities of equipment using icons. I've tried to do a remake of his equip screen and so far so good. But this has me stumped. I've tried looking at the whole Stormtronics CMS script in the database, but to me, since it's all one script, it looks a little jumbled and I can't work out which parts are relevant and which to take out to make it work smoothly with my menu. Plus I don't want to directly copy it because I want to expand my scripting knowledge but as it stands, a lot of it looks like jargon to me.

My questions here are:

  • How can I read the elemental and status affinities of equipment so I can then implement them into my equip screen?

  • Using this knowledge, how would I then be able to implement this information into my status screen?

  • Would this work in conjunction with using dummy elements which won't be read?



If anyone could shed light on this, or at least point me in the direction of somewhere where this has already been requested, I'd be grateful. I did a search and couldn't find anything on this forum, but I'd appreciate any help on this :)
Thanks.

KK20

1. Read the RMXP Help File for RPG::Armor. You'll find what you need there. For elements, basically returns an array of ints from 1 to 6 where A is 1 and F is 6. For states, I think it's just an array of booleans.
2. Assuming your elements follow the RMXP default values (200, 150, 100, 50, 0, -100), you just draw_text whatever value needs to be drawn. If int is 3, then write 100, etc.
For states, just check if the value is true. Then do whatever you want to add, be it draw an icon or draw text saying it resists that state.
3. You're going to be using a loop to iterate through each element in your database. If you have an array of element IDs to ignore, just put something like
next if DUMMY_ELEMENTS.include?(element_id)

in your loop.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Kaiph

Thanks a bunch for that :) I'll give it a shot when I get a chance in the next couple of days.
Levelled you up because you're always really helpful.