#mod_development

1 messages ยท Page 437 of 1

left lintel
#

Ahh, right. So a baseball bat having a weight of 2 , divided by a 20 point maximum carry weight on average.
If 20 points = 10,000 lbs. , that would mean the Baseball bat would be 1,000 lbs.

fallow bridge
#

i'm just saying

left lintel
#

Yes, of course, we were carrying a 1,000 baseball bat the entire time. Thank you for that clarification lmao

fallow bridge
#

my whole 100000 pounds worth of gear comment was a example

left lintel
#

Not a very helpful example~

fallow bridge
#

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

left lintel
#

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

fallow bridge
#

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

left lintel
#

Two Generators? No. One Generator? Possibly.

fallow bridge
#

you cannot carry one generator in your inventory without problems

#

that is unrealistic

#

and OP

left lintel
#

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

fallow bridge
#

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

left lintel
#

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.

fallow bridge
#

also do remember

#

the inventory is most presumably your pockets

left lintel
#

Ah, right.

#

The shotguns are fitting in my pockets.

#

Right, I should've known

fallow bridge
#

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!"

left lintel
#

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.

fallow bridge
#

which makes the game fair

left lintel
#

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.

fallow bridge
#

being able to almost instantly max out your strength would make the game to easy or to boring

#

i meant not fair

left lintel
#

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.

fallow bridge
#

there is

left lintel
#

Because as of now? with the amount of time it takes to get strength to max? It doesn't feel worth it.

fallow bridge
#

you will basically one hit any zombie with any melee weapon

left lintel
#

My dude loses health from carrying around 40 lbs of equipment

fallow bridge
#

strength isn't just carryweight

left lintel
#

No shit. But it's wasted on carryweight, and endurance

fallow bridge
#

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

left lintel
#

And the supposed 2-year running character, with Maxed-Out strength Stats, is slowly dying from hauling 40 lbs. of equipment lol

fallow bridge
#

you don't actually die

#

it just lowers your max health

#

which is dumb

#

but meh

left lintel
#

Deadass? How the fuck is my health bar getting down to the 40% range then?

#

Is it a mod?

fallow bridge
#

no

#

max amount of overweight (somewhere around 50-60 iirc) brings your health all the way down to 40% max

left lintel
#

I gotta test that a bit more.

fallow bridge
#

it won't drop any more than that number

#

@left lintel i spent a month testing it

left lintel
#

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

fallow bridge
#

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%

left lintel
#

That might do, shoot, 'll try it out

fallow bridge
#

do remember that the main inventory is not meant to be in your hands

#

your not lifting 50 boxes of bullets in one hand

left lintel
#

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

fallow bridge
#

as i said once the inventory overhaul happens it will make a lot more sense

violet shell
#

๐Ÿ‘
@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)

willow estuary
#

๐Ÿคทโ€โ™‚๏ธ

#

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.

violet shell
#

lol

#

you know what

#

it was just a f'ing case sensitive folder name ๐Ÿ™‚

#

I had my Shared folder named "Shared" instead of "shared" ๐Ÿ™‚

dense vale
#

@left lintel you can start out with maximum strength

willow estuary
#

Ahahah, yeah, code gets fussy that way. Glad you sorted it out.

violet shell
#

Ok

summer walrus
#

@abstract raptor The one you pulled from the server

violet shell
#

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
)

valid stump
#

your on create is off

#

i belive

violet shell
#

function CalltheCopter_onCreate ()
testHelicopter
end

valid stump
#

should have 4 arguments

violet shell
#

maybe it's that way to write the function ?

valid stump
#

huh?

violet shell
#

my function onCreate should have 4 arguments ?
like that :
function CalltheCopter_onCreate (items, result, player, selectedItem)
testHelicopter(),
end

valid stump
#

remove the coma after test helicopter but yes

left lintel
#

@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

violet shell
#

@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 ?

dense vale
#

@left lintel lumber jack, obese and then strong

violet shell
#

@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 ?

violet shell
#

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 ?
late hound
#

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

topaz pendant
#

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
#

