Advanced Search

Author Topic: Skull Barrier recode and User Variable implementation  (Read 1064 times)

0 Members and 1 Guest are viewing this topic.

March 15, 2017, 05:15:44 AM
Read 1064 times

Offline JaxOf7

  • MM8BDM Extender

  • ****
  • Date Registered: March 23, 2011, 03:56:13 AM

    • View Profile
Skull Barrier recode and User Variable implementation
« on: March 15, 2017, 05:15:44 AM »
Current skull barrier uses script 982, which is rather messy and lies within the inflexible ACS layer.
I am presenting a Decorate version using knowledge gained from making Rock Force's Charade Clone. (Main difference between this and that being this can get pierced by laser trident)

While this is mainly decorate, it does use user variables and an ACS script to get those. So I'm proposing that script as well as it too is versatile.

First file is the Recode. It also includes health testing items and one of the MM1FIR firetraps does Laser Trident Damage for pierce testing.
Second file is a mod file for the first, demonstrating code versatility with different skull shield setups.
Third file is the Recode but some of the fancier mod stuff removed, taking advantage of the fact SkullBarrier is a 1hp 1hit shield. mod file won't work with it.

http://allfearthesentinel.net/download?file=skullbarrierrecode.pk3
http://allfearthesentinel.net/download?file=skullbarrierrecodeex.pk3
http://allfearthesentinel.net/download?file=skullbarrierrecodelite.pk3

March 15, 2017, 02:09:19 PM
Reply #1

Offline Lego

  • MM8BDM Extender

  • Doc Croc

  • **********
  • Date Registered: December 17, 2010, 11:11:25 PM

    • View Profile
Re: Skull Barrier recode and User Variable implementation
« Reply #1 on: March 15, 2017, 02:09:19 PM »
I like this quite a bit. It's a good solution to the issue of the script abstracting too much from modder and forcing weird rules like "your shield is ignored if you're hit by Laser Trident."

That said, I don't think it should go in core, and here's why:

The way the scripts are handled makes things moderately difficult to track in terms of understandability. While I was able to pick up on what you were doing fairly quickly by browsing the files, I don't necessarily know if someone with little experience would be able to do the same reliably and replicate the multi-hit shield idea with as much ease without use of an easy to copy-paste example.
This could be mitigated if the weapon template were updated at all and had a shield in it, which it really should for 5b since all the shields use clientside actors that just spam A_Warp now.

Like that can be dealt with by communication within the discord and here on the forums but the real deal breaker... for me, at least... is the use of user variables. Not specifically the use of the at all, obviously you would need to store the health somewhere, but... the use of the user variables on the player class. On the player class they can be accessed and modified by any actor the player has access to. This opens up a world of new potential quirks that could come about due to either accidental or malicious modification of these values. Not to mention it makes the organization of the files even less modular and requires knowledge of all the little separate pieces of the weapon to fully take out one piece of tech one would truly want.

Also, we removed that stupid and arbitrary clause that states Skull Barrier and other shields should be pierced by Laser Trident... it has enough of an identity as being a fast projectile that's hard to aim. It did get buffs this version, though.


This is an awesome idea. I love it, I truly do. But I'm not keen on how it's implemented and that's like 90% because of where the user variables are.
What if... what if the variables were stored somewhere else? Like on the watcher or something? Zandronum 3.0 has a lot of neat tools, I'm sure there's something that'll let you do that somewhere.

March 24, 2017, 12:37:28 PM
Reply #2

Offline JaxOf7

  • MM8BDM Extender

  • ****
  • Date Registered: March 23, 2011, 03:56:13 AM

    • View Profile
Re: Skull Barrier recode and User Variable implementation
« Reply #2 on: March 24, 2017, 12:37:28 PM »
For the record, user variables let you do all sorts of neat stuff. Angle tracking, angle delay, pretty much anything you can put in a decorate expression. Upkeep is not that different from, say, SBARINFO or WEPACS. I am more than happy with its implementation in my other work.

But this isn't about that, this is about Skull Barrier.

Yes, you can put the variables in a manager actor.
Will need a new script though, but it's versatile too: GETAPROP. Same constants as that expanded actor modifying script from earlier.

Anyway, I just took Lite and moved the pickup functions over to the manager.
Could do the same with the stuff I demonstrated in Recode(Ex), except for this:
Code: [Select]
DamageThing(ACS_ExecuteWithResult(811,CONST_VAR_LOANHP))think you need decorate soup / loops / another script for variable target damaging.

Anyway here it is.
Has laser trident pierce, but that's easy to remove.
http://allfearthesentinel.net/download?file=skullbarrierrecodelitegap.pk3

March 30, 2017, 07:06:35 AM
Reply #3

Offline Lego

  • MM8BDM Extender

  • Doc Croc

  • **********
  • Date Registered: December 17, 2010, 11:11:25 PM

    • View Profile
Re: Skull Barrier recode and User Variable implementation
« Reply #3 on: March 30, 2017, 07:06:35 AM »
This has my approval, I'll talk to Mike about getting it in.
We're leaving the hit shield script in if this goes in though, just in case people might use it for something.

March 30, 2017, 05:05:10 PM
Reply #4

Offline CutmanMike

  • Administrator

  • :dozercool:

  • ******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • http://cutstuff.net
Re: Skull Barrier recode and User Variable implementation
« Reply #4 on: March 30, 2017, 05:05:10 PM »
I don't see the point of recoding Skull Barrier in pure DECORATE. It's just moving the mess from ACS to DECORATE which is even harder to read and adds a ton of additional inventory items.

I do like the C_GET_APROP script though, many modders can probably use that so I'll put it in (as a named script).