Outcome types already have a text label each (e.g. in the case of Subdue Animal it is TXT_KEY_OUTCOME_SUBDUE) which you can get from the outcome info class (it is inherited from the info base class).Its scary to me that most of that actually makes sense now. lol
(note: first post on my new computer )
Now that method would require some serious hardcoding unless you had generic text tag labels, which would probably be a good idea here. Something like: TXT_PROMOTION_OUTCOME_ONE or something to that extent, then program out a number of possible outcome texts.
The information which promotions add an extra chance to an outcome type is currently only in the outcome info class. If you want to know for a promotion, if it adds an extra chance to any outcome type, you have to loop through all outcome infos and check.I'm not sure about what you meant about:
What I mean with mirroring is adding a vector of OutcomeType to the promotion info and then after all XML is read loop once through all outcome infos, read the list of extra chance promotions in each and enter the outcome type into the new vector for those promotions. Now it is cheaper to query if a specific promotion increases the chance for any outcomes by checking that new vector in the promotion info.
There are also some other information types that could use that kind of cheaper reverse lookup (at the cost of some memory).
I agree, an AI weight should probably be added to the outcome info specifically for this extra chance evaluations for promotions (there is already code to evaluate specific outcome lists for outcome missions).but we should also put these descriptions not only in the promotion help but in the combined current unit ability descriptions too.
As for being useful for ai evaluation of the promo, I would think we'd want to add an ai weight tag to the outcome system so that each outcome could be given an ai value that could easily be cycled through and referenced in the promo ai selection process.