#mod_development
1 messages ยท Page 437 of 1
i'm just saying
Yes, of course, we were carrying a 1,000 baseball bat the entire time. Thank you for that clarification lmao
my whole 100000 pounds worth of gear comment was a example
Not a very helpful example~
either way
considering we are able to carry how many shotguns or bullets in a military bag without any repercussions a mod that changes those values won't be needed
and besides strength does more than allow you to carry more
not shooting the idea down
just mentioning
The amount of Shotguns carried in someone's military bag is of no concern. The carry weight for a nigh zero strength character matches up to, what. 10 points?
By the time that character reaches Max Strength, the increase in carry weight capability should be increased exponentially, not linearly
i mean, you have to make sure it's not OP
max strength giving you over 100 carry capacity on your inventory alone is very OP
you could carry 2 generators on your person with no problems for example
another thing is this whole inventory system is temporary
they will be overhauling it at some point
Two Generators? No. One Generator? Possibly.
you cannot carry one generator in your inventory without problems
that is unrealistic
and OP
40 points. Assuming that a single point roughly equates to a kilogram, carrying an 80 lb. generator is doable for someone physically capable.
Not in a backpack mind you lol
But that's more of a space issue rather than a weight issue
that would still be very OP
being able to carry a generator like it's a fucking watch should never be a thing
it's like suppressors
It would change the meta, without a doubt. But don't say for one second that it's unrealistic lol. We bench and bicep curl dumbbells at the 50 lb. range.
once the overhaul comes along than we will actually HAVE pockets
either way
Generators are supposed to be one of those things where it is needed but you cannot carry it without trouble
if you could just lug a generator around without problems whats the point in actually worrying about generators?
"it's all good i've been carrying this bad boy right here for 15 days!"
Oh, there'd be plenty of reason to worry about it. If you were playing a physically incapable character.
Hence the reason to tie it directly to a character's strength Stat. As getting Strength to max by normal means takes literal in game years.
which makes the game fair
So yes. If someone was willing to invest the time, effort, and food necessary to get their character up to a Max-Strength, Walking Bicep? By all means, they earned the right to haul a mear 40 kilo chunk around lol
Precisely.
being able to almost instantly max out your strength would make the game to easy or to boring
i meant not fair
I completely agree. And that is not the mod proposition that I'm pitching here lol.
I want more meaning and impact from the time it takes to get strength to Max.
there is
Because as of now? with the amount of time it takes to get strength to max? It doesn't feel worth it.
you will basically one hit any zombie with any melee weapon
My dude loses health from carrying around 40 lbs of equipment
strength isn't just carryweight
No shit. But it's wasted on carryweight, and endurance
no it's not
anything involving endurance is done by the other major skill
strength is focused on damage and weight
maxed out strength literally lets you one hit ANY zombie with any weapon 100% of the time
And the supposed 2-year running character, with Maxed-Out strength Stats, is slowly dying from hauling 40 lbs. of equipment lol
Deadass? How the fuck is my health bar getting down to the 40% range then?
Is it a mod?
no
max amount of overweight (somewhere around 50-60 iirc) brings your health all the way down to 40% max
I gotta test that a bit more.
Aight, if it's just a reduced max health , I can deal with that.
Still tho. It feels weird knowing my PZ Character is weaker than I am
i had the max amount of carryweight and sped time up for a month, of course occasionally eating and drinking
my health never dropped below 40%
That might do, shoot, 'll try it out
do remember that the main inventory is not meant to be in your hands
your not lifting 50 boxes of bullets in one hand
I'm just focusing on the aspect of weight here lol. The concept of "space" in the inventory system for this game is a whole other concept on its own
as i said once the inventory overhaul happens it will make a lot more sense
๐
@willow estuary When I want to load my mod here is the java error I get :
java.lang.IllegalStateException: couldn't find "media/lua/shared/Asilar_functions.lua"
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:964)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:904)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:1000)
at zombie.core.Core.ResetLua(Core.java:3757)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:61)
at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:199)
at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:189)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:186)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1009)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:167)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1922)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1747)
at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:77)
at zombie.ui.UIElement.onMouseUp(UIElement.java:995)
at zombie.ui.UIElement.onMouseUp(UIElement.java:957)
at zombie.ui.UIElement.onMouseUp(UIElement.java:957)
at zombie.ui.UIManager.update(UIManager.java:1159)
at zombie.GameWindow.logic(GameWindow.java:630)
at zombie.GameWindow.run(GameWindow.java:1315)
at zombie.GameWindow.maina(GameWindow.java:1091)
at zombie.gameStates.MainScreenState.main(MainScreenState.java:184)
๐คทโโ๏ธ
That's a weirdo error, but sometimes PZ just doesn't load files. Fenris confirmed that it happens sometimes to me.
Try making a duplicate version of that file, with a slightly different name, and put it in client.
lol
you know what
it was just a f'ing case sensitive folder name ๐
I had my Shared folder named "Shared" instead of "shared" ๐
@left lintel you can start out with maximum strength
Ahahah, yeah, code gets fussy that way. Glad you sorted it out.
Ok
@abstract raptor The one you pulled from the server
so I have my recipes working, but when I craft my Call The Helicopter recipe, it does nothing. Here is what I did :
in /scripts/Test_recipes.txt I have my recipe :
recipe Call the Helicopter
{ HCRoadflare,
onCreate:CalltheCopter_onCreate,
Result:HCRoadflareon,
Time:60,
NeedToBeLearn:false,
Category:Metalurgy,
}
and in my /lua/shared/Asilar_functions.lua I have the function :
function CalltheCopter_onCreate (
testHelicopter
)
function CalltheCopter_onCreate ()
testHelicopter
end
should have 4 arguments
maybe it's that way to write the function ?
huh?
my function onCreate should have 4 arguments ?
like that :
function CalltheCopter_onCreate (items, result, player, selectedItem)
testHelicopter(),
end
remove the coma after test helicopter but yes
@dense vale Max Strength ?? Or High Strength?
the only means of starting with Max Strength that I know of are if you slap on all the Negative traits you can muster to balance it out
@valid stump and my recipe still be :
recipe Call the Helicopter
{ HCRoadflare,
onCreate:CalltheCopter_onCreate,
Result:HCRoadflareon,
Time:60,
NeedToBeLearn:false,
Category:Metalurgy,
}
or I need to feed the arguments with stuff ?
@willow estuary I have the recipe working, but the Helicopter event isn't started when I craft it.
is it possible the event doesn't start if there is no zombie on my map ?
Sorry to spam, but thanks to another modder, we managed to progress a lot : we got the OnCreate function called right, and we got to trigger testHelicopter() meta-event when the item is crafter. Now we face another problem. We found that the helicopter function (Helicopter.class) have a .setPlayer function, so we managed to use that instead of testHelicopter() to trigger the event. But calling the Helicopter function isn't calling the testHelicopter one. We want to find the code of testHelicopter to duplicate it and adapt it, but the only occurence of testHelicopter we found is in LuaManager.class, and it's only this little line :
public static void testHelicopter() {
IsoWorld.instance.helicopter.pickRandomTarget();
}```
We don't find the complete testHelicopter() function. Anyone can help us ?
Well the way I see it is that you are looking at the code of the debug mode when it comes to the helicopter. When you summon the helicopter it starts that function above. When you click to end the helicopter event, it runs the function right below it, which ends it.
This function, stated above, all it does is link back to the main Helicopter.class file. Same thing with the "endHelicopter" function.
When the testHelicopter function is run, upon the line "IsoWorld.instance.helicopter.pickRandomTarget();" - it links to the "pickRandomTarget();" function in the helicopter.class file which is the function that activates the helicopter.
Function order -> pickRandomTarget() -> Set Target( ) [Helicopter is now activated] - >Sets state to Arriving etc etc
Dude was abusing other modders in the workshop comments and copped a ban.
@willow estuary
darn, i really liked the mod :/
so they were abusing other modders, like saying mean stuff?
@drifting ore What type of models? Cars, weapons or something else?
@ember orchid it's a headwear
@topaz pendant Late reply but yeah, for several months they've been toxic in other modder's comments, even insulted Blair in his comments a while back. This person even made a discussion thread and in that thread tried to get the devs to remove necroforge because it was "cheating", eventually he got banned permanently, nasko was about to reduce the ban but Hardcore was being toxic in the appeals so he kept it, Hardcore decided to pull his mod off workshop cause he couldn't update it anymore since he had a permanent pz community hub ban.
I mean, to be fair, I just though he was another one of those "wacky characters"(to err on the side of being lovely) when he was antagonizing me, but he was also unnecessarily mean in his comments on workshop pages for new modder's first mods. So that's a real bummer in that I can imagine some poor kid seeing that on their page and feeling really discouraged?
I wonder if he was going for some sorta "wrestling heel" persona thing, in which he was acting that way in order to "raise his profile" and make an impact as a hotshot big deal modder? Some sorta misguided attempt at being king of the hill?
Hi, can I mod my existing server with Hydrocraft or do I need to create a new one for the mod items to spawn in game?
I wonder if he was going for some sorta "wrestling heel" persona thing, in which he was acting that way in order to "raise his profile" and make an impact as a hotshot big deal modder? Some sorta misguided attempt at being king of the hill?
@willow estuary
I can get the idea behind doing something like this but it just fucking sucks and makes you look like an asshole no one wants to be around.
Yeah, not a good idea, but it makes sense with a name like "Mr Hardcore"" and how his profile pic was really angry looking too?
I dunno, but I do know that humans are the zaniest creatures.
they reminds me of a Modder on the rimworld workshop who would harass people when they mention bugs or suggest things >.>
@willow estuary His profile picture is literally a zombie Queen's Guard from the game Zombi.
wasn t it called Zumbi?
No, ZombiU for the WiiU, Zombi for the release to PC and consoles.
also that was an nice zombie game
first survival horror game i heard of and played
atleast my mind thinks so
@willow estuary His profile picture is literally a zombie Queen's Guard from the game Zombi.
@stone tapir Yeah, I saw that recently and was all "damg, I dunno if I'd ever enjoy this game having Mr Hardcore yelling at me on it" ๐
Zombi was pretty cool
probably because I got it for free
it was cool because you could kill a zombified version of you
or other players zombie
Well the way I see it is that you are looking at the code of the debug mode when it comes to the helicopter. When you summon the helicopter it starts that function above. When you click to end the helicopter event, it runs the function right below it, which ends it.
This function, stated above, all it does is link back to the main Helicopter.class file. Same thing with the "endHelicopter" function.
When the testHelicopter function is run, upon the line "IsoWorld.instance.helicopter.pickRandomTarget();" - it links to the "pickRandomTarget();" function in the helicopter.class file which is the function that activates the helicopter.
Function order -> pickRandomTarget() -> Set Target( ) [Helicopter is now activated] - >Sets state to Arriving etc etc
@late hound So when we use the IsoWorld.instance.helicopter.setTarget(player:getInstance), then it doesn't run throught all the Helicopter function, but only this "sub" function. So to solve the problem, we would need to find a way to run the helicopter function, but excluding the pickRandomTarget() step ?
Is it viable to translate the whole helicopter function in lua functions and call it from lua ?
I don't know enough lua to know if it is viable to do it
all you can do with modding is launch the helicopter event and end it.
it has been established multiple times by multiple modders that anything else you are locked out of.
There is always a way around it if you know/understand the modding system
Might take some round about work but if you put your mind to it you could
setTarget should be enough
i mean testHelicopter should work
testHelicopter do all that pickrandom and set target thing
and you can change target by IsoWorld.instance.helicopter.setTarget(IsoGameCharacter);
you can use IsoPlayer as IsoGameCharacter
@late hound if you need help send me dm i can help
as long as i have free time
@pastel olive Thanks for the tip. But if I get it right, when you run testHelicopter, it triggers all the subfunctions of helicopter() in the order pickrandomtarget > settarget > update > end. If you use the IsoWorld.instance.helicopter.XXXX it will just run the subfunction and then exit. What I would try to do, is a function that is running all the subfunctions of helicopter() but starting at settarget instead of pickrandomtarget ๐
yes
just using settarget actually starts the helicopter
pickrandom just select one player from all player
then sends to settarget
settarget starts event
Ok I got it : this.state = State.Arriving; this.bActive = true;
But, where the update() subfunction is called then ?
i think engine handles
you dont need to update i think
because if you check youll see lot of update functions
in player code too
probably game engine checks all update functions
and as you see first line of update function checks this.bActive
public void update() {
boolean bool;
if (!this.bActive)
return;
as you see
ok
I tried with :
IsoWorld.instance.helicopter.setTarget(IsoGameCharacter);
And I get this error in console when the function is called : 1604085135759 1604085135759 ----------------------------------------- 1604085135759 STACK TRACE 1604085135759 ----------------------------------------- 1604085135759 function: onCreateCalltheCopter -- file: Asilar_functions.lua line # 7 1604085135759 Callframe at: PerformMakeItem 1604085135759 function: perform -- file: ISCraftAction.lua line # 44
change IsoGameCharacter
to your player
object
its class name i just write for example
so would be IsoWorld.instance.helicopter.setTarget(player:getPlayer);
i tihnk there is a code like
getPlayerby(
or
what was that
you can get players by id like that
otherwise it depends where you make
I run the function with a onCreate in a recipe
so you should get player
i think
yes you can
- argument is player
items, result, player
like this
but im not sure player is id or object
print("Call function entered")
IsoWorld.instance.helicopter.setTarget(IsoGameCharacter);
end```
change IsoGameCharacter to player
ok
or
if it still giving error
try this
getSpecificPlayer(player)
it pulls player object from player id
so you should add : local player=getSpecificPlayer(player)
no the player gets passed to the function by the client/server
is it id or object
object
let me look into that
but it should be
Not on create
ok
With the :
IsoWorld.instance.helicopter.setTarget(player)
It returns the error :
1604085612268 -----------------------------------------
1604085612268 STACK TRACE
1604085612268 -----------------------------------------
1604085612268 function: onCreateCalltheCopter -- file: Asilar_functions.lua line # 7
1604085612268 Callframe at: PerformMakeItem
1604085612268 function: perform -- file: ISCraftAction.lua line # 44```
well that error is not helpfull
yup ๐ฆ
let mee see wait
looks like helicopter is not defined
just gives nil
cant access from lua maybe
but why we could access some of the java functions (like getXXXX() ) and not others ?
actually i dont know
but from lua i cant access isoworld.helicopter
but luamanager can access with testHelicopter()
I tried IsoWorld.instance.helicopter.pickRandomTarget(); but I get the same error...
so the only way to access helicopter would be with luamanager, but as it's a .class, we cannot modify it. Anyone already tried to build a personal .class file and tried to use it/load it?
i think we cant acess isoworld
or we are using the wrong aproach
i couldnt find a way
Thanks for your help anyway ๐ I guess I gonna stick with testHelicopter then ๐
Another question : can we call 2 OnCreate in the same recipe ? If not, what kind of workaround I can find ? merging both functions in the same one ?
Ok thanks :)
Then I'm looking for a wait feature in a function. For example, I call the helicopter with testHelicopter (because it works, even if it will not go on the right character), and then wait for some time, and then continue to run the function (calling luautils.okModal for instance). Or even better, do you think we can "listen" to the console and detect when the testHelicopter function change state from arriving to hovering ?
function a(a,b,c)
end
function b(a,b,c)
a(a,b,c)
end
you can use like this
i dont think we can change states
looks like we cant access helicopter class
of course there is a possibilty that i dont know how to do
i dont have experience in pz modding
just java and lua
I don't want to change states, but to detect when the states changes ๐
ok
I got a new idea : what if we rewrite the whole helicopter function in lua and call this one instead of the java one ?
yeah could work
code is already available
you just need to convert to lua
which is not hard
do you agree that the helicopter function "just" triggers sound and doesn't trigger anything else, and it's the game itself that make the sound attracting zombies and so ?
yeah it just sound
attracting zombies done automaticly
}
if (Rand.Next(Rand.AdjustForFramerate(300)) == 0)
WorldSoundManager.instance.addSound(null, (int)this.x, (int)this.y, 0, 500, 500);
float f2 = this.move.x * GameTime.getInstance().getMultiplier() / 1.6F;
float f3 = this.move.y * GameTime.getInstance().getMultiplier() / 1.6F;
if (this.state != State.Leaving && IsoUtils.DistanceToSquared(this.x + f2, this.y + f3, this.targetX, this.targetY) > IsoUtils.DistanceToSquared(this.x, this.y, this.targetX, this.targetY)) {
this.x = this.targetX;
this.y = this.targetY;
} else {
this.x += f2;
this.y += f3;
}
this is the code for sound
WorldSoundManager.instance.addSound(null, (int)this.x, (int)this.y, 0, 500, 500);
as you see
ok, but, if we rewrite the helicopter function, as there are other java calls in it, we would hit the same brickwall right ?
would you agree to try with me (and if so maybe we should continue with PM instead of flooding here) ?
What are the min & max values of Radius & Volume for the addSound command ? I am looking for a scale to be able to ajust my command. How far is 200 radius ? How strong is 100 volume ? That's what I mean by min & max values ๐
just wanna see how many straps can fit in one character :V
2 references ๐ค guess thats enough
hey big question, but as a temp mod could someone mod in Hypochondriac back into the game? maybe with a fix so it doesn't kill people no matter what? it's so low on the devs priority list that i doubt it will ever come back in my lifetime. and i really miss double guessing every scratch/infection i got
@severe ridge fucker using HL1 Mp5
yeah
which can actually kill you easily xD
indeed
you used to be able to survive if you managed yourself during the fake infection
but after B41 it was killing people no matter what
it just did to much damage for too long
adn would appear even for scratches easily
all they would of had to do was decrease the damage overtime and time of infection
instead as per usual they where lazy and just said "fuck it remove it until we get off our asses and fix it"
i dont know, theres a global multiplier for that, im not smart to mess with that lol
we had so many traits removed and added xD dont worry
i only know of hypo being removed
there was free points just to be a angry person
and NasKo agrees with me about how fucking POG Hypo was
he also wants it back
because it was the ONLY way people would actually keep a character going when they got the paranoid moodlet after getting a scratch
Short Tempered Negative Patient +4 "Quick to anger." Jumps from not angry to Furious when npc rejects team request.
hahahahhahaha
YOU WHAT?!
Light Drinker Negative Hardened Drinker +2 "Gets drunk quickly" Gets utterly shit-faced moodle when having one drink of any sort of alcohol.

i started playing during the mid age of B40
Brooding Negative - +2 "Recovers slower from bad moods."
< this was hungover lmao
kind like a nerf for staying indoors for too long
i've been around for too long i guess lmao
lol
minecraft was something ive discovered with TF2
pz was something ive discovered with minecraft lmao
What happened to paw low loot mod?
@lyric drum Apparently Paw took it down because he was receiving lots of harassment from people on steam about it.
๐
@lyric drum Apparently Paw took it down because he was receiving lots of harassment from people on steam about it.
@stone tapir he should have replied "Have a good day!" to them
๐ ๐
With alibuyuktatli we managed to create a fake helicopter function. What it does is : when you call the function, it simulate an Helicopter by calling the sound, faking arrival/hovering/leaving with incremental/decremental sound volume, and using addSound command to call the zombies around. Here is a video demo of the function, and the lua code right after. For example, if you call this function in a OnCreate function in a recipe, the crafting of the recipe will call this fake Helicopter on the player who crafted the recipe (and not at a random player location). This will also be posted on the forums. We share the code for the coders community, feel free to use ! All credits of the code to alibuyuktatli !
https://drive.google.com/file/d/1dwrieE7Archble93cpB--_8zS1JC-JT6/view?usp=sharing
just wanna see how many straps can fit in one character :V
@severe ridge that hair looks great, did you make it?
indeed xD it looks terrible without hat but i made it for hats, later on ill make my own hair grouping for hats
wont be focusing on hairs tho :B
i do tactical gear -v-
Would it be difficult to mod in custom ambience and music into the game? Also could I do it for my own private server so my friends could hear them as well?
doing custom models is a pleasant experience right now, but not really :V
Know anywhere I could get some more info on that mr spliff? Seems like I would just have to make sure the sounds I want are OGG files and that I rename them properly to where I want them.
you can replace soundtracks, menu tracks and such but ive never done myself :/
you just need the right addresses
Well thank you Spliffo I appreciate your imput!
I was just thining "Is there anybody out there" by pink floyd would make for great theme to this game xD
don't share music like that in mods xD pretty sure you can use yourself tho (if you dont stream etc)
Yeah that would just be for personal enjoyment
I am doing custom music for my christmas mod. ๐
Its all got to be royalty/copyright free music if you want to upload it
Understandably so! Would it be a big deal if I did it for a private server among a small handful of friends so long as no one is streaming?
morphed by bewbs RJ face
f r i e n d l i e s i n c h e r n o?
rj shirts on females kind of make him look like a troglodyte
we're all a little troglodyte under bewbs u.u
The only way to have a recipe produce more than 1 item is a OnCreate function with addItem in it ? Or there is a syntax to add multiple Result: ? I know you can have something like Result:Nails = 20, but what I would is more like Result:Item1+Item2
@violet shell oncreate only way
ok thanks ๐
Does someone knows stuff about Radio/Television and channels ? I red the WordZed documentation, and there is still 1 or 2 things I don't know how to do. First, there are several different types : Radio, Television, Military, Emergency, Amateur, Bandit. I understood that some radios can have a preset channel in it depending of it's type. But when you look at the radio/television tiles and item definitions : in the .tiles you can only define your object as "Radio" or "Television". And in the Item description (in /scripts/items_radio.txt of base game), the only argument that differs is "IsHighTier=TRUE or FALSE" (and also frequencies delta). I don't know what this argument IsHighTier defines. Is it for Military only, or Emergency too ? I think Radio = can include Radio channels, Military = can include Military channels. Amateur, I don't if it's for HAM items (which are defined in items_radio.txt) or Makeshifts items. Maybe both ? Maybe none ? My aim is to create a radio channel that broadcast a specific message. And I would like that an item I created have it on preset. Is it doable or am I going too far ?
Anyone know of a means of spawning in a Modded Vehicle? Cheat Menu features all of the Vanilla Cars, plus those added by Filibuster's Used Car Mod.
Same goes for a Modded APC.
But I'm trying to spawn in a damn sexy-ass Mustang, but I can't find the thang anywhere
has anyone worked with ninja ripper? thought to pull char model, but the program only creates log file
Is there a way how to change textures on car through debug menu? I want to test bloody textures on one of my vehicles, but I dont want to fly around the map till I find one ๐
I know with the cheat mod you can change the rust levels
But not sure if there's an option for blood. Unless you wanna spawn in a car and run a couple hundred zombies over.
@lapis blade There is a menu Blood Levels: right click on vehicle
I got that one too
I know
Not working?
It must be the one and same texture for mask and hvy am I right?
You put in overlay?
walda, dont forget to add the multiUV definition at the top of the script when loading the model.
without multiUV, it doesnt load the damage map.
Something is not right
Well, the textures almost loaded in, one car was covered in blood halfly. Then I changed that shader to multiuv and the textures were flashing on a car along with the damaged textures
Me and scripting... xd
did you set up the multi UV within blender itself?
so I need to open my model and make some stuff there?
download that PNG for yourself if you want to set it up with basegame
if you want to do your own custom blood/damage you gotta create a map like that above
on 3 layers theres rust, damage and blood
damn
if you want the basegames, use the pic above.
that sound coplicated
the actual UV mapping isnt hard if you use the basegames ๐
just so you understand how its done, just download the png
then in your model youre adding them to, go to the "plane" section
and create a second UV map.
then back in the UV editor, under the second UV map being selected, load that PNG of that damage map.
and fit the body pieces to where you want them on the map
id rather the damage map have been 1k instead of 512x512 but its w/e
thats all thats actually to the custom damage map.
Looks like my vehicles will be without blood textures forever ๐
nah, its not hard
just use the basegames ๐
itll do damage, rust, and blood all in one
i use it so my mods somewhat fit into basegame
That does mean it will look like the vanilla texture? I cant change it to this, right?
hey guys, where's the best place to find a mods collection. or does anybodu consider one particular mod collection on steam as "the best overall" ?
yeah, you'll loose it UNLESS you edit the basegame damage map to include them.
bruuuh
lets do it then
Thanks, I will try to work on it. but thatยดs work for another week, I dont think that I can do it in a 15 mins each model ๐
okey
If I do that, thats all in Blender, Am I right?
Dont I have to tick something or?
yeah, then just reexport the model with the multiUV setup
if not, it doesnt update lol
oh
NP
Anyone know what mods screw with watches and prevent then from showing temperature/date? they still show time but nothing else. if not no biggie
anyone here plays with the super survivors mod? if yes is it worth it?
i heard some things like lag and that the NPCs will pretty much just hole up inside a building for eternity until they starve or die and that sounds kinda wack
depending on your settings, the NPC's will definitely be a problem.
you can also set to recruit them all, which is a very cool concept of building a mega base.
I mostly play with the super survivors mod. It is true that survivors around the whole map can hole up and stay there until they die or you invite them into the group, but the starvation one isn't exactly true. Throughout my gameplay, they always looked for food and water around me when they got hungry or thirsty
they might have also died
Oh yeah, I forgot to add that there are also hostile survivors, who can either wander around the city for some time, killing zombies and attracting them, or defending one specific location
because of zombies
if too many zombies are round they will start getting sick and dying
Anyone know what mods screw with watches and prevent then from showing temperature/date? they still show time but nothing else. if not no biggie
@lost spear
If that's not a thing already that sounds great. Different watch tiers, from spring driven clock hand watches to battery guzzling fitbits
also hostile survivors are everywhere
for example deathsquad people run around everywhere
No itโs a conflict of mods.
Oof
The digital watches donโt show temp or date just time
I mostly met hostile prison guards and Soldiers. Found Soldiers at the Rosewood prison, some were defending some were wandering. Prison guards seemed to do the same thing. Never saw deathsquad though
Raiders are the death squad.
Oh, yeah I never really met them then
They will come eventually.
Do they come with the mod or are they already in the game?
Mod as in they spawn over time and attack your base
Since ai have aim bot have fun.
Dunno if you can turn them off or not.
Sometimes they can just get stuck and not move at all allowing you to freely kill them, or sometimes, especially in my case, they were too busy shooting zombies even when I was really close to them. Other than that, yeah they have aim bot indeed
I wrote a onTest function to test if character is at a specific place in the world to be able to craft a recipe. The function works fine. Now I would like to know how to compare the cell ID i get with getCell() to the Cell coords on the global map ?
How I can make a specific mod have priority over another?
I want to force the changes of mod A over mod B.
@quiet kiln According to FWolfe Guide :
Lua files from all active mods load in alphabetical order.
When you overwrite vanilla code load order is not as important as vanilla Lua files load before mod Lua files. But when patching mod's code load order matters. You can't overwrite code that hasn't been loaded yet. One way to solve this problem is by ensuring your file gets loaded after by exploiting the alphabetical name load order.
If the original mod's file is shared/OriginalCode.lua. Naming your patch shared/NewCode.lua will cause your file to load first (N before O), but naming it shared/PatchCode.lua will load after (O before P).
and a little further :
Another more robust solution is to delay overwrite code using events. Assume the mod we want to overwrite the function someRandomFun() in a mod:
local function newRandomFun()
-- do something
end
-- add a even callback that performs the overwrite
Events.OnGameBoot.Add(function()
-- store the original function. Note we dont store until we're ready to overwrite
original_fun = someRandomFun
-- now overwrite
someRandomFun = newRandomFun
end)```
Details here : https://github.com/FWolfe/Zomboid-Modding-Guide#overwriting-another-mods-code-3rd-party-patching
In my case I only need a way to force the UI_EN.txt file to load instead of the one in another mod's.
It's the only part of my mod that doesn't overrides.
then you should use the event system I guess ?
Yeah, that's what I'm trying to figure out. How to do that specific change using the method on the documentation you shared.
I'm new to modding the game, so I'm not 100% sure of how to do things.
moving wearing tons of sutff :l
and still gots the jacket and sweater slots to fit in (without clipping)
That looks nice!
Love the tactical combat shorts.:3
theres a better one ๐ with holes on the side and back pockets hahaha
@violet shell you can also use require "Path inside lua folder [minus: server/shared/client]/" to load the file for example my 'Framework' mod uses the following
if not Realms then require "Realms/Realms" end
if Realms.Broken then return end;
if not Realms.Systems.Init and not Realms.Systems.Broken then
require "Realms/Systems/SystemsSystem";
end
if Realms.Systems.Broken then return end;
to make sure that the systems and files are loaded and not in a "Broken" state
@valid stump Thanks ! @quiet kiln You should check FueledByOCHD just before, it could help you ๐
@quiet kiln To answer your question, you can force order with lua, but you have no control over the load order of the mods
@violet shell Your very welcome
Anyone knows some stuff about server load ? I plan to overwrite the ISCraftingUI:render() function to add stuff in it, and to create a global table which stores a list of selected recipes. Would it be a problem server wise or would it be totally manageable ?
if your doing things on client there will be no server load
that will cause client load not server @violet shell
@quiet kiln Well It might be possible with a complete rewrite of the Mod selection UI. But unfortunaly UI is not my specialization so I would not be able to help much yet.
@valid stump Clever, clever... ๐
Clever clever????? i dont think i get it @violet shell
Anyone here need modding help?
Has anyone worked with Java Array (not arraylist) from Lua? How get access to element of array?
i have worked with java array
but
i won t tell you how to get access to the element of array
because its a secret
i won t tell you how to get access to the element of array
@drifting ore Please drop the trolling, especially in here.
will do lord NasKo
why mod hardcoded stuff if you basically wont be able to share it properly for mods anyways? ๐คท
@tame mulch what exactly are you trying to do? I might be able to help
@valid stump Example: method Color.HSBtoRGB(1, 1, 1) return Java.Array. I cant get access to elements of array
have you tried
local color = Color.HSBtoRGB(1,1,1);
local r = color:get(0);
local g = color:get(1);
local b = color:get(2);
Although are you trying access from Java or are you working from LUA @tame mulch
one min not done
you can set color in item scripts too
ColorGreen = ,
ColorBlue = ,```
values to 0-254
@valid stump get() not works with Java.Array...
This is where the difficulty lies. Also there is no access to the class Array, so i cant Array.get()
@iron salmon Can you ask the developers about arrays when they have some free time? I think the easiest way to do it is to make available the PZArrayUtil class from lua code.
"setExposed(PZArrayUtil.class);"
@iron salmon Can you ask the developers about arrays when they have some free time? I think the easiest way to do it is to make available the PZArrayUtil class from lua code.
"setExposed(PZArrayUtil.class);"
@tame mulch Sure thing!
:get not work too
and looks like the thing you are accesing is not array
its integer already
look your console error
lang.Integer
sorry im on phone cant help much and cant decompile
but for java array get should have eork
work
thats weird
I think you confused ArrayList and the Array[]
By Lua i dont have access to Array
oh ok
@tame mulch I belive thats because it is using interger[] hmm give me a min
Hmmm little wierd that the dev's didnt expose the array class
yep. Or PZArrayUtil
but then again they seam to have alot of things locked behind the java code
which also doesnt help with speed due to having to keep going back and forth between java and Lua
thats a problem PZ will never ever escape from
accessing the java via kahlua makes modding really clumsy
its like trying to write your name with a brick
lol nice analogy
its like trying to write your name with a brick
@craggy furnace
As for me, it is not the lua that limits, but the api limitation that is available from the lua
at a point, it becomes very inefficient
you are taking 3 steps for every one that is necessary
Lol thanks to helping @abstract raptor with thier mod I'm now starting to move forword with a non-recipe based breakdown system as the prototype of my recycle mod for Realms Invasion
Still got a few things to add but it is coming along
@valid stump Example: method Color.HSBtoRGB(1, 1, 1) return Java.Array. I cant get access to elements of array
@tame mulch
Starting with 41.46, Color.HSBtoRGB() will return a color instead of Integer[3]
how can I modify existing code?
for a mod
like
being able to pour bleach on the ground or something
whoot whoot Got my Mod up and working, now to just finish adding some basic 'extra' features
@iron salmon
Very cool!
What about working with arrays in general? There are still places in which I need to process arrays (for example, through reflection (Field), I get this array :("ILighting[] lighting" from IsoGridSquare)) - i need it to calc real dark level at square
Hi there ! Hmmm... I wrote a custom ISCraftingUI:render() function. The original one is in lua/client/ISUI/ISCraftingUI.lua (of base game), mine is in lua/client/ISUI/Asilar_Custom_Render_Function.lua (in my mod folders). What I need to do to overwrite the base function with mine ? Because when I load my mod, when I open the crafting UI, it doesn't load my custom function, only the vanilla one. What am I missing?
Is the name of the new function exactly the same?
yes
I just copy/pasted the whole function ISCraftingUI:render()
and added this at the end of the function :
if IsSmelterRecipe(SelectedRecipe) then
self:drawText(getText("IGUI_CraftUI_NearItem", "Smelter"), x, y, 1,1,1,1, UIFont.Medium);
y = y + ISCraftingUI.mediumFontHeight;
end```
IsSmelterRecipe() is a function I wrote which is on the first lines of the lua file
SmelterRecipeList.0 = "Test Proxymity Smelter"
print("IsSmelterRecipe function entered")
print("SmelterRecipeList.0 =" .. SmelterRecipeList.0)
for i=0, SmelterRecipeList.getsize()
if SmelterRecipeList.i == recipe then return true
end
return false
end```
Is there an easy way to cut up sprites for use in multi-wall segment tiles, so that they line up? Like for advert billboards and store names.
ISCraftingUI:render() issue solved thanks to FueledbyOCHD !
someone, please someone, make an emote to flip people the bird
but like
all non schalantly
just a slow movement of raising their arm halfway up, turning their wrist and flipping the bird
extra points if you censor it
just for fun
To explain, most was correct except for the storing of the recipe names value and using what would be the translated name instead of the original name ๐
Did Hydrocraft again broke the building system?
y
clear and concise
just saw this in the thursdoid
@iron salmon, Where can get a detailed changelog?
There hasn't been an update yet, but once there is it'll be on the forum
Hi, I was wondering if someone had a couple minutes to help me find some info on how to do a mod?
@hoary veldt I DM'd you.

