Page 1 of 1
Where is the code that runs reaction fire?
Posted: Sun Jun 09, 2013 7:39 pm
by GottaLove88s
Hi Gents,
Does anyone know where the code is that executes reaction fire?
Specifically the code that tests 'AmbushSkill' to decide whether a firing unit has been seen or not?
Thanks!
GL88
Re: Where is the code that runs reaction fire?
Posted: Mon Jun 10, 2013 8:09 am
by rf900
The code that checks if a unit is spotted is in CombatTools:
FUNCTION AmbushCheck (me, unit )
Re: Where is the code that runs reaction fire?
Posted: Mon Jun 10, 2013 2:58 pm
by pipfromslitherine
Reaction fire is an optional function for any order - the fn that gets called to score a reaction is in the same file as the action (IIRC only AP and HE actually have reaction fire, though I wait breathlessly to be proven wrong...

)
Cheers
Pip
Re: Where is the code that runs reaction fire?
Posted: Tue Jun 11, 2013 12:11 am
by GottaLove88s
Thanks Pip/Rf,
Am trying to improve how reaction fire works during the nighttime phase of the Dieppe scenario... so that
i) chances of ambushing (ie. not being detected) are doubled at night
ii) accuracy is halved at night
It sounds like I can make that happen with Combat Tools, AP and HE bsfs... right?
Will give it a go!

Re: Where is the code that runs reaction fire?
Posted: Tue Jun 11, 2013 3:12 pm
by pipfromslitherine
Yes, it is all accessible in the scripts.
Cheers
Pip
Re: Where is the code that runs reaction fire?
Posted: Wed Jun 12, 2013 12:33 am
by GottaLove88s
Looking in FIRE_AP.BSF, I don't see any reference to the Accuracy stats from squads.csv
Is the Accuracy data used anywhere?
Re: Where is the code that runs reaction fire?
Posted: Wed Jun 12, 2013 3:24 pm
by pipfromslitherine
I can't tell you off the top of my head. Notepad++'s Find in Files is your friend
Cheers
Pip
Re: Where is the code that runs reaction fire?
Posted: Wed Jun 12, 2013 3:55 pm
by GottaLove88s
Is Notepad++ available on Mac?
I'm just using the 'Find' in TextEdit and it shows zero hits searching for 'Accuracy' with FIRE_AP.BSF open (but, knowing me, this may not be the best way to do it, sorry!

)
Which made me wonder if the accuracy stats are legacy from an earlier version? And not actually used in the current?
Or perhaps more likely, accuracy stats could be being applied in calculations somewhere else...?
Re: Where is the code that runs reaction fire?
Posted: Wed Jun 12, 2013 5:35 pm
by pipfromslitherine
I don't think Notepad++ is available on OSX, but I am sure someone has a recommendation for an alternative. You need something that is able to search (e.g.) all the BSF files in the game folder, as often work is being done in functions living in other files.
Cheers
Pip
Re: Where is the code that runs reaction fire?
Posted: Wed Jun 12, 2013 9:15 pm
by Richcat
GL88 found this for mac, which maybe of use. Haven't tried it as don't have a mac.
http://www.barebones.com/products/textwrangler/
Re: Where is the code that runs reaction fire?
Posted: Fri Jun 14, 2013 7:34 am
by GottaLove88s
Thanks Richcat! TextWrangler looks great (quite a step up from TextEdit and it's free too!

). Will test it out tonight...