Litcube's Missile Boat Add-On (Turret:V0.92b / Supply:V0.93b)

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
deca.death
Posts: 2939
Joined: Mon, 28. Feb 11, 19:50
x3tc

Post by deca.death » Thu, 12. Jan 12, 07:43

r--x wrote:

Code: Select all

Story call stack dump:
[000000]->[0351cc]#-26817(2023)[702].StartThisScriptID(3, {"!turret.killenemies.std",44,"Turret Kill all enemies (All Ships)",1,4,{...},{...},{...},0,100}, {4,3}, 0)

Where I can find this info, to check my own CTD problem, which again, seems totally random.

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Thu, 12. Jan 12, 09:17

paulwheeler wrote:Just a thought... is it possible that the crashes are not due to the missile boat script, but perhaps the changes made to CWP to accommodate M3Bs?

As the crash you experienced Litcube, happened when a missile boat spawned, that would suggest CWP rather than this script, and both were altered at around the same time...
if the crash log is showing below, then its likely not CWP, but defintly cant rule out M3B's.

Code: Select all

[000000]->[0351cc]#-26817(2023)[702].StartThisScriptID(3, {"!turret.killenemies.std",44,"Turret Kill all enemies (All Ships)",1,4,{...},{...},{...},0,100}, {4,3}, 0)
[03538b]->[035fcd]#-26817(2023)[702].__runScript({19347562,0,3,7,{...},{...},0,3,{...},100,0,0,0}, {"Lib.Cmd.Turret.Barrage",44,"Lib Cmd: Main turret barrage",53,0,{...},{...},{...},{...},911}, 65542, -26817, {4,3}, 0)
[060427]->[0aa6fd]#-26817(2023)[2004].ShootMissileSECOBID(13870, 3, 29, 0)
The stack dump clearly states that the error is occuring somewhere within the ShootMissileSECOBID

i think it means the following: SECBOID: SEC( Sector ) BO( Body ) ID( Identification )

My best guess based on the code i have infront of me is that the error is occuring after the KC code calls a C++ API function of SA_ShootMissile with arg4 being null(0)

edit: scratch that, arg4 is set as 0 a few times when called, so its probably not that

There are no obvious errors within the KC code related to this function and a script call should never be able to crash the game - so its already an error in the engine itself by default - Notifying egosoft of these crashes would be a good idea, without a extreamly relyable test case its almost impsoable to poinpoint this type of error, if you wish to try:

Have Fun :wink: http://pastebin.com/HEy4JB4g
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

garrry34
Posts: 911
Joined: Sun, 17. Jul 05, 14:43
x3tc

Post by garrry34 » Thu, 12. Jan 12, 09:42

my advice is to download it individulaly from here, oppen teh scrpit folder for AP or TC and dop the scripts for the zips in the folder then they wil be highlited then just hit delete...
PhenomII X4 940 black edition
8GB DDR2
ATI HD4890
Windows 7 64bit

ivanwong1989
Posts: 110
Joined: Tue, 14. Feb 12, 13:00

Post by ivanwong1989 » Fri, 2. Mar 12, 10:01

Hello guys,

I have a questions... hope people can help...


using IR 15.29, enemy m7ms are now deadly as ever BUT can't be said about my own remotely controlled m7ms.... they are large dumb space hulks... any script to make my owned m7ms behave better?( i don't understand fully whether Litcube's script is only for NPC m7ms or for my m7ms... that's why..)
To Infinity, And Beyond!

xxxxxxx7
Posts: 6
Joined: Fri, 6. Jan 12, 17:19

Post by xxxxxxx7 » Fri, 6. Apr 12, 20:24

ivanwong1989 wrote:.... they are large dumb space hulks... any script to make my owned m7ms behave better?
Hello,
the script works for NPC ships and player ships.

If you run this script you need to set some options. You can find these options in the ship command console (key 'c') of the ship.
- Set the command of missile turrets of your m7m or m8 to "attack my target" or "kill all ememies". Your m7m will now launch missiles at the enemies, too. Don't confuse it with the '2. combat ...' menu. That's wrong. It's a turret command.
- Set the missile shot probability of the m7m from '5%' (default) to '100%'. This increases the missile fire rate.
You don't have to be on board of your m7m (or m8 ). But the script only works only for m7m that are in the sector as you are (In Sector)

---------------------------------------------------------

About the these Crash To Desktop (CTD) problems (the games crashes when running this script):

Code: Select all