@drifting ore What type of models? Cars, weapons or something else?
@ember orchid it's a headwear

stone tapir
#

@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.

willow estuary
#

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?

whole latch
#

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?

drifting ore
#

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.

willow estuary
#

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.

topaz pendant
#

they reminds me of a Modder on the rimworld workshop who would harass people when they mention bugs or suggest things >.>

stone tapir
#

@willow estuary His profile picture is literally a zombie Queen's Guard from the game Zombi.

drifting ore
#

wasn t it called Zumbi?

stone tapir
#

No, ZombiU for the WiiU, Zombi for the release to PC and consoles.

drifting ore
#

also that was an nice zombie game

#

first survival horror game i heard of and played

#

atleast my mind thinks so

willow estuary
#

@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" ๐Ÿ˜„

drifting ore
#

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

violet shell
#

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 ?

late hound
#

I don't know enough lua to know if it is viable to do it

willow estuary
#

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.

valid stump
#

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

pastel olive
#

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

violet shell
#

@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 ๐Ÿ™‚

pastel olive
#

yes

#

just using settarget actually starts the helicopter

#

pickrandom just select one player from all player

#

then sends to settarget

#

settarget starts event

violet shell
#

Ok I got it : this.state = State.Arriving; this.bActive = true;

#

But, where the update() subfunction is called then ?

pastel olive
#

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

violet shell
#

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

pastel olive
#

change IsoGameCharacter

#

to your player

#

object

#

its class name i just write for example

violet shell
#

so would be IsoWorld.instance.helicopter.setTarget(player:getPlayer);

pastel olive
#

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

violet shell
#

I run the function with a onCreate in a recipe

pastel olive
#

so you should get player

#

i think

#

yes you can

#
  1. argument is player
#

items, result, player

#

like this

#

but im not sure player is id or object

violet shell
#
    print("Call function entered")
    IsoWorld.instance.helicopter.setTarget(IsoGameCharacter);
    end```
pastel olive
#

change IsoGameCharacter to player

violet shell
#

ok

pastel olive
#

or

#

if it still giving error

#

try this

#

getSpecificPlayer(player)

#

it pulls player object from player id

violet shell
#

so you should add : local player=getSpecificPlayer(player)

valid stump
#

no the player gets passed to the function by the client/server

pastel olive
#

is it id or object

valid stump
#

object

pastel olive
#

IsoWorld.instance.helicopter.setTarget(player); should be enough then

#

right?

valid stump
#

let me look into that

pastel olive
#

in some code it just passes as player id

#

not object

valid stump
#

but it should be

pastel olive
#

like in OnFillInventoryObjectContextMenuevent

#

it just passes id

#

not object

valid stump
#

Not on create

pastel olive
#

ok

violet shell
#

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```
pastel olive
#

well that error is not helpfull

violet shell
#

yup ๐Ÿ˜ฆ

pastel olive
#

let mee see wait

#

looks like helicopter is not defined

#

just gives nil

#

cant access from lua maybe

violet shell
#

but why we could access some of the java functions (like getXXXX() ) and not others ?

pastel olive
#

actually i dont know

#

but from lua i cant access isoworld.helicopter

#

but luamanager can access with testHelicopter()

violet shell
#

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?

pastel olive
#

i think we cant acess isoworld

#

or we are using the wrong aproach

#

i couldnt find a way

violet shell
#

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 ?

pastel olive
#

just merge

#

you can use like this

violet shell
#

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 ?

pastel olive
#

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

violet shell
#

I don't want to change states, but to detect when the states changes ๐Ÿ™‚

pastel olive
#

yeah same thing

#

still cant access helicopter class

violet shell
#

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 ?

pastel olive
#

yeah could work

#

code is already available

#

you just need to convert to lua

#

which is not hard

violet shell
#

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 ?

pastel olive
#

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

violet shell
#

ok, but, if we rewrite the helicopter function, as there are other java calls in it, we would hit the same brickwall right ?

pastel olive
#

actually dont know

#

i think

#

it can be done

violet shell
#

