Page 1 of 1

Few minor patches from me

Posted: 11 Apr 2009 13:59
by Bilbo
I have put up few minor patches that I've put into openttd bugtracker, but I got no response from devs about them, so I put them here, so everybody can try them or use them.

Allow listing companies also outside network games - FS#2820
The command "companies" was previously available only to network servers. Since the command provides useful information also for network clients and when debugging AI's, I think it should be available also without networking. I am attaching a patch that allows that. Without networking (when playing locally), the list will say whether the company is controlled by AI (appending " AI" at end of line with companies) or not, instead of telling if it is protected/unprotected.

This allows using commands like stop_ai without having to leave console to look for the company numbers
console-companies-19627.patch
Allow using "companies" command also in singleplayer and as network client - version for trunk
(2.06 KiB) Downloaded 196 times
console-companies-0.7.1.patch
Allow using "companies" command also in singleplayer and as network client - version for 0.7.1
(2.09 KiB) Downloaded 211 times
Build when paused in scenario editor - FS#1521, Added to trunk in r21429
Since in scenario editor you can do basically whatever you want , it does not make sense to restrict your building while pause. This patch allow you building while paused in scenario editor. In-game the things are unchanged (build-while-paused available only as cheat)
build_while_pause_in_editor-19627.diff
Build while paused in editor
(914 Bytes) Downloaded 212 times
Edit: updated Build while paused and console companies patch to newer versions

Due to limit of max. 3 files per post, I am attaching link to next post in this thread containing further patches from me.

Next set of patches >>

Re: Few minor patches from me

Posted: 12 Apr 2009 09:52
by Timmaexx
FS#2821 is a really usefull and nice PATCH!
I love it much...

EDIT: Sorry! Thx

Re: Few minor patches from me

Posted: 12 Apr 2009 09:56
by Benny
What?..
FS#2821 is a patch that keeps console history cleaner as far as I understood, not a AI. :roll:

Re: Few minor patches from me

Posted: 12 Apr 2009 21:44
by Bilbo
I have fixed bug in console-history patch that caused crash when scrolling history while it was empty. See updated version in first post.

Re: Few minor patches from me

Posted: 14 Apr 2009 14:12
by Bilbo
<< Previous set of patches

Reload AI without deleting company - FS#2837
Patch that allows reloading AI without deleting the company in the process. Old reload_ai console command is renamed to restart_ai and new reload_ai command is added to allow this. If you specify extra parameters beyond company ID (name and settings opf new company) you can even load different AI instead of just reloading the old one - all that without deletion of any company property.

Note: the "Reload AI" button on AI debug console still works the old way - company is deleted and created from scratch. The true reload is currently only from console.
reload-ai-19627.patch
(3.3 KiB) Downloaded 148 times
reload-ai-16057.diff
(3.32 KiB) Downloaded 227 times
Console command to reconnect - FS#2843 (in trunk since r17466)
This patch adds console command to reconnect to last server (last_host and last_port in settings). Useful to quickly reconnect after network disconnection or alike ...
console-reconnect-16089.patch
(2.03 KiB) Downloaded 184 times
Edit: new version of reload AI patch

Re: Few minor patches from me

Posted: 14 Apr 2009 18:50
by SirkoZ
Nice patches, Bilbo - would you perhaps consider including an additional button (Reload_AI) also in the AI_debug console, and with that renaming the old button to Restart/Reset_AI as that would better describe the behaviour.

Re: Few minor patches from me

Posted: 16 Apr 2009 01:48
by Flavius
Hi Bilbo
Really like " Build while paused in Editor", thank you.
Does this mean its in the latest nightly?

Re: Few minor patches from me

Posted: 16 Apr 2009 06:28
by planetmaker
Rollo wrote:Hi Bilbo
Really like " Build while paused in Editor", thank you.
Does this mean its in the latest nightly?
It means that you can add it without much complication to the source code of the last nightlies

Re: Few minor patches from me

Posted: 16 Apr 2009 08:24
by Bilbo
Well, the build-when-pause-while-in-editor is simple two-line-changed patch, so ask openttd devs why it is not yet in trunk :)

I guess they either missed the patch or they don't have currently time to review it.

Re: Few minor patches from me

Posted: 19 Apr 2009 12:50
by Bilbo
I have updated console reconnect command (fixed company ID validation) and companies command (fixed possible crash when run as network client). Updated versions are posted in appropriate posts :)

Re: Few minor patches from me

Posted: 13 Jun 2009 17:29
by Bilbo
I have removed patch that fixed duplicate and empty commands to get in history, since this feature is already in trunk. I have updated the "companies" console command patch to newest trunk and also to lastest stable - 0.7.1. Get the files in the first post.

Re: Few minor patches from me

Posted: 07 Sep 2009 21:19
by petert
Bilbo wrote: Console command to reconnect - FS#2843
This patch adds console command to reconnect to last server (last_host and last_port in settings). Useful to quickly reconnect after network disconnection or alike ...
Edit: fixed company ID validation in console reconnect command
Congratulations. Console command to reconnect was added into trunk, r17466. We should see it in the next stable.

Re: Few minor patches from me

Posted: 07 Sep 2009 21:24
by Timmaexx
Very Nice, very useful!
Congrats too! Thank you very much for your Patches!

Re: Few minor patches from me

Posted: 14 Apr 2010 14:04
by Bilbo
I have updated all my patches in this thread to r19627. Get the updated versions in appropriate posts.

Re: Few minor patches from me

Posted: 24 Oct 2010 19:39
by joshua peli
Hi...I've got 1.0.4 OPEN TTD version for Windows...I've downloaded "console-companies-19627.patch". Is it the correct file to control companies in Single Player game??? If it's correct, how can I install it. Please, don't give me specialized links...I'm not so good with computers. Thx for help.

Re: Few minor patches from me

Posted: 24 Oct 2010 20:29
by Zuu
It doesn't sound correct to me.

1. It sounds like you want something else than this patch does

2. The patch file that you have downloaded does not work against 1.0.4

3. In order to use a patch file, you need to (re-)compile OpenTTD - a task that requires quite a bit of computer knowledge. If you have problem with opening links, then compiling is simply not possible for you.

Re: Few minor patches from me

Posted: 25 Oct 2010 17:05
by joshua peli
Ah...ok...anyway, thanks...;)