Page 1 of 1

points victory for scenarios

Posted: Sun May 05, 2019 1:39 pm
by dejvid2
Looking at the default scenario I thought that using the visibility section as a guide it ought to be possible to edit my scenarios so that a points path to victory would exist.
Unfortunately, when I generated a scenario and then run a game, the points victory doesn't appear. Is there somewhere other than the Player stats that has to be set to
get victory points to work?

This is what I've done:

</aiData>
<properties>
<doubles>
<SerializableStringDoublePair key="winningPointsValue" value="2000"/>
</doubles>
<strings>
<SerializableStringStringPair key="winningPoints-0" value="1|1|1|1|1|0|1|1|0|1|1|1|1|0|1|0|1|1|1|1|1|1|1|1|1|1|1|1|1|1|0|0|0|1|1|1" />
<SerializableStringStringPair key="winningPoints-1" value="1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|0|0|0|0|0|1|1|1|1|1|0|0|0|1|1|1" />
<SerializableStringStringPair key="winningPoints-2" value="0|1|1|1|1|1|1|1|1|1|1|1|0|1|1|1|1|1|1|0|0|0|0|0|0|0|1|1|1|0|0|0|0|1|1|1" />
<SerializableStringStringPair key="winningPoints-3" value="0|0|1|1|1|0|1|1|1|1|1|1|1|1|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1" />
<SerializableStringStringPair key="winningPoints-4" value="0|0|0|1|1|1|1|0|0|1|1|1|1|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|0|1" />
<SerializableStringStringPair key="winningPoints-5" value="0|0|0|0|1|1|1|1|1|1|1|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1" />
<SerializableStringStringPair key="winningPoints-6" value="0|0|0|0|0|1|1|1|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1" />
<SerializableStringStringPair key="winningPoints-7" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1" />
<SerializableStringStringPair key="winningPoints-8" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1" />
<SerializableStringStringPair key="winningPoints-9" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|0|1|1" />
<SerializableStringStringPair key="winningPoints-10" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|0|0|0|0|0|0|0|0|0|0|1|0|1|1|1" />
<SerializableStringStringPair key="winningPoints-11" value="0|0|0|0|0|0|0|0|2|0|0|0|0|0|0|0|0|1|1|1|0|0|0|0|0|0|0|0|0|0|0|1|0|1|1|1" />
<SerializableStringStringPair key="winningPoints-12" value="0|0|0|0|0|0|0|0|2|2|2|2|2|1|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|1|1|1" />
<SerializableStringStringPair key="winningPoints-13" value="0|0|0|0|0|0|0|0|2|2|2|2|2|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1" />
<SerializableStringStringPair key="winningPoints-14" value="0|0|0|0|0|0|1|0|2|2|2|2|2|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|1|1|1" />
<SerializableStringStringPair key="winningPoints-15" value="0|0|0|0|1|1|1|2|2|2|2|2|2|2|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|1|1|0" />
<SerializableStringStringPair key="winningPoints-16" value="0|0|0|0|1|1|0|2|2|0|0|2|2|2|0|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|1|1|1" />
<SerializableStringStringPair key="winningPoints-17" value="0|0|0|0|1|1|1|0|2|0|2|2|2|2|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|0|1|1" />
<SerializableStringStringPair key="winningPoints-18" value="0|0|0|0|0|1|1|1|1|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1|0" />
<SerializableStringStringPair key="winningPoints-19" value="0|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1" />
<SerializableStringStringPair key="winningPoints-20" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1" />
<SerializableStringStringPair key="winningPoints-21" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|0" />
<SerializableStringStringPair key="winningPoints-23" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1" />
<SerializableStringStringPair key="winningPoints-24" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1" />
</strings>
</properties>
<playerModelAvailabilities>

Re: points victory for scenarios

Posted: Sun May 05, 2019 6:55 pm
by pavelk
Hello dejvid2,
victory points have to be set manually per scenario (there is no auto-generated victory points map) and there is no functionality to set this in the game (in the editor). If you decide to create your own victory points map, please keep in mind that this winningPoints values must exactly match the dimension of the map. If you either have the length of one of the winningPoints-X rows too short or long or the height of the map mismatch the number of winningPoints rows, it will ignore this victory condition.
Basically victory points condition is tailored for each scenario and therefore you need to know what you are doing.
If you want, join our discord and I can help you with that.
Pavel

