#╙🖇mods-making-discussion

1 messages · Page 108 of 1

nocturne night
#

I'll try my best

rare sage
#

so i could just make my own script that does that? or would i have to do it under a specific script

drifting moat
#

You need to register for the callback like so:

function MyTraderRestockListener(npc) --Can have any name. 
  npc:iterate_inventory(coolIteratorFunction)
end

function on_game_start() --This must be named like this
  RegisterScriptCallback("trader_on_restock", MyTraderRestockListener) --Name of the callback, function to call
end

For an extensive list of callbacks: https://igigog.github.io/anomaly-modding-book/script/callbacks-list.html

rare sage
#

im SO over complicating htis

#

im writing a mini design doc

drifting moat
rare sage
#

excalidraw

drifting moat
#

Miro

drifting moat
rare sage
#

ohhh

drifting moat
#

Good. Make Hunter in Red Forest do the opposite (sell more big game food)

rare sage
#

yeee

drifting moat
#

He is a hunter after all

rare sage
#

i can put tables in tables

drifting moat
#

If you want to fake the actual hunting of these mutants you could also reverse the check (if there aren't many boars sell more boar food). This would imitate the hunting of them

drifting moat
rare sage
#

ik its not hte map names

#

im just doing it for like

#

temp stuff

#

place holders

#

wait theres probably a method that does this automatically

drifting moat
#

Your curly braces look like caltrops KekSkew

rare sage
#

lmao

drifting moat
rare sage
#

local map = t and sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id()) i think

#

only map related function i cna find

drifting moat
#

there is this in bounty script

simulation_objects.is_on_the_nearby_level(sim:actor(), se_obj)

If you follow that script it leads to this

function is_on_the_nearby_level(se_obj_1, se_obj_2) -- linked and linked to linked level xddd
    if not (se_obj_1 and se_obj_2) then
        return false
    end
    
    local sim = alife()
    local gg = game_graph()
    
    local obj1_level = sim:level_name(gg:vertex(se_obj_1.m_game_vertex_id):level_id())
    local obj2_level = sim:level_name(gg:vertex(se_obj_2.m_game_vertex_id):level_id())

    if not (obj1_level and obj2_level) then
        return false
    end
    
    if (obj1_level == obj2_level) then
        return true
    end

    if string.find(config:r_value(obj1_level,"target_maps",0,""),obj2_level) then
        return true
    end
    
--    local linked_levels = parse_list(config,obj1_level,"target_maps")
--    for i=1,#linked_levels do
--        if string.find(config:r_value(linked_levels[i],"target_maps",0,""),obj2_level) then
--            return true
--        end
--    end
    
    return false
end
rare sage
#

oh wait theres also levels

rare sage
#

string.find(config:r_value(obj1_level,"target_maps",0,""),obj2_level)

#

this looks like it could be it

drifting moat
#

se_obj_1 relative to this is se_obj_2 in a nearby level

rare sage
#

something like this

#

would work i think

#

how do i print to the ingame terminal?

drifting moat
#
local hello = "Hello"

printf("%s world!", hello)
rare sage
#

okai so just a normal print

drifting moat
#

It can even run on VSCode terminal

rare sage
#

will it crash

drifting moat
#

it will either crash (you didn't provide the template) or just print -> "table"

#

printf(template, args)

#

args can be any number of arguments

rare sage
#

ohhh

drifting moat
#

printf("I'm printing a lot: %s anothjer one %s, third time's the charm: %s", somVar, someOtherVar, thirdArg)

rare sage
rare sage
#

it hard crashed

#

not even an error

drifting moat
#

You can't just pass a table of stuff to that function. It won't print it. It will just print the type

rare sage
#

just crashed

drifting moat
rare sage
#

something

#

in that log

#

got it blocked

drifting moat
#

config = ini_file_ex("ai_tweaks\simulation_objects.ltx")

#

I took this from where I took the example script

rare sage
#

i do seem to be missing config

#

i didnts ~~~~ it so i didnt realise

drifting moat
#

You could also create your own

#

Or just use this one if it suffices

rare sage
#

why is bar and rostok 2 maps?

drifting moat
#

yes

rare sage
#

yes

drifting moat
#

no

rare sage
drifting moat
# rare sage

You're still passing a whole ass table as an argument to printf

rare sage
#

im not!!!

drifting moat
#

LIAR

rare sage
#

nearby_maps is a table of strings and bools if i understand it correct

drifting moat
#

which is line 33

rare sage
#
        printf("%s", map)```
#

no

#

wrong

#
for map in nearby_maps do```
#

is my for loop done wrong

#

yes it is

#

i think

drifting moat
#

oh. for index, value in pairs(nearby_maps) do

#

Do you not have language server?

rare sage
#

i do im just stupid and did it the rust way

#

it didnt show the autofill for like a second so i just did it my way

#

forced to learn lua

drifting moat
rare sage
#

i didnt read the rust book for 7 months of using rust

drifting moat
#

You're about to run out of tokens for SeriousGPT

rare sage
#

hmmm

#

no print

#

so

#

i assume it got nothing

rare sage
drifting moat
#

Maybe. I usually log an else too when it is empty just to check if I don't get silent errors

rare sage
#

no target object found

#

so nearby_maps is a table of bools and strings

#

would this get the string?

drifting moat
#

I think it's like this

    {
        ["agr_u_soldiers"] = true,
        ["agr_u_bloodsucker"] = true,
        ["agr_u_bloodsucker_2"] = true
    },
drifting moat
rare sage
drifting moat
#

Run that in your terminal

rare sage
#

ahh

drifting moat
#

Yes I cheat

drifting moat
#

I created the custom Anomaly launcher partly to add functionality that truncates that log file automatically on game launch, so I don't have to worry about doing it manually

rare sage
#

the dramatic music lmao

drifting moat
#

Don't forget to either create a wrapper for FileLogger or delete all calls to it prior to releasing your code (it will crash for everyone that doesn't have the Debugger mod installed)

random fulcrum
#

nah enforce it as a requirement

#

do it

drifting moat
#
function LoggerWrapper(msg, ...) --Just call this log or something idk
  if FileLogger then FileLogger.log(msg, ...) end
end
drifting moat
true lance
#

free model i found for "The Good Samaritan" what yall think should i use it?

undone spruce
#

that looks good for the game

#

you could modify it a bit to be a bit more close to the real rendictions of the gun, but mostly dimensions

#

tbh thats kinda of a goofy gun anyway

brittle oasis
#

guys can somebody tell me how can i turn off that "blurring" effect whenever my character is hungry/thirsty? it comes up really often and pisses me off

true lance
#

this is for making mods

brittle oasis
#

idk i asked in modded gamma support and guy sent me the link to this chat

#

so i decided to ask here

true lance
undone spruce
#

that should be asked there, or newbies chat, i for one don't even know what that effect is

dull juniper
#

Did someone have saiga23b with 2dss(NOT 3dss)?

rare sage
drifting moat
rare sage
#

ahhh ok

#

i started making a linux conversion kekl

#

so why isnt the bat file just tail -f /path/to/custom_log.txt?

drifting moat
#

VSCode actually is clever and remembers the last command you ran (even if you restart pc), so next time you open VSCode terminal you can just press up arrow + enter and the terminal will display logs.

rare sage
#

jokerge2 perfect

drifting moat
#

Because tail is a linux command. The .bat file uses windows api call

#

I sent you that because I knew you use Arch

rare sage
#

ohhh lmao

#

thought it was a coincidencal command they share

#

it doesnt print anything

undone spruce
#

i managed to make a straight to stalker export preset for substance painter, with dds conversion can make the textures game ready from the software, sans the thm files

#

is it of someone interest?

drifting moat
#

Add it to GitHub

rare sage
#

ok so
not to sound insane
what is stopping us from stitcher together the current existing maps
surelt theres lods in the game we can use?

drifting moat
#

If it's good maybe even contribute it to Anomaly Modding Book

#

under tools

rare sage
#

a life is always being simulated in offline

drifting moat
rare sage
#

the rust anomaly engine will win

drifting moat
#

The secret project

#

Port engine to rust

rare sage
#

ok i have to be using this debugger wrong

undone spruce
rare sage
#

do i have to define the debugger

undone spruce
#

besides its 2 small files, i'll create a topic later

drifting moat
rare sage
#

just make the git hub page and post the "2 small files"

drifting moat
rare sage
#

well yeah but the github would be fine right?

#

theyre not redistributing files for adobe

drifting moat
undone spruce
#

artistry/engineering software is no joke about those things, i wouldnt dare that much, at least not now

undone spruce
#

but it is indeed 2 export presets

rare sage
#

why isnt it printing...

drifting moat
rare sage
drifting moat
#

open that file

#

is it empty?

rare sage
#

look at the names

drifting moat
#

MOM GET THE WHIP whip

rare sage
#

WHY AM I BEING WHIPPED

drifting moat
#

I once wasted 2-3 whole hours because I missed an "s" in a folder name.............................

rare sage
#

custom_log isnt empty

#

customlog is

#

guessw hich one im checking

drifting moat
rare sage
#

there we go

#

now why isntthis loggign

drifting moat
#

Try -> "map: %s", value[0]

rare sage
#

nope

#

still no print

drifting moat
#

And the above print statement gets printed to in game console?

rare sage
#

nope

#

i assumeeee

#

its nearby maps is empty

drifting moat
#

Did you look at that LTX file?

#

check it

#

If need be DLTX it, but other scripts use it so thread with caution

rare sage
#

i dont seem to have a simulation_objects.ltx

drifting moat
#

In gamma economy is the LTX

rare sage
#

ohhh

#

simulation_objects_props

drifting moat
#

Oh damn

#

Lua indexing starts at 1

rare sage
#

who designed that

drifting moat
#

Okay I deleted that it could trigger epilepsy

drifting moat
rare sage
#

kill them

#

indexing at 1 is a crime

undone spruce
#

0 is not a real number

drifting moat
#

Sin = greh, right?

rare sage
#

yes

#

🤓 erm sin is грех

undone spruce
#

is there a rpm limit in the game, i want to go above 1000

#

you can

rare sage
#

i cant figure out why it returns nil

undone spruce
drifting moat
rare sage
#

it should be

#

it is not

#

non of them are

rare sage
#

