• Content Count

  • Joined

  • Last visited

About SandyBeaches

  • Rank

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

610 profile views
  1. I made some posts in the Hydrocraft mod thread showing the java behind melee combat and some quick thoughts on it. See here and here I am going to use this thread to summarize my findings, so others can use them as a reference. Firstly: Skill modifiers and weapon categories. What do they affect? By how much? If the weapon has the category "Unarmed", no perk related. The only calculation for unarmed is that it is capped at 0.7 damage per hit. NOTE MODDERS: This means if you categorize a weapon in your scripts as unarmed, putting max damage higher than 0.7 does nothing. These are not intuitive at all. Rather than either starting at 100% damage and increasing (bonus damage) or starting at a low point and reaching 100% at level 10 (competency), skills in project zomboid are a mixture of both. If the weapon has the category of "Blade" or "Axe", use Blade Accuracy perk (java name=PerkFactory.Perks.Axe): If the weapon has the category of "Blunt", use Blunt Accuracy perk (java name=PerkFactory.PerksBlunt): Both Axe and Blunt perks affect damage the same way. 0:30%, 1:40%, 2:50%, 3:60%, 4:70%, 5:80%, 6:90, 7:100%, 8:110%, 9:120%, 10:130% Or, to put it more compactly: Damage = TotalDamage*(0.3+PerkLevel*0.1) If the weapon is "Ranged" (not category), Aiming level affects critchance, not damage. The calculation is weapon.critchance + weapon.AimingPerkCritModifier * (AimingLevel/2) So for calculating the maximum crit of you custom guns, add the amingcritmodifier only 5 times, not 10. Lastly calculated, If the weapon has the category of "Axe" and the target is NOT knocked over. Double damage. Yup, axes do double damage to all standing targets. ORDER OF CALCULATION None of these calculations are exclusive! Furthermore, none of the melee checks actually restricts themselves to melee weapons. So, if you have a firearm (isRanged=TRUE) with the categories Unarmed,Axe,Blunt, and you attack a standing zombie, the following would happen. Get damage from weapon/wielder. If damage is more than 0.7, reduce to 0.7 (unarmed). damage *= 0.3+AxeLevel*0.1 damage *= 0.3+BluntLevel*0.1 critical chance = weapon.critchance + weapon.AimingPerkCritModifier * (AimingLevel/2) damage = damage*2 (Axe) There may be checks earlier in the code to prevent such items from existing at startup, but I know you can make these with lua. NOTE: I have yet to find any references to "improvised" in the code. I'll keep looking. Next time, Strength, endurance, push back, knockdown, and YOU!
  2. SandyBeaches

    Hydrocraft Mod

    sorry for double post but edit is not working. Knock down is interesting too. if ((this.Health <= 0.0F) || (this.BodyDamage.getHealth() <= 0.0F) || (((weapon.isAlwaysKnockdown()) || (bKnockdown)) && ((this instanceof IsoZombie)))) { DoDeath(weapon, wielder); } Basically; For a zombie, having knockdown occur while already on the ground is instant death. After a little bit of testing, it seems this is the main way we are actually killing zombies. This is also the primary way a weaponless player kills (stomping) and why it is near impossible to kill zombies at low endurance. Default unarmed does NO damage but has decent pushback and some knockdown. Second knock down on downed zombie kills. First level of exhaustion reduced knockdown chance by 50%!!! Final level reduces knockdown chance to just 16% of normal. Note that a weapon that always knocks down ignores the endurance calculation, and always kills a fallen zombie. MODMAKERS TAKE NOTE! This is why low damage/high knock down weapons are still ridiculously deadly. This has implications for my fist, blunt and pole arm plans. Players are immune to second knockdown kill. I may start tips thread with all this info in it..
  3. SandyBeaches

    Hydrocraft Mod

    Just for a little bit of information, here is the whole contents of the Hit function in the java core. Note that this is calculated from the perspective of the character who gets hit (usually a zombie). Some interesting things to note: Several stats have ceiling and floor checks, knockback for instance. There are hardcoded references to several weapon categories including: Shoving does NO damage! No matter how often you shove a zombie, you won't hurt it. Unarmed can never do more than 0.7 damage, even after modifiers, unless it critically hits. Axes get a coded 2x bonus to damage, but only to standing enemies. Then there is the nature of critical hits: You CAN get up to 100% crit chance. None of that 95% limiter some games have. Zombies that are downed give double crit chance. Critical hits do 10x as much damage. Some oddities that don't show up in this bit but are hidden in the statesmanager: Staggered entities can't take damage and can't be shot at. Others I have forgotten. Enjoy!
  4. SandyBeaches

    Hydrocraft Mod

    Hi again! I was sick of getting set on fire even with blacksmith apron and welding mask, so I whipped up a realistic, and decidedly endgame recipe for making the fire resistant suit. (For those that don't know, if you have the firesuit in your inventory, you never get burned by the kiln etc. Ground fire still hurts you). This actually follows the guidelines of the national fire association. Keep in mind, making this suit requires lots of wax, leather, some steel (if using bees), mined resources and rare loot. I think that is balanced enough, considering it took me 12 days + 10 skill foraging + many trips into dangerous areas to make, and that I leveled up first aid to 5 along the way. Secondly, I'd like to discuss weapon diversification. Currently, the pole-arms and hammers have almost no combat purpose. They are inferior to their equivalent tier blade weapons. To remedy this, I propose the following split between fists, pole arms, blades, blunt and axes. (I am currently testing in game): Fists: Friend of the Friendless I am not talking about the unarmed push and stomp, which you can still do by using the space key (default) even when armed, I am talking about punching, implemented as a very cheap one handed blunt weapon that anyone can make: PROS Almost always available. Just need two strips of cloth. Fast Decent Knock down Can punch zombies that are very close (0.1 min range) means you can fight indoors. Mix with base contextual melee (Space bar default) for martial arts action! Push, stomp AND punch! Improves with, and trains, blunt melee skill as opposed to normal unarmed which does not. Very low endurance requirements. Hits multiple opponents NEUTRAL CONS Very short range! You are liable to get scratched or bitten! Very low damage with no CQC! A spoon will kill a zombie faster, but only once. PURPOSE Fists are your final backup, or your first choice, depending on your level of sanity. Their only redeeming features are that they hit 2, can hit them VERY close, and you usually have a pair. An improvement over the default melee alone due to improvement via training, should be mixed with default for maximum effect. (Seriously, it is fun. Dangerous, but very satisfying if you can pull it off.) IDEA Have multiple types of 'fists' weapons defined representing different types/levels of combat, then lock them behind recipes requiring certain levels of blunt accuracy/defense/books/rare items. Current ideas: Karate; Single target, high push back, slightly more range, requires both hands . Boxing; Faster attack speed, slightly more damage, requires both hands. Judo; Single target, high knock down, slower attack speed but more damage, requires both hands Kung fu; Multi target fighting (3), can use one hand, stronger with two Kenpo; Slower attack speed, lower range, but can special attack Claws; Blade skill. Pole-arm: Friend of the Wanderer PROS Largest range (2.5 to 3.5) Moderate critical chance Simple resources needed in construction (mostly wood with a metal tip) High damage true to real life. (max damage 2 to 3) NEUTRAL Moderate/low weight Moderate durability Moderate knockdown modifier (trip) While most are blades, some are blunt (shovels, quarterstaves) CONS High minimum range (1 to 1.4), means you have to use PUSH (space default) if they get close. Max hit count of 1! Can only attack one zombie at a time. Unwieldy: Cannot use at max endurance High weapon weight. The length of the weapon exacerbates its weight, leading to high endurance usage. Slow swing speed. Cannot use single handed. Low push back modifier Rare. You won't find many pole arms in the modern world, but that is ok, you can make them! PURPOSE The pole-arm is an easy to make, easy to replace, high damage, single target weapon suited to taking down lone zombies at a safe distance without the noise of a firearm. It should be a survivors default weapon choice for starting out, and when traveling outside. A survivor should avoid using a pole-arm indoors however, as the high minimum range means you may be unable to hit enemies at close quarters, and the slow swing speed, high endurance cost, and single target limit means they cannot be relied upon to handle even moderately sized hoards. Blade: Friend of the Scavenger PROS King of CQC. Only blades can perform the close quarters instant kill. Low weight Easy to use. Most blades can be used at maximum endurance High swing speed One handed combat. Most blades can be used to full effect with one hand Highest critical chance. NEUTRAL Moderate damage. Many types of blades. Some can hit more than one target. Simple blades can be found in many locations, making them available early on. When a some blades become blunt, they become a low class club instead of breaking. (need to add. Perhaps chance to destroy? Look at makeshift axe for idea) Some blunted blades can be repaired by sharpening (need to add. Perhaps chance to destroy?) CONS Lowest durability of all weapon types. A blunt blade does significantly less damage. Lowest pushback. Damage is from piercing or slashing, very little gets turned into impact force. If you get overwhelmed, use push (space default). CQC takes a small amount of time. If you are swarmed, you may die if you forget to push. Highest construction requirements. A quality blade takes finesse and resources to make. Lowest range of all equivalent weapons PURPOSE Blades are the weapon of choice for exploring buildings or quickly dispatching small groups of zombies. Their (mostly) one handed usage means that survivors can carry an additional bag etc in their off hand while still fighting effectively. The low range combined with a special attack at point blank makes them perfect for surprise zombies hiding in bathroom/closets/upstairs and for fighting zombies without accidentally smashing windows. A low average weight means that a survivor should always be able to bring a blade with them to compliment their main weapon, or even just a spare. Due to the low durability and high resource cost, survivors may choose not to use a blade as their main weapon, and the low range and lack of push back makes blades unsuitable for dealing with hordes in open areas. Blunt: Friend of the Desperate PROS Highest durability. A solid lump of something heavy is still a solid lump of something even if it gets flattened a bit. Highest knock back and knock down. Hit them with something heavy. Multiple targets. Most larger blunt weapons can hit many enemies at once. Easy to find. Many things can be effective blunt weapons if you are desperate enough. Pipe, plank, bat, hammer, chair etc. Useful. Several blunt weapons are also essential building tools. High minimum damage. Total damage may be low, but it is reliable NEUTRAL Moderate resource cost to make. It doesn't take much skill to make a weapon heavy, just a lot of weapon. Weakest part of a blunt weapon is the handle. Replacing the handle can fix many blunt weapons (need to add. Look at makeshift axes.) Upgrade! Several blunt weapons can be upgraded for more damage. Moderate range. You don't need to put your weapon through them, a glancing blow still does damage. Moderate minimum range. Don't get surrounded or you can't knock them all down. CONS Lowest damage per zombie. Compared to all other weapons, blunt weapons do the least dps to individual zombies. Moderate/Low swing speed. Faster than pole arms. Blunt force instruments need to be swung. Cannot use most of them at maximum exertion. While most CAN be used one handed, most blunt weapons are more effective two handed. Uses a different skill set to bladed weapons. Highest weight among comparable weapons. High exertion usage. Slightly more than pole arms. No/low critical chance. PURPOSE Blunt weapons are for escaping from, or if the survivor is touched in the head, fighting, zombie hordes. If your situation is looking desperate, if you woke up surrounded and they're coming through the windows, a good blunt weapon will get you out. The key to this is the large knock back and knock down modifiers, combined with the high multi target capability. A trained survivor with a good blunt weapon can keep a hoard on their backs long enough to kill them all, or run away. In addition, the high durability means they are unlikely to find themselves weaponless during a fight. The key weakness of the blunt weapons is their endurance cost. While a survivor wielding a blunt weapon CAN reliably take on a horde, they are going to need a good lie down afterwards. As such, blunt weapons are for emergencies, or planned clearing of an area. Otherwise, a reckless survivor will find themselves exhausted, unable to fight back or run. Axes: Friend of the Survivor PROS Reliable damage (High minimum damage). Damage is partly due to weight, so even glancing blows do damage. Useful. Axes are a basic tool Moderate/High Durability. Less than blunt, more than pole arms. Axes are designed to withstand punishment Moderate/High Damage. Less than pole arms, more than blades. Moderate/High knock down Repeatedly repairable. Due to the mass of the head, it can be repeatedly sharpened, while the handle can be replaced. NEUTRAL Comes in one handed and two handed versions. Moderate swing speed. Moderate/Low critical chance Moderate knock back. Moderate range. Roughly the same as blunt. More than blades. CONS Rare. Axes are prized but due to their specialized nature, they are far harder to find than blades or blunts. Resource intensive to make. Not only do axes need as much materials as blunt weapons, they need to be sharpened and balanced too. Moderate/High weight. Axes weigh almost as much as blunt weapons. Moderate/High exertion cost. You can swing an axe longer than a similar blunt weapon, but not all day. Dual purpose. Unlike other tools, an axe loses durability when used for its task. PURPOSE The axe is the best general purpose weapon a survivor can have, if they can afford to use it as one. It doesn't have the reach and damage of the pole arm, the CQC advantage of blades or the knock back of blunt weapons, but is still above average in almost all aspects. The problem is finding one, and keeping it. However, survivor should always carry a backup weapon better specialized to deal with situations they find difficult. Or two. Sorry for the wall of text, but I hope you can appreciate the thought that has gone into this. I will be playtesting this myself for a while, please give me your thoughts.
  5. SandyBeaches

    Spawning a pistol fully loaded, spawning an item multiple times

    I'd probably add the pistol to inventory, then find the spawned object in player inventory and change its properties.
  6. SandyBeaches

    How do Generators Spawn?

    I think it is defined in the base code. Remind me to have a poke around some time.
  7. SandyBeaches

    Crafting Furniture?

    Ooh! Exciting!
  8. SandyBeaches

    Force No Equiping?

    The best way I can see to do this is to interrupt "add to inventory" and swap the container for a dummy item whenever it is added to any inventory other than the ground, at which point the container would get swapped back in. This is kind of how furniture is currently handled.. There are a couple of ways to store the container item... actually, you just need to store the inventory of it, not the inventoryitem class itself..
  9. SandyBeaches

    Severe Moodles / Extreme Consequences

    Hence the reason this is not for base game, but a mod
  10. SandyBeaches

    Severe Moodles / Extreme Consequences

    For the back one, I'd say treat it as a new moodle series. First step, "strained back"; minor pain, slightly lower speed and damage, further damage from weight procs sooner (eg, normally can carry for 30 min at max without damage, now can only carry for 20). Heals in a couple of hours or when you rest/sleep. Back support negates moodle while in base inventory. If you proc weight damage while strained, you get "sprained back"; moderate pain, reduced speed and melee damage, further damage from weight procs sooner, and from lower weight (in just 5 min of moderate weight will proc damage). Heals to "strained back" in a week, faster if you carry back support in base inventory. Movement speed improved to "strained back" level if cane/equivalent is equipped. "torn back"; High pain from moving, severe pain from carrying weight, reduced speed, greatly reduced melee damage, and now reduced ranged accuracy. Moderate weight instantly procs damage. Heals to "sprained back" in a fortnight, faster if you carry back support in base inventory. Movement speed improved to "strained back" level if cane/equivalent is equipped. "crippled back"; High pain at all times. Immobile if carrying weight. Melee damage AND accuracy severely reduced. Ranged accuracy AND reload speed severely reduced. Cannot sprint. Cannot move without back support in inventory and cane/equivalent equipped. New items needed: Back support (found? crafted?), Craftable canes. New icons needed. (I could help with that) What do you think?
  11. SandyBeaches

    Craftable Portable Lights Mod

    Looks interesting! How long does a battery last?
  12. SandyBeaches

    Multiple Equipped Backpack Mod

    Interesting! I'm currently working on a lua workaround for the system. I'll give yours a look.
  13. SandyBeaches

    Hydrocraft Mod

    Hello again hydro! Been a while since I chirped in. I have just spent a couple of hours trawling the files to find errors. Here is the results of my labour: To save you the trouble, I have attached a zip of the altered files below. Cheers! hydrocraft
  14. SandyBeaches

    Hydrocraft Mod

    I have been thinking, in terms of breeding, a better way to go would be to use the moddable farming mod(?) and make rabbits a 'crop'. That way, you can make them take a while to 'breed' (harvestable) and HAVE NO FLOWERING GROWTH (Harvestable + seeds), instead have it cycle like tomatoes. Also, you can only water them, but seeding can require a number of different items combined into a breeder, eg; 1 female + 1 male + cage = rabbit breeder. Used as seed. Plant rabbit breeders, 1 needed per plot. Need low water requirements (can't leave them entirely outside. Need shelter to prevent excess rainfall) For fertilizer etc just consider that you are also growing food for them. When you 'harvest' you get several generic baby rabbits, governed by farming skill. The plot returns to stage one, newly planted. Raising babies to adults requires feeding them through several stages (can be done in groups) via recipes. This allows easy lua hooks to determine sex, etc.This way, the cage is permanently tied to a plot and can't be recovered. Only allowing babies to be gathered means you must take care of any diseases that occur to the rabbits, and not abandon them too long, or risk losing them. The same can easily be done with other livestock as well.
  15. SandyBeaches

    Hydrocraft Mod

    Heya hydro, I looks like my last post disappeared. I posted the solution and some other bugs a while back before you did the update. To be specific, the problem was caused by: LINE 435 if chance <= bugLvl10 thenThis if has no end. Just place one as line 437 and everything works fine. Other bugs: In Books.txt, line 329 ends with }' instead of }HCPlantScavengeDefinition.lua line # 150, you have the following code causing stack trace. : file: HCPlantScavengeDefinition.lua line # 150local HCMulberryleaf = {};HCMulberryleaf.type = "Hydrocraft.HCMulberryleaf";HCMulberryleaf.minCount = 1;HCMulberryleaf.maxCount = 2;HCMulberryleaf.skill = 3;local HCMulberryleaf = {}; <-!!!!! Just reset it to {}! Should just be HCMulberryHCMulberry.type = "Hydrocraft.HCMulberry"; <-!!!! Trying to write to a table that doesn't exist! Stack trace!HCMulberry.minCount = 2;HCMulberry.maxCount = 5;HCMulberry.skill = 3;Dogwhistle recipe needs to have 'keep Dogwhistle'Many errors in HCLoading.lua. These prevent items from spawning in containers.Need to remove all references of HCFireextinguisherempty and HCFireblanket as they no longer have item definitions.All cardboard boxes and stacks are spelt 'Cardboarbox'. Should be 'Cardboardbox'. Find replace is your friend.Lists HCJarHoney. Item is actually spelt 'HCJarhoney'. Prevents item from spawningline 3163 lists 'Rubberband'. Item is actually spelt 'RubberBand'In Food Flour.txt, line 131 calls for Egg/WildEggs. WildEggs is not an item. HCGooseegg should be listed instead.These are the basic bugs I can think of off the top of my head. I am working on fixing all the cooking stuff though, so I may post that in a couple of days. Hope this helps!