NoGo - A Scriptable Game Framework - v1.5
Moderator: OpenTTD Developers
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: NoGo - A Scriptable Game Framework
Would it be possible to add a list of the GameScirpts loaded, similar to the AI's, on the "Command Line Help" screen?
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
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
Re: NoGo - A Scriptable Game Framework
TrueBrain, is it possible to make a scrip that influences the game in such a way that it sends emergency vehicles from a grf to a vehicle crash site i.e.?
Re: NoGo - A Scriptable Game Framework
Although I like the idea somewhat, I see no way to technical implement something like that. Someone will have to come up with something nifty for that .. unsure atmHyronymus wrote:TrueBrain, is it possible to make a scrip that influences the game in such a way that it sends emergency vehicles from a grf to a vehicle crash site i.e.?


The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework
Where lies the problem exactly then, just out of curiousityTrueBrain wrote:Although I like the idea somewhat, I see no way to technical implement something like that. Someone will have to come up with something nifty for that .. unsure atmHyronymus wrote:TrueBrain, is it possible to make a scrip that influences the game in such a way that it sends emergency vehicles from a grf to a vehicle crash site i.e.?So I guess the answer is: no

-
- Tycoon
- Posts: 2792
- Joined: 22 Feb 2011 18:34
Re: NoGo - A Scriptable Game Framework
My suggestion for an implementation:TrueBrain wrote:Although I like the idea somewhat, I see no way to technical implement something like that. Someone will have to come up with something nifty for that .. unsure atmHyronymus wrote:TrueBrain, is it possible to make a scrip that influences the game in such a way that it sends emergency vehicles from a grf to a vehicle crash site i.e.?So I guess the answer is: no
A script should detect where a crash happened, build a bus station near it and send vehicles from a depot to that bus station and after a set amount of time return to the depot/have their order removed to keep them driving around in towns.
So, the only thing that is really needed in this case is a way to detect where the crash happened. The rest is already possible I think (building stuff and give orders are things AI's already can do).
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: NoGo - A Scriptable Game Framework
You cannot order a vehicle to go to a tile is the biggest issue I guessHyronymus wrote:Where lies the problem exactly then, just out of curiousityTrueBrain wrote:Although I like the idea somewhat, I see no way to technical implement something like that. Someone will have to come up with something nifty for that .. unsure atmHyronymus wrote:TrueBrain, is it possible to make a scrip that influences the game in such a way that it sends emergency vehicles from a grf to a vehicle crash site i.e.?So I guess the answer is: no
?


The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework
There is an event for crashed vehicles. CluelessPlus for example listen to this event and tries to turn level crossings into bridges if its buses/trucks get hit by a train.Transportman wrote:So, the only thing that is really needed in this case is a way to detect where the crash happened. The rest is already possible I think (building stuff and give orders are things AI's already can do).
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: NoGo - A Scriptable Game Framework
Bit of general progress report. I have been fiddling a lot with translations. The Squirrel side is now as good as done. The OpenTTD side is a pita. Unsure about any ETA in those regards.
I also added tons of fun stuff.
- Create Subsidy
- Create News
- Create custom town text
- Scroll (in singleplayer) the user screen to a certain position
It is all getting together slowly
I hope to push a new version soon with all these goodies in there, but for now I am working on translations ...
I also added tons of fun stuff.
- Create Subsidy
- Create News
- Create custom town text
- Scroll (in singleplayer) the user screen to a certain position
It is all getting together slowly

The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework
Are there people who would be interested to help out writing text for a tutorial, if a framework is built in NoGo? Assuming this tutorial will be more of a kind where the user will have to do what the tutorial says that he/she should do.
I hope NoGo will get a way that we can highlight buttons in the interface. We recently also got the ability to move the viewport. So it should be doable. While the AI tutorial did build road etc., it uses libraries that are not yet available for NoGo, and it might make more sense that the player should build himself with the help of which buttons etc. to use.
Edit: In a early test I have something like this:
but I hope to improve this to make it fairly easy to add tutorial steps and configure how a step ends and possible allow for non-linear patterns.
I hope NoGo will get a way that we can highlight buttons in the interface. We recently also got the ability to move the viewport. So it should be doable. While the AI tutorial did build road etc., it uses libraries that are not yet available for NoGo, and it might make more sense that the player should build himself with the help of which buttons etc. to use.
Edit: In a early test I have something like this:
Code: Select all
this._chapter_sequence = [];
this._chapter_sequence.append( MessageStep("Hello and welcome to the bus tutorial") );
this._chapter_sequence.append( MessageStep("Thanks for taking this tutorial") );
this._chapter_sequence[0]._next = this._chapter_sequence[1];
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: NoGo - A Scriptable Game Framework
Unfortunately AIs are restricted to info about their own vehicles ("Event Vehicle Crash, indicating a vehicle of yours is crashed" - http://noai.openttd.org/api/trunk/class ... ashed.html ).Zuu wrote:There is an event for crashed vehicles. CluelessPlus for example listen to this event and tries to turn level crossings into bridges if its buses/trucks get hit by a train.Transportman wrote:So, the only thing that is really needed in this case is a way to detect where the crash happened. The rest is already possible I think (building stuff and give orders are things AI's already can do).
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: NoGo - A Scriptable Game Framework
But we are talking about GS here, which do receive the notifications of all companies. So his idea is valid and works for that situation.Kogut wrote:Unfortunately AIs are restricted to info about their own vehicles ("Event Vehicle Crash, indicating a vehicle of yours is crashed" - http://noai.openttd.org/api/trunk/class ... ashed.html ).Zuu wrote:There is an event for crashed vehicles. CluelessPlus for example listen to this event and tries to turn level crossings into bridges if its buses/trucks get hit by a train.Transportman wrote:So, the only thing that is really needed in this case is a way to detect where the crash happened. The rest is already possible I think (building stuff and give orders are things AI's already can do).
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework
I am pushing a new version as we speak. It contains everything except the translation part (as that isn't done yet). It contains all the new goodies mentioned a few posts above here. Please test/try/abuse/give feedback, all much appreciated 
One noticeable bug was fixed: funding towns is no longer funding infinite months, in case the GS is controlling the growth
Tnx to Xaroth for noticing and reporting.
This new version bumps the savegame, so don't expect your savegame to be loadable by the next version of NoGo (and it is incompatible with trunk). So don't start a long running game with this, unless you want to finish it with this build
Just a piece of warning there 
I also updated my initial post to indicate roughly what NoGo can already do.
(PS: the docs are also updated at http://devs.openttd.org/~truebrain/nogo ... tated.html , in case you want to browse around all the goodies available to you.)

One noticeable bug was fixed: funding towns is no longer funding infinite months, in case the GS is controlling the growth

This new version bumps the savegame, so don't expect your savegame to be loadable by the next version of NoGo (and it is incompatible with trunk). So don't start a long running game with this, unless you want to finish it with this build


I also updated my initial post to indicate roughly what NoGo can already do.
(PS: the docs are also updated at http://devs.openttd.org/~truebrain/nogo ... tated.html , in case you want to browse around all the goodies available to you.)
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework
And why does it have to build such a depot if you can provide such depots by default if you let cities build fire and police departments, as well as hospitals?Transportman wrote:My suggestion for an implementation:TrueBrain wrote:Although I like the idea somewhat, I see no way to technical implement something like that. Someone will have to come up with something nifty for that .. unsure atmHyronymus wrote:TrueBrain, is it possible to make a scrip that influences the game in such a way that it sends emergency vehicles from a grf to a vehicle crash site i.e.?So I guess the answer is: no
A script should detect where a crash happened, build a bus station near it and send vehicles from a depot to that bus station and after a set amount of time return to the depot/have their order removed to keep them driving around in towns.
So, the only thing that is really needed in this case is a way to detect where the crash happened. The rest is already possible I think (building stuff and give orders are things AI's already can do).
TrueBrain: about paying for it: if you declare no running costs for emergency vehicles and no purchase costs, doesn't that make them free?
Re: NoGo - A Scriptable Game Framework
Yes.
(short answer best answer
)
(short answer best answer

The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework
Yeah, they areTrueBrain wrote:Yes.
(short answer best answer)

Let's assume one uses Zimmlock's fire department as fire truck depot. Can NoGo check the existence of the closest-by fire department and dispatch a fire truck towards the crash site from there?
Re: NoGo - A Scriptable Game Framework
the more important question: can the GS enforce "quantum effects" on the fire truck, so it won't be blocked by vehicles?
Re: NoGo - A Scriptable Game Framework
You mean having right of way everywhere? Good point but maybe they can be teleported a bit? I mean, they don't have to start at the fire depot if the distance is quite big. Just a thought.Eddi wrote:the more important question: can the GS enforce "quantum effects" on the fire truck, so it won't be blocked by vehicles?
Re: NoGo - A Scriptable Game Framework
"teleporting" may be tricky, but it could be handled the same way as just creating the vehicle in the first place, i.e. just making it disappear somewhere and make a new vehicle appear somewhere else. for lack of fire stations you could just pick a random tile in the area to create the vehicle, or the town center, or whatever.
but "quantum effects" is already a game feature (watch traffic jams for a while), so it should be possible to just set a flag on a vehicle to enable this. if possible, all vehicles it passes this way should stop for a short period of time.
but "quantum effects" is already a game feature (watch traffic jams for a while), so it should be possible to just set a flag on a vehicle to enable this. if possible, all vehicles it passes this way should stop for a short period of time.
-
- Tycoon
- Posts: 1660
- Joined: 16 Dec 2007 22:24
- Location: Idaho, USA
Re: NoGo - A Scriptable Game Framework
Wow, actually being able to have emergency vehicles automatically dispatched... that sounds too good to be true (though I hope it isn't!) 

Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
Re: NoGo - A Scriptable Game Framework
We are drifting out of scope here a bit
I like the idea, I do a lot, but it is not a primary function of NoGo. Just nice if it also happen to be possible 
If you are serious about something like this, I guess best thing to do is open a new thread and talk about it? I am sure some of you will have insane ideas and find a nice way to implement it


If you are serious about something like this, I guess best thing to do is open a new thread and talk about it? I am sure some of you will have insane ideas and find a nice way to implement it

The only thing necessary for the triumph of evil is for good men to do nothing.
Who is online
Users browsing this forum: No registered users and 10 guests