Patch: Vehicle+town+industry console commands v20 for r19627

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
benc
Engineer
Engineer
Posts: 62
Joined: 30 Apr 2007 01:57

Post by benc »

Bilbo wrote:BTW how do you make the console maximized?
Ctrl-Enter when the console is open. One of OpenTTD's many handy-but-undocumented features. :)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Post by Bilbo »

benc wrote:
Bilbo wrote:BTW how do you make the console maximized?
Ctrl-Enter when the console is open. One of OpenTTD's many handy-but-undocumented features. :)
Nice :)

And now it is documented on openttd wiki - http://wiki.openttd.org/index.php/Hotkeys :)

Well, if you know of any other "undocumented" keys, you can add them on that wiki page :)
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)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Post by Bilbo »

benc wrote:
Bilbo wrote:Usage: 'train <command> <identifier>'
For me, 'train <identifier> <command>' seems more natural. Either one works though.
Well, due to some commands having also parameters, I decided to swap it, so now it is 'train <identifier> <command> [<eventual parameters..>]'. So version 7 is out, check the changelog on top of thread :)
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)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Train (planes,ship...) console commands v8 for r10532

Post by Bilbo »

So version 9 is out. It should be probably mergeable in trunk, as the code style should be clean, however I plan to write wagon replacement functions and permorem more thorought testing before attempting to submit it at flyspray for final review ...

Then .. maybe it'll end in trunk, if devs would like this ....

Since the design allows to add new commands or new types of matches easily, anybody then would be able to write patches to add some extra functionality to these commands.
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)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Train (planes,ship...) console commands v9 for r10575

Post by Bilbo »

Version 10 is out.

Also, the manual at http://wiki.openttd.org/index.php/Vehic ... e_commands is now complete.

Reading it can be more comfortable than reading the integrated command help, as unlike the help, the manual is nicely formatted and won't scroll away when using console :)

Edit: Version 11 is out and I think is is stable enough to be candidate for getting into trunk. So I've submitted it to FS (FS#1060)
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)
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 306
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: Patch: Vehicles console commands v11 for r10634

Post by ColdIce »

Is there a command for trains that can change the Full Load task? If all my trains have the full load task and i want to change it to normal, can I do that with a command or something else?
The rest is confetti!
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Vehicles console commands v11 for r10634

Post by Bilbo »

Currently the only command for manipulating the orders is the "skip" command. But I can add some more manipulations to the vehicle orders to the next release, like toggling nonstop, transfer and full load and perhaps some search and replace with orders.
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)
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 306
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: Patch: Vehicles console commands v11 for r10634

Post by ColdIce »

also you can add a command for adding or removing vagons from trains. :lol:
The rest is confetti!
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Vehicles console commands v11 for r11631

Post by Bilbo »

I have updated this patch for trunk r11631 (some things have changed since r10634 requiring few changes in the patch). Updated patch is available as attachment in this thread's first post.
No new features were added this time.
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)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Vehicles console commands v11 for r11631

Post by Bilbo »

I have updated the patch for trunk r11832. Updated patch is available as attachment in this thread's first post.
Compilation with MSVC is fixed as per Chris's advice. (I don't have MSVC, so I actually have not tested that fix)
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)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Vehicles console commands v11 for r11631

Post by Bilbo »

I have updated the patch for trunk r11910. Updated patch is available as attachment in this thread's first post.
Vehicle cloning now accepts parameter (how many clones to make) . If not specified, only one clone is created (as in older versions)
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)
User avatar
Vaulter
Traffic Manager
Traffic Manager
Posts: 185
Joined: 21 Dec 2004 05:35
Skype: andrey-zaharov
Location: St. Petersburg, Russia
Contact:

Re: Patch: Vehicles console commands v13 for r11910

Post by Vaulter »

