Jump to content

Dr_Cox1911

Member
  • Posts

    814
  • Joined

Posts posted by Dr_Cox1911

  1. You should have a round button at the left side (where the heart-symbol is) which has "client" writte on it. Click on it and you will see a small panel with a few buttons for various client settings you can alter. In there you will find the factions button.

     

     

    Client-Button.png

  2. I'm currently handling the Steam workshop version, but if Fenris wants someone else to take it over I'm more than willing to give it to someone.

     

    If not: @Fenris_Wolf: Should I update to the new version? Back in the day we agreed that you will poke me if I should update the version.

  3. 1 hour ago, vek said:

    [...]
    The first screenshot with a bunch of toilet paper reminded me that I still find one or two buildings in almost every created world, where all the shelves, cabinets, refrigerators and first aid kits are filled with toilet paper. Tons of toilet paper.
    If it's not done on purpose, maybe it's worth fixing it?

    That's done on purpose, just look back almost a year where tooilet paper was horded like crazy. So TIS did this as a little easer egg.

  4. @leon2356I quickly skimmed through the sourcecode and found a couple of mentions of Axeman.

    Don't know if these are all of them though:

    IsoGameCharacter.class

    protected float calculateCombatSpeed() {
        float f = 1.0F;
        HandWeapon handWeapon = null;
        if (getPrimaryHandItem() != null && getPrimaryHandItem() instanceof HandWeapon) {
          handWeapon = (HandWeapon)getPrimaryHandItem();
          f *= ((HandWeapon)getPrimaryHandItem()).getBaseSpeed();
        } 
        WeaponType weaponType = WeaponType.getWeaponType(this);
        if (handWeapon != null && handWeapon.isTwoHandWeapon() && getSecondaryHandItem() != handWeapon)
          f *= 0.77F; 
        if (handWeapon != null && this.Traits.Axeman.isSet() && handWeapon.getCategories().contains("Axe"))
          f *= getChopTreeSpeed(); 
        f -= getMoodles().getMoodleLevel(MoodleType.Endurance) * 0.07F;
        f -= getMoodles().getMoodleLevel(MoodleType.HeavyLoad) * 0.07F;
        f += getWeaponLevel() * 0.03F;
        f += getPerkLevel(PerkFactory.Perks.Fitness) * 0.02F;
        f *= Rand.Next(1.1F, 1.2F);
        f *= this.combatSpeedModifier;
        f *= getArmsInjurySpeedModifier();
        if (getBodyDamage() != null && getBodyDamage().getThermoregulator() != null)
          f *= getBodyDamage().getThermoregulator().getCombatModifier(); 
        f = Math.min(1.6F, f);
        f = Math.max(0.8F, f);
        if (handWeapon != null && handWeapon.isTwoHandWeapon() && weaponType.type.equalsIgnoreCase("heavy"))
          f *= 1.2F; 
        return f * GameTime.getAnimSpeedFix();
      }
    
    public float getChopTreeSpeed() {
        return (this.Traits.Axeman.isSet() ? 1.25F : 1.0F) * GameTime.getAnimSpeedFix();
      }

    HandWeapon.class

    public float getSpeedMod(IsoGameCharacter paramIsoGameCharacter) {
        if (this.ScriptItem.Categories.contains("Blunt")) {
          int i = paramIsoGameCharacter.getPerkLevel(PerkFactory.Perks.Blunt);
          if (i >= 10)
            return 0.65F; 
          if (i >= 9)
            return 0.68F; 
          if (i >= 8)
            return 0.71F; 
          if (i >= 7)
            return 0.74F; 
          if (i >= 6)
            return 0.77F; 
          if (i >= 5)
            return 0.8F; 
          if (i >= 4)
            return 0.83F; 
          if (i >= 3)
            return 0.86F; 
          if (i >= 2)
            return 0.9F; 
          if (i >= 1)
            return 0.95F; 
        } 
        if (this.ScriptItem.Categories.contains("Axe")) {
          int i = paramIsoGameCharacter.getPerkLevel(PerkFactory.Perks.Axe);
          float f = 1.0F;
          if (paramIsoGameCharacter.Traits.Axeman.isSet())
            f = 0.95F; 
          if (i >= 10)
            return 0.65F * f; 
          if (i >= 9)
            return 0.68F * f; 
          if (i >= 8)
            return 0.71F * f; 
          if (i >= 7)
            return 0.74F * f; 
          if (i >= 6)
            return 0.77F * f; 
          if (i >= 5)
            return 0.8F * f; 
          if (i >= 4)
            return 0.83F * f; 
          if (i >= 3)
            return 0.86F * f; 
          if (i >= 2)
            return 0.9F * f; 
          if (i >= 1)
            return 0.95F * f; 
          return 1.0F * f;
        } 
        if (this.ScriptItem.Categories.contains("Spear")) {
          int i = paramIsoGameCharacter.getPerkLevel(PerkFactory.Perks.Spear);
          if (i >= 10)
            return 0.65F; 
          if (i >= 9)
            return 0.68F; 
          if (i >= 8)
            return 0.71F; 
          if (i >= 7)
            return 0.74F; 
          if (i >= 6)
            return 0.77F; 
          if (i >= 5)
            return 0.8F; 
          if (i >= 4)
            return 0.83F; 
          if (i >= 3)
            return 0.86F; 
          if (i >= 2)
            return 0.9F; 
          if (i >= 1)
            return 0.95F; 
        } 
        return 1.0F;
      }

    IsoTree

    public void WeaponHit(IsoGameCharacter paramIsoGameCharacter, HandWeapon paramHandWeapon) {
        int i = paramHandWeapon.getConditionLowerChance() * 2 + paramIsoGameCharacter.getMaintenanceMod();
        if (!paramHandWeapon.getCategories().contains("Axe"))
          i = paramHandWeapon.getConditionLowerChance() / 2 + paramIsoGameCharacter.getMaintenanceMod(); 
        if (Rand.NextBool(i))
          paramHandWeapon.setCondition(paramHandWeapon.getCondition() - 1); 
        paramIsoGameCharacter.getEmitter().playSound("ChopTree");
        WorldSoundManager.instance.addSound(null, this.square.getX(), this.square.getY(), this.square.getZ(), 20, 20, true, 4.0F, 15.0F);
        setRenderEffect(RenderEffectType.Hit_Tree_Shudder, true);
        float f = paramHandWeapon.getTreeDamage();
        if (paramIsoGameCharacter.Traits.Axeman.isSet() && paramHandWeapon.getCategories().contains("Axe"))
          f *= 1.5F; 
        this.damage = (int)(this.damage - f);
        if (this.damage <= 0) {
          this.square.transmitRemoveItemFromSquare(this);
          paramIsoGameCharacter.getEmitter().playSound("FallingTree");
          this.square.RecalcAllWithNeighbours(true);
          int j = this.LogYield;
          byte b;
          for (b = 0; b < j; b++) {
            this.square.AddWorldInventoryItem("Base.Log", 0.0F, 0.0F, 0.0F);
            if (Rand.Next(4) == 0)
              this.square.AddWorldInventoryItem("Base.TreeBranch", 0.0F, 0.0F, 0.0F); 
            if (Rand.Next(4) == 0)
              this.square.AddWorldInventoryItem("Base.Twigs", 0.0F, 0.0F, 0.0F); 
          } 
          reset();
          CellLoader.isoTreeCache.add(this);
          for (b = 0; b < IsoPlayer.numPlayers; ) {
            LosUtil.cachecleared[b] = true;
            b++;
          } 
          IsoGridSquare.setRecalcLightTime(-1);
          GameTime.instance.lightSourceUpdate = 100.0F;
          LuaEventManager.triggerEvent("OnContainerUpdate");
        } 
        LuaEventManager.triggerEvent("OnWeaponHitTree", paramIsoGameCharacter, paramHandWeapon);
      }

    I guess those things you would have to mimic in Lua if a baseballbat is equipped and the character wielding it has your trait.

  5. Greetings Tangos!

     

    First things first: I've absolutely no knowledge about 3D-models in PZ, but I know a few basic things about modding in PZ (or at least where I can look for info 😁)

    In order to start modding PZ you should start with the basics, that is script-files for items and Lua for pretty much everything else.

    @Fenris_Wolfcreated an awesome beginners guide on github, after you have worked your way through this you should have some basic knowledge.

     

    The next crucial thing in my opinion is getting familiar with the base Lua files and the Java classes PZ ships with.

    For the Lua files you will simply need a texteditor to look at, but for the Java classes you will need something to decompile them. Other modders (me included) use JD-GUI for this.

     

    Next steps are: look at other mods that do similiar things that you want to achieve. There are so many awesome mods out there with good written code to look at. These will help you get started.

     

    That are for me the first steps to start modding in PZ. The other modders are very friendly and all chip in to help a fellow modder in need, so don't despair and either use the forum here or go to the official PZ Discord and participate in the modding-channel.

  6. I did previously start something similiar myself. Are your mod options synced to clients as well?

     

    I previously wanted a way to let admins change some mod settings right through the game, so my framework consisted of a hookable UI that a mod can add a page to. These settings would then be transfered to the server and propagated to all clients.

     

    I never really got it done 100%.

  7. I'm really eager to try the new menu style, before I play it I can't really tell which control scheme I like more, but this seems pretty sleek. MP news is good as always👍

  8. Greetings ToastyPancakes,

     

    as syfy already said we need more info regarding the server. Could you provide the following info:

    • Server hardware
    • Server "type" (V-Server, root, on your gaming machine, ...)
    • Server internet connection
    • Player count
    • RAM addressed to the PZ-server itself

     

    That's all I can think of from the top of my head right now. After you posted this info we might see the culprit and can point you in the right direction.

  9. Only thing that I see missing in your list is maybe something like "Framework". I think about something like @Fenris_WolfProfession Framework.

    I know that there aren't that many mods that would fit in this category, but maybe it's something to consider?

     

    Otherwise your list seems pretty complete and I can't think of anything else.

  10. Those new lived in details looks so good, can't wait to find all these little things.

    The MP progress seems like we get a sleek system lying underneath, take your time TIS.

  11. MP-progress is looking good! I've got a few questions regarding the zombie update settings interface though. What exactly do these values mean? Especially T1, I have no clue what that means.

  12. @WATTOThose are the perks for the current stable build 40.43:

    Quote

        None(0),
        Agility(1),
        Cooking(2),
        Melee(3),
        Crafting(4),
        Fitness(5),
        Strength(6),
        Blunt(7),
        Axe(8),
        Sprinting(9),
        Lightfoot(10),
        Nimble(11),
        Sneak(12),
        Woodwork(13),
        Aiming(14),
        Reloading(15),
        Farming(16),
        Survivalist(17),
        Fishing(18),
        Trapping(19),
        Passiv(20),
        Firearm(21),
        PlantScavenging(22),
        BluntParent(23),
        BladeParent(24),
        BluntGuard(25),
        BladeGuard(26),
        BluntMaintenance(27),
        BladeMaintenance(28),
        Doctor(29),
        Electricity(30),
        Blacksmith(31),
        MetalWelding(32),
        Melting(33),
        Mechanics(34),
        MAX(35);

     

  13. The following is not really a solution to your problem, but might point you in the right direction.

     

    The event "OnHitZombie" is called like this in IsoZombie.class:

     LuaEventManager.triggerEvent("OnHitZombie", this, paramIsoGameCharacter, bodyPartType, paramHandWeapon); 

    So I guess your parameters in your function "CombatOnHitZombie" are wrong.

     

    I quickly printed the Event hook to this event, the output is this:

    LOG  : General, 1586779565623> -- SHARED: OnHitZombie(zombie.characters.IsoZombie@2e627dd, zombie.characters.IsoPlayer@427590b4, Head, zombie.inventory.types.HandWeapon@1a4a79f9)
    LOG  : General, 1586779565623> --
    LOG  : General, 1586779565623> --
    LOG  : General, 1586779565623> --------------------------------------
    LOG  : General, 1586779565623> -- CLIENT: OnHitZombie(zombie.characters.IsoZombie@2e627dd, zombie.characters.IsoPlayer@427590b4, Head, zombie.inventory.types.HandWeapon@1a4a79f9)
    LOG  : General, 1586779565623> --
    LOG  : General, 1586779565623> --
    LOG  : General, 1586779565623> --------------------------------------
    LOG  : General, 1586779565623> -- SERVER: OnHitZombie(zombie.characters.IsoZombie@2e627dd, zombie.characters.IsoPlayer@427590b4, Head, zombie.inventory.types.HandWeapon@1a4a79f9)
    LOG  : General, 1586779565623> --
    LOG  : General, 1586779565623> --

    If I did everything right (sorry, kinda rusted regarding PZ modding) you can see that the event is fired from every "game-type" and has the arguments passed to the registered function "IsoZombie zombieThatWasHit, IsoPlayer playerThatHitTheZombie, BodyPartType bodyPartThatWasHit, HandWeapon weaponThatHitTheZombie"

     

    Hope this helps you.

     

×
×
  • Create New...