Re: points victory for scenarios

Posted: Mon May 06, 2019 10:51 am
by dejvid2
UPDATE:
There also needs to be added after:
<winningConditions>
<gameConditions>
this
<GameConditionMemento type="WinningPointsGameCondition" id="1" afterWinAction="1" deactivationType="1" fulfilment="100" name="GameCondition.WinningPointsGameCondition" achievedResourceText="GameCondition.ModWinningPointsGameConditionAchievedResourceText" achievedByOpponentResourceText="GameCondition.WinningPointsGameConditionAchievedByOpponentResourceText" tresholdReachedByOpponentResourceText="GameCondition.WinningPointsGameConditionTresholdReachedByOpponentResourceText" descriptionResourceText="GameCondition.WinningPointsGameConditionDescription" playerIds="1|3|4|5|7|10|11|12|13|14|18" resurrectPlayerIds="1|3|4|5|7|10|11|12|13|14|18" copyAttributes="0">
<playerGameConditionTresholdWarnings>
<playerGameConditionTresholdWarnings>
<PlayerGameConditionTresholdWarningMemento id="1" percentage="0" isDisplayed="false" areOpponentsWarned="false" />
<PlayerGameConditionTresholdWarningMemento id="2" percentage="50" isDisplayed="true" message="Texts.AchievedWinningPoints50GameCondition" areOpponentsWarned="false" />
<PlayerGameConditionTresholdWarningMemento id="3" percentage="75" isDisplayed="true" message="Texts.AchievedWinningPoints75GameCondition" areOpponentsWarned="true" />
<PlayerGameConditionTresholdWarningMemento id="4" percentage="85" isDisplayed="true" message="Texts.AchievedWinningPoints85GameCondition" areOpponentsWarned="false" />
<PlayerGameConditionTresholdWarningMemento id="5" percentage="90" isDisplayed="true" message="Texts.AchievedWinningPoints90GameCondition" areOpponentsWarned="true" />
<PlayerGameConditionTresholdWarningMemento id="6" percentage="95" isDisplayed="true" message="Texts.AchievedWinningPoints95GameCondition" areOpponentsWarned="true" />
<PlayerGameConditionTresholdWarningMemento id="7" percentage="100" isDisplayed="true" message="Texts.AchievedGameCondition" areOpponentsWarned="true" />
</playerGameConditionTresholdWarnings>
</playerGameConditionTresholdWarnings>
</GameConditionMemento>

Unfortunately that isn't the whole story as the scenario crashes with the following error
11:47:16: 2019-05-06 11:47:16ZThe given key was not present in the dictionary.