nothing i have installed has the maps

#

or well

#

the adjacent map info

#

just stuff like this

random fulcrum
#

those are spawn locations for loose loot

#

you could check level warp objects in the map

#

could check singustromo's mod where warps are dynamically blocked by anomalies to see how it's done

#

i'm only guessing tho, they could just not have the data you need accessible

rare sage
#
[k00_marsh]
target_maps = l03_agroprom, l01_escape, l08_yantar, k00_marsh

[k01_darkscape]
target_maps = l01_escape, l04_darkvalley, k01_darkscape

[lo1_escape]
target_maps = k00_marsh, k01_darkscape, lo2_garbage, y04_pole

[l02_garbage]
target_maps = l06_rostok, l03_agroprom, l04_darkvalley, l01_escape, l02_garbage

[lo3_agroprom]
target_maps = l03_agroprom, 01_escape, l08_yantar, k00_marsh

[lo4_darkvalley]
target_maps = k01_darkscape, l02_garbage, k02_trucks_cemetery, y04_pole, l04_darkvalley 

[l05_bar]
target_maps = l06_rostok, l07_military, l02_garbage, k02_trucks_cemetery, l05_bar

[l06_rostok]
target_maps = l06_rostok, l08_yantar, l02_garbage, l05_bar

[l07_military]
target_maps = l09_deadcity, l10_red_forest, l10_radar, k02_trucks_cemetery, l07_military

[l08_yantar]
target_maps = l09_deadcity, l06_rostok, l03_agroprom, l08_yantar

[l09_deadcity]
target_maps = l08_yantar, l06_rostok, l10_limansk, l09_deadcity

[l10_limansk]
target_maps = l10_red_forest, l09_deadcity, l11_hospital, l10_limansk

#

this should work for now

sacred token
random fulcrum
#

monkeypatch man to the rescue

drifting moat
summer stream
summer stream
#

gn pep

novel ruin
barren spruce
summer stream
#

hold on lemme make a meme for that

novel ruin
#

Fuck it i quit, ima get back to Roblox where everything is documented and make sense peepopray

barren spruce
#

is freezoom fixed

drifting moat
barren spruce
#

no shot

#

nah youre kidding

drifting moat
barren spruce
#

it didnt

novel ruin
summer stream
summer stream
#

@novel ruin kekpoint

#

loh

barren spruce
#

also

#

there is another way

summer stream
#

shrimple

#

use yo brain

barren spruce
#

?

summer stream
#

and just type the id by using name of the location

barren spruce
#

what

#

i meant for the meme

#

i check id in console lmao

#

whatever

novel ruin
barren spruce
#

you should add another image below the console one

#

which says

#

open up aydins grass tweaks -> /levels

summer stream
barren spruce
quasi narwhal
#

guess it works as a reference

quasi narwhal
lilac idol
#

am I watching a seizure simulation

summer stream
lilac idol
#

lmao what

#

also 24 FPS is devious

summer stream
celest forge
lilac idol
#

is the actor inspecting fent flowing through his body

lilac idol
#

ok now I see itomegakekw

#

are you porting cod anims now

summer stream
#

asked a good fella fr

lilac idol
#

wouldn't it be easier to make the port on firebreath's rig with IK

true lance
#

i need them for my animation

lilac idol
#

just rename every bone and call it a day

celest forge
#

There's plugins for that no?

#

Specially now that you can use the X-ray plugin on the new version

#

Ngl I stayed on 3.6 because I'm too used to it and 4.x feels alien now

undone spruce
#

I'm fighting the urge for making icons for extended mag version of my pistols

#

It just looks ugly

true lance
#

any thoughts on the scale?

true lance
fair canopy
summer stream
fair canopy
#

Spoopy

undone spruce
#

i think this is ok

celest forge
#

Decent icons

celest forge
true lance
#

im not even the modeler my friend is so idk what thoes are

#

trying to export it to a ogf but get this error prob something simple but idk can anyone help?

#

idk why it would need a texture to export so thats why im asking

undone spruce
#

setting the textures on blender is kinda ass tbh

true lance
undone spruce
#

if you want to try ingame, it should open without the textures

true lance
#

idk if we can just change it like that

undone spruce
#

check if the ogf exported

this texture error doesnt impede the export

undone spruce
#

then theres something else, thats everything in the blender log?

summer stream
celest forge
#

3/10

#

Not enough shake

true lance
true lance
undone spruce
undone spruce
#

oh yeah, make sure the mesh has a armature modifier linked to the gun amarture

undone spruce
#

the bone is inside the armature

#

the bone is part of the armature

#

the little sticks, is the individual bones, the object that has them is the armature

true lance
#

how do we keep this from not being so bendy i need it to bed straight down

#

like this

summer stream
#

just make it non-related to other bone

#

set it to other vertex group

fierce imp
#

Hi guys, i want to make a specific sound mod for Anomaly (and compatible with GAMMA obviously) i would apreciate if you can tell me what program or programs i need to use peepopray

true lance
#

?

fierce imp
#

Nope, i've never programed anything and currently I'm studying a career so it won't be a problem to read, thanks my friend kekl

true lance
#

i use this

#

dont use the ai tho

#

its not the brightest

fierce imp
#

