NoGo - A Scriptable Game Framework - v1.5
Moderator: OpenTTD Developers
Re: NoGo - A Scriptable Game Framework
"funny" very quickly turns into "annoying".
Re: NoGo - A Scriptable Game Framework
Depends on the type of boss you are. If you do good you will receive goodEddi wrote:"funny" very quickly turns into "annoying".

Re: NoGo - A Scriptable Game Framework
More information in relation with the HQ. Mainly where it is build and set the price. ( It could be a cool way to claim a city )
Being able to know if a station is docked could be used for fun scenario. ( For exemple, the first to stockpile x crates of good at his HQ, or the man with the station with the highest throughput )
Ability to modify the share system. The actual one is really not fun.
Being able to know if a station is docked could be used for fun scenario. ( For exemple, the first to stockpile x crates of good at his HQ, or the man with the station with the highest throughput )
Ability to modify the share system. The actual one is really not fun.
Re: NoGo - A Scriptable Game Framework
About the HQ: create a message with the offer to expand your HQ at a certain cost or postpone the expansion to a later date (where you hope you have more money). Expansion costs could be dependent on length of owned track rather than company value.Torrasque wrote:More information in relation with the HQ. Mainly where it is build and set the price. ( It could be a cool way to claim a city )
Being able to know if a station is docked could be used for fun scenario. ( For exemple, the first to stockpile x crates of good at his HQ, or the man with the station with the highest throughput )
Ability to modify the share system. The actual one is really not fun.
Re: NoGo - A Scriptable Game Framework
I read some good suggestions. I will just quickly reply to a few:

