I created an addon to the teacher list. The player can now tell how many he/she wants of each unit and the colony will deliver those without showing the popup window, which lets the player decide.
Whenever a student gratuates, the colony will pick a random ordered unit and deliver that one as well as decreasing the counter. The randomness is based on the number of units requested, meaning if it is set to 3 farmers and 1 fisherman, then there will be 75% chance that the first is a farmer.
Units are ignored if the player can't afford them. The setting of the expensive unit is preserved and will trigger later if the player gets more gold.
The popup window will appear if the player can't train any of the ordered units (like no gold or no ordered units)
I came up with the idea of having "repeatable" units while writing this. Basically speaking when a unit is trained an no more units are set to be trained, then it will order a unit of each of those set to repeat. This should ensure an equal number of units of each of those set to repeat as just fixing it at 1 could randomly ignore one of them and there is no memory of what was picked last time.
Being a brand new idea I haven't coded anything on repeat yet except for the non-functioning checkbox.
I have a problem with the layout though. The window is too small for all the stuff I want to write
This is why I'm asking for feedback on the screenshots. Are they readable? Is it possible to understand what is attempted to be told the player?
Also any other feedback is welcome.
What are the consequences? I'm only experienced in graphic modding.
Say we have player A and B.
A sets his full custom house to sell everything. His computer will sell at next new turn while B will not. A will have more gold than he appears to have on B.
A uses the money to buy a new ship. B rejects it because he just bought something he couldn't afford. The number of units is no longer the same in both games.
I'm not sure when it will detect a desync, but it will. Potiential triggers would be different goods in colony, different gold and different units. Most likely it will desync before even buying the ship.
EDIT: forgot to tell what happens when using sendDoTask()
A sets his full custom house to sell everything
sendDoTask sends that info to B and B will know what A wants to sell
Next turn both A and B sells from the custom house and the two computers agree on gold and stored goods
RaR has not been created for MP and I think it is only playable in SP (but Ray must confirm this).
That's silly. Getting it to work in multiplayer doesn't appear to be much work. Sure there will likely be other desyncs, but it's only around 360 revisions to check and we can discard a whole lot of them quickly as being unrelated to potiential desyncs.
Generally speaking data should be transmitted if it exist on one computer only and that data is something which affects savegames. This is only user input or (in rare cases) some code which only executes if player is the local human player (I think I have only seen such checks in vanilla code).