Where is the code that runs reaction fire?
Moderators: Slitherine Core, BA Moderators
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Where is the code that runs reaction fire?
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
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
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Re: Where is the code that runs reaction fire?
The code that checks if a unit is spotted is in CombatTools:
FUNCTION AmbushCheck (me, unit )
FUNCTION AmbushCheck (me, unit )
-
pipfromslitherine
- Site Admin

- Posts: 9928
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Where is the code that runs reaction fire?
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
Cheers
Pip
follow me on Twitter here
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Where is the code that runs reaction fire?
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!

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!
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
pipfromslitherine
- Site Admin

- Posts: 9928
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Where is the code that runs reaction fire?
Yes, it is all accessible in the scripts.
Cheers
Pip
Cheers
Pip
follow me on Twitter here
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Where is the code that runs reaction fire?
Looking in FIRE_AP.BSF, I don't see any reference to the Accuracy stats from squads.csv
Is the Accuracy data used anywhere?
Is the Accuracy data used anywhere?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
pipfromslitherine
- Site Admin

- Posts: 9928
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Where is the code that runs reaction fire?
I can't tell you off the top of my head. Notepad++'s Find in Files is your friend 
Cheers
Pip
Cheers
Pip
follow me on Twitter here
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Where is the code that runs reaction fire?
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...?
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...?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
pipfromslitherine
- Site Admin

- Posts: 9928
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Where is the code that runs reaction fire?
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
Cheers
Pip
follow me on Twitter here
Re: Where is the code that runs reaction fire?
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/
http://www.barebones.com/products/textwrangler/
Cheers
Richcat
Richcat
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Where is the code that runs reaction fire?
Thanks Richcat! TextWrangler looks great (quite a step up from TextEdit and it's free too!
). Will test it out tonight...
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347

