BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Incorrect plugin behavior? (all Openbve versions)

2 posters

Go down

Incorrect plugin behavior? (all Openbve versions) Empty Incorrect plugin behavior? (all Openbve versions)

Post by Delsin Fri Dec 04, 2020 7:02 pm

So I've known of this for years since it's been in every Openbve build I've tried, but only now realized it might be a bug in how it handles plugin functions.
Some Japanese trains (mostly those in Tokyo Metro and nearby) have a built-in departure sound similar to station melodies with the same purpose, while on it plays a buzzer/looped music bit, once off it runs a "doors closing" announcement once or twice. In BVE this is often reproduced with a Metro plugin - buzzer is set as music horn and the plugin plays the announcement on every 2nd music horn key activation (= when the looped sound is turned off), however, in Openbve it triggers on secondary horn instead.

Train examples: https://cdn.discordapp.com/attachments/707013713500045334/707030786116681798/trta.zip
(use 7000 series only, 6000 is incomplete and 9000 uses a different plugin)

Plugin page: http://nozomi.vc/71_ats/index.htm
Delsin
Delsin

Posts : 284
Join date : 2016-08-20

Back to top Go down

Incorrect plugin behavior? (all Openbve versions) Empty Re: Incorrect plugin behavior? (all Openbve versions)

Post by leezer3 Sat Dec 05, 2020 4:47 pm

When the horn is played, we call the legacy plugin HornBlow interface here:
https://github.com/leezer3/OpenBVE/blob/master/source/OpenBVE/System/Plugins/LegacyPlugin.cs#L379

As this takes a raw integer as a parameter, we cast the 'friendly' enum API horn type.
https://github.com/leezer3/OpenBVE/blob/master/source/OpenBveApi/Runtime/Train/HornTypes.cs

Here, the horns are numbered:
0 - Primary
1 - Secondary
2 - Music

This matches Mackoy's ATSPlugin spec file here:
http://bvets.net/old/make4/atsplugin.h

I've run through this in the debugger, and it's definitely working to spec.

I could do with some more specific English driving instructions & / or a correctly setup route to see what the plugin is doing though.
Loaded this on the Odaykufan ATC test route.
Hit 8 to insert the master key.
The instructions seem to suggest it should work from there as per a normal train.
I've also tried all 3 modes on the second switch & pressing DEL to reset the chime (Was assuming ATC from there would work) but nothing.

It doesn't trigger the looped bit you're talking about either, but presumably it needs the cab setup for that.


I don't *think* this is an OpenBVE bug at the minute.

leezer3

Posts : 1785
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Incorrect plugin behavior? (all Openbve versions) Empty Re: Incorrect plugin behavior? (all Openbve versions)

Post by Delsin Sun Dec 06, 2020 2:18 am

It's different from Odakyufan's stuff, it uses its own ATC system.
Try this route and train, they use the same plugin.

https://web.archive.org/web/20130217091503/http://shtr-m.net/bve/data/ginza2_11.zip
https://web.archive.org/web/20130217091350/http://shtr-m.net/bve/data/trta01_ver2_11.zip

Startup: ensure the handle is in Emergency and reverser is in Neutral, press 8 to turn on the key and you should be able to drive.
The buzzer thing activates in the same way (music horn)
Delsin
Delsin

Posts : 284
Join date : 2016-08-20

Back to top Go down

Incorrect plugin behavior? (all Openbve versions) Empty Re: Incorrect plugin behavior? (all Openbve versions)

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum