NoGo - A Scriptable Game Framework - v1.5

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

Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: NoGo - A Scriptable Game Framework - v1.5

Post by Yexo »

bokkie wrote:NICE!

Not too much of a surprise but somehow you were a bit careful yourself :)
Main reason for that was the time frame. 1.2.0-beta1 is not far off, and introducing a big feature like this after the first beta is not a good idea.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: NoGo - A Scriptable Game Framework - v1.4

Post by Eddi »

MinchinWeb wrote:As a thought exercise:
A reasonable expansion might be canals. Then the following functions would make the list. Again, maybe removals should be restricted to non-owned or town-owned canals.
  • GSMarine.BuildBuoy
    GSMarine.BuildLock
    GSMarine.BuildCanal
    GSMarine.RemoveBuoy
    GSMarine.RemoveLock
    GSMarine.RemoveCanal
I've never done it, but I think you can build 'canal bridges', and so the bridge functions should be opened up to canals as well.
i'd extend this to rivers as well, so a GS could make cut off rivers flood until they find a connection again.
Torrasque
Engineer
Engineer
Posts: 94
Joined: 19 Aug 2004 13:33
Contact:

Re: NoGo - A Scriptable Game Framework - v1.4

Post by Torrasque »

TrueBrain wrote: PS: I committed NoGo to trunk ;) 1.5 will be last custom build, tomorrow night you can just download the latest nightly.
Congratulation! Thanks for the hard work.
User avatar
MinchinWeb
Traffic Manager
Traffic Manager
Posts: 225
Joined: 01 Feb 2011 12:41
Contact:

Re: NoGo - A Scriptable Game Framework - v1.5

Post by MinchinWeb »

So I managed to break it again...
NoGo v1.5 x64 on Windows 7
Fullscreen capture 19122011 62450 PM.bmp.jpg
Fullscreen capture 19122011 62450 PM.bmp.jpg (37.6 KiB) Viewed 1914 times
Attachments
crash.dmp
(2.08 MiB) Downloaded 51 times
crash.log.txt
(11.24 KiB) Downloaded 63 times
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: NoGo - A Scriptable Game Framework - v1.5

Post by TrueBrain »

Do you have a minimal script that triggers this error? As it should be impossible (hence the NOT_REACHED :P).
The only thing necessary for the triumph of evil is for good men to do nothing.
Timmaexx
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 03 Jan 2009 17:55

Re: NoGo - A Scriptable Game Framework - v1.4

Post by Timmaexx »

Torrasque wrote:
TrueBrain wrote: PS: I committed NoGo to trunk ;) 1.5 will be last custom build, tomorrow night you can just download the latest nightly.
Congratulation! Thanks for the hard work.
From me too! That is really great!!!
User avatar
MinchinWeb
Traffic Manager
Traffic Manager
Posts: 225
Joined: 01 Feb 2011 12:41
Contact:

Re: NoGo - A Scriptable Game Framework - v1.5

Post by MinchinWeb »

TrueBrain wrote:Do you have a minimal script that triggers this error? As it should be impossible (hence the NOT_REACHED :P).
I'll have to add that to my accomplishments: The Impossible :P

As for a script, I don't have anything useful at this computer right now, and won't until tonight (i.e. 9 hours from now at the earliest). My code is all online at Google code, but the only place it tries to build a bridge, if memory serves, is here, where it 'builds' everything in test mode to determine the cost, and here where it builds everything for real.

P.S. There's no rescangame command available at the in-game console. Should one be added for consistency? (There's one for AI's and NewGRF's)
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: NoGo - A Scriptable Goal Framework

Post by Transportman »

TrueBrain wrote:
Transportman wrote:If I understand the changelog for r23310 correctly, it is now (partially) in trunk.
I am sorry, but it is not.

I did commit some updates for the TownGUI (it now shows a bit more information about what is going on), and also prepared it for a solution like NoGo (although it can also be used by anything else). And I added the long overdue ability for AIs to see if a town needs food or water (they couldn't so far).

As a nice side effect it did make my patch-queue a lot shorter, but there is no NoGo code yet in trunk.
Is it now (partially) in trunk, or am I just terrible at understanding changelogs?
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: NoGo - A Scriptable Game Framework - v1.4

Post by Lord Aro »

TrueBrain wrote:PS: I committed NoGo to trunk ;) 1.5 will be last custom build, tomorrow night you can just download the latest nightly.
It is ALL now in trunk :)
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: NoGo - A Scriptable Game Framework - v1.5

Post by 11Runner »

I love the new framework! :D

It would be nice if we could have a function to change the bank balance of a company (GSCompany.SetBankBalance, GSCompany.AddMoney, GSCompany.Remove Money, GSCompany.TransferMoney, etc.)
Image

SynTrans - A Synaptic Networking AI for OpenTTD
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: NoGo - A Scriptable Game Framework - v1.4

Post by Transportman »

Lord Aro wrote:
TrueBrain wrote:PS: I committed NoGo to trunk ;) 1.5 will be last custom build, tomorrow night you can just download the latest nightly.
It is ALL now in trunk :)
Apparently I am also terrible at reading this forum...

But great to see it in trunk already, now I can also use it with my running game if I want, without making it incompatible with trunk.

Just one question:
How many GameScripts can be active at once? If I look at the Settings screen, I get the feeling it is just 1.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: NoGo - A Scriptable Game Framework - v1.5

Post by TrueBrain »

Yes, only 1 GS per game.

