The "How do I..." Thread

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Ravick
Posts: 2055
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil

Re: The "How do I..." Thread

Post by Ravick »

Don't do it with Doombuilder, use a wad editor that allows you to open multiple wads, like Slade3 or SlumpEd. I believe, however, you'll have problems with lumps that uses the same name.

BTW, as Sgt. Shivers said, you wont be legally able to distribute this wad. :)
Another Imp
Posts: 3
Joined: Mon Dec 24, 2012 4:58 pm

Re: The "How do I..." Thread

Post by Another Imp »

@Sgt. Shivers
Not planning to distribute it, that would be redistribution of properties I don't lay claim to...

@Ravick
Have tried copying the maps with slade3 but the map markers become corrupted or something, they just stop working, not sure what the cause is, is this a common problem? Is it fixable?
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: The "How do I..." Thread

Post by cocka »

If you just want to merge the two iwads, it's a bit more work, but only the animdefs and doom 1 textures and of course the maps are needed to do this.

You have to completely rewrite the mapinfo, the map lump name etc..
Another Imp
Posts: 3
Joined: Mon Dec 24, 2012 4:58 pm

Re: The "How do I..." Thread

Post by Another Imp »

if I put the maps and textures for doomu in a new directory and do the same for doom2, is there a way to code that, if so is there a tutorial on how to do that?
User avatar
Scripten
Posts: 868
Joined: Sat May 30, 2009 9:11 pm

Re: The "How do I..." Thread

Post by Scripten »

Hey all. I'm having a bit of trouble here. I'm trying to make a fairly simple powerup that is entirely permanent. That is, the player picks the item up once and then it stays in his inventory between levels and everything. So far, it works fine when first picked up, but I just can't seem to get it to carry over into the next level.

Here's what I've got so far:

Code: Select all

ACTOR Test_Pickup : CustomInventory 10001
{
  + INVENTORY.AUTOACTIVATE
  + INVENTORY.ALWAYSPICKUP
  States
  {
  Spawn:
     TNT1 A 4
     loop
  Use:
    TNT1 A 0 A_GiveInventory ("JumpBooster", 1)
    TNT1 A 0 A_GiveInventory ("Test", 1)
    TNT1 A 0 
    stop
  }
}

ACTOR Test : CustomInventory
{
  + INVENTORY.AUTOACTIVATE
  + INVENTORY.ALWAYSPICKUP
  + INVENTORY.PERSISTENTPOWER
  + INVENTORY.HUBPOWER
  Inventory.Amount 1
  Inventory.MaxAmount 1
  Tag "test"
  States
  {
  Spawn:
     TNT1 A 4
     loop
  Use:
    TNT1 A 0 
    fail
  }
}
JumpBooster is a powerupgiver just like on the wiki. Anyone have an idea as to why this isn't sticking around?
User avatar
BigProjectAlone
Posts: 780
Joined: Wed Mar 21, 2012 5:38 am
Location: canada

Re: The "How do I..." Thread

Post by BigProjectAlone »

Scripten wrote:Hey all. I'm having a bit of trouble here. I'm trying to make a fairly simple powerup that is entirely permanent. That is, the player picks the item up once and then it stays in his inventory between levels and everything. So far, it works fine when first picked up, but I just can't seem to get it to carry over into the next level.

Here's what I've got so far:

Code: Select all

ACTOR Test_Pickup : CustomInventory 10001
{
  + INVENTORY.AUTOACTIVATE
  + INVENTORY.ALWAYSPICKUP
  States
  {
  Spawn:
     TNT1 A 4
     loop
  Use:
    TNT1 A 0 A_GiveInventory ("JumpBooster", 1)
    TNT1 A 0 A_GiveInventory ("Test", 1)
    TNT1 A 0 
    stop
  }
}

ACTOR Test : CustomInventory
{
  + INVENTORY.AUTOACTIVATE
  + INVENTORY.ALWAYSPICKUP
  + INVENTORY.PERSISTENTPOWER
  + INVENTORY.HUBPOWER
  Inventory.Amount 1
  Inventory.MaxAmount 1
  Tag "test"
  States
  {
  Spawn:
     TNT1 A 4
     loop
  Use:
    TNT1 A 0 
    fail
  }
}
JumpBooster is a powerupgiver just like on the wiki. Anyone have an idea as to why this isn't sticking around?
try adding this