Stack Trace [ at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Aggressors.Msgs.WinningPointsGameCondition.get_PlayerGameConditions()
at Aggressors.Msgs.GameCondition.GetExtendedPlayerGameConditions(StateChangedGameConditionSummary summary, Move move)
at Aggressors.Msgs.GameCondition.CheckGameCondition(Move move, StateChangedGameConditionSummary summary, Boolean createReports, Boolean isInnerCondition)

Re: points victory for scenarios

Posted: Sun May 12, 2019 4:53 pm
by dejvid2
SUCCESS! :D
A victory point map must have at least one city
This is for the official Roman invasion of Britain ( |2[116=10]| is the location of Londinium which had the id of 116 2 being what you get if Londinium has been destroyed):
<properties>
<doubles>
<SerializableStringDoublePair key="winningPointsValue" value="310"/>
</doubles>
<strings>
<SerializableStringStringPair key="winningPoints-0" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-1" value="0|0|0|0|0|0|0|1|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-2" value="0|0|0|0|0|0|0|1|1|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-3" value="0|0|0|0|0|0|0|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-4" value="0|0|0|0|0|0|0|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-5" value="0|0|0|0|0|0|0|0|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-6" value="0|0|1|1|1|1|0|0|1|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-7" value="0|1|1|1|1|1|0|1|1|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-8" value="1|1|1|1|1|1|0|0|0|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-9" value="1|1|1|1|1|0|0|0|0|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-10" value="1|1|1|1|1|0|0|1|0|0|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-11" value="1|1|1|1|1|0|0|0|0|0|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-12" value="1|1|1|1|1|0|0|1|1|1|1|1|2|1|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-13" value="1|1|1|0|0|0|0|0|1|1|1|1|2|2|0|0|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-14" value="0|0|0|0|0|0|1|1|1|1|1|2|2|2|2|2|0|0|0|0|0|0|0|0|0|0" />
<SerializableStringStringPair key="winningPoints-15" value="0|0|0|0|0|0|0|1|1|2|2|2|2|2|2|2|0|0|0|0|0|5|5|5|5|2" />
<SerializableStringStringPair key="winningPoints-16" value="0|0|0|0|0|0|0|0|0|2|2|2|2|2|2|0|0|0|0|2|2|2|5|5|5|2" />
<SerializableStringStringPair key="winningPoints-17" value="0|0|0|0|0|0|2|2|2|2|2|2|2|2[116=10]|0|0|0|0|0|2|2|2|2|2|2|2" />
<SerializableStringStringPair key="winningPoints-18" value="0|0|0|0|0|2|2|2|2|2|2|2|2|2|2|0|0|0|2|2|2|2|2|2|2|2" />
<SerializableStringStringPair key="winningPoints-19" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|2|2|2|2|2|2|2|2|2|2|2" />
<SerializableStringStringPair key="winningPoints-20" value="0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|2|2|2|2|2|2|2|2|2|2|2" />
<SerializableStringStringPair key="winningPoints-21" value="0|0|0|0|0|0|0|0|0|0|2|0|0|0|2|2|2|2|2|2|2|2|2|2|2|2" />
<SerializableStringStringPair key="winningPoints-22" value="0|0|0|0|0|0|0|0|0|0|2|2|2|2|2|2|2|2|2[62=10]|2|2|2|2|2|2|2" />
<SerializableStringStringPair key="winningPoints-23" value="0|0|0|0|0|2|2|2|2|2|2|2|2|2|3|3|2|2|2|2|2|2|2|2|2|2" />
<SerializableStringStringPair key="winningPoints-24" value="0|0|0|0|0|2|2|2|2|2|2|2|2|2|3|3|4|2|2|2|2|2|2|2|2|2" />
<SerializableStringStringPair key="winningPoints-25" value="0|0|0|0|0|0|0|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2" />
<SerializableStringStringPair key="winningPoints-26" value="0|0|0|0|0|0|0|0|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2" />
</strings>
</properties>

Re: points victory for scenarios

Posted: Sun May 12, 2019 5:04 pm
by pavelk
Hello dejvid,
I am happy you are making progress on this but what do you mean that victory points map must have at least city?

Re: points victory for scenarios

Posted: Sun May 12, 2019 8:40 pm
by dejvid2
pavelk wrote:
Sun May 12, 2019 5:04 pm
Hello dejvid,
I am happy you are making progress on this but what do you mean that victory points map must have at least city?
My first try had tiles with a points value of 2 or 1 except mountains and sea which are of course zero. It had no bonus cities.
When I added a few like this 2[116=10] meaning, in this case the 116 being the id of the city which is in the tile at the beginning
the problem was solved.

So the program expects there will be at least 1 bonus city and if there are none at all it crashes.

Re: points victory for scenarios

Posted: Mon May 13, 2019 6:29 am
by pavelk
dejvid2 wrote:
Sun May 12, 2019 8:40 pm
So the program expects there will be at least 1 bonus city and if there are none at all it crashes.
I cannot tell you why it was crashing before (you would need to send me that ag file) but I can say for sure that this is not the reason. There is no mandatory rule to have at least one bonus city in the victory points map.

Re: points victory for scenarios

Posted: Mon May 13, 2019 4:07 pm
by dejvid2
pavelk wrote:
Mon May 13, 2019 6:29 am
dejvid2 wrote:
Sun May 12, 2019 8:40 pm
So the program expects there will be at least 1 bonus city and if there are none at all it crashes.
I cannot tell you why it was crashing before (you would need to send me that ag file) but I can say for sure that this is not the reason. There is no mandatory rule to have at least one bonus city in the victory points map.
All I know is that simply adding a couple of cities solved the problem.