#βπmods-making-discussion
1 messages Β· Page 93 of 1
quick question guys
what files control the inventory stats?
I'm looking to remove the power bar files from a UI mod that I have installed so that I can try the one that comes with GAMMA
How do I edit starting loadouts? Do I just add another entry like my post above?
almost certainly with a new dltx file since that file would have a new root
I'm trying to make the path work, but it doesn't.
If i put my values under the [custom] bracket in the actual loadouts file itself, it works.
But if i try to put this config under my own mod using the same path and the filename:
GAMMA\mods\Smg_in_vision_slot\gamedata\configs\items\settings\mod_system_zz_startingloadouts.ltx
It doesnt work.
The file looks like this:
![custom]
wpn_kar98_retrotac = true,1,0
step one have this open in a tab and read it https://igigog.github.io/anomaly-modding-book/addons/dltx.html because you are making one of these files
you must, MUST, follow these rules when creating a dltx file:
- The location of the DLTX file must match the location of the root file it is modifying. If the root file is in
gamedata/configs, you put it ingamedata/configs. If it is ingamedata/configs/items, put it there, etc. - The name of the DLTX file must follow this convention:
mod_rootfilename_yourDLTXfilename.ltx
- Therefore, if the root file you are modifying is
system.ltx, your DLTX file must be calledmod_system_myDLTXmod.ltx - If you are modifying, say,
new_game_loadouts.ltx, your DLTX file must be calledmod_new_game_loadouts_myDLTXfilenamehere.ltx
stg maybe i should just write this fucking guide once and for all
you should at least pin this message
and refer to it the 1000x people ask about dltx
i was gonna full on write a thing lol
When you say rootfile do you mean the file I am trying to edit?
kind of but it's more complicated than that
yeah that'd be great
let's go with "yes but it's complex" for now
So if i want to edit new_game_loadouts.ltx, i would name my file mod_new_game_loadouts_zz_mysicknameforthisfile.ltx and put it in the same folder path as new_game_loadouts.ltx but inside my custom mod?
can you dltx weather files though for example?
i always thought you couldn't because it ain't included in a root file, i think they're just read on the fly
i don't think so
i remember raven saying something to that extent and if there's anyone i'd trust to know, it's that guy
you don't need the zz
otherwise yes
I see? I heard (long ago now) that the z count is priority or something?
this is such an awful half truth that needs to die
DLTX files are loaded alphabetically, last loaded wins. You therefore only need to do this kind of shit if you are concerned that some other DLTX mod will directly and precisely overwrite the changes you made. I can guarantee you that whatever you're trying to do with new game loadouts in vanilla gamma, it is not going to get affected by other DLTX files
Ah i see. Makes sense about the alphabetically ordered loading.
Is the default startup_ammo taking the ammo listed in ammo_class and taking the first one?
As in if fmj is first in that list, then that's the "default ammo"?
And where can we see bullet count per "ammo container"?
It's hard when you're not used to the lingo or naming "standards" 
each ammo section has ammo_in_box or something like that
Is startup_ammo referring to boxes of ammo or individual bullets?
it's for multiplayer
Isn't it also what you get when you spawn in a new game based on the weapon(s) you chose?
Just tested it, it's not.
ye i figured
anomaly doesn't use any of the multiplayer ltx fields anywhere
and it's extremely rare for people to reuse them in mods
there's not a single reference to it anywhere in the source code
i just checked
is there a way i can manually change the stats of pelts for my game? cause i feel the pseudogiant hide was over nerfed into being worse then some other parts in utility
mod_system_grok_pelts.ltx in Gamma folder\mods\G.A.M.M.A. Artefacts Reinvention\gamedata\configs
thank you
over tweaked or balanced enough?
I mean, presumably you made the mod for you, put in some testing time and see if it works
How do ya print log output to a cmd window? Cant see whats goin on w/ ma SHIT
printf([shits])
way ahead of ya
live view in a cmd prompt window is what Im lookin for
console in game prints fuck all lines
yea im looking for that as well 
You can't do this natively with cmd, but you can do it in PS console with opening stream from Anomaly log file
For example:
Get-Content log.txt -Tail 10 -Wait
will open log.txt with latest 10 lines showed from it.
So if you combine proposed above printf command with PS log stream - you will have somewhat compact real time view. If it's what you trying to achieve.
Mad lad, cheers
ah nevermind, the log only dumps from console when you close the game or crash. it does up to engine init and then no output till its done
Well, in this case you can filter log by your entry if you not comfortable with CTRL+F in your editor.
For example you make prints into console with some unique tag like "[MyScript] Cool text"
Then inside log you can querry via PS this [MyScript] entry like so:
gc "C:\path\to\logfile.log" | ? { $_ -match "\[MyScript\]" }
I hope some X-Ray experts could you help more than me, tho.
Cheers anyway, but its all the same unless I can get it the console to output to log during gameplay. All works fine atm just have to close the game if I want to see the full log
it should probably be added to the anomaly modding book too, it doesnt really explain how to find roots or what they really are
You can set up code to log to a .txt
That's how I did it
I can send you the code or you can just tell SlaveGPT to do it
Is there a difference between .45acp and .45 Hydro-Shok VELOCITIES or do they both read from the gun they are being fired from?
difference :
first has more ap
second has less ap
but HS has more damage multiplier
literally all
I understand, im refering to the Velocity specifically
the bullet has it's own velocity too, but i dont remember which line goes to it
like one of the helpers said :
interesting, thank you
On the note of pelts, how do we revert the "1 pelt only" setting that we have now?
I need my hides 
it kills me too but im all for hardcore
Can you not printf() then just open the ~ console, use pgup and pgdown to scroll
And the reason why it doesn't print much is cos tosox minimod has "log spam remover" as an option by default, it removes all log lines printed by mods. Find and reinstall it without the log spam remover option in mo2
Was doing it to begin with. Was doing my head in. needed to see more of what was happening lol. I'll keep log spam remover in mind tho for next time
just prefix the log messages with -- to make them green
or use the pda notifications so you can pull up your pda and see on the logs there
or make short log messages and use set_msg to show them on your screen
or write it to a log file
i can think of 2000 different ways of logging shit 
it removes printing from gbo and two other mods idr their names
but it doesn't completely suppress printf like what grok had done ages ago when he edited _g.script for it
Where can i find the anomaly startup splash screen? Want to edit it for fun.
I think you have to recompile the exe
- Wrote a "how to make DLTX files" guide for dummies https://github.com/veerserif/gamma-dashboard/blob/main/dltx_guide.md
- (2025-07-10) How to make selective XML overwrites without DXML https://github.com/veerserif/gamma-dashboard/blob/main/xml_overwrites.md
- Explanation of how armor items' BR class and AP resistance is calculated for the player #βπmods-making-discussion message
in my usual fashion it's overly long and wordy
but hey i explain what the fuck a root file is
maybe i missed it but you dont mention how there can be multiple root files, when some inbetween ltx file gets directly loaded into a script
i don't mention it cos i didn't know 
i'll go make an "extra notes" category
don't want to interrupt my nice simple "root file is last in the chain of includes"
When a script loads ltx file directly like
ini_file("items\\settings\\npc_loadouts\\npc_loadouts.ltx")
its another root
i dont remember but there was some ltx that was both in system.ltx and some script that loaded ltx files in the middle of the chain of includes
so you had to make 2 dltx files to cover both roots (system.ltx one and script one)
extremely stupid, but thank you for telling me, will rewrite the section
the modpocalypse has to happen
Only thing I've found before was stuff like weapon upgrade files, but i have no idea if they are used in anyway through system.ltx
They get include chained into system.ltx but also called in inventory_upgrades.script
We talked about it back here #βπmods-making-discussion message
is shit like this documented in the book
i haven't read it in a long time
i have a lot of seemingly obscure tech that i'd like to add but ||i barely know how pull requests work, let alone contributing to a project||
The book doesnt cover what roots actually are
or how to find out what they are except "use ltxdiff findroot lol"
ok, my guide is updated with a better definition of root files + the multi-root thing + an FAQ at the end
the content of dltx files is explained well in the anomaly modding book, just the "what to name the file" and "where to place it" isnt that nice. But igigog is also active again so maybe there'll be updates to it (im too lazy, i rather write the same thing 100 times here when someone asks) 
Do you know a good way how to do that?
also, turns out ini highlighting for the code block works great for ltx files (which of course they do)
follow the tutorial in the modded exes repo
alrigth
is there a way to do a notepad++ search through mo2 on virtual folders?
yes, just launch notepad++ through MO2 (edit: it is noticeably slower to start the find-in-file search this way)
although i find doing find-in-file through the entire mods folder is usually fine if you use the filter (e.g. *.ltx for only ltx files), then you copy paste likely suspects into MO2 file search to see who actually provides the file
oh theres a filter? 
i usually just let it run through mods and stop all productivity for half an hour 
Hey guys, is there a way to make gun oils and cleaning solvents etc repair weapon parts below 60%?
ez way: disable G.A.M.M.A. Guns Have No Condition, obviously disables the whole "guns don't have an overall condition" thing
hamsters looking through a billion .ogf files to find 'wpn_pm' 
I see, so what you're saying is it basically reverts to the old weapon condition system, correct?
!mo2search // moderately harder way: hide the fileG.A.M.M.A. Guns Have No Condition/gamedata/configs/mod_system_zzzzzzzz_GAMMA_guns_no_condition_repair.ltx
@jovial dragon Use the mod name search bar to find mods in MO2, and use the mod files search bar to find which files are from which mods. ||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β|| _ _ _ _ _ _ https://cdn.discordapp.com/attachments/1098945649929617478/1165045267637211156/mo2-search.png
Is there any difference between the methods?
I mean, results wise.
Thanks for the help btw really appreciate it man
ez way : pros you can now repair it under 60%
cons your guns have condition now
simple innit bruv
ez way reverts the entire "guns don't have overall condition, condition locked at 85% after you shoot once" thing
moderately hard way only reverts the "you use only cleaning kits to fix gun parts" thing
Brilliant
you can even do multiple filters, e.g. *.ltx *.xml for "search only xml and ltx files"
I usually search atleast script/ltx/xml
any idea where the mutants part skinning comes out from?
since i need it for my mod
and im too lazy to update gamma
well fuck my life i guess
which bit of the mutant skinning are you referring to? pelt drop, skinning anim, loot table, what?
thanks
The chances.
The knives.
Found what I needed in 3 minutes
the percent chance of them being in good condition using specific knives
fun fact i usually start by doing a discord search inside #π’development for this kinda stuff
and then from that message i can probably look at the commits directly before/after lol
i need to see that
literally that because im
an idiot

