Opened 8 years ago

Closed 8 years ago

Last modified 4 years ago

#3911 closed enhancement (fixed)

[PATCH] Make AI Settings visible to players

Reported by: Imarok Owned by: Imarok
Priority: Nice to Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

It would be nice if players in the multiplayer gamesetup can see the AI settings but not modify them (as it is made with "More Options")

Attachments (3)

visible_ai_setting.patch (4.3 KB ) - added by Imarok 8 years ago.
Makes AI settings visible to all players but only let the controller change them
visible_ai_setting_v1.1.patch (4.7 KB ) - added by Imarok 8 years ago.
cleanup
visible_ai_setting_v2.patch (6.4 KB ) - added by elexis 8 years ago.
Update the window when settings were changed.

Download all attachments as: .zip

Change History (11)

by Imarok, 8 years ago

Attachment: visible_ai_setting.patch added

Makes AI settings visible to all players but only let the controller change them

comment:1 by Imarok, 8 years ago

Keywords: review patch added
Milestone: BacklogAlpha 21
Summary: Make AI Settings visible to players[PATCH] Make AI Settings visible to players

comment:2 by elexis, 8 years ago

Keywords: gamesetup removed
Type: defectenhancement
  • if( should be if (
  • Introduce variables for the new GUI Objects
  • Set all attributes of a GUI object in the same place
  • It would be nice if the AIconfig page automatically updates if the host changed settings, don't know if it's easily possible (reopening the window?).

by Imarok, 8 years ago

cleanup

comment:3 by Imarok, 8 years ago

The automatic update seems to be very much work, so I'll don't make it as it is not that important.

in reply to:  3 ; comment:4 by elexis, 8 years ago

Replying to Imarok:

The automatic update seems to be very much work, so I'll don't make it as it is not that important.

Excuses ;) Not much work at all, see attached patch. You just need a new global in the gamesetup which recalls if you just opened that dialog. If that's the case and new gamesettings arrived, close and reopen the dialog. I couldn't notice the reopening visually. When the dialog is closed, the variable has to be reset, that's all. This way passing the data is a bit cleaner too:

  • no derivation of g_IsController from the callback argument
  • no new if in returnAI() and g_IsController doesn't need to be global

The comment // required by the callback function won't be needed anymore, as it's kinda trivial.

So please review my patch, try to prove that it's broken and in case it is not, I'll commit it and you still get the credit for writing the base of the patch.

by elexis, 8 years ago

Attachment: visible_ai_setting_v2.patch added

Update the window when settings were changed.

in reply to:  4 comment:5 by Imarok, 8 years ago

Replying to elexis:

Replying to Imarok: you still get the credit for writing the base of the patch.

That isn't that important :D My main goal is to improve the game and not to appear in credits ;) (I'll review it today)

comment:6 by Imarok, 8 years ago

Keywords: review removed

comment:7 by elexis, 8 years ago

Resolution: fixed
Status: newclosed

In 18078:

Reveal AI settings in the gamesetup to all players. Based on patch by Imarok, fixes #3911.

comment:8 by elexis, 4 years ago

In 23341:

Fix aiconfig dialog errors in multiplayer mode following rP18078, refs #3911 when reducing playercount and following rP22676/D1684 when unassigning the AI, reported by smiley and Freagarach.

Differential Revision: https://code.wildfiregames.com/D2538

Note: See TracTickets for help on using tickets.