Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Keyboard_Doomer

Trying to create a patch that would make all pickable items affect items percentage

Recommended Posts

I want to create a patch that would make all items present at map start that can be picked up by player to count towards items percentage. Making all needed items count towards items % is trivial with WhackEd but the problem are the zombie enemies which drop pickable items making it possible for the items percentage to reach over 100% leaving my current patch useless.

Is there a way to replace the items dropped by zombie enemies with direct copies (while not changing any game behavior) with dehacked or any other way that would work with prboom-plus -complevel 2?

Share this post


Link to post

Pick 3 decorative things that don't get used often in maps - I recommend dead lost soul and the blocking hanging corpses from Doom 1. Change their properties, flags, spawn states and IDs to the ones of Ammo Clip, Shotgun and Chaingun, and check their Affect Item % flag. Now edit the real Ammo Clip, Shotgun and Chaingun: Change their IDs to the ones of the original decorations, otherwise keep them the same (not affect item %). This way, you've swapped the placeable objects. Pickable items placed in the map will spawn as affecting item %, but the ones dropped by zombies will not affect item %. It has a necessary side effect that if the original decorations were used in the maps, they would spawn as collectible items now (the ones *not* affecting item %) - but this is necessary, because the game would crash if it found unknown IDs in the maps, and you cannot add objects via DEHACKED, only use the existing ones, and there are no other free objects to use than the pickups.

Share this post


Link to post

Thanks a lot, works exactly as I expected and wanted.

Not very knowledgeable about this but I think those blocking corpses are used from time to time especially by newbie mappers so I went with Demon spawner and Demon spawn spot for maps without Icon of Sin and with SS Nazi and Commander Keen in case there is IoS in the map. Obviously not ideal but still good for my needs and at least I can tell more easily when something is wrong.

Hmm, is there really no way to add new objects/IDs in a way that would work with prboom-plus -complevel 2 or at least -complevel 9? Item respawn fog seems like an ideal object for modifying but unfortunately it shares ID with many other objects.

I'm attaching both finalized patches just in case someone would be interested:

Replaced: Dead Lost Soul + Demon spawner + Demon spawn spot

Spoiler

Patch File for DeHackEd v3.0
# Created with WhackEd4 1.0.4
# Note: Use the pound sign ('#') to start comment lines.

Doom version = 19
Patch format = 6


Thing 44 (Green armor)
Bits = 8388609

Thing 45 (Blue armor)
Bits = 8388609

Thing 48 (Blue keycard)
Bits = 41943041

Thing 49 (Red keycard)
Bits = 41943041

Thing 50 (Yellow keycard)
Bits = 41943041

Thing 51 (Yellow skull key)
Bits = 41943041

Thing 52 (Red skull key)
Bits = 41943041

Thing 53 (Blue skull key)
Bits = 41943041

Thing 54 (Stimpack)
Bits = 8388609

Thing 55 (Medical kit)
Bits = 8388609

Thing 60 (Radiation suit)
Bits = 8388609

Thing 65 (Box of ammo)
Bits = 8388609

Thing 66 (Rocket)
Bits = 8388609

Thing 67 (Box of rockets)
Bits = 8388609

Thing 68 (Energy cell)
Bits = 8388609

Thing 69 (Energy cell pack)
Bits = 8388609

Thing 70 (Shells)
Bits = 8388609

Thing 71 (Box of shells)
Bits = 8388609

Thing 72 (Backpack)
Bits = 8388609

Thing 73 (BFG 9000)
Bits = 8388609

Thing 75 (Chainsaw)
Bits = 8388609

Thing 76 (Rocket launcher)
Bits = 8388609

Thing 77 (Plasma rifle)
Bits = 8388609

Thing 79 (Super shotgun)
Bits = 8388609

Thing 27 (Demon spawner)
First moving frame = 0
Initial frame = 884
Bits = 8388609
ID # = 2001
Height = 1048576

Thing 28 (Demon spawn spot)
Initial frame = 880
Bits = 8388609
ID # = 2002
Height = 1048576

