When you have multiple factories that can affect each other, how are factories executed?
Specifically - Are factories triggered (i.e. current player owns all continent members) & applied in a single pass, factory by factory?
Or do you do a pass to see which factories trigger, and then a second pass to apply those factories?
Also, I've heard factories trigger in 'alphabetical' order. What exactly does that mean for symbols and case differences? Is it in ASCII order?
Ozyman wrote:When you have multiple factories that can affect each other, how are factories executed?
Specifically - Are factories triggered (i.e. current player owns all continent members) & applied in a single pass, factory by factory?
Or do you do a pass to see which factories trigger, and then a second pass to apply those factories?
I believe it's the former, unless by the latter you mean a first pass to determine alpha/num order.
Also, I've heard factories trigger in 'alphabetical' order. What exactly does that mean for symbols and case differences? Is it in ASCII order?
Good question, I'd be curious to know.
Ok. I guess I should just test this out. I'll post back here once I get a chance to test it.
I believe the "alphabetical" order is the same as the order they are listed in the pull-down menu of the designer. i.e. continents --> edit -->Continent Name
At least looking at Gunslinger factories that start with a space go before those that don't.
> I believe the "alphabetical" order is the same as the order they are listed in the pull-down menu of the designer. i.e. continents --> edit -->Continent Name
It certainly could be. Spaces first would also be evidence for standard ASCII order:
I believe my original assumption about a two-pass system is correct. Here is the test board/game if anyone would like to check and make sure I didn't mess something up:
Yes, it's a two pass system - this was done to prevent infinite loops being generated (e.g. if Factory A triggers Factory B which in turn triggers Factory A).
I'm starting to dip my foot in the Factories water and I was wondering about the ordering thing, is it simply alphabetical or is there more to it? Currently in a quick test it seems not just the same order as the ABC (or the order in the Edit Continents menu)...but I could be missing something or just unsure.
I imagine it is case sensitive. If all your continents use the same case, I think you should be ok. If not, maybe post a link here to take a look at.
It's done by a mySQL ORDER BY on the factory name field - it is case sensitive.
tom wrote:It's done by a mySQL ORDER BY on the factory name field - it is case sensitive.
mysql documentation says ORDER BY is insensitive by default:
On character type columns, sorting—like all other comparison operations—is normally performed in a case-insensitive fashion. This means that the order is undefined for columns that are identical except for their case. You can force a case-sensitive sort for a column by using
BINARY
like so:ORDER BY BINARY
.col_name
http://dev.mysql.com/doc/refman/5.6/en/sorting-rows.html
I'm far from an expert in this area, but just wanted to bring that up.
Ah - you could be right, for some reason I had it in my head that it was case sensitive, thanks!
Is there a way to make it random? No alpha.. just random?
Ozyman wrote:I imagine it is case sensitive. If all your continents use the same case, I think you should be ok. If not, maybe post a link here to take a look at.
After a quick retest that worked as described in this thread, I'll call it user error on my part or that a Dev game doesn't pick up Factory updates too well (possibly even with a Restart?).
M57 wrote:Is there a way to make it random? No alpha.. just random?
It would have to be another rule setting.
tom wrote:M57 wrote:Is there a way to make it random? No alpha.. just random?
It would have to be another rule setting.
It would be nice.. I have factories in the simulgear version of Go-Geared that I believe would be best-off being allocated randomly.
.but just to be sure..
Say in a Simulgear game, player A and B have two different continents, both of which have a corresponding auto-capturing factory.
The factory assigned to player A's continent is one of the territories in B's continent - while the factory assigned to B's continent is one of the territories in A's continent. Clear as mud?
Here's a visual.. Imagine territory ABC auto-captures Y, while territory XYZ auto-captures B.
A Y C
X B Z
In a simulgear game, is the order of capture determined by the names of the factories, or the order of the players for that turn? If the latter, then it's no big deal. But if it's the former, then random allocation of factories would be best, because otherwise players will prefer to attack factories that come first.
Yes, the order of capture will be determined by the factory name. But it is a two pass system so first it runs through to see which continents the player owns, then it builds a list of auto-capture factories.
The auto-captures are then run through in a second loop. So only one auto-capture will fire depending on which territories are owned at the point of the first loop run through.
I can see that alpha would be required for some boards, especially those of the Nygma variety that rely on order for factories to function, but it seems to me a random option is just as important for Simulgear boards where overlap is possible. Otherwise players can "game" the board by preferring specific territory combinations to achieve the same factory-driven goals.
Tom, if you don't see this as a possible option (for whatever reason), please let me know, I'll probably just promote the board as is ..with a disclaimer that I would really like to avoid having to include.
Of course, the way you would implement it will be on a continent by continent basis. I.e., the designer will offer AutoCapture (ASCII), AutoCapture (Random), etc., but I would propose an additional pulldown menu in the Rules page of the designer on the Gameplay tab:
Globally preset factory type:
Standard (default)
AutoCapture: ASCII
AutoCapture: Random
Universal
Universal-N
It's a pain to have to set those factory types manually - and for those of us who are not great at editing xml files or who mix types, being able to select a default would be a huge help.
Additional Thoughts:
For boards where there are both ASCII and Random factories, it would probably be necessary to designate one type as dominant (or going first) over the other.. I don't really have preference there, but if anyone can think of a reason that ASCII shouldn't fire first, I'd say that's probably as good as any.
and while I'm considering flies in the ointment, is there any reason that other factory types might also need Random/ASCII distinctions? Standard? Universal?
It's probably a outlier in terms of getting this done - I can see how it could be useful but it's a fairly large and complex bit of code to rewrite, definitely not in the quick fix / add category., sorry!