Space Engineers

Space Engineers

Tank Tracks Framework & API
133 Comments
DangerNoodle13 Oct 1 @ 4:36pm 
The modded suspension block (Like sprockets) have stopped being compatible again. Has there been a recent update?
Digi  [author] Sep 27 @ 7:34am 
The suspension body is what gives the track the color, not the wheel. That was on purpose so that one can have differently-colored wheels than the tracks.
MUTED Sep 26 @ 9:44pm 
For some reason tracks now keep the original colors of the grid? Re-painted blocks several times, but nothing can change them.
Sköll Sep 14 @ 4:52am 
I did try to go through my old logs and for whatever reason the lines weren't on them anymore about the tank tread API causing the error. I don't know why. If it happens again I can post the logs, but it likely is what you said. Taking the mod out for a while fixed it so I have it back in and it's working fine.
Digi  [author] Sep 14 @ 12:19am 
@Sköll the log is still there up to 3 days from its creation if you wanna find it in %appdata%/SpaceEngineers/ and sort by date.

But it sounds like there was a failure to either load or to unload from a different world which didn't tell my mod it unloaded so it didn't close the write lock on its own log file, and loading into a new world would've always crashed from it not being able to add a write lock onto that file.

So for future ref, if you ever get strange new crashes during loading of a world, restart the game before doing any changes to clear out all the hooks from previously failed worlds.
Sköll Sep 13 @ 7:29am 
@Blyatapus try putting a single control block on any attached items. Like a single button panel. For some reason, the grid doesn't count as being owned by you unless some kind of accessible block is present on the grid is on it that is controlled by you. So stick a button on the side of any grid/subgrid you need to put treads on and then remove it when you're done.
Sköll Sep 13 @ 7:26am 
I went to go load the mod to get the log, and for reasons I can't explain, it just stopped crashing. I didn't touch or change anything, it just doesn't crash anymore. I don't understand this game >:V
Digi  [author] Sep 13 @ 12:19am 
Post the SE log from when it denied you loading.
Sköll Sep 12 @ 2:09pm 
Something broke in the mod, I can't get my world to load with the mod enabled. Disabling it makes the world load in fine.
Blyatapus Sep 1 @ 9:11am 
@Digi I have the same issue as UncleFester right now.

I had a LG rover that was a half-track, piston-jacked it to renovate the suspension and now it's telling me I can't build tracks on a neutral/enemy vehicle.

Restart doesn't fix it, it was just a locally hosted MP server and changing it to solo dolo doesn't fix it either. Any ideas?
Digi  [author] Jul 10 @ 3:53am 
@Into
Sounds like something is different on the server, are you maybe extremely far from 0,0,0 ? Or does the server have some mods that affect suspension alignment in some way?
Can you get the server's world and run it in singleplayer to see if it has the same issue with your tank?

@UncleFester
No idea what that can be, I can fiddle about with the checks to re-think them and hopefully fix it xD
The strange bit is that rejoining didn't fix it but server restart did, considering that I run this check clientside.
UncleFester Jul 9 @ 5:22pm 
Should have mentioned this was on a MP server, and the regular server restart made the problem go away... Yay!
UncleFester Jul 9 @ 4:50pm 
So... odd problem... on a LG that currently HAS tracks (that I added days ago), I now cannot modify them... Pressing "F" while looking at the grid says I cannot build tracks on enemy or neutral grid"

But I personally (not faction mates, all me) own every block... this definitely not an enemy grid...

tried restart of client, tried restart of SE... any idea?
Into Jul 9 @ 5:11am 
@Digi
Here the BP:
https://steamcommunity.com/sharedfiles/filedetails/?id=3520979741
still works in creative, not on server.
Digi  [author] Jul 8 @ 9:29pm 
@Into
The horizontal alignment might not be exact with what I built there, can you provide a blueprint?

@ꪊ᭢᭢᭢᭢᭢ꪊ᭢᭢᭢
So not wheels on rotors (which this already supports)? I'm not sure what you mean then, can you link a blueprint?
Into Jun 28 @ 6:13am 
I've basically built what is seen in the title image
Into Jun 28 @ 6:03am 
Imported a rover I've built in creative and tried to put the tracks on, but it tells me that wheels do not align, it's a combination of 1x1 and 2x2. It was working in creative tho.
Digi  [author] Jun 14 @ 10:22pm 
I've updated the mod to add some more info around the error to maybe track down the issue.

First try to make it happen again and when it does can you post the full SE log (here or steam or discord @m_digi ).

