Toemmsen96 / ChatCommands

Mod to add /commands to the chat to Lethal Company, especially for testing mods and messing around
MIT License
3 stars 1 forks source link

spawn command not working properly #2

Closed gento873 closed 11 months ago

gento873 commented 11 months ago

when i use /spweny [enemyname] a=1 p=@me it summons a completely different enemy exemple: /spweny Spring a=1 p=@me and it summons a hoarding bug and when i use /spwscr [scrapname] a=1 p=@me it just dosent summon any help ?

and also: when i spawn gun with /spwscr,i just cant use anything anymore,cant pick up stuff,cant open terminal, cant even start the ship

Toemmsen96 commented 11 months ago

You may need to chech with /enemies and /getscrap to see if the things you are trying to spawn are available on the map. Then try using that name for the thing you are trying to spawn

The gun thing i also realised, i will look into that

Toemmsen96 commented 11 months ago

Also if you are trying to spawn only one scrap item you dont need to specify the amount, doesnt really solve the issue tho

gento873 commented 11 months ago

iam checking the /getscrap and the /enemies but it just dosent change anything

gento873 commented 11 months ago

for enemies even if i do one that is spawnable it will take mutliple tries to get,and for scrap it will never spawn, ionly managed to get it to spawn 1 time in singleplayer

gento873 commented 11 months ago

I'll retry with /enemies and /getscrap but it prob wont work

Toemmsen96 commented 11 months ago

Hmmm, that is weird, can you provide logs?

gento873 commented 11 months ago

lemme just grab them,i'll have to do sum else for scrap logs tho alsoforgot to mention that outside enemies work image image image

Toemmsen96 commented 11 months ago

it seems like the enemies get spawned, however you may not encounter them right at the moment. try spawning the spring with p=@me to see if it spawns on you (before that maybe enable godmode so you dont die right away). I might need to change the function how enemies spawn randomly so it doesnt require a vent for them to spawn. aditionally: if you only spawn one enemy randomly you don't need to clarify p=random and a=1, for example like this: /spweny spring

gento873 commented 11 months ago

i do spawn with p=@me most of the time,lemme go in a solo match and fetch that really quick

gento873 commented 11 months ago

i got lucky <with the spring being good on the first try but then this spawned a centipede image

gento873 commented 11 months ago

image and yet, distant err unknown or sum like that appears

Toemmsen96 commented 11 months ago

yess, i figured that it still displays an error even if there isnt any, i need to change that because some of it is a false error (forgot to change that in the newest version)

Toemmsen96 commented 11 months ago

i got lucky <with the spring being good on the first try but then this spawned a centipede image

i think i know what the issue is, i will look into that. i think i fetched a list of spawnable enemies, that dont actually correspond with the right index. you might be able to spawn the nutcracker anyway if you try a different name

gento873 commented 11 months ago

ye,one time i tried to spawna spring,it spawned an hoarding bug so i spawned the hoarding bug to get the spring,its just annoying because one time the i spawned a monster,didnt w<ork,tried to spawn what it spawned and it spawned the wrong again,but thanks for looking into it

gento873 commented 11 months ago

whta about the scrap tho ? are you like gonna contact the one that made the scrap thing ?

Toemmsen96 commented 11 months ago

whta about the scrap tho ? are you like gonna contact the one that made the scrap thing ?

i will improve on that, im testing some things atm

ye,one time i tried to spawna spring,it spawned an hoarding bug so i spawned the hoarding bug to get the spring,its just annoying because one time the i spawned a monster,didnt w<ork,tried to spawn what it spawned and it spawned the wrong again,but thanks for looking into it

try using it on a different map, i when we made the thing we used the experimentation map to test stuff and it worked there, but the enemy indexes are sometimes different on other maps

gento873 commented 11 months ago

ah,i already tried multiple times on experimentation but still dosent work

Toemmsen96 commented 11 months ago

yeah, i will look into it, i guess it may not have been experimentation, but yeah. however i found why some of the spawn scrap code doesnt work as it should, because i had some of the code in the wrong place after improving the code structure 😅 my fault

gento873 commented 11 months ago

ight thank you !!

Toemmsen96 commented 11 months ago

i believe i fixed the scrap thing, the gun is still broken, and the enemy part i still need to look into

gento873 commented 11 months ago

that's nice !

gento873 commented 11 months ago

i assume you're gonna release the update when you have fixed everything

Toemmsen96 commented 11 months ago

yess, maybe without the gun, i think that will take more to fix

gento873 commented 11 months ago

alright

Toemmsen96 commented 11 months ago

found the issue with the enemies not being the right one, i had a typo in there, i will upload the update soon

Toemmsen96 commented 11 months ago

update is live now

gento873 commented 11 months ago

thank you ! ima test it in solo

Toemmsen96 commented 11 months ago

perfect, thanks for the feedback!
If you are using the mod manager it may take up to half an hour until you get the update tho. Dragging the files in manually should work

gento873 commented 11 months ago

ight,if there is any more errors i'll tell you !

Toemmsen96 commented 11 months ago

👍🏼 thanks. just fyi, the gun isn't fixed yet, it will take some more time to find out how to spawn it properly without errors and stuff, but there is a new feature where you can set the value of scrap using v="value" when spawning the scrap items, so you may test that as well if you want.

gento873 commented 11 months ago

ok so the enemies work bt the scrap dosent work and it just changed the error to distant ERR unknown@[myusername]

gento873 commented 11 months ago

i used /spwscr Hairbrush a=1 p=@me or /spwscr Hairbrush p=@me

gento873 commented 11 months ago

i'll retry with value

gento873 commented 11 months ago

nope still dosent work

gento873 commented 11 months ago

image

gento873 commented 11 months ago

image

Toemmsen96 commented 11 months ago

can you try it with cog really quick?

Toemmsen96 commented 11 months ago

as the scrap part

gento873 commented 11 months ago

ight gimme a sec

Toemmsen96 commented 11 months ago

i do also get the same error sometimes, cog always works for me for whatever reason, so i guess i did my testing a little wrong 😅

gento873 commented 11 months ago

cog still dosent work lmao

Toemmsen96 commented 11 months ago

can you try just typing them in lowercase, i think that is the issue lol

gento873 commented 11 months ago

image this was the attempt with the uppercase

gento873 commented 11 months ago

if it is the issue,maybe put the scraps in lowercase lmao

Toemmsen96 commented 11 months ago

yes, i added the lowercase thing for everything except for the scrap name because i guess i just forgot, i will add the ToLowercase() and update it. i will probably also add an error message so you get asked if you used /getscrap to see if the thing you are trying to spawn is even spawnable on this map

gento873 commented 11 months ago

yep you're right,the uppercase causes the error

gento873 commented 11 months ago

i managed to spawn a hairbrush with a value of 1543 so yep that's nice

Toemmsen96 commented 11 months ago

perfect, i will update it right away

gento873 commented 11 months ago

alright nice

Toemmsen96 commented 11 months ago

updated it