would you agree to try with me (and if so maybe we should continue with PM instead of flooding here) ?

pastel olive
#

yeah

#

lets try

violet shell
#

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 ๐Ÿ™‚

severe ridge
#

2 references ๐Ÿค” guess thats enough

fallow bridge
#

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

severe ridge
#

Hypochondriac is linked to fake infection right?

fallow bridge
#

yeah

severe ridge
#

which can actually kill you easily xD

fallow bridge
#

yeah

#

the thing was

#

it was killing people no matter what

severe ridge
#

indeed

fallow bridge
#

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

severe ridge
#

works the same way as infection mortality none now

#

you get sick but not fatally

fallow bridge
#

it just did to much damage for too long

severe ridge
#

adn would appear even for scratches easily

fallow bridge
#

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"

severe ridge
#

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

fallow bridge
#

i only know of hypo being removed

severe ridge
#

there was free points just to be a angry person

fallow bridge
#

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

severe ridge
#

Short Tempered Negative Patient +4 "Quick to anger." Jumps from not angry to Furious when npc rejects team request.

#

hahahahhahaha

#

shotgun angry YOU WHAT?!

fallow bridge
#

lol

#

i wasn't around at that time

severe ridge
#

Light Drinker Negative Hardened Drinker +2 "Gets drunk quickly" Gets utterly shit-faced moodle when having one drink of any sort of alcohol.

fallow bridge
#

i started playing during the mid age of B40

severe ridge
#

Brooding Negative - +2 "Recovers slower from bad moods."

#

hungover < this was hungover lmao

#

kind like a nerf for staying indoors for too long

#

i've been around for too long i guess lmao

fallow bridge
#

lol

severe ridge
#

minecraft was something ive discovered with TF2

#

pz was something ive discovered with minecraft lmao

lyric drum
#

What happened to paw low loot mod?

stone tapir
#

@lyric drum Apparently Paw took it down because he was receiving lots of harassment from people on steam about it.

lyric drum
#

Awww shit

#

My disappointment is immeasurable and my day is ruined

stone tapir
#

Well, that's literally 99% of gaming communities for ya.

#

Especially steam hub.

lyric drum
#

๐Ÿ˜”

slow spade
#

@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

#

๐Ÿ˜Ž ๐Ÿ‘Œ

violet shell
#

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

drifting ore
#

just wanna see how many straps can fit in one character :V
@severe ridge that hair looks great, did you make it?

severe ridge
#

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-

grave lion
#

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?

severe ridge
grave lion
#

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.

severe ridge
#

you can replace soundtracks, menu tracks and such but ive never done myself :/

#

you just need the right addresses

grave lion
#

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

severe ridge
#

don't share music like that in mods xD pretty sure you can use yourself tho (if you dont stream etc)

grave lion
#

Yeah that would just be for personal enjoyment

late hound
#

I am doing custom music for my christmas mod. ๐Ÿ˜›

#

Its all got to be royalty/copyright free music if you want to upload it

grave lion
#

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?

severe ridge
severe ridge
hexed anchor
#

rj shirts on females kind of make him look like a troglodyte

severe ridge
#

we're all a little troglodyte under bewbs u.u

violet shell
#

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

valid stump
#

@violet shell oncreate only way

violet shell
#

ok thanks ๐Ÿ˜„

violet shell
#

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 ?

left lintel
#

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

raw violet
#

has anyone worked with ninja ripper? thought to pull char model, but the program only creates log file

lapis blade
#

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 ๐Ÿ˜…

calm portal
#

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
#

Np, found the solution

#

but I have new problem now, I hope I can solve that one too

radiant ginkgo
#

@lapis blade There is a menu Blood Levels: right click on vehicle

lapis blade
#

I know, found that one

#

but the textures are not loading

radiant ginkgo
#

Ah

#

You need this in name: Blood_Hvy ; Blood_Mask

lapis blade
#

I got that one too

radiant ginkgo
#

WaldaSuperCars_Blood_Hvy.png

#

Like this

lapis blade
#

I know

radiant ginkgo
#

Not working?

lapis blade
#

and I have it like that

#

Im renaming it and changing some other stuff

#

weยดll see

radiant ginkgo
lapis blade
#

It must be the one and same texture for mask and hvy am I right?

radiant ginkgo
#

You put in overlay?

lapis blade
#

must be like that

#

ye

radiant ginkgo
#

Yes

#

Same textures

lapis blade
#

Aye

#

that might have been the problem

#

I will load it in now

#

weยดll see

shrewd grove
#

walda, dont forget to add the multiUV definition at the top of the script when loading the model.

radiant ginkgo
#

Yes

lapis blade
#

aye

#

Im on it

shrewd grove
#

without multiUV, it doesnt load the damage map.

lapis blade
#

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

shrewd grove
#

did you set up the multi UV within blender itself?

lapis blade
#

ummm

#

wot

shrewd grove
#

within blender you gotta set up that multiUV stuff

#

shit wrong one

lapis blade
#

so I need to open my model and make some stuff there?

shrewd grove
#

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

lapis blade
#

damn

shrewd grove
#

if you want the basegames, use the pic above.

lapis blade
#

that sound coplicated

shrewd grove
#

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

lapis blade
#

oh god

#

well

shrewd grove
#

thats all thats actually to the custom damage map.

lapis blade
#

Looks like my vehicles will be without blood textures forever ๐Ÿ˜„

shrewd grove
#

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

lapis blade
brisk forum
#

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" ?

shrewd grove
#

yeah, you'll loose it UNLESS you edit the basegame damage map to include them.

lapis blade
#

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?

shrewd grove
#

yeah, then just reexport the model with the multiUV setup

#

if not, it doesnt update lol

severe ridge
#

oh

lapis blade
#

I think it worked @shrewd grove

shrewd grove
#

there ya go

#

haha

lapis blade
#

Yup, its great. Thank you ma man!

shrewd grove
#

NP

lost spear
#

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

drifting ore
#

well

#

they don t show temperature or date

#

only digital ones do that

true mesa
#

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

drifting ore
#

i don't like it

#

but you should test it for yourself

shrewd grove
#

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.

bright tartan
#

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

drifting ore
#

they might have also died

bright tartan
#

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

drifting ore
#

because of zombies

#

if too many zombies are round they will start getting sick and dying

sick thistle
#

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

drifting ore
#

also hostile survivors are everywhere

#

for example deathsquad people run around everywhere

lost spear
#

No itโ€™s a conflict of mods.

sick thistle
#

Oof

lost spear
#

The digital watches donโ€™t show temp or date just time

bright tartan
#

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

lost spear
#

Raiders are the death squad.

bright tartan
#

Oh, yeah I never really met them then

lost spear
#

They will come eventually.

bright tartan
#

Do they come with the mod or are they already in the game?

lost spear
#

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.

bright tartan
#

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

violet shell
#

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 ?

quiet kiln
#

How I can make a specific mod have priority over another?

#

I want to force the changes of mod A over mod B.

violet shell
#

@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)```
quiet kiln
#

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.

violet shell
#

then you should use the event system I guess ?

quiet kiln
#

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.

severe ridge
#

and still gots the jacket and sweater slots to fit in (without clipping)

lilac night
#

That looks nice!

uneven dome
#

Love the tactical combat shorts.:3

severe ridge
#

theres a better one ๐Ÿ‘€ with holes on the side and back pockets hahaha

valid stump
#

@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

violet shell
#

@valid stump Thanks ! @quiet kiln You should check FueledByOCHD just before, it could help you ๐Ÿ™‚

valid stump
#

@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

violet shell
#

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 ?

valid stump
#

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.

violet shell
#

@valid stump Clever, clever... ๐Ÿ˜„

valid stump
#

Clever clever????? i dont think i get it @violet shell

abstract raptor
valid stump
#

Anyone here need modding help?

tame mulch
#

Has anyone worked with Java Array (not arraylist) from Lua? How get access to element of array?

drifting ore
#

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

iron salmon
#

i won t tell you how to get access to the element of array
@drifting ore Please drop the trolling, especially in here.

drifting ore
#

will do lord NasKo

severe ridge
#

why mod hardcoded stuff if you basically wont be able to share it properly for mods anyways? ๐Ÿคท

valid stump
#

@tame mulch what exactly are you trying to do? I might be able to help

tame mulch
#

@valid stump Example: method Color.HSBtoRGB(1, 1, 1) return Java.Array. I cant get access to elements of array

valid stump
#

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

severe ridge
#

you can set color in item scripts too

#
        ColorGreen = ,
        ColorBlue = ,```
