Tracking weapons from multiple points along a player ship

Freeform discussion about anything related to modding Transcendence.
Post Reply
Lokasenna
Miner
Miner
Posts: 32
Joined: Sun Mar 06, 2011 6:33 pm

(Apologies if this has been covered somewhere. I did a couple of searches and came up blank)

The idea in my head is for a capital ship, like the Rebel frigates in Star Wars, something longer than it is wide. I'm trying to work out an appropriately impressive weapon system that will fire omni/tracking lasers from various points along the body - for instance, bow, stern, mid, mid-bow, mid-stern.

If my ASCII skills feel like cooperating...

Vessel
\ | | | /
Enemy

Ideally they'd fire at intervals to simulate multiple gunners, but I'm enough of a newb to XML that my current goal is just to have them all firing properly in one burst.

Some brief experimenting with the omnidirectional= setting and various <Configuration> parameters haven't gone well. The best I've managed is an array of lasers that initially fire from the correct locations, but when they're actually tracking a target the firing position rotates rather than the firing direction. That is, if a target is off to my left, the lasers will originate on a line from my left to my right rather than staying with my ship as it rotates.

I realize this is due to shot configurations being processed with respect to where the weapon is aiming, and I know there are some things we just don't have the ability to do yet, so I'm wondering if a) this is currently possible, b) the best way to go about it, and c) how difficult it would be to incorporate my timing idea as above.

Some part of me just wants to pull up next to the Kronosaurus and let them eat a few broadsides. :)
Amilir
Militia Lieutenant
Militia Lieutenant
Posts: 151
Joined: Fri Feb 12, 2010 4:56 pm
Location: With the stRong.

Yes, it's possible, but AFAIK not in a single weapon. You'd have to make a ship with multiple weapons along the side. Sadly, the game isn't designed to have the player use multiple weapons very well. It would work much better as a NPC. Look at the xenophobe worldship for an example of something similar.

EDIT: I should clarify that it should be possible to do in one weapon with onFireWeapon and sysCreateWeaponFire, but that's probably way beyond your level of skill right now.
Last edited by Amilir on Sun Mar 13, 2011 10:35 pm, edited 1 time in total.
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
Lokasenna
Miner
Miner
Posts: 32
Joined: Sun Mar 06, 2011 6:33 pm

Fair enough. Cheers, guys.
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Loksenna, what kind of broadsides weapon do you want? I think I can make one, but only for one side, so it will end up being a left and right broadside weapon.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Lokasenna
Miner
Miner
Posts: 32
Joined: Sun Mar 06, 2011 6:33 pm

The idea was to simulate how a real battleship would have multiple independent gun batteries. For simplicity's sake, let's say five omni laser cannons.

I figured out how to make it just fire five shots straight to the left, and that sort of thing, but as you say it's limited to one side.

Hmm, I suppose giving the ship two of them, making one a secondary, and having it fire the other way, might not be so bad. Seeing as a ship that big likely wouldn't have a wide variety of weapons, it makes some sense.
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Try this:

Code: Select all

		<Weapon
			type=			"missile"
			fireRate=			"120"
			powerUse=			"1000"
			
			>
			<Configuration aimTolerance="0">
				<Shot posAngle="180" posRadius="80" angle="90"/>
				<Shot posAngle="180" posRadius="40" angle="90"/>
				<Shot posAngle="180" posRadius="20" angle="90"/>
				<Shot posAngle="180" posRadius="-80" angle="90"/>			
			</Configuration>
			<Missiles>
				<Missile 
						type=			"missile"

						damage=				"thermo:15d5; WMD7"
						missileSpeed=		"15"
						accelerationFactor=	"125"
						maxMissileSpeed=	"60"
						maneuverability=	"6"
						lifetime=			"1700"
						interaction=		"200"						
						multiTarget=		"true"
						autoAcquireTarget=	"true"
						hitpoints=			"30"
						stealth=	"35"
						noFriendlyFire=		"true"
							
						sound=			"&snMissileLauncher;"
						vaporTrailLength="5"
						vaporTrailWidth="350"
						vaporTrailWidthInc="-5"
						vaporTrailColor="0xd0, 0xd0, 0xd0"
						>
					<Effect>
						<Image imageID="&rsStdMissile1;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" rotationCount="40"/>
					</Effect>						

					<HitEffect
						sound="&snArmorHit1;"
						>
						<Image imageID="&rsExplosionsAG128;"
							imageX="0"
							imageY="0"
							imageWidth="128"
							imageHeight="128"
							imageFrameCount="16"
							imageTicksPerFrame="2"/>
					</HitEffect>
					<Fragment 
						count=			"1"
						type=			"radius"
	
						damage=			"thermo:6d24; momentum6; WMD7"
						minRadius=		"1"
						maxRadius=		"4"
						missileSpeed=	"0"
						>

						<Effect>
							<Flare
							style=			"fadingBlast"
							radius=			"170"
							primaryColor=	"0xff, 0xff, 0xf0"
							lifetime=		"8"
							/>
						</Effect>
					</Fragment>
				</Missile>
			</Missiles>
		</Weapon>
It's a bit iffy, and way to overpowered to be only 10MW, but at least you have something to tinker with now. I'm going to see if I can use initialDelay (look at Weapon_Devices on the Trans Wiki) to make it stagger, but good luck with you ship! Oh, and just revert the angle to get the starboard broadside. (is it starboard?)
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

I also read that you wanted lasers in the OP, but lasers don't track, so I changed them to be a missile instead. What you are asking for are firearcs, which aren't implemented [yet] and I still haven't been able to get the weapon to stagger.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

You might be able to accomplish the staggering with <OnWeaponFire> and have sysAddObjRecurringTimerEvemt for each shot, setting the timers for them. then use sysCreateWeaponFire.
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

with 1.05, <AutoDefenseDevice> accepts ships as valid targets (as well as beams or missiles, depending on the criteria), thus enabling the player with multiple automated turrets.

moreover, when you install a device, you can specify the position like this:

Code: Select all

<Devices>
			<Device deviceID="&itKilotonCannon;" omnidirectional="true" posAngle="0" posRadius="24"/>
		</Devices>
so that each autodefensedevice would shoot from a different position along a the ship, simulating a battery of lasers.
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

Note that what d1gdug is saying only works for using PRE-INSTALLED AUTODEFENSE devices; you cannot install a device to anything but the default location in-game/in-script, only in xml can you define a location. (as of version 1.05)
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Lockasenna, when you say targeting, is it target as in one 'gunner' aims or is it like the Stiletto, you fire it and it aims by itself? I've been thinking about it all during class today- and there are two options depending on the one you want:
a left and right broadsides
Or
Your previous thread asked for 5 lasers, so we can set it up so that they are all in a line at the center of the ship. If you want aiming, what you could add is multiTarget="True" and the shots could individually aim. To simulate a broadsides, all you would have to do is install a targeting rom and aim for whatever ship you want. I'll see if I can make some code, I'm on a phone, so no Notepad++ for me right now:(.
I don't know how to stagger shots yet.
Also, I'll try to see what I can do with <OnFire> and (sysCreateWeaponsFire).
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

might be an interesting addition for ships to have multiple weapons along the ship to be automatic - kinda like the ai ships.
Image
Image
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

I don't like how the omnidirectional weapons are processed very well. I tried to do the 5 laser setup, but when you use omnidirectional="true", it's like the whole weapon is being rotated. I don't like that as it makes it harder to do these kinds of things. I tried to use <OnFire>and sysCalFireSolution, but I can't get my head around the whole SysCreateWeaponsFire mechanic. Guess I'll have to study Tscript a bit more.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

Eventually, we might get it.

For now, there's awesome NPC-style work-arounds....and making do with what we can do with the playership.
Mischievous local moderator. She/Her pronouns.
Post Reply