header general

Decorate Cacomancer

  • Grape Juice
  • Grape Juice's Avatar Topic Author
  • Shotgunner
  • Shotgunner
More
3 months 3 weeks ago #1 by Grape Juice
Decorate Cacomancer was created by Grape Juice
I LOVE the Cacomancer, he's one of my favourite realm667 enemies! But the problem is, I want to use him for my multiplayer mod in zandronum called Demon Master to encourage more strategy (2 Teams, Marines and Demon Master, Demon master has to summon demons to influence the level and stop the marines from beating the level), but zandronum is completely incompatible with zscript... If somebody could make a decorate version of Cacomancer so I could actually use the guy I would be EXTREMELY grateful!

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar
  • Arachnotron
  • Arachnotron
More
3 months 3 weeks ago #2 by DeVloek
Replied by DeVloek on topic Decorate Cacomancer
Glad you like it :-)

I haven't written any DECORATE since I started learning Zscript years ago, so I'm very rusty and probably couldn't help at all. Most internal functions of the Cacomancer are Zscript-only, I guess some of them could be emulated with DECORATE code but I wouldn't know where to begin. Maybe the blockthingsiterator that scans for eligible monsters to buff can be replicated with A_Radiusgive, but the buff itself... no idea.
So unless someone who is proficient in both DECORATE and Zscript sees this, the chances for this to happen are unfortunately slim.

But theres a glimmer of hope regarding multiplayer in GZDoom. The dev team is currently working on significant improvements to GZdoom's extremely archaic netcode. I watched a livestream on Nash Muhandes' YT channel a few months ago where he talked about that and other improvements to GZ/VKdoom. So maybe when the next big update arrives, it may be possible to run your mod in GZ/VKdoom without having to worry about desyncs and whatnot.

Please Log in or Create an account to join the conversation.

  • Grape Juice
  • Grape Juice's Avatar Topic Author
  • Shotgunner
  • Shotgunner
More
3 months 3 weeks ago #3 by Grape Juice
Replied by Grape Juice on topic Decorate Cacomancer
Which part of cacomancer would be near impossible to convert? I couldn't imagine increasing an enemies defense or attack speed with a projectile would be THAT hard, right? I know the cacomancer targeting monsters and the player is possible to recreate with decorate because of the medic commando being able to target monsters to buff and attack the player simultaneously.

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar
  • Arachnotron
  • Arachnotron
More
3 months 3 weeks ago - 3 months 3 weeks ago #4 by DeVloek
Replied by DeVloek on topic Decorate Cacomancer
Hm that isn't easy to answer... for starters, GZdoom can process anonymous functions in Decorate code but Zandronum cannot, which is probably the main obstacle here.

But even if it could, certain things that are very easy to do in Zscript can be a pain in Decorate, like the aforementioned Blockthingsiterator that can easily access and manipulate everything you want in a radius. In this case it provides the aura buff to all nearby monsters that are eligible, ie within line of sight, not already buffed, not dead, not a cacomancer, and not still in their spawn state. Replicating this exact behavior in Zandronum might be impossible. Internally, A_Radiusgive does a similar thing to a blockthingsiterator but much more restrictive. This function has some filter flags but probably not those that are necessary.
Then there is SpecialMissileHit which afaik doesn't have any equivalent in Decorate at all, not to mention the various overrides that this monster uses... not the slightest idea how to do something like a Tick override in Decorate.

I wish I could help you more, maybe I can help with specific issues that may arise when you or someone else starts converting the code. I guess you could ask around on the Zdoom Discord, I know a few modders there are creating Zandronum mods, they may be willing to help or at least tell you how feasible all this really is.

To say it with the words of one of the GZdoom devs:

basically, decorate in gzdoom is zscript-lite, decorate in zandronum is pure distilled pain

edit: I went ahead and asked on the Zdoom discord how feasible it is, let's see...
Last edit: 3 months 3 weeks ago by DeVloek.

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar
  • Arachnotron
  • Arachnotron
More
3 months 3 weeks ago #5 by DeVloek
Replied by DeVloek on topic Decorate Cacomancer
OK I have good news and bad news. It may be possible but it's gonna be a real pain.

Like I mentioned, Zandronum Decorate cannot process anonymous functions (ie. everything within { } brackets). There is a way to get around this restriction but you'll probably end up with a many, many dozens of TNT1 A 0 lines, because "every IF/ELSE block has to be substituted for another state sequence and an A_JumpIf call" (quoting an answer from the discord here).

Another obstacle is limited access to pointers. The Cacomancer's buff is basically a PowerDamage powerup, but on top of that it also reduces the owner's tics (so it animates faster), increases the owner's fire rate, and spawns particles on the owner. The thing is, Zandronum doesn't have access to the owner pointer, just to the basic ones like target, tracer, master.
You could try to replicate the buff by creating a new powerup for each of its sub-functions, and give them to the affected monster alongside the PowerDamage powerup. Or maybe you could try using a CustomInventory actor that handles all this within its Pickup/Use states, but I don't know if these will even execute if the owner is not a player but a monster.

I guess the best approach is to write the whole Decorate from scratch instead of trying to convert the existing code line by line. Start with the basic monster that goes around and shoots the missile that buffs a single monster. Then you can try and add the other features one after the other and see how far you can get within the limitations of Zandronum. You'll probably end up with a stripped down version of the monster that may not work exactly like the original, but it's better than nothing I guess... 

 

Please Log in or Create an account to join the conversation.

  • Grape Juice
  • Grape Juice's Avatar Topic Author
  • Shotgunner
  • Shotgunner
More
3 months 3 weeks ago #6 by Grape Juice
Replied by Grape Juice on topic Decorate Cacomancer
Damn that's rough, but I appreciate the help nonetheless, thanks!

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar
  • Arachnotron
  • Arachnotron
More
3 months 3 weeks ago #7 by DeVloek
Replied by DeVloek on topic Decorate Cacomancer
Ok I thought about this and here's an idea. You mentioned the Medic Commando, I assume it is Zandronum compatible? I took a look at its Decorate and I think it might be possible to use large parts of it for the Cacomancer as well. Things like switching from targeting the player to targeting other monsters for example, the way Captain Toenail solved it is actually quite clever.
Give me a few days and I'll see if I can cook something up. No promises though, some things might still be impossible, like manipulating the frame tics of a buffed monster. But everything that can be done with simple powerups (that are given to the monster on getting hit by the buff missile) should be possible.

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar
  • Arachnotron
  • Arachnotron
More
3 months 3 weeks ago #8 by DeVloek
Replied by DeVloek on topic Decorate Cacomancer
So I tried a few things, and got it partially working, but there are too many roadblocks so I think I'm gonna give up for now.

What's working:
  • protection aura
  • damage buff
  • Cacomancer targeting only monsters that don't have the buff yet

What's not working:
  • monsters won't lose the protection aura once out of range
  • speed buff
  • visual fx (no dynamic lights and particles on monsters)
  • Cacomancer targeting the player once all monsters within range are buffed
  • Cacomancer staying above the other monsters at all times
  • some minor things that aren't necessary but nice to have, such as the monster playing its SeeSound when receiving the buff

Some things that are absolutely trivial in Zscript are probably impossible to solve, at least for me. So yeah if someone with more knowledge in Zandronum-compatible Decorate than me wants to give it a try, I can upload what I got so far.

Please Log in or Create an account to join the conversation.