Those things are way to advanced for GS, and far outside the scope of NoGo
(just to make a bit clear how far I want to go for now 
There will not be such an option in the near future. A GS can make some towns grow and others not, but this will not be switchable from the GUI.Dwight_K._Schrute wrote: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.
Already in trunk (a while ago).XeryusTC wrote:Limit the amount people can terraform. Possibly separate limits for raising and lowering.
In case you mean the event, already done. In case you mean the action: I have no real interest in adding this short term (as the normal game mechanics are sufficient in this respect as far as I am concerned atm). One of those things to add later, possiblyplanetmaker wrote:Ability: Merge two company

Same, and that is even further away from meEddi wrote:improving on that: buying/selling individual "lines" (all connected tiles with same owner/vehicle type, plus all vehicles)planetmaker wrote:Ability: Merge two company



You can already see in a GS where a HQ is built, and with that claim a city.Torrasque wrote:More information in relation with the HQ. Mainly where it is build and set the price. ( It could be a cool way to claim a city )
(..)
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework
Today I have been working (and talking) a lot to get a translation system in place. It is getting shape really well. Basically, how it will look (give or take):
With strings:
But this is rather far away. What currently does work:
You see all possible current syntaxes here. I am not really sure what will be the one included in the end .. most likely only a few will make it. But you get the idea. You can recycle the objects all you want, not until SetText are they all resolved. There are a few pitfalls, but nothing that worries me greatly at this stage.
All the work done today is only on the Squirrel side, to make that a bit solid. The OpenTTD side is rather ... hacked in, and still needs a lot of work is needed before it is finished. But at least there is a start, a proof-of-concept.
You might wonder why this is needed. Well, for AIs it did fine to have:
Although this works fine for GS too, our whole game is translatable (in the fullest, even grfs!). So having a script that controls the flow of the game in English, is annoying. You want to see your goals, achievements, quests, town-info, news messages, ... all in your local language too. So .. that means a bit more work to get it all done and fixed.
On a very positive side, it also means strings can be as long as you like. And if this continues to go this well, soon you will be able to trigger news messages via GS, in the local languages
Exact details etc will be made available over time. Atm the format will be like english.txt, and every other .txt in the src/lang file, including all the tags that are used there. It will give you full control (in both the english as in the translated string) over the text you want to print, including RTL, different order of parameters, plurals, cases, ... just the normal you are used from us
I hope to make more progress over the weekend, and I hope a few other developers will help me out with this OpenTTD part, as it is very difficult (for me) to get my head around it
Code: Select all
local a = GSText(GSText.STR_TOWN_TEXT);
a.company. = 0;
a.goal. = GSText(GSText.STR_GOAL_GROW);
a.goal.target. = 1000;
GSTown.SetText(2, a);
Code: Select all
STR_TOWN_TEXT: This town is claimed by {COMPANY company}.{}Current goal: {STRING1 goal}
STR_GOAL_GROW: Grow this town to a population of {COMMA target}
Code: Select all
local t1 = GSText(GSText.STR_GOAL_GROW);
local t2 = GSText(GSText.STR_TOWN_TEXT).AddParam(0).AddParam(t1);
t1["param_1"] = 1000;
t1.param_1 = 1000;
t1.SetParam(1, 1000);
t1[0] = 1000
t1.0 = 1000
GSTown.SetText(2, t2);
All the work done today is only on the Squirrel side, to make that a bit solid. The OpenTTD side is rather ... hacked in, and still needs a lot of work is needed before it is finished. But at least there is a start, a proof-of-concept.
You might wonder why this is needed. Well, for AIs it did fine to have:
Code: Select all
AISign.BuildSign("My English Text");
On a very positive side, it also means strings can be as long as you like. And if this continues to go this well, soon you will be able to trigger news messages via GS, in the local languages

Exact details etc will be made available over time. Atm the format will be like english.txt, and every other .txt in the src/lang file, including all the tags that are used there. It will give you full control (in both the english as in the translated string) over the text you want to print, including RTL, different order of parameters, plurals, cases, ... just the normal you are used from us

I hope to make more progress over the weekend, and I hope a few other developers will help me out with this OpenTTD part, as it is very difficult (for me) to get my head around it

The only thing necessary for the triumph of evil is for good men to do nothing.
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: NoGo - A Scriptable Game Framework
I love the idea. I'm excited to see what develops.
A couple of ideas/requests:
A couple of ideas/requests:
- The ability to start an AI. With the combination of NoGo, you could build the network and then hand it over to a 'Manager' AI.
- Code libraries. I realize that Zuu and I are the only ones who have developed libraries of late, but what libraries were available helped me greatly when I started coding my AI. I would be happy to port my own library over to the framework.
- You mention that NoGo scripts can be run at map generation time; could they effectively recreate the map?
- Will NoGo allow you to build 'neutral' infrastructure like roads and stations that can be used by all players? I'm thinking similar to the dock/heliport on the Oil Rigs.
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
i quite like this idea - i consider this a nice solution on multiplayer games in order to display some type of penalty.Eddi wrote: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
or better.. quests!dihedral wrote:i quite like this idea - i consider this a nice solution on multiplayer games in order to display some type of penalty.Eddi wrote: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.

Lead Manager of OpenDUNE
Re: NoGo - A Scriptable Game Framework
Will it be possible to receive an offer from a virtual person who offers you to help the company by cutting overhead costs/improving reliability/improving profit? This is something I always liked about RRT2/3.
Re: NoGo - A Scriptable Game Framework
How about economic collapse: Nobody has money anymore (so, a lot less passengers for a few years), industries closing by the droves (eventually only the largest producers remain)... and ofcourse everybody's favorite, hyperinflation (triple digit inflation). Things slowly return to normal afterwards, but this is a really severe disaster... enoughn to be more then a nuisance.
Or how about a tsunami which removes everything in its path from the map, it should go on until it encounteres a mountain which is higher then the wave.
What about meteor impacts (from small to very large). This tends to turn an area into a crater.
What about the killer virus, spreading using your infrastructure. Decimating the population of entire towns, reducing the production of local industries significantly... and of course nobody wants to use your transport company anymore.
And... erm... this last one would be a nice disaster... elections
The various parties could have various effects on how the town behaves, reacts to changes in its environment and/or the chance of industries spawning nearby. If each town holds its own elections every N years, things could get interesting.
Or how about a tsunami which removes everything in its path from the map, it should go on until it encounteres a mountain which is higher then the wave.
What about meteor impacts (from small to very large). This tends to turn an area into a crater.
What about the killer virus, spreading using your infrastructure. Decimating the population of entire towns, reducing the production of local industries significantly... and of course nobody wants to use your transport company anymore.
And... erm... this last one would be a nice disaster... elections

Re: NoGo - A Scriptable Game Framework
This is a thread about a scriptable game/goal framework, not a thread about the best way to frustrate players.Expresso wrote:What about the killer virus, spreading using your infrastructure. Decimating the population of entire towns, reducing the production of local industries significantly... and of course nobody wants to use your transport company anymore.
-- Michael Lutz
Re: NoGo - A Scriptable Game Framework
I like the idea, but i see "problems" with the concept
- As you can now build AI that could cheat using the GS, lol let my AI ask GS to build a road for me from point A to point B, but eheh, make sure GS will use anyone but not my AI to build the road. But it will be tied to ave a GScript that accept that. Not a real problem, except for trust source, as i can right now use my ai version 1.0 that have bad code... And when uploading savegame, anyone that own my ai/gs version 1.0 (but clean original code) won't see the cheat...
If GS code have such power to change economy or event make someone goes bankrupt, maybe then gave it even more power, i see interrest of changing some value that might not appears at first useful but can influence gameplay (see lower with vehicle flaw+age)
- Just because of that i see also plenty benefits : you can now make a GS helper :
Put sign A and put Sign B, now GS will take control of your compagny, pathfind, and build the road/rail for you (lazzy dude!)
- You need to upgrade all your trains from two incompatible railtype? No problem, a GS helper can look at your trains, record their group/destination/orders... sell them all, upgrade the rails, and rebuild a default train with wagons and all orders as before (another lazzy option)
I see some speaking about disasters and events/goal :
- A vehicle type design flaw was found, all vehicle model X currently own by all companies get their date + 30 years ( to higher breakdown and to trigger old age event, this is of course not possible as GS cannot change that age value), this way until the company has replace all his current vehicle model fleet that have the flaw is punish.
- Expropriate: A town dislike your HQ/airport/unused/badly served station and will query you to move it away, until you do as the town ask you get your company rating down to the worst (must also control town rating so)
- Love town: A company have its HQ&statue in a town, that town will take control of company just to hit itself the "found new building/repair road/buy exclusive right" (random, but once or two in a year)
- A constructor think his engine isn't well enough represent, it offer another free vehicle if you buy 20 models of the engine (also not possible as you cannot set price of an engine, newgrf authors might complain...)
- The green town : every month all companies represent in the town must build X number of trees...
... I have some more i could share if you like
The real question here is, how much power GS should have or how much will you gave it ?
For now i just see you gave all the power to kill a player/ai with no reward (for now your GS can take away all money from a company making it buys something, but cannot gave some money back).
So even the classic "it's your birthday all players gave you 100$" cannot be made
- As you can now build AI that could cheat using the GS, lol let my AI ask GS to build a road for me from point A to point B, but eheh, make sure GS will use anyone but not my AI to build the road. But it will be tied to ave a GScript that accept that. Not a real problem, except for trust source, as i can right now use my ai version 1.0 that have bad code... And when uploading savegame, anyone that own my ai/gs version 1.0 (but clean original code) won't see the cheat...
If GS code have such power to change economy or event make someone goes bankrupt, maybe then gave it even more power, i see interrest of changing some value that might not appears at first useful but can influence gameplay (see lower with vehicle flaw+age)
- Just because of that i see also plenty benefits : you can now make a GS helper :
Put sign A and put Sign B, now GS will take control of your compagny, pathfind, and build the road/rail for you (lazzy dude!)
- You need to upgrade all your trains from two incompatible railtype? No problem, a GS helper can look at your trains, record their group/destination/orders... sell them all, upgrade the rails, and rebuild a default train with wagons and all orders as before (another lazzy option)
I see some speaking about disasters and events/goal :
- A vehicle type design flaw was found, all vehicle model X currently own by all companies get their date + 30 years ( to higher breakdown and to trigger old age event, this is of course not possible as GS cannot change that age value), this way until the company has replace all his current vehicle model fleet that have the flaw is punish.
- Expropriate: A town dislike your HQ/airport/unused/badly served station and will query you to move it away, until you do as the town ask you get your company rating down to the worst (must also control town rating so)
- Love town: A company have its HQ&statue in a town, that town will take control of company just to hit itself the "found new building/repair road/buy exclusive right" (random, but once or two in a year)
- A constructor think his engine isn't well enough represent, it offer another free vehicle if you buy 20 models of the engine (also not possible as you cannot set price of an engine, newgrf authors might complain...)
- The green town : every month all companies represent in the town must build X number of trees...
... I have some more i could share if you like
The real question here is, how much power GS should have or how much will you gave it ?
For now i just see you gave all the power to kill a player/ai with no reward (for now your GS can take away all money from a company making it buys something, but cannot gave some money back).
So even the classic "it's your birthday all players gave you 100$" cannot be made

Re: NoGo - A Scriptable Game Framework
Probably nobody will use "stupid" scenarios.krinn wrote:For now i just see you gave all the power to kill a player/ai with no reward
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
I wondered about the use of libraries. I only found two usecase:
Examples are:
Since it is unlikely that users will be allowed to pick multiple GS for a game (due to the obvious conflicts), I would assume that once these small things turn up, there will soonish appear "patchpacks". They would combine multiple GS and add an appropiate settings GUI to enable/disable the individual parts, while checking for stuff that works together.
Now there are two ways to achieve this:
- General purpose libraries, which provide helper functions. These are actually not GS specific, but would be the same as for AIs.
- Plugins for interfaces. I.e. imagine some guy writes a web application to display highscores, leagues and stuff including an interface to the admin port. He also provides a GS library which real GS may use to communicate with the common web interface, which is not specific to a single GS.
Examples are:
- Small quests with mini goals.
- Events/Disasters/Jokes.
- Controlling prices/inflation over time.
- Cheats/Helpers.
Since it is unlikely that users will be allowed to pick multiple GS for a game (due to the obvious conflicts), I would assume that once these small things turn up, there will soonish appear "patchpacks". They would combine multiple GS and add an appropiate settings GUI to enable/disable the individual parts, while checking for stuff that works together.
Now there are two ways to achieve this:
- Just putting the source of all into one tar. (obvious)
- Including the parts as "libraries" into the "GUI frontend". (This would be different from AIs; here a GS could be both library and stand-alone GS at the same time.)
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: NoGo - A Scriptable Game Framework
Having a scenario that is able to kill someone is not always something stupid, some players might like challenge or crazyness.Kogut wrote:Probably nobody will use "stupid" scenarios.krinn wrote:For now i just see you gave all the power to kill a player/ai with no reward
Just like having a scenario that (if ability is gave) give away freely millions dollars to plant one tree might be seen also as "stupid".
Giving authors ability to control some parameters that a player shouldn't control might appears scary, but you could see gold things at end. Per example, ever dream of a town asking you 10x more than normal price but if you pay that extra money allow you to add another airport near it, how many times you were wishing that ? Or as many people ask everywhere/everytime more accidents/events that influence gameplay, even without even need to add some extra graphics (like my "engine flaw" sample).
Re: NoGo - A Scriptable Game Framework
i agree with frosch here. the "Game Script" would then be reduced to something like a configuration tool, which picks its pieces from the available libraries (like a random event library, a town government library, a road connection library, ...)
this would keep most of the flexibility of having multiple GS active, but offloads the task of ensuring compatibility to the "GS-configurator" author, while having the task of ensuring functionality lies with the GS-library authors
this would keep most of the flexibility of having multiple GS active, but offloads the task of ensuring compatibility to the "GS-configurator" author, while having the task of ensuring functionality lies with the GS-library authors
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: NoGo - A Scriptable Game Framework
It would be wise to allow version pinning there...Eddi wrote:...offloads the task of ensuring compatibility to the "GS-configurator" author
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 would assume that that's the same way AIs work currently.andythenorth wrote:It would be wise to allow version pinning there...Eddi wrote:...offloads the task of ensuring compatibility to the "GS-configurator" author
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: NoGo - A Scriptable Game Framework
Another few suggestions:
- The ability to draw on the map. Either as a line, or to shade an area, to show things like "political" boundaries. I don't know whether this would require new lands sprites, just overlay sprites, or if you could just 'draw a line.'
- The ability to refuse player actions. For example, to keep player from building airports or roads or certain vehicles.
- The ability to restrict player actions, but only for certain areas of the map. This could be used to require a player's first station in a town to be something other than an airport, to keep a player from T-ing in to "public" roads, or to disallow rail/road level crossings.
- The ability to give/take money from a player. This has huge potential to be misused, but opens up lots of possibilities: things like (road) tolls, or taxes, or prizes...
- The ability for AI's to know what GS is running. If GS's are changing the "rules" of OpenTTD, there needs to be a way for AI's to determine the new rules. A good stopgap to truly understanding the "rules" would be to have an AI identity the GS running, and then react accordingly.
- The ability for a GS to know what NewGRF's are loaded. This would allow for GS to make use of "prize" buildings or vehicles, made available via the NewGRF. This might be a way to provide the "political bountry" sprites I mentioned above.
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
Who is online
Users browsing this forum: Ahrefs [Bot] and 11 guests