[v2.9] CHAMPIONS [update 26/02/21]

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

Re: [v2.8] CHAMPIONS [update 19/12/20]

Postby Untitled » Mon Jan 04, 2021 6:03 pm

BUG: When running with LegenDoomLite, and if "Legendaries over time" is enabled, monsters sometimes activate their champion ability in an infinite loop on going legendary - spawning an infinite pillar of coloured fire that doesn't go away, which causes immense lag. For certain effects, it also makes the effect itself go infinite - the teleporter champion going infinite results in an infinite chain teleport that makes the monster essentially impossible to catch.
Untitled
 
Joined: 18 Apr 2013
Discord: wrsw#0132
Twitch ID: UntitledsTakenNOOOO

Re: [v2.8] CHAMPIONS [update 19/12/20]

Postby worldendDominator » Tue Jan 05, 2021 6:09 am

Can't say anything about the first part, but as for the teleport chain: those champions have something like 1 second cooldown between teleports if legendary, is that what you're experiencing? Or is it actually broken?
User avatar
worldendDominator
 
Joined: 17 May 2015

Re: [v2.8] CHAMPIONS [update 19/12/20]

Postby Untitled » Fri Jan 08, 2021 12:36 am

worldendDominator wrote:Can't say anything about the first part, but as for the teleport chain: those champions have something like 1 second cooldown between teleports if legendary, is that what you're experiencing? Or is it actually broken?


It's actually broken, but I've finally figured out why. (Also, here's some screenshots of the bug: https://imgur.com/a/mV0YA54)

Basically, in delayer.txt, during the Tick() function, the champion_LDoomDelayer gives the champion_BaseController to given monsters if they're legendary, but the only check to see if it should give the controller is if A: the monster is legendary and B: if the level time is greater than 3. This means that if a monster is legendary, if the monster goes legendary post-start (to be honest I don't know why this is the case), the base controller is given to the monster once per tic, which means that the legendary effects trigger once per tic - for some effects, this will cause it to immediately activate, which results in the infinite 1-tic teleport chain.

This is what it should be, with comments:
Code: Select allExpand view
class champion_LDoomDelayer : thinker {
   actor holder;
   class<thinker> champColor;
   int controllerID;
   
   bool colours;
   bool icons;
   bool particles;
   bool bundles;
   
   bool given; //This is new.
   
   double icon_scale;
   double icon_alpha;

   int mutationchance;
   int mutation;
   
   bool ld_dormant;
   bool ld_boost;
   bool ld_additive;
   
   override void Tick() {
      super.Tick();
      
      if (level.time >= 3) {
         string ldtoken = "LDLegendaryMonsterToken";
         if (holder &&  holder.CountInv(ldtoken)) {
            holder.A_GiveInventory("champion_PersistentInfo");
            let info = champion_PersistentInfo(holder.FindInventory("champion_PersistentInfo"));
            
            if (info) {
               info.c = champColor;
               info.i = controllerID;
            }
            
            let controller = champion_BaseController(new(champColor));
            if (controller && !given) { //So it can't activate if already given.
               controller.champion         = holder;
               
               controller.colours         = colours;
               controller.icons         = icons;
               controller.particles      = particles;
               controller.bundles         = bundles;
               controller.mutationchance   = mutationchance;
               controller.mutation         = mutation;
               controller.legend         = true;
               controller.ld_dormant      = ld_dormant;
               controller.ld_boost         = ld_boost;
               
               controller.icon_scale      = icon_scale;
               controller.icon_alpha      = icon_alpha;
               
               given = true; //Set to given to make sure the base controller is only instantiated once!
            }
         }
      if(ld_additive)
         return;
         
         self.Destroy();
         return;
      }
   }
}
Untitled
 
Joined: 18 Apr 2013
Discord: wrsw#0132
Twitch ID: UntitledsTakenNOOOO

Re: [v2.8] CHAMPIONS [update 19/12/20]

Postby worldendDominator » Fri Jan 08, 2021 3:07 am

Untitled wrote:It's actually broken, but I've finally figured out why. (Also, here's some screenshots of the bug: https://imgur.com/a/mV0YA54)

Basically, in delayer.txt, during the Tick() function, the champion_LDoomDelayer gives the champion_BaseController to given monsters if they're legendary, but the only check to see if it should give the controller is if A: the monster is legendary and B: if the level time is greater than 3. This means that if a monster is legendary, if the monster goes legendary post-start (to be honest I don't know why this is the case), the base controller is given to the monster once per tic, which means that the legendary effects trigger once per tic - for some effects, this will cause it to immediately activate, which results in the infinite 1-tic teleport chain.

Oh. I guess that's on me (I wrote that part of the code). Thanks for pointing out.
User avatar
worldendDominator
 
Joined: 17 May 2015

Re: [v2.8] CHAMPIONS [update 19/12/20]

Postby Rtma » Sun Jan 24, 2021 7:09 am

Experiencing an error.
here
It's the bottom two lines, how do you fix this?
User avatar
Rtma
The Almighty Dragon
 
Joined: 08 Apr 2017

Re: [v2.8] CHAMPIONS [update 19/12/20]

Postby Nems » Mon Feb 08, 2021 12:15 am

I believe I encountered the same crash as Rtma did. Gonna turn off blue in the meantime.

EDIT: The monster that caused this crash was a Pain Elemental. On top of having the blue effect, some of the lost souls it spit out would gain champion attributes. I don't know if that's intentional or contributed to my crash or what but I wanted to update what caused my crash before I forgot.

EDIT 2: Just thought of a feature suggestion regarding compatibility with LegenDoom Lite: Instead of having every legendary monster become a champion as well, have a slider that can be set that determines the likelihood of a legendary monster also become a champion so that the player can fight just legendaries as well as legendary champions, if that makes sense.

EDIT 3: Not sure if this is a bug or intentional but the Airborne mutation icon (balloon on a strong) is still visible even with icons turned off. Personally I'd like to see it not show up with icons turned off for aesthetic consistency (that and I don't think the other mutation types have icons associated with them [yet]). :P
You do not have the required permissions to view the files attached to this post.
User avatar
Nems
"small monster loops"
 
Joined: 12 Jan 2005
Location: Your forum thread
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: [v2.9] CHAMPIONS [update 26/02/21]

Postby Mikk- » Fri Feb 26, 2021 12:16 pm

v2.9 is here! It's a small one this time, mainly bug fixes and tweaks to bundles.

Spoiler: Changelog


Download here
User avatar
Mikk-
yooooooooooo
 
Joined: 30 Jun 2009
Location: Somewhere off Kanagawa
Discord: Mikk0451#3922

Previous

Return to Gameplay Mods

Who is online

Users browsing this forum: Gorec, salahmander2 and 11 guests