Elvas Tower: Activities: decouple OR-specific features from base .act file - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Activities: decouple OR-specific features from base .act file Rate Topic: -----

#1 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 12 September 2017 - 02:16 AM

Open Rails has four specific activity extensions that involve modifying the .act file, that is:
- flag to have AI trains activating horn before crossings
- dynamic weather
- activity-specific sounds (location based or time based)
- event message window disappearing after time interval.
The disadvantage of the actual situation is that, if an .act file containing such features is opened, modified and saved with the MSTS AE, such OR-specific extensions are lost, so that you have to manually re-insert that parts every time.
A solution for that is to use the same solution found to insert OR-specific features in the tsection.dat or in the world files, that is to create an Openrails subfolder in the Route's Activities folder, and to insert there an .act file with the same name of the base file and containing only the OR-specific extensions.
I have created and tested a beta version for that, and it works satisfactorily and, yes, much time can be spared in activity creation.

Here are the zipped .exe and .dll files to have this operating in x.3951


and here is an example of a base and the additional .act file, to show the syntax of the additional .act file


It remains possible to insert the OR-specific features in the base .act file (with the above mentioned disadvantage).

Blueprint here https://blueprints.l...ension-act-file .
Trello box here https://trello.com/c...ension-act-file . Pls. vote!

26/4/2018: Files deleted because feature committed

#2 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 12 September 2017 - 03:51 AM

View PostCsantucci, on 12 September 2017 - 02:16 AM, said:

It remains possible to insert the OR-specific features in the base .act file (with the above mentioned disadvantage).

And please don't remove this feature because my AE will handle OR features in .act file.

#3 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,442
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 12 September 2017 - 07:19 AM

Wonderful advancement Carlo, Thanks.
"edit - later that day"
Whoops, spoke too soon. Now I'm not so sure...it does not operate like an include file...because of the complexities of the act file. I downloaded and looked at your examples.

For some reason I thought the act file in the OpenRails folder would look like this...but I think I understand why it cannot work this way? It's not like inserting the "forest clear" parameter in the inc file for the route nor wagon include files.

include ( "..\\Testweather_newformat.act" )
Tr_Activity (
   	Tr_Activity_File (
   	Events (
 		ORTSContinue ( 15 )
)
)
)


#4 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,350
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 23 September 2017 - 04:26 PM

Please talk to Chris and get a copy of his notes on extended features for activities (several years old by now) as there are lots of good ideas there. There may also be ideas in the features portion of your private forum.

#5 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 23 September 2017 - 11:40 PM

Gerry,
I saw only today that you added a second part to your post above. You're right, this extension has not the syntax of an include file; rather it is built like the .w file extensions. There is a reason for that: the main OR extensions to the .act refer to the Events block. However include files would require that you should repeat the whole Events block (like in .eng files you must repeat the whole Lights block if you want to change something inside). Repeating the whole Events block is not comfortable at all, because if you e.g. add or modify with the MSTS AE events, you should every time do the same with the extension .act file. This way you only need to leave in such extension file the additional parameters.

I'm presently keeping this feature on hold, because if Goku generates a good new AE, the feature loses its main purpose.

Dave,
is your post directed to me? If yes, thank you.

#6 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 24 April 2018 - 12:34 PM

The feature has been uploaded in x.4120.
Manual will be updated accordingly.

#7 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 26 April 2018 - 08:30 AM

Manual updated in x.4124.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users