Shield Device: How?

A place to discuss mods in development and concepts for new mods.
Post Reply
erik dela cruz
Militia Captain
Militia Captain
Posts: 614
Joined: Wed Mar 02, 2011 7:45 pm
Location: Patrolling Scarborough Shoal and the Spratlys Islands (West Philippine Sea)

First of all, i ask has anyone modded a shield device? If none how can i make one?

I want two devices: a shield regen accelerator (i know Atarlost has Shield Accelerator crystals) & a shield power multiplier. Is this cool or what? :?:
.....cry without weeping......
.....talk without speaking......
.....scream without raising your voice......
Amilir
Militia Lieutenant
Militia Lieutenant
Posts: 151
Joined: Fri Feb 12, 2010 4:56 pm
Location: With the stRong.

I can't actually think of any shield boosting devices. You could experiment, but I don't think the functionality you want is built into transcendence. You'll probably have to use tscript. The code for increased regen will probably look something like this:
[code]
Set the overlay on the object from the device. (see northwind nanite shield)

<OverlayType UNID="&shieldRegenOverlay;"><Events><OnUpdate> (shpRechargeShield gSource, (multiply (objGetItemProperty gSource <shield> <regen rate>) <regen boost percentage>)) </OnUpdate></Events></OverlayType>
[/code]

You'll have to figure out how precisely to extract the regen rate of the shield if you want a percent enhancement. The reference isn't too specific:
http://transcendence.kronosaur.com/wiki ... ata_fields
"category" isn't complete by itself... There exists a (shpGetShieldMaxHitPoints) function, but no (shpGetShieldRegen) :(
Oh, and I'm not sure how to declare the item as the shield of the ship. Best to ask someone better than I am on IRC.


...Scratch all that. I just scrolled up 20 lines in Northwind devices (one of the best reference mods ever) and found the Northwind Auxiliary Shield Generator. Go look at that code, it's exactly what you want:
http://xelerus.de/index.php?s=mod&id=761
It actually works, but it looks like Atarlost couldn't figure out how to extract the regen rate directly either. :P Maybe I'm not as stupid as I thought. Then again, I forgot that code existed in the first place.

Increasing the max HP with a device is either going to be easy, or nearly impossible. You can probably get almost the right effect with enhancements, which will be a PITA, because you'll have to track the base enhancement, AND handle field crystals, AND any other edge cases.
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

1.2 introduces another (easy) way to enhance shields, and it can be done with nearly any device type, even weapons if you desire. Here is an example using a miscellaneous device as a base:

Code: Select all

	<ItemType UNID="&itShieldEnhancer;"
			name=				"shield enhancer"
			level=				"1"
			value=				"500"
			mass=				"500"
			frequency=			"uncommon"
			unknownType=		"&itUnknownEnhancer2;"
			attributes=			"MajorItem"

			description=		"This device raises maximum strength of shield generators by 50%"
			>

		<Image imageID="&rsItems1;" imageX="0" imageY="192" imageWidth="96" imageHeight="96"/>

		<MiscellaneousDevice
				powerUse=		"5"
				>
			<EnhancementAbilities>
				<Enhance type=			"shieldPower"
						 criteria=		"s"
						 enhancement=	"+hpBonus:50;"
						 />
			</EnhancementAbilities>
		</MiscellaneousDevice>
	</ItemType>
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

Amilir wrote:[It actually works, but it looks like Atarlost couldn't figure out how to extract the regen rate directly either. :P Maybe I'm not as stupid as I thought.
I know it wasn't possible to do so when I wrote that code.

And glad it's useful.
Literally is the new Figuratively
erik dela cruz
Militia Captain
Militia Captain
Posts: 614
Joined: Wed Mar 02, 2011 7:45 pm
Location: Patrolling Scarborough Shoal and the Spratlys Islands (West Philippine Sea)

Hey as i've said before i'm in fact the biggest fan of Northwind (hail Atarlost!) downloading it again with the WE5. ....AND I"M GONNA TEST THE SUPERWEAPON MOD ON MY FAVORITE TESLA ION HOWITZER!!!!!! YIPEEE!!!! :D

..Oh thanks again PM. 'll be experimenting on your code vs. the NW device. :D
.....cry without weeping......
.....talk without speaking......
.....scream without raising your voice......
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Northwind (hail Atarlost!) downloading it again with the WE5
Didn't test WE5 recently, is it still working with 1.2RC2 ?
User avatar
sun1404
Militia Captain
Militia Captain
Posts: 527
Joined: Thu Nov 03, 2011 10:32 am
Location: Heretic. (Finally!)

I believe WE5 is incompatible since 1.2b2 or so. It'll mess up.... something bad. If I remember correctly, it'll eventually give you warning message every second, because some global thingies are changed, and the game can't handle it.

Maybe it's just an incompatibility with another mod, but it has never happen before 1.2.
Yes, look at my avatar, I have a wyvera type ship.
Post Reply