bugBattle for Wesnoth - Bugs: bug #18829, ai sides show up as...

Show feedback again

bug #18829: ai sides show up as "controller=network" on remote clients

Submitted by:  Anonymissimus <anonymissimus>
Submitted on:  Thu Oct 20 18:23:53 2011  
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group:  None of the others
Status: FixedPrivacy: Public
Assigned to: Chris Beck <involution>Open/Closed: Closed
Release: trunk r51547 Operating System: win xp

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Thu Oct 9 01:20:20 2014, comment #3:

Marking as fixed and closing, this was released in 1.11.12.

Chris Beck <involution>
Project MemberIn charge of this item.
Mon Mar 17 13:26:39 2014, comment #2:

Proposed Fix is here:


Also see subsequent commits


which make other parts of the code base behave as well with "network_ai" as they do with "ai".

At this point, controller type "ai" should only be used in the level code for the start of a scenario. It should be translated, in play_campaign.cpp, into either "human_ai" or "network_ai", and whenever controller types change in scenario, the server will inform the clients either of "human_ai" or "network_ai".

Going forward if you see controller type "ai" at any point during an mp game, I consider that a bug, please report it.

Chris Beck <involution>
Project MemberIn charge of this item.
Sun Oct 23 12:49:53 2011, comment #1:

Grmbl. So here's a how-to-reproduce without debug mode. Insert the code below into a mp scenario (used Isars Cross), start a networked mp game with side1=human+host, side2=human+client, side3=ai set by host, and then save from the 2 human clients (naming the saves differently so they don't overwrite each other).
Open and look at the values of the variable "controller".

Anonymissimus <anonymissimus>
Project Member
Thu Oct 20 18:23:53 2011, original submission:

In a mp game on the server with 2 human players and 1 ai, for player 1's (human, host) BfW instance:
side[1].controller -> "human"
side[2].controller -> "network"
side[3].controller -> "ai"

But for player 2's (human but no host) BfW instance:
side[1].controller -> "network"
side[2].controller -> "human"
side[3].controller -> "network"

This can be reproduced by starting wesnoth with --debug and using the command line
lua wesnoth.message(wesnoth.sides[3].controller)
(and similar) since this code is then only executed on the client which types it.
I suppose that this is a bug since
-the enumeration CONTROLLER in team.hpp offers a value NETWORK_AI and it has references at many places in the codebase, all the other values of that enum are used.
-I remember some similar talk on irc.
So sides which are "ai" on the host should show up as "network_ai" on remote clients.
I remember this bug to exist for as long as I can think back.

Anonymissimus <anonymissimus>
Project Member


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by involution (Posted a comment)
  • -unavailable- added by anonymissimus (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Oct 9 01:20:20 2014involutionStatusReady For Test=>Fixed
    Mon Mar 17 13:26:39 2014involutionStatusNone=>Ready For Test
      Assigned toNone=>involution
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup