Jump to content

Tchernobill

Member
  • Posts

    94
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. declared fixed in B41.71 - Fixed Coffee / coffee beverage fatigue reduction values not saving on quit / restart.
  2. I did it in AutoLoot (Autodrop.lua), but not linking to Zombie Ids which will be your main problem I guess.
  3. Hi, As you noticed, at the time the IsoDeadCorpse container is created: 1- the visible items (clothes, worn weapons..) are transferred from the "just dead" IsoZombie to the IsoDeadCorpse. 2- the invisible items are created. If you wanna mess with loots that pop up at IsoDeadCorpse time, without using the loot tables, there is a (twisted) way: - Store the IsoZombie identifier when the Zombie Dies. - When a new container is reacheable (OnRefreshInventoryWindowContainers) check it is a Dead corpse, check the associated IsoZombie identifier matches a Zombie newly dead, add your loot.
  4. I use a modded animation. When I start to turn, the turning animation breaks my animation. It is the same with running animation. I would like my animation to remain active until I decide it ends (when I stop it or when it finishes). Is there a way to inhibit all other animation for a time ? Is there a better design/solution to get rid of these cases my animation is interrupted by another animation ? Regards
  5. I made a guide for decompiling with intelliJ https://steamcommunity.com/sharedfiles/filedetails/?id=2748451514
  6. @EnigmaGrey when setting StaticModel, primaryAnimMask and secondaryAnimMask of an item in txt file, the associated item appears in hands. when calling DoParam (or ItemTweaker mod) on the associated scriptitem for those parameters, the associated item does not appear in hands. Is there a way to make this work from lua code for StaticModel, primaryAnimMask and secondaryAnimMask ? Also PlanetAlgol explicited this in the code comments of his last mod: Visible Generators and Corpses. Regards
  7. I have an algorithm that extracts data from the game engine and I wanna synthetise it as an image storing data in RGB and Alpha. I could also store it as text and use an external tool to do the text to image conversion, but this would remove some options. 1/ Snippet From internet I found https://github.com/wyozi/lua-pngencoder that seems to do the job but requires "bit" base library that seems not accessible to my mod. Anyone has any idea how to use "bit" in a pz mod ? Also I intend to produce BIG images and I'm not sure it will do the trick. If it does I am afraid of lua performances. 2/ Ingame tools 2a/ ImageUtils.saveImage This function is based on an ingame Texture type. It only seems to work for creating "png" but I am totally ok with that. One Texture constructor seems promising for use from lua: public Texture(String var1, int[] var2); How can I fill var2 with my RGBA values ? 3/ Any other idea on how to create images ingame is welcome.
  8. Hi, I am looking for the code and ressources related to what happens when we click on the following pvp button. I was surprised it seemed not to be related to: toggleSafety function from GameClient Java Class ISToggleSafetyAction.lua source code Anyone to give me a lead on this ? Regards
  9. this can be normal behavior: stale bacon becomes stale bacon bits and with the right timing stale becomes rotten at the same time. (also bacon bits age faster than most other foods).
  10. When you play Solo, your game loads lua/server and lua/client. When you Host a server, your game loads lua/server and lua/client. When you Join a game Hosted by someone else, your game loads lua/client, but not lua/server. When you Join a dedicated server, your game loads lua/client, but not lua/server. The dedicated server loads lua/server, but not lua/client. (I'm not 100% sure for this one). Obviously lua/shared is loaded by everyone, always.
  11. Here is my interpretation of the condition for the famous "high spear critical chances" as RE from IsoPlayer::pressedAttack(boolean) --spear +30% crit: this = IsoPlayer float var8 = IsoUtils.DistanceTo(var11.x, var11.y, this.x, this.y); this.setVariable("TargetDist", var8); int var9 = this.calculateCritChance(var11); if (var11 instanceof IsoZombie) { IsoZombie var10 = this.getClosestZombieToOtherZombie((IsoZombie)var11); if (!this.attackVars.bAimAtFloor //not aim floor && (double)var8 > 1.25D //target must be further than 1.25 "meters" && var4 == WeaponType.spear //weapon is spear && (var10 == null || (double)IsoUtils.DistanceTo(var11.x, var11.y, var10.x, var10.y) > 1.7D) //closestZombie from targetZombie is further than 1.7 meters from targetZombie ) { if (!GameClient.bClient || this.isLocalPlayer()) { this.setAttackType("overhead"); //go go spear in the head my boy ! } var9 += 30; } } Here is my proposition for correction modification of the decision algorithm : Do not take into account the closest Z to my target. But take into account the closest Z to me that I can detect. float var8 = IsoUtils.DistanceTo(var11.x, var11.y, this.x, this.y); this.setVariable("TargetDist", var8); int var9 = this.calculateCritChance(var11); if (var11 instanceof IsoZombie) { IsoZombie var10 = this.getClosestZombieThatisNotThatZombie((IsoZombie)var11); //get closestZombie to me, that I can detect, except targetZombie if (!this.attackVars.bAimAtFloor //not aim floor && (double)var8 > 1.25D //target is further than 1.25 "meters" && var4 == WeaponType.spear //weapon is spear && (var10 == null || (double)IsoUtils.DistanceTo(this.x, this.y, var10.x, var10.y) > 1.7D) //if that other "closestZombie" is far enough from me I can safely headshot with my spear ) { if (!GameClient.bClient || this.isLocalPlayer()) { this.setAttackType("overhead"); } var9 += 30; } }
  12. Directions Key bindings are correctly labelled for vehicle direction control (being relative to current vehicle direction). But in default case, the game interprets: - forward as top screen direction (NW). - backward as down direction.. aso. I'm sharing here this incredibly important piece of information dicovered after ~ a year since I started playing the game .
  13. Hi, In case this is not intended know that OnMouseMove event is called every "cycle" (first 4 parameters values unchanged): when the mouse is steady on plane surface. when the mouse is on the back optical ray 2 meters up on the roof. when game is not focused (ALT+TAB). (logs are refreshed) when the mouse is on the back optical ray in my eye. it hurts ! But that's just 'cause I'm stupid. Mods used : only a mod to print events. PZ version B41.68 2022-04-11 Windows 10 (But I guess this is unrelated) Mouse: Logitech g403 hero (But I guess this is unrelated) LOG : General , 1649709084772> logMouseEvent OnMouseMove 1820 13 1820 13 nil nil nil nil nil LOG : General , 1649709084789> logMouseEvent OnMouseMove 1820 13 1820 13 nil nil nil nil nil LOG : General , 1649709084806> logMouseEvent OnMouseMove 1820 13 1820 13 nil nil nil nil nil LOG : General , 1649709084822> logMouseEvent OnMouseMove 1820 13 1820 13 nil nil nil nil nil
  14. This is the base value for radius computation. Below is a reverse engineering of current java code for IsoGameCharacter function. You can reverse engineer it yourself following this guide. (once you done it the first time it takes one click and some waiting minutes to reverse engineer each new version) public void DoFootstepSound(float var1) { IsoPlayer var2 = (IsoPlayer)Type.tryCastTo(this, IsoPlayer.class); if (GameClient.bClient && var2 != null && var2.networkAI != null) { var2.networkAI.footstepSoundRadius = 0; } if (var2 == null || !var2.isGhostMode() || DebugOptions.instance.Character.Debug.PlaySoundWhenInvisible.getValue()) { if (this.getCurrentSquare() != null) { if (!(var1 <= 0.0F)) { float var3 = var1; var1 *= 1.4F; if (this.Traits.Graceful.isSet()) { var1 *= 0.6F; } if (this.Traits.Clumsy.isSet()) { var1 *= 1.2F; } if (this.getWornItem("Shoes") == null) { var1 *= 0.5F; } var1 *= this.getLightfootMod(); var1 *= 2.0F - this.getNimbleMod(); if (this.bSneaking) { var1 *= this.getSneakSpotMod(); } if (var1 > 0.0F) { this.emitter.playFootsteps("HumanFootstepsCombined", var3); if (var2 != null && var2.isGhostMode()) { return; } int var4 = (int)Math.ceil((double)(var1 * 10.0F)); if (this.bSneaking) { var4 = Math.max(1, var4); } if (this.getCurrentSquare().getRoom() != null) { var4 = (int)((float)var4 * 0.5F); } int var5 = 2; if (this.bSneaking) { var5 = Math.min(12, 4 + this.getPerkLevel(PerkFactory.Perks.Lightfoot)); } if (GameClient.bClient && var2 != null && var2.networkAI != null) { var2.networkAI.footstepSoundRadius = (byte)var4; } if (Rand.Next(var5) == 0) { WorldSoundManager.instance.addSound(this, (int)this.getX(), (int)this.getY(), (int)this.getZ(), var4, var4, false, 0.0F, 1.0F, false, false, false); } } } } } }
  15. Also you can throw your baby to attract Zs one way and run the other..
×
×
  • Create New...