[Patch] Watch Other Companies GUI
Moderator: OpenTTD Developers
[Patch] Watch Other Companies GUI
Hello,
Watch Company patch has been removed from here. You will able to find it else where.
Watch Company patch has been removed from here. You will able to find it else where.
Last edited by Muxy on 19 Sep 2010 15:17, edited 33 times in total.
Pourquoi faire simple quand on peut faire compliqué ?
KISS - Keep It Simple, Stupid.
Open TTD Goulp Web Service
OpenTTD Goulp Web Forum
KISS - Keep It Simple, Stupid.
Open TTD Goulp Web Service
OpenTTD Goulp Web Forum
Re: Patch: Console Watch Command
Based on the implementation you're looking at other companies. It could also work for AIs in single player.
Re: Patch: Console Watch Command
[..]
Last edited by Muxy on 19 Sep 2010 15:18, edited 1 time in total.
Pourquoi faire simple quand on peut faire compliqué ?
KISS - Keep It Simple, Stupid.
Open TTD Goulp Web Service
OpenTTD Goulp Web Forum
KISS - Keep It Simple, Stupid.
Open TTD Goulp Web Service
OpenTTD Goulp Web Forum
Re: Patch: Console Watch Command
opening a viewport may be more interesting.... then one could also watch multiple companies
Re: Patch: Console Watch Command
[..]
Last edited by Muxy on 19 Sep 2010 15:18, edited 1 time in total.
Pourquoi faire simple quand on peut faire compliqué ?
KISS - Keep It Simple, Stupid.
Open TTD Goulp Web Service
OpenTTD Goulp Web Forum
KISS - Keep It Simple, Stupid.
Open TTD Goulp Web Service
OpenTTD Goulp Web Forum
Re: Patch: Console Watch Command
might get a bit jumpy when 2 people are in one company and building like crazy!
Re: Patch: Console Watch Command
I have thought about this from time to time not in the form of a viewport but just "follow other company's viewing area" and it is nice to see the idea being discussed here.dihedral wrote:opening a viewport may be more interesting.... then one could also watch multiple companies
I wish you success on this endeavour, Muxy.

NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Re: Patch: Console Watch Command
Or in an OTTDcoop game.dihedral wrote:might get a bit jumpy when 2 people are in one company and building like crazy!
Re: Patch: Console Watch Command
then it might be better to also transmit the client id, and watch clients instead of companies!
Re: Patch: Console Watch Command
Really great patch, which could be used for servers, making enforcing the rules easy!
I would seriously reconsider the wording for some of the command help, etc. (Yes, I can tell English isn't your mother tongue), Like so: Binary:
I would seriously reconsider the wording for some of the command help, etc. (Yes, I can tell English isn't your mother tongue), Like so: Binary:
- Attachments
-
- watch_cmd_072_revised.zip
- Binary for revised language
- (3.95 MiB) Downloaded 404 times
Last edited by petert on 04 Oct 2009 21:59, edited 2 times in total.
Re: Patch: Console Watch Command
[..]
Last edited by Muxy on 19 Sep 2010 15:19, edited 1 time in total.
Pourquoi faire simple quand on peut faire compliqué ?
KISS - Keep It Simple, Stupid.
Open TTD Goulp Web Service
OpenTTD Goulp Web Forum
KISS - Keep It Simple, Stupid.
Open TTD Goulp Web Service
OpenTTD Goulp Web Forum
Re: Patch: Console Watch Command
You're very welcome, this is such a great tool, I hope it makes trunk. You should post on bugs.openttd.org as a patch.
-
- OpenTTD Developer
- Posts: 351
- Joined: 03 Oct 2006 18:26
- Location: Prague, Czech Republic
- Contact:
Re: Patch: Console Watch Command
I had a patch similiar to this one... Updated to current rev, maybe it will be helpful for you
(maybe won't...) Hope it still works.

- Attachments
-
- center_player_r17680.diff
- (7.48 KiB) Downloaded 496 times
Re: Patch: Console Watch Command
This is not possible - since when you just move viewport around, nothing is sent to server, only when you actually build something (and you can also use extra viewport windows to build things :). And AI's even don't have anything like viewport at all.SirkoZ wrote:but just "follow other company's viewing area" and it is nice to see the idea being discussed here.
Best you can do is center while something is built. Perhaps make it slightly configurable, like no re-centering if another thing built is still near centre of the viewport to reduce jumping.
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Re: Patch: Console Watch Command
Updated to 0.7.3:
Binary:
Re: Patch: Console Watch Command
I added the patch to my patchpack and when testing it, it seems that there is some bug - when I joined a server where I was alone, it seems that by default I am watched. When I tried "watch 0" to turn watching off, it said:
Unknown player. Player range is between 1 and 15. Use 0 to cancel watching
I think the problem arises from "uint8 _watched_player" -> the variable is unsigned 8bit int, therefore it is always >=0, therefore you are always watching someone.
When you compare the index (CompanyID is enum and basically it is also unsigned int) to -1 (in the condition to turn off the watching), it will always be false, since if you specify "watch 0", the index will probably have something like 255 at that point. So you can't turn the watching off ...
Also, by default you should not be watching anyone.
Unknown player. Player range is between 1 and 15. Use 0 to cancel watching
I think the problem arises from "uint8 _watched_player" -> the variable is unsigned 8bit int, therefore it is always >=0, therefore you are always watching someone.
When you compare the index (CompanyID is enum and basically it is also unsigned int) to -1 (in the condition to turn off the watching), it will always be false, since if you specify "watch 0", the index will probably have something like 255 at that point. So you can't turn the watching off ...
Also, by default you should not be watching anyone.
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Re: Patch: Console Watch Command
Ok, I am attaching the patch with these problems fixed. By default you don't watch anyone and watching can be stopped.
- Attachments
-
- watch_cmd_073_working.patch
- Working version for 0.7.3
- (3.13 KiB) Downloaded 501 times
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Re: Patch: Console Watch Command
[..]
Last edited by Muxy on 19 Sep 2010 15:19, edited 2 times in total.
Pourquoi faire simple quand on peut faire compliqué ?
KISS - Keep It Simple, Stupid.
Open TTD Goulp Web Service
OpenTTD Goulp Web Forum
KISS - Keep It Simple, Stupid.
Open TTD Goulp Web Service
OpenTTD Goulp Web Forum
Re: Patch: Console Watch Command
_current_company is a CompanyID, not a CompanyByte.
Who is online
Users browsing this forum: Semrush [Bot] and 7 guests