The Outcome System

@AIAndy My latest attempt with outcomes does not work the way I am expecting. Instead of getting "tales" until I get a tech which replaces them with "subdued" I am getting both! can you tell me what I a doing wrong ;)
First issue was a bug on my side that prevented it from reading the prereq tech correctly. I pushed a fix to the SVN.
Second issue is that you need to have
Code:
<ReplaceOutcomes>
	<OutcomeType>OUTCOME_TALES_SEA</OutcomeType>
</ReplaceOutcomes>
instead of
Code:
<ReplaceOutcomes>
	<ReplaceOutcomes>OUTCOME_TALES_SEA</ReplaceOutcomes>
</ReplaceOutcomes>
I pushed that change to the SVN as well.
 
@AIAndy,I have tried to get some missions working but they are not appearing so I have done something wrong. Since I just noticed it is now midnight. I will give up and try tomorrow rather than post to the SVN, just in case. ;)
 
@AIAndy,I have tried to get some missions working but they are not appearing so I have done something wrong. Since I just noticed it is now midnight. I will give up and try tomorrow rather than post to the SVN, just in case. ;)

A short checklist for adding outcome missions:
  • Add the new mission at the end of CIV4MissionInfos.xml. IMPORTANT: Any position before MISSION_PRETARGET_NUKE is not allowed and will cause a lot of issues.
  • An outcome mission button is only displayed if any of the outcomes associated with it is possible there. So check that all the prereqs are met.
 
@AIAndy, I am doing something wrong :(. I am trying to add a number of missions to a unit, Subdued Badger, but what I am getting is a random chance of valid missions happening.

In particular I want to be able to choose from Combat (badger baiting), and Study, in the example enclosed. What I get in valid cities is one button saying I have a 50% chance of either occurring.

On another note, if you look at the Subdue_Animals unit infos you will see I have exactly the same action-result for every Tales_Of unit. Which is cumbersome. I will have the same thing for all but one study for Subdued_ units. Combat will be different. Nothing I can think of straight away, besides third normal form and defaults, for "fixing" this.;)
 
@AIAndy, I am doing something wrong :(. I am trying to add a number of missions to a unit, Subdued Badger, but what I am getting is a random chance of valid missions happening.

In particular I want to be able to choose from Combat (badger baiting), and Study, in the example enclosed. What I get in valid cities is one button saying I have a 50% chance of either occurring.

On another note, if you look at the Subdue_Animals unit infos you will see I have exactly the same action-result for every Tales_Of unit. Which is cumbersome. I will have the same thing for all but one study for Subdued_ units. Combat will be different. Nothing I can think of straight away, besides third normal form and defaults, for "fixing" this.;)
The actions look correct. The issue might be with double MISSION_ANIMAL_COMBAT entries in the mission info. Not sure though. I will have a more detailed look tomorrow evening.
 
Thanks. I am now getting both buttons but the results of the study button are not showing up. I know I missed the game text but I should be getting 1:science: from the badger. Whereas it is showing zero.

Edit I should be getting three buttons - butcher, study and combat. I am only getting the butcher and study. No changes fro what I gave you before. The combat one has no prerequsite buildings.
 
Thanks. I am now getting both buttons but the results of the study button are not showing up. I know I missed the game text but I should be getting 1:science: from the badger. Whereas it is showing zero.

Edit I should be getting three buttons - butcher, study and combat. I am only getting the butcher and study. No changes fro what I gave you before. The combat one has no prerequsite buildings.
I'll investigate some more on Saturday. Maybe add it as a separate module on the SVN so I can easily activate and test it directly.
 
@AIAndy I have given some of the outcomes a culture boost using the tag iGreatWorkCulture. Is the correct tag? It is not showing in the hover text. Have you gotten to the +:) for X turns yet?

In the next day or so I will be updating the SVN with all my new outcomes in place so we can do a full test. I am still missing some text I just found out. ;)
 
@AIAndy I have given some of the outcomes a culture boost using the tag iGreatWorkCulture. Is the correct tag? It is not showing in the hover text. Have you gotten to the +:) for X turns yet?

In the next day or so I will be updating the SVN with all my new outcomes in place so we can do a full test. I am still missing some text I just found out. ;)
No, that tag does not exist for outcomes. If you want to add culture, use Commerces.
And no, I have not added a +:) for X turns tag yet. The easiest way would be to just the same happiness timer that events use. That will always be +1:) and stacking it on a happy event would just make the timer longer.
 
No, that tag does not exist for outcomes. If you want to add culture, use Commerces.

No problemo - see comment below

And no, I have not added a +:) for X turns tag yet. The easiest way would be to just the same happiness timer that events use. That will always be +1:) and stacking it on a happy event would just make the timer longer.

Sorry, I am having a bad week. Does this mean that I will need to use the event timer some way or does it mean that you will add a tag which I use and you will use the event timer in some way? :confused:
 
No problemo - see comment below



Sorry, I am having a bad week. Does this mean that I will need to use the event timer some way or does it mean that you will add a tag which I use and you will use the event timer in some way? :confused:
I will add a tag which you use and internally it will use the same timer as events that add +1:) for X turns.
 
OK now for the BIG ask. The outcome system is great for simple missions. Can it be extended for more complex missions?

Currently if you want to add a mission to a unit you need to edit two python files - CvMainInterface.py and GameUtils.py. The latter to put the help text on the button and the former to place the button and the code for the button. Would it be possible to modularise this in some way so that no editing of the files are needed? I know the BUG team would be interested in such a thing.
 
OK now for the BIG ask. The outcome system is great for simple missions. Can it be extended for more complex missions?

Currently if you want to add a mission to a unit you need to edit two python files - CvMainInterface.py and GameUtils.py. The latter to put the help text on the button and the former to place the button and the code for the button. Would it be possible to modularise this in some way so that no editing of the files are needed? I know the BUG team would be interested in such a thing.
I could add Python callbacks to outcomes.
 
I could add Python callbacks to outcomes.

I don't think any of the ones that exist match. If there was a doMission(MiMissionType, Unit) that probably would give us enough to work with. Anyway it is way past my bed time and the fireworks are over so I should go to bed now. :)
 
I don't think any of the ones that exist match. If there was a doMission(MiMissionType, Unit) that probably would give us enough to work with. Anyway it is way past my bed time and the fireworks are over so I should go to bed now. :)
I mean a new callback similar to the ones available in events that you would be able to add to outcomes so to make a mission you would make an outcome mission but then add a Python function name to the outcome that would be called when the outcome is executed.
 
Top Bottom