Story call stack dump:
[000000]->[0351cc]#-26817(2023)[702].StartThisScriptID(3, {"!turret.killenemies.std",44,"Turret Kill all enemies (All Ships)",1,4,{...},{...},{...},0,100}, {4,3}, 0)
[0354c8]->[03610a]#-43004(2142)[702].__runScript({16078717,0,2,3,{...},{...},0,2,{...},101,0,0,0}, {"Lib.Cmd.Turret.Barrage",50,"Lib Cmd: Main turret barrage",64,0,{...},{...},{...},{...},911}, 65542, -43004, {4,2}, 0)
[060564]->[0aa873]#-43004(2142)[2004].ShootMissileSECOBID(12, 2, 29, 0)
I play the XRM mod which uses this script and figured out that the crash always happens if a bomber that is running this script is docked - and tries to fire missiles while docked! :o That blows up everything.

Am imserted check in the script file "Lib.Cmd.Turret.Barrage.xml", line 16 to 20, solves the problem.

Code: Select all

... 
while [TRUE] 
  if is a new script version available
    return 1
  end
   
  * check if ship is docked so the game does not crash
  if [THIS]->is docked
    = wait 30000 ms
    continue
  end
   
  if not [THIS]->is in active sector
    = wait 30000 ms
    continue
  end
...

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Sat, 7. Apr 12, 15:06

This makes sense. That's good info!

paulwheeler
Posts: 8132
Joined: Tue, 19. Apr 05, 13:33
x3tc

Post by paulwheeler » Sat, 7. Apr 12, 23:13

So is this confirmed? If so I'll put the fix into the script in the XRM.

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Sat, 7. Apr 12, 23:18

paulwheeler wrote:So is this confirmed? If so I'll put the fix into the script in the XRM.
Looking at the KC code, it does make scene as to why this could cause the issue, There is no check to see if a ship is docked in the command sequence to fire a missile, but there is in the command sequence to fire a laser.

I'd say confirmed; Therese no harm in adding the extra checks to the script, it even if it isn't the crash cause, wont break the addon, and you can get the XRM users to do a live test instead ;) (Litcube probably cant test it himself until around May)
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

greypanther
Posts: 7307
Joined: Wed, 24. Nov 10, 20:54
x3ap

Post by greypanther » Tue, 17. Apr 12, 21:08

It seems I need the fix above but do not have knowledge of how to implement it. I am running TC with XRM and am experiencing the CTDs.

I am suposed to open the script listed above and insert the above code between line 16 and 20, yes? But how can I insert it between 4 lines? I think this is going to hurt my head. :oops:
Pray that there's intelligent life somewhere up in space
'Cause there's bugger all down here on Earth

paulwheeler
Posts: 8132
Joined: Tue, 19. Apr 05, 13:33
x3tc

Post by paulwheeler » Tue, 17. Apr 12, 23:16

I just updated the XRM with this fix - 1.19f.

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Tue, 17. Apr 12, 23:32

Here is a temp patch until Litcube gets back from work and fixes the main download

http://download.xtimelines.net/TurretMi ... Patchc.rar
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

greypanther
Posts: 7307
Joined: Wed, 24. Nov 10, 20:54
x3ap

Post by greypanther » Tue, 17. Apr 12, 23:45

Thanks guys, that is just wonderful. :)
I have found it is not when a docked bomber tries to fire, but just when the resident Teladi bomber wing ( in space ) fires at the roaming Xenon. Only when they fire; does that tally with your findings?

*edit* thanks to those who got the fix out for this and XRM, I am unsure to direct the thanks to, but thanks anyway, it seems to be fixed. :)
Pray that there's intelligent life somewhere up in space
'Cause there's bugger all down here on Earth

CuriosityKillsTheMADCat
Posts: 564
Joined: Thu, 1. Apr 10, 00:19
x4

Post by CuriosityKillsTheMADCat » Mon, 23. Apr 12, 18:26

Mabe this is not the right place to post this, but i had the same CTDs (turret commands/missile fire) while using this script - but the cause of my problems was something completely different.

