Page 1 of 1
libMilesX86 plug in crash on Mac
Posted: Sun Apr 21, 2013 10:31 pm
by GottaLove88s
Guys,
I've updated the GJS'44 user-gen maps with some new features and I'm getting some strange errors...
- 152mm Coastal Gun and Fairmile_B (which I've reconfigured as an S-class destroyer) are both taking reaction shots despite setting APreaction and HEreaction to 0 in squads.csv (they also show the red, reaction shot bullet in their icon data summary)
- When the destroyers execute a (supposedly disabled) reaction fire/ambush they sometimes trigger a "BA quit unexpectedly" (while using plug-in libMilesX86.dylib) error that crashes the game
Any ideas how I can fix this?
Re: Units with no APreaction or HEreaction are still ambushi
Posted: Mon Apr 22, 2013 10:22 am
by GottaLove88s
The scenario that's getting the libMilesX86.dylib error is available here ->
viewtopic.php?f=87&t=42094&p=396652#p396650
You can trigger it in Sword, Ouistreham or Caen, by moving any unit into LOS of a destroyer or a Vorpostenboote. The warship will "see" you and crash the game (not sure why, since reaction fire has been disabled in squads.csv)
Re: libMilesX86 plug in crash on Mac
Posted: Mon Apr 22, 2013 4:10 pm
by AndrewGardner
I assume you mean APReactionRange and HEReactionRange? On a quick scan through the scripts, I don't actually see APReactionRange actually being used. You might try customizing REACT_UNIT_FIREAP in Fire_AP.bsf to add a test for it (return -1 to not react) if it is specifically AP reaction shots that you are seeing.
I haven't had a chance to try to duplicate the crash. The lib you mention is an audio lib, so if you have hooked up any custom sound effects to the new units, that would be a place to start looking.
Re: libMilesX86 plug in crash on Mac
Posted: Mon Apr 22, 2013 8:55 pm
by GottaLove88s
Huge thanks Andrew, The hint that the lib was a sound library was just what I needed.

I had borrowed two unused BA sounds, allocating them new IDs 310 and 311 for the destroyer's deck guns... Now the grunts in the DUKWs can really hear shells whistling overhead, lol... Playing around, the answer was simple. I'd put my revised SFX0.TXT file in the wrong place. Doh!

With that fixed, it doesn't crash anymore...
But on the other note, I thought that APReactionRange and HEReactionRange used to work with previous versions of BA? Was this taken out when the new code was added to put in the red reaction bullet? If we can't do it via squads.csv anymore, is there an easy method to prevent certain unit IDs from reacting? Will I have to add some condition to the FireAP.bsf and FireHE.bsf to prevent certain unit IDs from reacting?
Re: libMilesX86 plug in crash on Mac
Posted: Tue Apr 23, 2013 4:23 pm
by pipfromslitherine
It's entirely possible that the attribs were never used - or certainly not for a while. Most of the reaction logic now works on likelyhood of a kill verses shots left. You'd have to do a check on the 1.3 scripts I guess
It wasn't altered for the latest version(s) for sure.
Cheers
Pip
Re: libMilesX86 plug in crash on Mac
Posted: Tue Apr 23, 2013 4:32 pm
by AndrewGardner
The HE reaction check uses HEReactionRange, so it would just be the AP version you would want to customize.
GetAttrib(me, "APReactionRange") will get the value from the csv as normal.