NoGo - A Scriptable Game Framework - v1.5
Moderator: OpenTTD Developers
Re: NoGo - A Scriptable Game Framework
I completely agree Eddi. In my opinion it's not "unlikely to change". There has been a feature request for this open on flyspray for a very long time. The main problem is finding a nice way to implement this without breaking backwards compatibility too much.
Re: NoGo - A Scriptable Game Framework
How ever that might be, it is far off topic from NoGo, so please do make a new thread about that, and talk there about it
(not meant in a bad way, but I like to keep this thread to talk about NoGo as much as possible, which does not include extending NoAI
Sorry!)
On a slightly related note, today I committed the refactoring of the script part of OpenTTD. Although this is (another) step towards NoGo, there is still no code (directly) related to NoGo in trunk. Just FYI!
(just a long overdue generalisation of an awesome framework
)


On a slightly related note, today I committed the refactoring of the script part of OpenTTD. Although this is (another) step towards NoGo, there is still no code (directly) related to NoGo in trunk. Just FYI!
(just a long overdue generalisation of an awesome framework

The only thing necessary for the triumph of evil is for good men to do nothing.
-
- Tycoon
- Posts: 2792
- Joined: 22 Feb 2011 18:34
Re: NoGo - A Scriptable Game Framework
Does that mean that someone could make a script that "teleports" vehicles from one depot to the other? Teleport in the sense of buying a clone in one depot when a train enters another depot and selling the original. Of course such a script has to take a lot of things into account, like vehicle availability (can that list also be accessed by a script?), a possible change from electrified tracks to monorail/maglev/non-electric, but if I understand the change you made correct, it is possible to create a teleportation script?TrueBrain wrote: - Build on behalf of a company (with great power comes great responsibility!), by create an instance of GSCompanyMode(<value>) in a scope. It works identical to TestMode and ExecMode, only it changes the current company.
(No, I'm not going to make such a script, I'm just curious if such a script is possible with NoGo)
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: NoGo - A Scriptable Game Framework
Yes, you could make a script that "teleport" player vehicles as you describe. It will probably not be free of charge for the player unless a way for GS to give money back to the company is introduced. (I haven't checked yet, but I assume that this GSCompanyMode just set _current_company and not magically makes the commands free)
To trigger this, the script could for example require you to label your depots with signs to address depots as source/destination and which pair it belongs to. It would help if players use the stop-in-depot order.
Edit: The script must however not try to do too many other things, as it would then increase the possible lag between a vehicle entering the depot and being teleported. This is because it needs to either scan all depots for stopped vehicles or scan the entire vehicle list for vehicles stopped in depot. If it would try to do other time consuming tasks, no vehicles would get teleported during that time. [yes, unless you call the teleport scanner from time to time during your very long other task]
And yes, you could also write things like a convert to monorail tool that is triggered by some message, eg. a sign (say hello to TTDPatch-style sign commands again
)
To trigger this, the script could for example require you to label your depots with signs to address depots as source/destination and which pair it belongs to. It would help if players use the stop-in-depot order.
Edit: The script must however not try to do too many other things, as it would then increase the possible lag between a vehicle entering the depot and being teleported. This is because it needs to either scan all depots for stopped vehicles or scan the entire vehicle list for vehicles stopped in depot. If it would try to do other time consuming tasks, no vehicles would get teleported during that time. [yes, unless you call the teleport scanner from time to time during your very long other task]
And yes, you could also write things like a convert to monorail tool that is triggered by some message, eg. a sign (say hello to TTDPatch-style sign commands again

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
Would it be possible to script disasters?
Re: NoGo - A Scriptable Game Framework
Not until a NoGod script has been writtenExpresso wrote:Would it be possible to script disasters?

What kind of disasters are you thinking off, real natural disasters or big fires and such?
Re: NoGo - A Scriptable Game Framework
Adding new disasters via a script will be very unlikely. Triggering the existing disasters should be doable (but it's not implemented and I haven't heard plans for it yet either).
Re: NoGo - A Scriptable Game Framework
It is possible to create disasters using code allowing for closing industries, terraforming and executing commands as company.
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
Which events would you guys like to have? Feel free to think out of the box 

The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework
something that i remember being sugggested was a way to create/remove money out of thin air (not give to another company), for certain administrative purposes.
Re: NoGo - A Scriptable Game Framework
Well... I guess this ties into my suggested news messages:TrueBrain wrote:Which events would you guys like to have? Feel free to think out of the box
Hyronymus wrote:What kind of news messages do you foresee being trighered by NoGo? What would be fun is:
- new speed record per vehicle class (upon highest reached speed)
- crowded vehicles on station 1 (upon consecutive vehicles stopping at a station and fully loading x times in a row)
- signal failure (upon a signal showing red for a given time)
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: NoGo - A Scriptable Game Framework
There are some listed on this (now outdated) pageTrueBrain wrote:Which events would you guys like to have? Feel free to think out of the box

http://wiki.openttd.org/Requested_featu ... _Framework
Guess we should update / remove that page soon

Not all of these are events, but mostly event-related
Industry open/close (possibly with a reason for close, although that might require too much coupling to newgrf)
Town growth (positive or negative)
New town founded
Terrain modification (lower, rise parts)
Bulldoze certain area(s)
Route construction (ideally extended with cb / ability to limit amount of road, track, number of airports, docks etc)
Vehicle leaves/arrives station
Cargo collected/delivered
Detailed control of subsidy framework
Hooks to all company financials
Buy / sell shares
Objects constructed
Town menu options (statue, advertise, bribe etc)
Cheats used
Town rating change
Ideas for challenges include:
- limited resources (connect cities X,Y,Z with limited track / road)
- fastest average travel times while shipping x amount of cargo
- company value
- company profit
- buy all competitors
- deliver x amount of cargo
- connect every town on the map
- connect all industries of type x
- highest ratings for criteria xyz
- "it's political" - map has regions, have to get a good rating in one 'region' before the next region lets you build
- mini challenges (micro managed)
Any of the above by certain dates
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
- Dwight_K._Schrute
- Traffic Manager
- Posts: 209
- Joined: 01 Sep 2010 11:29
Re: NoGo - A Scriptable Game Framework
It would be great to allow or disallow a SINGLE city/city to grow. Maybe with a checkbox oder something like that in the town gui.
Re: NoGo - A Scriptable Game Framework
a script could read player-built signs (mimic-ing the TTDPatch sign cheats), so you could place a sign "nogrowth" on the town center, and the script might follow it.
on the notion of disasters: "the road between X and Y is blocked by a landslide" (destroy road and disallow building over/around it for a number of ticks/days/months)
PS: any tips on how i would go about connecting the towns by road on game start? (build roads as OWNER_TOWN or OWNER_NONE, a sensible road pathfinder that avoids completely straight stretches (pherhaps a copy of the river pathfinder))
on the notion of disasters: "the road between X and Y is blocked by a landslide" (destroy road and disallow building over/around it for a number of ticks/days/months)
PS: any tips on how i would go about connecting the towns by road on game start? (build roads as OWNER_TOWN or OWNER_NONE, a sensible road pathfinder that avoids completely straight stretches (pherhaps a copy of the river pathfinder))
Re: NoGo - A Scriptable Game Framework
I had the idea of a disaster: Strike.
The script would then stop all vehicles of a given vehicle type that belongs to one or several companies. The script will have to keep looping over all vehicles and stop them again if the player tries to start them again and when the strike is over finally start all vehicles again.
The script would then stop all vehicles of a given vehicle type that belongs to one or several companies. The script will have to keep looping over all vehicles and stop them again if the player tries to start them again and when the strike is over finally start all vehicles again.
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
Limit the amount people can terraform. Possibly separate limits for raising and lowering.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone







- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: NoGo - A Scriptable Game Framework
Ability: Merge two company
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: NoGo - A Scriptable Game Framework
improving on that: buying/selling individual "lines" (all connected tiles with same owner/vehicle type, plus all vehicles)planetmaker wrote:Ability: Merge two company
Re: NoGo - A Scriptable Game Framework
I like idea of pointless badges/minichallenges (sth like this: http://wiki.luukland.net/Quest_Manual ), so ability to display messages may be quite useful, maybe including messages with images provided by script. Also, ability to save data outside of the savegame may be useful (in tutorials and badge trackers).
Last edited by Kogut on 01 Dec 2011 21:33, edited 1 time in total.
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
This can be funny with salary negotiations or at least a very basic resemblance of salary in the gameZuu wrote:I had the idea of a disaster: Strike.
The script would then stop all vehicles of a given vehicle type that belongs to one or several companies. The script will have to keep looping over all vehicles and stop them again if the player tries to start them again and when the strike is over finally start all vehicles again.

Who is online
Users browsing this forum: No registered users and 12 guests