MinchinWeb: do you have a small script for me that causes that NOT_REACHED?

Added rescangame for you, plugged a few holes. I suggest you all upgrade to upcoming nightly (20:00 CET).
11Runner wrote:(..)
It would be nice if we could have a function to change the bank balance of a company (GSCompany.SetBankBalance, GSCompany.AddMoney, GSCompany.Remove Money, GSCompany.TransferMoney, etc.)
Not going to happen for now. There is no real reason (except cheating) to have it, and would do more harm (confuse the player, annoy the player, ..) than good. Unless of course someone present a good use-case, but I haven't seen any yet ;)
The only thing necessary for the triumph of evil is for good men to do nothing.
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: NoGo - A Scriptable Game Framework - v1.5

Post by Arie- »

Could think of one reason why it "should" be there: tutorial game. And when a player finishes the tutorial, put the balance to a normal game start value.
Torrasque
Engineer
Engineer
Posts: 94
Joined: 19 Aug 2004 13:33
Contact:

Re: NoGo - A Scriptable Game Framework - v1.5

Post by Torrasque »

Arie- wrote:Could think of one reason why it "should" be there: tutorial game. And when a player finishes the tutorial, put the balance to a normal game start value.
Or you could apply a fine/rewards if an goal is or is not reached.
User avatar
MinchinWeb
Traffic Manager
Traffic Manager
Posts: 225
Joined: 01 Feb 2011 12:41
Contact:

Re: NoGo - A Scriptable Game Framework - v1.5

Post by MinchinWeb »

TrueBrain wrote:MinchinWeb: do you have a small script for me that causes that NOT_REACHED?
I was trying to isolate the problem last night, but didn't have much luck. I've attached the full script (with libraries) below. The bridge building function calls are in my MetaLibrary in Pathfinder.Road.nut at lines 638 and 718.
TrueBrain wrote:Added rescangame for you, plugged a few holes.
Thanks!
Attachments
WMDOT-GS-20111220.zip
WmDOT, GameScript Edition
(30.47 KiB) Downloaded 51 times
WmDOT-GS-Libraries-20111220.zip
Libraries for WmDOT, GameScript Edition
(164.42 KiB) Downloaded 55 times
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
fieari
Engineer
Engineer
Posts: 9
Joined: 01 Nov 2011 06:14

Re: NoGo - A Scriptable Game Framework - v1.5

Post by fieari »

Also imagine a script that detects if a player has money above a certain level, or even above a certain ratio compared to other players, and starts hitting them with random disasters-- including pure monetary penalties. It could show up in the newspaper that "[RANDOMNAME], a member of [TRANSPORT COMPANY NAME]'s board of trustees has been accused of embezzling. Before indictment, [RANDOMNAME] has fled the country with an estimated [LARGEAMOUNTOFMONEY]." Or something to that effect, anyway.

Tweaking with bank accounts could also create scenarios with constant resource drains every year. You could add taxes. It could implement infrastructure maintenance costs. It could supplement subsidies with bonuses for route completion. It could offer quest rewards.

I don't feel like the possibility for cheating is a good excuse for not allowing money tinkering. Presumably everyone on the server would be aware of the scenario, and there can be social ramifications to running a server which gives infinite money to player 1, while everyone else plays normally. But heck, I can even see where that might possibly be a fun server, if the person with unlimited funds was acting something like a "Game Master", modifying terrain and plopping industries/towns in response to certain criteria. Like a game script could do, but run manually by a person in real time. And if it turns out NOT to be fun, then that script could be set aside as worthless and no one would play it.

The only issue is making sure that all the players are on board with it, and understand what kind of scenario they are getting into before they start playing.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: NoGo - A Scriptable Game Framework - v1.5

Post by Zuu »

  • When executing "restart" in the console, the game script is not reloaded from disk. For AIs this happen when you restart the game from the console. Very useful for testing/debugging.
  • Would like to see AIGoalList so that there is a way to find Goals if you have lost the index to them.
Edit: It appears that after having went out to the menu and back again, I can reload my GS by using "restart". Maybe the problem I experienced was related to the fact that the new version of the script had syntax errors?
Last edited by Zuu on 21 Dec 2011 20:56, edited 1 time in total.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: NoGo - A Scriptable Game Framework - v1.5

Post by TrueBrain »

Zuu wrote:
  • When executing "restart" in the console, the game script is not reloaded from disk. For AIs this happen when you restart the game from the console. Very useful for testing/debugging.
  • Would like to see AIGoalList so that there is a way to find Goals if you have lost the index to them.
Second: good idea.
First: should happen ... odd; will check it out

And k k, good use-cases for money. It is still not that simple, as if you randomly remove money, you will be annoyed REALLY fast :) But we have some ideas .. will work it out a bit later ;)
The only thing necessary for the triumph of evil is for good men to do nothing.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: NoGo - A Scriptable Game Framework - v1.5

Post by Yexo »

Zuu wrote:
  • When executing "restart" in the console, the game script is not reloaded from disk. For AIs this happen when you restart the game from the console. Very useful for testing/debugging.
  • Would like to see AIGoalList so that there is a way to find Goals if you have lost the index to them.
For AIs you don't even need to restart the whole game. Just clicking "Reload" in the AI debug window will reload them from disk.
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: NoGo - A Scriptable Game Framework - v1.5

Post by Arie- »

With respect to the use case taxes I'd suggest something in addition to YAIM, taxrates growing more than lineair to the ammount of cash a company has.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 17 guests