NoGo - A Scriptable Game Framework - v1.5
Moderator: OpenTTD Developers
Re: NoGo - A Scriptable Game Framework - v1.5
that is totally unrealistic... the rich always pay less taxes
-
- Tycoon
- Posts: 1660
- Joined: 16 Dec 2007 22:24
- Location: Idaho, USA
Re: NoGo - A Scriptable Game Framework - v1.5
OTTD money/profits/expenses are already extremely unrealistic. So why not have unrealistic taxes?Eddi wrote:that is totally unrealistic... the rich always pay less taxes
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
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: NoGo - A Scriptable Game Framework - v1.5
Bug: After downloading the newest version of Zuu's "TransportGoals" script, both v1 and v2 show up as available game scripts. Zuu did rename the script, but the shortname remains the same. I'm running r23655 on Windows 7x64
@TrueBrain: I keep trying to isolate the bridge NOT_REACHED bug, but I still haven't had any luck...
Update:Well, I'm getting a new error now (actually the same error, but a different line number). My test script is attached below. The libraries needed were posted in my last post. I haven't been able to confirm it, but it seems that these errors only come up while the script is running at the end of the map generation phase, but before the game itself starts. For example, with WmDOT, I set the seed to a known value, and the game crashed (Line 67 in this case) during the script phase of map generation. If I restart the game with the same seed (so that should be the same map), but delay the GameScript to wait until map creation is finished (by use of a Sleep(1) command), the GameScript will run all the way through without crashing the game.
Bug 2:GSRoad.RemoveRoad() and GSRoad.RemoveRoadFull() don't seem to work when building as the game.
Update:Well, I'm getting a new error now (actually the same error, but a different line number). My test script is attached below. The libraries needed were posted in my last post. I haven't been able to confirm it, but it seems that these errors only come up while the script is running at the end of the map generation phase, but before the game itself starts. For example, with WmDOT, I set the seed to a known value, and the game crashed (Line 67 in this case) during the script phase of map generation. If I restart the game with the same seed (so that should be the same map), but delay the GameScript to wait until map creation is finished (by use of a Sleep(1) command), the GameScript will run all the way through without crashing the game.
Bug 2:GSRoad.RemoveRoad() and GSRoad.RemoveRoadFull() don't seem to work when building as the game.
- Attachments
-
- WMTest-GS-20111220.zip
- Test Script
- (3.27 KiB) Downloaded 70 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
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 - v1.5
For the GSNews class:
Is it possible to implement a listener the news item when it is clicked, hovered, etc. That way, when the listener is activated, the game script could move the viewport or any other action the developer desires.
EDIT:
Since event listeners could involve creating threads, possibly a new GSEventNewsAction or similar?
Is it possible to implement a listener the news item when it is clicked, hovered, etc. That way, when the listener is activated, the game script could move the viewport or any other action the developer desires.
EDIT:
Since event listeners could involve creating threads, possibly a new GSEventNewsAction or similar?
Re: NoGo - A Scriptable Game Framework - v1.5
When I tried to add goals to the goal window I found out that it shows the goal of all companies without including a column with the company name. Is it per design that it is up to the GS to clarify for which company that the company specific goal are for?
In TransportGoals I have explicitly included this information in my strings. However, I see that CityDomination 2 doesn't do that.
For most players it is perhaps an idea to simply hide the company specific goals of other players. Only GS developers will be interested in seeing the goals of all companies.
Another thing is that the API doesn't allow marking a goal as done, only removal of it.
In TransportGoals I have explicitly included this information in my strings. However, I see that CityDomination 2 doesn't do that.
For most players it is perhaps an idea to simply hide the company specific goals of other players. Only GS developers will be interested in seeing the goals of all companies.
Another thing is that the API doesn't allow marking a goal as done, only removal of it.
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 - v1.5
I think it would be good if the GSNews API allows passing a tile location along with the news message that is viewed if the user clicks on the news item. This way there will not be a delay between the user clicking on the news item and the Game Script reacting. Since a GS can only poll for events it can not always be instant enough to react directly on clicks.11Runner wrote:For the GSNews class:
Is it possible to implement a listener the news item when it is clicked, hovered, etc. That way, when the listener is activated, the game script could move the viewport or any other action the developer desires.
EDIT:
Since event listeners could involve creating threads, possibly a new GSEventNewsAction or similar?
I would also say that it is easier for the script if that data can be passed along to OpenTTD than having to store a news ID along with tile somewhere to be able to react on a news click event.
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 - v1.5
Huh? The Goal GUI API has a parameter 'company'. If it is COMPANY_INVALID, it shows under 'global goals'. If you are the company, you see it under 'company goals'. If it is not for your company, you don't see it at all. And if it doesn't work like that, please let me know, as that would be a bugZuu wrote:When I tried to add goals to the goal window I found out that it shows the goal of all companies without including a column with the company name. Is it per design that it is up to the GS to clarify for which company that the company specific goal are for?
In TransportGoals I have explicitly included this information in my strings. However, I see that CityDomination 2 doesn't do that.
For most players it is perhaps an idea to simply hide the company specific goals of other players. Only GS developers will be interested in seeing the goals of all companies.
Another thing is that the API doesn't allow marking a goal as done, only removal of it.
As by documentation btw: http://nogo.openttd.org/api/trunk/class ... d61297d54f
So I don't really get what you try to say. Examples etc are much appreciated with such reports, as then I know we are talking about the same
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework - v1.5
After some IRC time: fixed in r23665.
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework - v1.5
TrueBrain, thanks - this is great. I'm really enthusiastic about being able to build for other companies. Are there any GSs already that make use of this function? If not, how to implement it?
Re: NoGo - A Scriptable Game Framework - v1.5
Tutorial places signs as the first company.
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 - v1.5
Is it the intention to have a maximum of 15 goals (1 goal per company)? It seems that when my script tries to create for than 15, it fails (and GSError.GetLastErrorString() is unuseful ).
Re: NoGo - A Scriptable Game Framework - v1.5
Nope. Time for you to go to http://bugs.openttd.org/ and report what you are doing (small scripts are best scripts)
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework - v1.5
Is it possible to add a script to a running game?
And yes, I won't complain when it crashes.
And yes, I won't complain when it crashes.
Re: NoGo - A Scriptable Game Framework - v1.5
Is it possible with NoGo script to place towns and industries in the Scenario Editor based on list of coordinates?
Re: NoGo - A Scriptable Game Framework - v1.5
No to both.
NoGo only works on newgames, not in scenario editor
NoGo scripts can only be started with a new game, not with a running.
NoGo only works on newgames, not in scenario editor
NoGo scripts can only be started with a new game, not with a running.
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework - v1.5
It has been a while since I last gave NoGo a real update. Today is one of these days.
I added GSGoal.Question, where you can push a question window to a company (all clients of that company), or to call companies. The text inside can be anything you like. You can select at most 3 out of the 18 possible buttons to show. When the user clicks it, you get an event, which you can then handle.
Optionally, you can close the question on all clients, for example for timeout reasons.
Every question has an unique id, which you can control from your GS. It is possible to open many many questions at once; feel free.
Be a bit aware of the fact that in coop-network-games it is possible that you receive two replies from the same company. Filter on it if you have to. This is unavoiable.
The list of buttons:
BUTTON_CANCEL
BUTTON_OK
BUTTON_NO
BUTTON_YES
BUTTON_DECLINE
BUTTON_ACCEPT
BUTTON_IGNORE
BUTTON_RETRY
BUTTON_PREVIOUS
BUTTON_NEXT
BUTTON_STOP
BUTTON_START
BUTTON_GO
BUTTON_CONTINUE
BUTTON_RESTART
BUTTON_POSTPONE
BUTTON_SURRENDER
BUTTON_CLOSE
If you can come up with other useful texts, we can have up to 32 buttons. So we have a few to go. Let me know what you think about this, and enjoy
PS: it will be in tonights nightly
I added GSGoal.Question, where you can push a question window to a company (all clients of that company), or to call companies. The text inside can be anything you like. You can select at most 3 out of the 18 possible buttons to show. When the user clicks it, you get an event, which you can then handle.
Optionally, you can close the question on all clients, for example for timeout reasons.
Every question has an unique id, which you can control from your GS. It is possible to open many many questions at once; feel free.
Be a bit aware of the fact that in coop-network-games it is possible that you receive two replies from the same company. Filter on it if you have to. This is unavoiable.
The list of buttons:
BUTTON_CANCEL
BUTTON_OK
BUTTON_NO
BUTTON_YES
BUTTON_DECLINE
BUTTON_ACCEPT
BUTTON_IGNORE
BUTTON_RETRY
BUTTON_PREVIOUS
BUTTON_NEXT
BUTTON_STOP
BUTTON_START
BUTTON_GO
BUTTON_CONTINUE
BUTTON_RESTART
BUTTON_POSTPONE
BUTTON_SURRENDER
BUTTON_CLOSE
If you can come up with other useful texts, we can have up to 32 buttons. So we have a few to go. Let me know what you think about this, and enjoy
PS: it will be in tonights nightly
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework - v1.5
Since there is no guarantee that you get a response when a user clicks one of the buttons, I think it would be useful to have something like GSGoal::IsQuestionOpen(uniqueId).
(also posted to FlySpray, tagged as a NoGo feature request)
(also posted to FlySpray, tagged as a NoGo feature request)
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 - v1.5
Just time out after a while and close the window (with CloseQuestion). Much more robust solution tbh
For tutorial you can just use GSWindow of course.
For tutorial you can just use GSWindow of course.
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoGo - A Scriptable Game Framework - v1.5
Hi trueBrain,
Very nice feature, thanks.
I would like to suggest two buttons :
BUTTON_HELP
BUTTON_INFO
Regards
Very nice feature, thanks.
I would like to suggest two buttons :
BUTTON_HELP
BUTTON_INFO
Regards
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: NoGo - A Scriptable Game Framework - v1.5
Very Cool TrueBrain.
What about a button that would let you select a tile? (or at least reserve a spot of such a button and implement it later).
What about a button that would let you select a tile? (or at least reserve a spot of such a button and implement it later).
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: No registered users and 1 guest