Code Monkey home page Code Monkey logo

ugly-as-sin's Introduction

Ugly as Sin

A mod for Hideous Destructor, adding various optional features and mechanics. Originally started as HD-Scavenger with a focus on longer-term "survival" features, but rapidly expanded into a general purpose enhancement mutator.

Download

The following download options are available:

  • Stable - Stable version (usually) that attempts to target the same numbered version of Hideous Destructor and GZDoom. In other words, Ugly as Sin v4.5.0 targets Hideous Destructor v4.5.0 which targets GZDoom 4.5.0. Will sometimes include a Stable Legacy build for LZDoom compatibility when needed and possible.
  • Unstable - Also sometimes called the master build. Constantly-updated version which targets the latest main development version of Hideous Destructor. Most up to date but may have bugs, testing features, or be broken.

Instructions

Click here to go to the Manual (work in progress)

Loading

Depending on which version you download, you may receive a file with a .zip or .pk3 extension. Internally, these files are identical and GZDoom will load either type just fine. You should not unzip the file unless followin the advanced instructions below to customize your modules.

Ugly as Sin requires either the GZDoom or LZDoom, and must be loaded after Hideous Destructor in all cases. You may do this with a command-line or script file, or a graphical Doom-engine launcher like ZDL. Dragging-and-dropping the files onto GZDoom is not recommended as load order will be unpredictale.

Example command line: gzdoom -file HideousDestructor-main.zip Ugly-as-Sin-master.zip -skill 4 -warp e1m4

Advanced loading customization

Most of the time you will want to load the complete mod with all features enabled. However, some players may wish to customize their experience by only using certain features. This is supported throught the use of standalone code "modules" within the main mod.

Instructions

  • Unzip the downloaded mod file. If the file has a .pk3 extension it can be renamed to .zip.
  • Delete the following files and folders:
    • All plain root-level files (mapinfo.txt, zscript.zsc, etc). These provide required "glue" to load the complete mod and will not be needed for loading individual modules.
    • The buildscripts/ folder. This only contains automated scripts and template shims.
  • You should now have a list of folders with names such as core/, 2fcartridges/, medical/, etc. These are the modules which can be loaded individually. You may:
    • Load the desired folders directly into GZDoom.
    • Compress the contents of the desired folders into .pk3 or .zip files.
  • The Core Module (core/) must be loaded before any other modules, or errors will occur!

Development

Ugly as Sin is always under rapid development and typically targets the "bleeding edge" main branch of Hideous Destructor. Bugs may be reported here as Github Issues, on the ZDoom forums in the Ugly as Sin thread, or on the Hideous Destructor discord server.

ugly-as-sin's People

Contributors

blahdude10 avatar caligari87 avatar dastrukar avatar eroc avatar jrhard771 avatar marinagryphon avatar melodica2905 avatar noelle-lavenza avatar silentdarkness12 avatar tedthedragon avatar twelveeyes avatar undeadzeratul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ugly-as-sin's Issues

Scarcity module spawner additons/changes

  • Bronto rounds should randomly spawn fired/used.
  • Individually-spawned rocket grenades should randomly spawn armed/defused.
  • Frag grenade spawns should be scattered and loose instead of neat rows.

Scarcity: Add warning above 75%

100% scarcity is intended to mean "break, degrade or possibly remove, 100% of affected pickups". As this may very well make the game unplayable, add some kind of warning message when the level is set above 75%.

Enhanced medical system

No. I will not work on this. I promise.

But just in case I do.

[2:04 PM] MatthewTheGlutton: Fire: open up wound; Altfire: close up wound; Unload: remove bullet or other object; Reload: inject; Zoom: move to next injury; Firemode: switch between anaesthetic and sutures;

But I won't.

Maybe.

Exact spawns scarcity refactor

As-is, scarcity rolls randomly per spawn to determine removal. While on average this is fine, the RNG can in theory remove or keep all spawns even at the lowest setting, and players have complained of this.

This change would make scarcity more exact, by pre-counting all the items of a type (via thinkeriterator) and then removing a set percentage of them randomly.

Pseudocode:

while (thing = ThingIterator.Next()) {
    array.Push(thing);
}

removeAmount = array.size() * percentage;

while(array.size() >  removeAmount) {
    index = random(0, Array.Size());
    mo = array[index];
    if(mo) {
        mo.destroy();
        array[index].Delete();
    }
}

array.Clear(); // just to be safe

Picked up rations not incrementing when empty

Reported by Cdru on Discord:

Found a glitch in HD-Scav: If you eat all of your rations and throw them away, picking up another ones will lead to the count not updating and the player being unable to use rations

Needs research, not sure what might be causing this.

Make ration spawns dependant on timescale

As is, ration spawns are static. Meaning, if the timescale is adjusted from the default 60x, then the player will have too little or too much food.

