Playing with dead things

Freeform discussion about anything related to modding Transcendence.
Post Reply
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

As many of you know I hate a system cluttered with wrecks caused by my very bad ideas :)

however, I have a station the reacts when hit by a particular type and the reactions can be both strong and last awhile, depending on the target they are fighting.

Anyway, this can lead to many wrecks from the response team....I do not want that and besides , at those levels the ships have barely anything the player would want.....so I was toying with the codes for ordering ships to destroy wrecks....#failed.
I decided to order the station to do it....after several frustrating tries I came up with a nice working order :)

Code: Select all

(block (aWreckObj)
          (setq aWreckObj (sysFindObject gSource "TK N:200; +shipwreck; -uncharted; -locked;"))
          (enum aWreckObj obj
            (objDestroy obj)
          )
        )
Now, you will say " 200 is alot " but these stations are usually not in the inner system so most of the wrecks it would get are either looted already by the time you get to it or caused by the response from the station ( and the order only activates when the station is responding to attack, once the station is no longer being hit, wrecks that remain will remain ( in theory ) )

I DID find a similar code in my files using the " objDestroy obj " , it was in BattleZone ( i check for such things because there are only so many ways to go " boom " and while your tinkering with codes it is very easy to replicate something you saw at one time without realizing it....)
However, in this case it " just worked out that way " . I first learned of aWreckedObj from the DragonSlaver, later learned it could be used for other ideas by RPC's DySys use of it...and while I never really tried THIS before, it works very well and I think it will let me push a few items into the response that can be useful to the player ( I have found that defenders recharging shields can go as far as 400 from the target so that limits the amount of wrecks and viable loot from an overwhelming amount of ships that could respond to a attack of multiple targets with the right weapons to activate the code. )

sooooo, other then figuring out this neat trick on my lonesome :) I will mind you that the " 200" can be anything, but I do think the system has a limit of 359 ( but what exactly has that limit I forget, but I do think it had to do with finding wrecks. )
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

good job Shane :D

that's a nice and clean function to clean out wrecks.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

digdug wrote:good job Shane :D

that's a nice and clean function to clean out wrecks.
The actual ( full order )to the station : I will not tell the station, but it is usually there when you need to run away from these weapon types.

Code: Select all

<Events>
			<OnAttacked>
				(if (and (or (eq aDamageType 'ion) (eq aDamageType 'positron))
				
							)
		; If we're attacked with something more powerful, then we
						; attack in force.
						(block (newShip)
							(setq newShip
								(sysCreateShip 
									(random '(&scIAVHeavy; &scRoninB; &scRoninC; &scBritannia; &scRoninA; &scWolfen; &scCenturion;))
									gSource
									&svRingers;
									)
								)
							(objAddSubordinate gSource newShip)	
							(shpOrder newShip 'attackNearestEnemy)
							
							(shpOrder newShip 'gate gSource)
							
							(block (aWreckObj)
          (setq aWreckObj (sysFindObject gSource "TK N:200; +shipwreck; -uncharted; -locked;"))
          (enum aWreckObj obj
            (objDestroy obj)
          )
        )
							))
			</OnAttacked>
			</Events>
the reason the "objAddSubordinate" exists is in the event the player or the players' drones are shooting wild and destroy any of the station defenders : ( in theory ) I was never daring enough to brave to test it: i was behind an enemy base and it seemed like every patrol in the system decided to stalk me while I was hiding out.
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
Post Reply