So with the book and the code editor i'm ready to go?

true lance
true lance
fierce imp
#

Thanks bro, i will take a look at those tomorrow, much apreciated pepeOK

true lance
true lance
undone spruce
#

i have no idea, never had it straight up closing before

true lance
undone spruce
#

i dont think its needed, it should export even with everything off

#

try to export as a object file

#

or in the export window, check on the left if its on CS/CoP mode

undone spruce
#

change it, anomaly runs on a CoP base

true lance
#

idk why it wont just let us export it, it is so picky

undone spruce
#

hmm, try to apply transform on the mesh and armature

#

i think its control+a with it selected and then all tranforms

true lance
#

um so some pieces went to see god when we did that

undone spruce
#

Now try to resize and then apply transform again

true lance
#

is the x-ray sdk important for pavel addon?

summer stream
#

no

true lance
#

omg then idk whats up bc this is annoying

#

it only exports all the pieces in there own file not all at once

#

and if you try to do it all at once blender crashes

summer stream
#

so basically every problem you have there is related to the bones, parent and how you export it

#

even though idk how you export it

#

plus the gun MUST have some textures to it applied

#

or else it would just don't export

true lance
true lance
summer stream
#

you dont know how to export it

#

also question

#

what blender version do you have

true lance
true lance
summer stream
#

as an object instead of ogf

#

then from object back to ogf

#

it works like that

#

but it can sometimes be related to the problem within model, which is very unlikely

true lance
summer stream
#

and what happens with ogf?

true lance
#

only time we can get it to export is by highlighting the whole model but when we do that is exports each piece into there own ogf

undone spruce
true lance
true lance
drifting moat
true lance
drifting moat
true lance
#

k thx

undone spruce
#

Theres supposed to only exist one armature

it has a main bone called wpn_body, then theres severla other bones thats parented, or forked, from wpn_body

drifting moat
#

It's stuff like code suggestions, autocomplete and that your editor is aware of the unpacked files and can lead you to the source of a function + code formatting

#

Let's say that a model is rigged and ready to animate. How hard is "just" the animation part to learn?

true lance
#

does not seem fun at all

undone spruce
#

Try to delete all armatures but one, then edit thisbarmature and only have 1 bone, and name it wpn_body,

Then edit all the gun meshes, delete all the vertex groups from them, and create a new one, called wpn_body, you can join all meshes together with ctrl+j

Add the armature modifier to the mesh with the sole armature thats still in the file and try to export

cunning wigeon
#

hey so can anyone please help me with this?

true lance
cunning wigeon
#

i havent gotten a response from this yet

undone spruce
true lance
cunning wigeon
#

you sure?

undone spruce
#

Maybe if i get some time

cunning wigeon
cunning wigeon
cunning wigeon
drifting moat
undone spruce
true lance
#

omg anonymous file name

#

i hate that setting

undone spruce
true lance
#

there is the normal named one

cunning wigeon
undone spruce
#

I really dont know, may be talking shit

Try to mess with the files from the radio mods in gamma, if you have problem with audio conversion you could check the anomaly modding guide to see if theres anything about it

cunning wigeon
#

oh okay thanks ron

main plover
#

Like vanilla textures have coats of arms and flags

summer stream
rare sage
#

ok thats wrong

#

im currently in dark valley

tawny sedge
#

is idkfrost here? if, THANK YOU!!! for the tutorial you posted

rare sage
#

somethings going wrong here

lament current
#

could anyone tell me how to add psy damage to items in a ltx. basicly im looking to make almost everything cause some small amount of psy dmg.

main plover
#

You can reverse engineer photo of loved ones effect because it restores psy or you can check how lucifer is doing that

lament current
drifting moat
lament current
# drifting moat That is a cool concept for a mod

i did a similar kind og thing with stalker 2. when i tried beginning to learn and mod that game. and the constant micro management of having to use other consumables as "anit psychotics" but then having yadulin or other consumeables as a cheaper anti bleeding. and having meds be more expensive made a quite high decision making enviroment.
not only having to consider ammo and meds.. but also if your psyche can handle potential fights, with the combat tramuatics and also just being in the zone..
however, i need to flesh it out.. and im still just learning to walk.. but thank you for the advice.. ill try some more 🙂

worn ice
#

Hi can someone help me with this i want to increase the amount of item that can be sell in shop but dont understand which value to change it ?

#

![supplies_1]
canned = 2, 1

#

Like this

#

does it said that if i am at supplies_1 i can buy 2 of canned food or just 1 ?

lament current
next zinc
#

Are they released ? Where can I downlpad them ?

rare sage
worn ice
pallid acorn
# next zinc Are they released ? Where can I downlpad them ?