sports tank top needs bigger s t r i p e s
gotta have that 10-20% fan service ๐
but the full set has a full legged armour xD like in the top
group:getOrCreateLocation("Belt420")```
Looks like anime character
Does any of the modders here know if there is any way to get if your in the player's inventory while doing a context menu while using the ISInventoryMenuElements ?
that's a lotta specific, wish i knew e_e and wish i could use the radial reload menu to run my weapon shoot/grenade switch function
give me some time and i can help you with that
Am I just dense or is there no way to get the FemaleBody.X and MaleBody.X into Blender?
2.79 with a directX plugin just throws an error and if you convert them using some online converter the armature dies
Apparently Unwrap 3D Pro can open it and even play the animation but I'm not willing to pay 60 bucks to get two model files to load
@valid stump What exactly you want to do? Maybe i can help you. (Give an example of what you do and what you want to know)
Oh, i already found the answer, Thank you for the offer though @tame mulch
Do you need the ability to make a chain of cars/trailers when towing?
YES
NO
in a very limited way, i guess yes
๐ฌ
how can i make sure a mod gets loaded last?
ive been trying to get brita's weapons mod to get loaded last and i cant figure out how
pretty sure is by id :f (?)
mod loading in alphabet order
you can rename your mod
or you can load some mods before your mod (i think it is what you want)
@drifting ore
yes and i dont know how to do that
how load before?
here example from my mod
--- Mod compability
if getActivatedMods():contains("vehicle_additions") then
require('Vehicles/ISUI/Oven_Mattress_RadialMenu')
require('Vehicles/ISUI/FuelTruckTank_ISVehicleMenu_FillPartMenu')
end
i load it before my UI functions
for compability
alright i figured out what caused the hickup that irked me and fixed it but im sure to get back to this channel once we get the animation kit
because i got some plans for guns and weapons
and some armor
and thank you for your time btw!
Hello! I am new to modding, I am looking for a mod that adds a new page to the game's options menu so I can study it, does anyone know any examples of this... feel like I had one recently but I cant remember.
I am working on a mod that allows us to create random characters instantly after death. I am going to add in an options page if I can figure it out that will let us customize the parameters we want in that restart.
Basically I want to allow players to include/exclude traits, and decide if they want a fresh save file to restart from or not.
now if everything goes well
after dying I wanna just click a button, and a new character is auto generated with random traits from the list and im starting a game.
I'm curious if this is just a ME problem, but Super Survivors guns don't seem to be doing damage, playing the latest beta build with super survivors and I get shot like 8 times with pistols and shotguns. I get lodged bullets and they kinda hurt over time but it doesn't seem to do any immediate damage
So gunfights are just spamming each other with injuries and nobody dies.
Does this happen to anyone else or just me?
This is on the latet IWBUMS build
are you using super survivors or superb survivors?
Superb or w/e the latest is
Apparently bullets themselves just do a really low and pathetic flat damage rate and mostly deal damage through bleeding over time I'm told. It also depends on where the bullet hits, but anything below 308 isn't gonna do much.
If I have a selection of recipes in a specific file, would it be possible to have a function that return the names of the recipes in this particular file ?
If yes, how pathing works (how I tell the function to go look into the file I want) ?
Give me fuel, give me fire Give me that which I desire, ooh!
@violet shell I do not recommend doing that
the add function makes for better compatability with other mods
well blair, guess i should get to work on my fuel things
does anyone know if it would be possible to add MORE zoom levels to the game?
would be nice for high res monitors
You can switch to shoot straight light a one shot powerful shotgun or angled like every physical object that can hurt you but affects greater area (and the sights flip too!)
still needs a model swap when reloading u.u
can anyone in here give me some advice in creating a mod?
trying to add an new options menu page,
@sterile elbow You should check out the code of the mod on steam "Mod Options"
teasing/testing xD and maybe having someone that knows how to do the model swap thing in reloading
Anyone knows if the mod PZ Blood Cure has been removed from the Steam Workshop and why ?
@valid stump Thank's I will!
how would I just say... perma set the climate to have a perma red hue? ๐
(I just wanna accomplis this)
anyone have any idea on how to make a clothing item work as a two-way radio? :x
Did you try to add radio arguments in your item definition ?
hay i had the harry better ammo icon mod enabled but i think something causing the 308 magazine to error up
Anyone up here to help me understand how getPlayer():getInventory():AddItem() works ?
Say I have an item defined in my .txt by :
item Item1
{DisplayName = Item 1,
Icon = Item1,
Weight = 0.1,
}
What the AddItem argument would be ?
"Item1", or "MyModName.Item1", or "Base.Item1" ?
@topaz pendant hey uh whats the mod called that makes the hatchet retextured
nvm found it
sorry for ping
@violet shell if you put your item in Base block - "Base.Item1". If you put in block MyMod : "MyMod.Item1"
yeah, I figured it out myself ๐ Thanks a lot for the help and the answer tho !
Anyone knows if the mod PZ Blood Cure has been removed from the Steam Workshop and why ?
I'm messing around time and game time. Anyone already explored that and would help me to figure it out ?
I can add the values for radio in the clothing item but the type of item is what triggers the radio function
and cant be worn as a radio ๐
ok, because you have 2 types for 1 item : type = radio or type = clothing, right ?
i tried as well, it takes one or the other xD
and multiple values "radio;clothing," just breaks :X
probably need to make a custom lua to find that item and allow it to run the ISRadioWindow for that item equipped or something e_e
Sorry if this is the wrong channel: How do I turn off the sounds for NecroForge?
Anyone messed up with Radio & Television stuff ? I made a custom television channel, but I cannot have it available in the channels choice on televisions ?
ok, I'm already chatting with her ๐ I'll wait she's available then ๐
@tepid token just turn off sound when it open?
Maybe help just delete sound file from mod folder
@severe ridge You also might wanna see about changing how your guy holds the grenade launcher. Rocket and nade jumping only works in TF2 and Quake, not with a live explosive in PZ
and he looks like hes about to test that theory aiming east
akshualley
He wouldn't blow up
Since grenades need to travel for a specific amount of time before arming
Whatever 
I am looking events at the pzwiki. But if you need 100% reliable, you can look events in java code and search event triggers in code
For api: Lua code check by text editor. Java code check by jd-gui
yeah, im not sure how updated this is as well
https://projectzomboid.com/modding/
thanks both for the response ๐
A new function at disposal for modders "Crafting allowed only at specific locations". File & infos on the forums : https://theindiestone.com/forums/index.php?/topic/30907-function-crafting-recipe-only-possible-at-specific-locations/
Hi, What it does When you call the function, it checks where the player is and compare it to specific coordinates you set up. It returns a boolean. What for ? This function main purpose is to check if the player is where you want to allow him/her to craft a defined recipe. Can...
Current objective: I need to reference all zombies that are within a specific distance and that are in front of the player, so that I can kill them all later. I'm having trouble finding functions that do this.
You can scan sector around player (or maybe can get from cell. Or attach on zombieUpdate), get zombies, choose only that at front of player by coords (maybe help functions from render for choose without check by coords and direction)
is there some tutorial out there in the internet somewhere on how to make a 3d Clothing item for PZ?
i dont mean the model on its own i mean making the item in lua and giving it the right values and connecting the model to the item itself etc
You need to reference it's guids in fileguidtable.xml and each item in clothingitem folder, linking those guids. Then just go ahead and make a script for the items in the script folder. Distributions goes in lua folder. You can find all the references in the zomboid media folder
Anyone have messed up with Tooltip stuff ? I would know if I can have on a tooltip some modData of an Item... ?
Check out media/client/ISUI/ and look for inv tooltip
At least I think that is where to look
tooltip that i know is a value that can be applied to any type of item i guess, you can write anything on it XD
Tooltip is a modData then ?
how I would define the tooltip text of a specific item ?
setTooltip() is the way to go ๐
Thanks a lot !
in scripts i use Tooltip = Tooltip_item_Radio, for e.g (you can refer to a general language use [so it translates etc] or just write anything you want)
@tame mulch Interesting... It certainly could work, but I can't find a function or method that "scans" for zombies, what is it called?
You want get zombies from sector? You can do this
hello, do anyone have a spare minute to point me in the right direction for modding the damage values of the katana from godlike to normal weapon? i never modded before
G:\Applications\Steam\steamapps\common\ProjectZomboid\media\scripts
File: items_weapons.txt
๐ฎ thanks, didn't expect it to be that easy
let's say i wanted to have this in a server, i should just have the same file edited for every player?
grepWin eh? takes notes
issues done for this release:
https://github.com/stefankueng/grepWin/milestone/5?closed=1
Use these settings
& type your keywords into the Search for: text box
anyway, make a copy of that file before you edit it - you also want to make your mod file directory as you make your mod, this makes it easy on you as you make larger mods
If you don't know how to make your own mod file directory, take a look at how other modders have made theirs, basically recreate the PZ file structure, but only placing in your files that either add or replace the vanilla stuff in each appropriate folder.
nice, basically this would turn the simple edit into a mod so that i can apply it server side? sounds awesome if that's the case
I haven't hosted a server before to apply mods on, but I assume thats the case, release it on the workshop and then you may be able to choose what is used on it.
thanks, i will look into it ^^ it shouldn't be super hard from here
it possible
even without seats?
yep
wow, this system sure is flexible
i wonder what mods will come out when we finally get full-scale vehicle upgrades
I could see that specific locations function opening up some mission-type mods in the future
Give players a distraction from time to time
I am working specifically on a scenario quest mod
THat's why I developped fakeHelicopter function, this specific location function, and other stuff
I've almost finished the coding part of the features I needed for the mod. Now I need to build up all the recipes, items, questlines, and specific locations (1 cell maps that overwrite empty cells of the main map).
Other features I managed to add : Broadcasts that does other stuff than just gaining XP (for instance, learning recipes), Storing player data info on items (Blood Samples that can be analyzed), and pass over datas to another item (Blood sample analysis gives a research note with the datas available by reading the notes).
Also, a timing function, that allows me to trigger something after some time (example : a message box appears 20 seconds after something has been triggered by a function).
lastly, I now have a function that checks nearby furnitures/items to allow crafting a recipe (something like workbenches requirments).
If anyone is interested by some of those functions, please PM me and I'll share. If you think that I should share all of them on the forums, just tell me and I'll do. Those functions are quite specific to what I have in mind for my mod so I didn't released them all, but only the ones I thought it could help other modders (fakehelicopter & specific location crafting).
Note that I only could do all that due to heavy support from other modders (FueledByOCHD, alibuyuktatli, Yossitaru, Azakaela, ATPHHe, tommysticks, Peach).
Anyone got a mod that can be used to deconstruct and scrap any and all vehicles on the map?
I got one that allows me to salvage the hollowed out wrecks-
but Im fitting to remove aLL cars
Amish run
hey what was that mod that added the altyn helmet? It had some witch/knight armor as part of it
Tryin to get a name
me -v- probably back soon, just waiting for patches, twas bad
Lol small proof of concept showing that my Debug System's Inline Errors Feature is valid :)
LOG : General, 1604981551222>
====================== | Debug Message | ======================
Project: Invade 'Protoframe'
Message Type: 'Error - Test'
System: Game Link
Message: Error: Testing Error
Inner Error 1: The required paramater 'playerID' is nil and shouldnt be
Project: Invade 'Protoframe'
System: Game Link
Feature: Players
====================== | End Debug Message | ======================
along with
Logging Feature
Error Definitions Feature
Basic Errors Feature
Registerable Errors Feature ๐
Lol This is my current Debug log. ๐
well at least my mods logging
Pretty sure noone wants to see what the code looks like for that lol JK
-- The error Code :) just an example of whats going on behind that code :P
local testResult = Invade.Debug.TryCatch( Invade.Game.Player.GetPlayerFromNum, "Testing Error", {}, nil );
if not testResult.Success then
Invade.Debug.LogProtoFrame( "Error - Test", testResult.Error, true, "Game Link" );
end
Although that was just a test to see if i could get my runtime building of inline errors to making debuging of mods easier
does anyone actually understand how the item distribution system works?
specifically what the difference in specifying values against items. How would a 50, 10 or 0.5 actually works given thing vary so wildly for same items across diff loot tables!
im trying to figure it out to see if i can get some consistency to a custom loot approach, but cant really profess to understanding things beyond a wild guess
id ping a mod or dev in the hope of an answer, but these tend to go unanswered
I guess it's a random factor. I didn't read anything solid about that, but it seems to me that it's a "chance to spawn". I was planning on digging on that to prepare my mod maps. So gonna try stuff out and play with it around to try to get some answers.
@latent orchid did you dig in .class files to try to have some clues ?
I think it's in RBBasic.class in /zombie/randomizedWorld/
String str = this.specificProfessionDistribution.get(Rand.Next(0, this.specificProfessionDistribution.size()));
So maybe the number you add in your distribution files fixes the random range : random from 0 to your number ?
and in RandomizedBuildingBase.class you can read this :
public static void ChunkLoaded(IsoBuilding paramIsoBuilding) {
if (!GameClient.bClient && paramIsoBuilding.def != null && !paramIsoBuilding.def.seen && paramIsoBuilding.def.isFullyStreamedIn()) {
if (GameServer.bServer && GameServer.Players.isEmpty())
return;
for (byte b = 0; b < paramIsoBuilding.Rooms.size(); b++) {
if (((IsoRoom)paramIsoBuilding.Rooms.get(b)).def.bExplored)
return;
}
paramIsoBuilding.def.seen = true;
if (GameServer.bServer &&
GameServer.isSpawnBuilding(paramIsoBuilding.getDef()))
return;
RandomizedBuildingBase randomizedBuildingBase = IsoWorld.instance.getRBBasic();
try {
byte b1 = 10;
switch (SandboxOptions.instance.SurvivorHouseChance.getValue()) {
case 1:
return;
case 2:
b1 -= 5;
break;
case 4:
b1 += 5;
break;
case 5:
b1 += 10;
break;
case 6:
b1 += 20;
break;
}
if (Rand.Next(100) <= b1)
randomizedBuildingBase = IsoWorld.instance.getRandomizedBuildingList().get(Rand.Next(0, IsoWorld.instance.getRandomizedBuildingList().size()));
if (randomizedBuildingBase.isValid(paramIsoBuilding.def))
randomizedBuildingBase.randomizeBuilding(paramIsoBuilding.def);
} catch (Exception exception) {
exception.printStackTrace();
}
}
}
So my assumption is that it's just getting a randomization between 0 and your number in distrib files.
What we should test is : in a custom room you define the distribution of a particular item at 100, to see if it spawns 100% of the time ?
im note clear on the above, what throw me is why some tables use high loot values for a handful of objects, yet other use very low
for example...
PlankStashMoney = {
rolls = 6,
items = {
"Money", 100,
"Money", 100,
"Wallet", 5,
"Wallet2", 5,
"Pistol", 5,
"PistolCase1", 1,
"PistolCase2", 0.4,
"PistolCase3", 0.1,
},
},
PlankStashGun = {
rolls = 5,
items = {
"PistolCase1", 15,
"PistolCase2", 10,
"PistolCase3", 5,
},
},
What I understand is that in the PlanStashMoney, it rolls 6 times
These stash loot entries, one has money at 100 which i assume means that object is guaranteed to spawn, but the second only goes up to 15.
and for each roll, you have Rand(0,100) for Money, rand(0,5) for Wallet/Wallet2/Pistol, rand(0,1) for PistolCase1, rand(0,0.4) for PistolCase2 and rand(0,0.1) for PistolCase3.
Does that make any sense ?
oof....ill say not 100%
still thinking this through, but i feel dumb like im missing something obvious!
money should be harder to spawn...is that correct?
larger range?
im note clear on the above, what throw me is why some tables use high loot values for a handful of objects, yet other use very low
@latent orchid That is because some containers are significantly more common in the game world than others.
but these are ProceduralDistribution entries, not tied to containers specifically
I agree with Blair Algol. In your example, we can assume that the PlankStashGun are a lot less common than PlankStashMoney
PlankStashMagazine = {
rolls = 7,
items = {
"Magazine", 30,
"HottieZ", 30,
},
},
What about this?
It rolls 7 times and what happens?
1 roll is :
Magazine : rand (0,30) AND Hottiez : rand (0,30).
So in 1 roll you have more or less 30% chance to get 1 magazine and 30% chance to get 1 Hottiez
so the roll itself is a value out of 100?
so in total you have 9% chance it spawns both, but for each roll
I assume that
it's a zombie.rand()
I didn't check the zombie.rand() function
i apologize for all the questions ๐ฆ
im just trying to 'speak' this out as if i was watching a value tumble through the process.
a roll between 0-100 results in 74
randomizedBuildingBase = IsoWorld.instance.getRandomizedBuildingList().get(Rand.Next(0, IsoWorld.instance.getRandomizedBuildingList().size()));
what then based on the magazines?
if the rand is (0,30), then you hit if the rand is between 0 to 30, if the result is 42, then you don't hit (but you have the answer of all...)
so there is a chance, no magazines spawn even though there is only 2 item choices? correct?
but you have to multiply the chances of each item by the number of rolls
so 100 forces appear
so, overall, you have great chance the container is not empty
and the more rolls there is, the more chances to get stuff you have
I hope so
so a roll of 3, which is most tends to be fairly light loot?
because I plan to use that in my mod, so if not, I'm fucked up ๐
3% chance per roll
so also depends on the number of rolls you have
the difference can be huge if you make 1 roll or 100
I'm not sure about what I said
it's only assumptions
with what I can understand from the code and my very little knowledge
im coming from the other end, in that im considering a framework approach i can share with other mappers to save them the hassle of custom loot tables
I even didn't test it yet
what we should do is to create a custom room type
so we can build a very customizable distribution
and then try different values for rolls & items numbers
heres an example of the custom ProceduralDistribution lists im considering for my custom mapping
Sorry, I didn't have time to dig in distribution stuff much yet, so I even don't understand your file ๐
distribution defines the rooms and what each container does, proceduraldistribution is a list of 'options' a container has of spawning
warehouse = {
crate = {
procedural = true,
procList = {
{name="CratePaint", min=0, max=50},
{name="CrateFarming", min=0, max=50},
{name="CrateWoods", min=0, max=50},
{name="CrateHardware", min=0, max=50},
{name="CrateTools", min=0, max=50},
{name="CrateMetal", min=0, max=50},
{name="CrateAntiqueStove", min=0, max=3},
}
},
},
So in the above case a warehouse will randomly select an option from ProceduralDistribution to populate a crate.
for example: 0 to 50 crates in the room can have paint, but 0-3 crates can have antiquestove. once 3 crates have stoves, it doesnt use this anymore. You can force a container to have a certain type of loot with min=1 (atleast 1 container). The whole loot chance within these loot tables is what throws me off
i established this via ingame testing rather than looking at code, so I may be incorrect
public void spawnItemsInContainers(BuildingDef var1, String var2, int var3) {
ArrayList var4 = new ArrayList();
ItemPickerRoom var5 = (ItemPickerRoom)ItemPickerJava.rooms.get(var2);
IsoCell var6 = IsoWorld.instance.CurrentCell;
int var7;
for(var7 = var1.x - 1; var7 < var1.x2 + 1; ++var7) {
for(int var8 = var1.y - 1; var8 < var1.y2 + 1; ++var8) {
for(int var9 = 0; var9 < 8; ++var9) {
IsoGridSquare var10 = var6.getGridSquare(var7, var8, var9);
if (var10 != null) {
for(int var11 = 0; var11 < var10.getObjects().size(); ++var11) {
IsoObject var12 = (IsoObject)var10.getObjects().get(var11);
if (Rand.Next(100) <= var3 && var12.getContainer() != null && var10.getRoom() != null && var10.getRoom().getName() != null && var5.Containers.containsKey(var12.getContainer().getType())) {
var12.getContainer().clear();
var4.add(var12.getContainer());
var12.getContainer().setExplored(true);
}
}
}
}
}
}
for(var7 = 0; var7 < var4.size(); ++var7) {
ItemContainer var13 = (ItemContainer)var4.get(var7);
ItemPickerJava.fillContainerType(var5, var13, "", (IsoGameCharacter)null);
ItemPickerJava.updateOverlaySprite(var13.getParent());
if (GameServer.bServer) {
GameServer.sendItemsInContainer(var13.getParent(), var13);
}
}
}
Is this the actual loot function?
thanks for the explaination between distrib & proceduraldistrib
where is this spawn function ?
Maybe the items are spawned in a container only when you open it the first time, and then it "saves" its inventory for later (setexplored=true) ?
i think i found the functions
There is a java file : ItemPickerJava.class
It calls for suburbsdistrib also
so I guess it's the lead to follow
maybe we could just have a confirmation by the devs ?
That the items in a container are spawned only at first opening
the function rollContainerItem is what im trying to understand
and then the inventory is saved ?
im not good with java
but i can roughly understand the code
not sure, but is it normal for devs to reference everything as var1, var2, var3?
There is also a rollItem function
seems difficult to read this code
public static void rollItem(ItemPickerContainer paramItemPickerContainer, ItemContainer paramItemContainer, boolean paramBoolean, IsoGameCharacter paramIsoGameCharacter) {
if (!GameClient.bClient && !GameServer.bServer)
player = IsoPlayer.getInstance();
if (paramItemPickerContainer != null && paramItemContainer != null) {
float f = 0.0F;
IsoMetaChunk isoMetaChunk = null;
if (player != null && IsoWorld.instance != null)
isoMetaChunk = IsoWorld.instance.getMetaChunk((int)player.getX() / 10, (int)player.getY() / 10);
if (isoMetaChunk != null)
f = isoMetaChunk.getLootZombieIntensity();
if (f > zombieDensityCap)
f = zombieDensityCap;
boolean bool1 = false;
boolean bool2 = false;
String str = "";
if (player != null && paramIsoGameCharacter != null) {
bool1 = paramIsoGameCharacter.HasTrait("Lucky");
bool2 = paramIsoGameCharacter.HasTrait("Unlucky");
}
for (byte b = 0; b < paramItemPickerContainer.rolls; b++) {
ItemPickerItem[] arrayOfItemPickerItem = paramItemPickerContainer.Items;
for (byte b1 = 0; b1 < arrayOfItemPickerItem.length; b1++) {
ItemPickerItem itemPickerItem = arrayOfItemPickerItem[b1];
float f1 = itemPickerItem.chance;
str = itemPickerItem.itemName;
if (bool1)
f1 *= 1.1F;
if (bool2)
f1 *= 0.9F;
float f2 = getLootModifier(str);
if (Rand.Next(10000) <= f1 * 100.0F * f2 + f * 10.0F) {
InventoryItem inventoryItem = tryAddItemToContainer(paramItemContainer, str);
if (inventoryItem == null)
return;
StashSystem.checkStashItem(inventoryItem);
if (paramItemContainer.getType().equals("freezer") && inventoryItem instanceof Food && ((Food)inventoryItem).isFreezing())
((Food)inventoryItem).freeze();
if (inventoryItem instanceof Key) {
Key key = (Key)inventoryItem;
key.takeKeyId();
key.setName("Key " + key.getKeyId());
if (paramItemContainer.getSourceGrid() != null && paramItemContainer.getSourceGrid().getBuilding() != null && paramItemContainer.getSourceGrid().getBuilding().getDef() != null) {
int i = paramItemContainer.getSourceGrid().getBuilding().getDef().getKeySpawned();
if (i < 2) {
paramItemContainer.getSourceGrid().getBuilding().getDef().setKeySpawned(i + 1);
} else {
paramItemContainer.Remove(inventoryItem);
}
}
}
if (WeaponUpgradeMap.containsKey(inventoryItem.getType()))
DoWeaponUpgrade(inventoryItem);
if (!paramItemPickerContainer.noAutoAge)
inventoryItem.setAutoAge();
if (Rand.Next(100) < 40 && inventoryItem instanceof DrainableComboItem) {
float f3 = 1.0F / ((DrainableComboItem)inventoryItem).getUseDelta();
((DrainableComboItem)inventoryItem).setUsedDelta(Rand.Next(1.0F, f3 - 1.0F) * ((DrainableComboItem)inventoryItem).getUseDelta());
}
if (inventoryItem instanceof HandWeapon && Rand.Next(100) < 40)
inventoryItem.setCondition(Rand.Next(1, inventoryItem.getConditionMax()));
if (inventoryItem instanceof InventoryContainer)
if (containers.containsKey(inventoryItem.getType())) {
ItemPickerContainer itemPickerContainer = (ItemPickerContainer)containers.get(inventoryItem.getType());
if (paramBoolean && Rand.Next(itemPickerContainer.fillRand) == 0)
rollContainerItem((InventoryContainer)inventoryItem, paramIsoGameCharacter, (ItemPickerContainer)containers.get(inventoryItem.getType()));
}
}
}
}
}
}
boolean var6 = false;
boolean var7 = false;
String var8 = "";
if (player != null && var1 != null) {
var6 = var1.Traits.Lucky.isSet();
var7 = var1.Traits.Unlucky.isSet();
}
for(int var9 = 0; (float)var9 < var2.rolls; ++var9) {
ItemPickerJava.ItemPickerItem[] var10 = var2.Items;
for(int var11 = 0; var11 < var10.length; ++var11) {
ItemPickerJava.ItemPickerItem var12 = var10[var11];
float var13 = var12.chance;
var8 = var12.itemName;
if (var6) {
var13 *= 1.1F;
}
if (var7) {
var13 *= 0.9F;
}
float var14 = getLootModifier(var8);
if ((float)Rand.Next(10000) <= var13 * 100.0F * var14 + var4 * 10.0F) {
InventoryItem var15 = tryAddItemToContainer(var3, var8, var2);
if (var15 == null) {
return;
}
int var17;
if (!StringUtils.isNullOrEmpty(var15.getMap()) && var2.maxMap > 0) {
int var16 = 0;
for(var17 = 0; var17 < var3.getItems().size(); ++var17) {
InventoryItem var18 = (InventoryItem)var3.getItems().get(var17);
if (!StringUtils.isNullOrEmpty(var18.getMap())) {
++var16;
}
}
if (var16 > var2.maxMap) {
var3.Remove(var15);
}
}
Snippet from rollContainerItem. This is what Im looking for i think
getlootmodifer
ill admit, learning to map was less of a headache for me ๐
more like playing with a box of crayons, this is too confusing...i hate coding
I don't find the last piece of code you pasted
getlootmodifier is a dead end
it just asks for the lootmodifiers in the server settings
(you can setup foodloot & weaponloot modifiers)
for (byte b = 0; b < paramItemPickerContainer.rolls; b++) {
ItemPickerItem[] arrayOfItemPickerItem = paramItemPickerContainer.Items;
for (byte b1 = 0; b1 < arrayOfItemPickerItem.length; b1++) {
ItemPickerItem itemPickerItem = arrayOfItemPickerItem[b1];
float f1 = itemPickerItem.chance;
str = itemPickerItem.itemName;
if (bool1)
f1 *= 1.1F;
if (bool2)
f1 *= 0.9F;
float f2 = getLootModifier(str);
if (Rand.Next(10000) <= f1 * 100.0F * f2 + f * 10.0F) {
InventoryItem inventoryItem = tryAddItemToContainer(itemContainer, str);
if (inventoryItem == null)
return;
StashSystem.checkStashItem(inventoryItem);
if (itemContainer.getType().equals("freezer") && inventoryItem instanceof Food && ((Food)inventoryItem).isFreezing())
((Food)inventoryItem).freeze();
if (inventoryItem instanceof Key) {
Key key = (Key)inventoryItem;
key.takeKeyId();
key.setName("Key " + key.getKeyId());
if (itemContainer.getSourceGrid() != null && itemContainer.getSourceGrid().getBuilding() != null && itemContainer.getSourceGrid().getBuilding().getDef() != null) {
int i = itemContainer.getSourceGrid().getBuilding().getDef().getKeySpawned();
if (i < 2) {
itemContainer.getSourceGrid().getBuilding().getDef().setKeySpawned(i + 1);
} else {
itemContainer.Remove(inventoryItem);
}
}
}
}
}
}
the core system is here I think
for (byte b = 0; b < paramItemPickerContainer.rolls; b++)
so I was right, it loops the itemgeneration a number of times equals to your rolls number
for (byte b1 = 0; b1 < arrayOfItemPickerItem.length; b1++) {
ItemPickerItem itemPickerItem = arrayOfItemPickerItem[b1];
float f1 = itemPickerItem.chance;
str = itemPickerItem.itemName;
if (bool1)
f1 *= 1.1F;
if (bool2)
f1 *= 0.9F;
float f2 = getLootModifier(str);
if (Rand.Next(10000) <= f1 * 100.0F * f2 + f * 10.0F) {
InventoryItem inventoryItem = tryAddItemToContainer(itemContainer, str);
and this is the core mechanic of the randomization tests inside 1 roll
so, bool1 = true if you have the lucky trait, bool2=true if you have the unlucky trait
so if you are "lucky", you get a *1.1 modifier, so you have 10% boost chance, if you are "unlucky", then it's a 0.9 modifier, so 10% less chances to get stuff.
the f2 is the lootmodifiers from server settings, which we don't mind at all for what we are trying to understand
then, the randomize is :
rand.next(10000) <= f1 * 100 + f2*10
say f1 = 1 (you don't have lucky/unlucky trait) and f2 = 0 (you didn't change loot in server settings)
then, sorry
f1 = the number you defined in your distrib file
say, 100
so rand.next(10 000) <= 100*100 = 10 000
so that's it
if you define an item with 100 in distrib file, then it have a 100% chance to loot for each roll
we did it !!!
@latent orchid
been watching and reading as you type
so using the magazine example with only 2 items each at 30 chance
yup
say rolls = 2, magazine = 30, hottiez = 30
then it will loop 2 times
and each loop will do :
for magazine : rand.next(10000) <= 30*100 = 3000
for hottiez : rand.next(10000) <= 30*100 =3000
so chances are : 3000/10000 *100 = 30%
each item have a 30% chance to spawn for each roll
so why do they go and do this
CrateAntiqueStove = {
rolls = 1,
items = {
"Mov_AntiqueStove", 100000,
},
},
would 100 not suffice?
so after your very helpful explanation, ive come to the conclusion that some of the loot tables have no real logic to their numbers!
maybe
the other thing I just understood is :
InventoryItem inventoryItem = tryAddItemToContainer(itemContainer, str);
if you have hits with your rand.next
then it calls the tryAddItemToContainer() function
it doesn't add it directly
and whenyou look at the tryAddItemToContainer()
it tests if there is enough room in the container to spawn the item
if yes then spawn happens, if not then item doesn't spawn
yes, that is a good point and makes sense
what you could do to help the understanding is :
create a custom map with 1 room and 1 container
overwrite the distrib files
so you are sure that an antiquestove crate will appear
then overwrite the last code you pasted and change the 100000 with 100
and test several times to check if the spawn rate is still 100%
OR, you could try to reach the devs to have a clear answer to that ๐
i can do that with my custom map as i already am using my own definitions
but I don't know the devs so I cannot help
they never reply to any of my pings, game up
I'm very much interested in the results of your investigations and tests ๐
sure
i can try diff settings and see as for now i havent put much care into my chance values
please send me the results in PM, so I don't miss it
as example, this is one of my custom defs...it works, but i have no real sense of chance values ive chosen:
ProceduralDistributions.list["GD_comicbooks"] = {
rolls = 3,
items = {
"Book", 3,
"ComicBook", 8,
"ComicBook", 8,
"ComicBook", 8,
"ComicBook", 8,
"Magazine", 7,
"Magazine", 7,
"HottieZ", 0.01,
}
};
i assume the hottiez mag would be hard to find at 0.01
i tend to stick to around the 10% chance mark for high chance and 0.5 or 0.01 for low chance
as a mapper, im worried this might ruin the immersion of building defs somehow if i dont get it right (ie no loot or crap loot spawning)
My two cents here:
- the values are an art and not a science
- err on the side of less versus more; in mp with loot respawn on, nothing is rare
re immersion, that is really hard to dial in. "realistic" values can result in valuable resources being waaayyyyy too common.
it's still possible to setup a mp server with respawn off right ? So maybe the map could come with an advised setup of no respawn ?
There is any documentation online that gives directions to target specific aspects of the game? For example, if I want to know how to target the Characters Carry Capacity.
Has anyone put their mods up as open source on GitHub? Iโm concerned about blowing my IRL anonymity if I where to publish it to my current account, and donโt know if I should be making a second github account or not.
Is it pretty typical for people to have that separation between professional and personal projects when it comes to modding games?
Yes actually
It's something I'd personally do for about everything I have
Dont like mixing my irl affairs with my internet affairs
It's not a good mix
Thatโs the worry Iโve got; itโs not worth risking a troll contacting my employer to complain about me just because I didnโt update the mod fast enough.
I'm pretty sure that won't happen, but better safe than sorry
I mean itโs a stretch right? Very unlikely.
Itโs my first time making a mod, but everything else on my github is non-gaming / work related.
Iโve been struggling to get an idea of what the common practice is, thanks for the responses though.
Well it's just a rule of thumb for good measure
Things related to work you'd want to keep things as professional as possible
I'd go with Doki, don't mix up things and create dedicade github account for PZ modding related stuff ๐
btw, I am even not sure that github is necessary. You could just publish on the forums and/or Steam Workshop ?
Yeah itโs already up on Steam Workshop, Iโd just like to leave it open source on GitHub too.
There are absolutely multiple obsessive personalities who fixate on mods/modders. Don't give them any means to grief you outside of PZ.
Pp popo
There is any documentation online that gives directions to target specific aspects of the game? For example, if I want to know how to target the Characters Carry Capacity.
@quiet kiln
It is hardcoded in IsoGameCharacter.class file.
BaseMaxWeight = 8.
And then there is the STR carry capacity bonus.
There is a function that is setMaxWeight().
So maybe in a function (called at creation of character with an event ?) you could change it :
getPlayer():setMaxWeight() = 2 ?
Or something like that...
Better coders will help you with that I guess ๐
I just need to create a lua file or I need to put that inside a specific hierarchy of folders?
so you should use that instead. But I think you would need to mess up with character creation, and then use an event hook, like OnCreatePlayer event ? But I don't know how to handle all that stuff ๐ Maybe by digging in the traits reactivator mod you could read some code that would help you understand what to do ?
Let me check this mod.
lua file is the way to go, you don't have choice for that ๐ but is it server/client/shared, I don't know ๐ฆ
Okay, I created the file. Gonna test now.
Is not working, but I'm sure that's because I'm doing wrong. But at least I believe it is in the right place, because it works to add items to the char's inventory.
I just need to find out how to write the code right.
But thanks for the first step and general direction so far.
@quiet kiln Can you try :
self.character:setMaxWeightBase() = 2
I found the solution in this other mode: https://theindiestone.com/forums/index.php?/topic/9126-build-27-cheat-increase-the-maximum-carry-capacity-to-9999/
BUILD 27 [sorry about the misleading title, i cant change it] tweaks the maximum carryweight to 9999.note: this doesnt increase the actual inventory capacity beyond 50. it just allows you to walk around with heavy items and a full inventory. use delete key to spawn a void pack...
It does the opposite of what I'm trying to achieve, but uses the line you shared, @violet shell
Now the starting "carry capacity" can be defined to 4 or 6 and traits and in-game XP will take care of increase it. Is not what I had in mind for my mod, but it should do until I learn more about it.
maxweight.init = function()
getPlayer():setMaxWeightBase( 4 );
end
Events.OnGameStart.Add( maxweight.init );```
Honestly, dunno if I would use OnGameStart event. Maybe trying to have it works with OnCreatePlayer or something like that would be safer.
As MaxWeight is a stat that is saved, once you modified it, it should stay the same
Oh, okay... I'm gonna change to OnCreatePlayer.
But everything else seems safe to this version of the game, right?
Now I wonder if there is anyway to define a limit to the carry capacity while keeping strength working for everything else.
Maybe just setMaxWeight ?
easiest way to get extra carry weight is a negative weight item ๐
@quiet kiln I'm not sure, I am still trying to identify the function that use STR to modify carrying capacity, but I didn't find it yet
The ideal would be stop the character to get any more items once the carry capacity is reached.
Right now it just add the encumbered status, as expected.
yeah, but it also slows you and hurts you
Yes, but would be nice to stop the addition of new items on top of the encumbrance. I'll check some mods, maybe I can adapt something.
you may add a function and call an event
the function should check the overload status, and if yes, then bypass the addItem
Alternatively you could change the Overloaded status numbers, to forbid movement when the maxweight is reached, instead of slowing down.
Also, there is a hard cap at 50 Kg I think on the character, so you should be able to lower that too
the function should check the overload status, and if yes, then bypass the addItem
@violet shell That would be the ideal.
I want to stop the item transfer only if the player have the Extremely Heavy Load status. In that case, to check the status, it should be like that?
getPlayer():getMoodleLevel(MoodleType.HeavyLoad);
I'm trying to make a vehicle mod
and the overlays are not working even remotely how they should
any ideas?
can send screenshots
Does anyone think it would be possible to have a function (or a set of functions) that defines a specific zombie with a zombie name and spawn location and spawn trigger ?
I found some code about Unique Zombies. Anyone knows how it works ?
@quiet kiln I think you should find your answer inside this code :
Thanks! Gonna give a try in the next hour.
I have a function that adds and removes traits based on a specific condition, but I can't find a Event that works properly, because this function is being triggered non-stop with the Events I tried, like OnPlayerUpdate and OnRefreshInventoryWindowContainers, for example.
There is any better Event or other way to do that?
what condition specificly