that still runs 0.9.1
(but rather the one who enjoys the game)
https://github.com/Grokitach/Stalker_GAMMA/commit/3b37facffd9be7d07c3cfc6bc3aab48c8bee109c collapse the changes made to the xml files, you want the script file edit at the end
the power of search
you could edit it by unlocalizing the table 
what the fuck is that indentation
the indentation going from ltx -> github -> back gets fucked, constantly
Its for The Visionβ’
the tables are complete gore
also a lot of "this was supposed to be opened in windows-1251 but got saved in utf-8 rip the whole file"
oh so microsoft is behind this
including a couple of complete text xmls lol
fuck microsoft
Thanks a million mate that worked perfectly!!!
That indentation is still like 5 tabs for no reason 
tho yeah for some reason github tabs are 8 spaces by default 
(its also personal account settings)
with normal person 4 space tabs its atleast a bit better
deranged amount of spaces
you can just download that one file from github
the diff contains the filename, search the github repo for it
then you ain't getting the script
So now I can use ramrods, oils etc but still can't repair weapon parts below 60 percent
Which is interesting because when I find Universal weapon cleaning kits it specifically says its for maintaining weapon PART condition below 20%
Yet it only lets me select weapons
Isn't it above 20%?
I never took a good look at it, but I think it says parts >20%
Apologies, above yes.
But my point remains the same
It's not letting me repair weapon parts below 60%, am I being dumb?
Did you get the part our of the gun?
Indeed.
you never could, threshold is 60% for all gun parts
in gamma anyway. has been for literal years
this kit is nerfed into the ground and should never spawn, at all, in gamma
Understood, thx
I thought I could somehow make the weapon part repair items like oils and ramrods etc repair weapon parts in lower conditions.
Just trying to make it a bit more fun, I really don' t have a enough spare time to farm Expert toolkits
And raising drop condition feels like cheating, even when it's on legend stalkers.
Could probably find this code but for the ramrods hmm?
quite frankly it is faster to just spam cleaning kit charges to magically fix parts INSIDE guns.
or repair kit charges, to magically replace parts with a 100% version.
Yeah but what if they're below 60
repair kit charge magically turns it into 100%
!repair // read the weapon repair kit, it's been updated
@misty mulch
Text guides about repairing, mantaining and cleaning your gun and your armor.
For weapons: #βπfaq message
For armors: #βπfaq message
A quick video about "how to repair stuff" (may be a little bit outdated): #βπfaq message
Yes, I know how the system works now, and I'm not a fan of it, what I mean is waiting to get a D repair Kit takes too long for example
Was just wondering if it's possible to edit the files to lower the threshold for repairing gun parts
make a dltx file (just wrote a guide for that) to edit every single part repairing item to have repair_min_condition = 0.01 or whatever you want the threshold to be
check first pin in here
You can buy that from high level mechanics if you don't want to farm it. I think you don't need expert tools that way
no you need to give them experts for them to sell Type D Repair Kits. On purpose
the entire point is that D kit guns are ALWAYS locked behind expert tools
Makes sense
i wanna remove guns from spawning in gamma. how do i do that
i want the game to feel somewhat close to vanilla with the additions of extra warsaw and nato firearms where i think is appropriate
Edit the files in GAMMA NPC Loadouts mod
I think then gamma is not the right direction, is it?
Stalker primal. Make them use bows
Is it possible to remove grass ?
yes
plese teach me
all grass sliders to 0 in settings/visual/advanced
Anything more than that ?
no
I was gonna make a little mod for my own personal use that just changes the weight of ammo (and maybe a few other things) to be a bit lighter, are there any mods i can go rip open and reverse engineer to figure out how to do that? (edit an items properties/weight in a non horrifically intrusive way) I dont need a full guide or anything, just an example to work off of

