Problems with Game Script on dedicated server (FreeBSD)

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
rknetwork
Engineer
Engineer
Posts: 8
Joined: 31 Jan 2013 13:44

Problems with Game Script on dedicated server (FreeBSD)

Post by rknetwork »

Hello everyone,

Can't figure out why MinimalGS does not work on dedicated server on FreeBSD.

What I've done:
- Extracted Minimal GS.zip to /root/.openttd/game/mygs/
- Fetched SuperLib_for_NoGo-24.tar to /root/.openttd/content_download/game/library/
- Added to /root/.openttd/openttd.cfg:

Code: Select all

[game_scripts]
MinimalGS =
MinimalGS should greet new human players in a news line, but it does not. =)
No errors are posted within openttd.log (even when setting debug to 3)

Tried to do same on Windows (client mode with starting server manually) - works fine.
Tried to do same on Windows (server mode -D) - does not work.

How do I get it to work? =)

Thanks.
Last edited by rknetwork on 31 Jan 2013 15:22, edited 1 time in total.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Problems with Game Script on dedicated server (FreeBSD)

Post by planetmaker »

You should get a decent spanking for running an OpenTTD server as root.

Did you also get all required libraries? IIRC the "minimal GS" requires superlib.

What's the console output generated by ./openttd -D -d script=3 ?
rknetwork
Engineer
Engineer
Posts: 8
Joined: 31 Jan 2013 13:44

Re: Problems with Game Script on dedicated server (FreeBSD)

Post by rknetwork »

planetmaker wrote:You should get a decent spanking for running an OpenTTD server as root.
It's okay for testing.
planetmaker wrote:Did you also get all required libraries? IIRC the "minimal GS" requires superlib.
Yes I did (see original post).
planetmaker wrote:What's the console output generated by ./openttd -D -d script=3 ?
No errors in output (see original post).

If I remove superlib - debug shows that it's missing, which means that minimalgs compiles and runs, it just does not function. =)
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Problems with Game Script on dedicated server (FreeBSD)

Post by Zuu »

The greeting news that MinimalGS shows is created at the first tick of the game. This works for single player games when the player starts after the first call to sleep in the GS. In MP however the GS would need to listen for the event when a new company is created to great the funder of new companies. This code does not exist in MinimalGS IIRC.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Re: Problems with Game Script on dedicated server (FreeBSD)

Post by peter1138 »

rknetwork wrote:
planetmaker wrote:You should get a decent spanking for running an OpenTTD server as root.
It's okay for testing.
Why on earth would you need to test it as root?
He's like, some kind of OpenTTD developer.
rknetwork
Engineer
Engineer
Posts: 8
Joined: 31 Jan 2013 13:44

Re: Problems with Game Script on dedicated server (FreeBSD)

Post by rknetwork »

petern wrote:Why on earth would you need to test it as root?
To test under different user - I need to waste more time: create user, assign privileges, create new starting script, and some more... Why do I need it? There is no any reason I should do it.
rknetwork
Engineer
Engineer
Posts: 8
Joined: 31 Jan 2013 13:44

Re: Problems with Game Script on dedicated server (FreeBSD)

Post by rknetwork »

Zuu wrote:The greeting news that MinimalGS shows is created at the first tick of the game. This works for single player games when the player starts after the first call to sleep in the GS. In MP however the GS would need to listen for the event when a new company is created to great the funder of new companies. This code does not exist in MinimalGS IIRC.
Thanks, this helps a lot, I thought something was wrong with it. =))

IIRC sounds weird from you, since you are an author. =))
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: Problems with Game Script on dedicated server (FreeBSD)

Post by krinn »

rknetwork wrote:
petern wrote:Why on earth would you need to test it as root?
To test under different user - I need to waste more time: create user, assign privileges, create new starting script, and some more... Why do I need it? There is no any reason I should do it.
Since when looking at the code to make sure the application do what it is suppose to do, building it, and running it is faster than using it with a test user ?
Because if you didn't do that, you are just plain stupid. Botnet are made with servers handled this way.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 15 guests