EDuke32 Scripting "CON coding help"
#3683 Posted 21 December 2024 - 03:42 PM
#3684 Posted 21 December 2024 - 04:07 PM
Is there a way to change the status bar by CON coding or I'll have to hack the source code? Because if it's possible by CON coding I would put something else instead the keycard slot, maybe something for a custom item or different type of key.
#3685 Posted 21 December 2024 - 04:33 PM
VGames, on 21 December 2024 - 03:42 PM, said:
Try EVENT_SOUND to disable the sound entirely, you can check the player.gm property to check if the player is in-game.
eniojr, on 21 December 2024 - 04:07 PM, said:
You'll likely want to disable the default status bar entirely and start drawing your own.
#3686 Posted 21 December 2024 - 10:25 PM
Additionally, I would like to know how to add the loading of a new state or other changes to the APLAYER actor without having to modify what is in GAME.CON, such as code within a custom CON file associated with APLAYER.
The effect I'm referring to is this:
#3687 Posted 21 December 2024 - 11:18 PM
eniojr, on 21 December 2024 - 10:25 PM, said:
Hey I'm allowed to copy my own code. But I'm fairly certain that the first version I did was in WGRealms2, then that was ported to DukePlus.
#3688 Posted 22 December 2024 - 10:29 AM
From what I understood about the portal renderization:
I tried to get the codes from both Wgrealms and Dukeplus, but something seems to be missing for the effect to work. The way I did on my map was similar to the way you did on yours. The sector effector with lotag 88 acts as a camera, so you have to adjust the sprite angle in direction to where you want the room to show from a wall. The portal wall needs to have a tile without a texture, and that I made it too. Here's how is in my map:

This portal leads to...

this room!

Now this portal leads to the previous room...

That same room with the first part of the portal!

In the 2D section, the direction of the angle of the SE lotag 88 seems correct. The upper part is the brick room and the lower part is the futuristic room.
Now, the codes:
eventloadactor SECTOREFFECTOR
getactor[THISACTOR].extra monstflags
ifvare monstflags -1 setvar monstflags 0
getactor[THISACTOR].lotag lotag
getactor[THISACTOR].hitag hitag
getactor[THISACTOR].xvel initx
ifvarg lotag 115 ifvarl lotag 120
{
shiftvarl initx 6
ifvare scaled YES shiftvarl initx 1
}
getactor[THISACTOR].yvel activator
getactor[THISACTOR].z initz
ifvare lotag 102 nullop
else
getactor[THISACTOR].zvel topladder
ifvarg lotag 115 ifvarl lotag 120
ifvare scaled YES mulvar topladder 2
setvarvar peractor2 topladder // saves value for elevators
getactor[THISACTOR].shade initshade
getactor[THISACTOR].pal playerally // for storing fog pal in water sectors
getactor[THISACTOR].sectnum mysector
ifvarg mysector -1 ifvarl mysector 4095
{
getsector[mysector].floorpal pal
getsector[mysector].ceilingpal peractor7
// search for light models with glow maps
ifspritepal 1 ifvare lotag 49
{
headspritesect spriteid mysector
whilevarn spriteid -1
{
ifvare sprite[spriteid].extra 4911
{
getactor[spriteid].hitag mtype
setactor[spriteid].hitag 0
setactor[THISACTOR].hitag 0 // light starts OFF
setactor[spriteid].extra 0
setvarvar target2 spriteid
setvar spriteid -1
}
else
nextspritesect spriteid spriteid
}
}
ifvarg lotag 48 ifvarl lotag 51 // light
{
setvarvar intensity hitag
headspritesect spriteid mysector
whilevarn spriteid -1
{
ifvare sprite[spriteid].picnum SECTOREFFECTOR
ifvare sprite[spriteid].lotag 150
{
getactor[spriteid].hitag activator
ifvare activator 0 getactor[spriteid].yvel activator
getactor[spriteid].extra temp
ifvare temp 1 // light starts off
{
setvar hitag -1
setactor[THISACTOR].hitag 0
}
setvar spriteid -1
}
else
nextspritesect spriteid spriteid
}
ifvarn activator 0 // search for light models with glow maps
ifvare target2 -1
{
headspritesect spriteid mysector
whilevarn spriteid -1
{
ifvare sprite[spriteid].extra 4911
{
getactor[spriteid].hitag mtype
setactor[spriteid].hitag 0
ifvare sprite[spriteid].lotag 1
{
setactor[spriteid].lotag 0
setactor[THISACTOR].hitag intensity
setvarvar hitag intensity // light starts ON
} else
{
setactor[THISACTOR].hitag 0 // light starts OFF
setvar hitag -1
}
setactor[spriteid].extra 0
setvarvar target2 spriteid
setvar spriteid -1
}
else
nextspritesect spriteid spriteid
}
}
}
}
ifvarg lotag 115 ifvarl lotag 120
ifvarl topladder 0 mulvar initshade -1 // correctly sets destination position of elevator
ifvarg lotag 87 ifvarl lotag 90 // portal cam; find other cam
{
getactor[THISACTOR].extra countvar
setvar spriteid 0
whilevarn spriteid 16384
{
ifvarn sprite[spriteid].statnum 1024
ifvare sprite[spriteid].picnum SECTOREFFECTOR
ifvarvare sprite[spriteid].lotag lotag
ifvarvare sprite[spriteid].hitag hitag
ifvarvarn spriteid THISACTOR
{
setvarvar myspawner spriteid
setvar spriteid 16383
}
addvar spriteid 1
}
ifvare myspawner -1 { cactor SMALLSMOKE cstat 32768 seta[].statnum 1 }
ifvare activator 0 setvar peractor1 1
}
endaThis is exactly what is in Dukeplus, so there are no errors here.
onevent EVENT_GAME
{
getactor[THISACTOR].picnum picnum
switch picnum
{
case LADDER
{
ifvare monstflags 1
{
ifvare monstatus 0
{
setvar monstatus 1
setvar temp 0
whilevarn temp 16384
{
getactor[temp].picnum picnum
ifvare picnum LADDER ifvarvarn temp THISACTOR
{
getactorvar[temp].monstflags tempb
ifvare tempb 1
{
getactorvar[temp].hitag tempc
ifvarvare hitag tempc
{
setvarvar myspawner temp
setvar monstatus 1
setvar temp 16383
getactor[THISACTOR].z z
getactor[myspawner].z mz
ifvarvarg z mz
{
setvar mtype 1
setvarvar topladder mz
}
}
}
}
addvar temp 1
}
}
ifvare mtype 1 ifvare dodge 0
{
getplayer[THISACTOR].posz mz
ifp pducking subvar mz 4096
getactor[THISACTOR].z z
addvar z 1024
ifvarvarg mz topladder ifvarvarl mz z
{
getplayer[THISACTOR].i target
ldist xydist THISACTOR target
ifangdiffl 384 ifvarl xydist 384
{
ifvare onladder 0
{
getplayer[THISACTOR].posx lastladderx
getplayer[THISACTOR].posy lastladdery
}
setvar onladder 3
ifvarn lotag 0 setvarvar laddersound lotag else setvar laddersound -1
}
}
}
}
else
}
case SECTOREFFECTOR
ifvare lotag 666
{
headspritesect spriteid mysector
whilevarn spriteid -1
{
getactor[spriteid].picnum picnum
setvar temp 0
ifvare picnum APLAYER
{
getuserdef[THISACTOR].god tempb
ifvare tempb NO
{
getactor[spriteid].yvel tempb
getplayer[tempb].dead_flag tempc
ifvare tempc 0 setvar temp 1
}
}
else setvar temp 1
ifvare temp 1
{
getactor[spriteid].z mz
ifvarvarg mz initz
{
ifvarg topladder 0
{
subvarvar mz initz
setvarvar tempb topladder
shiftvarl tempb 3
ifvarvarg mz tempb setvar temp 0
}
ifvare temp 1
{
setactor[spriteid].htextra 140
setactor[spriteid].htpicnum RADIUSEXPLOSION
setactor[spriteid].htowner player[THISACTOR].i
getactor[spriteid].picnum picnum
ifvare picnum SAWBLADEGROUND { setactor[spriteid].xrepeat 0 setactor[spriteid].yrepeat 0 }
}
}
}
nextspritesect spriteid spriteid
}
}
else ifvare mirrored NO setvar NOCODE 1
else
/// Portal effector
ifvare lotag 88
{
ifvare peractor1 1
{
ifpdistl 32768 // 16384
{
ifcansee
{
ifvarn portalcam -1 ifvarvarn portalcam THISACTOR
{
findplayer xydist
dist xydist2 portalcam player[THISACTOR].i
ifvarvarl xydist xydist2
{
setvarvar portalcam myspawner
setvar portalview 52
}
}
else
{
setvarvar portalcam myspawner
setvar portalview 52
}
}
else ifpdistl 8192
{
setvarvar portalcam myspawner
setvar portalview 52
}
}
}
else
{
checkactivatormotion activator
ifvare RETURN YES setvar peractor1 1
}
}
break
}
case APLAYER // Verifica se Ă© o ator APLAYER
{
ifvarn portalcam -1 state kludges
ifvarg onladder 0 state ladderinteraction
break
}
endswitch
}
endevent
Here is how I edited the onevent EVENT_GAME and all the effects in it. The ladder effect works perfectly. The death effect related to lotag 666 also works perfectly. This means that the way I set up the onevent EVENT_GAME is correct, since such effects are occurring.
But the problem is in making "ifvare lotag 88" work. The code is exactly as I got it from the mod, so theoretically there should be no way it could go wrong. In other words, it is as it should be. Then there is an APLAYER case that I set up to load a custom state that I set up for the ladder effect, while for effect 666 it was not necessary.
That's the thing, because what is inside the SECTOREFFECTOR case is not the only block needed to make such a portal effect work. In addition to this, I also found in PLAYERPLUS.CON the "state kludges", which contains:
ifvare rendmode 4
{
setvar pal 26
setvar tempd 2 // 514
setvar intensity 4096
state spawnpointlight
}
setvarvar raining rainstart
setvar portalview 0
setvar portalcam -1
setvar perplayeronbike -1
setvar triphack -1
setvar rainstart 0
setvar temp 99
whilevarn temp -1
{
setarray ptrails[temp] -1
subvar temp 1
}and then
ifvarg portalview 0
{
subvar portalview 1
ifvare portalview 0 setvar portalcam -1
}This seems to be the only relevant part of the portal code and seems to play an important role in loading the effect, although I don't know exactly what it is. So, I did this:
state kludges
ifvare rendmode 4
{
setvar pal 26
setvar tempd 2 // 514
setvar intensity 4096
//state spawnpointlight
}
// setvarvar raining rainstart
setvar portalview 0
setvar portalcam -1
//setvar perplayeronbike -1
//setvar triphack -1
//setvar rainstart 0
setvar temp 99
whilevarn temp -1
{
setarray ptrails[temp] -1
subvar temp 1
}
ifvarg portalview 0
{
subvar portalview 1
ifvare portalview 0 setvar portalcam -1
}
ends
Yes, I created a custom state kludges before eventloadactor SECTOREFFECTOR, disabling code not related to that effect.
Still on PLAYERPLUS.CON, further on, there is:
actor APLAYER MAXPLAYERHEALTH PSTAND 0 0
setvar playerally -1
ifvare steroidkicks YES
{
setvarvar temp gamespeed
mulvar temp 2
divvar temp 3
ifp ponsteroids
initimer temp
else
initimer gamespeed
}
else initimer gamespeed
state checkhitscan
ifvarn botselected -1 state botcommandcode
state kludges
But then I ran out of clues on how to put it in my custom file. All I did was put "state kludges" inside the APLAYER case, but it didn't work.
case APLAYER // Verifica se Ă© o ator APLAYER
{
state kludges
ifvarg onladder 0 state ladderinteraction
break
}There are also the definitions, that are "gamevar portalcam -1 1" and "gamevar portalview 0 1", but these are already at the beginning of my custom .CON file for additional effects.
These were all the codes I found related to this specific effect in the mod files, unless there is something else that I have no clue what it could be.
By the way...

