Sri, got my mind screwed a bit. So I changed from ignoring all extra cards to ignore cards with reference to countries that are not there. And inserting wildcards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Making a guess here ... I'm guessing that this issue is what causes me to acquire dozens of wildcards, particularly noticeable when playing Italian Rules on some maps. Currently, noticeably, ameroki - prior to last update, and after the one before that, also experienced on lotr and eurasien.
May I suggest:
- there are, what, normally only 2 or 3 wildcards 'per deck'?
- don't allow more than this number of wildcards.
- know the number of countries at the beginning of your routine.
- for the case where there are missing countries, allow sufficient number of mis-matched cards to make up the difference - perhaps with an even distribution of non-wildcard card type?
I'm throwing spaghetti here, hoping something sticks as making sense.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, you're right - I overlooked the error being generated, and just leapt to the unwarranted assumption that what I was seeing was caused by this. What I was thinking at the time was, in one sense, a card from an unmatched city is just like any other card to a city I don't occupy - useful only for whether it's infantry, cavalry, or cannon.
Arguably, a card for a city that doesn't exist is a bum (map) file that should go back to the originator for repair. Equally arguably, fixing the map file (if only temporarily, locally) is also valid. (Or play another map.)
What if, instead of futzing around with this this way - pick a valid city at random and slap that in? Is it actually wrong (if only from the sense of something else throwing off an exception) to have two cards for the same city?
I agree, none of this is perfection, but if we had perfection, the map file wouldn't be bum in the first place.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can't pick another city by random. Because assume you have 10 cities and 12 cards. And all cards are referencing cities (1-12) so 2 cards will fail (and thus generate the stacktrace...)
I think either discard those 2 cards, or add them as wildcars. (as wildcards are allowed as many you want..)
That's why I choosed that. Because that happens to me also sometimes during creating some maps. That I reference something wrong ;)
Two cards for the same city are not (should not) possible, haven't tried what the error is ;) , butI assume that the old card is overwritten.
And tnx for the discussion.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
you can not load cards that do not match a map as it will result in strange and unexpected behavior with the missions, as continents may be referenced that do not exist.
this patch as not been added to the game, and i recommend the solution to the problem, to make a cards file that actually works for a map if you wish to use the non-standard file, and not use files that are not meant for a map.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sri, got my mind screwed a bit. So I changed from ignoring all extra cards to ignore cards with reference to countries that are not there. And inserting wildcards.
Making a guess here ... I'm guessing that this issue is what causes me to acquire dozens of wildcards, particularly noticeable when playing Italian Rules on some maps. Currently, noticeably, ameroki - prior to last update, and after the one before that, also experienced on lotr and eurasien.
May I suggest:
- there are, what, normally only 2 or 3 wildcards 'per deck'?
- don't allow more than this number of wildcards.
- know the number of countries at the beginning of your routine.
- for the case where there are missing countries, allow sufficient number of mis-matched cards to make up the difference - perhaps with an even distribution of non-wildcard card type?
I'm throwing spaghetti here, hoping something sticks as making sense.
This is not yet implemented (as far as I know) .
But, the main problem here was a card that was referencing a city that doesn't exist will generate an error.
So better than that is either ignore the card or use a wildcard.
(In my point of view - wildcard - but thats a subject to discuss...)
Sorry, you're right - I overlooked the error being generated, and just leapt to the unwarranted assumption that what I was seeing was caused by this. What I was thinking at the time was, in one sense, a card from an unmatched city is just like any other card to a city I don't occupy - useful only for whether it's infantry, cavalry, or cannon.
Arguably, a card for a city that doesn't exist is a bum (map) file that should go back to the originator for repair. Equally arguably, fixing the map file (if only temporarily, locally) is also valid. (Or play another map.)
What if, instead of futzing around with this this way - pick a valid city at random and slap that in? Is it actually wrong (if only from the sense of something else throwing off an exception) to have two cards for the same city?
I agree, none of this is perfection, but if we had perfection, the map file wouldn't be bum in the first place.
You can't pick another city by random. Because assume you have 10 cities and 12 cards. And all cards are referencing cities (1-12) so 2 cards will fail (and thus generate the stacktrace...)
I think either discard those 2 cards, or add them as wildcars. (as wildcards are allowed as many you want..)
That's why I choosed that. Because that happens to me also sometimes during creating some maps. That I reference something wrong ;)
Two cards for the same city are not (should not) possible, haven't tried what the error is ;) , butI assume that the old card is overwritten.
And tnx for the discussion.
Anyone listening here?
So I mean, is any domination developer reading the tracker items?!
you can not load cards that do not match a map as it will result in strange and unexpected behavior with the missions, as continents may be referenced that do not exist.
this patch as not been added to the game, and i recommend the solution to the problem, to make a cards file that actually works for a map if you wish to use the non-standard file, and not use files that are not meant for a map.