i didnt mean that u learn from it
just use it if u need more weight
else you love wasting time, then make a mod for decreasing ammo weight 
get into the ltx files. its basically english in there, find item_weight
something like this
i know there are a billion ways i could just get more carry weight, but id like to just tweak this one very specific thing without causing it to mess with the balance of everything else too much, and id like to learn a bit about modding the game anyways, this seemed like a nice simple starting point.
ty β€οΈ
just dont hoard too much the system have max items in the world
ye 600 milion gl with that
or if you want more ammo available, just make the box size bigger
hit that 3x
and its 65k
what exatly does "box size" mean? like the game will spawn ammo in sets of x in containers/on NPC's or something
max number of ammo in a box (single id)
a single box of 556 contain 15 (aroudn that) of ammo, so if you hoard 1500 ammo, it takes 100 id. make box size 100 and it only use up 15id
but i think it will generate more ammo looted havent check that
because i think the number of ammo in stash/dead body is % of the box size
id assume it would, but thats not an awful thing either... time to go write a python script to change these values by a fixed ratio...
thank you for your help β€οΈ
How can I put letters with an accent? like Γ³ on the game? on game they dont show properly x.x
read first pinned msg in here to learn how to make a DLTX file, and then change the item_weight of every ammo type
https://www.moddb.com/mods/stalker-anomaly/addons/no-grass-and-lods-great-for-winter-mods-and-potatoes
reverse engineer this, probably just replace the grass texture to a blank one
So which mod controls the viewmodels when leaning? Is it INERTIA?
Interesting, it does say "option to remove grass only". But further thought, wont it look weird with no grass lol. I think i shall try that npc cant see through grass 1st
Weapon inertia expanded
Wonder how much of a process it'd be to take the viewmodel settings for upright and right-lean and swap them
is there a mod to where the Player character will comment on events aswell in pda?
How do I get the current level of the character?
Edit: I got the answer: level.name()
Where (And how) do I unpack Item Configs? Trying to edit some weapon stats.
Run db_unpacker.bat in Anomaly/tools
Reference my DLTX guide, first pin here
any help with this, its probably error with render/shader
for context i managed to start desolation with updated exe with help of a dude, it now loads into main menu but past that nothing
this is for making mods, not trying to troubleshoot playing with them
and for desolation? you absolutely won't be getting much help in this server i think
it runs completely differently to anomaly, we really can't help
these 3 do with sun brightness thus decreasing the sky brightness also
for sky only i think you must do with skyboxes and i dont have any experience with that
alright, i got a question regarding dltx
putting stat changes for multiple guns in a single file. the change for ak74u is working regarding the hit power. but the akm recoil change does not work. does anybody know why? what am i doing wrong?
first - you don't need the bit after the : for the akm, since that's not really relevant (as in, you don't need to tell a section to inherit from itself)
as for why the recoil isn't changing, that would be because gamma doesn't use any of those values, it relies entirely on a new system introduced by enhanced recoil
yes you can dltx that but those values work completely differently to the cam_ whatever values
documentation for it is in the comments at the top of the enhanced recoil grok_bo_enhanced_recoil.ltx, so give them a read
im aware, it adds changes on top of the standart values of the gun. not brand new. i checked it and did some work there and some minor changes there as well due to how it was built all together. where wpn_akm is marked as a recoil change pattern and wouldnt work if i just actually added this gun overall.
but you need to change the original values otherwise it still would be different due to the groks enchanced recoil
wdym "wouldn't work if I actually added this gun overall"
groks enchanced recoil has a section named "wpn_akm" as a recoil pattern. so if i would type in the gun itself it would get a crash due to the line repeating spite being two different things
but ok, thats not really the point rn. you telling me to just have it like this?
well, tested it and thank you, that actually solved the issue
i was trying that but i didnt put " : " behind it and just had a crash. well, because i know nothing about coding really.
delete the : as well, it's not needed
when you write [section]:section2, you're telling the game, "make everything in [section] copy from [section2], except for the few things i specify here", and you generally do not want it to reference itself
that's what "inheritance" means fyi
alright, understood. fixed that mistake
now, the big question. how do i add a option for a gun to take two types of silencers?
Do you think it is easy to modify the appearance of the reticle in scopes?
The x10 scope that I use on the sks is not very visible, if there is an image somewhere I could modify it in photoshop.
You repurpose the script that handles multiple scopes to also handle silencers and then create meshes for the new silencer + scope combos
two types of silencers on a gun isnt supported by default
that is a super long solution. i was mor
ah, there. thats what i wante to know if it even is possible at all
its possible, just needs support for it 
because recreating every weapon is just a massive time consuming hassle
before the scopes list was added there was also only possible to have 1 scope on a gun
You're still gonna have an exponential number of weapon models
No one is gonna want to make that many weapon models for a silencer
Assuming you take a standard gamma model that has on average 14 scopes and 8 red dots, having two silencers per weapon already doubles that count
What you'd need to do to keep it down is to write a script that can hide and show bones depending on a specific silencer attached, then parent your silencer to the specific bone for it
i dont think i hav the skills to make the same for silencers. so i rather not. perhaps should avoid this idea all together
Just wait for anomaly 1.6 which will supposedly have an attachment system
raven has a script that does something like that
Maybe in 2028
idk if it's published tho
If it is it's gotta be somewhere obscure
Don't think I've ever seen it
Unless that's what cwwp is using for their attachment system
all it does is hide the mesh asigned to a certain bone when equiping a suppressor
which is useful when a gun has a big ass muzzle device or something
but i imagine that something like that could be reverse engineered to work for 2 suppressors
yeah, i really wanted to utilize that with my idea. instead of actually the second silencer being a silencer, i wanted to make something which is just muzzle devices. to reduce recoil in exchange for actually being silenced
make the suppressor work as a scope
i dont want to do that. thats just a huge hassle and even i know i could make it work in a lot more efficent way, i just dont have the skills to create a script to make the game accept multiple silencer options for a gun. so i rather avoid the idea in general for now
also, can anybody please explain what these values mean exactly?
its for ammo
k_disp is a multiplier for dispersion (inaccuracy)
k_hit is a multiplier for damage
k_impulse is a multiplier for ragdoll force
k_ap is ap (scaled down by a lot, that screenshot is 27 ap)
tracer_color_id is just that
wm_size is the size of the decal on impact
k_air_resistance is the damage/ap scaling factor over distance and also how quick the bullet loses speed
k_bullet_speed is a multiplier for bullet speed
the values after the semicolon are ignored
the values being multiplied all come directly from the gun's definitions
the modding book has an "ammo config parameters" reference which should explain all of it
oh, ok, let me look into that
that too
thanks for the answer tho
but to let me understand this bullet. k_ap of 0.027 is the armor piercing value so ingame this would count as br2, really close to being effective for br3? like, very similar to how tarkov pen values work?
and what is the other number of 0.4 behind it?
ap is a simple "if total AP value of the shot beats target's armor value, it penetrates"
the engine doesn't recognize "br", that is a made up stat for the stat card
so it being 27 doesnt mean shit, it might as well be 20
i THINK armor BR is an actual two-digit number representing the armor value x100, since all the hit parameters work on a 0.00 to 1.00 scale
I tried to make strayer voight to load 23x75. Put both slug and shrapnel into the ammo_class, but in game it only show shrapnel availability. What did i miss ?
it was
but it stopped being cared for when stat changes occured
which is super fucking weird because grok handwrites the stats to the description
so he just needs to edit the br number next to the ap one
but alas
which is why you end up with shit like x39 ap which has like 5something ap
but is listed as br6
newbies get super confused over that
so uhm....well, ok this got me confused a bit.
the number you see in the text editor right now is the one the engine and the script layer care about
not the one you see in the item's description
so br 50-60 is br5 and br 60+ is br6?
oh, yeah, that i understand. i genuinely want to change it up a bit , as well the description. idea is to get really influenced from tarkov when giving ammo its ap and damage values so i want to understand how they correlate between the games to gain a understanding what i would like to change
and perhaps adding a 4th type of ammo to have a option of budget ap ammo and stuff like that
therfore im asking what do those number mean, how it works ingame and how does the game understand them. because so far i understood the br rating being 0.27 means nothing and might as well be written as 0.2 because the game does not take in account the 0.7 to make it slightly effective against br3
Your mistake here is assuming "br3" on an armor description is meaningful. It isnt
brother you did not understand shit then
Enemy armor values do not follow the actual armor item stats
we're telling you that the br number doesn't mean absolutely anything
oh, alright. how do the enemy armor values work then?
alright, will do
Whatever the bip01_spine and head damages bip01_head number is I thiiink
I have a pre chewed parsed list of those somewhere
bip01_head
the thing is you multiply k_ap by a number that's roughly between 6 and 7 (due to all of the hidden modifiers) and then compare it to the armor listed
in damages.ltx
if it's lower than that then you deal pea shooter damage and the armor is degraded by twice the initial amount
that's the short answer
and i'm not gonna explain gbo to you
here you go. the armor values you're interested are "body_bonearmor" and "head_bonearmor"
this is not for literally every possible profile in the game, cos that's insane, but they're the most common ones
the name is a name I made up to keep track of them. the game will only use the id
ok I found it in 410- 3DSS for GAMMA - Redotix99 & Andtheherois & party50\gamedata\textures\wpn
Why don't I have puddles in the game?
why is everything i look into and get curious about turns out to be spaghetti of code and systems how each file works
inconsistent and or subpar modding
it's super consistent, simple, and tidy in the engine side
i want to cry from trying to learn this
wait until bro opens up grok_bo.script
not the Grok Body Odour script...
in fairness you did also run face first into the messiest possible system: gun attachments, and now, damage calculations
i have went the route of just trial and error. might take more time , but its just something i actually understand. working with the values i have and modifying them a little.
alright, a whole different question and not even about what i find where and how
i heard many complaints about magazines not working
which mag mod is the best and do i need to update anything atm?
Ask #π¨modded-gamma-support for how to install mods
its not that, its a question of which one i pick just becasue i heard complains of them causing crashes or not working with the latest update
!mags // follow the latest mags command.
@sturdy plaza How to enable magazines in GAMMA: #βπfaq message
Do not enable 207- Mags Redux or Mags Buyable at Traders!
that IS an installation q
i mean, i guess, anyway, thanks for the answer
Ye I tried those
I was wondering if there was anything else
Thx anyway tho


ok, i dont understand one thing about anomaly mags redux
checking the files and everything, it has the text for what mags which weapon uses for all the weapons ingame, even unused ones
yet when i give myself a unused weapon, it doesnt have the mag function
why? im digging through the files i cant find anthing what would be responsable for it
it just didnt get a mag and mag base assigned to it, which weapon?
oh, well, currently checking the aks74u old version. ak74u_old
but it does have it assigned, or im missing something?
then it should have a mag
does it has something like this
[wpn_storm]
default_mag = mag_8000_cougar
;base_type
ammo_11.43x23_fmj = ump_11.43x23
that is not assigned bro
i edited it myself a bit to try to make it to work, i forgot to turn it back
it had it
yeah, it has it and it still didnt work ,therefore i changed it around to find out what is going on. i just removed that section and added the same text right under it as the base has
hold on, let me check again and stuff
it should just work do you have files that overrides it maybe?
ok, i got it to work
it wasnt that, but another thing i did by trying to add a extra ammo type to it and it made the mag mod just not work
it still works, i just accidentally made the new ammo type be the default ammo for it
yup
now im trying to add the extra special super fancy ammo type i made to a magazine
editing the basetypes , adding the caliber to the list and still doesnt work
it might be overriden
i cant find anything what would do that
adding new ammo to a basetype file of the magazine, but it doesnt work for some reason. am i missing something here?
dltxs or the ltx with same name whatever might override them
idk what you have in your modfiles but just see if its the last loaded ltx
i just tested that in case i was stupid earlier. no it doesnt work at all. Just for testing purpouses i copied the file from the actual mod , just added the new ammo type and created a new mod loaded absolutely last with that file. still nothing
which obviously says i need to change something on top, but i have no idea what it could be at all
finally figured it out
where can i find gamma ammo icons? i found the icon things itself, but the ammo icons are completely different there
grok_bo_ammo_icons.dds?
in gamma large files folder
Would anyone know what ogg file the Mosin suppressed fire uses? I searched through a few of the ltx files but they pointed to something that didn't show up through search
check mosin's ltx it should define the sound file path there
thank you, didnt know where to look
use the search function sometimes might be helpful
i did, couldnt find it, because...idk, im stupid or something.
well sometimes the search function is goofy so understandable
also need to use MO2's file searcher, not the mod name filter
yeah that too
that or search through the entire mods folder though that's less useful due to overrides
I did but that doesn't show suppressed, only in one ltx in 3DSS and Oleh's Weapons Sounds Tweaks and Fixes. Those just point to something that doesn't exist
snd_draw = weapons\mosin\mosin_draw
snd_holster = weapons\mosin\mosin_holster
snd_reload = weapons\mosin\mosin_reload
snd_reload_empty = weapons\mosin\mosin_reload
snd_reload_misfire = weapons\mosin\mosin_unjam
snd_bore = weapons\mosin\mosin_inspect
snd_shoot = wpn_mosin_snd_shoot
snd_shoot_actor = wpn_mosin_snd_shoot_actor
snd_silncer_shot = wpn_mosin_wstfg_snd_silenced
snd_silncer_shot_actor = wpn_mosin_wstfg_snd_silenced_actor
snd_empty = weapons_dryfire\sniper_trigger
snd_empty_first = weapons_dryfire\mosin_hammer
I see silencer right there in Oleh's weapon sounds
i did, i couldnt find it. perhaps i was just searching the wrong words or something? i dont even know myself
Yeah but trying to find that actual wpn_mosin_wstfg_snd_silenced in a folder to replace is the problem
oh you want to replace the ogg file
Yeah I should've started with that lmao
maybe, mo2's searches work only on exact string matches
if you have a single character out of place, it won't show
most likely i was just searching the wrong thing
[wpn_mosin_wstfg_snd_silenced_actor]
snd_1_layer = weapons_sd\stereo\r700\sd_close_1
snd_1_layer1 = weapons_sd\stereo\r700\sd_close_2
snd_1_layer2 = weapons_sd\stereo\r700\sd_close_3
snd_1_layer3 = weapons_sd\stereo\r700\sd_close_4
snd_2_layer = weapons_shared\stereo\tail_sd\rifle\tail_sd_1, 0.5
snd_2_layer1 = weapons_shared\stereo\tail_sd\rifle\tail_sd_2, 0.5
snd_2_layer2 = weapons_shared\stereo\tail_sd\rifle\tail_sd_3, 0.5
snd_2_layer3 = weapons_shared\stereo\tail_sd\rifle\tail_sd_4, 0.5
snd_3_layer = weapons\mosin\bolt
@misty mulch You can format code in Discord by doing this.
Β
LINES
ββ`<Your code here>β`
BLOCKS
`β`β`lua
<Your code here>
`β`β`
in Gamma\mods\Oleh's Weapons Sounds Tweaks and Fixes\gamedata\configs\items\weapons\sound_layers\wpn_sniper_sd_sounds.ltx
you can replace the lua with other scripting languages for highlighting, or leave it out altogether
π sorry I dont know that thank you
Ahhh I guess I was on the right track just didn't know what file it'd be, I'll have to mess with those when I'm back home in a few. Thanks for helping me 
oh for god's sake
what format of dds do the icons need to be? the editor or viewer of those files in the pinned stuff i found has like 5 export versions and im exporting one by one to see which one it is
and the errors on it are in russian.....
alright, is there simply a better program to edit .dds files?
I use ImageMagick Display to see .dds files
editing dds file tho not really sure, ps probably works?
and im already struggling with it. doesnt even open
Paint.net, a bit basic but work well and advanced on exporting dds files
ill give it a shot. because i already managed to get a dds plugin for photoshop. edited what i wanted. checked the location of the icon from how stalker reads it. selected it , but ingame it just always is invisible anyway
finally got something to work
so I just notice that the pp2000 operator model does not have a underbarrel flashlight even though the icon has one, is that intended?
also it misses silencer model
it is intended because flashlights never work so gamma removed it
but silencer tho
sounds is there but model isnt
and if its intended the icon should change too
prob never intended to be in gamma weapon pool
Wanted to say thank you again, I got around to making the changes and it worked out.
pp2000 operator was never obtainable in gamma
since the mod was added
no idea as to how it got so maimed
figured it out, the 3dss for gamma has a operator model overriding the pp2000 reanimation, removing that conflict fixes the problem
understandable
tell me, the trees of the dead autumn, what would be with the leaves, I can not find
That's a beautiful haiku
Does anyone know how Lucifer works? I was trying to reverse it's visual to display how many in-game hours until the death, but absolutely unable to understand how time and time calulcations in X-Ray work
I have Blades of the Zone working with the knife durability script from More Melee Features. Worth making a pull request for this to include in GAMMA? Seems like something that might be included at some point anyways?
or you can either
give it to the author so he can implement it later
which author? Seems like 2 distinct projects and the knife durability script of More Melee Features is just one of 5 different things in that mod
the one who created BOTZ
so he can
implement it as a compatability script in fomod incase person has it
can't this be a GAMMA thing instead? I'm willing to do the work and more than familiar with git, but I'm struggling to find any sort of contributor guidelines or overall way to approach this
for a reason? Or just a development resources issue?
all right. Just PM? Or will I get slapped, lol
you can do it directly
just as that
or wait until he appears in one of the chats
will do, cheers
Do respawn times for NPCs from G.A.M.M.A. NPC Spawns affected by the global respawn time setting from G.A.M.M.A. ZCP 1.4 Balanced Spawns?
does anyone have the gamma default of this file? im trying to compare some stuff
Question: If I need to add something to the assortment of traders on the "bases", which files should I refer to?
I think it's starting to come together
(No idea how to actually animate it yet, that's just me moving the pieces)
just get it off moddb
these two
i assume you are referring to the regular vendors, not mechanics or medics
Yes, thank you so much
You know, itβs crazy how this project started as βIβm going to remake the starting pistol from Sulfur as a meme to learn the ins and outs of blender, because itβs cartoony and simpleβ and evolved into βI am reverse engineering the Mars Automatic Pistol in Blender but with a separate magazine well and the grip further back, which means I have to re-engineer the trigger mechanism, hammer, and slide catch to be further back, and probably make the slide catch separate from the trigger mechanism, because like MOST of those parts would be showing on any firing, reloading, or chamber checking animationsβ
Actually Iβm not sure I could have a chamber checking animation on this gun because of how it moves, that would start pulling a bullet out of the magazine and wouldnβt go back in nicely
It's a fake gun. The mechanism doesn't have to work if it looks like it makes sense
Yeah, but it would bug me

Iβll make a βslideβ that covers most of this, but the bolt, ejector, feed arm, and potentially the hammer would still be visible, as would a couple interior surfaces
Also Iβm learning a lot by doing this
Specially considering the gun comes from a super cartoony indie game
Which goes for a completely low-poly aesthetic
Don't at me if a gun is less than 40k polys and the scope isn't more than 60k
Don't get me started on the polys in an android ass
It started as that, but then I just kinda started making it my own thing
Now it's like a rearranged Mars Automatic Pistol
@random fulcrum did you ever update the HK416 with the icons I made and all that shit
no
Do we have any technology (mod/script) to display all smart on the pdas map? I would like to use it to make some smarts more populated (i.e. medic wagon at Rostok)
that is a uhh option in the debug menu
i got a big question :3
just got a error using both mods from "realistic magazines section"
Expression : <no expression>
Function : CScriptEngine::lua_pcall_failed
File : D:\a\xray-monolith\xray-monolith\src\xrServerEntities\script_engine.cpp
Line : 262
Description : fatal error
Arguments :
2 : [Lua] d:/anomaly/bin/..\gamedata\scripts\magazines.script(417) : refund_ammo
LUA error: d:/anomaly/bin/..\gamedata\scripts\magazines.script:417: bad argument #1 to 'pairs' (table expected, got nil)
Check log for details
stack trace:
can anybody explain this, got it while using custom ammo and when using the ammo wheel.
the condition is changed every 100ms by degradation_rate * time_factor
time_factor is 6
It's 100 ms of in-game time, right?
no its real 100 ms
Hm, to turn 100ms into in-game ms I just multiply it by time_factor, is this right?
sounds right
oh, its the ammo wheel what is causing the issue
because i reloaded with my custom ammo without it and it worked
which mod is responsable for ammo wheel?
!support
@slow bolt If you have a question or need help with G.A.M.M.A., please use the correct channel for your problem:
For vanilla G.A.M.M.A. modlist (this means that your modlist is unchanged and untouched): #π¨base-gamma-support
For custom G.A.M.M.A. modlists (this includes mods added by yourself and also mods that are disabled by default in G.A.M.M.A.: #π¨modded-gamma-support
If you are having issues with the installer, or with your G.A.M.M.A. installation: #1026866080347603065
Any other channel ARE NOT support channels. If your question is a support question, you may be asked to go to the proper channel.
it's vanilla anomaly UIWheelAmmo lua class I think
im creating a mod and i experienced a issue of it conflicting with something that is in gamma by default. i specified how i experienced the crash by using my own custom mod. this is mods making discussion, i dont see the issue asking here about it
ill check that out, if i can find it, thanks
you can start with debugging with printfof all data you want to know about in scripts. Apparently you have to start from magazines.script:417 and debug why these pairs are nil and where that variable came from
i thought you were asking for some mod, and not your own
all good, the crash simply happened in correlation with a existing mod
Insane, thanks. degradation_rate was exactly in-game seconds value
Since I didn't find such tool, had to make this small script to list current task sections and complete it, found it useful during learning scripts
https://github.com/SaloEater/Debug-Task-List-Tool
well, in the end you were right. i thought i caused this crash due to the things i wanted to add to the game, but no, its literally described in the mags mod post of it being a issue with that. just didnt check there at all assuming i caused the issue in the first place.
Why would the on_mouse_wheel call back need 2 scrolls to execute while zooming is behaving normally?
Nah, winna
Is there a MP 40 addon?
yes, but this is mod making discussion so you are at the wrong place
is there like a reason why I would encounter a load screen when spawning a specific weapon in debug test map? I was having this when I try to spawned jp's cz807
you are probably just walking into teleport to swamps
When does actor_on_net_destroy run?
the problem is I didn't even move when I spawned itπ
As you quit, load a save, or level transition. Very close to the last thing before the Lua environment shuts down.
Primary use is to clean up script based HUDs that will break the game if not cleaned up engine side before being deleted in Lua.
What if i use it to reset actor stuff like fov, input, ect?
It is good for any cleanup you want to do at the very last instant.
Keep in mind crashes won't trigger it.
Alright thank you so much 
the fact that the ammo wheel is very dependant on there being a certain number of ammo variants and that they will have a particular naming pattern?
Actually no. Making a thingus of extra ammo options and stuff. Therefore need the magazines and stuff for it to actually be playable and somewhat reasonable
Overall added 3 extra types of ammo for the same caliber so in total i have 6. The ammo wheel does glitch the fuck out, but that aint the cause of it because the same crash happens with vanilla ammo as well. The craah is specific to using the ammo wheel and selecting a ammo type when you have no magazines added to loadout. Or autoremoved because they are emty.
Tested it with ammo i have not touched
And as i see plenty of people are actually complaining about the same issue
What's the issue?
odd it shouldn't let you pick a type if there are no mags in the loadout, they should all be greyed out.
updating the code for the ammo wheel has been on my todo list for a long time.
Well, it allows you to pick whatever spite being grayed out and actually reloads or attempts to which leads to a crash. I should mention this again just in case that im using the magazines mod from "realistic magazines" section. Enabled the two required
Might as well mention how it works perfectly fine with custom ammo in mags and all that funny stuff when you do have a extra loaded mag added to your loadout
But people from the magazine side blame one key mod to be the cause of that which is automatically included
Personally, im very confused as sadly i dont understand much of anything from that
this #1322655858240262304 message
and this: #1322655858240262304 message
that is a modified or old version of my script. My script as is in the curent version can't get that crash. it has nothing to do with the ammo wheel tho.
so what ever mod you have that is providing magazines.script is likely the problem
Yea, but the thing is, im using whatever is provides in standart gamma install. So gamma installs a outdated version of it together with the mags. Im not certain i know how exactly it all depends on each other, but... yeah. Is it possible to get just that script from you so i or other people dont have yo reinstall max redux all together?
It's one key. I specifically gave the warning in the fomod that it has issues and I've said multiple times it uses an older mags script
It needs to be updated but I don't have enough knowledge to do it myself. I tried
However grok did the install for mags is borked. Veer has been directing people to reinstall both mods to yet it running correctly
Just be it comes with gamma doesn't mean it's correct
Search for messages from me in #π¨modded-gamma-support , keyword "madness", I've been copy pasting shit for days
IDK, once i realized it wasn't my bug i stopped caring sorry. Gamma has a history of butchering mods, either not updating them, or incorporating patches from ppl that don't know what they are doing as "part of gamma".
I am this close to pulling redux from gamma completely after my most recent look at my issues tracker.
The irony is that this round of issues comes after literal years of trying to get grok to update mags to the latest version
Only to see it immediately get saddled with a bad install procedure
then the "mags is not part of gamma.
" refractory period

You only have to see how many times people ask "how to get magazines" in the rest of the server
and say why no work
Because if it was done correctly in the first place it wouldn't have been an issue
Iirc if the file is hosted on discord, the installer can't get it either
So the mags patch is p much stuck as an intermediary folder install, as in, grok picks options from the fomod and you're stuck with it
And I don't think he knew at the time that onekey used the ancient version of magazines.script and therefore, picked the onekey option without checking the giant warning in the fomod
And so now I have this very long copypasta to unfuck it
People reporting stuff to original mod and not to gamma is also big brain 
People report shit in all kinds of wack places tbf, pretty sure we drove illish to madness when ultrawide used to crash ppl out
well some people just can't pay more attention
Cos they'd be told to install the ultrawide mod, and then they would use that thread to dump literally any other crash errors they got
they just do whatever they want
Daily occurance

That guy is just... Something else
the one saying i could make the maghud location adjustable from MCM isn't wrong. i do think it is funny that they used another of my own mods to point out that it was posible to do.
not allowing your mods to be used in modpacks is the chad move
Gamma and EFP are the only modpacks that have permission to include MCM and mags redux. EFP because they asked nicely and did alot of dev work for both.
gamma because it is SUPPOSED to be downloading from moddb via the miraculous downloader. it's not and it breaks shit.
nearly all my other mods are CC licenced (MCM and mags redux are not) so it's hard to say anything.
i guess i could argue that donation link is commercial activity that is blocked by the version of the CC license i use.
Don't ask for permission
Change the mod so that it breaks stuff
People message you telling YOU to fix it
You act nice and try to patch it even though it's not your responsability at all
Patch don't work and they're still angry at YOU for some reason
Truly the "my mod was included in gamma" modder experience
its petty an annoying. however i do have to make sure there is only ever one version of MCM. Too many ppl use it. some crap pack from two years ago includes a bugged version of MCM and it isn't just me ggeting flooded with bug reports, it's half the modders in this comunity.
Yeah it's hard to provide support for a modified version of your mod with other 700 monkeypatched scripts and DLTX files overwriting it
Honestly. Imo Monkeypatching shouldn't exist. It looks so damn messy
It's not an issue when it's not HORRIBLY bloated and messy
It's necessary sometimes when you're making mods, but GAMMA's way of doing it is like those pictures of server rooms that are just a complete cable jungle
And if you disconnect one of the random cables the entire thing goes to shit
it is a matter of scale. and ppl not following the guide or generally knowing how to do it right
One part of it that I like is that it keeps the original mod active so it keeps the "credits" to the ppl. Idk if I explained it right
That is useless
It does nothing for modders
Except artificially inflate a download counter
That. again, doesn't matter at all
Unless you want to inflate your ego with "My mod has 3 million downloads!!!!!!" which isn't even an achievement since they're all automated ones from a launcher
That's not exactly what I meant
tbh if some modpacks properly monkey patched mods to make them work with the pack instead of changing root scripts from said mods we'd be much better off
yes, extending other ppls mods is a good reason for monkey patching. I would prefer that ppl submit a feature request to me so that i can add an actual api call tho.
a huge issue with modpacks is the creators not knowing shit about code, then proceeding to change the scripts of a mod instead of overwriting their behavior with monkey patching, dxml and such
Yeah that's what I meant with keeping credit.
mags redux is designed to be extended in several ways.
But then how can you view the code as a whole? If a modpacks scripts have been monkey patched multiple times
Then that leads to even more newbir confusion especially with ppl who have little to no coding experience
you will never see the code as a whole, but for example
say GAMMA had Mags Redux turned on
the with a higher priority they had a "GAMMA Mags Redux" mod on too
you'd know that
Mags Redux = Anomaly
GAMMA Mags Redux = patches to make Mags Redux work with GAMMA
Yeah that's another side of the coin for sure. I get that point totally
it's the same as separating code in different files
You're completely right
or using inheritance with overwriting methods
it's like you'd be inheriting Mags Redux to patch it right
Yeah that pretty much, since people have built upon the old versions of MR for gamma instead of using the current versions, it leads to a myriad of issues
but then again like
And as we see people blame Raven instead of whoever did those monkeypatched on old, unsupported versions lol
that requires a decent understanding of separation of concerns and shit from the developer
otherwise they're adding a useless monkey patch that will just increase the complexity
Yeah. Would be awesome to have a structure. I thought before actually starting to dig deeper that ppl view pull requests and actually filter the quality and such
Well some scripts are nicely built with the right OOP principles. Like the backpack script. That was nice to read
yeah, I'm usually more functional programming oriented, but them Lua classes do be nice to work with
I come from C# bg so I guess that was the first paradigm I did some cool shit hence why I prefer it. But I saw both paradigms done nicely
I actually have a kinda love/hate relationship with Lua. It gives you a lot of freedom, but oh boy you can cook spaghetti with it
I guess a perfect language for functional programming?
Partially my fault. The moddb version was left in the dust for the longest time so github seemed like the most reliable place to get the latest version
I asked about this and apparently it's just OneKey
lua doesn't have classes. the luabind library fakes a class like inheritance system to allow better interfacing with C++ but even it's "classes" are just tables.
true lua OOP is done with just meta tables.
well I guess that's because Lua doesn't have much syntax sugar in it
And onekey author is long since inactive
yeah i know that
I was referring to the classes in Anomaly itself
I wouldn't say a perfect "functional" programming language because it lacks a bunch of cool stuff from such languages like piping operators, pattern matching and so on
what does it do?
also I'll never call it perfect because it's not typed 
Yeah lua in itself has like 30 keywords or something
but it is quite effective and robust for scripting
lua has pattern matching. it isn't full regex as it is only single pass. its like single pass regex. regexlite
Moves Mag check, jam status, and reload to one key by using the variable keys, also adds a fake mag check to guns without mag check anim
nah I meant pattern matching like in Elixir or Haskell
like casing pattern matching with tables and such
let x = 1;
match x {
1 => println!("one"),
2 => println!("two"),
3 => println!("three"),
_ => println!("anything"),
}
like this in Rust for example
and why does that require modifying the magazine script?
oh, switch statements.
Can't this just be done in a few minutes using "dictionaries"?
As far as I can tell the fake mag check was baked into the mags script. As to why I have no idea
yeah, but not exactly like switch still
switch tests for a literal value, while pattern matching will test via structures
I mean, it's essentially a lookup
local lookup = {
[1] = "one",
[2] = "two",
--- ...
}
local x = lookup[1] or "anything"
but then you're allocating in-memory all possible results
not the case with pattern matching too
ofc this example could be a normal list, I'm just showcasing the matching against keys/values
Oh I got you.
not that that's an issue though
it isn't 99.99999% of the time
creating lookup tables is fine, especially if you don't want to allocate some shit in runtime and leave it there to be accessed
buuut this the type of shit that Lua makes you do by hand, when in some other languages you have operators/syntax sugar for it
You can use hashes if it's ever an issue.
But yeah I guess we all just miss some stuff that our favourite languages have
as close as i can make it.
function match(test)
return function(table)
local func = table[test] or table._
if func then func() end
end
end
local x = 1
match(x) {
[1] = function() print "one" end,
[2] = function() print "two" end,
[3] = function() print "three" end,
_ = function() print "def" end,
}
well that's not true. i could get rid of the function() and end using load string but that sacrifices lexical scoping.
there is extra memory over head for defining each of those functions, compared to a proper keyword like you said.
yep, I believe that's the optimal way of doing something like that with pure Lua
it does look nice though
idk, I guess it'd be useful for some use cases in which you're gonna fire a function on every case either way, but that's one hell of an edge case lol
It's completely worthless for anything other than showing off with obscure Lua syntax
the fact that foo "bar" "baz" {1,1,2,3,5} can be a perfectly valid line of lua code is very amusing to me.
What. What's this line supposed to do?
alright, well, i fixed the magazine issue for myself. thanks to all the people who were guiding me how to do it. im just stupid enough to not do it properly or ask the wrong people about it, because i dont know better
may i ask for your help regarding the ammo wheel? im really curious figuring out how to edit the ammo wheel selecable options. considering i want to use and change up the old ammo wheel with all the old ammo options in it
what ever i want it to.
wait i never realized that created an iterator
the fuck kinda syntax is that
mags redux makes this more dificult than it needs to be by replacing the ammo wheel rather than extending it. (i was in experienced once) [and am still lazy]
Civet allows function calls that omit (), so doing foo "bar" "baz" is the same as foo("bar", "baz")
implicitly iterating over arguments for each function call is crazy though lol
a function that takes only one parameter can be called without using parentheses when being passed a string literal (aka quoted string in the code, not a variable) or a table constructor (aka {something})
so that line calls foo("bar")
then because foo returns a function (it returns itself) that becomes foo("bar")("baz") and then foo("bar")("baz") ({1,1,2,3,5})
wait nvm, i didnt realize it was returning the function reference at the end
not quite in lua. you can only pass a single string or table literal without (), i just cheat by making the function retun a function so i can chain them
yeah, I know you can pass tables and strings omitting (), I always like to do foo [[some_literal]], I guess I just never realized chaining their calls like that would still obey the rule
this is a more interesting use of it and closer to how i might use it in actual code
I guess any language that allows function calls without () and supports first class functions is doomed to that exact example 
Okay this was completely new info
this is a good example: https://gist.github.com/cwarden/1207556
using a function passing a single table as argument to make it look like an operator followed by a block of code
can i please be at least pointed where i need to look to understand a bit more about the ammo wheel? π¦
Clever one too.
it can be fun to write nonsensical code this way
because each xray script is it's own namespace with a this variable pointong to itself. you can do thing like
function call(func)
if type(this[func]) == "function" then
return function(param) this[func](unpack(param)) end
else
return function printf("call:&s not a function", func) end
end
end
function baz(x,y,z)
printf("x:%s, y:%s, z%s"), x,y,z)
end
-- then call all your functions like this and make ppl question if this is even lua any more
call "baz" {1,2,3}
bonus points if call is actually in another script and you just have that is actualy way more complicated, not imposibe, but beyound the scope of a quiplocal call = somescript.call at the top of your script.
esoteric lua
Using your knowledge to teach ppl how to write spaghetti code. The true evil
code should be self documenting and clear. which means that you should always use () to call functions in lua
And name functions, variables in a way that helps with understanding. Especially in the context of modding here since it requires a lot of reverse engineering

you would love the code i wrote for demonized to monkey patch a script so that when that script, and only that script, read db.actor.radiation it got 0, but any other time that script used db.actor it worked normally.
I can also write a patch that changes how one function in fool.script works only when called from bar.script, any other script will call it normally.
these things are not in the monkey patching guide because i a) want to protect your sanity, b) want to keep the cool code to myself, c) am too lazy to update the guide, d) all of the above
ooh that sounds like an extremely cool gimmick
Me thinking about catching getting k_ap stats in GAMMA/ArtiGrok and being able to modify it (for a perk) before it gets returned to the damage calcs. Sounds like it could be a hassle though.
So I tried again, I am standing in the middle of the map, spawned cz807, and at the instant I draw out the cz807, it throws me a loading screen to swamps
that's fucked you can't do it without modifying grok_bo.script
The thought came up reading what Raven said about that monkey-script modifying the return value of db.actor.radation for only a specific script.
ye the thing is that k_ap is a local that's setup within npc_on_before_hit
hey how to edit skill system levels because i started a new game+ so i dont want to grind those levels again!!!!!!
is that the metatable hack you shared the other day
please!!!
!!!!!!
I tried to check log but I dont see anything special ```Spawned item [wpn_cz_bren_807] (20496) inside invetory
Time continual is:244813
- Unregister UI: UIDebugISpawner
Time continual is:246183 - Register UI: UIInventory
0.19285714285714
0
0.19285714285714
0
asdf: 0
build_desc_footer for object id 20232 - Unregister UI: UIInventory
Time continual is:248439
SAVING: level_weather | cycle: foggy - preset: w_foggy3 - is_underground: false - weather_storage size: 0
SAVING: Water deprivation | last_drink: 0
SAVING: NPC items | number of saved npcs: 0
SAVING: Sleep deprivation | last_sleep: 0
SAVING: Gameplay - Actor Friendly Fire and Surrender Stats
- Saving spawns...
- Saving objects...
- 19888 objects are successfully saved
- Game Player - autosave.scop is successfully saved to file 'd:/anomaly/bin/..\appdata\savedgames\player - autosave.scop'
- Disconnect
clearing object 6069, zat_b39_af_fuzz_kolobok from m_data - Destroying level```
Why would you need to do that? I mean the "mocked" db.actor.radiation? Also when did you start to mod gamma/stalker?
imagine if you had 2 different scripts that damaged the player based on the radiation value on every update, then you started taking doubled radiation damage because of that
though both those scripts had something nice you wanted to keep, so getting rid of both isn't an option
so you just change the value of the radiation for 1 of the scripts, so it'd always ignore it/do nothing with it, while still keeping the other features
or imagine a script called a global/shared function, and you wanted to change what that function returns only for that script
that way all the other 1000 scripts calling the same global/shared function wouldn't be impacted -- just the one you patched
if i use old radial menu, how can i change the old ammo icons to something else, different kind of ammo?
is this even validlaser_status = falser
found it in cz807's ltx and wondering if some syntax error could be there
yeah that's the proper syntax for Southern US LTX Standard
booleans are truther and falser
there's just no correlation as to why that would make you change map
but no it isn't valid
which is I'm trying to figure out
the second one. the first one is similar but more complicated due to db.actor being a game object that has functions called on it. it also isn't perfict if that script passed db.actor to an engine function it would probably crash. but since it was a core anomaly script we knew it wasn't doing that. also db.actor gets passed to very few things.
Okay. Thanks for clarification. I mean I knew it had good reason behind it. Just couldn't imagine what could be
changing the way radiation is handled such that having a non zero value wasn't a big deal and was very common. but the fast travel script blocks fast travel if you have more than 0 radiaiton.
the ltx readers only consider 1 and true to be true, everything else is considered false, (unless it is one of the readers that supports defaults, then nil and only nil is replaced by the default value.)
so flaser would work for false.
fall of 2020 right around when anomaly 1.5.1 came out and made all the old anomaly mods break.
ok that makes sense thx
Arti just put his custom ammo into the old ammo sections.
otherwise you need to rewrite the UI. it honestly might be easier to adapt Aoldri or Harus radial menu code than the ammo wheel.
hmmmm. that is a good idea actualy.
that is actually exactly what would suffice, putting my custom ammo in old ammo sections. just because i need more than 3 options
the question is how to do it, because i cant find anything at all for that
Hey, I've been trying to make my own loadscreen description mod, only problem is that I'd need to add 109 individual ones. Can someone of u guys tell me where I can find the script that controls how many loadscreens it actually reads? π it shows "is_tip_loadscreennumber" if I haven't created one
this is what arti did. I think you should be safe to do the same becuase gamma uses groks balistsics not arti's
you're a legend thank you
I just need to change the local_tip_count to my number right?
Damn so almost 5 years. Good stuff. Knowing the domain is important when developinf, but here it's amplified. That alone must save countless hours/days of time while modding.
yeah. and then include the edited script with your mod. it is unlikely anyone else edit that same script. or if they are they are doing the same thing you are so would be an obvious conflict.
perfect seems to work, was a bit confused since UI Overhaul + Tales use a different amount of lines w/o including a script π
that and a talent for doing bulk text searches. i don't have the scripts and engine api memorized but i have a good idea of what has been done and where to find it.
as long as they are less than the script they could ahve just duplicated some.
there is a way to monkey patch it the script but not worth the effort since it wouldn't be any more compatable than a direct edit and way harder to debug.
okay thank you, it seems to work now π
Yeah that is extremely helpful. When I was looking at how to delete something I stumbled upon alife.release thought it had to do something with memory management... then when I realized in another script clear as day that it's actually delete I tried it not knowing it's "async" (not exactly I know). So that took some time to realize.
and because of that it can crash NPCs due to a deep bug in the script AI system so there exist safe_release_manager.script for releasing NPCs.
so , using this as a example to spawn my own made ammo instead of old ammo, but i just got a crash which doesnt make much sense to me atm. tho, i made it other way around than in the example you sent me.
here is a example
[ammo_5.45x39_ps]:ammo_5.45x39_ep_old
Oh I was managing static stuff not level. Player inventory to be more precise
what arti did was take the section for the old ammo [ammo_9x18_fmj_bad] and change all the fields in it so that it would become his new ammo. change the name, the icon, the penetrarion, price, ect ect. the only thing that is the same it the section name. so artis' 9x18 +P+ internal to the game is called [ammo_9x18_fmj_bad]
Well the problem was I had a stack of stuff. I took 1 did some stuff then deleted the item and wanted to get another item of the same type from the stack, but I got back literally the same object I "deleted"
yeah, i got the idea, but i got a error of immunities which is a bit odd. i assume i have forgotten something
Can't find variable immunities_sect in [ammo_5.45x39_ps]
yeah, server objects and game objects update async from eachother, 99% of the time you will want to maipulate the game object, but you spawn and delete server objects and that means a bunch of delayed code with time events.
Yeah I learned that the hard way 
well ammo_5.45x39_ps would be a new section, not a rebuild of an old section.
ah, alright, so i cant have the name i want to ingame. which i assume also means the game will despawn it since it has old ammo despawn thing or whatever it does with it
old ammo depawn is for very_bad aka broken. not bad. unless gamma has an aditonal old ammo despawner. if that's the case patch it to ignore yours.
let me try couple of things. ill def give that a shot
you can't have the name you want internaly. but what the player sees you can change.
it's not an ideal solution but when you consider that arti wanted to add a new 9x18 ammo type and would have had to edit every gun that uses 9x18 to actualy add a new ammo section and recode the ammo wheel. repourposing the old ammo was easier and cleaner
i can see why, but i encountered a weird problem. cant load the custom ammo in a gun. i wouldnt care to add the ammo to every weapon and magazine type, my only last stop was the ammo wheel to make it all "easy" to work
guns can only use ammo in their list. nothing can change that. infact if you reduce an NPC's gun's ammo list mid play thrru every time that NPC is loaded the game crashes.
that is why you generaly only see all new ammo along with all new guns.
the other option is to modify an ammo already in the guns ammo list like arti did.
or you have to edit every single gun. and mags redux base type
im ware of what you talking about, i just have not added it to any of the npc's loadout to be selectable yet. for now im just testing stuff and what not
what the ammo wheel. and mags redux, does is tell the gun use this index in your ammo list next time you reload. there is no way from lua to tell the gun to load ammo any other way. and if you did get a different ammo name into engines half baked psudo magazine system, when it goes to update it's internal ammo index and that ammo isn't in it's list it crashes.
yes. that is why it is a safer/simpler way to do things.
idk, it actually worked. i added the ammo to mags and guns, i could safely reload and do whatever. it just wasnt in the ammo wheel
and god damnit, im a moron. the prefix for "old" is "bad"
and there is some sort of a script which replaces all bad ammo with new
that is gamma, i don't know where. base anomaly only does it to verybad
you find that script and patch it so that if it is one of your ammo's it ignores it.
i found it, but its all lua
where it finds the prefix of bad and changes it to new
so i dont think i can exclude my own made stuff
this lineif _NO_DAMAGED_AMMO and string_find(section,"_bad") then ?
gimmie a sec
-- Replace damaged ammo with new
if _NO_DAMAGED_AMMO and string_find(section,"_bad") then
local new_section = string_gsub(section,"_bad","")
if ini_sys:section_exist(new_section) then
alife_release(obj)
alife_create_item(new_section, npc, {ammo = size})
--printf("~ replaced [%s] with [%s]", section, new_section)
return
i'm an idiot
local skiplist = {ammo_9x18_fmj_bad = true, ammo_5.45x39_ep_bad = true}
if _NO_DAMAGED_AMMO and string_find(section,"_bad") and not skiplist[section] then
this change for a direct edit.
so it finds very bad and changes that to new and then finds just bad and changes it to new
monkey patch is is more complicated. but direct edit is literaly just making that skip list and adding a check for it right at that point in the script
now i had no idea about this skip list option, huh
make sure the skip list has the right names.
it doesn't exist, i'm showing you how to make it exist
with a messy direct edit, but this is gamma that's normal and a clean monkey patch would be anoying to implement.
thanks for the idea, now the question is where do i add it properly to not fuck the whole file
you can see how much of a pro i am at editing this by usind readme to look at that
but would that be the correct place to add it in there?
right, i didnt even do it correctly
how to say this....i broke the whole script file. sorry for disappointing you, but i dont know where exactly to add the changes
i noticed it myself in the end, changed it, but that still didnt fix the issue
did you try running the script in the console
that tells you exactly where you fucked up
i'm sure it's because the addresses in the table aren't in brackets and quotations
but i'm unsure on that claim
i.e. they should be ["ammo_5.45x39_fmj_bad"] = true
i know absolutely 0 about coding in general, oh god....let me try
is this how you think it should look like?
yeah but just run the script in the console
while you're in debug
run_script (name of the script)
well the more you know
now implement inventory tetris into anomaly
or don't speak ever again in this channel
i mean, new issue of adding a the "old" in front the ammo name ingame, but i can live with that or fix it myself, assuming its just in the ammo.xtl.
and....i know nothing about lua or coding no way i can implement that lol
but wanted to say big thanks to you faust and raven for dealing with such a moron like me
and actually helping
nah that's dynamically inserted into the name
i don't remember where
but it's done dynamically
regardless of the item's name in the xml
oh for god sake
Either works. No quotes or brackets and quotes are the same.
Yeah it's another dumb patch. Can probably steal Arti's tho
that's why i was unsure
This one.
You need to remove all the double dashes
i do remember coming across tables like that before, if vaguely
Since gamma nukes all old ammo can actually simplify that script a bit. So it just runs all the time. I'm on my phone so not right now.
i got it, removed all the double dashes and it didnt help sadly
also, noticed there is a extra jam change script with old ammp
so i just finally managed to put the okp on the ak74m duty but none of the moving parts are working animation wise. (doesn't grab mag/piston stays forward while shooting/etc.) does anyone know what the problem is?
Animation lines in the hud section are messed up probably
why is bro inside the sister location night 4 suit
what am I doing wrong?
Im trying to blacklist Arti's Ammo Maker stuff from showing up on my traders, but somehow it goes through my filters in trade_presets. Im having a hard time finding the alias he used to load them.
ik i copied it into a txt so you wouldn't have to download it lol
Yeah I realized after it needs other changes. As written it only works on Arti's ammo.
He is loading them via a script not trade preset. He is spawning the stuff directly in the traders inventory
Omg I was afraid so. There are so many of these magical objects
πππ
He is the only one who would know its name
Stalker modding much esoteric
Managed to find a LTX file but still cant filter. I at the limit of my wits here...
lmao I dont have discord on my PC, I just built the PC this week, I need to pass a lan cable and buy a router, cut me some slack
I dont want to tether the phone, because I use it for other stuff.
It gave me a good chuckle though
I give up, demonized scripts are too stronk for me. π«
hey guys, do anyone of you know where I can find the folder for the AK 74 PMC and the AK103?
I am attempting to editing the scope options on the AK103 so it can take more scope similar to the AK 74 PMC or any other AK 74M variants
ak103 should already have same scopes as ak74
no, not really, AK74 has way more scope options for the WP faction. However, the AK103 only has 3 options, those are PSO-1M, Kobra, and the 1P29, and those are really terrible.
Ak74 pmc should be located under bas. Adding more scopes is a huge pain because you will need to go in blender to position it properly as the game treats each scope version for a gun as a whole new gun
well, not necessarily the ak74 pmc, the normal ak74m is fine. But I am intended to add only 1 scope, not many of them.
but if the situation requires, then I just need to know where the files are
Well, usually its gametada/configs/items/weapons. , i think, i dont remember it perfectly from the top of my head
But even then, adding new scopes isnt as simple as just adding a option in the ltx
I assume the 103 is vanilla anomaly
it's fine, I would be following the video guide from Jmerc
Fair enough, best of luck
yea, I already figured out adding more scopes is a pain in the ass, but it would be worthwhile in the end.
For just 1 yeah, why the hell not. I can agree on that.
Tho, considering the 103 model, you cant add much more than what is already in there if you think of adding the magical dovotail mount so you can put any nato dot or scope on it. Otgerwise that shit will be just floating on the dust cover or look like its welded on
π where do I find the weapon folder?
Well, its usually all hidden, you got to use the unpacker in anomaly install for it to unpack and show all the gamedata. But idk, i think just taking it from there would override some stuff gamma has edited if anything about its stats. So for just yourself, use the mod orginiser and search for the file. I assume the name should be wpn_ak103
Actually, check ak reanimation mod. I think that overrides most basic ak's in the game.
weapon configuration files are like w_*.ltx
I need to add a scope, so I would need meshes, where can I find the directory folder?
do not forget :
if you will do it wrong
it will destruct itself within a second when you put it on a gun

couldn't screenshot details tab because pressing any key closes it 
Whut the fuck, in my game it only shows 3
How?? There is only 1 AK 103 in this game
not really, only wpn_ak103 has 3dss support
i'm currently playing on DX9, maybe that's the reason?
yes, 3dss is not available on dx9
but there shouldn't be any reason for the ak103 to refuses the remaining WP scopes
where as my other AKs still capable of attaching them
in fact, most of the bareboned AK 762 in my game can only capble of attaching up to 3 scopes only
that's probably because 3dss is the one that adds them

the windows snip tool has a delay option. you can set it to 30 seconds, switch back to the game and bring up the info window.
Idk if best place to ask, but could someone tell me how to switch the scope on an M98B from the modded version which I believe is the 3d scope one, to just being a normal scope UI like the "Spectre Scope" is. Where it takes up the whole screen. Trying to make it work with Beef's NVGs and the thermal mod as well.
local gc = game.translate_string
function ui_item.build_name_first(obj, sec, str) -- no obj used
str = str or gc(ini_sys:r_string_ex(sec,"inv_name"))
if (not str) then return "" end
local _str = ""
if is_empty(str_tbl) then
refresh_strings()
end
str = _str .. str
return str
end
this is actually all you need since gamma has no old (_bad) or broken (_verybad) we can just remove the name change completely.
why gamma would have that when old ammo was removed makes no sense. If there is a script that only does that then include a file with that name that simply has one line --feature disable
No, its a lot worse
I found it, its a script which calculates jam and damage of guns overall. They it does it is by constantly checking for old ammo which has its own values when calculating overall jam chance and damage. So i cant disable it all, but i went in with my super limited understanding of it and simply deleted the of old ammo being taken in consideration at all
The specter scope should be 3dss for any gamma weapon
Is there any way to force a certain reticle onto a gun with an inegrated scope then?
Because the ak family is overwriting the bas aks which added some scopes to them. And I wasn't adding scopes for non 3dss support
Just remove 3dss at that point
A lot of guns have scopes which don't have the texture configuration to work in 2dss. Nor do they have the xml files for them
so, is there an alternative way to add scopes to them without breaking the dx9 anomaly?
Setup the scope textures for each gun that I added new scopes to
I thought about this and considering i probably wont go through every single caliber in the game i actually rather leave it so the script which changes it to new ammo works. I guess maybe im only now thinking it would be better, but got to work on it and see how it works out. Meanwhile i found the shit which changes the prefix adding the "old" in front of it ingame and i realised if i change it to "harambe" , the game will display it as harambe 7.62x39 and so on for old ammo overall. I intend to mask the fact its old ammo while letting the game do its work with all the ones i uave not touched. Im sorry if i wasted your time making that script.
care to elaborate?
Can't. I'm at work
very well.
the nodes here match lines in the gun sections. i suspect gamma has extended this file, this is base anomaly version.
need to learn a lot
Same.....
Thanks that was the joke

me at school:
Thanks, I'm still trying!
how can i disable magazines being spawned in only trader inventories from the magazines_loot script?
@sturdy plaza presumably you comment this bit out inside magazines_loot.script
since that is the "tell the game to make traders stock magazines" snippet
dumb question, how do i turn that into a comment instead of like of code? im sorry, i know nothing about coding
nvm, i figured how a comment looks there and just did the two --
--[[
function trader_autoinject.update(npc)
TraderAuto(npc)
CreateTimeEvent("restock_mags" .. npc:id(), "restock_mags" .. npc:id(), 0.01, function()
stock_mags(npc)
return true
end)
end
--]]
yea, still thanks for the info
it's adding --[[ and --]] at the top and bottom of the block
that comments it out
turns the whole block into a comment, comments are not "read" by the computer, therefore it is a safe way to disable sections of a script without outright deleting shit
understood
(different programming languages have different ways to do comments, for LUA script files it's --[[ --]] or -- for single lines, for LTX configs it's adding ; to the beginning of the comment)
yeah, i figured out the ltx stuff. the tutorial or modding guide or whatever it was in the pinned messages explains that very well there
ah yw glad it helped
What am I doing wrong?
I would like to make a multiuse item out of ducttape. Here are my changes:
![duct_tape]
kind = i_tool
cost = 750
inv_weight = 0.1
empty_weight = 0.01
use_condition = true
script_binding = bind_item.bind
max_uses = 5
remove_after_use = true
how is damage calculated in gamma? just damage
gun damage x ammo damage? or there are tons of other variables between it?
damage in the stat card, or the actual damage done to the target
did you read the DLTX guide in the pin? what's your DLTX mod file name, and where is it located
Yes,
Filename: mod_system_havoc_new_multiuse_items.ltx
Path: gamedata/configs
The file works, because the costs are 750 now ingame.
to be totally honest, i also don't know if you can make a single-use item into a multiuse one purely through editing a single ltx file
But that's possible, at least with medical items. I changed the following there and it works.
![antibio_chlor]
cost = 1350
inv_weight = 0.01
boost_time = 300
use_condition = true
script_binding = bind_item.bind
max_uses = 2
empty_weight = 0.001
How about changing "remove_after_use = true" to false?
Have you tried that?
It works now... Cool. I edited the file 3 times, tested it and the following format worked.
![duct_tape]:booster_multi
$spawn = "devices\repair_kit_10"
can_trade = true
quest_item = false
kind = i_tool
cost = 750
inv_weight = 0.1
empty_weight = 0.01
use_condition = true
script_binding = bind_item.bind
max_uses = 5
remove_after_use = true
Now I still have to test the crafting to see if he actually only uses one "use" to make an item.
hey, is there a way to change default gamma npc names? for example hog?
ngl it's really funny that the parameter is literally remove_after_use = false
change the translation string in st_characters.xml. GMTOP is probably providing the overwrite
that is to say GAMMA Massive Text Overhaul Project
I think what this means is that the item disappears after complete use (all uses).
legend thank you