I managed to replicate the effect of partially shattered glass. Easy! I even did this effect on another glass texture, which also worked, see the code:
gamearray glassarray 2048
useractor notenemy GLASS 50
ifvare lotag 0 break
ifaction 0 ifvare lotag 2 action GLASS4
ifaction GLASSBREAK
{
ifactioncount 5
{
lotsofglass 10
setarray glassarray[position] -1
ifvarvare position highglass subvar highglass 1
killit
}
break
}
ifvarg sprite[THISACTOR].htextra 0 ifvarg hitag 0 ifvare mtype 0
{
getactor[THISACTOR].htpicnum picnum
getactor[THISACTOR].htowner myspawner
setvar spriteid 0
setvarvar tempb highglass
addvar tempb 1
whilevarvarn spriteid tempb
{
setvarvar tempc glassarray[spriteid]
ifvarn tempc -1 ifvarvarn tempc THISACTOR
{
getactorvar[tempc].hitag tempd
ifvarvare hitag tempd
{
getactor[tempc].htextra digx
ifvarl digx 1
{
setactor[tempc].htextra sprite[THISACTOR].htextra
setactor[tempc].htpicnum picnum
setactor[tempc].htowner myspawner
setactorvar[tempc].mtype 1
}
}
}
addvar spriteid 1
}
}
ifaction GLASSCRACK strength 0
ifhitweapon
{
setvar mtype 0
ifaction GLASS4 { action GLASSCRACK soundonce GLASSCRACKSND } else
ifaction 0 { action GLASSCRACK soundonce GLASSCRACKSND } else
ifaction GLASSCRACK { action GLASSBREAK soundonce GLASS_BREAKING }
ifdead { action GLASSBREAK soundonce GLASS_BREAKING }
ifaction GLASSBREAK
{
getactor[THISACTOR].cstat temp
ifvarand temp 1 xorvar temp 1
ifvarand temp 256 xorvar temp 256
setactor[THISACTOR].cstat temp
}
}
enda
/////////////////////////////////////////////////////////////////////////////////
///////////////////
/////////////////////////////////////////////////////////////////////////////////
///////////////////
/////////////////////////////////////////////////////////////////////////////////
///////////////////
useractor notenemy GLASS2 50
ifvare lotag 0 break
ifaction 0 ifvare lotag 2 action GLASS4
ifaction GLASSBREAK
{
ifactioncount 5
{
lotsofglass 10
setarray glassarray[position] -1
ifvarvare position highglass subvar highglass 1
killit
}
break
}
ifvarg sprite[THISACTOR].htextra 0 ifvarg hitag 0 ifvare mtype 0
{
getactor[THISACTOR].htpicnum picnum
getactor[THISACTOR].htowner myspawner
setvar spriteid 0
setvarvar tempb highglass
addvar tempb 1
whilevarvarn spriteid tempb
{
setvarvar tempc glassarray[spriteid]
ifvarn tempc -1 ifvarvarn tempc THISACTOR
{
getactorvar[tempc].hitag tempd
ifvarvare hitag tempd
{
getactor[tempc].htextra digx
ifvarl digx 1
{
setactor[tempc].htextra sprite[THISACTOR].htextra
setactor[tempc].htpicnum picnum
setactor[tempc].htowner myspawner
setactorvar[tempc].mtype 1
}
}
}
addvar spriteid 1
}
}
ifaction GLASSCRACK strength 50
ifhitweapon
{
setvar mtype 0
ifaction GLASS4 { action GLASSCRACK soundonce GLASSCRACKSND } else
ifaction 0 { action GLASSCRACK soundonce GLASSCRACKSND } else
ifaction GLASSCRACK { action GLASSBREAK soundonce GLASS_BREAKING }
ifdead { action GLASSBREAK soundonce GLASS_BREAKING }
ifaction GLASSBREAK
{
getactor[THISACTOR].cstat temp
ifvarand temp 1 xorvar temp 1
ifvarand temp 256 xorvar temp 256
setactor[THISACTOR].cstat temp
}
}
enda
/////////////////////////////////////////////////////////////////////////////////
///////////////////
/////////////////////////////////////////////////////////////////////////////////
///////////////////
/////////////////////////////////////////////////////////////////////////////////
///////////////////
eventloadactor GLASS
getactor[THISACTOR].lotag lotag
setactor[THISACTOR].lotag 0
getactor[THISACTOR].hitag hitag
setactor[THISACTOR].hitag 0
ifvare clearglassarray 1
{
setvar clearglassarray 0
setvar spriteid 0
whilevarn spriteid 2048
{
setarray glassarray[spriteid] -1
addvar spriteid 1
}
}
ifvarn lotag 0
{
setvar spriteid 0
whilevarn spriteid 2048 // max number of breakable glass sprites
{
setvarvar temp glassarray[spriteid]
ifvare temp -1
{
setvarvar position spriteid
setarray glassarray[spriteid] THISACTOR
ifvarvarg position highglass setvarvar highglass position
setvar spriteid 2047
}
addvar spriteid 1
}
}
enda
/////////////////////////////////////////////////////////////////////////////////
///////////////////
/////////////////////////////////////////////////////////////////////////////////
///////////////////
/////////////////////////////////////////////////////////////////////////////////
///////////////////
eventloadactor GLASS2
getactor[THISACTOR].lotag lotag
setactor[THISACTOR].lotag 0
getactor[THISACTOR].hitag hitag
setactor[THISACTOR].hitag 0
ifvare clearglassarray 1
{
setvar clearglassarray 0
setvar spriteid 0
whilevarn spriteid 2048
{
setarray glassarray[spriteid] -1
addvar spriteid 1
}
}
ifvarn lotag 0
{
setvar spriteid 0
whilevarn spriteid 2048 // max number of breakable glass sprites
{
setvarvar temp glassarray[spriteid]
ifvare temp -1
{
setvarvar position spriteid
setarray glassarray[spriteid] THISACTOR
ifvarvarg position highglass setvarvar highglass position
setvar spriteid 2047
}
addvar spriteid 1
}
}
endaNext I'll try to see if I can add the slippery floor effect, which shouldn't be too difficult either.

