Use GS to place towns and edit land

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
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7238
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Use GS to place towns and edit land

Post by Redirect Left »

hi

So what i'm thinking of trying to do, but i'm 99% sure I can't do it for technical reasons, is trying to build a gamescript that dynamically generates a map. Think of a gamescript that can edit the landscape, and place towns every X years after it's happy you've done a good job of adding the last town to your network with sufficient links to each other town.

So basically, I'm looking at trying to do is start with a blank flat map, two towns, and the script will randomly add more towns and edit the landscape as it builds outwards, giving a somewhat different game each time.

Is any part of this feasible with the current state of game scripts? If not, is it something that is easy to do? ie; adding parts of the 'land generator' code to a GS, or a hook into it or similar.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Use GS to place towns and edit land

Post by PikkaBird »

As far as I can tell, all of what you've described is possible with NoGo as it currently stands.
agentw4b
Traffic Manager
Traffic Manager
Posts: 216
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re: Use GS to place towns and edit land

Post by agentw4b »

Redirect Left wrote:hi

So what i'm thinking of trying to do, but i'm 99% sure I can't do it for technical reasons, is trying to build a gamescript that dynamically generates a map. Think of a gamescript that can edit the landscape, and place towns every X years after it's happy you've done a good job of adding the last town to your network with sufficient links to each other town.

So basically, I'm looking at trying to do is start with a blank flat map, two towns, and the script will randomly add more towns and edit the landscape as it builds outwards, giving a somewhat different game each time.

Is any part of this feasible with the current state of game scripts? If not, is it something that is easy to do? ie; adding parts of the 'land generator' code to a GS, or a hook into it or similar.
City Founder Game Script : viewtopic.php?f=65&t=82795

I created it on March 12, 2018
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7238
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Use GS to place towns and edit land

Post by Redirect Left »

agentw4b wrote: City Founder Game Script : viewtopic.php?f=65&t=82795
Ah nice. I'll see if that does what I want already, and if not. See if the licence allows me to edit it to what i'm desiring.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
agentw4b
Traffic Manager
Traffic Manager
Posts: 216
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re: Use GS to place towns and edit land

Post by agentw4b »

Redirect Left wrote:
agentw4b wrote: City Founder Game Script : viewtopic.php?f=65&t=82795
Ah nice. I'll see if that does what I want already, and if not. See if the licence allows me to edit it to what i'm desiring.

GPL 2
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
agentw4b
Traffic Manager
Traffic Manager
Posts: 216
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re: Use GS to place towns and edit land

Post by agentw4b »

The author of the script is I, the city bases it only on time setting, not as a result of city prosperity or actions from the player. But if you want to improve it or have ideas to improve it, you can.
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: thesasgeek and 9 guests