Doom monster
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > New projectile by replacing Lost Soul (it works!)
 
Author
All times are GMT. The time now is 10:51. Post New Thread    Post A Reply
Mechadon
Senior Member


Posts: 2214
Registered: 12-06


I've been trying lots of weird dehacked hijinks for Supplice. In particular I've been looking for ways to make a new monster projectile that doesn't require me to replace projectiles I want to keep. The problem with this is, of course, there are only codepointer to fire the existing projectiles, and you can't really make new codepointers :P

My first attempt used the BossSpit codepointer. It sort of worked but required the use of a moving spawn spot thing and it was very unpredictable and unreliable. A few days ago I remembered that the Pain Elemental has the codepointer which "shoots" Lost Souls, and it had me wondering if it would be possible to turn the Lost Soul into a projectile and use the PE spawn codepointer to "fire" it.

I put together a quick test patch and it seems to work...well, sorta. Here's the wad and bex:

http://mekworx.the-powerhouse.net/m...newprojtest.wad
http://mekworx.the-powerhouse.net/m...newprojtest.bex

The first thing I noticed is that the projectile's death state won't activate on walls. It will if it hits the player or another monster though. I've tried a couple of things but I can't seem to fix it or figure out why it's doing that in the first place.

The second thing I noticed is that the projectile flight pattern seems to be really off at times. Sometimes they will fly way above horizontal, up and over the player. I'm wondering if this has something to do with the Lost Soul's thing slot (perhaps some sort of hard coded behavior that I'm not entirely aware of). Or maybe it has more to do with the PE's spawn codepointer.

I'm worried about bugs that might pop up from this method as well, mostly from unknowns and/or hardcoded behavior. It seems to work ok on a basic level though and I'm seriously considering replacing the Lost Soul in Supplice if I can figure out the first bug I mentioned.

Anyways, can anyone shed some light on this for me?

By the way, those dart sprites are free to use. I made them from scratch originally for Supplice, but my intended use didn't really pan out.

Last edited by Mechadon on 01-13-13 at 06:01

Old Post 12-13-12 00:37 #
Mechadon is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
zZaRDoZz
Junior Member


Posts: 114
Registered: 09-09


Worked great in Zandronum/PrBoom+. In EDGE the projectiles just drop to the floor.

Old Post 12-13-12 13:59 #
zZaRDoZz is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Mechadon
Senior Member


Posts: 2214
Registered: 12-06


That's interesting. I don't know anything about EDGE, but does it support Boom features?

I guess it wasn't very clear in my original post, but I am looking for some insight and help with the bugs I encountered. Mostly in regards to the projectiles not entering their death state upon contact with walls. And whether or not replacing the Lost Soul as a projectile will cause me issues later on down the road.

Old Post 12-13-12 21:17 #
Mechadon is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Eris Falling
Forum Staple


Posts: 3038
Registered: 07-12



Mechadon said:
That's interesting. I don't know anything about EDGE, but does it support Boom features?


EDGE and Boom are two branches of DOSDoom, from what I can make out from the Doom Wiki's page on it, it doesn't look like it.

Old Post 12-13-12 21:26 #
Eris Falling is online now Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
zZaRDoZz
Junior Member


Posts: 114
Registered: 09-09


@ErisFalling:

EDGE is limit removing but can't handle some of Boom's moving textures.
Boom, Doomsday and the "Z" family all descend from the linux source side of the Doom family. Doom Legacy and EDGE are the only dos doom ports that I know of, at least that's my understanding.

@Mechadon:

Other than Edge, everything seemed to work as you described, even the 3 projectiles spawned at the pain elemental's death all stuck to the walls. No death post wall stick, although something remaining stuck to the walls is cool on its own merits.

Old Post 12-13-12 21:55 #
zZaRDoZz is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Mechadon
Senior Member


Posts: 2214
Registered: 12-06


Ok I think I understand. This is bex format, so if EDGE doesn't support Boom features (I'm assuming this just based on the fact that is wasn't derived from Boom (perhaps it has gained support for Boom or will in the future?)) then that makes sense. In which case this is still within the realm of possibility for Supplice as it is a Boom compatible project.


zZaRDoZz said:
No death post wall stick, although something remaining stuck to the walls is cool on its own merits.


I'll admit it actually looks neat and makes sense within the context of metal dart projectiles. I'm not sure what sort of projectile I'll make for the new monsters in Supplice using this method, but it most likely won't be those darts. It needs to go to its death state like the other projectiles in that case (and maybe this isn't possible for some reason unknown to me).

Old Post 12-13-12 22:54 #
Mechadon is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
andrewj
Senior Member


Posts: 1638
Registered: 04-02


The problem with the projectile not exploding on walls is due to the A_PainAttack() code pointer, which calls A_SkullAttack() on the newly created lost soul and this sets the MF_SKULLFLY flag.

The MF_SKULLFLY flag is what stops the missile exploding when hitting a wall (since lost souls are meant to just stop when they hit something).

I'm not sure yet if there is any workaround.....

ok, try adding the 'TOUCHY' flag.

otherwise you would need to make the missile explode after a fixed delay, though that will not be perfect since when it hits a wall, the lost soul goes back to its spawn state (restarting the delay).

Last edited by andrewj on 12-14-12 at 00:39

Old Post 12-14-12 00:21 #
andrewj is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
kb1
Member


Posts: 378
Registered: 11-06


Interesting DeHacked hacking! About the wall hitting: Sounds like what the Lost Souls do when they hit the wall. Can't you simply make the projectile die a few seconds after spawnning, so, if it hits the wall, it'll just disappear soon anyway?
EDIT: In seconds too late :)

Old Post 12-14-12 00:44 #
kb1 is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Mechadon
Senior Member


Posts: 2214
Registered: 12-06


Ok I see now, the PainAttack codepointer has some of the Lost Soul's behaviors built into it. That makes sense now that I think about it.

Having the projectile disappear after a few seconds would probably work ok with the dart sprites. I'd have to make sure it lasts long enough that it would still be useable at longer ranges. With an animating projectile though, it still might look sort of weird.


andrewj said:
ok, try adding the 'TOUCHY' flag.


I'm sort of confused by which flag your referencing. Do you mean the "Invisible and Touchable" flag? I did try that but it makes the object invisible...obviously :P. I'm using WhackEd2 to edit my bex patch, so maybe it uses a different name for the flag your talking about.

If we can figure out if it's possible to make this method look and behave as seamless as possible in relation to the stock projectiles, then I'll definitely consider using it in Supplice. Otherwise it might just have to be another idea to toss in the experiment folder.

Thanks for your insight and help andrewj and kb1 :D

Old Post 12-14-12 07:05 #
Mechadon is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
andrewj
Senior Member


Posts: 1638
Registered: 04-02



Mechadon said:
I'm sort of confused by which flag your referencing. Do you mean the "Invisible and Touchable" flag? I did try that but it makes the object invisible...obviously :P. I'm using WhackEd2 to edit my bex patch, so maybe it uses a different name for the flag your talking about.

The flag is actually an MBF feature, which PrBoom and probably some other source ports support. It is meant to turn an item into a touchable mine which explodes when an actor touches it.

The PrBoom code suggests that having this flag means the missile will explode when it stops moving, but I'm not sure if it will actually work, or if it does, whether it will work in Boom-compatible source ports.

P.S. tried it with PrBoom and -complevel 11 (MBF), and it didn't work.

But I had another idea: put the A_Die code pointer into the lost soul's spawn state. In Doom, Boom and PrBoom the action in a spawn state is not executed when an object is spawned. But the lost soul will re-enter its spawn state (and execute the action) whenever it stops.

Last edited by andrewj on 12-14-12 at 07:56

Old Post 12-14-12 07:33 #
andrewj is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Mechadon
Senior Member


Posts: 2214
Registered: 12-06


I decided to come back to this problem today and see if the A_Die codepointer would work. Turns out it doesn't :P. I've tried a combination of different things, including A_Die and the TOUCHY flag, but to no avail.

Any other ideas guys? Is there any way to trick the engine into removing the MF_SKULLFLY from the object?

Right now I'm looking at the timer-to-death idea. It is the only method so far that actually removes the projectile (dart in this case) and plays the death animation after the tics run through. It looks kind of weird and would look even weirder with an animating projectile. Although at the current moment in time, I don't actually have a clear idea of what my new projectile will be, so I'm trying to think of a design where having it stuck on a wall won't look so stupid.

I do have one idea I'm going to try, but I don't know if it will work. And if is does work, I don't know if there would be any repercussions. Basically it involves making a replica projectile object using another thing slot. When the first projectile (replaced Lost Soul) is called, it would then immediately switch over to the new thing slot via using new frames. So the replaced Lost Soul projectile would just serve to fire the frame via the PE spawn codepointer, and then switch over as soon as possible to the new thing slot. Hopefully this would remove the MF_SKULLFLY flag in the process, but I do not if it will work at all or if will cause more serious problems. Seems like this is a really long shot anyways, so I'm not holding my breath :P

*edit*

Nope, my silly double-thing idea didn't work either. Oh well!

Last edited by Mechadon on 01-12-13 at 08:10

Old Post 01-12-13 07:43 #
Mechadon is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06


Oh man. I've solved this problem of PainAttack = projectile, for another Doomworld user. But I don't remember the thread! It involved a complicated sequence of painattack and skullattack and JUSTHIT flag and chase states and reactiontime = 1 to make the projectiles go straight to you and really explode on any impact. It worked in vanilla Doom without crashes.

Good luck finding the thread.

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 01-12-13 08:47 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Mechadon
Senior Member


Posts: 2214
Registered: 12-06


Awww printz your killing me! :D

Guess I'll have to do some searching then.

Old Post 01-12-13 09:16 #
Mechadon is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06


Wait, do you think this is it? http://pastebin.com/RePCHbam Try it on Pain Elementals.

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 01-12-13 09:52 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Mechadon
Senior Member


Posts: 2214
Registered: 12-06


Whoa that actually works printz!

I tried dissecting why it works but it's a bit beyond me. All I know is that without the Spawn and Move states as well as the "Attack Right Back" flag enabled, it won't work right. It seemed like it would be redundant to have the Look and Chase codepointers like that but well..I dunno, it works!

I did mess around with a few other things (while trying to break it and see how it works) and I disabled and changed a few things without any noticeable effect. I changed the thing ID to -1 (like the other projectiles), removed the action sound, and removed the "FaceTarget" and "SkullAttack" codepointers from the attack state. Like I said, it still seemed to work fine, but do you know if there are any repercussions to making those changes?

I did a bit more experimenting around last night with an idea I had for a new projectile. I noticed that I couldn't change the projectile speed or do a couple of other things I wanted (like make it a tracer missile like the Revenants projectile). So what I'm thinking about doing is swapping out one of the other projectiles in the game with this Lost Soul method (possible the HK/Baron projectile) and then use the normal projectile I replaced to create something entirely different. I'm not entirely sure how it will work out, but at least this Lost Soul projectile hack is working. So that's a big part of the problem knocked out of the equation.

Thanks a ton printz :D

Old Post 01-13-13 06:00 #
Mechadon is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06


Beware that if you replace other regular projectiles with this one, monsters that shoot that one will be likely to hurt each other -- and if they hit other species, that monster won't consider them enemy. It also spawns at a different position. I think they can even hurt themselves.

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Last edited by printz on 01-13-13 at 08:55

Old Post 01-13-13 07:57 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Mechadon
Senior Member


Posts: 2214
Registered: 12-06


I'm going to experiment around with the projectile swapping idea a bit before I commit to doing anything final with it. The lack of in-fighting potential seems like it would be the biggest drawback at this point. I'm just going to have to play around with it a bit and see.

Old Post 01-13-13 20:23 #
Mechadon is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Mechadon
Senior Member


Posts: 2214
Registered: 12-06


By the way printz, I believe I found that thread you were talking about.

Reading through it, I noticed you listed some drawbacks to this idea, some of which I knew already. The last one is probably going to make keep me from going through with my projectile swap idea though; the projectiles will be stopped by items. Crap :P

After some thought, I decided what type of projectile I wanted to make. I got some inspiration from an Armored Core game to make a slow moving but homing missile that would do a ton of damage and use the A_Mushroom codepointer. This projectile was going to be added to the final boss for Supplice in addition to his current attack behavior. But after I started messing around with the Tracer codepointer, I noticed that it would never home in, even when the smoke trail appeared.

I'm guessing the homing effect will only take place when both the Tracer and the Revenant attack codepointer is used in conjunction? I was going to make another help thread asking about this, but now I'm not sure it will be worth it because of the limitation with the Lost Soul and being blocked by items. I should still be able to use the Lost Soul projectile on the boss monster though since he will be used in a more controlled environment.

Old Post 01-14-13 00:53 #
Mechadon is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11200
Registered: 07-07



Mechadon said:
I'm guessing the homing effect will only take place when both the Tracer and the Revenant attack codepointer is used in conjunction?


Yep.

The missile needs to know what it's aimed at. Most projectiles are dumb things that go straight ahead, they don't need to know at what they're aimed, so the only attack function that tells the projectile what is being targeted is the revenant's missile function.

If you cannot use it, then you have to either forget the idea or use something like DECORATE instead of DeHackEd...

Old Post 01-14-13 01:14 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Mechadon
Senior Member


Posts: 2214
Registered: 12-06


Thanks for clearing that up for me Gez. I figured that might be the case. The descriptions that show up in WhackEd2 don't really clarify that both need to be used in order for the projectile to home.

Seeing as the Lost Soul projectile is going to be pretty limited anyways, I'm probably going to forget about my homing missile idea and just go with a more normal projectile to be used solely on the boss monster.

I appreciate all of the helps guys!

Old Post 01-14-13 01:19 #
Mechadon is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 10:51. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > New projectile by replacing Lost Soul (it works!)

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.