#

values to 0-254

tame mulch
#

@valid stump from lua

#

@lost slate I want repaint sprite by get color of car.

lost slate
#

Wrong person :p

#

@severe ridge here you go my puffy bro

tame mulch
#

This is where the difficulty lies. Also there is no access to the class Array, so i cant Array.get()

tame mulch
#

@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
#

@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!

pastel olive
#

@tame mulch

#

its :get not .

tame mulch
#

:get not work too

pastel olive
#

and looks like the thing you are accesing is not array

#

its integer already

#

look your console error

#

lang.Integer

tame mulch
#

[L - is prefix for Java.Array

#

also in Java source code that method return array

pastel olive
#

sorry im on phone cant help much and cant decompile

#

but for java array get should have eork

#

work

#

thats weird

tame mulch
#

I think you confused ArrayList and the Array[]

pastel olive
#

dont you try to access array not arraylist

#

can you try Array.get

tame mulch
#

By Lua i dont have access to Array

pastel olive
#

oh ok

valid stump
#

@tame mulch I belive thats because it is using interger[] hmm give me a min

valid stump
#

Hmmm little wierd that the dev's didnt expose the array class

tame mulch
#

yep. Or PZArrayUtil

valid stump
#

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

craggy furnace
#

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

late hound
#

lol nice analogy

its like trying to write your name with a brick
@craggy furnace

craggy furnace
#

its honestly true

#

its what keeps me from serious PZ modding

tame mulch
#

As for me, it is not the lua that limits, but the api limitation that is available from the lua

craggy furnace
#

at a point, it becomes very inefficient

#

you are taking 3 steps for every one that is necessary

valid stump
#

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

iron salmon
#

@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]

shadow dust
#

how can I modify existing code?

#

for a mod

#

like

#

being able to pour bleach on the ground or something

valid stump
tame mulch
#

@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

violet shell
#

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?

tame mulch
#

Is the name of the new function exactly the same?

violet shell
#

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```
uneven dome
#

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.

violet shell
#

ISCraftingUI:render() issue solved thanks to FueledbyOCHD !

near copper
#

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

valid stump
#

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 ๐Ÿ™‚

unique copper
#

Did Hydrocraft again broke the building system?

near copper
#

y

humble kernel
#

why did you put edit:

#

you could have just wrote a new message

near copper
#

clear and concise

plucky nova
tame mulch
#

@iron salmon, Where can get a detailed changelog?

iron salmon
#

There hasn't been an update yet, but once there is it'll be on the forum

shrewd grove
#

what can i expect in terms of vehicle mods?

#

:3

hoary veldt
#

Hi, I was wondering if someone had a couple minutes to help me find some info on how to do a mod?

late hound
#

@hoary veldt I DM'd you. shotgun rj

severe ridge
severe ridge
abstract raptor
#

... armored knee pads

#

no thigh protection

severe ridge
#

gotta have that 10-20% fan service ๐Ÿ‘Œ

#

but the full set has a full legged armour xD like in the top

severe ridge
#
group:getOrCreateLocation("Belt420")```
hexed anchor
#

I miss pawlow loot...

#

everytime I see a blue hair it reminds me of it...

fringe anchor
#

Looks like anime character

valid stump
#

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 ?

severe ridge
#

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

valid stump
#

give me some time and i can help you with that

misty flint
#

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

tame mulch
#

@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)

valid stump
#

Oh, i already found the answer, Thank you for the offer though @tame mulch

tame mulch
#

Do you need the ability to make a chain of cars/trailers when towing?

