How can I read the game mode in action 2?
Moderator: Graphics Moderators
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
How can I read the game mode in action 2?
In action 7 I can read the mode
92 B Game mode, 0 in title screen, 1 in game and 2 in editor
how can I do it in action D or 2?
92 B Game mode, 0 in title screen, 1 in game and 2 in editor
how can I do it in action D or 2?
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: How can I read the game mode in action 2?
In action D, it is easy to do.
It would be patch's variable 14, same encoding as for var 92, action 7.
As for action 2...
http://wiki.ttdpatch.net/tiki-index.php ... nalAction2, variable 21?
AS far as i know, there is no other means. But i may be wrong.
It would be patch's variable 14, same encoding as for var 92, action 7.
As for action 2...
http://wiki.ttdpatch.net/tiki-index.php ... nalAction2, variable 21?
AS far as i know, there is no other means. But i may be wrong.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: How can I read the game mode in action 2?
Ok.belugas wrote:In action D, it is easy to do.
It would be patch's variable 14, same encoding as for var 92, action 7.
As for action 2...
http://wiki.ttdpatch.net/tiki-index.php ... nalAction2, variable 21?
AS far as i know, there is no other means. But i may be wrong.
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: How can I read the game mode in action 2?
hemmm...
Sorry, but i meant that these would be new features, not currently available ones...
Sorry, but i meant that these would be new features, not currently available ones...
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: How can I read the game mode in action 2?
I understood your post as you've added this task to your todo list. Was I mistaken?belugas wrote:hemmm...
Sorry, but i meant that these would be new features, not currently available ones...
Re: How can I read the game mode in action 2?
George:
You can access every variable from Action7/9 also in ActionD.
To use them in VarAction2 just copy variable 0x92 to a free 'parameter'-variable (0x00-0x7F) and use it through varaction2 variable 0x7F[...]
So we decided that there is no need to add new things.
Speaking for the OTTD-devs. Regards frosch.
You can access every variable from Action7/9 also in ActionD.
To use them in VarAction2 just copy variable 0x92 to a free 'parameter'-variable (0x00-0x7F) and use it through varaction2 variable 0x7F[...]
So we decided that there is no need to add new things.
Speaking for the OTTD-devs. Regards frosch.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: How can I read the game mode in action 2?
How?frosch wrote:You can access every variable from Action7/9 also in ActionD.
Re: How can I read the game mode in action 2?
NewGrfSpecs wrote: target, source1, source2
These bytes specify the target parameter and source parameters. They can either be simply the numbers of grf parameters, or they can be the special variables from action 7, see the description of param-num there.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: How can I read the game mode in action 2?
Ok, thank you.frosch wrote:NewGrfSpecs wrote:target, source1, source2
These bytes specify the target parameter and source parameters. They can either be simply the numbers of grf parameters, or they can be the special variables from action 7, see the description of param-num there.
Re: How can I read the game mode in action 2?
You can also access every 7/9/D variable in action 2.frosch wrote:You can access every variable from Action7/9 also in ActionD.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: How can I read the game mode in action 2?
That does not seem to be documented.
So is VarAction2 variable 'i' identical to Action7/9/D variable '0x80 + i' for 'i' in 0x00 to 0x3F ?
So is VarAction2 variable 'i' identical to Action7/9/D variable '0x80 + i' for 'i' in 0x00 to 0x3F ?
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: How can I read the game mode in action 2?
It's documented only in that there's a suspicious correspondence between the global action 2 variables and the action 7/9/D variables.
And correct.
And correct.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: How can I read the game mode in action 2?
NFOrenum reports var 12 unknownDaleStan wrote:It's documented only in that there's a suspicious correspondence between the global action 2 variables and the action 7/9/D variables. And correct.
Re: How can I read the game mode in action 2?
Why wasn't it explicitly documented, out of interest?DaleStan wrote:It's documented only in that there's a suspicious correspondence between the global action 2 variables and the action 7/9/D variables.
No-one's more important than the earthworm.
Re: How can I read the game mode in action 2?
Because there's a nebulous idea that we might someday split the action 2 globals from the 7/9/D globals, and the fewer variables are actually documented as working both places, the more space we can generate from the split.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: How can I read the game mode in action 2?
why not to make such change from GRF version 8 (9, 10 ...)? In the current version (7) it works this way - so it should go to documentation.DaleStan wrote:Because there's a nebulous idea that we might someday split the action 2 globals from the 7/9/D globals, and the fewer variables are actually documented as working both places, the more space we can generate from the split.
We already had changes between version 6 and 7, so why not to use this solution in the future?
Re: How can I read the game mode in action 2?
That would work too, I suppose.George wrote:why not to make such change from GRF version 8?
Invalid argument. In earlier versions, the feature byte for 1/2/3 chains didn't actually have to match. Should that have been documented too?George wrote:In the current version (7) it works this way - so it should go to documentation.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: How can I read the game mode in action 2?
I suppose yes.DaleStan wrote:Invalid argument. In earlier versions, the feature byte for 1/2/3 chains didn't actually have to match. Should that have been documented too?George wrote:In the current version (7) it works this way - so it should go to documentation.
I mean I'm using var 12 in action 2 in my current versions of the GRF files, it works, so I would like to be sure that this will be not broken in the next version without a warning (changing the appropriate wiki page counts as this warning

Re: How can I read the game mode in action 2?
Any GRF file that obeys the current documentation will continue to work with all future versions of TTDPatch, unless Patchman decides differently.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: How can I read the game mode in action 2?
Current documentation does not declare var 12 for action 2 as game mode. NFOrenum counts it as error 86.DaleStan wrote:Any GRF file that obeys the current documentation will continue to work with all future versions of TTDPatch, unless Patchman decides differently.
Who is online
Users browsing this forum: Bing [Bot] and 16 guests