Tbh I haven't officially released them. When I get home from work I can see about uploading it or even just throwing you the files.
I gotta comb through it again cuz they got a little fucky-wucky last time Grok changed his config setup for 3DSS.
(Assuming you're replying to my 3dss post. The discord reply link is a little goofy sometimes)

surreal crag
#

tried to port weapon model and got this thing. Anyone knows what can be the problem?

pallid acorn
#

Not an expert but my best guess is either an unapplied transform or some weird bone parenting or something.

rare sage
#

I am back home chat

#

time to code

#

would a dynamic seasons mod be possible

#

similar to seasons of skyrim
upon the next loading screen it swaps out all textures and changes the season

drifting moat
rare sage
#

no matter what i do

#

this returns nil

#

😭

drifting moat
#

Damn I walked straight into your trap

rare sage
#

unrelated

#

it doesnt seem to like the

#

value[0]

#

let me try it without that [0]

#

and see what happens

drifting moat
#

Ooor

#

Index from 1 CluelessBlind

rare sage
#

why would i index from 1

#

that'd skip the first value

#

lua tables dont start from 0 do they

drifting moat
#

We just talked about that KekSkew

rare sage
#

i thought u meant for loops started at 1 😭

drifting moat
#

Loop index = index of the element in the array, so if it starts from 1 then the array indexing starts there too

#

*table

#

Oh man if it works now

rare sage
#

hey vscode what does this mean

#

ohh

#

ok

#

i understnad

rare sage
drifting moat
#

You can just do foreach index, item in pairs(table)

rare sage
#

i dont think in my entire time programming ive used a foreach loop

drifting moat
#

I love it. The lazy way

rare sage
#

im so smart

#

i fat fingered f9 trying to hit f7

#

uhhh

#

apparently lua doesnt have foreach

drifting moat
#

Sry it's just for

rare sage
drifting moat
rare sage
#

still tries to add nil???

next zinc
#

3dss reticles i supposr

#

Im really excited for those

#

Specially the marchf 24x scope ones

drifting moat
rare sage
#

yea

#

attempt to call field 'insert' (a nil value)

drifting moat
#

No. Insert is nil

rare sage
#

omfg

drifting moat
#

It doesn't exist

rare sage
#

different error this time

#

and i didnt notice

drifting moat
#

If value would've been nil then the loop would've skipped entirely

next zinc
#

You just have to check if you declared the value

#

Probably not

rare sage
#

OPHHHH

#

ITS
table.insert(table_name, value)
NOT
table_name.insert(value)

#

fuck that one reddit thread i saw that told someone to do the one i did

drifting moat
rare sage
#

does #sometable get its length?

rare sage
#

oh

#

oops

#

no i know why

#

i missed a check on if a value was nil

drifting moat
#

if next(route) == nil instead do
if not route

rare sage
#

lets go

#

no crash

#

and its right

#

swamp does only connect to agroprom and cordon

#

tho

#

one thing

#

the map it starts from is wrong

#

for the bandit trader

#

it checks swamps

#

not dark valley

#

mayhaps RegisterScriptCallback("trader_on_restock", update_food_items) returns the wrong npc?

rare sage
#

checking_from is what ever that returns for the npc

drifting moat
#

Hmm idk I would need to check other code for this

#

Are you in the swamps by any chance?

rare sage
drifting moat
main plover
#

first time made so much editing to configs

drifting moat
main plover
#

it might be issue on just my end

random fulcrum
# rare sage

simply FORCE THE SCRIPT TO BEHAVE

if level_name == "k00_marsh" and connects == nil then
  connects = "l01_escape"
end
main plover
#

because without it my cconversion kit they are duplicated too

undone spruce
# true lance

did a quick check, there were several armatures, and the mesh were also in groups and some other transforms, joined all meshes to one of the armatures, deleted the others, and then deleted the armature in the object lists on the right, leaving only the mesh, since unlinking it made it disappear

then made a new armature according to the game, try to have a look and see if you understand it
its not scaled, still throwing the non uniform scale, select all items (simply press a) and then do the apply transform> all transform

pallid acorn
main plover
rare sage
drifting moat
#

Or wait did I lose the plot?

rare sage
drifting moat
rare sage
#

i meant the trader

main plover
#

It seems stacking of scripts works a little bit diffrent if I replace script it works fine

rare sage
#

accurate description of the average r/mechanicalkeyboards user

main plover
#

But I don't want to replace script but just add to it but I guess it will be not that easy as dltx 😐

rare sage
#

i think to add to it you need to copy paste the entire original?

main plover
random fulcrum
main plover
#

And only thing that I want to add to is local table hmm

rare sage
#

i knew it

#

sid isnt human

#

yeah all traders are considered in swampos

drifting moat
#

Sid and the forester I believe

#

They're not NPCs

rare sage
#

local current_map = alife_sim:level_name(game_graph:vertex(checking_from.m_game_vertex_id):level_id())
i think this is wrong

rare sage
#

no matter what it just says the current map is the marsh

rare sage
#

specifically the ```lua
unction get_obj_level(se_obj)
if not se_obj then
return
end

local sim, gg = alife(), game_graph()
return sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())

end

rare sage
#

sorry for the ping i just know its from one of ur mods

kindred tiger
rare sage
#

currently im doing local current_map = alife_sim:level_name(game_graph:vertex(checking_from.m_game_vertex_id):level_id())

#

but it only returns swamps

#

no matter where i am

#

checking_from is an npc value returned from the trader_on_restock callback

kindred tiger
#

That's because the actor is online. So m_game_vertex_id should not be read. For level objects (online) you can get the game vertex id via obj:game_vertex_id()

kindred tiger
# rare sage trying to get the adjacent levels of a specific level where a trader is located,...

As for this, this function might help:

-- Uses txr_routes to determine connected maps
-- @param       map
-- @returns     table
function get_directly_connected_maps(map)
        local get_txr_section = txr_routes.get_section
        local get_txr_mapname = txr_routes.get_map
        local routes = txr_routes.routes

        local txr_section = map and get_txr_mapname(map)
        if not (txr_section and routes[txr_section]) then return end

        local connected = {}
        for map, _ in pairs(routes[txr_section]) do
                connected[#connected +1] = get_txr_section(map)
        end

        return connected
end
drifting moat
#

But what if the restock callback returns an offline NPC? Or can that just never happen?

kindred tiger
rare sage
drifting moat
rare sage
#

can they?

true lance
drifting moat
#

Yes and they even comment on prices/chat about stuff related to shopping on the PDA channel

true lance
drifting moat
true lance
#

alr thx lol

rare sage
random fulcrum
true lance
#

how do i install it in my visual studio code?

random fulcrum
#

ltxs are just ini files

#

if you want the markup

#

setting vsc to treat them as regular inis already gives you the colorful text

rare sage
true lance
main plover
rare sage
#

click this icon

#

search it

#

click install

drifting moat
rare sage
#

true

#

how would i do that

drifting moat
#

I'll ask in anomaly DC

rare sage
#

just wait an ingame day?

drifting moat
#

Abuse drugs

#

Or actually

#

In the F7 debug menu there's a sleep button

main plover
drifting moat
main plover
#

Ah then no

true lance
#

can i make it give me English notifications?

drifting moat
rare sage
#

no, learn russian chadchris

true lance
rare sage
#

граната

true lance
#

da

rare sage
#

да

true lance
#

for sure man yey

#

yep

rare sage
#

хвала монолиту

true lance
drifting moat
#

No luck on anomaly DC

rare sage
main plover
#

hmm I noticed I getting more and more food drops from enemies( worst tier cooked meals I usually throw it away) but what if we could clean t1 food with potassium or activated coal hmm

rare sage
#

YOOO IT WORKS

#

correct maps

random fulcrum
#

okay now go to the swamps

drifting moat
#

Coolio

#

And she's using my debugger too PepeHands flawless modding right there

rare sage
#

ok

#

so

#

now

#

i should determine how many mutants are in the region

#

24 fucking hours on getting the maps

drifting moat
rare sage
#

we now have map storage

#

now

#

im gonna have to iterate over each npc in the map i think

drifting moat
#

Idk if you can do that. Only examples I saw iterated all possible ids and checked if it's an npc if it is then check if stalker or mutant

drifting moat
#

This might not be the best way to do it. It's the only way I know

rare sage
#

its uh

#

fine enough for now

drifting moat
#

tasks_bounty.script once again saves the day

drifting moat
#

Yep

rare sage
#
    if
        se_obj
        and (id ~= 0 and IsMonster(nil, se_obj:clsid()) and se_obj:alive() and sfind(
            se_obj:section_name(),
            "sim_default"
        ) and get_object_story_id(id) == nil)
        and (se_obj.group_id ~= 65535)
    then
        comm = alife_character_community(se_obj)
        return valid_targets[relation]
    end
end```
#

i think this should work?

drifting moat
main plover
#

good idea? hmmtodayiwill

drifting moat
main plover
#

And for green ones it would need potassium in bigger amount

rare sage
#

lets go

drifting moat
#

Looks like sfind doesn't exist

rare sage
#

yee

drifting moat
#

Is that supposed to be find in string?

rare sage
#

i didnt obtain a variable from task_bounty

#

is string.find()

#

ok it doesnt seem to work

drifting moat
#

I mean via debug menu

#

Just to confirm

rare sage
#

nope dont work

drifting moat
#

What is rela?

#

In the script you sent

drifting moat
rare sage
#

i fixed that

#

also rela is relationship? i think

#

if it aint a full word it aint my variable

drifting moat
#

Why you inserting like this?

#

Just drop all monsters to the table. Pass mutant not mutant[rela]

rare sage
#

stolen from the task_bounty

drifting moat
#

That's why you don't get results. You're looking at the wrong place I think

rare sage
#

ahhhh

drifting moat
#

At this point put a sticky note on your monitor saying that omegakekw

rare sage
#

if i did that for every issue i wouldnt have a monitor anymore

#

progress?

drifting moat
#

Let me see tscs_main line 100

rare sage
drifting moat
#

Hmm

#

U sure this is the script? KekSkew

rare sage
#

i seem to have fixed the crash

#

but im still getting 0

drifting moat
#

Line 108 is not doing anything. I mean you don't use the variable

drifting moat
true lance
#

so for my gun how do i make npc's spawn with it?

main plover
true lance
drifting moat
true lance
#

how would i go about that?

main plover
#

NPC_Loadouts

rare sage
#

@drifting moat like the logging

#

3000 nests

drifting moat
#

First log is wrong

#

se_object -> se_obj

rare sage
#

it didnt crash

#

but

#

this was the error i think

#

it never got past here

true lance
#

so is this what i would need for my weapon to spawn?

drifting moat
#

I think you can remove the get_object_story_id call btw

#

But it shouldn't silently cause errors

rare sage
#

yeah i dont think theres story mutants

#

ok so

#

it found

#

apparently

#

289 mutants

#

i calculated this by file length / 4 (the total amount of prints per mutant)

#

but it says total mutants = 0

#

ok i found out hwy

drifting moat
# rare sage

This just returns a list of ids. This list contains mutant ids only

#

So you associate them to maps elsewhere

rare sage
#

so i should jsut return the ID?

#

wait

#

easier idea

#

i just

ebon haven
#

anyone have idea how Interactive PDA 1.8 delviery works

rare sage
#

check if its a mutant

#

check if its alive

#

and if it is add it to the array

random fulcrum
ebon haven
#

i wonna fix npc dont even appearing when i want basic items like medkits

#

but idk how to

#

lmao

rare sage
#

like this

drifting moat
#

Wait

#

You're inserting nil to mutants table

#

Second param is what to insert

drifting moat
#

First is where to

rare sage
#

correct

drifting moat
drifting moat
rare sage
#

im so glad i never coded like that for anything but printing

#

i guess just

#

if se_object and ...

drifting moat
#

But then you will get 0 monsters probably

#

But yeah it's a good idea to make code more resilient

rare sage
#

yea 0 mutants

drifting moat
#

Where do you get se_object from?

rare sage
drifting moat
#

Send the whole function

rare sage
teal tapir
#

Could someone help me make a 5-10 mod modpack

drifting moat
#

Also you define gg twice

rare sage
#

youre right

#

also mild optimisation of moving map into a secondary if statement so that it doesnt check non mutants

drifting moat
#

Okay so se_object is nil, but the map = xxx call doesn't crash because of it. So map is nil too

rare sage
#

new function

drifting moat
#

gg unused can nuke it too

rare sage
#

yea

drifting moat
#

Dunno why sim:object returns nil

rare sage
#

maybe sim is nil?

main plover
#

alright mod_craft is making me confused

recipes start with x_item_name

but if you add separate ltx with
a_item_name
b_item_name
it should add separate instances in crafting menu but in my case it adds new one BUT also changes og X recipe to a_b variant

drifting moat
rare sage
#

yeah

#

no

#

wait

#

it isnt nil

#

map is tho

#

se_obj isnt nil
if it was nil
mutant isnt on valid map
woudnt print

drifting moat
rare sage
drifting moat
#

Add more context to the log that tells you if se_obj is nill or not

rare sage
#

se_obj cant be nil as its printing something

#

my only print statments are AFTER the nil check

drifting moat
#

!true

queen pineBOT
#

_ _||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​|| _ _ _ _ _ https://cdn.discordapp.com/attachments/920016996752564286/1311338942716706826/ThatsTrue_2.mp4?ex=67487f0f&is=67472d8f&hm=d8262832461efba58751f4fee836eaf5db040d4977b64b9421a2a673d3e737f7&

drifting moat
#

Maybe sim_object doesn't return a server object?

#

In the anomaly modding book you can find how to get server and client objects

rare sage
#

server and client? ithought gamma was single player

drifting moat
#

obj = alife():object(id)
Pass obj to the map call

rare sage
#

wifi so ass it doesnt load the full emote

drifting moat
rare sage
#

no change

undone spruce
#

this is hell

drifting moat
drifting moat
drifting moat
drifting moat
rare sage
#

i cant do :game_vertex_id() like with checking_from for some reason it causes a crash saying that se_obj doesnt have :game_vertex_id()

drifting moat
#

Because it's not a server object

drifting moat
main plover
#

I surrender 😦

#

anomaly modding book:

; ATTENTION: the reason why there is a "x_" in the start of craft items names is to avoid an issue with configs reading by the scripts 
; if you use 2 craft recipes for the exact same item for example, the reader will take one recipe and ignore the rest
; to avoid this case, you put 2 strings of anything before the actual name, here i used "x_" and "y_"
; example: if you want to use 3 recipes for the geiger counter in one section, do something like this: "x_geiger_dead" "y_geiger_dead" "z_geiger_dead"
; Otherwise, put "x_" or anything and move along. Just always remember to use 2 digits only and nothing else
; this is a stupid yet simple fix
;]]
celest forge
#