spiffo YES
zombie NO

severe ridge
#

in a very limited way, i guess yes spiffo ๐Ÿšฌ

vocal bloom
#

spiffo #

drifting ore
#

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

severe ridge
#

pretty sure is by id :f (?)

tame mulch
#

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

drifting ore
#

yes and i dont know how to do that

tame mulch
#

how load before?

drifting ore
#

ye

#

i know it sounds silly but

#

ye

tame mulch
#

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

drifting ore
#

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!

sterile elbow
#

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 stressed 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.

plucky nova
#

I did not know eerie county was split up into chunks

solid creek
#

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

shrewd grove
#

are you using super survivors or superb survivors?

solid creek
#

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.

willow estuary
violet shell
#

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) ?

severe ridge
#

Give me fuel, give me fire Give me that which I desire, ooh!

valid stump
#

@violet shell I do not recommend doing that

#

the add function makes for better compatability with other mods

shrewd grove
#

well blair, guess i should get to work on my fuel things

pine tree
#

does anyone know if it would be possible to add MORE zoom levels to the game?

#

would be nice for high res monitors

blazing drum
#

You have watched in the parameters

#

?

severe ridge
#

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

sterile elbow
#

can anyone in here give me some advice in creating a mod?

#

trying to add an new options menu page,

valid stump
#

@sterile elbow You should check out the code of the mod on steam "Mod Options"

pearl marsh
#

What is that tactical mod

#

Is it on the workshop already or are you just teasing us?

severe ridge
#

teasing/testing xD and maybe having someone that knows how to do the model swap thing in reloading

violet shell
#

Anyone knows if the mod PZ Blood Cure has been removed from the Steam Workshop and why ?

sterile elbow
#

@valid stump Thank's I will!spiffo

abstract raptor
#

how would I just say... perma set the climate to have a perma red hue? ๐Ÿ‘€

#

(I just wanna accomplis this)

severe ridge
#

anyone have any idea on how to make a clothing item work as a two-way radio? :x

violet shell
#

Did you try to add radio arguments in your item definition ?

topaz pendant
#

hay i had the harry better ammo icon mod enabled but i think something causing the 308 magazine to error up

violet shell
#

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" ?

humble kernel
#

@topaz pendant hey uh whats the mod called that makes the hatchet retextured

#

nvm found it

#

sorry for ping

tame mulch
#

@violet shell if you put your item in Base block - "Base.Item1". If you put in block MyMod : "MyMod.Item1"

violet shell
#

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 ?

violet shell
#

I'm messing around time and game time. Anyone already explored that and would help me to figure it out ?

severe ridge
#

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 ๐Ÿ˜†

violet shell
#

ok, because you have 2 types for 1 item : type = radio or type = clothing, right ?

severe ridge
#

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

tepid token
#

Sorry if this is the wrong channel: How do I turn off the sounds for NecroForge?

violet shell
#

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 ?

craggy furnace
#

@violet shell yes

#

azakaela has

violet shell
#

ok, I'm already chatting with her ๐Ÿ™‚ I'll wait she's available then ๐Ÿ™‚

tame mulch
#

@tepid token just turn off sound when it open?

#

Maybe help just delete sound file from mod folder

scenic coral
#

@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

pearl marsh
#

akshualley

#

He wouldn't blow up

#

Since grenades need to travel for a specific amount of time before arming

valid stump
#

not if they are home made ๐Ÿ˜›

#

it is survival situtation ๐Ÿ˜›

severe ridge
#

Whatever mrbeaverton

latent orchid
#

anyone know a reliable source for PZ events/api?

#

b41

tame mulch
#

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

severe ridge
latent orchid
#

thanks both for the response ๐Ÿ‘

violet shell
#

hope it will help you.

violet shell
#

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/

crimson fractal
#

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.

tame mulch
#

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)

drifting ore
#

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

severe ridge
#

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

violet shell
#

Anyone have messed up with Tooltip stuff ? I would know if I can have on a tooltip some modData of an Item... ?

valid stump
#

Check out media/client/ISUI/ and look for inv tooltip

