[INFO] New Weapon and Missile stuff for TC

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

Syklon
Posts: 1699
Joined: Thu, 9. Feb 06, 23:06
x3

[INFO] New Weapon and Missile stuff for TC

Post by Syklon »

Meant to put something like this out right at release, but its only a couple days late.

Weapons- (TBullets/TLasers)
First thing to address are the new Galaxy Subtypes (Gsubtypes). This is what allows for more than 32 lasers in the game. The compatability mask still only allows for 32 different Gsubtypes, but multiple weapons can now share a Gsubtype (for instance, all Kyons are the same Gsubtype to save slots, and which weapons are actually used is just controlled by cargo class). Gsubtype is set at offset 5 in TLasers. You'll notice the holdovers from X3R, most of which I consider universal weapons rather than race specific, have their gsubtype set to SG_LASER_[acronym], while the new race weapons tend to be SG_LASER_[Race]_[Light/Medium/AF/Heavy] (AF stands for anti-fighter, and are things like flak).

In TBullets you will notice some new Flags and new Offsets related to them.
New Flags (in order):
- Reduce Speed: This reduces the targets max speed on impact for a set speed (offset 28, in percent) and duration (offset 29, in milliseconds). Ion disrupter has this as an example.
- Drain Weapons: This subtracts a set amount of weapon energy (offset 30, in energy) from the target upon impact. Ion Shard Railgun has this as an example.
- Damage Over Time: After impact continues to do damage (offset 31), over a set time (offset 32, milliseconds again). Incendiary Bomb Launcher has this as an example.
- Fragmentation: Upon reaching maximum range, the bullet will explode, creating a number (offset 34) of new bullets (set in offset 33). Frag Bomb Launcher has this as an example.
- Fire Delay: Upon holding down the fire button, these weapons will charge up, taking in a multiple of the usual energy and doing the multiple in damage(offset 35), and also increasing the bullet size by a set multiple (offset 36). The bullet fires when the fire button is released or it is fully charged. PPC is an example of this.


Missiles

You will notice TMissiles also has the new Galaxy Subtypes.

The types for these are SG_MISSILE_[DMBF/LIGHT/MEDIUM/HEAVY] for normal race missiles (note DMBF is no longer just dumbfire, it became a sort of extra light gsubtype slightly later in development but the name stayed the same). Khaak have the SG_MISSILE_KHAAK. Terran's have the SG_MISSILE_TR_[LIGHT/MEDIUM/HEAVY] for normal use.

For the missiles ships, Bombers use SG_MISSILE_BOMBER, and the missile frigates use SG_MISSILE_AF_CAPITAL (antifighter) and SG_MISSILE_TORP_CAPITAL. Terran missile ships use the same, except with a _TR_ added in after MISSILE.

There is also the SG_MISSILE_BOARDINGPOD, used for with the new boarding parties.

Missile Turrets/Batteries:
These are relatively easy to set up, basically any turret that has no compatible weapons (SS_COCKPIT_DEFAULT) is regarded by the engine as a missile turret, so that when missiles are fired they will launch from the laser points. They will normally launch from whichever battery is closest to the target. If a swarm missile such as the Flail is fired from these, all 8 missiles will launch from separate laser points if they exist.
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

very helpfull info, thank you :)
User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse »

Fun stuff. Fire delay has real possibilities...
SAVOTW
Posts: 129
Joined: Fri, 23. Dec 05, 16:14
x3

Post by SAVOTW »

That's great stuff thanks for the info :) . The only 3 types files I cannot open properly with the old editor to date are TShips,TMissile and TBullets(although I can see the text/data for all of them to some extent). These files seem to be where the changes are. So who's doings what to doubleshadows editor atm and any idea of a release date out there?
User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse »

I have a question, if missile turrets are simply launch points does issuing missile turrets with commands do anything?
Syklon
Posts: 1699
Joined: Thu, 9. Feb 06, 23:06
x3

Post by Syklon »

doubleshadow helped us out and gave us an updated editor to work with TC during development, so he already has all the necessary info for changes, and has at the least a mostly working version, so I would expect an updated public release from him soonish, although that's up to him.

You'll need to get one of the script guys to answer how commands with missile turrets work...
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

Some feedback.

I've just tried adding a new laser and bullet to the bottom of the files, and they will not show up in the lists to connect to anything (let alone each other).

What I did discover is that there is 2 dummy lasers and their respective bullets defined already. (Also factories for them !).

I'm part way through implementing using them instead. Only 1 ship uses laser dummy 1 and that is the terran lasertower, so for me, thats no real issue. I suspect (but havent proved) that the lasertower uses a different gun that uses the same subgroup of dummy laser. The t file lists it as unknown object, which would look silly on a lasertower, which leads me to expect its not used, just the subgroup.
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

did you increase the line number at the top of the files too ?
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

I use doubleshadows editor, happens automatically.

