So I know this shouldn't be that bad but for whatever reason I am a bit confused.
I'm trying to add stats to my do_eq command and in a certain order. Right now I have the setup of: a sprintf with several strings in it. Something along the lines of sprintf(eqmat, "%s %s%s%s%s%s%s%s%s%s%s%s",format_obj_to_char(obj,ch,TRUE), obj->max_slot >= 1 ? has_materia_slot (obj,0) ? "@" : "O" : " ", obj->joints ? "-" : " ", and that goes on for a moment. After that I want to basically do , obj->affected type deal and list it that way.
I want to add six %d to this so I can start it pulling object stats. I'm wanting it to list Strength, Dexterity, Vitality, Magic, Spirit, Luck in that order and only what they modify not the name of the stat, for I have that above it all. The problem im having is getting those in that order seeing as how objects dont organize stats in that way, and it's an addaffect on objects. There are tons more addedaffects.
the very easy way: store those in temporary values, then display thos. The parameter way: build a temp table with as many number of stats you have, then have a parameter table where you state than str should go in first column etc, then read all your affect and complete your temp table. This way you have a way to have them everywhere in the order you state once, and change this order very easily.