Solution: As with burn rates, set the ration spawns to make sense at 1x and factor chances by the timescale. Most likely players at lower timescales will be able to subsist with their starting three rations, as even a megawad will probably take less than 24 in-game hours to complete in HD (much less three weeks!).

Thirst

  • Each ration will contain 500mL of water, so bulk will need to increase.
  • The messkit will also facilitate drinking, via altfire (move "open ration" to some other key?)
  • player needs to consume 2100mL of water "daily", matched with the calorie requirement. This will go up with exertion / fatigue of course.

Log hunger message when opening messkit

Hunger status messages can easily get lost when they happen in the middle of combat. Add a feature to display hunger messages along with the expanded UI when the [Use] key is held.

  • Move HungerStatus() call to per-second tic block
  • Cast player and add following line to HungerStatus()
+	//Set lastcalories to just under trigger threshold, for slight delay
+	if(owner.player.cmd.buttons & BT_USE) { lastcalories = calories + 245; }
	//Display message if delta over threshold, and reset
	if(abs(lastcalories - calories) >= 250) {
		owner.A_Log("\ck"..statusMessage, true);
		lastcalories = calories;
	}

Note this can spam the console if the player triggers it often. Perhaps add some extra checks to make it nicer.

Flashbang grenade

Confuse / daze monsters with a bright flash and loud bang.

Implementation:

  • Base off existing HD grenade.
  • Include handler module that cycles to the flashbang if the grenade key is pressed while the standard grenade is the current weapon.
  • Flash will be a bright additive light and a large white sprite, plus a little smoke.
  • Use A_RadiusGive to drop a flash handler in nearby monster inventory. The handler performs the following effects for some random amount of tics:
    • Keep the monster's target field cleared.
    • Periodically force pain.
    • Modulate the actor's angle/pitch smoothly but randomly.
    • Consider doing this with a blockthingiterator and actor list instead of inventory items?
  • Same handler may also work on players, covering the screen with a white fade and playing a ringing sound

Fresh-pressed 7.76mm rounds disappear if at capacity

Reported by Sirus on Discord:

if you press a new round while full up on 776 rounds, the round just disappears.

Probably just missing a check for the player's current inventory. Either drop the fresh round or block making one if the player's pockets are full.

Desync in multiplayer / Multiplayer support

Reported by Toxity#6243 with Leon Portier#2527 while playing multiplayer.

Scavenger is causing Sync issues. [...] we removed it and we're having no issues.

HDScav wasn't specifically designed for multiplayer support, but it would be a nice to if it didn't break multiplayer, at least. Not sure what could be causing this immediately offhand. Will need to do some digging.

Messkit amount issues

All reported by BeatCrazed#8958 on Discord:

I've discovered an amusing bug in the UAS nutrition module. If you have the HD setting "Drop everything on death" enabled, then when you die you will drop a lot of mess kits. More than four (the number of rations I had and the number beside the messkit in the invbar) so I'm not sure where it's getting the number to drop but there you go.