I've also added an option to turn off multithreading, if you want to try to see if that contributes to the problem, first close the game to reset the issue, then go in the mod's storage folder ( %appdata%\SpaceEngineers\Storage\3208995513.sbm_TankTracks\ ), there create a "nothreads" file (without any extension, that's important). Once you load a world with the mod, the info.log will have around the 8th line a "Threads: " that mentions if it's on or off.
Cona6789 Jun 14 @ 12:03pm 
Yes it seems to happen even after a reload, a complete relaunch is needed to fix it, but only temporarily. im not exactly sure what the cause is, but I know it only ever happens when my friend is in a tank thats using the tracks mod.
it has happened to him before when i was in a tank using the tracks mod, so to me it seems it happens when someone else is using a vehicle with tank tracks, and you try to use a seat or go in third person.
as soon as I removed the tank track framework it stopped happening
Digi  [author] Jun 13 @ 11:33pm 
The black screen is probably the same thing causing the errors in my mod, giving it NaN position/distance which would fail to find a valid preset because of it.

Does it happen reliably even if you save and reload world? That's good then but if you have gigabytes of mods can you please try and removes some to narrow it down, then send me the world so I can find what's causing it (likely another mod but who knows).

Also if using plugins, first try without pluginloader.
Cona6789 Jun 13 @ 10:59pm 
Encountering a glitch where when I sit in any seat the entire screen goes black and theres no audio, error displays on screen in red text that says:
"TankTracksFramework v1.1.4 ERROR: no distance preset!"
Confuoco Jun 4 @ 5:29am 
No, its just decoration.
Nyxborne May 11 @ 10:40am 
Do tracks give your Rover an advantage? Like do they grip the ground between wheels?
Sypher May 11 @ 8:03am 
@Digi, MP Server, and we added Tracks over Vanilla wheels and so far it seams to be working. I will keep you informed. Thank you for the reply.
Cona6789 May 8 @ 9:10pm 
I will next time we play together, dont know when thatll be but ill post it here
Digi  [author] May 8 @ 4:08pm 
I can't reproduce it in my dedicated server, so it's either really requiring player-hosted or it's something else going on...

Is it an actual error that tells you to send me the log? if so can you send your friend's SE log [spaceengineers.wiki.gg], either here or on discord ( @m_digi )
Otherwise if it's just an informational message can you tell me the exact wording, or screenshot it.
Cona6789 May 8 @ 12:42pm 
It happens whenever he tries to enter any seat on any blueprint, large or small grid, including vanilla seats and modded seats. I am on a MP client hosting for friends only through steam.
Digi  [author] May 8 @ 2:23am 
@Sypher
I'd like to find out, did you find any specifics on how it triggers? Also do they only vanish visually, if you equip the track builder can you place them right away or do you have to remove the invisible ones first?
Also is this in singleplayer or are you a MP client?
Digi  [author] May 8 @ 2:01am 
Only your friend does that on that vehicle, not you (the host)? Can you send a blueprint of the vehicle please :} upload to workshop or discord or wherever you want really.
Cona6789 May 7 @ 10:39pm 
when i use this mod solo it works great, when i use it on my MP server my friend gets an error when trying to sit in any seat, something about tank track framework no default perspective i think
Sypher May 1 @ 10:47pm 
Mr.Digi, Thank you for a wonderful mod... Just wondering here, could the new updates have broken something about every twenty minuets or so one or both tracks on my only tracked vehicle keep diapering. Any idea why?
Digi  [author] Apr 4 @ 3:25pm 
Try event viewer maybe it hints at something there.

Also if you can reliably cause the crash, attach dnspy: https://spaceengineers.wiki.gg/wiki/Scripting/Debugging_with_dnSpy
And enable stackoverflow in the exceptions window to see if there's an infinite loop going on somewhere.

Other server admins might have better ways of identifying log-less crashes like these.
Xeno Apr 4 @ 2:32pm 
Fair enough. It's not like this game is that well coded to begin with lol.
The logs have no information, it was ghost crashing. Everything was running in the logs like normal then the logs show the server starting. So now i have to do the ole trial and error method.

What my findings so far are pointing towards is something in the modlist is not playing nice, and when i saw the mod profiler error, i figured it was worth looking into. Thank you for responding though.
Digi  [author] Apr 4 @ 6:45am 
It's done in a safe way that was suggested by a dev a long time ago for WC to use, and WC does it similarly.
The game can't tell the difference between just doing physics stuff in a thread versus doing physics stuff in a thread while main thread waits for those to finish. The major difference is main thread being paused during that results in world not progressing, therefore physics engine not writing to the things that we're reading from.

In short, it's fine, it's very unlikely to be the cause of your crashes. You should instead look at the log where it says the crash happened and go from there. If you need help there post it in the #help-for-community-servers channel in KSH discord.

As for desync, the game itself has some of those built in, it really depends on what desyncs and how and all that, same channel for those questions because you'll find experienced server owners.
Xeno Apr 3 @ 8:23pm 
So the warning in mod profiler, "Mod Tank Tracks Framework & API is accessing physics from parallel threads. This is not safe and might cause the game to crash or behave unexpectedly", i'm assuming form your statement above about mod profiler that you're aware of this? If not, well im getting this warning on my server. Having some crash issues and desync. Unsure if this is the cause at this time but will test to see. Really great mod btw, crossing my fingers this isn't the cause...
STUV Mar 13 @ 3:42pm 
Help, me please. I'm found bug in track mod. How to fix ?
https://youtu.be/t8jFB74UKW4
Mike Dude Jan 12 @ 4:51pm 
I posted in the keen discord but wanted to share it here, too.

