Feature Request #6716

Enable custom commands

Added by Toetje583 over 6 years ago. Updated over 6 years ago.

Status:FeedbackStart date:2014-01-10
Priority:LowDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

First of all, a nice plugin even the controlls over irc are nice, ofcourse for now it has some lag of features.
Would be great to make it possible to add custom commands in .py format.

Some examples:

!calc "Tons of goods" "price of goods"
Simple calculator to see what a train would earn.
!tips "Random gameplay tips"

History

#1 Updated by taede over 6 years ago

  • Status changed from New to Feedback

Unfortunately the current incarnation of Soap does not lend itself to adding custom commands, this is something that will probably get addressed with Soap V2 (which is a long way away for now). As for the commands you are suggesting:

!calc <tons of goods> <price of goods>: The actual revenue depends on a lot of factors, eg actual avg speed of vehicle, how long vehicle takes to load/unload, and possibly more. As such the result of this command is not very useful.

!tips: sounds useful. link to url, or random hints read from a file? am assuming ingame and irc

#2 Updated by Toetje583 over 6 years ago

taede wrote:

Unfortunately the current incarnation of Soap does not lend itself to adding custom commands, this is something that will probably get addressed with Soap V2 (which is a long way away for now). As for the commands you are suggesting:

!calc <tons of goods> <price of goods>: The actual revenue depends on a lot of factors, eg actual avg speed of vehicle, how long vehicle takes to load/unload, and possibly more. As such the result of this command is not very useful.

!tips: sounds useful. link to url, or random hints read from a file? am assuming ingame and irc

!tips indeed would be great, i would say from a file or url ingame or on irc is fine. Also it would be nice to have a !help for public users to see commands they can use.
And ofcourse there are allot more ideas i would have.

Here are some commands:

!help : Shows commands public users can use.
!tips : Give helpfull feedback about OpenTTD.
!register: Register a account on the server, for me this would be usefull if i want to monitor player statics. "Is this possible?"

A other nice thing would be if Soap could send Player statics every 30 minuts to OpenTTD.

Toetje

#3 Updated by taede over 6 years ago

!tips I will implement at some point soonish, same with !help.

!register again is not really feasible in the current incarnation, as current codebase is too monolithic, it would be too hard to implement at this time. V2 will likely get a module for this, depends also on openttd's direction wrt to same.

#4 Updated by taede over 6 years ago

Just realized i didn't answer the statistics bit. I'm not planning on implementing that (at this time), however soap already generates logfiles containing almost everything happening ingame. It would be simple to add (optional) logging of companyinfo to a file.

you can then use these to generate statistics of companies and playersand do what you want with them (for instance, put em up as a webpage)

#5 Updated by Toetje583 over 6 years ago

Alright, what i will do is, i will write a Python script that can import stats into a MYSQL Database,It will take some time trough as i still miss some Python knowledge.
However this means that you could use it in future versions of Soap.:)

Also available in: Atom PDF