Anyone have a link for the GAMMA GitHub repo

main plover
#

my config:

![meal_list]

z_meat_tushkano_b            = 1, false, meat_tushkano,1,drug_charcoal,1
z_meat_dog_b                = 1, false, meat_dog,1,drug_charcoal,1
z_meat_pseudodog_b            = 1, false, meat_pseudodog,1,drug_charcoal,1
z_meat_flesh_b                = 1, false, meat_flesh,1,drug_charcoal,1
z_meat_boar_b                = 1, false, meat_boar,1,drug_charcoal,1
z_meat_snork_b                = 1, false, meat_snork,1,drug_charcoal,1
z_meat_bloodsucker_b        = 1, false, meat_bloodsucker,1,drug_charcoal,1
z_meat_psysucker_b            = 1, false, meat_psysucker,1,drug_charcoal,1
z_meat_lurker_b                = 1, false, meat_lurker,1,drug_charcoal,1
z_meat_chimera_b            = 1, false, meat_chimera,1,drug_charcoal,1

y_meat_tushkano_a            = 1, false, meat_tushkano_b,1,antirad_kallium,1
y_meat_dog_a                = 1, false, meat_dog_b,2,antirad_kallium,2
y_meat_pseudodog_a            = 1, false, meat_pseudodog_b,2,antirad_kallium,2
y_meat_flesh_a                = 1, false, meat_flesh_b,2,antirad_kallium,2
y_meat_boar_a                = 1, false, meat_boar_b,2,antirad_kallium,2
y_meat_snork_a                = 1, false, meat_snork_b,2,antirad,1
y_meat_bloodsucker_a        = 1, false, meat_bloodsucker_b,2,antirad,1
y_meat_psysucker_a            = 1, false, meat_psysucker_b,2,antirad,2
y_meat_lurker_a                = 1, false, meat_lurker_b,2,antirad,1
y_meat_chimera_a            = 1, false, meat_chimera_b,2,antirad,2
main plover
main plover
celest forge
#

