Schall Tank Platoon


Adds different classes and tiers of tanks in-par with power armors, having vehicle equipment grid. Aims to fill the gaps the vanilla game should have. Not overhaul nor OP. Vanilla oriented and balanced. (Locale: English, Deutsch, 正體中文, 简体中文, Русский, Português Brasileiro, Español)

Content
1 year, 1 month ago
0.16 - 1.1
35.7K
Transportation Combat

b [Solved] New Factorio version causing an error on load

1 year, 5 months ago

Error on load with a well modded game.
game save https://www.dropbox.com/s/d87kbz21hmsxbd4/online.zip?dl=0
Error:
6.788 Error ModManager.cpp:1623: Failed to load mod "SchallTankPlatoon": SchallTankPlatoon/prototypes/gun.lua:18: attempt to index field '?' (a nil value)
stack traceback:
SchallTankPlatoon/prototypes/gun.lua:18: in main chunk
[C]: in function 'require'
SchallTankPlatoon/data.lua:3: in main chunk
Loading mod core 0.0.0 (data.lua)
Checksum for core: 2010374811
Error ModManager.cpp:1623: Error in assignID: recipe-category with name 'crafting' does not exist.

1 year, 5 months ago

version 1.1.85 the same

1 year, 5 months ago

Commenting out/removing line 18 (tankAC.attack_parameters.sound[1].volume = 0.5 --1.0) in prototypes/gun.lua allows the mod to load.

1 year, 4 months ago

Same on 1.1.86 as well.

1 year, 4 months ago

Can confirm, Glendening's fix works for the current release version!

1 year, 4 months ago

Worked for me aswell. Thx alot!

1 year, 4 months ago

didnt work for me sadly, but mine isnt exactly the same. same errors, but not all the error file is exactly the same.

1 year, 4 months ago
(updated 1 year, 4 months ago)

Got the same error, but unfortunately I don't seem to have a gun.lua to edit. The closest match I can find is potentially either equipment.lua or ammo-category.lua.

edit: Nevermind, I was looking in the wrong place.

1 year, 4 months ago

i dont understand why its working for you guys but not me. sad Abby...

1 year, 4 months ago
(updated 1 year, 4 months ago)

i dont understand why its working for you guys but not me. sad Abby...

You said it was the same error but not the same error file? As in, pointing you to a different file in the error? What is the exact chunk of error you are getting? Like I posted in the initial post?

1 year, 4 months ago

i really shouldnt have deleted my thread's question, but basically for the error code i just typed the text i got when i launched the game. lemme see if i can grab it.

1 year, 4 months ago

Failed to load mods: SchallTankPlatoon/prototypes/gun.lua:18: attempt to index field '?' (a nil value)
stack traceback:
SchallTankPlatoon/prototypes/gun.lua:18: in main chunk
(C): in function 'require'
SchallTankPlatoon/data.lua:3: in main chunk

that's my verbatim error code.

1 year, 4 months ago
(updated 1 year, 4 months ago)

I did some digging around in the gun.lua file (as someone who has no idea how to code in lua). From what I can tell, there are 2 solutions to the issue, with the first being to delete the 18th line of the file (which is "tankAC.attack_parameters.sound[1].volume = 0.5 --1.0" without quotes) and save, which I assume would likely mean that some audio wouldn't play, but I also got it to work by changing the line to "tankAC.attack_parameters.sound.volume = 0.5 --1.0" (without quotes), however I don't know if that has any repercussions.

1 year, 4 months ago

I did some digging around in the gun.lua file (as someone who has no idea how to code in lua). From what I can tell, there are 2 solutions to the issue, with the first being to delete the 18th line of the file (which is "tankAC.attack_parameters.sound[1].volume = 0.5 --1.0" without quotes) and save, which I assume would likely mean that some audio wouldn't play, but I also got it to work by changing the line to "tankAC.attack_parameters.sound.volume = 0.5 --1.0" (without quotes), however I don't know if that has any repercussions.

that got it to work so far! thanks so much!

1 year, 4 months ago

