Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
rdwpa

*** The "ask a miscellaneous editing question" thread ***

Recommended Posts

The trick is that in Hexen format, the line's own ID is a parameter of the function, while in UDMF it is a separate value. Each of the lines making the portal must have its own ID, and point to the other.

Share this post


Link to post

Does GZDoom Builder support Heretic and Hexen as Game Configurations? The only configuration I can choose is Doom 2 in different formats.

Share this post


Link to post

Yes of course.

 

To prevent slow-downs when starting the application, most configs are moved to an "Other Games" subfolder where the program ignores them. So just move the configs you don't use in that folder, and move the configs you want to use out of it. Oh, and apparently there's a step where you have to enable the game in your preferences.

 

https://github.com/jewalky/GZDoom-Builder-Bugfix/tree/master/Build/Configurations/Other Games

 

Share this post


Link to post

==Question==

 

I've been tweaking this Metroid Doom mod, and I want to make certain enemies drop health and missile ammo, but only when Samus' health/missiles are less than full. 

 

The closest I got was getting an if/else statement in the enemy's Death state:

 

Quote

  Death:
    ZOOM H 5 
        {
        if (random(0,100) <80)
            {
                A_SpawnItem ("MedHealth",0,0);
            }
            else
            {
                A_SpawnItem ("RocketAmmo",0,0);
            }
        }
    ZOOM I 5 A_Scream
    ZOOM J 5 A_NoBlocking
    ZOOM K 5
    POSS L -1
    Stop

 

But this is just random chance, without regard to Samus' health.

Is there something I can use, like "if(PlayerHeath < 100)"?

 

Thanks!

Share this post


Link to post

I mean, what is to stop doomers from making all-custom-content-doom mod and releasing it as a paid app?

 

It is just something on my mind.  I see btsx ep1 is the shareware episode.  but so is episode 2.  and i assume episode 3 will be shareware.  Granted, it uses id resources.  And I guess so does Supplice.  But I cannot help but look at these projects an think... could Doom wads/mods sell as iphone apps?  I mean, assuming someone manages to completely replace all the sprites and textures, could this not be a cash product?

 

Im all for loving this community, but it seems like the next logical step is for designers to get paid.  And with all the retro love and DOOM fondness, this seems like a real possibility imo.

 

Share this post


Link to post
4 hours ago, Mk7_Centipede said:

I mean, what is to stop doomers from making all-custom-content-doom mod and releasing it as a paid app?

 

etc

 

do a search for License

Share this post


Link to post
18 hours ago, ZombiJambi said:

Is there something I can use, like "if(PlayerHeath < 100)"?

Yes. However, it's a bit complex to bring use in DECORATE. It'd be simpler to do in ZScript, but if you don't want to convert the code, here's what you can do.

 

I'll assume it's just for single-player. Multiplayer makes things more complex.

 

First, take a look at DECORATE expressions on the ZDoom wiki. What you'll want is CallACS. This allows you to run a script and use the value it returns, so you can create a script named PlayerHealth() and then use it with an expression like "if(CallACS(PlayerHeath()) < 100)". You can also do the same for PlayerMissiles() or whatever.

 

On the ACS side, you'll need to have three scripts. The first will be there just to give the player a TID, so that the other scripts can find it. Something like this should work:

Script "Init" ENTER
{
	Thing_ChangeTID(0, 1337);
}

Then you can do the info scripts. I haven't run them but I think they should. I'm using GetActorProperty for health, and CheckActorInventory for missiles.

Script "PlayerHealth" (void)
{
	return GetActorProperty(1337, APROP_Health);
}

Script "PlayerMissiles" (void)
{
	return CheckActorInventory(1337, "MetroidMissile");
}

I don't know how the missiles are actually named, replace "MetroidMissile" with the class name actually used in the mod.

 

Finally, you'll want your scripts to be actually loaded so that the game can find them. If the Metroid Doom mod does not already have a script library, you'll need to make one so as to put these scripts in it. I'll let you read the wiki article on libraries to find out how it works.

 

Hopefully it all works.

Share this post


Link to post
4 hours ago, Gez said:

Yes. However, it's a bit complex to bring use in DECORATE. It'd be simpler to do in ZScript, but if you don't want to convert the code, here's what you can do.

 

I'll assume it's just for single-player. Multiplayer makes things more complex.

 