Thanks

undone spruce
#

Posted the Substance Painter export presets in the Anomaly Modding Server, will keep it there at least before someone throw rocks at me
#883097205710389288 message

#

@regal bolt Remember you asked smth about it

summer stream
#

bump#?

undone spruce
#

non working as usual

summer stream
#

fire

undone spruce
#

but i dont want to be complacent

#

in fact, i forgot smth,
it uses a faux baked height map from the mesh, since most meshes dont have them, it will throw errors when trying to export the bump#, but generates its as intended

summer stream
undone spruce
#

all in for a gray texture

regal bolt
true lance
undone spruce
#

it exported normally here

true lance
#

wth

#

then our blender busted

#

we tried exporting as a ogf

undone spruce
#

im using 4.3.2 with xray engine tools version 2.44

#

updated to xray 2.45, export as normal

true lance
undone spruce
#

dunno if thats a issue, not running 4.4 because it doesnt run on my PC

but you could try 4.3

true lance
#

still just didt work just gonna try modding a dif game

summer stream
#

what

#

how

rare sage
summer stream
rare sage
summer stream
#

i ate ur scripts

#

no more level id

rare sage
#

how will the levels get alcahol now

summer stream
#

never

#

it never will

rare sage
#

ok uh minor issue

#

it seems to get called on companions too