My last "real" X-Game "died" last year at the end of July due to lack of interest. A few weeks later, i "updated" my modified game to another "version" (i installed IR instead of MBBR, added and removed some other minor scripts, etc.). Then i found the SRM mod ( :D ) and its addons, including the new jobs file for the SRM (Jobs 3.6e). The jobs file required the installation of CWP and Litcubes Missile Supplier Script (V0.92b). Last, i installed the Immersive Environments Mod without the hotfix (it were not available at that time, AFAIK). Then the CTD's began.
I tried to solve the problem (posts spoke of incompabilities between IR and the missile suppliere script, CWP and Gazz's missle defence MK2 script, etc.), but it seemed that i could not solve the problem. A few weeks later, i installed the hotfix for Immersive Environments (the one that fixed the broken Khaak sector). and, tada, the game worked. But at that time, i already lost interest in X again, so i forgot about the problem and any possible solution for it (total playing time in the new game: 11h 35m, a joke :D ).

About two weeks ago, i bought the standalone version of AP at a local store (i love steam since then :roll:). After a short evaluation period, i decided that i will not play that thing and began another modification round of my old X3TC game. The game stayed more or less the same as the last version from summer 2011, but i made the following (relevant) changes: i exchanged IR R15 RC29 with MBRR V2.16, i updated the missile safety script from V1.05 to V1.12, (i still use missile defence MK2 V2.20 (or is it V2.27???) which is included in MARS V5.08 - which i need for the OOS Rebalance script), i updated CWP from V1.0 to V1.2 and the AI Ammo and Damage Mitigation "script" from V1.05 to V1.08. Lastly, i updated Immersive Environments to V1.1 and then installed IEX 1.1a (including the Tbackground file found in that thread).

While i modified the game, i had the bad feeling that a certain missile fire bug will appear again - and it did. I thought it has something to do with the combination of (either) missile defence MK2, litcubes CWP 1.2, or the missile boat addon scripts. There could be no conflict with IR, as that was uninstalled by me. All crash logs showed an involvement of Gazz's "gz.fight.attack.object.std" script (either while firing a turret or missile, AFAIK). ("gz.fight.attack.object.std" comes with Gazz's "
OOS Combat Rebalance Alpha 0.32"). I thought to myself "oh how fine", that will be a long trial and error period, and in the end i will have to remove the SRM jobs file (which would have been a game breaker for me...) and the required scripts (CWP and the missile boat addon).
So i adjusted some things (e.g., changed CWP 1.2 back to 1.0, etc) and started another game as "Humble Merchant". Surprisingly, the game did not CTD while i was in Herrons Nebula. So i decided to "supertuned" my Disco in order to find a sector where some combat is going on - therefore, i flew to Trantor (President's End). And the game did what i expected: i crashed a few seconds after i entered Trantor. The crash log showed the expected problem (an involvent of the "gz.fight.attack.object.std" script. I tried it several times again - no change in result. Then i began to read the forum again (several hundred pages...) and came to the conclusion that the CTDs had the source i suspected (the scripts mentioned above).
Two days later, i decided to give it another try (you know, the ambition to solve or circumvent the problem grew :) as i wanted to play X3TC again). Clever as i am, i saved my game shortly before entering the south gate in The Wall. Then i had to go to the toilet (my pilot chair is not self-cleaning like the one's in the X-Universe :) ). When i came back, i was already about 30 km behind the south gate of Trantor???? Confusing, confusing... But then the game crashed when i turned left in order to fly back. More confusion... Then i checked the crash log again; and to my complete surprise, it was a "normal" CTD without any involvement of script errors or conflicts. Suddenly, i had the hope that there would be a satisfying solution for me. I looked over my latest updates and decided that i will uninstall IEX 1.1a, as that was the largest single change in the setup (in my definition of "setup change). I started a new game, supertuned the disco and flew to Trantor again. I did not have a single CTD since then.

So for me, the CTDs were caused by using the old version of IE with the hotfix and by using the new version of IE 1.1 in conjunction with IEX1.1a. I still do not understand why it works now, but i do not really care since the game seems to be working fine.
I know that i just wrote a wall of text, but maybe someone with more insight into the game mechanics can get some hints or even information out of that.

MFG

CKTMC

PS: For clarificatiom, I do not use the MissileTurretAttack scripts provided here by Litcube.
PS2: Does anyone has an explanation for what happened to my game(s) or why the installation of "texture mods" could cause such problems (if they really did it in the end...i'm not sure)?
Fähiger Pilot wie DU sein...
"When ships to sail the void between the stars have been invented, there will also be men who come forward to sail those ships."
Johannes Kepler, Somnium, 1634 A.D.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Fri, 11. May 12, 23:06

Military Suppliers Job Script Versions

0.93b:
- Bug where military suppliers were all running for the same ship to supply. This has been fixed. Only one military supplier will supply a single missile boat with missiles at one time.

Doomgiver77
Posts: 2
Joined: Thu, 22. Mar 18, 21:14

Download Link

Post by Doomgiver77 » Mon, 26. Mar 18, 05:47

The download links are not working anymore.

Has anyone a working download link?

Freenan
Posts: 110
Joined: Tue, 5. Aug 08, 18:46
x4

Post by Freenan » Fri, 30. Mar 18, 18:14

still not working, want them too :cry:

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”