i kinda new here. after i delete 18th line it kept coming back how to permanently delete that?

1 year, 4 months ago

nvm it worked

1 year, 4 months ago

Can confirm, the fix works on 1.1.87.

1 year, 4 months ago
(updated 1 year, 4 months ago)

Same issue, regardless of how i handle line 18, commenting, changing, doesnt make a difference, weirdly i have both a server and my brother able to boot and connect to said server just fine, for some reason my client absolutely refuses to do anything. It also fails to connect to steam API and if i had to guess thats probably why.

quick edit: as far as i can tell from quick date checks i had all of this working after the update, so i have no idea why any of this doesn't work now, Hence why i think its something on my end.

another quick update: went ahead and downloaded a clean executable, loaded it with mods, and it worked? Maybe i need to verify the steam game i have no idea, i'll do that later as my patience is very low right now.

I've rebooted twice now and my computer is up to date, so its possible its some weird obscure platform bug on my end but i have no idea why that would be. Might try loading the standalone version without steam just to see what happens.

1 year, 3 months ago

Commenting out/removing line 18 (tankAC.attack_parameters.sound[1].volume = 0.5 --1.0) in prototypes/gun.lua allows the mod to load.

um. dumb question, how to I do that? I've been looking around for the last hour to try and find it. I know it's not in the regular files, but I don't know what to do

1 year, 3 months ago

Commenting out/removing line 18 (tankAC.attack_parameters.sound[1].volume = 0.5 --1.0) in prototypes/gun.lua allows the mod to load.

um. dumb question, how to I do that? I've been looking around for the last hour to try and find it. I know it's not in the regular files, but I don't know what to do

you unzip the mod folder, open the folder structure, the error in the window tells you which directory to look under, you find the lua file, and then comment or remove line 18 from that lua file, then you can rezip the folder, dont change the name of the zip otherwise it fails to load and it should work. Not in super indepth but it should get u in the right direction, its been a while since i've done this since my steam client exploded lol.

1 year, 3 months ago

Even manually fixing it causes it to break every time it resyncs to the server as it redownloads it from this mod portal and not the edited server version. Any chance of the portal getting a fixed version?

1 year, 3 months ago
(updated 1 year, 3 months ago)

I did some digging around in the gun.lua file (as someone who has no idea how to code in lua). From what I can tell, there are 2 solutions to the issue, with the first being to delete the 18th line of the file (which is "tankAC.attack_parameters.sound[1].volume = 0.5 --1.0" without quotes) and save, which I assume would likely mean that some audio wouldn't play, but I also got it to work by changing the line to "tankAC.attack_parameters.sound.volume = 0.5 --1.0" (without quotes), however I don't know if that has any repercussions.

(Also, not saying you do or don't know code if it comes across that way, just covering everything so everyone can understand ^^ )
Lets take the following:
sound = {
filename = "FILENAME",
volume: 0.6
}

So, when you have a array like above, there's a few different ways to set or get data from the array.

You can do sound[0], or sound[1], which since numbering systems start at 0 in (all? most) languages, that would give you sound.filename, and sound.volume respectively. Alternatively, if you know the name of the variable itself, you can just do sound.filename, or sound.volume.

I don't know if it changed between mod updates, but line 18 is asking for sound[1].volume, which would look like this:

sound = {
filename = "FILENAME",
volume: {
volume: 0.6
}
}

So your fix of changing sound[1].volume to sound.volume is one of two real possible fixes (the other being sound[1]), and shouldn't actually break anything.

1 year, 1 month ago

Sorry for the late reply.
Have not expected a game minor stable update would break my mod. Thought the game is still on 1.1 and my mods would still work fine...
So I assumed being safe to take a long break from Factorio.

Anyway, found out 1.1.83 has changed the prototype definition of tank cannon firing sound. It added an extra dimension to the array, rendered a simple array indexing failed to work.
I have applied additional checks to recent mod version 1.1.2, which should now be able to handle both pre- & post- 1.1.83 game versions.

1 year, 1 month ago

Woot! Thanks much!

New response