BULL: Mod Options

I agree with your decision to not expose it. Anyone who does need to use those two probably can expose it themselves anyway.
 
Shared options: Only player 0 will be able to change shared options in the BUG Options screen. While they will be grayed out for other players in MP games, they will see the up-to-date value and get an event message whenever it is changed.

EmperorFool has turned on Global Warming
EmperorFool has changed Global Warming Chance to 15​
This might just be an example that was only supposed to show what would be theoretically possible, still: game rules shouldn't be changable while a game is running at all, especially in MP, so Global Warming (Mod) controls should remain in the xml. Same goes for every other game rule changing options you are planning, in case there are any.

For prechop, a shared option would work, a player-specific one should be possible too though.

Also you keep saying "player 0", is it not at least theoretically possible that the host in a MP game doesn't take that first player slot, and that the player with the ID of 0 isn't even human?
 
This might just be an example that was only supposed to show what would be theoretically possible, still: game rules shouldn't be changable while a game is running at all, especially in MP, so Global Warming (Mod) controls should remain in the xml. Same goes for every other game rule changing options you are planning, in case there are any.

I leave it up to the modders to decide which rules should be fixed or changeable. One problem is that you cannot modify BUG options in the options screen without having a game running, so you'd have to start a game, set the options, exit to main menu, start your MP game.

By allowing these settings to be changed during the game it lets the host start an MP game and then set the options. I don't intend to make Global Warming a shared option in BULL, however.

For prechop, a shared option would work, a player-specific one should be possible too though.

Each player will have their own setting, and those settings will be synchronized across all PCs so that each PC knows every player's setting. Not all options will be synced like this--just the ones you define in CIV4ModOptionInfos.xml.

Also you keep saying "player 0", is it not at least theoretically possible that the host in a MP game doesn't take that first player slot, and that the player with the ID of 0 isn't even human?

I cannot find a way to find the host of an MP game. There is pbemHost and pitbossHost, but no normal MP host. So I figure if you set up a game where player 0 is an AI, tough petunias. Using player 0 allows the host to give shared-option-setting control to another player, or as you point out, to no one.

I'd rather avoid looping over all players to find the first human, but maybe I should to handle when player 0 drops out. It needs to be checked in two cases: first when setting the option to allow it and second when receiving a shared option value from the net to decide whether or not to tell BUG. The latter case is due to Civ4's message passing: you send a message to everyone including yourself.

Any ideas on a better way?
 
I believe if 3 people play and player 0 drops out, the AI takes over player 0 and 1 and 2 can still finish the game. In that sense there is no real "host", just an "initiator". So it makes sense that there is no way to check for a host. In which case looping might make sense again? Idk
 
Should everyone be able to change the shared settings or just the first human player? It really is up to the modders since BUG and BULL won't have any of these options. But I would rather pick one way and not make this tiny thing configurable. And no, I don't want to make a voting system. :p
 
Should everyone be able to change the shared settings or just the first human player? It really is up to the modders since BUG and BULL won't have any of these options. But I would rather pick one way and not make this tiny thing configurable. And no, I don't want to make a voting system. :p

Everyone I hope. And If you're using the settings to affect the AI directly... well, don't. :p
 
Everyone I hope.

Great, that's much easier for my part.

And If you're using the settings to affect the AI directly... well, don't. :p

I don't understand? BULL doesn't use any options for AIs. For example only humans will ever pre-chop. This doesn't stop a modder from adding an option without guarding it with and isHuman() check, however.
 
I don't understand? BULL doesn't use any options for AIs. For example only humans will ever pre-chop. This doesn't stop a modder from adding an option without guarding it with and isHuman() check, however.

My point is that these settings have a specific purpose, and directly affecting the AI's behavior isn't one of them, so it shouldn't be a worry or a consideration.
 
Question: How do I pick who sets the initial shared options when a game starts/loads?

If nothing else I'll go with the first human player.
 
Just give that player an option to give a different player the host abilities in the BUG Options Screen, so that if the wrong player is in control, the players can rectify the situation on their own.
 
We just agreed to allow any player to change the shared options for everyone. Everyone has control at any time. There is no picking one person to be in control.

When the a game starts/loads, each human's PC is going to tell the others "here are my settings for the shared options." Which player wins? This is the question.
 
Does it matter? Each setting is stored for each player in CvPlayer, so only the default values will be overwritten.
 
I'm talking about the shared options--not the per-player options. If one player has Global Warming turned on while the other players have it off, which setting gets used when starting a new game?
 
Oh yeah. The First Human Player (Player 0). Ignore everyone else.

However, there should still be an option for the host to cede host abilities to another player.
 
However, there should still be an option for the host to cede host abilities to another player.

The only special ability the host has is choosing whether or not to be the first human player. Once they do that, the rest is set. Anyone can change the shared options without being the host. So there's no point in ceding something you do not have.
 
The only special ability the host has is choosing whether or not to be the first human player. Once they do that, the rest is set. Anyone can change the shared options without being the host. So there's no point in ceding something you do not have.

Oh, I didn't realize that all players could change shared options. Is that such a wise idea?
 

I seem to be sending mixed signals...

Okay, my real, real opinion is that shared options should be controllable by the host, but you could have an option to make them controllable by all players...

It solves the issue of whose to load (either choice, whether all players control them, or just player 0, player 0 is always going to be correct). It also prevents... disputes between options.
 
There are some problems with the above.

1. There is no such thing as an MP host in LAN/INTERNET games.

2. Picking player 0 as the host is problematic: what happens when that player disconnects?

3. Picking the first human player is problematic: when they disconnect control shifts to another player (probably just fine); when another player joins and takes over a lower # slot they take control (probably not fine).

4. I really don't want to build a system of selecting the player in control. First, there's not really a big need for it. Second, it will take a lot of extra work. This has already turned out to be more than I was hoping.
 
Top Bottom