#

tis called on ALL npcs

rare sage
#

apparently trader_on_restock is called when u talk to any npc

#

chat did the anomaly modding book get nuked lastnight?

sacred token
#

yeah looks like someone did an oopsy

desert tinsel
#

alright so, if i we're to attempt to currently change the recipe for crafting a certain ammo
what files should i specifically be looking at to modify lets say 338 lapua as an example

#

looking to change the powder for certain ones to be more expensive/less on some

drifting moat
#

How can I add a comment to an ltx file?

drifting moat
# main plover ;

I just realised that VSCode can help me... CTRL + K, CTRL + C pepew Thanks still though!

main plover
drifting moat
#

I reported it to their DC server

#

It will be fixed today

drifting moat
#

@main plover @rare sage The modding book is fixed!

desert tinsel
#

alrighty, and if i we're attempting to set a weapon like the pp2000 to fit inside the pistol slot, would this be correct?

#

or is there more i'd need to modify

drifting moat
#

I can't confirm, so that's the most help I can provide

main plover
#

single_handed = 1
slot = 1

#

@desert tinsel

desert tinsel
#

no need for the semicolon 2

main plover
drifting moat
desert tinsel
#

ahh okay got it

#

apologies im new to editing the files and making mods lol

desert tinsel
drifting moat
desert tinsel
#

im just tryna modify lapua to 60 powder instead of 105 lol

desert tinsel
main plover
desert tinsel
#

by chance, what does each part mean if you know

#

i can tell casing r7 is probably rifle casing

#

but what does the "3_2" on powder mean

main plover
#

powder_3 is T3 powder used by rifles in base gamma, 2 is multiplier of ammo stack if I recall correctly

desert tinsel
#

ah so it would result in 30?

main plover
#

yes

desert tinsel
#

while a 4 should result in 60

main plover
#

But ammo crafting is very weird logic wise

desert tinsel
#

i see

#

so if i we're to make a file changing its powder to powder_3,4 it SHOULD work?

main plover
#

should just try and error

desert tinsel
main plover
#

but other than that it should work

desert tinsel
#

ohh right

#

it doesn't seem to be working at least

main plover
#

Where did you put file?

#

And how you named it @desert tinsel

#

and do you use for example arti ammo?

desert tinsel
main plover
#

that's an issue it's text document not ltx and don't call it ammo_vanilla but something like ammo_z_magnum.ltx

desert tinsel
#

ahh okay

#

by chance how would i convert a txt to a itx file

main plover
#

You need to enable in your windows explorer to show extensions

To display file extensions in Windows, open File Explorer, go to the "View" tab, and check the "File name extensions" box. Alternatively, you can access "Folder Options" (or "Options") from the "View" tab and uncheck "Hide extensions for known file types
desert tinsel
#

got it, so this

#

lets fuckin go

#

got these both working
turns out txt isn't the best thing to set them as lol

#

now to attempt to figure out how to set the pp2000 to be used with a detector

main plover
#

one handed should handle that