First, take a look at DECORATE expressions on the ZDoom wiki. What you'll want is CallACS. This allows you to run a script and use the value it returns, so you can create a script named PlayerHealth() and then use it with an expression like "if(CallACS(PlayerHeath()) < 100)". You can also do the same for PlayerMissiles() or whatever.

 

On the ACS side, you'll need to have three scripts. The first will be there just to give the player a TID, so that the other scripts can find it. Something like this should work:


Script "Init" ENTER
{
	Thing_ChangeTID(0, 1337);
}

Then you can do the info scripts. I haven't run them but I think they should. I'm using GetActorProperty for health, and CheckActorInventory for missiles.


Script "PlayerHealth" (void)
{
	return GetActorProperty(1337, APROP_Health);
}

Script "PlayerMissiles" (void)
{
	return CheckActorInventory(1337, "MetroidMissile");
}

I don't know how the missiles are actually named, replace "MetroidMissile" with the class name actually used in the mod.

 

Finally, you'll want your scripts to be actually loaded so that the game can find them. If the Metroid Doom mod does not already have a script library, you'll need to make one so as to put these scripts in it. I'll let you read the wiki article on libraries to find out how it works.

 

Hopefully it all works.

 

Thank you for the response! I've entered these into the "scripts" file (I'm assuming it doesn't matter where in that file they are entered, so I put them at the top), and added the triggers to my test enemy's Death state.

 

This is how I'm calling it:

    ZOOM H 5 
        {
        if (CallACS(PlayerHealth()) < 100)
            {
                A_SpawnItem ("MedHealth",0,0);
            }
        }
    ZOOM I 5 A_Scream
    ZOOM J 5 A_NoBlocking
    ZOOM K 5
    POSS L -1
    Stop
 

If I call the function in DECORATE as you've typed it, I get an error at startup:

 

image.png.b22ae0155e37dd656645975352ac6f9b.png

 

If I enter it like this page suggests (with quotes), the game launches fine, but when I kill the enemy, I get the message: P_StartScript: Unknown script "PlayerHealth".

 

Here's how I've entered it based on that ACS page.

image.png.46b75fe5a1f0250f8c09dd5fdad3ce2c.png

 

Share this post


Link to post

I kinda figured it out. I researched a bit, and saw that I also have to compile the scripts. So I did that, and it gave me the error that "return" can only be used in a function. So I had to use "SetReturnValue" instead within the script, and it worked! 

 

Thanks again. I know I'll have more questions later ;)

Share this post


Link to post

Alright, glad you could figure out the issues I forgot about. :)

Share this post


Link to post

Ok, so I got it working great at 100 health. Next I'm trying to drop the health pickup when Samus' health is less than full. My approach is this:

 

Scripts:

Quote

script "SamusCurrentHealth"(void)
{
    SetResultValue(GetActorProperty(1337, APROP_Health));
}
script "SamusMaxHealth" (void)
{
    SetResultValue(GetActorProperty(1337, APROP_SpawnHealth));
}

 

Monster death state:

Quote

  Death:
    ZOOM H 5 
        {
        if (CallACS("SamusCurrentHealth") < CallACS("SamusMaxHealth"))
            {
                A_SpawnItem ("MedHealth",0,0);
            }
        }
    ZOOM I 5 A_Scream
    ZOOM J 5 A_NoBlocking
    ZOOM K 5
    POSS L -1
    Stop
 

 

I get no errors when starting the game, but it just doesn't function properly. The monster only drops health when Samus' health is below 100. I'm assuming that 'APROP_SpawnHealth' grabs the health of the Actor when they spawn, which is always going to be 100. I tried 'APROP_Stamina', with the same results.

The Energy Tank upgrades coded as such:

Quote

actor EnergyTank : UpgradeStamina Replaces Soulsphere
{
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Amount 100
  Inventory.MaxAmount 900
  Inventory.PickupMessage "Energy Tank" 
  Inventory.PickupSound "misc/p_pkup"
 States
  {
  Spawn:
    ENRT A 6 Bright
    ENRT B 6 Bright
    ENRT C 6 Bright
    Loop
  }
}

 

Share this post


Link to post

Try SetResultValue(GetActorProperty(1337, APROP_Health) + GetActorProperty(1337, APROP_Stamina));

 