And here is the little room of death of the SE 666 effect that is working!
EDIT: I just managed to add the slippery floor effect in Legacy, another achievement. It was a little more complex than the 666 effect, but I managed it. But I still haven't managed to get the portal effect to work, as it's more complex.
This post has been edited by eniojr: 22 December 2024 - 11:46 AM
#3689 Posted 22 December 2024 - 11:47 AM
#3690 Posted 22 December 2024 - 11:55 AM
This post has been edited by eniojr: 22 December 2024 - 11:58 AM
#3691 Posted 22 December 2024 - 12:03 PM
#3692 Posted 22 December 2024 - 01:19 PM
#3693 Posted 22 December 2024 - 01:42 PM
VGames, on 22 December 2024 - 01:19 PM, said:
https://wiki.eduke32...wiki/EVENT_LOGO ??
i literally just navigated to the event list on the wiki and control-F searched for "logo"
took me longer to type this reply than to find it
i'm giving you a hint here on how you could make your job easier
#3695 Posted 22 December 2024 - 06:36 PM
VGames, on 22 December 2024 - 05:59 PM, said:
It was a good guess though.
I'm never helping you guys again.
#3696 Posted 22 December 2024 - 07:05 PM
Quote
Even if there are some adjustments and modifications to run in other mod?
#3697 Posted 22 December 2024 - 07:14 PM
eniojr, on 22 December 2024 - 07:05 PM, said:
It's pretty obvious that I've been relatively uninterested and annoyed for a while if you look at my posts and this is a good excuse to make a clean break from posting code help which will be a good thing. I'll still help friends in DMs or on projects we work on together obviously.
#3699 Posted 22 December 2024 - 08:50 PM
To start, we would have to define a lotag for the effect, which is already defined in this case, ifvare lotag 88 inside a SECTOREFFECTOR case. After that, I would have to define the logic of how a camera and a monitor behave, but I have no idea how to do that, especially to apply it to a sectoreffector and a wall with a tile without texture (which would be a transparent texture) acting as a screen.
I found this on Eduke32's website:
onevent EVENT_DISPLAYROOMS
ifvarn camerasprite -1
{
getactor[camerasprite].x camerax
getactor[camerasprite].y cameray
getactor[camerasprite].z cameraz
getactor[camerasprite].ang cameraang
getactor[camerasprite].extra camerahoriz
getactor[camerasprite].sectnum camerasect
}
endeventbut I don't know if it would be appropriate or how to apply this to such an effect.
What I intend to do doesn't even involve an activation or detection system, because in this case we're going to do it in a simpler way... the portal effect will always be active, regardless of whether the player is close or not and whether or not he sees the portal. This eliminates complex activation and detection codes. The idea is to start from the basics and a code system that would be much simpler, just to make the rendering work. The conditions to activate or deactivate portals in this case would only be added if the basic effect worked first.
I don't know if all of this would be possible to work only inside the SECTOREFFECTOR case or if there is a need to link what would be in such a block to a separate actor or state.
From everything I've observed so far, there are two main blocks that define the effect: One inside the SECTOREFFECTOR eventloader, which can be inside "ifvarg lotag 87 ifvarl lotag 90" and another that is inside the SECTOREFFECTOR case, associated with "ifvare lotag 88". The other related codes are scattered inside "state kludges" and there is a line with "state kludges" inside the APLAYER actor, to load the kludges, which is where the other part of the effect is.
I'm not sure what these codes in "state kludges" are for, but they seem to be related to activating and deactivating the portal effect, I think. Aside from the specific gamevars, I don't know if there is any other rendering-related code for this effect.
The SECTOREFFECTOR case part:
ifvare lotag 88 // portal SE
{
ifvare peractor1 0
{
checkactivatormotion activator
ifvare RETURN YES setvar peractor1 1
}
else
{
ifpdistl 16384
{
ifcansee
{
ifvarn portalcam -1 ifvarvarn portalcam THISACTOR
{
findplayer xydist
dist xydist2 portalcam player[THISACTOR].i
ifvarvarl xydist xydist2
{
setvarvar portalcam myspawner
setvar portalview 52
}
}
else
{
setvarvar portalcam myspawner
setvar portalview 52
}
}
else ifpdistl 4096
{
setvarvar portalcam myspawner
setvar portalview 52
}
}
}
}
break
}ifvare lotag 88: Sets the effect's lotag.
ifvare peractor1 0 { checkactivatormotion activator ifvare RETURN YES setvar peractor1 1 }: It seems to establish a mechanism for activating the effect according to the player's movement.
The rest of the code seems to be related to the player's interaction with the portal according to the distance (ifpdistl 16384 and 4096) at which it is located.
THISACTOR has a direct relationship with the player. But I didn't understand what "[THISACTOR].i" would be.
setvarvar portalcam myspawner: I didn't quite understand the myspawner part.
setvar portalview 52: I didn't understand why to put 52. Why not 1?
I also don't know if this ifvare lotag 88 has any specific switch.
About the SECTOREFFECTOR eventloader:
getactor[THISACTOR].extra monstflags ifvare monstflags -1 setvar monstflags 0 getactor[THISACTOR].lotag lotag getactor[THISACTOR].hitag hitag getactor[THISACTOR].xvel initx
This part is the beginning of the event. It seems to be a general guideline for the new sectoreffector effects.
Now we have this part:
ifvarg lotag 87 ifvarl lotag 90 // portal cam; find other cam
{
getactor[THISACTOR].extra countvar
setvar spriteid 0
whilevarn spriteid 16384
{
ifvarn sprite[spriteid].statnum 1024
ifvare sprite[spriteid].picnum SECTOREFFECTOR
ifvarvare sprite[spriteid].lotag lotag
ifvarvare sprite[spriteid].hitag hitag
ifvarvarn spriteid THISACTOR
{
setvarvar myspawner spriteid
setvar spriteid 16383
}
addvar spriteid 1
}
ifvare myspawner -1 { cactor SMALLSMOKE cstat 32768 seta[].statnum 1 }
ifvare activator 0 setvar peractor1 1
}ifvarg lotag 87 ifvarl lotag 90: For lotag effects between 87 and 90.
getactor[THISACTOR].extra countvar: It seems related to setting an extra value that specifies the Z angle value for the camera (in this case the sectoreffector sprite).
setvar spriteid 0 and whilevarn spriteid 16384: I don't understand, but whilevarn seems to be related to some looping.
ifvarn sprite[spriteid].statnum 1024, ifvare sprite[spriteid].picnum SECTOREFFECTOR, ifvarvare sprite[spriteid].lotag lotag, ifvarvare sprite[spriteid].hitag hitag, ifvarvarn spriteid THISACTOR: This seems to be related to applying lotag and hitag to the effect. But I don't quite understand the THISACTOR part in this context.
setvarvar myspawner spriteid and setvar spriteid 16383: I don't understand the context of this. This myspawner is still a mystery to me.
addvar spriteid 1: It seems to be related to the addition of a variant, but I don't quite understand this spriteid 1 thing.
ifvare myspawner -1 { cactor SMALLSMOKE cstat 32768 seta[].statnum 1 }: I don't understand this part, and it seems to evoke a smoke effect or sprite. It must be that effect where the screen turns a blueish color when the player is teleported in the mod.
ifvare activator 0 setvar peractor1 1: This would be related to a portal or teleportation activation effect, I think.
About the other codes in the state kludges (PLAYERPLUS.CON):
ifvare rendmode 4
{
setvar pal 26
setvar tempd 2 // 514
setvar intensity 4096
state spawnpointlight
}
//setvarvar raining rainstart
setvar portalview 0
setvar portalcam -1
//setvar perplayeronbike -1
//setvar triphack -1
//setvar rainstart 0
setvar temp 99
whilevarn temp -1
{
setarray ptrails[temp] -1
subvar temp 1
}
ifvarg portalview 0
{
subvar portalview 1
ifvare portalview 0 setvar portalcam -1
}I'm pretty sure these are the codes related to the player's interaction with the portal effect, maybe related to its activation and deactivation according to the proximity and viewing angle of the player towards the portal (that's what I think). Although I don't know exactly where these codes would be...
Although I think they are: setvar portalview 0, setvar portalcam -1, ifvarg portalview 0, subvar portalview 1 and ifvare portalview 0 setvar portalcam -1.
And finally we have the line state kludges inside actor APLAYER MAXPLAYERHEALTH PSTAND 0 0, which carries that state.
That was exactly all I understood about the codes I found related to this specific effect!
Here's what's in Dukeplus map effects list:
BROADCASTER = SE 88
SHOWS A SCENE FROM A DIFFERENT PART OF THE MAP. THE SCENE IS “BROADCAST” IN THE BACKGROUND, AND IS VISIBLE WHEREVER THERE ARE BLANK TEXTURES (WALLS, FLOORS OR CEILINGS WITH BLANK TEXTURES) NEAR THE SE. PLACE TWO SE88 AND GIVE THEM THE SAME HITAG. ONE WILL BROADCAST THE POV OF THE OTHER.
OPTIONS: GIVE THE SE A YVEL, AND THAT WILL BE ITS ACTIVATION NUMBER, IN WHICH CASE IT WILL NOT BROADCAST UNTIL AN ACTIVATOR OR GAME EFFECT (SUCH AS MONSTER ACTIVATION) TURNS IT ON. MAKE SURE TO HIDE THE BLANK TEXTURES UNTIL THE ACTIVATION USING A SLIDING DOOR OR SOME OTHER TRICK.
THE SE WILL BROADCAST FROM ITS OWN ANGLE. BY DEFAULT, IT WILL USE THE PLAYER’S CURRENT Z ANGLE (LOOK UP/DOWN ANGLE). TO SET A FIXED Z ANGLE, SET EXTRA ON THE SE. 100 = STRAIGHT AHEAD. HIGHER VALUES LOOK UP, LOWER VALUES LOOK DOWN (IN POLYMOST, MAX 299, MIN -199).
This post has been edited by eniojr: 22 December 2024 - 08:57 PM
#3700 Posted 31 December 2024 - 10:06 PM
In the meantime, I worked on codes related to several sprites with effects, such as a torch sprite that emits the sound of fire and that, when destroyed, creates an animated fire sprite that causes damage. Just like I replicated that Shadow Warrior figure that, when you hit it with just a kick, you gain life. I also replicated that effect where you gain life when you drink water for a new texture.
I also replicated two things from Rise of the Triad: I created a new animated sprite based on the one that throws fire from the ground, but in a way that it does so at regular intervals and you only take damage when the fire is thrown, like in ROTT, and it also emits the sound from that game, not the one from Devastator. There is also a visual effect where the screen turns yellow when you get burned.
The other thing is that low health sound from ROTT, with a pulsating visual effect and a heartbeat sound, emphasizing the need to restore health when it falls below 25 HP. In other words, I'm already starting to create visual and sound effects on my own. This gives more life to the game and emphasis to certain important contexts.
I also added new sprites of lightning or electric current and plasma, including one of a destroyed nuclear reactor, in which when you get close to them you not only take damage but there's a shock sound (taken from Lameduke) and a visual effect of color and movement (as if the player were being electrocuted).
I also added more music for that player in the game that's on the ceiling (the one in the supermarket level), which I took from Redneck Rampage and for each palette color I established a different sound emitted. In other words, different music for the same sprite, established according to the palette color. I intend to add more.
This was easier to do than establishing lotag and hitag values.
I also created new textures that act like real explosives, others that can only be destroyed if hit by an explosion, and one that even animates for a while when you hit it (which has the animated texture of the trash can from Shadow Warrior). For those who are just starting out in coding, this seems like an important step.
I also made my first enemy, so to speak. It's not a mobile actor yet, but an animated sprite that stays stuck to the wall or the ground and that, when you get close to it, takes damage and makes an idle and attack noise, despite being unkillable. It's actually more of a trap, but it can also be interpreted as an alien enemy if you want.
The idea is to make the organic walls of the aliens more dangerous...
I have several ideas for adding traps to the game, like those from Shadow Warrior and more from Rise of the Triad. The idea is to add a gameplay element in which not only the enemies are challenging, but the environment itself and various traps along the way, like in some other games. For example, you have to go through certain traps. Some of these traps could be interpreted as a creative way for aliens or rigelats to hinder Duke Nukem's progress.
To tell the truth, I did add a new enemy, similar to the shark in the game, but that I got from a certain mod, and it looks like Dopefish. I intend to add this actor to the game as an easter egg in some specific level that I'm going to make, maybe in some aquatic level.
In addition to this, there is another very simple actor that randomly moves around the map, which is a tornado that emits its own sound and causes melee damage. I'm going to see if I can improve this actor a little more. I'm going to see if I can replicate the tornado attack effect from Redneck Rampage, in which the player, when touching the tornado, is thrown far away.
There's only one thing I've done so far that hasn't worked out very well, regarding making changes to that weapon, the KNEE, but it still seems too early for me to start trying to modify the game's weapons, much less create new ones, or even alt fires.
Since I've managed to do so many things so far, I'm in a good mood.
One last thing... I also learned how to do that true room over room effect, including how you can see what's underwater and interact with what's there. This will be very useful to me.
I added all of this to the Legacy mod, as I plan to make a big custom episode with new extra content, in addition to the ones added to the mod by Marcolino. I intend to contribute to the Legacy mod in some way, even if it's on my own and with codes that, from a functional point of view... "It just works", lol. This could give the author some ideas...
And so I'm learning more and more to interpret codes and their contexts.
I wish everyone in this community a happy new year!
This post has been edited by eniojr: 31 December 2024 - 10:16 PM
#3702 Posted 01 January 2025 - 03:00 PM
See all this as an experiment I'm making, as the way I'm learning more about modding and the CON language.
If one day I make a true independent mod of my own, It'll have a different context, not beta oriented like Legacy. And certainly it will based not on Legacy, but maybe based on Dukeplus or maybe even Alien Armageddon, don't know (because Legacy seems to not have polymer/polymost support).
Maybe ROTT in Build? I saw some people in youtube posting videos showing this concept, but I don't know if their projects are dead or not.
ROTT in Doom (Return of the Triad) was already cool, but ROTT in build engine? That would a revolution!
Or maybe if I make ROTT mod for Ion Fury, because it would be even better, since Ion Fury has more advanced features.
When I finish adding extra content for the maps I'm going to make, I'm thinking about showing a video here to show everything I managed to add to Legacy, whether from other mods, games or made on my own.
For now, I'll show you some screenshots of what I'm adding and testing in my test map:

The portal effect, with the custom teleporter effect, both functional. Also ported that sleeping effect where you teleport between two separate sectors.

The true room over room where you can see what's underwater.

The functional ladder and jumpad systems.

Partially broken glasses effect. Near those glases is a sector with a slippery floor effect.

New interactable objects. The chain is just a breakable object that changes texture according to your position.

The traps.

The destroyed nuclear reactor, where you take much damage if you go near it.

The corridor with extra keycard colors and more sounds to doors and switches, as well as more switches textures.

The extra stationary civilians. Most of them here are still not coded yet.

The extra walkable civilians. None of them are coded yet.

The tornado and dopefish enemies. Simple, but functional.

The wall alien trap/enemy.

Another trap. Not coded yet. I want to make it like Indiana Jone's effect, seeking the player by activating a touchplate. If the player touches the ball, he dies. The ball must follow the player until it ends up stuck in a hole.

With the coded football and beachball, now I can play ball in Duke Nukem (ported from Alien Armageddon).

The animals I still intend to bring to life through codes. None of them have been coded yet. I'll try to get the codes directly from Redneck Rampage.

The new items I've added so far, some not yet coded.

Several of the new breakable objects I added from other games and mods.
And a few more things that aren't in the pictures.
That's it. A custom episode for Legacy with new content from outside. I'm not sure if I'll get to use everything I added to my project (for example, a lot of textures), but a lot will be useful.
This post has been edited by eniojr: 01 January 2025 - 03:03 PM
#3703 Posted 16 February 2025 - 01:47 PM
#3705 Posted 17 February 2025 - 05:51 AM
This post has been edited by VGames: 17 February 2025 - 05:51 AM
#3706 Posted 17 February 2025 - 04:03 PM
#3707 Posted 24 March 2025 - 04:09 AM
So something in my custom code must be interfering. Trying to comment out things one by one to discover where the problem lies would be very time consuming and problematic. Are there any specific events or commands that might be likely suspects for me to check first?
#3708 Posted 26 May 2025 - 06:41 PM
htg_t looked like what I wanted but there's no projectile here or I'm using it wrong [pistol shotgun chaingun]... or now I'm more confused because Enforcers and Battlelords shoot SHOTSPARK1 as a projectile but shotgun spawns it.
#3709 Posted 26 May 2025 - 06:53 PM
#3710 Posted 26 May 2025 - 09:51 PM
Or checking htpicnums from inside each alien's actor code the issue then becomes finding the shotspark being spawned. Like trying to use a global to hide the next one to spawn probably won't work with a shotgun firing 8 pellets at once.
#3711 Posted 27 May 2025 - 11:33 AM
#3712 Posted 28 May 2025 - 12:01 AM
https://wiki.eduke32.com/wiki/Htg_t

Help
Duke4.net
DNF #1
Duke 3D #1


