[SCR] Missile Defense Mosquito [2009-08-23 X3TC 3.1.02]

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

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

BrianManeke
Posts: 16
Joined: Thu, 26. Oct 06, 22:46
x2

Post by BrianManeke » Sat, 17. May 14, 18:31

Please fix download,

Using WinRar Produces following error;

The archive is either in unknown format or damaged.

User avatar
JSDD
Posts: 1378
Joined: Fri, 21. Mar 14, 20:51
x3tc

Post by JSDD » Sun, 18. May 14, 15:50

To err is human. To really foul things up you need a computer.
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.


Mission Director Beispiele

CloneSargaent
Posts: 68
Joined: Wed, 16. Jul 14, 19:27
x4

Post by CloneSargaent » Thu, 26. Jul 18, 21:43

Latest version of Missile Defense Mosquito
on Lucike website.

You can change the missiles used by MDM by editing the Language file 8002 in X-studio and changing the text in pageIDs 30000 and 30001 that are by default set 0 and 27. These numbers are the subtypes that the game recognizes the missiles.

I.E.: mosquito missile = 0 subtype and in the X-tended mod, 27 = naga heavy missile in X-tended mod so I had to change that number to 8 which is poltergeist missile.

And You have to change the $DefenseMissile variable that is in setup.plugin.missile.def. between lines 90 - 109

How it was when I first dropped it into my X-Tended version of TC

Code: Select all

if read text: page id=$PageID, id=30000 exists
$SubType = read text: page=$PageID id=30000
$SubType = string $SubType to integer
$DefenseMissile = get ware from maintype [SSTYPE_MISSILE] and subtype $SubType
else
$DefenseMissile = {Mosquito Missile}
end

set global variable: name='missile.defense.mosquito.missile.a' value=$DefenseMissile

if read text: page id=$PageID, id=30001 exists
$SubType = read text: page=$PageID id=30001
$SubType = string $SubType to integer
$DefenseMissile = get ware from maintype [SSTYPE_MISSILE] and subtype $SubType
else
$DefenseMissile = {Naga Heavy Missile}
end

set global variable: name='missile.defense.mosquito.missile.b' value=$DefenseMissile
What it should look like for X-Tended:

Code: Select all

if read text: page id=$PageID, id=30000 exists
$SubType = read text: page=$PageID id=30000
$SubType = string $SubType to integer
$DefenseMissile = get ware from maintype [SSTYPE_MISSILE] and subtype $SubType
else
$DefenseMissile = {Mosquito Missile}
end

set global variable: name='missile.defense.mosquito.missile.a' value=$DefenseMissile

if read text: page id=$PageID, id=30001 exists
$SubType = read text: page=$PageID id=30001
$SubType = string $SubType to integer
$DefenseMissile = get ware from maintype [SSTYPE_MISSILE] and subtype $SubType
else
$DefenseMissile = {Poltergeist Missile}
end

set global variable: name='missile.defense.mosquito.missile.b' value=$DefenseMissile
^^You will have to do this for XRM with the delta missile or any other missile that is the equivalent to the mosquito missile in other mods(Never played LU to know if MDM is compatible).

H3avyus3r
Posts: 1
Joined: Thu, 30. Jan 20, 00:30
x3tc

Re: [SCR] Missile Defense Mosquito [2009-08-23 X3TC 3.1.02]

Post by H3avyus3r » Thu, 6. Feb 20, 01:17

I know this is old and may be totally off as I am brand new to this. Is the missile ID for "Light Defense Missile" "0" as well? I am trying to figure out how to keep everything the same but use light defense missile for MDM if possible. Any help is appreciated.

CloneSargaent
Posts: 68
Joined: Wed, 16. Jul 14, 19:27
x4

Re: [SCR] Missile Defense Mosquito [2009-08-23 X3TC 3.1.02]

Post by CloneSargaent » Sun, 23. Feb 20, 01:50

H3avyus3r wrote:
Thu, 6. Feb 20, 01:17
I know this is old and may be totally off as I am brand new to this. Is the missile ID for "Light Defense Missile" "0" as well? I am trying to figure out how to keep everything the same but use light defense missile for MDM if possible. Any help is appreciated.

Sorry for not explaining it very well. No, it is not “Light Defense Missile” that equals “0”. All of the Missiles in the game have different subtype IDs.

For example:

0= Mosquito Missile
27= Poltergeist Missile

But it in full conversion mods sometimes the Missiles are changed to different subtypes.

In the Xtended mod:

0= Mosquito Missile
8= Poltergeist Missile
27=Naga heavy Missile

The code for the script is calling for the subtypes that are written in the pageIDs 3000 and 3001. By default the subtype IDs that are in 3000 and 3001 are 0 and 27. To make the script use poltergeist Missiles again in Xtended, I had to find what it’s new subtype ID was which was now 8. I also had to change the $Defensemissile variable back to poltergeist Missile as I posted above.

Hope this clears this up.

dantebelmondo
Posts: 17
Joined: Sun, 22. Mar 15, 22:32
x4

Re: [SCR] Missile Defense Mosquito [2009-08-23 X3TC 3.1.02]

Post by dantebelmondo » Fri, 20. Aug 21, 20:17

I fixed a minor bug.

When a ship is compatible with both Mosquito and Poltergeist, if you only have Polt. the system can't be started since the script only checks if you have Mosq. in the cargo space.
Now it will check if you have Polt. as well, and if you do the MDM will use that.

Download:
https://www.mediafire.com/file/oiw27ojo ... ix.7z/file
Only contains the fixed scripts, you still need the original files from xuniversum mdm
Tested on AP 3.3

Post Reply

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