+INVENTORY.HUBPOWER
User avatar
Scripten
Posts: 868
Joined: Sat May 30, 2009 9:11 pm

Re: The "How do I..." Thread

Post by Scripten »

No use. I've added both that and Inventory.PersistentPower to each definition in turn, and neither seems to work. Or is there just no way to keep inventory between levels that are not part of a hub?
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: The "How do I..." Thread

Post by Blue Shadow »

User avatar
Scripten
Posts: 868
Joined: Sat May 30, 2009 9:11 pm

Re: The "How do I..." Thread

Post by Scripten »

Yep. Crowdsourcing for assistance. I figure someone must know this fairly well between the two sites. I've been having trouble getting this simple bit to work for the last two days. It's frustrating, since I'd like to start working on other things, but this functionality is fundamental to the project I'm working on.
User avatar
zrrion the insect
Posts: 2432
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: The "How do I..." Thread

Post by zrrion the insect »

I think +INVENTORY.UNDROPPABLE will do the trick.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: The "How do I..." Thread

Post by Matt »

I know in ZDoom it's inventory.interhubamount x, where x is the maxamount, but it's not in Zandronum.

My workaround in Zand? Make the item into a weapon and use ammo. :|
(Alternatively, you can consider the old Hideous Destructor hack where you had a hidden ammo item and you regularly updated the inventory amount to match the ammo amount, and made sure the ammo was used up each time you used up the item.)


EDIT: Just out of curiosity, does anyone know why interhubamount was defined this way instead of just a yes/no flag? Has anyone ever actually put to good use this ability to strip all but [some arbitrary # more than 1] of an inventory item between hubs?
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm

Re: The "How do I..." Thread

Post by Xaser »

It was just a yes/no flag for the longest time: the "INVENTORY.INTERHUBSTRIP" flag. Try specifically un-setting that.
User avatar
jpalomo
Posts: 773
Joined: Mon May 17, 2010 9:45 am

Re: The "How do I..." Thread

Post by jpalomo »

I've got 3 items that can potentially drop from a monster. I want 2 of them only to spawn if the player has a specific item in his/her inventory. How would I go about doing this?
Came up with a hacky solution using a spawner that performs state jumps based on the target's inventory. This also solves my issue of respawning monsters when you leave an area.
Last edited by jpalomo on Sat Jan 12, 2013 8:47 pm, edited 1 time in total.
Stardust
Posts: 57
Joined: Sat Jan 12, 2013 6:41 pm
Location: France

Re: The "How do I..." Thread

Post by Stardust »

Also have I a question. With the script function SetActorProperty (Wiki : http://zdoom.org/wiki/SetActorProperty)
Trigerring the script works, I tried with APROP_Gravity and the actor got its gravity affected.
Through..there is a problem with APROP_DamageFactor ! Actually, is it even possible to code it ? Aren't there not enough values to fill ?
What I mean is that.
The formula on the Wiki says void SetActorProperty (int tid, int property, int value)
If I would like to affect the gravity, I just have to place APROP_Gravity as property, and a number (<0 for increasing gravity and >1 for reducing it) as value. Nothing wrong here.
But now, I think APROP_DamageFactor needs several values ! Because you know, you have to say how much the damages will be multiplicated, as well as which damagetype. So let's place APROP_DamageFactor as property, and then what information must I place in "value" ?! Because I have two informations to write, like I said the damage multiplier number, AND the ID of the damage that'll be affected by that damage multiplier number. If I try putting the 4 arguments (for instance,

Code: Select all

SetActorProperty(0, APROP_DamageFactor, "BazookaTest", 4
That is supposed to hurt 4 times stronger the actor when hurt by a BazookaTest damagetype), it says Incorrect number of arguments when I try to compile it.
If tl;dr : in a general way, I'd like to know accurately how does APROP_DamageFactor works. What's its structure and all.
Thanks a lot if you could help me.
User avatar
edward850
Posts: 5908
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand

Re: The "How do I..." Thread

Post by edward850 »

APROP_DamageFactor in SetActorProperty is the generic damage factor, and isn't supposed to control the damage factor of any specific damage types. In-fact, it even explains this to you on the very wiki page you linked to:
Generic damage factor for the actor. It is applied before any specific DamageFactor.

Return to “Editing (Archive)”