#

At least I think that is where to look

severe ridge
#

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

violet shell
#

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 !

severe ridge
#

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)

crimson fractal
#

@tame mulch Interesting... It certainly could work, but I can't find a function or method that "scans" for zombies, what is it called?

tame mulch
abstract plank
#

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

late hound
#

G:\Applications\Steam\steamapps\common\ProjectZomboid\media\scripts

#

File: items_weapons.txt

abstract plank
#

๐Ÿ˜ฎ 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?

late hound
#

grepWin is a godsend search tool

#

hehe

abstract plank
#

grepWin eh? takes notes

late hound
#

& 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.

abstract plank
#

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

late hound
#

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.

abstract plank
#

thanks, i will look into it ^^ it shouldn't be super hard from here

tame mulch
grand walrus
#

i winder if it's possible to mod a trailer

#

a vehicle with only a trunk

tame mulch
#

it possible

grand walrus
#

even without seats?

tame mulch
#

yep

grand walrus
#

wow, this system sure is flexible

#

i wonder what mods will come out when we finally get full-scale vehicle upgrades

latent orchid
#

I could see that specific locations function opening up some mission-type mods in the future

#

Give players a distraction from time to time

violet shell
#

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).

left lintel
#

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

lost spear
#

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

severe ridge
#

me -v- probably back soon, just waiting for patches, twas bad

valid stump
#

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 ๐Ÿ™‚

valid stump
#

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

latent orchid
#

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

violet shell
#

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 ?

latent orchid
#

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,
        },
    },
violet shell
#

What I understand is that in the PlanStashMoney, it rolls 6 times

latent orchid
#

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.

violet shell
#

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 ?

latent orchid
#

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?

willow estuary
#

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.

latent orchid
#

but these are ProceduralDistribution entries, not tied to containers specifically

violet shell
#

I agree with Blair Algol. In your example, we can assume that the PlankStashGun are a lot less common than PlankStashMoney

latent orchid
#
    PlankStashMagazine = {
        rolls = 7,
        items = {
            "Magazine", 30,
            "HottieZ", 30,
        },
    },
#

What about this?

#

It rolls 7 times and what happens?

violet shell
#

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

latent orchid
#

so the roll itself is a value out of 100?

violet shell
#

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

latent orchid
#

i apologize for all the questions ๐Ÿ˜ฆ

#

im just trying to 'speak' this out as if i was watching a value tumble through the process.

violet shell
#

in fact it's not a zombie.rand

#

sorry

latent orchid
#

a roll between 0-100 results in 74

violet shell
#

randomizedBuildingBase = IsoWorld.instance.getRandomizedBuildingList().get(Rand.Next(0, IsoWorld.instance.getRandomizedBuildingList().size()));

latent orchid
#

what then based on the magazines?

violet shell
#

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...)

latent orchid
#

so there is a chance, no magazines spawn even though there is only 2 item choices? correct?

violet shell
#

yup

#

that's what I understand

#

and that makes sense to me

latent orchid
#

ok, thats what confusing me

#

i assume something always appears

violet shell
#

but you have to multiply the chances of each item by the number of rolls

latent orchid
#

so 100 forces appear

violet shell
#

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

latent orchid
#

so a roll of 3, which is most tends to be fairly light loot?

violet shell
#

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

latent orchid
#

this really helps

#

thanks

violet shell
#

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

latent orchid
#

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

violet shell
#

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

latent orchid
#

heres an example of the custom ProceduralDistribution lists im considering for my custom mapping

violet shell
#

Sorry, I didn't have time to dig in distribution stuff much yet, so I even don't understand your file ๐Ÿ˜„

latent orchid
#

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?

violet shell
#

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) ?

latent orchid
#

i think i found the functions

violet shell
#

There is a java file : ItemPickerJava.class

latent orchid
#

all under zombie/inventory

#

yeah itempickerjava

violet shell
#

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

latent orchid
#

the function rollContainerItem is what im trying to understand

violet shell
#

and then the inventory is saved ?

latent orchid
#

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?