Thing 116 (Dead Lost Soul)
Bits = 8388609
Initial frame = 870
ID # = 2007

Thing 64 (Ammo clip)
ID # = 23

Thing 74 (Chaingun)
ID # = 87

Thing 78 (Shotgun)
ID # = 89

Replaced: Dead Lost Soul + SS Nazi + Commander Keen
Spoiler

Patch File for DeHackEd v3.0
# Created with WhackEd4 1.0.4
# Note: Use the pound sign ('#') to start comment lines.

Doom version = 19
Patch format = 6


Thing 44 (Green armor)
Bits = 8388609

Thing 45 (Blue armor)
Bits = 8388609

Thing 48 (Blue keycard)
Bits = 41943041

Thing 49 (Red keycard)
Bits = 41943041

Thing 50 (Yellow keycard)
Bits = 41943041

Thing 51 (Yellow skull key)
Bits = 41943041

Thing 52 (Red skull key)
Bits = 41943041

Thing 53 (Blue skull key)
Bits = 41943041

Thing 54 (Stimpack)
Bits = 8388609

Thing 55 (Medical kit)
Bits = 8388609

Thing 60 (Radiation suit)
Bits = 8388609

Thing 65 (Box of ammo)
Bits = 8388609

Thing 66 (Rocket)
Bits = 8388609

Thing 67 (Box of rockets)
Bits = 8388609

Thing 68 (Energy cell)
Bits = 8388609

Thing 69 (Energy cell pack)
Bits = 8388609

Thing 70 (Shells)
Bits = 8388609

Thing 71 (Box of shells)
Bits = 8388609

Thing 72 (Backpack)
Bits = 8388609

Thing 73 (BFG 9000)
Bits = 8388609

Thing 75 (Chainsaw)
Bits = 8388609

Thing 76 (Rocket launcher)
Bits = 8388609

Thing 77 (Plasma rifle)
Bits = 8388609

Thing 79 (Super shotgun)
Bits = 8388609

Thing 24 (SS Nazi)
Action sound = 0
Death sound = 0
Death frame = 0
Far attack frame = 0
Respawn frame = 0
Bits = 8388609
Exploding frame = 0
Height = 1048576
Pain sound = 0
Initial frame = 884
Hit points = 1000
Pain chance = 0
First moving frame = 0
Alert sound = 0
Speed = 0
ID # = 2001
Injury frame = 0

Thing 25 (Commander Keen)
Death frame = 0
Mass = 100
Bits = 8388609
Height = 1048576
Pain sound = 0
Initial frame = 880
Hit points = 1000
Injury frame = 0
Width = 1310720
Death sound = 0
ID # = 2002
Pain chance = 0

Thing 116 (Dead Lost Soul)
Bits = 8388609
Initial frame = 870
ID # = 2007

Thing 64 (Ammo clip)
ID # = 23

Thing 74 (Chaingun)
ID # = 72

Thing 78 (Shotgun)
ID # = 84

Share this post


Link to post
Keyboard_Doomer said:

Hmm, is there really no way to add new objects/IDs in a way that would work with prboom-plus -complevel 2 or at least -complevel 9?

Correct. There is no way DEHACKED could do it. Advanced ports support their own scripting languages to define custom actors, for example ZDoom's DECORATE - but those are obviously incompatible with vanilla or Boom.

Item respawn fog seems like an ideal object for modifying but unfortunately it shares ID with many other objects.

ID -1 actually means no ID. Objects with ID -1 cannot be placed in a map, they must be spawned during runtime - practically all of them are programmed to spawn upon some hardcoded happening (for example calling a codepointer to fire a projectile). ID actually plays no role after the map is loaded and objects are spawned to their initial locations.

So, I think you can edit an object with ID -1 to be placeable into the map - but keep in mind that its hardcoded behaviour will remain, as it's not tied to the ID, but to a "DeHackEd thing number" (0-136, according to the position in the thing list), which defines the thing type and cannot be changed.

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
Sign in to follow this  
×