[New Mod] Visible Damage

Post about your finished mods here.
Post Reply
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?

It was just an idea I had while working on Sandbox, but I was thinking that visual cues for damaged armor segments on enemy ships would be nice for Transcendence. That's why I made the Visible Damage mod, hoping to cure myself of that need. Enjoy!
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
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

Handy, indeed! I've DL'd it but haven't tried it yet, but if it helps to identify what segs are critical in cap ships, then it is a must have. As it is now, you have to keep pecking away at the ship on certain angles in order to do critical damage.
Hate when ya get the ship at 100% damage, continuous firing with direct hits and it's still alive! I've battled many a ship for several minutes this way, thinking...
Die already! :twisted:
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've made a point about the visible damage not being all too precise, so sometimes the damage trail is off by 15 degrees.
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?

Ok, another thing I just realized:
I am currently using an event handler approach to apply the visible damage, but some ships (like the St. Kats traffic), already have event handlers, and there isn't an ObjAddEventHandler.

I was looking towards overlays for my solution, but now there isn't a objFireRecurringOverlayEvent. I'll try to see what using <OnUpdate> will do, but I'd like a function like sysAddObjRecurringTimerEvent for the purposes of my mod.
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?

Ok, I just tried it, and my worst fear came true: every 30 ticks creates a sporadic smoke trail, and not one that is continuous. I'll keep thinking about how I can circumvent the event handler problem.
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?

Ok, reuploaded at 60 downloads and features 2 things:
-new colors for different damage levels
-if a ship has an event handler, an overlay will be applied instead.
Changes from old revision to new:
OLD:
VisibleDamageCut.png
VisibleDamageCut.png (37.9 KiB) Viewed 6460 times
NEW:
Visible damage V2.png
Visible damage V2.png (19.69 KiB) Viewed 6460 times
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?

Hi guys, after 692 downloads, V2 is out! :D
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.
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

RPC: Below is code to fix PSD ships not showing visible damage. Cut this code, highlight everything in <VisibleDamage>, then paste to replace.

Code: Select all

		<VisibleDamage>
			(block Nil
				;(plymessage gPlayer "visidamage on!")
				(enum (sysFindObject gSource "As") ship
					(block (theHand visOn)
						;- - - - - - - - - -
						; PM:  Check if the ship was tagged with visible damage.
						;  Don't use ObjSetData because the data attached to the
						;  player remains on the player even after a ship change.
						;  When player changes ships, visible damage remains on
						;  the old ship, but the data sticks to the player and
						;  transfers to the new ship, making the player immune
						;  to visible damage.  Thus, my edit to eliminate reliance
						;  on data check and just check visible damage directly.
						;- - - - - - - - - -
						(setq theHand (objGetEventHandler ship))
						(if (setq visOn (if theHand True Nil))
							(enum (objGetOverlays ship) theOverlay
								(if (eq theOverlay &ovVisibleDamage;) (setq visOn True))
								)
							)

						;run the check to see if the handler is already installed:
						;or that it already has an event handler [I think there can only be 1 per ship....]
						;if it has an event handler, just install the overlay instead.
						(switch
							;check if it has either visible damage event handler or overlay
							visOn
								;don't do anything
								Nil
							;check it it has event handler
							theHand
								;add the overlay instead
								(block Nil
									(objAddOverlay ship &ovVisibleDamage;)
									)
							;if it has no event handler, add visible damage event handler
							;apply ev handler and fire event
							(block Nil
								(objSetEventHandler ship &evVisibleDamageEventHandler;)
								(sysAddObjRecurringTimerEvent 5 ship "Damage")
								(sysAddObjRecurringTimerEvent (random 30 100) ship "Critical")
								;(dbglog(plymessage gPlayer "visidamage on!"))
								)
							)
						)
					)
				;look for ships
					;add event handler to all ships that don't have it
					;trigger the damage event 
				)
		</VisibleDamage>
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.
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?

Thanks PM, updated now.
Reuploaded at 1290 downloads.
This fix makes Visible Damage compatible with Playership Drones by PM.
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.
Lordocarrot
Anarchist
Anarchist
Posts: 7
Joined: Tue Jun 25, 2013 12:00 am

sweet, can't wait to try it out
Image
Post Reply