I only manually edit these files when adding huge chunks of existing code, such as each time I have to add my own ships onto a new patch.
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

Then you are probably not aware that X3Editor does not fully support galaxy subtypes atm. afaik ;)

If I remember correctly it will only allow you to choose the first defined weapon / missile for each subtype - the others are automatically fit in accordance with their cargo class. So technically you are no longer choosing compatible lasers but compatible galaxy subclasses.

But not yet really looked at the X3Editor for TC - just from memory
User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Testing with Jobs

Post by ezra-r »

Hello,

I felt like testing with Jobs to make my own versions of No Civilians, Khaak Invasions and all kinds of stuff.

Thanks to doubleshadow editor it all seems pretty "easy" although as a complete newbie I need certain clarifications.

In all ships I see in the "ShipType" tab there are two values that I need clarified:

Manufacturer and Owner.

I see the border pirate spawns are not only pirate in manufacturer and owner, they also can be argon and teladi and then the "Placement" Tab you can spawn ship in owner's sector, border sector, core sector.

So which Manufacturer/Ownser options do I choose If I want a hostile Xenon M5ship to spawn in, let's say.. Argon Core Sectors?


Also, whats the Invert Flags tick is for?

Thx in advance.


PS: Sorry if that info is anywhere I looked for it and didnt find it.


{Merged to resource thread on author's request. jlehtone}
User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent »

Manufacturer means whats the race, that makes the ships

e.g.
Argon -> Novas, titans busters, etc.
Teladi -> .... ... .. (My memory is hazy) buzzard?

e.g. Look at pirates, they fly Argon/Teladi made fighters, but they are owned by pirates

So you want the manufacturer as Xenon
(and you would want the owner as Xenon too)
(And you would also make.. say m5, and specify the variant if any)





The inverted flag is for the spawn types. It just reverses ALL of your selections
e.g. Core sector -> Not core sector




b.t.w My TC Editor (Double shadows editor), can't open the job files. What are you using the edit them?
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

Thats what I thought.

Observe put out a tool for jobs editing, but so far I havent had a chance to play with it.
User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r »

s9ilent wrote:Manufacturer means whats the race, that makes the ships

e.g.
Argon -> Novas, titans busters, etc.
Teladi -> .... ... .. (My memory is hazy) buzzard?

e.g. Look at pirates, they fly Argon/Teladi made fighters, but they are owned by pirates

So you want the manufacturer as Xenon
(and you would want the owner as Xenon too)
(And you would also make.. say m5, and specify the variant if any)





The inverted flag is for the spawn types. It just reverses ALL of your selections
e.g. Core sector -> Not core sector




b.t.w My TC Editor (Double shadows editor), can't open the job files. What are you using the edit them?
Im using doubleshadow's I swear :) Make it check for updates.

just that when Im going to open it you have 3 options suggested, I choose jobs editor and that simple, works.
http://forum.egosoft.com/viewtopic.php?t=244283
I have editted so far tbullets, tlasers and Im on jobs now.

About your explanation, thx a lot now I get it, what I dont really have it clear is how to make the ships swapn in selected race sectors like in my previous example.

Anyways I hope I can do some testing.
User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent »

Right I see, there is a v2 in a separate thread
(I was looking in the TC Editors thread)




But yes, if you wanted to make it all sectors of a particular race, then you will unfortunately have to create multiple jobs, and give them specific sectors (i.e. specify each co-ordinate)


Otherwise, if you just wanted any core sector of enemy sectors then:
Border sector, Not enemy sector, Inverted
(i.e. Core sector of enemy races)
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

I didnt realise that was out of beta. :D
User avatar
chaosras
Posts: 99
Joined: Thu, 28. Oct 04, 18:50
x3tc

Modding Tbullets, Tlasers

Post by chaosras »

I'm looking for descriptions/info on what all the various values in these type files do. Some of them are self-explanatory, but many are not. (Like what 'Energy' and 'Charge rate' in Tlasers do, or the 'Rapid box' settings in Tbullets...)

Maybe I'm just missing it, but I've done a lot of searching on the forums and can not find any information on this. Seems like this info would be readily available with all the mods that have been made with these type files.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

I dont think there is any documentation.

The labels in X3Editor are all we have.
jlehtone
Posts: 22499
Joined: Sat, 23. Apr 05, 21:42
x4

Re: Modding Tbullets, Tlasers

Post by jlehtone »

chaosras wrote:I'm looking for descriptions/info on what all the various values in these type files do.
Merge to a tutorial/resource thread, since if we get answer, it would help to be there/here.


Those labels come from somewhere. doubleshadow should know where. But part of the fields might be legacy from previous games, maybe even unused. Now and then there is a thread tackling some field(s), usually by trial and error. But cannot recall a good summary myself.
User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r »

I precisely have been modifying these values lately and TBullets and Lasers include many more values.

If someone knows most of them (those that are not obvious) it would be great if they can share the info.

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