Flares00.txt

These are the solar flare files for the human player in the sandbox. I have added my comments in dark red. Include file text is added in dark green. These comments are based on my own analysis of the code and my experience in working with it. I do not have any special inside information from MuckyFoot about these files, and I may in some instances be wrong.

;SOLARFLARE*********************************************************************
; This file loades the elements :flaremain and :flarecreate from just one of the files
; based on the sandbox setting for frequency of flares.
; To use this in a custom mission, make a copy of this file and replace 
; the file includes with :flaremain and :flarecreate from just one of the files.

{missions\00\flares000.txt|OPT_FLARES=0}
; Never
:flaremain
if
	turn > flareevent
then
	disable
end
; This element is absolutely identical for all four includes files!
:flarecreate
if
	0
then
	set flarecounter (turn + 2000)
	incoming stellar_event respond flare within 1900 skill ((rnd%10000) + 100) "events_flare01"
;	status_message "DEBUG ** Solar flare has been created ** DEBUG"
	disable
end
{missions\00\flares001.txt|OPT_FLARES=1}
; Low Frequency
:flaremain
if
	turn > flareevent
then
	multitrigger :flarecreate
	set flareevent ((turn + 6000) + ((decksegmentcount / players) * 3000))
end
; This element is absolutely identical for all four includes files!
:flarecreate
if
	0
then
	set flarecounter (turn + 2000)
	incoming stellar_event respond flare within 1900 skill ((rnd%10000) + 100) "events_flare01"
;	status_message "DEBUG ** Solar flare has been created ** DEBUG"
	disable
end
{missions\00\flares002.txt|OPT_FLARES=2}
; Medium Frequency
:flaremain
if
	turn > flareevent
then
	multitrigger :flarecreate
	set flareevent ((turn + 4000) + ((decksegmentcount / players) * 2000))
end
; This element is absolutely identical for all four includes files!
:flarecreate
if
	0
then
	set flarecounter (turn + 2000)
	incoming stellar_event respond flare within 1900 skill ((rnd%10000) + 100) "events_flare01"
;	status_message "DEBUG ** Solar flare has been created ** DEBUG"
	disable
end
{missions\00\flares003.txt|OPT_FLARES=3}
; High Frequency
:flaremain
if
	turn > flareevent
then
	multitrigger :flarecreate
	set flareevent ((turn + 2000) + ((decksegmentcount / players) * 1000))
end
; This element is absolutely identical for all four includes files!
:flarecreate
if
	0
then
	set flarecounter (turn + 2000)
	incoming stellar_event respond flare within 1900 skill ((rnd%10000) + 100) "events_flare01"
;	status_message "DEBUG ** Solar flare has been created ** DEBUG"
	disable
end

:flareignore
if
	flare < 2
then
	set flare 3
end

:flareaccept
if
	flare = 2
then
	set flareaccept 1
	addenergy 5
end

:flareover
if
	flarecounter > 0
	flarecounter < turn
then
	set flare 3
end

:flareuse
if
	flareaccept = 1
	flarecounter < turn
then
	status_message "events_flare02"
	set flareaccept 0 
end