I was screwing around to see if I could come up with a "grey ooze" (I know, I know, looks purple ) effect...
Basically, at the end of the lifetime of the first projectile, a sysCreateWeaponFire is used to call fire from a virtual weapon. The virtual weapon uses <OnFragment> to trigger 2 sysCreateWeaponFire calls to itself, which is "recursive" by definition, except... it's done twice. 1-2-4-8-16-32-64-128-256-512-1024-2048...
Code: http://paste.neurohack.com/view/Y6jA8/
Hilarious image result after about 5 minutes of incredible slow processing on Transcendence. The resulting mess was created by a single shot.
Just one call creates near-"immortal" projectiles that live on after hitting a ship, only things like planets can actually 'kill' the projectiles. More testing needed on that side effect.
Viral Gland/Nano Cannon (Recursive weaponfire demonstration)
cool, could you possibly reduce the exponential function to such an extent that it could actually be realistically used ingame
for example only every 3rd or 5th cycle creates a double copy.
for example only every 3rd or 5th cycle creates a double copy.
(func(Admin Response)= true){
if(admin func(amiable) = true)
Create func(Helpful Posts)
else func(Keep Calm and Post derisive topics)}
if(admin func(amiable) = true)
Create func(Helpful Posts)
else func(Keep Calm and Post derisive topics)}
- Cygnus.X1
- Militia Lieutenant
- Posts: 245
- Joined: Sun Feb 24, 2008 6:21 pm
- Location: Elysium Fields... I mean System
- Contact:
I really ignorant when it comes to Tlisp, but yes, I was thinking of finding a way to limit both the reproduction rate and the maximum lifetime. Even with a single replication shot, the projectiles keep respawning and eventually don't have a target to seek, and in play testing Trans slowly but surely slowed down, which I suspect is due to 100s of shots flying out into infinite space as the game engine continues to keep track of every single one.
I'm hoping to find a way to kill off the shots after they exceed a certain distance from the playership, and a conditional ratio for reproduction so it can be adjusted to avoid overloading the game engine.
I'm hoping to find a way to kill off the shots after they exceed a certain distance from the playership, and a conditional ratio for reproduction so it can be adjusted to avoid overloading the game engine.
- Cygnus.X1
- Militia Lieutenant
- Posts: 245
- Joined: Sun Feb 24, 2008 6:21 pm
- Location: Elysium Fields... I mean System
- Contact:
Full and functional weapon code pasted in link: http://paste.neurohack.com/view/Y8PfM/
Tested in BattleArena against a rediculous number of ships and the limiters are working as intended to keep the game engine from choking
The juicy part:
Since this little side project has become so successful, I'm going to make it into an actual weapon mod complete with custom graphics. Right now it only exists on my recently made godmode ship, hence all the references to the Goddess Athena, but I'll be making a nicer set of graphics for it instead of borrowing from my Defiant playership.
Many Many MANY thanks to StarWeaver, RPC, PM, and DigDug for putting up with my constant badgering in IRC for help with coding all this. Couldn't have done it without you guys
[Edit] The longer I stare at it the more I notice stuff... so let me reiterate that this is "working" and functional code but I certainly will not claim it to be optimized [/]
Tested in BattleArena against a rediculous number of ships and the limiters are working as intended to keep the game engine from choking
The juicy part:
Code: Select all
<OnFragment>
(block Nil
(setq shotdist (sysVectorDistance gSource gPlayership))
(if (leq (sysVectorDistance aHitPos gPlayership) 90)
(block Nil
(sysCreateWeaponFire &vtAthenaDagger; aOrderGiver aHitPos aHitDir 50 nil)
(block Nil
(setq diceroll (rollDice 1 100))
(setq pcount (count (sysFindObject nil "m")))
(dbgOutput (cat "D" shotdist "R" diceroll "C"))
(if (and (leq diceroll 50) (leq pcount 100))
(block Nil
(sysCreateWeaponFire &vtAthenaDagger; aOrderGiver aHitPos aHitDir 40 nil)
(dbgOutput (cat "!" pcount))
)
)
)
)
)
)
</OnFragment>
Many Many MANY thanks to StarWeaver, RPC, PM, and DigDug for putting up with my constant badgering in IRC for help with coding all this. Couldn't have done it without you guys
[Edit] The longer I stare at it the more I notice stuff... so let me reiterate that this is "working" and functional code but I certainly will not claim it to be optimized [/]
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
Np, we all help each other out on IRC All we ask for is an epic awesome mod on Xelerus
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
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.
Get on Discord for mod help and general chat
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.
- Cygnus.X1
- Militia Lieutenant
- Posts: 245
- Joined: Sun Feb 24, 2008 6:21 pm
- Location: Elysium Fields... I mean System
- Contact:
Ask, and ye shall receive
http://xelerus.de/index.php?s=mod&id=1203
Godmod ship Athena, armed with the Viral Gland.
http://xelerus.de/index.php?s=mod&id=1203
Godmod ship Athena, armed with the Viral Gland.
- Cygnus.X1
- Militia Lieutenant
- Posts: 245
- Joined: Sun Feb 24, 2008 6:21 pm
- Location: Elysium Fields... I mean System
- Contact:
Something odd is going on with <OnFragment> and the transparent sections of stations. Near as I can tell, the recursive firing is getting caught in a loop as each projectile is regenerated near the borders of the station hitbox, but never gets the chance to actually move before the new projectile has another <OnFragment> event triggered. This is causing a significant performance hit, even with the coded limitation to prevent shots from being regenerating or from creating clone shots if the total number of projectile missiles in the system is more than 100.
I'm going to try to find a coding workaround, but IMHO this actually has a root cause in how the game engine triggers <OnFragment> when a missile projectile hits the transparent areas of a station's graphics.
I have been experimenting with this weapon a lot, and I've recently added more code that slightly randomizes the angle and initial speed of a "clone" shot, which is an extra shot generated depending on a dice roll during each <OnFragment> event.
http://paste.neurohack.com/view/YFLdX/
In the screen shot above, I fired the primary shot from about 60ls away, long enough for it to go through a couple of generations, creating about 7 or so clone shots. One of those clone shots managed to hit the Sung Defense Turret that you can see "surrounded" in the screenshot. It traveled through the defense turret, triggering <OnHit> events and causing damage as expected, but when it got to the far side of the turret (which is considered as a station), it started looping without moving, or at least, not moving far enough to escape triggering another <OnFragment> event. After staring at this predicament for some time, I notice the randomized angle vectoring was causing clone shots to spread out from the initial looping point, creating a cluster**** of a ring of looping shots around the turret. I know this has something to do with the hitbox of a "live" station, because I can stop the looping problem by destroying the station with another weapon or with primary (as in, not cloned) shots from my viral gland weapon. Once the station blows up, all the virii shots that were stuck looping suddenly fly out from the station as normal. Looks pretty once that happens, expect it shouldn't be happening in the first place.
I can fairly reliably duplicate this effect on just about any kind of station. I first noticed it when fighting the Iocrym stations in version 1.08g. With the passthrough changes in the flurry of new game versions that have come out recently, the problem has varied a lot, but with version 1.08k, things seem stable enough (looping et al) for more thorough troubleshooting.
This was taken just a few seconds after I destroyed the turret. Since it's a still shot, it's kind of hard to tell what's happened, but the virii are flying out away from the turret they were stuck on in a broken ring. The main Sung Station was destroyed in the wave of virii, and about half of the slave stations complained This weapon has no subtlety
My first idea for a workaround is to see if I can add some value to the positioning of the recursive fire cycle to force the looping projectiles to eventually escape the hitbox of the station. We'll see...
I'm going to try to find a coding workaround, but IMHO this actually has a root cause in how the game engine triggers <OnFragment> when a missile projectile hits the transparent areas of a station's graphics.
I have been experimenting with this weapon a lot, and I've recently added more code that slightly randomizes the angle and initial speed of a "clone" shot, which is an extra shot generated depending on a dice roll during each <OnFragment> event.
http://paste.neurohack.com/view/YFLdX/
In the screen shot above, I fired the primary shot from about 60ls away, long enough for it to go through a couple of generations, creating about 7 or so clone shots. One of those clone shots managed to hit the Sung Defense Turret that you can see "surrounded" in the screenshot. It traveled through the defense turret, triggering <OnHit> events and causing damage as expected, but when it got to the far side of the turret (which is considered as a station), it started looping without moving, or at least, not moving far enough to escape triggering another <OnFragment> event. After staring at this predicament for some time, I notice the randomized angle vectoring was causing clone shots to spread out from the initial looping point, creating a cluster**** of a ring of looping shots around the turret. I know this has something to do with the hitbox of a "live" station, because I can stop the looping problem by destroying the station with another weapon or with primary (as in, not cloned) shots from my viral gland weapon. Once the station blows up, all the virii shots that were stuck looping suddenly fly out from the station as normal. Looks pretty once that happens, expect it shouldn't be happening in the first place.
I can fairly reliably duplicate this effect on just about any kind of station. I first noticed it when fighting the Iocrym stations in version 1.08g. With the passthrough changes in the flurry of new game versions that have come out recently, the problem has varied a lot, but with version 1.08k, things seem stable enough (looping et al) for more thorough troubleshooting.
This was taken just a few seconds after I destroyed the turret. Since it's a still shot, it's kind of hard to tell what's happened, but the virii are flying out away from the turret they were stuck on in a broken ring. The main Sung Station was destroyed in the wave of virii, and about half of the slave stations complained This weapon has no subtlety
My first idea for a workaround is to see if I can add some value to the positioning of the recursive fire cycle to force the looping projectiles to eventually escape the hitbox of the station. We'll see...
- Cygnus.X1
- Militia Lieutenant
- Posts: 245
- Joined: Sun Feb 24, 2008 6:21 pm
- Location: Elysium Fields... I mean System
- Contact:
Once again, StarWeaver pulled a rabbit out of his hat for me on IRC.
(sysVectorPolarOffset aHitPos aHitDir 1)
This bit of code can be used in place of aHitPos to add 1 light second in distance along the original path of travel, which prevents the looping bug in all testing so far. Thanks Fuzzy Dragon!
(sysVectorPolarOffset aHitPos aHitDir 1)
This bit of code can be used in place of aHitPos to add 1 light second in distance along the original path of travel, which prevents the looping bug in all testing so far. Thanks Fuzzy Dragon!
Fancy, nice to see someone else getting some recursion together. I remember making a recursive weapon with... similarly icky results initially, but I wound up using a couple different types of fragments instead of repeating like that since I wanted to avoid dice rolls...
Overall really cool stuff, I might have to borrow some code and go back to experimenting in TLisp... :3
Overall really cool stuff, I might have to borrow some code and go back to experimenting in TLisp... :3
My first mod, mostly done, still balance testing.
http://xelerus.de/index.php?s=mod&id=789
http://xelerus.de/index.php?s=mod&id=789
- Cygnus.X1
- Militia Lieutenant
- Posts: 245
- Joined: Sun Feb 24, 2008 6:21 pm
- Location: Elysium Fields... I mean System
- Contact:
I'm a kopimist, so please do ^_^Wurmish wrote:Overall really cool stuff, I might have to borrow some code and go back to experimenting in TLisp... :3
I'm actually very close to releasing a stand-alone version of the Viral Gland weapon, but for now it's still part of my Athena god-mod-ship mod. I'm going to be updating that sometime tonight.
http://paste.neurohack.com/view/YPprm/ <-- current version of just the two item types needed for the weapon, TLisp coding has been very commented
- Cygnus.X1
- Militia Lieutenant
- Posts: 245
- Joined: Sun Feb 24, 2008 6:21 pm
- Location: Elysium Fields... I mean System
- Contact:
http://xelerus.de/index.php?s=mod&id=1203
Athena and her Viral Gland weapon re-uploaded at 26 downloads
Athena and her Viral Gland weapon re-uploaded at 26 downloads
- Cygnus.X1
- Militia Lieutenant
- Posts: 245
- Joined: Sun Feb 24, 2008 6:21 pm
- Location: Elysium Fields... I mean System
- Contact:
Viral Gland is a weapon in the game Pardus... but the best alternative name I could come up with is "Nano Cannon", which sounds very bland but does describe it well...
Here's a sneak peak at the graphics I've been working on today:
wheeeeee
Screenshot:
Here's a sneak peak at the graphics I've been working on today:
wheeeeee
Screenshot:
- Cygnus.X1
- Militia Lieutenant
- Posts: 245
- Joined: Sun Feb 24, 2008 6:21 pm
- Location: Elysium Fields... I mean System
- Contact:
I have separated the NanoCannon into it's own mod: http://xelerus.de/index.php?s=mod&id=1225
Please feel free to use it or include it with other mods
Athena herself has been updated with an over-sized smuggler's hold, and an ungodly over-powered omni-gun with homing projectiles
http://xelerus.de/index.php?s=mod&id=1203
Unless I come up with something new and spectacular, this is likely to be the last updates to either mod.
Please feel free to use it or include it with other mods
Athena herself has been updated with an over-sized smuggler's hold, and an ungodly over-powered omni-gun with homing projectiles
http://xelerus.de/index.php?s=mod&id=1203
Unless I come up with something new and spectacular, this is likely to be the last updates to either mod.
- Cygnus.X1
- Militia Lieutenant
- Posts: 245
- Joined: Sun Feb 24, 2008 6:21 pm
- Location: Elysium Fields... I mean System
- Contact:
Yeah, ok, I lied, kinda...
Minor updates to the NanoCannon have been uploaded, mostly tweaking the TLisp variables for better functionality and balance.
This should not require restarting any save games that have this mod included... "should".
Screenies of various ships getting swarmed.
Minor updates to the NanoCannon have been uploaded, mostly tweaking the TLisp variables for better functionality and balance.
This should not require restarting any save games that have this mod included... "should".
Screenies of various ships getting swarmed.