[SCRIPT][AP][TC] Advanced Fight Scripts - v. 3.1, 19.01.2014
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 681
- Joined: Thu, 17. Nov 05, 13:12
Anyone got an idea where I can post a skript on a site like wikipedia, where you see the script and anyone is able to make comments? Just looked at wiki, but it seems quite complicated to me to write an article (has to be approved, corrections or comments have to be approved and such).
I am looking for something like pastebin, but where the article lasts and anyone can contribute.
ps.
sorry Cronos, only this question, then you have your thread back.
I am looking for something like pastebin, but where the article lasts and anyone can contribute.
ps.
sorry Cronos, only this question, then you have your thread back.
-
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Nicoman35 wrote:I am looking for something like pastebin, but where the article lasts and anyone can contribute.
I looked around for Wiki support a while back. There is the X3Wiki, but the owners were not enthusiastic about the thought of my posting modding information.
I did get an "OK" at theStarport.net. It is the best Freelancer site, and they have a gorgeous Developer's "Forge" which has version control, private forums, downloads, ftp, and wiki support... all for your project.
Tell w0dk4 (the owner) that Bullwinkle sent you.
(or code.google.com or github)
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
-
- Posts: 140
- Joined: Tue, 12. Apr 11, 22:12
Marry Christmas
Here is promised pictures (in form of movie) of missing shots:
http://youtu.be/cVK1JjrlLy8
The big ship is Tempest (XRM added) - not moving.
Aggressors are Advanced Kha'ak ships (XRM added).
All ships can be finded also in X-TRA ships pack by Cadius.
Here is promised pictures (in form of movie) of missing shots:
http://youtu.be/cVK1JjrlLy8
The big ship is Tempest (XRM added) - not moving.
Aggressors are Advanced Kha'ak ships (XRM added).
All ships can be finded also in X-TRA ships pack by Cadius.
-
- Posts: 1466
- Joined: Wed, 16. Nov 11, 18:37
I just did a test of my own and figured out that the above only happens when your not firing back at the incoming fighters. Basically they get stuck in a spot and don't end up moving to dodge incoming fire.
I then turned on turrets and started firing at incoming M3s and everything worked perfectly. The interesting thing was I realized that with this set up a "Charge Target" Command would be helpful for when a target is really low life and you just want your ship to charge it and hit it 100%.
I then turned on turrets and started firing at incoming M3s and everything worked perfectly. The interesting thing was I realized that with this set up a "Charge Target" Command would be helpful for when a target is really low life and you just want your ship to charge it and hit it 100%.
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
Merry Christmas everyone.
Thanks for the video Viliae! This might be caused by a safety setting I put in. If a ship can't determine what a turret is doing, it will assume the turret is firing on it. What happens is that if a ship has weapons installed and no turret scripts running, the script doesn't know what the turrets are doing. This is causing every ship in range of any turret to constantly consider itself under attack. I think I'll change this for the upcoming version.
What I don't quite understand is what the fighter is doing there. It's obvious from the shooting and the speed that the ship is constantly alternating between attacking and not attacking. I'll recreate that scenario and see if the problem persists with the current version. There have been a couple of changes, and I fixed a number of similar issues, so chances are this is gone as well.
Thanks for the video Viliae! This might be caused by a safety setting I put in. If a ship can't determine what a turret is doing, it will assume the turret is firing on it. What happens is that if a ship has weapons installed and no turret scripts running, the script doesn't know what the turrets are doing. This is causing every ship in range of any turret to constantly consider itself under attack. I think I'll change this for the upcoming version.
What I don't quite understand is what the fighter is doing there. It's obvious from the shooting and the speed that the ship is constantly alternating between attacking and not attacking. I'll recreate that scenario and see if the problem persists with the current version. There have been a couple of changes, and I fixed a number of similar issues, so chances are this is gone as well.
-
- Posts: 140
- Joined: Tue, 12. Apr 11, 22:12
Hello
).
In my recent game I saw almost identical situation but this time Boron ships was attacking Xenon K. "K" was shooting to everyone but the bullets, from Boron corvettes (two Heavy Hydras) and fighters, didn't hit - just perish above the "K".
My thinkin is that the guilty are "camera dummy" which are in front of guns, not in back. This mean "100% range" for script is "106% range" for bullet (more or less
).
I wish you all Happy NEW Year 2014.
Well, it's just a normal Kha'ak invasion - in XRM they attack pretty often - lots and lots of fighters attack almost everything (player ships are preferred target for themCronos988 wrote:Merry Christmas everyone.
(...)
What I don't quite understand is what the fighter is doing there. It's obvious from the shooting and the speed that the ship is constantly alternating between attacking and not attacking.(...)

In my recent game I saw almost identical situation but this time Boron ships was attacking Xenon K. "K" was shooting to everyone but the bullets, from Boron corvettes (two Heavy Hydras) and fighters, didn't hit - just perish above the "K".
My thinkin is that the guilty are "camera dummy" which are in front of guns, not in back. This mean "100% range" for script is "106% range" for bullet (more or less

I wish you all Happy NEW Year 2014.
Last edited by Viliae on Fri, 27. Dec 13, 23:14, edited 1 time in total.
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
That's indeed the reason why the ships are firing, even though they don't hit. But this isn't a faulty range calculation by the script. The script calculates range differently, it takes the weapon range and compares it to the distance of the two objects (measured from their center points). So the range the script gets is always lower than the actual range.Viliae wrote: My thinkin is that the guilty are "camera dummy" which are in front of guns, not in back. This mean "100% range" for script is "106% range" for bullet (more or less).
What is happening is either the ships go into safe mode and try to stay out of range even though they shouldn't, or the fly commands who are supposed to get them into range get a null value somewhere and their speed gets set to zero. That would explain the constant speeding up and speeding down.
-
- Posts: 465
- Joined: Tue, 23. Dec 08, 10:15
Might be a bit late on this subject, but oh well...Nicoman35 wrote:THIS, I second that.DrBullwinkle wrote:Apparently, Cronos's !move.follow.template supports Docking Lockup Fix (which is good).
I think the true problem is in Safe Docking's !move.movetostation itself. That is where the check for range should take place.
I would change that in my folder, but then it works well on my pc, but not on someone elses. There should be a kind of 'pool', where you suggest your modded vanilla files, and all modders uses these files as a base. Or we end up having multiple versions of vanilla scripts, which will be overwritten by installing another mod....
I also uses the docking lockup fix/enable AI using docking computer script. With adv fight, it's just annoying that your fighters will just teleport into the ship across a whole sector when you give the fighter either "protect/follow" target command. I once even have 9 fighters *plop* into a tm that only has 4 docking spaces.
I only have very limited knowledge on coding. I've tried to figure out how to add a distance(or empty docking slot) checking in docking lockup fix's !move.movetostation on my own from looking at various scripts but to no avail. Can you point me to how to actually fix this so it appears more reasonable? Would really appreciated.
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
I'll be including a fixed !move.movetostation in the next release.Spectre01 wrote: Might be a bit late on this subject, but oh well...
I also uses the docking lockup fix/enable AI using docking computer script. With adv fight, it's just annoying that your fighters will just teleport into the ship across a whole sector when you give the fighter either "protect/follow" target command. I once even have 9 fighters *plop* into a tm that only has 4 docking spaces.
I only have very limited knowledge on coding. I've tried to figure out how to add a distance(or empty docking slot) checking in docking lockup fix's !move.movetostation on my own from looking at various scripts but to no avail. Can you point me to how to actually fix this so it appears more reasonable? Would really appreciated.
-
- Posts: 465
- Joined: Tue, 23. Dec 08, 10:15
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
Update! V. 2.3
Added:
- Support for "signal_attacked"
Changes:
- Made M6 more responsive
- Rewrote speed finding algorithm to get ships into range more efficiently
- Optimized defensive move choosing to be faster and cover more scenarios.
- Significant changes to target pick scripts to make it more accurate and less prone to attack small targets
- Streamlined Retargeting after initial enemy is dispatched
- Improved ships situation awareness by always considering full enemy formation.
- Increased target acquisition range slightly
- Disabled Vanilla pilot skills (to have clearly reproducible behavior)
- Reduced target range for missile bomber slightly.
- Reduced range buffer
Bugfixes:
Bugfixes:
- Fixed Target picking not properly accounting for piercing weapons
- Fixed Target picking not accounting for speed
- Removed some inconsistencies in calculating hit chance
- Fixed non-fighter ships calling vanilla fighter scripts in Player-/Enemy- only versions
- Fixed target picking not properly registering the player ship
- Removed defensive move that would sometimes disable ship collisions
- Fixed Ships immediately docking at any range and with any target
As you can maybe guess from the changelog, this has been mostly and "under the hood" Update, though I hope to have noticeably improved fighter behavior.
As stated in the OP, for your own safety, backup your saves before updating to the newest version!
There have been changes to the script flow, and development has been plagued by numerous causes of infinite loops. I have introduced measures that will hopefully enable me to track down looping scripts should they occur, and the scripts have been stable over several hours. Nevertheless, there can always be oddball scenarios that suddenly crash the game, and there is the (small) possibility of corrupting a save.
As for what I have done: Target pick scripts now care a lot more about target speed. This means that ships will generally refrain from attacking targets that are significantly faster than themselves, unless there are no other viable targets.
Ships now properly account for perpendicular movement, which means that relative speed is more accurate. Furthermore, I have switched from an algorithm working with estimated flight times to actually taking acceleration into account and calculating time needed to come to a halt accurately. In order to get the acceleration value, ships do a quick attack run when convenient and remember their speed increase over one second. The more IS battles a ship has seen, the more accurate the calculation should get. If ships don't have time to actually get an acceleration value, it is guessed based on their max speed. There is a logging mechanism in place that saves all acceleration data to log file 11991 in your saves folder.
Oh, and I changed signal_attacked to use the pick script instead of immediately calling fight.attack.object.
Added:
- Support for "signal_attacked"
Changes:
- Made M6 more responsive
- Rewrote speed finding algorithm to get ships into range more efficiently
- Optimized defensive move choosing to be faster and cover more scenarios.
- Significant changes to target pick scripts to make it more accurate and less prone to attack small targets
- Streamlined Retargeting after initial enemy is dispatched
- Improved ships situation awareness by always considering full enemy formation.
- Increased target acquisition range slightly
- Disabled Vanilla pilot skills (to have clearly reproducible behavior)
- Reduced target range for missile bomber slightly.
- Reduced range buffer
Bugfixes:
Bugfixes:
- Fixed Target picking not properly accounting for piercing weapons
- Fixed Target picking not accounting for speed
- Removed some inconsistencies in calculating hit chance
- Fixed non-fighter ships calling vanilla fighter scripts in Player-/Enemy- only versions
- Fixed target picking not properly registering the player ship
- Removed defensive move that would sometimes disable ship collisions
- Fixed Ships immediately docking at any range and with any target
As you can maybe guess from the changelog, this has been mostly and "under the hood" Update, though I hope to have noticeably improved fighter behavior.
As stated in the OP, for your own safety, backup your saves before updating to the newest version!
There have been changes to the script flow, and development has been plagued by numerous causes of infinite loops. I have introduced measures that will hopefully enable me to track down looping scripts should they occur, and the scripts have been stable over several hours. Nevertheless, there can always be oddball scenarios that suddenly crash the game, and there is the (small) possibility of corrupting a save.
As for what I have done: Target pick scripts now care a lot more about target speed. This means that ships will generally refrain from attacking targets that are significantly faster than themselves, unless there are no other viable targets.
Ships now properly account for perpendicular movement, which means that relative speed is more accurate. Furthermore, I have switched from an algorithm working with estimated flight times to actually taking acceleration into account and calculating time needed to come to a halt accurately. In order to get the acceleration value, ships do a quick attack run when convenient and remember their speed increase over one second. The more IS battles a ship has seen, the more accurate the calculation should get. If ships don't have time to actually get an acceleration value, it is guessed based on their max speed. There is a logging mechanism in place that saves all acceleration data to log file 11991 in your saves folder.
Oh, and I changed signal_attacked to use the pick script instead of immediately calling fight.attack.object.
-
- Posts: 140
- Joined: Tue, 12. Apr 11, 22:12
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
-
- Posts: 692
- Joined: Thu, 24. Jan 08, 14:45
have only the nevest version, using it with ap
noticed something strange: i fly a ancinoblabla prototype, the split m6 with the 12 main guns, with 181 speed, 7x200mj and flak option via mars in my rear turet. normaly in rear turret is epc installed
and:
nothing seems to shoot me, only turrets, no ships, perhaps an m6 shoots 1 or 2 volleys... i i let my weak turrets do the work!
especially the fighters seem to idle ~2-3 km away waiting for....hot coffee?
have i pimped my m6 too much? so that the enemy is scared of me?
noticed something strange: i fly a ancinoblabla prototype, the split m6 with the 12 main guns, with 181 speed, 7x200mj and flak option via mars in my rear turet. normaly in rear turret is epc installed
and:
nothing seems to shoot me, only turrets, no ships, perhaps an m6 shoots 1 or 2 volleys... i i let my weak turrets do the work!
especially the fighters seem to idle ~2-3 km away waiting for....hot coffee?
have i pimped my m6 too much? so that the enemy is scared of me?
Wir sind ***Modified***. Ergeben Sie sich.
Wir werden ihre technologischen und kulturellen Aspekte den unseren hinzufügen.
Widerstand ist zwecklos.
please excuse my bad english. no native speaker, but german forum is dying ;P
Wir werden ihre technologischen und kulturellen Aspekte den unseren hinzufügen.
Widerstand ist zwecklos.
please excuse my bad english. no native speaker, but german forum is dying ;P
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
Well, not scared of you ship, but maybe of your turrets.Torpor wrote:have only the nevest version, using it with ap
noticed something strange: i fly a ancinoblabla prototype, the split m6 with the 12 main guns, with 181 speed, 7x200mj and flak option via mars in my rear turet. normaly in rear turret is epc installed
and:
nothing seems to shoot me, only turrets, no ships, perhaps an m6 shoots 1 or 2 volleys... i i let my weak turrets do the work!
especially the fighters seem to idle ~2-3 km away waiting for....hot coffee?
have i pimped my m6 too much? so that the enemy is scared of me?
How exactly are the ships idling? Are they making runs at you, but turn around before they get in range?
Or are they just sitting there, just outside your turret range?
If it's the former, the fighters are attacking, but then get targeted by your turret, which apparently scares them enough to have them turn around and flee.
If it's the latter, the ships are waiting to regenerate hull/shields before they attack again. If they are at full hull/shields and still wait, then that's a bug.
I just now realized I forgot to disable waiting for hull regeneration, which means that once a ship's hull falls below 75%, it will stop attacking and wait for it to regen. This works in my game because I have hull regeneration scripts, but probably not in yours. I'll release a quick update later today.
-
- Posts: 152
- Joined: Tue, 3. Dec 13, 11:20
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
Update! V. 2.4:
Added:
- Optimization against fighter drones
- Support for implementation of fight skill and pilot morale/aggresion (disabled by default)
- support for random move repitition for less predictable behavior (enabled)
Changes:
- Changes to !move.follow.template to make protect commands more useful (ships on protect duty now help their protect target even if there hasn't been a counterattack yet).
- Switched plugin.cro.advf.pick back to .pck format.
- Ships that are staying back to regenerate now evade even if they wouldn't normally consider the damage serious enough
Bugfixes:
- Fixed ships being unable to navigate around obstacles and getting stuck in certain situations.
- Fixed defensive moves overriding basic attack/defense decision making
- Fixed script assuming hulls can regenerate
- Fixed ships searching for new targets after being attacked and defeating the attacker.
.
In all seriousness, the scripts are aimed at playing with fleets, or at least small groups of fighters. If you are having troubles with skirmishers, just get a few M5s or fast M4s of your own to deal with them.
Added:
- Optimization against fighter drones
- Support for implementation of fight skill and pilot morale/aggresion (disabled by default)
- support for random move repitition for less predictable behavior (enabled)
Changes:
- Changes to !move.follow.template to make protect commands more useful (ships on protect duty now help their protect target even if there hasn't been a counterattack yet).
- Switched plugin.cro.advf.pick back to .pck format.
- Ships that are staying back to regenerate now evade even if they wouldn't normally consider the damage serious enough
Bugfixes:
- Fixed ships being unable to navigate around obstacles and getting stuck in certain situations.
- Fixed defensive moves overriding basic attack/defense decision making
- Fixed script assuming hulls can regenerate
- Fixed ships searching for new targets after being attacked and defeating the attacker.
Well, what do you expect, should the skirmisher just let you kill them? They want to live, toogastovski wrote:It's just so annoying that i shoot enemy skirmishers with my Sirokos. They always fleeing from me because of main guns with ion distruptor. Now always using missiles for that but getting little bit expensive.

In all seriousness, the scripts are aimed at playing with fleets, or at least small groups of fighters. If you are having troubles with skirmishers, just get a few M5s or fast M4s of your own to deal with them.
-
- Posts: 692
- Joined: Thu, 24. Jan 08, 14:45
they seem to perform attack runs. but only shoot 1 or 2 volleys at me, and then turn away. thats redicoulus. its a freakin m6. and therer are around 10 m3s, should blast me out of space with a little effortCronos988 wrote:Well, not scared of you ship, but maybe of your turrets.Torpor wrote:have only the nevest version, using it with ap
noticed something strange: i fly a ancinoblabla prototype, the split m6 with the 12 main guns, with 181 speed, 7x200mj and flak option via mars in my rear turet. normaly in rear turret is epc installed
and:
nothing seems to shoot me, only turrets, no ships, perhaps an m6 shoots 1 or 2 volleys... i i let my weak turrets do the work!
especially the fighters seem to idle ~2-3 km away waiting for....hot coffee?
have i pimped my m6 too much? so that the enemy is scared of me?
How exactly are the ships idling? Are they making runs at you, but turn around before they get in range?
Or are they just sitting there, just outside your turret range?
If it's the former, the fighters are attacking, but then get targeted by your turret, which apparently scares them enough to have them turn around and flee.
If it's the latter, the ships are waiting to regenerate hull/shields before they attack again. If they are at full hull/shields and still wait, then that's a bug.
I just now realized I forgot to disable waiting for hull regeneration, which means that once a ship's hull falls below 75%, it will stop attacking and wait for it to regen. This works in my game because I have hull regeneration scripts, but probably not in yours. I'll release a quick update later today.
but they only smoke spaceweed, try to find spaceflies or roast their spacehamsters.
perhapx u could implement something like:
i am an m3. this is an m6. i ignore the turret loadout, becaouse its no hugeship, an d blast this lil prick outta space
a routine that m3, m4 and m6 attack m6 no matter what weapons the othe m6 has in turrets. i like it when my screen glows. i want dakkadakkadakka in my face
i want boombagwrooooooooom
and a hardboiled egg^^
plx test m6 with flak-turrets especcially. the springy should have similiar probs. and its even faster...
thx 4 awesome mod + support
u are doing great work!
Wir sind ***Modified***. Ergeben Sie sich.
Wir werden ihre technologischen und kulturellen Aspekte den unseren hinzufügen.
Widerstand ist zwecklos.
please excuse my bad english. no native speaker, but german forum is dying ;P
Wir werden ihre technologischen und kulturellen Aspekte den unseren hinzufügen.
Widerstand ist zwecklos.
please excuse my bad english. no native speaker, but german forum is dying ;P
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
That's right, they should. There seems to be something not quite right with the values.Torpor wrote: they seem to perform attack runs. but only shoot 1 or 2 volleys at me, and then turn away. thats redicoulus. its a freakin m6. and therer are around 10 m3s, should blast me out of space with a little effort
The script already does this, or rather it does something a lot more complicated. It considers the turret's damage and it's hitchance, and then decided whether or not the shots will likely do enough damage to warrant and evasive move. Flaks get a bonus to hitchance due to their AoE.Torpor wrote: perhapx u could implement something like:
i am an m3. this is an m6. i ignore the turret loadout, becaouse its no hugeship, an d blast this lil prick outta space
Could you tell me the shield strengths of the M3s you are fighting and the shield DPS (the ingame tooltip shows DPS) of the weapon you are using in the turrets?
Do you have the script editor activated and/or a save before that particular fight starts?