If that doesn't work, I have no simple idea.

Share this post


Link to post

I've recently gotten into doom mapping and I was hoping that I could have some guidance on a small idea that I want to implement. 

 

I want to make a balcony area with a railing of sorts. However to my knowledge while you can control the vertical position of transparent textures if I made an impassable line for said balcony bellow it on the ground it would extend all the way to the skybox. Is there any way to make an impassable line for only the area above the balcony and not bellow?

 

Even better question, is if there is any way to have a 2 sided line that originates from a 3D floor?

 

The only idea I have how to do something like this is using a thin nontextured 3D wall the same height of the texture for the railing. Or rather using a 3D objects to make a 3D railing rather than a transparent texture. The downside being to my knowledge that bullets would be unable to pass through the railing if using 3D objects. Attached picture for what I mean by railing.

Welded-juliet-balcony-001.jpg

Share this post


Link to post

You mention 3D floors, are you mapping for GZDoom? If so, the 3D middle texture flag serves your purposes, it makes a line blocking only at the heights its texture is shown.

 

Share this post


Link to post
1 minute ago, Gez said:

You mention 3D floors, are you mapping for GZDoom? If so, the 3D middle texture flag serves your purposes, it makes a line blocking only at the heights its texture is shown.

 

That I am. I'm actually using GZDoom Builder for my mapping purposes. I'll look into using that flag later today. It is a shame that you cannot have multiple middle textures unless offset however.

Share this post


Link to post
31 minutes ago, Rince-wind said:

What do I need to write in a DECORATE file to make Heretic weapons deal double the damage?

The simplest solution is not to use DECORATE, but ZMAPINFO. Make a custom skill definition with MonsterHealth = 0.5 and it'll make monsters have half-health, largely doing the same thing as doubling damage. (With the difference that it also makes damage from infighting, explosive pods, crushers, etc. more impactful, too.)

 

Another simple solution is to create a PowerDamage item with DamageFactor 2 and a near-infinite duration. Then you have to make sure the player gets this item at the start of each level.

Share this post


Link to post

@Gez Works perfectly, here it is with some other changes if anyone's interested:

 

skill half
{
    Name = "HALF"
    SpawnFilter = hard
    MonsterHealth = 0.5
    AmmoFactor = 0.5
    DropAmmoFactor = 0.5
    DamageFactor = 2.0
}

Share this post


Link to post

Hexen (UDMF)

How do I make a thing (specifically a light source like a candle) bob up down in the air like the flachettes,

I know it has to do something with DECORATE but I don't know what.

Share this post


Link to post
17 hours ago, Rince-wind said:

Hexen (UDMF)

How do I make a thing (specifically a light source like a candle) bob up down in the air like the flachettes,

I know it has to do something with DECORATE but I don't know what.

 

Siberian Tiger did something like this with various things in his tgrdm3.pk3 (processor intensive)

 

 

Edited by Kappes Buur

Share this post


Link to post

Is it possible to make all (or at least as many as possible) source ports skip playing the demo at the title screen? Perhaps make a dummy DEMO lump or that sort. I know GZDoom doesn't play demos, but I'm looking for a wider source port compatibility.

Share this post


Link to post
On 9/9/2019 at 7:06 PM, Gez said:

You mention 3D floors, are you mapping for GZDoom? If so, the 3D middle texture flag serves your purposes, it makes a line blocking only at the heights its texture is shown.

 

Good to know, thanks. I've been using scripting trickery to achieve this effect...

Share this post


Link to post

image.png.37e5e80fb9bad1a25c1dcbaaada92972.png

 

Hey, i'm actually editing the plasma rifle in Whacked4. Everything works as expected, except that there is a cacodemon fireball explosion animation in the corner of the screen when the Fire state is activated. This is how it is inside Whecked4 (the state 204 is a cooldown.)

Am i doing anything wrong ?
 

Spoiler

image.png.0fa1f8b358a5b07deaaa119c28104479.png

 

Share this post


Link to post

I've got a wire midtexture that's slightly lowered into the ground to vertically align it. Looks fine in GL mode but bleeds through the ground in Software. Is this possible to correct or am I SOL regarding how it looks in Software? I've noticed this issue before, such as with the railings in map02 of Epic. Boom format.

3xkmUDj.png

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×