One more thing from me. If you have no rations (say because you opened them all and they're on your plate/in your cup, you cannot open the messkit. Quite a pain if (say) you've got all your food in the messkit and none in ration form.

Oh, and I just found that you can pick up a second messkit if your rations are on 0, and the game thinks you've lost your old one and spawns more for you to find.

Pseudo-API extensions

Description

Add small "hooks" for modders and mappers to use, so UaS can provide extended behavior.

For example, if a mapper wants to add rations to their map: Instead of adding the ration item directly (which would cause errors if UaS is not loaded), the mapper places an invisible marker that UaS can look for and spawn rations on as part of its normal loop.

API list

  • Hunger System
    • Ration spawn marker
    • Messkit marker
    • Disable ration spawns
    • Disable messkit spawns
    • Set/add/subtract player calories
  • Sling
    • Allow-list of weapons
    • Deny-list of weapons
  • Looting
    • Class list enabled for looting
    • Loot classes per lootable class
  • Scarcity
    • Classes to exclude
    • Classes to scarcify, with probability
  • AI
    • Classes that can use flashlights, lasers, or both

(Will edit this list with additional requested APIs)

Implementation

UASINFO lump with toggles and settings. Most ports will ignore lumps they don't understand, so this can be safely use to add support even to vanilla-targeted maps.

Look at TheZombieKiller's zk-core for tokenizer implementation.

Can't unload 2F modules from medikits after 9

Reported by MitochondrialAdam in Discord:

after 9, i can no longer unload SF modules from used medkits lying around. I can pick up modules divorced from a medkit but not if they are IN a medkit

This check is hardcoded in the 2F handler module, need to have it check the maxamount of the module inventory item instead.

Manual hunger status

From Discord:

Fort of Hard Knox: Cali, could you make it so that hitting firemode with the messkit out displays the current hunger and thirst status

The messkit already shortcuts the status message delays when you pull it out, so just add a line to do the same on the keypress.

Incap module crash on restart

Reported by MitochondrialAdam#9386 on Discord:

Crash to console bug on UAS
We ran out of lives with fraglimit 104
When I tried to start the map over by pressing use, it crasehd
bug on line 48 from incap module
incap.zsc
Said it's trying to read from address zero

Make reloading kit more interesting

The current reloading kit is rather simplistic and not very interesting, mostly just consisting of sitting around and holding the [Fire] button until some rounds are done.

Ideas

  • Brass preparation: No idea how to make this not tedious as hell. Then again, it's tedious as hell in real life too. Maybe skip it altogether and have the player just decide which brass is still okay to use, with more damaged casings having a higher chance to trip the RNG.

  • Splitting 4.26mm rounds: A sort of timing-based mechanism where holding the action button applies increasing force to the round in order to break it apart. Applying too little force (not stopping early enough) means the round won't break, but applying too much drops and scatters the components.

  • Reforging shot: The reloading kit will include a battery-powered crucible + automated mold. The player will need to load the 4.26mm shot into the crucible, then turn it on and drop it (not dropping will cause burns in short order). Once finished, the mold will dump the finished shot and the player can collect the components.

  • Making final rounds:

    • Pouring or removing powder (represented by little dots) from the casing with the action buttons. A scale will show the accurate amount after a short while (and whether it's in the appropriate range), or the player can rely on their intuition / timing.
    • Pressing rounds will be basically holding the action button, as it is now.
    • Inspecting the round (required before it's available for use) would perform the final check on whether the build process was successful, if not, the round can be recycled to try again.

Change priority of ration/mess kit drops

As-is, opened rations are dropped first, then unopened, and then finally the messkit itself. Also, when the player is forced to drop their weapon due to a fall, either the messkit or the opened ration (or both) should take priority.

  • Prioritize unopened rations in general, so a player doesn't have to dump their meal if sharing food
  • Manually eject tossed items and return null so forced drops don't affect mess kit.

Alternate sling controls

Various people don't like the reduced aim sensitivity that comes from holding Use and would prefer if the sling had some other method of activation / toggle.

Some possibilities:

  • Custom keybind (preferably not, HD has too many keys already)
  • Toggle mode (Sling is an active item, what would reasonably disable it? runmode?)

De-dupe event handler functions

Move duplicated code used in event handlers (spawnstuff, randomchance) to some kind of central place so it only needs one version maintained. Global function struct? Ask on forums or discord.

Pickupable "debris" can block actual pickups

@JRHard771 mentioned this in Discord, citing the instance of stimpack wrapper debris blocking pickup of armor after using meds, leading to death since he couldn't target the armor reliably for pickup.

Possible solutions, in order of attempts:

  1. Make discarded stim debris bounce away from player so as not to block pickups (straightforward, addresses this particular situation).
  2. Make a pull / feature request to Hideous Destructor, to make all failed pickups drop behind player instead of on feet (may not be possible or accepted).
  3. Reduce height/radius of debris items so they're less likely to block pickup (not sure if this would work).
  4. Make debris visual-only (simplest solution but I like the idea of "digging through" piles of trash to find usable items.

Scarcity: Ammo spawns

Initial work on modifying level spawns at start of level. Focusing on ammo replacement via WorldThingSpawned eventhandler.

Problem: Last time I tried this, ammo in the player's inventory and ammo dropped from monsters was also affected. Need to figure out how and make sure to bypass inventory and drops.

Tossable light sources

Tossable light sources in various colors, for illuminating or marking areas.

  • Flares: Bright but short-lived.
  • Glowsticks: Dim but long-lasting.

Spawn on backpacks, ammo boxes, bodies?

Add credits file

Realized the v0.1.0 release was inexcusably lacking a credits file.

Preliminary draft:

  • BloodyAcid: Base for ration sprite, edited by me.
  • Zhs2: Spawning code suggestion
  • The crew over on the HD Discord server for suggestions and playtesting
  • Matt: For HD obviously, and some code I lifted from the same.

[SUGGESTION]Sniper Elite-style corpse searching

Instead of enemies having the chance to drop their usual loots, you use the use key over a dead body to search it for ammo. A single tap will do a quick search, and giving the e a concentrated series of mashes would do a more thorough, involved search. The quick search would maybe MAYBE drop a little something. The full search would take a fair bit more time, but has a higher chance of giving up something guud.

Adjustable timescale

This will require reworking when the hunger tracker ticks off calories, but better to do it now when there's fewer subsystems.

Ideally a timescale of 1 will be more-or-less true to real world times for calorie burning, starvation, etc. The current balance is toward 60x timescale. Decreasing the timescale below 1 (slowing down survival mechanics) shouldn't be required.

Add eating slowdown/stop when near max calories

Hopefully prevent players from abusing i_timescale to stack all their food at once.

	//Takes a random-sized "bite" of the food
	action void HDScav_TakeScoop() {
+		// cast tracker
+		// if calories equal/over threshold, display message and abort bite
+		// if under threshold, continue
		A_PlaySound("HDScav/FoodScoop", CHAN_AUTO, frandom(0.3, 0.6));
		invoker.biteSize  = min(invoker.mealsize, 75) * frandom(0.75,1.0);
+		// get difference between max and current calories
+		// if within certain range, use as ratio to multiply down bitesize
-		invoker.biteSize *= frandom(0.75,1.0); // replace this extraneous line
		invoker.biteSize  = clamp(invoker.biteSize, 1, 75);
}

Enhancements to "fake" pickups

Instead of having fake pickups be useless clutter, sometimes "spawn" items in them as an internal variable (instead of spawning on the ground). When the player attempts to pick up ("shake out") the empty container, the item drops.

  • Medikit: May contain wrapped stimpack or second-flesh module
  • Zerk pack: May contain injectors.

Add more items here as needed.

Tracker expects to be attached to a player

Reported by Sirus in the Hideous Destructor discord server.

Mod crashes with an address zero error when loaded with another HD mod that uses the HDSpectator class. Suspect this is because the tracker expects to be attached to an HDPlayerPawn, and would probably manifest similarly in a multiplayer game.

Screenshot

Proposed solution: Add a null-pointer check to the tracker.

Add debris spawn for bullet boxes

As is, bullet boxes disappear on pickup. Replace these with overturned / crumpled boxes instead.

Actually not sure if this is even possible without replacing the original actor entirely. Check to see if arbitrary item pickups can be detected (via WorldThingDestroyed() perhaps?)

Setting hunger timescale to zero / disabled causes crash

Reported by MitochondrialAdam in Discord

MitochondrialAdam: I just found a big bug. I just attempted to set hunger timescale and apparently it increases by 10 until it wraps back down 0x which then makes the game crash because a division by 0 occurs

Probably need to just fix the menudef defines to skip the "0x" setting since we have a global toggle now.

Breaching charge

Improvised explosive specifically for blasting doors. Alternate use for IED kits.

Enhance debugging via flags

Revamp all modules to output debugging based on flags in the debugging cvar, for example:

if(UaS_Debug & UAS_DF_AI) sprite = GetSpriteIndex('AMRK');

This would allow setting the cvar to various values to only get certain debugging outputs instead of the whole mess all the time.

Pain/Stun reducer drug

Something to fill the gap between stims, medikits, and zerk, if possible. Useful for getting rid of the post-getting-shot-or-burned jitters, with some side-effects.

Mechanically here's what I'm thinking for a painkiller:

  • Puts a soft cap on pain/stun.
  • Can be stacked (at risk of overdose).
  • Allows walking full-speed on "broken" legs (at risk of adding closed wounds).
  • Tolerance build-up if stacked too much too often.
  • Withdrawls that cause excess pain and fatigue.

Will have to check in the HD source code to see what causes view jitters / slow-walking and see if these can be reliably capped / influenced without breaking other things.

Exclude food/water amounts from hd_helptext check

As is, the messkit message is completely removed if hd_helptext is off, including remaining food/water amounts. Revise this to allow those messages.

Also: Rework messaging code in messkit to use concatenation like the reloading kit. It's cleaner.

Revise start-of-level checks for spawners

Currently spawners use level.time to abort after the first tic, but this will break hubs. Better to check and abort for if(level.maptime > 1) and if(IsReentering() == true)

Sling pack

Basically a selector for all the stuff this mod adds, to avoid clogging up the inventory. Make it graphical instead of just a list like HD's backpack. Use the sling pack from BloodyAcid's sprite set.

Note, this will not be a toggleable module, but will instead be available whenever a module is enabled that requires an inventory item.

Rework messkit / rations slightly

Per discussion on Discord, it would feel better if food and water were separately manageable items. To that end, make the following changes:

  • Rations can spawn as food, water, or both. Amounts of each will be shown to the player via the tracker's help message.
  • Reload opens a food packet and adds it to the current meal. AltReload opens a water packet and adds it to the meal.
  • Fire both eats and drinks, prioritizing whichever you need more. (Altfire would be unused)
  • Drop One dumps one each of food and water rations on the ground, like how the ZM66-UGL drops both a mag and grenade. This would be moved from Drop Weapon
  • Water rations will be a "fatter" blue version of the food ration sprite.

Unwrapped ration drop bug

Dropping the "unwrapped ration" weapon does not drop a partial ration actor or decrease the number of ration items in your inventory. It does make the game treat the next ration as an unopened one. As long as one does not finish a ration they can game this for infinite calories.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.