Duke4.net Forums: Getting DIG Enemies to spawn elsewhere - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Getting DIG Enemies to spawn elsewhere

User is offline   Ninety-Six 

#1

I recently decided to play through DC on DIG (along with the other episodes) and noticed that DC has quite a few extra enemies exclusive to that difficulty. It's the only episode like that, with the only other instance of a DIG-exclusive enemy being a mistake in Death Row.

I'm curious what it would take to get them to spawn from a con perspective, as opposed to directly editing the maps. I used to think that's what Darkus' fixes did (mentioned "fixing lotag 4" which I thought was referring to actors on skill 4) but clearly I was wrong. I kinda wanna know what it's like to fight these guys under normal rules. Might spice up DC some.
0

User is offline   Danukem 

  • Duke Plus Developer

#2

So you are saying you want the level 4 enemies to appear, but not respawn after you kill them? Just find instances of ifrespawn in the enemy code, comment out or delete those sections and they won't come back.
0

User is offline   Ninety-Six 

#3

View PostDanukem, on 06 August 2024 - 11:41 PM, said:

So you are saying you want the level 4 enemies to appear, but not respawn after you kill them?


Basically I want the level 4 enemies to appear on level 3 (CGS).
0

User is offline   Danukem 

  • Duke Plus Developer

#4

View PostNinety-Six, on 07 August 2024 - 11:18 AM, said:

Basically I want the level 4 enemies to appear on level 3 (CGS).


Well in that case just change their lotags from 4 to 3
0

User is offline   Ninety-Six 

#5

View PostDanukem, on 07 August 2024 - 11:20 AM, said:

Well in that case just change their lotags from 4 to 3


I was hoping it could be a con-side change so it could be used universally, including maps I might have missed.

The thing with DC is that the extra enemies were obvious as they were so numerous. But who's to say there aren't any other cases like the Death Row trooper elsewhere in the pack? Or even the other expansions as they're less documented than the 3DR originals. I'd argue even AWO's isn't as documented either.

This post has been edited by Ninety-Six: 07 August 2024 - 12:45 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#6

Add an instance of EVENT_LOADACTOR after the DEFs, run a switch statement and on any of the enemy picnums, if they are lotag 4 make them lotag 3. I think that would work.
2

User is offline   Ninety-Six 

#7

View PostDanukem, on 07 August 2024 - 01:01 PM, said:

Add an instance of EVENT_LOADACTOR after the DEFs, run a switch statement and on any of the enemy picnums, if they are lotag 4 make them lotag 3. I think that would work.


Would this require case instances for each actor or would this be catch-all?
0

User is offline   Danukem 

  • Duke Plus Developer

#8

I think you need cases on the enemy picnums like I said, otherwise you risk messing with other sprites that may be lotag 4 for other reasons.
1

User is offline   Danukem 

  • Duke Plus Developer

#9

onevent EVENT_LOADACTOR

switch sprite[].picnum
case LIZTROOP case LIZTROOPSTAYPUT case LIZMAN case LIZMANSTAYPUT case PIGCOP case PIGCOPSTAYPUT case COMMANDER case BOSS1 case NEWBEAST case OCTABRAIN case ROTATEGUN case DRONE case TANK case EGG
  ife sprite[].lotag 4 seta[].lotag 3
break
endswitch
endevent


so that but add all the cases I left out for lizmanjump, the other variants of the enemies, the other stayputs and so on
1

User is offline   Ninety-Six 

#10

Danke. I'm still new to this whole thing.
0

User is offline   Ninety-Six 

#11

Happy to say it works.

I am and was intending to use the Darkus cons as a base for this, combining info from this thread and essentially reverse-engineering his and 3DR's con files to learn the syntax necessary (as that's the best way I learn*).

As it turns out however, he had a very similar block of code in the place you told me to look, but for whatever reason it didn't appear to be working. I tried combining the two to see if that would work, assuming maybe it was written that way because it depended on another change earlier in the con. Still no dice. Then I just dummied it out altogether and replaced it with yours. And that did the trick. Gave E1 a test spin and found two surprise enemies, another one in Death Row and one more in Toxic Dump. Very fascinating.


More fascinating however is that his code didn't work. I'm really curious as to why. Maybe he was aiming for something else altogether.

I will post it because I would like to dissect it.

gamevar TEMPFIX1  0 0 // Temporary variables

gamevar ISDEADFIX 0 2 // Tell if the monster is dead or not
...

onevent EVENT_LOADACTOR
  switch sprite[THISACTOR].picnum // Apply skill settings for monsters (fixes lotag 4)
  (all case arguments go here)
    ifvarvarg sprite[THISACTOR].lotag userdef[].player_skill
    { setvar ISDEADFIX 1 killit }
  break
  endswitch
endevent


Declared variables added, and all case definitions removed so that this doesn't lengthen the page.




Spoiler


This post has been edited by Ninety-Six: 08 August 2024 - 01:17 AM

2

#12

The snippet doesn't look like it does anything.
If you are playing skill 4 nothing happens.
If you are playing skill 1,2, or 3 the enemy's lotag is greater than player_skill and the sprite is deleted. ISDEADFIX is an actor var so the sprite being deleted right after setting it to 1 keeps it from being used anywhere unless it's being checked on event_killit or something.The point seems to be giving credit for skill 4 enemies but not spawning them.
2

User is offline   Ninety-Six 

#13

View Postlllllllllllllll, on 08 August 2024 - 09:49 AM, said:

The snippet doesn't look like it does anything.
If you are playing skill 4 nothing happens.
If you are playing skill 1,2, or 3 the enemy's lotag is greater than player_skill and the sprite is deleted. ISDEADFIX is an actor var so the sprite being deleted right after setting it to 1 keeps it from being used anywhere unless it's being checked on event_killit or something.The point seems to be giving credit for skill 4 enemies but not spawning them.


How strange... Thanks for the explanation.
0

User is online   ck3D 

#14

I'm under the (unverified) impression that the game is coded in such a way that on one hand, technically, a mapper can assign skill setting levels to enemies over 4/DIG, in which case they will never be encountered in normal conditions since those skill settings aren't accessible by default but means they're in part viable, and then on the other hand the respawn mechanic is bound to 4/DIG exclusively. So there's a chance that if you could somehow play on skill 5+ - maybe cheats or console commands allow for that - then you may get all of the spawns but bypass the DIG mechanic. Purely theoritical suggestion going off old memories from the Infosuite, I've never tried it nor studied the code there.

This post has been edited by ck3D: 29 August 2024 - 06:34 AM

0

User is offline   Danukem 

  • Duke Plus Developer

#15

Looking at the source code, that seems to be true that respawning monsters is tied specifically to difficulty 4.
0

User is online   ck3D 

#16

View PostDanukem, on 29 August 2024 - 08:36 AM, said:

Looking at the source code, that seems to be true that respawning monsters is tied specifically to difficulty 4.


If that is true then inputting DNSKILL5 or above (up to and including 9) as a cheat should work.

From the Infosuite:

Quote

The DNSKILL# cheat is valid from values 0-9, despite there being only 4 official skill levels available in the game. Higher values strangely seem to function as actual skill levels, evidenced by the fact that sprites with higher skill setting Lo-Tags will only appear in the map when the corresponding skill level is typed in with the cheat. If a compatible sprite's skill setting Lo-Tag is greater than 9, the object will technically be affected by the tag, but will never appear in-game, because it is impossible to type in a skill number beyond single digits without triggering the cheat. Check the "References - Cheats" section for details.


This post has been edited by ck3D: 30 August 2024 - 04:47 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options