I believe I found a fatal crash to desktop error with the ReplaceWheelModel mechanic. I successfully set up my ini, so it replaces the wheels on the suspension with a custom model.

Steps to reproduce:
1. Apply a track that swaps the wheel model.
2. Remove the track with the track tool. Observe that the new model stays and does not revert to the vanilla wheel.
3. Apply a new track that also has a wheel replacer. Observe instant crash to desktop, and no stacktrace in the game log.

If I were to guess, it is trying to replace a wheel or model that has already been replaced and is no longer there. When I change step 3 to apply a track that doesn't replace the model it has no problems.
Moros Jan 12 @ 4:25pm 
Does this actually have a gameplay effect or is it only decorative?
kennet0508 Jan 9 @ 2:52pm 
The SE2 support page is open Time to add feedback that this needs to be a vanilla feature xD

https://support.keenswh.com/spaceengineers2/pc
Digi  [author] Dec 8, 2024 @ 3:43am 
@Rias2211 This relies on clientside scripts which are not allowed on consoles. In more words on the link at "mod io?" section in the description.
Rias2211 Dec 7, 2024 @ 12:14pm 
hi is it possible to publish the Tank Tracks Framework & API on mod.io I want to try to test this mod on the ps5
DarkXeRoX Nov 7, 2024 @ 12:42am 
lemme have a dig around on the servers and poke you on discord
Digi  [author] Nov 6, 2024 @ 8:52am 
Did you have these errors before the builder got updated? let's say 1 to 3 november to account for timeszones.
And can you send the latest log, I'm not sure what's going on with it, seems it might be wrongfully calling stuff in a thread and needs deeper investigation xD
DarkXeRoX Nov 6, 2024 @ 7:28am 
16:27:27.1761 [INFO] Keen: TankTracksFramework v1.1.3 error/exception: Tank Track Pack: Morue (Steam:3225398014): 'Abrams_Large_5x5_Static': Error processing spawned 'C:\Dygamic\NexusV3\Servers\S5Naval\31004 Node 4 Europe\Instance\content\244850\3225398014\Models\AbramsTrackLink.mwm': System.NullReferenceException: Object reference not set to an instance of an object.
at Digi.TankTracks.API.TrackDefinition.SpawnSegment(Boolean construction)
at Digi.TankTracks.API.TrackDefinition.GetDataFromModel()

but no longer the spam once server is running
just done a restart of the server just incase but still shows
Digi  [author] Nov 6, 2024 @ 5:29am 
Are they identical? Showing model names and then error in SpawnSegment()? O.o
DarkXeRoX Nov 6, 2024 @ 2:58am 
sorry went to sleep lol

Still throws the initial errors but doesn't spam anymore
Digi  [author] Nov 5, 2024 @ 4:01pm 
Oh! Nvm, now I see what's up. The model spawning was indirectly called by the builder that was asking for the API DS-side, which chain reacted into those errors.
It should load fine now that the builder was fixed, and now I know what other checks to add xD
Digi  [author] Nov 5, 2024 @ 3:57pm 
The second error is from the builder mod and was fixed, that wouldn't impact the existing vehicles.

The first error is a weird one, I did a quick test on a DS with the morue mod and I don't get any errors :lunar2020thinkingtiger:
Can you try a restart to see if the fix for the other mod got rid of errors in this (but it shouldn't affect it like that X_X)
If it's still happening, what else changed besides my update on the builder mod?
DarkXeRoX Nov 5, 2024 @ 1:19pm 
none of the servers running the mod currently have a vehicle with tracks on it
DarkXeRoX Nov 5, 2024 @ 1:19pm 
@digi

since update getting a bit of a error spam on the server

21:59:37.7591 [DEBUG] Keen: ### TankTracksFramework v1.1.3 initializing...
21:59:37.8151 [INFO] Keen: TankTracksFramework v1.1.3 error/exception: Tank Track Pack: Morue (Steam:3225398014): 'TigerOne_Small_1x1': Error processing spawned 'C:\Dygamic\NexusV3\Servers\S5Naval\31004 Node 4 Europe\Instance\content\244850\3225398014\Models\Tiger1TrackLink.mwm': System.NullReferenceException: Object reference not set to an instance of an object.
at Digi.TankTracks.API.TrackDefinition.SpawnSegment(Boolean construction)
at Digi.TankTracks.API.TrackDefinition.GetDataFromModel()

for every model

Followed by endless spam:

22:05:13.6689 [INFO] Keen: ERROR Digi.TankTracksPlacement.TankTracksPlacementMod: System.NullReferenceException: Object reference not set to an instance of an object.
at Digi.TankTracksPlacement.TankTracksPlacementMod.UpdateAfterSimulation()