Patch is interesting, besides i not a long time ago have a dream :) to scriptilize some offen behavior:
to skip station when industry of it doesn't accept some cargo yet :) it will be great, that, at example, train with GLASS route itself to station that more needed GLASS (skipping other that do not accept it )....
thank you - your patch bring me closer to my dream :)
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Patch: Vehicles console commands v13 for r11910

Post by Aali »

Vaulter wrote:Patch is interesting, besides i not a long time ago have a dream :) to scriptilize some offen behavior:
to skip station when industry of it doesn't accept some cargo yet :) it will be great, that, at example, train with GLASS route itself to station that more needed GLASS (skipping other that do not accept it )....
thank you - your patch bring me closer to my dream :)
you can do that already with the more conditional orders patch
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Patch: Vehicles console commands v13 for r11910

Post by Gremnon »

And that was enough to necropost, and bump this old thread back up?
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Patch: Vehicles console commands v13 for r11910

Post by Aali »

nope, I'm also going to update this patch to the latest revision, if you just bear with me for a while :P

:EDIT:

As promised, here's a version of this patch that applies to r14565, no other changes whatsoever.

:EDIT2:

Oops, copy&paste error messed up groups in the GUI, all fixed now.
Attachments
train-console-v13-14565.patch
(36.6 KiB) Downloaded 145 times
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Patch: Vehicles console commands v13 for r11910

Post by Aali »

Updated to r15416, fixed a possible desync problem, no change in functionality.
Attachments
vehicle_console_r15416.patch
(36.72 KiB) Downloaded 179 times
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Vehicles console commands v14 for r15892

Post by Bilbo »

I have updated the patch and added two new features.

Changes in v14:

Fixed desync with skip to random orders (thanks to Aali)
added 'broken' match to match broken down vehicles
added match for breakdowns since last service

Download the updated patch in the first post.
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)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Vehicles console commands v15 for r15892

Post by Bilbo »

I have posted fixed version of console commands patch:

fixed bug with depot and service:
using them on vehicle that was already going to depot/service cancelled the order instead
added 'undepot' and 'unservice' commands for cancelling depot and service commands

Also, when I discovered the depot/service bugs, I discovered that NoAI API code contain the same bug ... so I reported it as FS#2801 :)

Get new version of patch in first post of the thread.

Also, I am considering enhancing the patch also to town and industry commands.

Some ideas to use are:

Towns: match by name, population, rating, house count, you or one of competitors having exclusive rights, presence of your statue in town, maximal/remaining noiselevel, number of your stations near town, minimal rating of your station in town

Actions: center view, open window, open town authority window, list in console, do any of town actions (advertising campaign, etc ...), plant up to N trees near town on squares where it will have effect on your rating, and in scenario editor: rename, delete, expand.

Looking for town to place for your intercontinental airport?
town noise_remaining>=25 list
Want to buy exclusive rights back everywhere?
town others_exclusive buy_exclusive
Run large ad campaign in all towns where you have stations?
town stations>0 large_ad

etc ... :)

Industries: Match by type, city, production, percent of cargo transported, number of stations that take cargo from it.

Actions: change/increase/decrease/multiply/randomize production (only if particular cheat enabled or in scenario editor), bulldoze (scenario editor only), center view, show window

So, any oppinion on newly planned town and industry commands or ideas for command to add to planned list?
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)
Xanobia
Engineer
Engineer
Posts: 9
Joined: 30 Mar 2009 23:16

Re: Patch: Vehicles console commands v15 for r15892

Post by Xanobia »

Nice patch - just patched my 0.7.0 with it seems to work just fine thanks

one question is there a way to combine identifiers?

like show all aircrafts from group this that are broken?
It is here
audigex
Tycoon
Tycoon
Posts: 2010
Joined: 09 Dec 2007 21:28
Contact:

Re: Patch: Vehicles console commands v15 for r15892

Post by audigex »

Any chance of re-name and add-to-/remove-from-group options?
Jon
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 28 guests