So the game I have in the works has evolved a very complex damage system with very specific strengths and weaknesses for every enemy and piece of equipment. What I would like to do to help out players is to give a party member a skill that causes them to analyze an enemy and print their 'observations' to the screen. For example if used on a bandit wearing chainmail you will not be told to use piercing or blunt weapons but instead be told something like "it will be hard to cut through that chainmail" which implies that a slashing weapon wont work well.
I have no problem writing a unique piece of text for every enemy but I don't know how to implement this without a goliath if=then common event.
There has to be a better way to do this.
I am using yanfly plugins so if any of those help let me know please.
Actually, you will never be able to avoid an if tree or a switch tree. But here's how you can simplify it.
Instead of having a huge goliath tree in the skill, simply call the common event and have the if tree there. It's easier to work with there. Now to business.
Use variables. One variable representing an element of armor (example: Variable 70. If value is 1, then the armor is light and it's good against blunt, but not so good against slash. If the armor is 2, then it's heavy and it's good against slash, but not good against blunt. If the armor value is 3, then it's fire resistant, and so on), second one element of weapon, third one whether it's warrior, spellcaster, etc. Do as many things as you need. And trust me, only on the first enemy there's all the work. Because once you do the first enemy, you just copy paste and adjust the variables for all other enemies. And that's a matter of about two hours.
The first page of a troop event will then set the values of variables accordingly depending on the enemies.
Then you have up to 8 trees of weapon/armor/whatever types in the common event. That's inevitable, but at least you'll have to do it only once and the only adjustment you'll do are the variable values in the troop's first page. That's not a lot to do there, is it... And the advantage is, it is easy to edit if you need extra things to put there.
And if you want to prevent unnecessary going through ifs, you'd surely like to use label and jump to label once you reach your desired thing.
There are several "Monster Book"/"Monster Data" plugins out there, which track things like enemy weaknesses/resistances and stats. Some of them allow for requiring a certain skill to be used in order to record the data to the book (and even for those that don't, you could modify it without too much trouble). The second step after that, which might require a custom plugin (or there might be something out there that exists already, but I don't know of it offhand), would be to have a status screen which is available in battle (and perhaps displays automatically after using this skill as well) which shows the player info from the monster book on a given enemy.
I would suggest the above approach if this is an element of your game that players will use often (you make it sound like this is true) and you're serious about presenting your game well. But Poryg's idea above should work too, and it will require less initial implementation time and less JS expertise, so long as you're willing to do everything through message boxes (you could even "save" the data that the player finds out using a scan by setting a switch to say that Monster X was already scanned, and use Yanfly's "Instant Cast" plugin to allow the player to see data for a Monster they've already scanned without wasting a turn).