[Request]ADS & Smart Turret compatibility
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
[Request]ADS & Smart Turret compatibility
Thanks for reading my topic.
There is a request,I'm using Smart Turrets instead of MARS.I want to setting turret mode in ADS,it should be in anarkis.acc.setup.ships.xml at line 76-77,but I don't know how to change MARS variable to Smart turrets.Please help me.
There is a request,I'm using Smart Turrets instead of MARS.I want to setting turret mode in ADS,it should be in anarkis.acc.setup.ships.xml at line 76-77,but I don't know how to change MARS variable to Smart turrets.Please help me.
- anachron13
- Posts: 144
- Joined: Tue, 2. Nov 10, 23:41
You have to modify at least two scripts actually, first in anarkis.acc.setup.ships.xml, add something like this after the check for MARS (should be after line 84 which contain 'end' :
then in anarkis.acc.apply.settings, add this between line 46 and 47 :
And finally add this to the 8510-L0XX (XX depending of your language settings) t files :
You can add the others smart commands if needed, you will have to find the correct script to launch. If you don't want to edit the t file you can also use the sprint: fmt='text you want' command instead of sprintf: pageid=
Code: Select all
$smart.check = get global variable: name='Glen.Smart.Turret'
if is datatype[$smart.check] == [DATATYPE_ARRAY]
$st = sprintf: pageid=$page.id textid=261, null, null, null, null, null
add custom menu item to array $menu: text=$st returnvalue=261
$st = sprintf: pageid=$page.id textid=262, null, null, null, null, null
add custom menu item to array $menu: text=$st returnvalue=262
end
Code: Select all
else if $v1 == 261
$turret.script = 'glen.turret.smart.cmd.offense'
else if $v1 == 262
$turret.script = 'glen.turret.smart.cmd.defense'
Code: Select all
<t id="261">\033GSmart:\033X Offense</t>
<t id="262">\033GSmart:\033X Defense</t>
Sorry,I didn't make things clear.
I also installed Nicoman35's Real Wings Edition.
I followed your instruction,there are only three options to choose,smart turret option not included.
Edit:I think I need to change anarkis.acc.apply.settings.xml,they are not the same file between origin ADS and Real Wings Edition.
I also installed Nicoman35's Real Wings Edition.
I followed your instruction,there are only three options to choose,smart turret option not included.
Edit:I think I need to change anarkis.acc.apply.settings.xml,they are not the same file between origin ADS and Real Wings Edition.
- anachron13
- Posts: 144
- Joined: Tue, 2. Nov 10, 23:41
I have done it!Understand this script and do some replacement with your code
anarkis.acc.apply.settings.xml
anarkis.acc.setup.ships line 76
t file 8510
Works fine now!Thank you.
anarkis.acc.apply.settings.xml
Code: Select all
if $turret.script == 0
while $turret.count > 1
dec $turret.count
skip if $ship-> is script 'glen.turret.smart.cmd.offense' on stack of task=$turret.count
$ship-> launch named script: task=$turret.count scriptname='glen.turret.smart.cmd.offense' prio=0, $turret.count, null, null, null, null
end
else if $turret.script == 1
while $turret.count > 1
dec $turret.count
skip if $ship-> is script 'glen.turret.smart.cmd.attack.target' on stack of task=$turret.count
$ship-> launch named script: task=$turret.count scriptname='glen.turret.smart.cmd.attack.target' prio=0, $turret.count, null, null, null, null
end
else if $turret.script == 2
while $turret.count > 1
dec $turret.count
skip if $ship-> is script 'glen.turret.smart.cmd.defense' on stack of task=$turret.count
$ship-> launch named script: task=$turret.count scriptname='glen.turret.smart.cmd.defense' prio=0, $turret.count, null, null, null, null
end
else if $turret.script == 3
while $turret.count > 1
dec $turret.count
skip if $ship-> is script 'glen.turret.smart.cmd.capture' on stack of task=$turret.count
$ship-> launch named script: task=$turret.count scriptname='glen.turret.smart.cmd.capture' prio=0, $turret.count, null, null, null, null
end
else if $turret.script == 4
while $turret.count > 1
dec $turret.count
skip if $ship-> is script 'glen.turret.smart.cmd.custom' on stack of task=$turret.count
$ship-> launch named script: task=$turret.count scriptname='glen.turret.smart.cmd.custom' prio=0, $turret.count, null, null, null, null
* Debug
if $DEBUG == 1
$txt = $info + $ship + ' turret number: ' + $turret.count + ' is set to Smart Turrets.'
write to log file 8510 append=[TRUE] value=$txt
end
end
else
while $turret.count > 1
dec $turret.count
skip if $ship-> is script 'glen.turret.smart.cmd.offense' on stack of task=$turret.count
$ship-> launch named script: task=$turret.count scriptname='glen.turret.smart.cmd.offense' prio=0, $turret.count, null, null, null, null
end
end
Code: Select all
$mars.check = get global variable: name='Glen.Smart.Turret'
Code: Select all
<t id="245">\033GSmart:\033X Offense</t>
<t id="246">\033GSmart:\033X Attack My Target</t>
<t id="247">\033GSmart:\033X Defense</t>
<t id="248">\033GSmart:\033X Capture</t>
<t id="249">\033GSmart:\033X Custom</t>
Well done, I'd wondered about this myself a few months ago but never got around to looking at it.
You should let Nicoman35 know on http://forum.egosoft.com/viewtopic.php? ... 6&start=75 so he can incorporate your changes in his next version.
You should let Nicoman35 know on http://forum.egosoft.com/viewtopic.php? ... 6&start=75 so he can incorporate your changes in his next version.