violet shell
#

There is also a rollItem function

latent orchid
#

seems difficult to read this code

violet shell
#
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())); 
              }  
          } 
        } 
      } 
    } 
  }
latent orchid
#
            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

violet shell
#

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

latent orchid
#

been watching and reading as you type

#

so using the magazine example with only 2 items each at 30 chance

violet shell
#

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

latent orchid
#

so why do they go and do this

    CrateAntiqueStove = {
        rolls = 1,
        items = {
            "Mov_AntiqueStove", 100000,
        },
    },
#

would 100 not suffice?

violet shell
#

100 is enough if I got it right

#

let me dig more into the code then

latent orchid
#

so after your very helpful explanation, ive come to the conclusion that some of the loot tables have no real logic to their numbers!

violet shell
#

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

latent orchid
#

yes, that is a good point and makes sense

violet shell
#

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 ๐Ÿ˜„

latent orchid
#

i can do that with my custom map as i already am using my own definitions

violet shell
#

but I don't know the devs so I cannot help

latent orchid
#

they never reply to any of my pings, game up

violet shell
#

I'm very much interested in the results of your investigations and tests ๐Ÿ™‚

latent orchid
#

gave

#

ill play around tomorrow as really late

violet shell
#

sure

latent orchid
#

i can try diff settings and see as for now i havent put much care into my chance values

violet shell
#

please send me the results in PM, so I don't miss it

latent orchid
#

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)

willow estuary
#

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.

violet shell
#

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 ?

quiet kiln
#

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.

pastel zinc
#

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.

hexed anchor
#

I mean

#

If you want to publish the mod, then yeah

pastel zinc
#

Is it pretty typical for people to have that separation between professional and personal projects when it comes to modding games?

hexed anchor
#

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

pastel zinc
#

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.

hexed anchor
#

I'm pretty sure that won't happen, but better safe than sorry

pastel zinc
#

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.

hexed anchor
#

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

violet shell
#

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 ?

pastel zinc
#

Yeah itโ€™s already up on Steam Workshop, Iโ€™d just like to leave it open source on GitHub too.

willow estuary
#

There are absolutely multiple obsessive personalities who fixate on mods/modders. Don't give them any means to grief you outside of PZ.

severe ridge
#

Pp popo

violet shell
#

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 ๐Ÿ™‚

quiet kiln
#

Yes! I just saw your reply in the forum.

#

I just need to know how to do that.

violet shell
#

I correct myself :

#

There is also a setMaxWeightBase() function

quiet kiln
#

I just need to create a lua file or I need to put that inside a specific hierarchy of folders?

violet shell
#

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 ?

quiet kiln
#

Let me check this mod.

violet shell
#

lua file is the way to go, you don't have choice for that ๐Ÿ™‚ but is it server/client/shared, I don't know ๐Ÿ˜ฆ

quiet kiln
#

Okay, I created the file. Gonna test now.

quiet kiln
#

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.

violet shell
#

@quiet kiln Can you try :

self.character:setMaxWeightBase() = 2
quiet kiln
#
#

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 );```
violet shell
#

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

quiet kiln
#

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 ?

severe ridge
#

easiest way to get extra carry weight is a negative weight item ๐Ÿ˜†

violet shell
#

@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

quiet kiln
#

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.

violet shell
#

yeah, but it also slows you and hurts you

quiet kiln
#

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.

violet shell
#

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

quiet kiln
#

the function should check the overload status, and if yes, then bypass the addItem
@violet shell That would be the ideal.

quiet kiln
#

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);

final plinth
#

I'm trying to make a vehicle mod

#

and the overlays are not working even remotely how they should

#

any ideas?

#

can send screenshots

final plinth
#

nevermind

#

figured it out i wasnt using multiple UVs

violet shell
#

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 ?

violet shell
quiet kiln
#

Thanks! Gonna give a try in the next hour.

quiet kiln
#

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?

pastel olive
#

what condition specificly

quiet kiln
#

if player:getInventoryWeight() > player:getMaxWeight() then

#

So the traits will be added once the base weight is reached.