Oops. You're right of course. I've never used NoAI. Sorry. I'll shut up now haha.TrueBrain wrote:I totally fail to see the relation between NG and AI We have NoGo and NoAI framework ... NG and NA I can see ...Valentijn wrote:I think its a very cool feature, keep up the goodwork.
If you want consistency in the naming, you could thank about using NG.
Just like AI.
NoGo - A Scriptable Game Framework - v1.5
Moderator: OpenTTD Developers
Re: NoGo - A Scriptable Game Framework
Re: NoGo - A Scriptable Game Framework
Hehe Was just wondering, maybe I had missed something obviousValentijn wrote:Oops. You're right of course. I've never used NoAI. Sorry. I'll shut up now haha.TrueBrain wrote:I totally fail to see the relation between NG and AI We have NoGo and NoAI framework ... NG and NA I can see ...Valentijn wrote:I think its a very cool feature, keep up the goodwork.
If you want consistency in the naming, you could thank about using NG.
Just like AI.
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework
maybe should be "gamescript" directory. should avoid any confusion...
Re: NoGo - A Scriptable Game Framework
New version of my unnamed game script that relate town demand to the size of neighbouring towns. It has been updated to the new API names. In addition it demonstrates how SuperLib can be used in a GameScript (by combining Helper.SetSign and Tile.GetRandomTile). The bundled SuperLib edition certainly contains OpenTTD API calls that are not yet supported and may even crash OpenTTD. (the crash due to calling GSController.GetSetting has been "fixed" by substituting all those calls by a zero)
Mind that if you want to inline a library in a GameScript, I believe that the GameScript need to use the same license as the library.
Mind that if you want to inline a library in a GameScript, I believe that the GameScript need to use the same license as the library.
- Attachments
-
- test.zip
- License: GPL2
- (25.74 KiB) Downloaded 94 times
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
How far off is that from processing industries' production depending on size of nearby cities?Zuu wrote:New version of my unnamed game script that relate town demand to the size of neighbouring towns. It has been updated to the new API names. In addition it demonstrates how SuperLib can be used in a GameScript (by combining Helper.SetSign and Tile.GetRandomTile). The bundled SuperLib edition certainly contains OpenTTD API calls that are not yet supported and may even crash OpenTTD. (the crash due to calling GSController.GetSetting has been "fixed" by substituting all those calls by a zero)
Mind that if you want to inline a library in a GameScript, I believe that the GameScript need to use the same license as the library.
Re: NoGo - A Scriptable Game Framework
Industry production is heavily governed by NewGRFs already, it'll become very messy if scripts interfere with that.
Re: NoGo - A Scriptable Game Framework
It's not that you would require both approaches at the same time though . If you can have approach as a gameplay variable you don't need it by NewGRF's.Eddi wrote:Industry production is heavily governed by NewGRFs already, it'll become very messy if scripts interfere with that.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: NoGo - A Scriptable Game Framework
It's not about 'require'. But adding it to goal scripts won't remove it from NewGRFs nor is removing that knowledge from NewGRFs a desirable thing as it'd break all existing industry NewGRFs. Thus the question is what to do in the case of conflicting input from game script and industry (like one saying "close down" and the other saying "produce at max. output" - a conflict which hardly can be resolved. Thus manipulating individual industries is at least tricky and most certainly will lead to questions of the "why is my newgrf broken" type.Hyronymus wrote:It's not that you would require both approaches at the same time though . If you can have approach as a gameplay variable you don't need it by NewGRF's.Eddi wrote:Industry production is heavily governed by NewGRFs already, it'll become very messy if scripts interfere with that.
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
Maybe it should be routed through "change production cheat"?planetmaker wrote:It's not about 'require'. But adding it to goal scripts won't remove it from NewGRFs nor is removing that knowledge from NewGRFs a desirable thing as it'd break all existing industry NewGRFs. Thus the question is what to do in the case of conflicting input from game script and industry (like one saying "close down" and the other saying "produce at max. output" - a conflict which hardly can be resolved. Thus manipulating individual industries is at least tricky and most certainly will lead to questions of the "why is my newgrf broken" type.Hyronymus wrote:It's not that you would require both approaches at the same time though . If you can have approach as a gameplay variable you don't need it by NewGRF's.Eddi wrote:Industry production is heavily governed by NewGRFs already, it'll become very messy if scripts interfere with that.
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
So to play any game with a script controlling the industries, you have to cheat?
Re: NoGo - A Scriptable Game Framework
Why tamper with the amount of cargo an industry produces - i'd rather want to influence how much of that produced cargo goes to a certain player
that way the newgrf has no issue, as it still controlls its cargo as it should, and the script can still influence the game play
that way the newgrf has no issue, as it still controlls its cargo as it should, and the script can still influence the game play
Re: NoGo - A Scriptable Game Framework
Well, I was merely thinking out loud and the discussion is going a bit off topic now towards my thought . But to me it would make sense if grf's only fix graphics and not gameplay.
Re: NoGo - A Scriptable Game Framework
It is an ongoing 'battle'. Atm newgrf has a lot of power, and people of course don't want to remove that power, but some of that power is very much misplaced (but by the lack of other methods, logic that is was put in place). So it is a balance act.
I think a good start would be if GameScripts can *hint* towards increase or decrease of production, without knowing if the NewGRF reacts on it or not. That way both stay in control, and in time it might converge to a common solution.
And Hyronymus: this is not off topic, not at all. More and more of these discussions have to be held regarding GameScripts, where his influence stops, and the NewGRFs start.
In those regards, just to share, a few things are very clear:
- NewGRFs command instances, the smallest of the game. Vehicles, town-houses, trees, ... NewGRFs tell the speed of a vehicle, what he can pull, what type of rail he needs, ....
- GameScripts command the more global picture, never an instance. You can tell the town to build a house, but you cannot say which house. You can influence the global aspects, like town growth, industry development, rating, ..., but not set the values.
Just to make it clear where we (or at least I) want to put the line between those two. A GameScript will never be called every tick to get some information for a vehicle. NewGRFs should be doing that (both for performance reasons as for clear separation).
Another way to think about that is, a GameScript cannot respond to callbacks (native to how we implemented Squirrel). It is a big while(true){} loop, in which it performs actions. NewGRFs are (almost) purely callback based. This sets those two apart.
That said, if production of an industry should increase or not is exactly in the middle of this line
I think a good start would be if GameScripts can *hint* towards increase or decrease of production, without knowing if the NewGRF reacts on it or not. That way both stay in control, and in time it might converge to a common solution.
And Hyronymus: this is not off topic, not at all. More and more of these discussions have to be held regarding GameScripts, where his influence stops, and the NewGRFs start.
In those regards, just to share, a few things are very clear:
- NewGRFs command instances, the smallest of the game. Vehicles, town-houses, trees, ... NewGRFs tell the speed of a vehicle, what he can pull, what type of rail he needs, ....
- GameScripts command the more global picture, never an instance. You can tell the town to build a house, but you cannot say which house. You can influence the global aspects, like town growth, industry development, rating, ..., but not set the values.
Just to make it clear where we (or at least I) want to put the line between those two. A GameScript will never be called every tick to get some information for a vehicle. NewGRFs should be doing that (both for performance reasons as for clear separation).
Another way to think about that is, a GameScript cannot respond to callbacks (native to how we implemented Squirrel). It is a big while(true){} loop, in which it performs actions. NewGRFs are (almost) purely callback based. This sets those two apart.
That said, if production of an industry should increase or not is exactly in the middle of this line
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework
i'd draw the line like this: GameScripts can influence where an industry is built (or whether it is built at all), and possibly can force it to close. GameScripts can try to steer the production increase/decrease of industries, but that will ALWAYS be overridden if the NewGRF uses CB29 (possibly push some values towards var10, which the newgrf can use or ignore)
Re: NoGo - A Scriptable Game Framework
No - but script may use prepared "decrease/increase production" code - and it is probably somehow implemented in newgrfs, as in old FIRS it was impossible to use this cheat and in new versions it is possible.Alberth wrote:So to play any game with a script controlling the industries, you have to cheat?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: NoGo - A Scriptable Game Framework
Like to take a last look on your signature? Adios Dutch Trainset ...Hyronymus wrote: But to me it would make sense if grf's only fix graphics and not gameplay.
regards
Michael
- andythenorth
- Tycoon
- Posts: 5658
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: NoGo - A Scriptable Game Framework
This would be the production multiplier.Kogut wrote:...script may use prepared "decrease/increase production" code - and it is probably somehow implemented in newgrfs, as in old FIRS it was impossible to use this cheat and in new versions it is possible.
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)
Re: NoGo - A Scriptable Game Framework
I don't see how the Dutch Trainset influences the production levels of industries or the town growth ratio. I do see how FIRS influences the first though, i.e.michael blunck wrote:Like to take a last look on your signature? Adios Dutch Trainset ...Hyronymus wrote: But to me it would make sense if grf's only fix graphics and not gameplay.
regards
Michael
Re: NoGo - A Scriptable Game Framework
If one interprets gameplay as everything outside graphics, then your settings of vehicle speed/cost/cargoes are already gameplay. I doubt however that you want to drop those from the NewGRF
Re: NoGo - A Scriptable Game Framework
Gameplay to me is how the game is designed to work - independent of which vehicle sets you use.Alberth wrote:If one interprets gameplay as everything outside graphics, then your settings of vehicle speed/cost/cargoes are already gameplay. I doubt however that you want to drop those from the NewGRF
Who is online
Users browsing this forum: No registered users and 20 guests