Page 1 of 1

Development Know How

Posted: 16 Jun 2017 19:12
by Tenebrae00
Hello, maybe im posting into wrong topic, if so i'm sorry for that and please move it into right one.

I would like to ask how to start with script coding in OTTD. i found on WIKI that there is needed NOGO gamescripting framework. Except those 4 rows of text i could not find anything more. https://wiki.openttd.org/Game_script#Wr ... ame_script
Can someone help me giving short introduction (for noobs) into game scripting know how and how to start simple write your first gamescript (i'm thinking about some automation on server like every month, year and so on) i see there is huge documentation for NOGO gamescript so i think later this will be my A & Z for scripting.

Anyway in short ... now i need to know how to write your gamescript, where to post it and best of all some example codes.

Thanks a lot for time anyone who read this and much more for those who reply !

Re: Development Know How

Posted: 16 Jun 2017 21:39
by kamnet
Here's the place to ask your questions and seek knowledge.
viewforum.php?f=65

Re: Development Know How

Posted: 17 Jun 2017 04:27
by Alberth
Tenebrae00 wrote:I would like to ask how to start with script coding in OTTD. i found on WIKI that there is needed NOGO gamescripting framework. Except those 4 rows of text i could not find anything more. https://wiki.openttd.org/Game_script#Wr ... ame_script
NoGo is a variation on NoAI, the scripting framework for making an AI.

The latter was first, and thus has a lot more information how to make them, so I'd suggest you start by making an AI, even if it doesn't actually build anything in the end, what a normal company would do.

NoGo and NoAI share
- The Squirrel scripting language
- Many of the NoAI / NoGo interface functions to the game
- How they are programmed (a loop where you wait for time or events, and then do something).

This basically means if you know how to program one, you also know how to do the other one.

The differences between NoGo and NoAI are
- NoAI is always a company, while NoGo is a Diety (and has the power to go into company mode)
- There is a lot more information about how to program a NoAI.

Re: Development Know How

Posted: 17 Jun 2017 07:53
by Tenebrae00
Thank you very much both of you ! this were information i was missing.

Re: Development Know How

Posted: 22 Jun 2017 16:19
by Zuu
In the forum section #65 linked above I have published a template for a gs (pinned thread). It is called minimal but it has som small opiniated additions related to how I usually structure my GS scripts.

This said, starting with AI and then working your way to GS is a good way to learn from ground up. There are a few articles on the wiki directed for AIs that are useful also when you write GSes.