C2C: Promotions

Its scary to me that most of that actually makes sense now. lol ;)
(note: first post on my new computer :D)

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.
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).

I'm not sure about what you meant about:
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.
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).

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.
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).
 
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).


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.
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).

in general my advise would be not to bother with these (they amount to one off calculated caches) unless profiling indicates that were spending any significant amount of time in the otherwise-necessary looping. We know memory is precious, and all the reverse lookups take up more. Equally (providing the routines include the profile macro at the start, which they should if we are at all suspicious about their overall cost) we can tell with a high degree of confidence if they are actually having a significant performance impact. Hence the appropriate course of action is(usually) to err on the side of simplicity and/or economy of memory usage, profile periodically, and move to more complex or more memory intensive algorithms as necessary based on the outcome of the profiling.
 
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).
Then it shouldn't be too much to add a Promotion Text, a Unit Text, and a Unit Help text much the same way. I would think that TXT_KEY_OUTCOME_ wouldn't contain the correct wording for display in the help popups so we'd need the others to flesh it out properly.

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.
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 see. Interesting to see Koshling's answer to that as well. I'm going to PROMISE I would not personally attempt such a maneuver without being guided by the hand on such a thing ;). (Even though it actually did make some sense to me in a theoretical fashion.)

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).
Note that although I suggest it, Outcome Missions are your affair and there's a lot there in the way its setup fundamentally that I don't really understand yet so I'm not touching anything about it myself... for now at least. I'm still a bit curious to understand some things about it actually but I'll ask when I'm ready to learn.
 
I Thought that clockwork golem is a robot but controlled by man. So the unit itself can have religion promos cause man controll him (Golem itself has no artificial intelligence it is only a warfare tool like canon or something)

Under THAT reasoning, I would be happy to see it set as a Melee unit then.


Sorry for the double post but it WAS for a differing topic ;)
 
+1 for Clockwork Golem as a melee unit

If we will had a lot of other clockpunk units than you will can conider adding another unit category.
 
Also if one had a religion that gave promotions wouldn't you think that they just might creature the Golem to reflect the religion? Such as a Holy Golem with religious symbols or decorations on it. My vote is to make it a Melee unit again.

Considering that the term 'golem' comes from specifically Jewish mysticism and folklore, I should say so! ^_~

Admittedly, this wouldn't apply if it was renamed automaton, as has been suggested in this thread. However, there's still no reason that a war automaton couldn't be anointed, festooned with prayer scrolls or otherwise blessed if that's the sort of society that built it.

If there are balance issues with it, better to weaken it specifically than to weaken it by means of a unittype that might later be strengthened independently of the unit.
 
Then it shouldn't be too much to add a Promotion Text, a Unit Text, and a Unit Help text much the same way. I would think that TXT_KEY_OUTCOME_ wouldn't contain the correct wording for display in the help popups so we'd need the others to flesh it out properly.
I would go the easy way and use the existing names of the outcome types and generate text like this:
+35% chance of Subdue Animal

I don't think a help text on the unit itself would help much. If you want to know your subdue chances, select the unit and then mouse over the target animal and you will see the specific chance for each outcome of the kill for the selected unit.
 
Also if one had a religion that gave promotions wouldn't you think that they just might creature the Golem to reflect the religion? Such as a Holy Golem with religious symbols or decorations on it. My vote is to make it a Melee unit again.

Done now on the SVN.
 
My hunter just got attacked by a tiger that had the eligible for promotion glow (I won without taking any damage) - not sure what is up with that. (v25)
 
I too have noticed that some wild animals and sea critters are getting the promotion glow. There should b promotions there for them to get, so why aren't they?
 
I too have noticed that some wild animals and sea critters are getting the promotion glow. There should b promotions there for them to get, so why aren't they?

Will they glow if they have enough XP for a promotion, even if they have no promotions to get?
 
Will they glow if they have enough XP for a promotion, even if they have no promotions to get?

To glow a unit needs both the XP and an available promotion. You can see that from healers who often have enough points for a promotion but have none available so don't glow as soon as a promotion that they can use becomes available they start to glow.
 
Do you think i have enough "Promotions" for my Assassin :p:thumbsup: (Ah i just gained one more)

Nice! All too soon you won't have quite that much of a spread showing but that's going to be impressive either way. What level is he at?
 
Why anti-crime promotion are so hard to get now? :(
having the III is nearly impossible : these units cant attack and are not often the best defense, so they never XP...
We cant attach a noble to them to give them more XP...
 
Why anti-crime promotion are so hard to get now? :(
having the III is nearly impossible : these units cant attack and are not often the best defense, so they never XP...
We cant attach a noble to them to give them more XP...

You can either 1) put them in border cities that get attacked a lot to give them more XP or 2) build them in cities with lots of military buildings that give free XP.
 
You can either 1) put them in border cities that get attacked a lot to give them more XP or 2) build them in cities with lots of military buildings that give free XP.

Example pls:confused:
 
You can either 1) put them in border cities that get attacked a lot to give them more XP or 2) build them in cities with lots of military buildings that give free XP.

You can also have another unit on the same plot as a TW and attach a Noble/Warlord to that unit which will give half of the granted XP to the TW.

Cheers
 
Top Bottom