#General modding chat
1 messages · Page 9 of 1
no, BAD dyno!!
if block.GetName() == "PFB_GyroActuator [Server]" or block.GetName() == "PFB_GyroStabilizer [Server]" then
if block.GetGyroPower() ~= power then
block.SetGyroPower(power)
tm.playerUI.AddSubtleMessageForPlayer(0, "Bugs!!! I hate them!!", "Set gyro power to 0.1", 0.25)
end
end
if power = 1, this works just fine
if power = 0.1, this constantly triggers (the set value does not match the value thats its getting compared to)
why are block colors saved with RGBA despite only taking RGB?
and no, the glass block skin does not use the alpha channel either
this is the best optimization to ever and you disprove me
Wow, you are finding more bugs than the amount that i thought there was in the modding api
that was known for a little while but not reported
yeah, but i'm surprised, in general, how many bugs the modding api has
just wait till you see the structure source code
wait what source code?
the code of the game itself for structures
x_x
Frans told me the other day that he thinks new stuff for controlling structures is cool but the code is such a trainwreck it wouldn't fit in the time with each update
that might includes structure relatedbl bugs idk
x_X
x_X
that's something you never want to hear from a dev
well I did so now what
pain and suffering
my post about engine/jet/prop power being of a strange or high value got deleted
but I was told to report even the NaN and math.huge bugs
okey wow completely extrapolate what i wrote 
Doing anything with structures through modding is currently pretty hard as it depends on a lot of systems. The structure code itself is great.
Just really hard to expose it to modding as there are SO many corner cases in the game.
point is, modifying structures with the api and adding to the api is a pain
Frans whats the Linux to Windows ratio like in the office?
Answered in #off-topic message
Too bad c# has no eval function, else you could have just given us access to that :p
I'm sure nothing bad was gonna happen
2 mins speedrun into servers sharing malware
Approved modders, have to sign some sort of agreement and you get access to more modding stuff
- everything would have to be checked, otherwise we just have Windows driver situation
- checking other peoples code sounds like a lot of work...
Modding should have it's own dlcs, the more you pay the more functions you have access to
Jokes apart stuff like eval is annoying to work with, a good implementation and type conversion between c# and Lua like the current api is the best... But of course slower to add stuff to
c# is (partially) compiled, so that would be impossible
The structure code itself is great.
not to put down anyone specifically but i'd say randomly teleporting to a random position or player on the map and seemingly flying into the air temporarily while repairing isnt exactly "great"
sometimes repairing also just doesnt do anything... i suppose this is not really a https://discord.com/channels/296562030624899072/1140936220487192587 thing anymore is it
saving this for UI reference later
checkpoint,subtlemessage
my dumbass never posted it :/
@shadow iris weren't you working on a campaign?
which one lol
trailcargo or unnamed off-road challenges
unnamed was just a concept
trailcargo had its devs suddenly disappear
raftmakers wasnt really a campaign but noiro got banned and then stopped playing trailmakers all together so
@scenic echo this guy knows whats up
x_x, hate when that happens
funny part is I might be able to code it myself now. but I decided that another fetch quests campaign is BORING and not worth the map & code time
pioneers really set a new standard when it comes to campaigns
hot take: fuck pioneers
it's just another boring fetch quest campaign with cookie cutter "oh no space pirates invaded!!"
the only thing it brings is a fundamentally different art style that doesn't feel like trailmakers, more generic "shoot enemy, bring box, fetch NPCs" gameplay
the only credit I give it is prettier sky and water. but the water doesn't even get 3d waves
give me something interesting, like designing vehicles to overcome fundamentals environmental hazards. Like HIGH SEAS WIND, STRANDED LAVA
RALLY RACE OPTIMIZATIONS
but pioneers is just to go faster to do the same fetch quests and shoot basic ai enemies. it's froggit grocery shopping simulator. grocery shopping isn't fun.
wow, that is a burning hot take
melting
and dude, if the rest of the game is cool, like... I lost interest at the second settlement. you really gotta make players invested in the game besides "it's trailmakers" and "there's planes"
starting off a flagship work with 'bring a bunch of boxes and shoot an enemy or two for an hour" is NOT gonna make me invested
i should really finish high seas, just played a bit, and then pioneers came out and i played a ton
and pioneers is the standard now?
this is just introducing players by telling them to do the dishes and run laundry
well it did change how blocks are unlocked in a good way, imo getting them from levels and boss fights is pretty good, also resource gathering is definitely a spicy decision
resource gathering is OK but it feels a little like another chore to pad out the runtime.
i like the grind of getting resources but that's not everyone
blocks unlocking in # to use is cool though
boss fight doesn't sound like trailmakers. the biggest boss I'm letting them add is the mf stranded volcano
that is the real final boss of trailmakers
that shit is legitimately difficult and it doesn't need you to be shot and space pirates invading
it's a big pain in the ass, but it proves that you vs the world is plenty
I always say that dragon lake is amazing, cause it's such a simple looking puzzle but it's deeper on the inside and has so many goofy ways to go about it. and you aren't told what to do. it's just you and your imagination to solve a well taught and well understood assignment
is dragon lake a high seas thing or a different game?
stranded, it's where you get the dragon engine iirc
in the middle of the mud area
my memory of stranded is so cooked, i should really replay stranded
why are people forgetting stranded nowadays 😭 😭 😭
that shit is peak
it's primitive but that's the soul of trailmakers: primitively putting shit together with your own mind and making it work
and going back to pioneers art style... it doesn't feel like trailmakers
i remember trying to use a plane to get some of the really big salvage, and i did get a few but it was really hard
I want more "classic" theme maps. it's such trailmakers soul to me and it needs its soul back
I swear I'd even take another rally campaign. tm excels at rally racing ngl
and the classic art style is beautiful for that
everything I just said boils down to "back in my day shit was good"
🧓
old man rainlesssky
old man yells at clouds
anyway so I kinda suddenly figured out how to replicate classic TM map style
all I need to do is get proper things like ramps and terrain
and I'll become classic flashbulb fr
yup, classic flashbulb guy
I should rename myself to Mr. Flashbulb after I release ti update
fundamentally different art style that doesn't feel like trailmakers
oh wow someone noticed the weird art style
I really dont know what the art team at flashbulb is doing but its not good
Basically every new part in pioneers is so plain, all of the models are really simple and the only texture detail is some grime that they overlaid on it
these side panel things dont even make contact with the body
I should compare the triangle count of old weapons to pioneers ones
"automatic" pixel format on a grayscale 256x256 texture: 2.23kb
8bpc-graya pixel format on a grayscale 256x256 texture: 1.77kb
using gimp 3.0.4
so if you're doing stuff like subtle messages, if the icon is grayscale, USE GRAY SCALE FORMAT
it saves a solid amount of filesize and thus import time
smart cannon (the old one) is 4139 total vertices
smg (pioneers) is 4455 total vertices. BUT like half of these vertices are only for the muzzle, the cylinder part in the middle
if you exclude the absurdly complex muzzle, it's only 2241 total vertices
Where is file name location?
?
frans what did you do to #1123915629653667943
hello does anybody know if a mod exists where the 'laser' of the distance sensor is visualized?
New version of TCP uploaded to the Workshop with some cool new features. Details:
#1242291936715608205 message
no, and if you wanted to make one it would have to be fairly manual (you can't read the settings of sensors from a mod, so you would have to have your own UI to set the values again)
can’t*
typo 
how would i get the data from a UIText object?
as in when the player inputs something into the field. how would i get that value out of the textlabel
i've tried using the callback parameter with a function but i can't get any arguments out
use the callback function, it receives an UICallbackData as parameter
because that's the default tostring implementation of UICallbackData
Callbackdata holds multiple data inside it, either look at the documentation or the default spawn mod
what would the data methods be
It should be .value, but again, documentation is for sure correct
is there any way to bind mouse wheel up / down to the input of a block?
Not within the mod API as far as I'm aware. I don't think we can interact with logic/functional blocks anyway.
i know it was possible to get Mouse Inputs via Controller before they were added officially, is there a way that i could get mouse wheel up/down bound as input in this way?
i want to use it to switch tools in my map editor
how would i somewhat quickly get a block's speed
ideally without storing data for almost every single block currently in the world
wtf did i do
Looks like it has a motion capture suit
can anyone give me some info on how exactly to add/use custom 3d models for modded maps?
For Trailmappers put your OBJ models and PNG textures into your "...Documents\Trailmappers\Custom Models" folder. Then you can access them in Trailmappers. Drag an object into the scene then drag a texture onto that object.
Sweet ty, also where can I download trail edit
On the workshop
after clicking on the custom models it just breaks?..
Im not sure whats causing that, i had the same issue with 3d models i generated myself with my own mod. It might be that Trailmappers needs Models that draw every triangle from both sides but idk
how can i solve this texture issue
this is how it looks through gaea 2.... and this is blender
Maybe ask in #1226065444364877835 instead
I haven't fully used Gaea2 but you could try importing it into blender and unwrapping the UV maps. I'm not fully sure though
from gaea 2 it is simply an obj file and png, so im not sure why anything is different from these videos and tuts
one sided stuff works for me
its basic but still a start
Work in progress, making a recording tool using custom camera
i thought about making a mod thats kinda like the chase camera from beamng. if you don't know what that is, its kinda like bystander/drone camera that doesnt move but teleports after a certain distance from the player. it does fov changes too
maybe could do that but a bit more intense and potentially actually chase the player for trailmakers
Has anyone been able to connect a g29 to trailmakers on pc?
you don't need any mods to connect some devices to TM,
you can always try out steam input to hook up some devices to your games. I got it to work on one of my hotas setups
Oh nice alright
Yeah steam input is great for this kind of stuff
yet another valve coolio
once more i fight with the modding api to make AddCamera actually work
once more i fight with my own stupidity
@forest oracle in game road generation 
someday
ok i have it on my list
if only we could load meshes from the data_dynamic folder in Workshop mods😭
Are you sure you cant but with my cinematic maker I think the workshop version is working and that reads/writes to the dynamic folder
Here is my old road generator, this is far as I got
reading and writing is not an issue
its loading assets that is problematic
like AddMesh or AddTexture
ah
how would one smoothly rotate an object while the mod is running at 60fps or even 30 fps
YOU'RE SUPPOSED TO BE PAUSED
"oh crap i forgot"
lets see if SetTexture() works
i dont think it does ngl
oh
i doont thni k i work
i think explosion_micro is dealing damage which im pretty sure this is the one that powercore explosions use
enough to take a dragon engine from 100% to smoking
LOD created gap
added powercore collectible type and rotation when nearby
rotation isnt smooth but it works
I can send you my function I use to do smooth rotation
can they not load stuff from those places..?
For workshop mods no they cant, because in the AddMesh or AddTexture you need to give it a path that is starting at the mods root folder and since the data_dynamic folder is somewhere completely different it doesnt work
I dont even understand why the data_dynamic folder needs to be in such a weird place to beginn with
Except the issue here is being able to load aasets from the data dynamic folder in the first place. Being able to do so is a hack, not something intended. When you rely on hacks, you should expect them to break
Because it is player data and thus it must be within a user folder unique to each one
Ah ok
My animated StartLights box is working 🙂
I believe the original torpedo prefab might've been modified in 2.1
can someone check if its working fine on maps that had it included?
Yes this was actually known on the test branch. JESS reported it. We just never had enough resources to get it solved.
With that said; we are looking into new ways to set up prefabs for modding in order to reduce this type of issue.
Alright then :)
Do note mines are also broken
I haven't checked since I reported it, but it could range from just not spawning from crashing the game
is the spawnStructure function broken?
Nope
i guess im just too dumb to use it then
Why whats happening?
no fun allowed 😔
i have a function to initialize all blueprints:
local function init_blueprints()
local carList = {}
carList = json.parse(tm.os.ReadAllText_Static("cars.json"))
for i, carName in ipairs(carList) do
local carPath = "assets/cars/" .. carName .. ".png"
tm.physics.AddTexture(carPath, carName)
table.insert(blueprints, carName)
tm.os.Log("Loaded blueprint: " .. carName)
end
end
and i try to spawn said blueprint
local function main()
init_blueprints()
init_roads()
tm.players.SpawnStructure(1, blueprints[1], "test", tm.vector3.Create(0, 300, 0), tm.vector3.Create(1, 0, 0))
end
main()
my cars.json:
["basicPlatform"]
What are you going to use for steering?
hinges at or close to 0 strength and ill just turn the wheels
can you activate the engines somehow? or will you just apply a forwards force? lol
I guess the engine could always be active
i have 2 engines, both powerd by an always on sensor. One is receiving a negative input the other a positive. by changing how much engine power each of the two engine has i can basically controll it like a normal car
since EnginePower cant go below 0
yeah, atleast that is the plan, i havent actually controlled a car yet
For ground vehicles torque works ok but the moment you want an plane its a whole different thing
would be cool if we could use logic gates with no inputs to control stuff on creations
maybe the no inputs part isnt required but idk
local structure = tm.players.GetSpawnedStructureById(structureId)[1]
local blocks = structure.GetBlocks()
tm.os.Log("Structure ID: " .. structureId .. " has " .. #blocks .. " blocks.")
NO IT DOES NOT HAVE 32 BLOCKS
man what am i doing wrong now?
Doesnt look like its wrong
damn
Counting twice?
Looks very nice
turns out spawning blueprints is really buggy as soon as the player does anything with his own blueprints
if the player enters buildmode, each structure that gets spawned, no matter the position gets put into this buildmode at the origin. -> complexity stacks, blocks overlap
if the player Repairs his structure it is likely that atleast one of the structures spawned by the mod get also triggerd and get teleported to the players position and the player gets enterd into 2 seats at once -> game freezes
Report it in https://discord.com/channels/296562030624899072/1123915629653667943 and also link the thread in https://discord.com/channels/296562030624899072/1374687311538814986 so Frans can take note of it
why are modded server hidden by default?
Will be changed next hotfix. Not an answer to your question, but it will invalidate it :p
Anyone know of a way to set enable mods on test zone AND set it to deathmatch?
deathmatch is probably not customizable with mods. havent checked though
it really should be 😉
I don't want to customize it. I just want to run a custom race track with it on.
as in being able to interact with deathmatch
like you cant do anything to deathmatch with mods
that includes converting a server to deathmatch
I just meant load a custom mesh and track while in the great carrier map, or change test zone to that game mode. Either would work.
pretty sure mods can't be enabled when deathmatch is on
Deathmatch is not dethrone right?
no, it's the new game mode in 2.1
Than I got no clue... But judging from the track record I doubt you can have any direct interaction
Mods cannot be used with the deathmatch game mode currently
yeah :(
they should make mods available on campaigns after you've finished them, it would be fun to make campaign specific mods
once again. you cannot convert a server to Deathmatch. what part of that do you not understand?
but what if I wanna fully play stranded in space with a map upgrade mod
How would one go about making a trigger box, is that even possible through the api?
?
i see modding got renamed to modding-forum
and i think the old modding text channel got renamed to modding-archive
Yeah that answers that
there is this too
--- Registers a function to the collision enter callback of a game object
--- @param targetObject ModGameObject
--- @param functionName string
--- @return function
function tm.physics.RegisterFunctionToCollisionEnterCallback(targetObject, functionName) end
Been updating the modding info site, its now more of a modding portal https://mods.trailmakers.ludixi.com Work in progress currently but it has the latest info on functions/audio/spawnables available
Delicious
Getting workshop mods to display on the front page was a whole kettle of fish
Curious; what was the challenge? You scraping their site or whats up?
Scraping the steam workshop correctly because theirs no official method provided by steam to get the data, I really hope steam doesnt change the html layout on that workshop page 
Web development in a nutshell ||to be fair, i was completely zoomed out, by default the box borders fit are at the sides of the screen, although functions still go off screen||
straight up this joke
I blame flashbulb for the long ass function names
Suggestion: instead of just listing all audio / spawnables ids have a preview of some kind too.
But i dont know how legal it is to rip these assets and sounds from the game
That sounds like a heck of alot of work lol,
Spawnables I could probably piggy back the screenshots from the wiki
this is awesome
Wow! Fantastic work 
guys im popular
row 3 column 1 💪
@warm canopy how is the most popular mods thing on the new site sorted lol
row 1 column 1 has 52 subscribers meanwhile row 1 column 2 has 262 subscribers
its the same thing as steam workshop’s “popularity” filter
im not entirely sure sub count isnt all that goes into the mods popularity. i know unique visitors has a bit more of an impact but idrk exactly
ok it seems “most popular” means most visiting to the page. but it seems like the in game workshop doesn’t count towards that, only actual visits through steam website
what is the process for getting a workshop item in the curated category? am i able to submit mods?
do mods that extend official maps count? ;)
a mod i think should be on the curated list is krunch's tcp
maybe just maybe no repair tokens too mayyyyybeee
how do i submit guides?
i dont think the deprecated gravity and color functions should be displayed in the functions page
favoriting bug: only the first item you favorite on the page will be saved to favorites, you must reopen that page to add another favorite
So basically the way curated and the mods (general) and maps work is that it’s actually getting them from a workshop collection as it’s impossible otherwise to distinguish, if all types is selected then yeah that’s directly pulled from whatever is current on the workshop.
Im not finished with the site yet (especially the guides/library feature), open to suggestions with what should be in certain categories for mods. It’s easier to just display deprecated, as the way the site works for functions is I just feed it the lua docs.
@warm canopy little bug report, the circle which im guessing is supposed to be the profile doesnt show up correctly (checked both with brave and firefox)
And the dashboard shows an api Error under My Submissions, probaply since i havent submitted anything yet
Yeah the whole login/submission side of things needs work
is it normal for raycasts with ignore trigger true to detect custom objects that are set to trigger?
Might just be an oversight on our part
in single player it wasn't working right but hwen i went into multiplayer it worked like you would expect
gamedev amirite
how could people submit mods to be curated?
Right now its just a workshop collection that I add peoples mods into
i suggest krunch's track creator plus, maptrail, and perhaps replace trailedit with trailedit test branch
im guessing custom missles mod isn't curated due to the current api bugs it has to deal with
Yeah I was going to add it but im trying to sort through mods that arent broken
that aren't broken? in this current modding api? impossible!
Updated the curated should now show
I think alot of the time actual mods get lost in the steam worskhop amongst the maps
yeah
the posts on the forum channel here should help with that
hows trailflow been going?
maps workshop tag when
Trailflow is stuck in development hell, I refactored the code and as a result I need to "redo" the web editor, its such a huge project
buildersclub for mapmaking when
The plan is to make more libraries-like code then that gets tied into trailflow, so that things are much more modular
🥶
Even tried making a trailmappers equivalent but browser-based but no bueno
and then the browser explodes with out of memory errors
Not really, the issue is doing transform handles in the browser
non-uniform scaling is almost impossible to do right
mhm
Had working vertex snapping
oh my fucking god the missing fallback preview image bug strikes again
frans fix RIGHT NOW ! !
Yeah i also want my free cam mod to basically work like a library that other mods can build up apon but i fear im not gonna complete that any time soon
ok i did the steamcmd bs
2.1 got us super busy and we haven't had time to goof around... But i intend to bring it up after 2.1.1 😄
wha
like 90% of the time when a mod is uploaded to the workshop the fallback thumbnail isnt uploaded
so it just displays as the gray placeholder on steam and pure white ingame
ah didn't know!
or maybe the fallback thumbnail doesnt get loaded ingame? i dont know
weirdly on one session, it was working for all of my mods, even old ones; then i went to & from the blueprints tab and it stopped working
this also applies to custom thumbnails
it seems like only i have this issue though?
i just realized that im pretty sure the devs dont have a similar tool like cinematic maker because i havent seen any trailer use it
so in theory devs could use community mods to make official trailers
which sounds absolutely incredible
the devs have the unity editor, which is much more capable
link a trailer or some sort where they use the unity editor rather than cinematic camera / free cam
iirc the spacebound trailer used it, and they already have the functionality of the cinematic maker for pioneers cutscenes if they wanted that anyways
spacebound trailer definitely doesnt use the ingame options yeah
The simple fact that you can't rotate the camera using mods already destroys this idea in my opinion, it's just so important when doing anything cinematic
true
yet another suggestion to the list
The curated list is a great idea. Maybe you could include guest curator lists? You could ask some of the devs and content creators to make a collection of their favourites to add to the list. You could even have other theme based curated collections (with community help so it doesn't overload you) eg. Battle maps, Race Maps. TM Map Extensions, Editing Tools, Server Tools, Game Modes, etc.
TM Map Extensions
hiii 👋👋👋
gamemodes like aerobatic something
or minigolf
Those sort of curated lists would be so useful for finding good mods
yep
why did tm level designer have to leave the mountain so barren
i have to do like 4 entire sides of the mountain 😭
they have the automatic tools, i don't 😭
To leave you a blank canvas to add your art?
its SO boring to place all those rocks manually though
id rather do forests and maybe race tracks
not a flat cliff they didnt feel like spending <20 minutes on
but, treasure island update is gonna fufill its purpose, so...
to fill in blank spaces... that includes blank cliffs sadly
Ah well. If it's worth doing, it's worth doing it well.
well the reactions seem pretty good
i should probably remember the whole list of like 20 people who were eagerly waiting
so i can ping them
another gif of salvage clipping through objects!
right after i pressed F6, it jumped back up to here and it is not jittering whatsoever
only happens every few exports... and maybe its just a visual error? cause it seems like the collisions work correctly
IT IS!
it IS just a visual error!
take this with a grain of salt but this was something around 30 seconds until it fixed itself
actually no it still jitters a little bit
after counting for more of it, seems like its more around 45 seconds
weird
Just posted about new custom objects for TCP's next update:
#1242291936715608205 message
@warm canopy can you add a "play while game is paused" option to cinematic maker?
Because being allergic to open spaces is not good design
In sp time is paused when the game is paused, so mods aren't being run
It’s impossible to bypass the games mechanics of pausing
I've been able to run logging while the game is paused
+@warm canopy
you can finish the current update call, but no more calls will be done. It's the same as setting the time speed to 0, unless you have a button/UI text fields to change and trigger code the mod won't run
with an update function that only has the trick and one log function it can repeatedly run while the game is paused. actual lines logged while the game is paused
if you are trying to unpause the game on each frame, just know that repeatedly doing that messes up the physics rendering (which is terrible for a camera for obvious reasons), and even then i doubt setting the camera position will actually update in the client until it unpauses
I don't think a camera would work and even if it does, interpolation is weird
oh interesting, tmmodding hasnt sent anything since spacebound / pre-2.0 times
Didnt even realise that was a feature!
hmm this is the long awaited ui update... rgb/hex code for subtle message background
also i see inconsistent case for the deathmatch settings names?
and sublte message char limit increase🙏
uncap it fr
or make it stupidly high at least
i want doom in subtle message
with color
cant take that much time to do rightttt
all i want is to have sprites be placed on the screen for UI upateq
all i want is everything we could ever dream of, and more
transparent textures would be a dream too :P
it is capped (as in pre-calculated) for proper network packaging. Otherwise it would be slow as shit (at least on our terms). String are the worst kind of data to send around so we are pretty tight with it and our network budget is already quite strict so hard to make more space for it.
(I am not arguing against increasing it, just explaing why it is there in the first place)
idk how itd work with roughness map too
ah so thats why things like the replay gif message can be long, because its client-side?
No clue what you are referring to?
after the replay gif recording message goes to "replay gif recorded!" or whatever and ye it shows the full file path
Ah yes! Yeah that is not transmitted at all.
client side mod processing update
The subtle message is lot restricted by itself. It is the remote procedure call that is constrained.
Too much architecture change. I dont think it will ever happen and we prefer the security of server being trustful.
do you know what font the game uses for headers? johannes ignored me 😭
yeah wasn't expecting anything lol
shouldnt mod ui windows also be insanely heavy then? Is that also why they are so limited in size ?
No clue, but there are font detectors out there
every single time ive used one of them it has only listed paid fonts
It follows the same constraints as subtle messge actually
duh, and why wouldnt that be correct lol
money 🤑🤑🤑
it also applied to the normal font, which is eurostile, which is free
ah ok cuz i havent experienced a limit except for the cut off because the window is too slim
The cutoff comes before the char limit i believe.
iirc it has the same char limit
try using formatting or coloring for example
wasnt it 64 bytes? and subtle messages are 32
That might be correct actually 🙂
mmmmm can we have double subtle message limit 🥺
subtle messages with 64 bytes would be awesome
would make it possible to actually spell entire phrases
subtle messages have 2 strings, so having half the limit for each would make sense
ooh and then because of that networking thing you mentioned, do oversized messages crash because of that?
true but i want 64 characters 🥺
you have with header+content
There is an assertion check there. It is very stupid as we can do a check before the assertion happens and simple write an error in the console instead, and I have fixed that for 2.2
but i cant even fit a "press <glyph> to <action>" most of the time
with 32 characters
sounds pretty close but paid wth
not sure if this is possible from your side, but bubbling it up to the mod might also make sense. If the mod doesn't handle it it ends up in the logs and you get an error message in game, and it allows the mod to handle the error without having to perform the same check by itself (which would be leaking implementation details from the function)
this sounds really insane but, maybe have a way to substitute text from a separate file (like translation strings i guess?)
completely unrelated but does someone remember what makes text align center instead of to the left in Mod UIs?
oh its close enough (i got it off a free font website)
that feels more something that the mod itself should handle, there is nothing language specific in the API
well you cant send more than 32 characters so how would you do that in the current api?
None of our functions "throws" errors in a meaningful way yet. I would wish for that to be more of a thing in the future as it is hard to handle this on the modders side at the moment.
iirc hiding the UI and opening it again
you translate it from your side and make sure all translations fit the limit
lol that is so random
@formal crane add that to the fix list please
It is on the list of things to fix! 🙂
how?
oh
to always align center i hope right?
you use format strings and pull the correct one from a table according to the currently specified language
well no, my idea was to send the translations file to the players and then send subtle messages with the translation substitute key thing, then on the clients' end it replaces it
Yes; think it is just some dumb re-enabling issue with imgui. Haven't dug into it yet.
it shouldnt be "always align center" it should just properly serialise and deserialise the state properly. So it can support whatever happens in the future.
that would likely require completely changing how subtle messages work
well, let's hear frans say "probably not" and then we can say its a probable not going to happen
frans whats your thoughts on this?
seems like putting the full folder path (C:\Program Files (x86)\Steam\steamapps\common\Trailmakers\mods\<MOD NAME HERE>) is significantly more reliable than doing mods/<MOD NAME HERE>
i have never had an issue with mods/mod_name
lucky
a lot of the time the preview doesn't upload, and just now all files wont actually get uploaded
but with the full path none of those issues have happened so far
maybe it's due to you using spaces in the folder name?
why would it be inconsistent though when using mods/<name>?
if you are using spaces in folder names, you are asking for trouble. Unix style paths are likely parsed differently from windows style paths due to the different syntax
Eurostile
i ended up finding it but thank you
downloaded mod from the workshop: idk what triggers it trying to find lua but, because its a workshop mod the trailmakers/mods/ folder doesnt have the lua so it throws a load mod error
Bringing this up; what feels like a good way in lua to inform users of errors/exception handling?
I see some examples with functions returning objects in case of succes, otherwise obj can be checked for nil, but we wouldn't know what happened.
Is there some kind of pattern for Lua for exceptions that could make sense here?
Maybe each method has some kind of object+err returned (Golang style).. I would love if we could do this for all api functions actually. Of course that requires a major api change which would practically break everything. But I am just opening up a discussion here.
If anyone have some litterature on this OR other games/projects which uses lua and has some kind of handling of this, then I would love to check it out 🙂
there are essentially 3 main ways of doing it:
- Error out with
error(message [, level]): throws an error that bubbles up automatically, like exceptions in other languages. It automatically adds a stack trace of the error and where it happened. If level is 0, no location information is added, if it's 1 (default) the location is whereerror()was called, if it's greater than that the location is the function call on the Nth level of the stack. Not sure how this would be handled from the C# side, but moonsharp probably has an equivalent method you can call to error out (maybe C# exceptions are automatically converted to this? They do appear in the logs, but i haven't checked if they can be handled withpcall) - Option monad: return a value of type
T|nil. This is usually best for simple cases in which you want to get some data and there is a single obvious error case (such as trying to find a value in a list when the value doesn't exist in it). The callee can check whether the return is nil or not to figure out if there was an error - Error monad: return either
true, resultorfalse, error_object. This allows the callee to check whether there was an error by checking the first return value, while the second value contains the respective data (error data if there was an error or normal result if there wasn't)
if a function uses the first error method, any callee can wrap the call in pcall(function [, args...]) to convert the return value to the third method automatically. Usually you would use the first method when the call can fail due to implementation details (or programming error), the second method when the function gets some data which might or might not exist, and the third method when the function gets some data, there are multiple possible error causes (such as file read operations, which might for example fail because the file doesn't exist or because you don't have read permissions), and you want those errors to be explicitly part of the API
crashed while hosting 8 players with 2 mods enabled (that shouldn't affect much regarding the crash)
mods: Treasure Island Update, Customizable Time Cycle
this is the same crash as #bug-reports message
fancy display for secondary color
hey is there an app similar to https://discord.com/channels/296562030624899072/1354298556269199370 ? not sure if this is the right channel to ask in
now it shows both primary and secondary!
now the name is bold and it rounds weight and buoyancy! im having too much fun lol
All lines after a line that has bold text which isn't completely static (e.g. requires if checks or gets the string from a variable) flicker
???
focus on "Invalid secondary color!"
or is it that formatted/"dynamic" lines after a bold line flicker?
i dont know man
wait no is it based on time to compute stuff? cause if i delete the stuff for the color lines, special properties stops flickering
if i remove the whole rest of the ui all of it stops flickering
hmm quite a lot of variance despite the same output
there was also that one update that took 0.7ms
That doesn't make sense. The API receives the final string, it doesn't know how you obtained it. The only cause that would make sense would be trying to refresh it very quickly
i think the mod updates at 10hz
if thats the default
You could try caching the state and only setting the string when it actually changes
could work maybe
i probably should cache all the block info and stuff too like i do in another one of my mods
i don't think im doing the math right
although when it isn't 0ms its at least plausible
so its plausible about 50% of the time 😆
the two numbers are the same but ok
oh i know why
Updates within a single mod update cycle
this means that if i call it at 2 different parts of my update function, that it will be different? and for GetTime() does that mean that it only updates at the start/end of a cycle and won't change mid-update?
Yes
when theyre subtracted they seem correct but when logged directly theyre the same
the math.floor is for rounding with decimal place
Just use string.format()
When logging them directly, you are rounding to seconds then dividing it? That doesn't make sense
you make a very very valid point
13.1ms 
UI is somehow 0.00ms but that is a tomorrow problem
Could be a rounding error if it's not doing much
it does a lot of math so I doubt it's literally less than 0.01ms
and other things but primarily math
gets selected block primary and secondary color, gets selected block in general quite a lot
converts 0-1 RGB block colors to hex code
Made some updates to https://mods.trailmakers.ludixi.com
The community hub for Trailmakers mods, guides, and spawnable requests.
i take interest in -MultiplayerUIMaxPlayers= launch option but surely it isnt that simple to get >8 players riight
Didn't seem to do anything
worked for lower numbers
and higher numbers???
I doubt it has any effect ingame?
t heres only 8 teams so lets find out lol
ooh i should test if the get max teams thing change
so far an 9th player hasnt ojoined
ah it only lets 8 players in still
server full
would have been epic, i guess the devs saw this coming
theyre the ones who added the launch option
frans add player id 8 when
frans add team 9 when
unfortunately seems like theres an extra check when joining :(
player id 0-7 only really exists (8 total)
so maybe its limited by the size of the pid
also only 8 teams exist but idk whether it would matter
lowercase sebi jumpscare
multiple players can be on the same team so you could have everyone on one team so other people can join
initial team is based on player id
there's this other command im not sure what it does but it could change something
didnt change anything :(
ah
wait
are you able to put both at the same time?
ye try that
as server host
lets see
itll probably fail due to maximum sizes in pionet
aj can you join me
RainlessSky / does THIS allow 12 players?
wait how
aj was 2nd ofc
but how did team 4 get before team 3
nobody at that team count left i think
better pc
im trying to join with 8 ppl now
That's how we count in trailmakers 1,4,3,5
damnit
was it the server full error or another one
server full
i guess the devs are smart
but not smart enough to make their own launch option work
chat i did something funky
clicking it just says there's no servers available
what's the difference between host server and start server?
@scenic echo server died
request cloud server on pc steam is diabolical
two server regions is inzane
uhh
your game hosts it
but start makes dedicate server?
i dont kno
its for console
i wonder if you can use -MaxBuildComplexity= to get increased comp without mods enabled
just tried didnt work
what did you do to get the cloud hosting stuff
-ForceEnableHostServer=
-ForceEnableRequestServer=
-ForceEnableCreateServer=
these
-nographics
i wonder what this does
oh it literally just launches the game without a window
what happens if i edit a server hosting preset to put mods enabled on a campaign for example
try it
that is something i want
crazy font size
oh @cinder spruce start server is cloud hosting
host server seems to be the normal hosting
maybe for changing region?
i wonder if you can use maxpowercores to set a powercore limit above 100
i bet you can make the game think you're on console or something
but you have to sign in
wait
-mode=Server -UseMods=true -WorldId=Exploration -GameModeId=Sandbox -ServerName="RainlessSky / "
this sounds like dedicated server
and then thats what nographics is for
or batchmode?
let's try it
ye my game has blackscreened now with -mode=Server
join that server name
oh it is fs doing something
join what?
i can't find it
maybe all of these?
ooh in the errorlogs theres a logged db of all the block names
wait wrong screenshot
unless you know very well what you are doing, you shouldn't enable any launch options. They are mostly just for development purposes and don't achieve anything useful for the average player
unless you know very well what you are doing
youre talking to me

i always see that when i ever peak into logs i dont think its anything special
"why is this zero?" as i floor a small decimal
ye but could definitely use that to speed up
speed up finding block names for mods
yes, you don't know what you are doing. You are just wasting your time
i mean max players did something
fun to experiment and see what happens
the launcho ption for server name could be interesting
this has nothing to do with mods though
fair enough
does general chat want to hear about this
how about a group DM if we want to experiment with this really
From an old version of the game around 2021
oh it does work??
you should put this in the wiki
i know it is all fun and games; but I am getting a little annoyed at these kind of messages at this point.
I am trying to create some comfort in communicating here, but this makes it more of a struggle to see literally everyday
I just hope you realise that funny texts can be received at the other end in ways you might not have expected... You dont know whats going on here, and try to keep a compassionate spirit in mind. It feels extremely entitled to write these kinds of message.
It is just personally a little bit too much with these kinds of joke request.. Or continuous. HEY CAN YOU DO X; Y Z.
Just wanna have a respect chat about the game. I know you guys are passionate - but keep things nice 🙂
EDIT: to be clear. Of course you are welcome to make suggestions. Just keep it constructive and legitimate!
interesting
the last two are when i spawned a build
ui only costs a fuckton when its first created or?
maybe just my code
i changed target mod delta time once and now for the session its always broken no matter what
even on 1/1 target delta time
ok the ui has ceased function
this is on 1/60 btw
broke it on the dragon engine and now this has happene
it still hasnt corrected itself by the time i sent that
ohh wait
is it a bandwidth limit
so it takes more than 1 frame to add ui
thus causing the flickering
this is why it gets even worse at 1/60
but idk why it outright freezes
yeahhh its flickering less on 1/5 vs 1/10
every time i re enter build mode i double the update rate
1/1
1/2
1/4
1/8
1/16
yeah if i remove the color parts, which have a lot of characters, the last line can run at 1/60 just fine
i think it could be bandwidth limit of some sort?
@formal crane i may have figured out what causes the flickering ui bug
changing the blank spacer line ("") to a colored square ("<color#bd1c1c>█</color> 150cc") causes the whole ui to start flickering
sometimes itll start lagging behind on actions by multiple seconds but not flicker (including adding any new lines or clearing ui)
oh this is stupidly close to the threshold without primary color, its <6 bytes from bugging
ooh i got it right on the threshold where long block names lag the ui and short ones dont
nvm it was literally 2 minutes behind on only half of the ui
yeah after it flickers it needs to play catch up for a long time
this is roughly 25 bytes from being buggy
What is this for?
racing mod with moderate inspiration from Mario kart
Cool
involved setting engine power and wheel buoyancy
and also maybe engine power based on # of wheels
That's hard because if you have 1 engine connected to each wheel you will go faster than 4 engine connected to every wheel
you're only allowed 1 engine in the mod btw
Ok that's easy then
bc bikes are weaker than karts and we wanna make both be competitive
but also antimatter has a life so I'm the only actual dev
cause the project lead keeps putting off learning modding
Let him be in his never ending mapping bubble
oh I was also the primary mapper for a while before I took over programmer. I still could definitely go back to mapping for it too
WHAT
how do you get the x y and z components from a modvector3
modvector3.x|y|z would be my guess
yes
to frans or alvaroping, how exactly is gravity done in trailmakers?
i am trying to make a wallride mod for kartmakers but right now the way i apply gravity it's like a band aid implementation, half working and jittery
here's a little code snippet of my gravity code
jittery because its running at 30hz right?
If you run it every frame and multiply the strength by time passed it should work fine
how do i run it every frame though
vro
are you setting targetmoddeltatime
setModTargetDeltaTime(1/60)
tm.os.SetModTargetDeltaTime(1/60)
keep in mind this will make the server lag a lot more
bc its running like 6x faster assuming its still 10hz
if its 30hz then its 2x faster
And tm.os.GetModDeltaTime() gets the time passed since the last update
are these numbers actually accurate i honestly cant tell
do you still need help? I can take a look if you want
I think I got the errors go to away, it just needs optimization
if i use tm.playerUI.RemoveUI() on each individiual ui window line, it lags like crazy. if i use tm.playerUI.ClearUI() it's fine, but subtle messages won't work
what can i do to fix this?
maybe every time after you clear ui you add the subtle messages back
it still plays the enter-exit animations
why do you need to remove the UI anyways cant you just use SetUIValue instead when editing the values?
do you delete ui every tick?
because i didnt make it like that when i first made ui, but i suppose i can do that
delete (if it exists), then readd ui
would that lag less than adding it?
cause youre still sending the same amount of data basically
for sure
btw when i mean lag i mean the ui flicker
It removes it, with SetUIValue you have no anoying flicker
well
didnt we just have a talk with Frans about the UI beeing one of the most bandwidth demanding things of mods? so try to atleast optimize your UI on your end
Huh what are you referring to? 😮
let me rephrase that
ok i misrememberd, it was the Strings that are the issue, not the UI itself, my fault
I think I have had similar behavior before but only if I removed all the elements. If no elements are in the window element then it gets completely disposed and have to be re-initialised.
yeah thats what im doing, removing all ui elements and then readding them
im currently rewriting ui to only add ui when it has to
(--snipped-- False statement)I would recommend just to be smart with the set values instead.¨
I am putting in a task to revisit this, I think we can do better with that because clearing a is a bit of PITA due to Subtle Messages and Window elements both being part of ClearUI.
I believe someone made the proposal to have a flag or similiar for which you want to be cleared instead.
I am unsure how exactly we could stop the flickering, would mean we would have to stop the window from being disposed which would be weird behaviour if you actually wanted to remove the behaviour after removing all the elements.
you aren't if you just send the updated value when it changes, by setting it with SetUIValue (which is what you should be doing). You shouldn't be running anything UI related in the update function
this isnt absolutely concrete but i think if too much data is sent at once it has to spend multiple frames(?) adding ui and that causes flickering
cause even at 1/1 update rate if i send a lot of stuff, it still takes a couple frames to add it all
if you are repeatedly removing and adding the UI, you should expect the flicker. It's a bad idea anyways, so there is not much reason to try to make it work better in the cases where you are misusing the API imho
And it does become particular a problem when it is in the context of RPC's so timings are hard.
If we did batched UI commands we could perhaps fix it, but thats a longer story,.
not agaiiin
i think i messed up the rewrite, it runs absurdly slowly and crashes the game after like 10 seconds
and no, there arent thousands of ui lines being rendered
What'd you making?
ui window in build mode that gives vehicle stats
always visible (numbers only calculated when structure is udpated):
- total weight
- total buoyancy
selected block - <empty line>
- name
- weight
- buoyancy
- if it's an engine, show engine power. otherwise, show empty line
ahh its some thing with removing ui
see i can use errorlogs to my advantage
If you can use setui thats probably the safest bet
ah fixed it
for some reason i had 2 copies of the update ui code and one was old and still removed & readded a line
and then that i guess detonated itself or the 2nd copy thats actually up to date
works beautifully but now i have to keep a blank line for the engine power
otherwise i'd have to remove/add it and thats messy
you can set it to N/A if you don't want it empty
best case i get to have it not show unless its actually an engine but i suppose that works for now
oh how i wish we could use <c> as shorthand for <color>
that would free up so many characters
block blob, i'm making my old combat mod compatible with the blocks added since 2.0
Hey Frans, do you know how gravity works in TM? If i set gravity to 0 and apply a force to the vehicle every 60 ticks it slows down the car a bit so I wanted to know how the gravity system works so I can implement my version of it.
Pretty sure it works just like that, make sure the force is multiplied by the weight
if hit and hit.DidHit() then
local hitNormal = hit.GetHitNormal()
--tm.os.Log("Ground normal: " .. tostring(hitNormal))
-- 0.33
local gravityStrength = weight * 0.055
structure.AddForce(worldDown.x * gravityStrength, worldDown.y * gravityStrength, worldDown.z * gravityStrength)
else
local gravityStrength = weight * 0.055
structure.AddForce(0, -gravityStrength, 0)
end
weight is scanned with a custom function
its slightly inaccurate because ModBlock.GetMass() only includes the "base" (e.g. on a small hinge, it's only counting the big part)
but only by <1kg usually
and that should reduce the applied gravity
i don't think thats working as intended
(theres a concrete wall roughly where the orb is)
Another case of: #1226065444364877835 message
Re-exported a Trailmappers map and the player / player structure was deleted
Vehicle becomes entirely unresponsive and once leaving the structure, cannot be interacted with whatsoever. Entire structure has no collision besides the top of wheels (alike sometimes in build mode)
Makertool targets many blocks at once (but stopped some time after i tabbed out?) (https://cdn.discordapp.com/attachments/1140936220487192587/1392323854067564657/image.png?ex=686f1e22&is=686dcca2&hm=c32b1565ae0370f415a5a94f2aca43f76b01a308b9ec3b1c55f3905a962a5014&)
Player is unable to enter build mode, repair, transform, or respawn.
happens rarely and has happened on 2 trailmappers maps now, i don't think its specifically a map issue
happens rarely and has happened on 2 trailmappers maps now, i don't think its specifically a map issue
No clue!
i'm sure it worked, it's been a while, but when i tested it it behaved exactly like normal gravity
defauly should be a direction of 0,-14,0
when did modder role be super duper shiny?
its too low to ever show up for anyone though 😢
i was told by terrorsoul that you were the one editing the modder role, is that correct? if so, is it possible that you could move the modder role up in priority so its color(s!) can shine?
with/without multiplying by delta time me and @dusty pelican's custom gravity still jitters every now and then. how could i fix this?
the force is too strong, maybe just remove the strong force from the vehicle if the car is near the ground
ok never use 40 fps update rate
this delta time is absolutely diabolical
also how does the strong force mean anything here?
its not the amount of force, its when/how often its applied fluctuating
jittering still happens at 0.020 gravity, that gif is when it was set to 0.047
and besides, the gravity strength is basically 1:1 with official gravity
so i dont want to change that
the point is that its the same EXCEPT you can go on the walls
yees'
are you still using odd refresh rates or have you gone to 60hz?
cause i'm relatively sure the jittering is caused by that, physics is stuck at 60hz, so some physic frames lack the actual addForce, while some get it, i am mostly sure the force can't get applied between frames
30hz might also work, since you always skip a frame, but i don't see why not to keep it at 60
its still 60hz
now for some reason the multiplier for a different addforce related thing won't get set on half of the times i save
idk why
even on old code
figured this out
i clicked a ui button that spawns a subtle message
and now none of them are showing up
Yet another case, with 3 people at once!
afraid that i will fuck over some permissions lol
ahhhgh okayy
wait did you make it be solid blue now?
oh the gradient on the roles list doesn't render correctly on mobile
We'll just have to find a new modder that's been here between 2 and 4 weeks to see the color
Huh?
Currently doing another pass on the spawnables and oh man this one made me understand the issue with Race Island and updating it.
Are you... Actually handling it as a prefab and not as an asset generated by a script given the shape...?
yes.
It has to be handlle manually as we have to strip certain components 😦
It is much more tedious than you can imagine lol
We are working on a new system but we had to re-work some components.
Oh wait I see what you mean; so those barriers are actually generated using Houdini! But thats kind of the thing. They are not prefabs and I cannot extract them as they are an absolutely massive mesh object that covers the whole level 
houdini in 2024 mentioned
They were generated at the time Race Island was made. Now they are just.. there..
Tha. I also understood wrong, I thought you meant it was difficult to update race island itself not making prefab for it, then you made the expected choice
I'm guessing creating them real time with lua function would be too hard..? Also too specific, I'd much prefer custom tris
Not impossible, but you pretty much have to reinvent a bunch of things for Lua. We dont have any procedural generated meshes for Trailmakers and we dont have access to the houdini part any longer, so not like we can just hook those up either.
When mesh loader upgrade? ||jk||
When texture loader upgrade?
when modding vs pionet update
i think that sort of stuff is limited by pionet, bc strings ui are limited to 32 characters so why wouldnt custom assets be limited too
Strings arent in general limited to 32 chars. It was just specifically ui lements for modding that it was set to that.
Custom asset transfer uses chunks of byte arrays
i meant that yes
That's fine. As I said custom meshes directly in-game would probably be better who wants to make their custom guardrail can, in a much more customizable way
About UI string, I forgot to mention it, but a while ago it just didn't give errors, last week having a longer string directly crashed my game, it's fine once you know it, but still... Kinda annoying
It is fixed next update 🙂
It will fail softly now and give an error log insead of Oh No'ing
Cool :) I'm definitely in on the soft fail
once again, on a different trailmappers map
oh thats cool heres a subtle message error from it trying to set the icon of it before its custom texture has loaded
this is also a silent error only seen in ErrorLogs and not the mod's logs
but this one isnt as bad because often that's not gonna get spammed
alright well i did like 9 runs with checking errorlog and i think i fixed all the silent removeui errors... if i didnt then i give up trying to fix them for now because god this absolutely sucks to debug
~~I think there could be an issue with despawning objects that have been set to trigger.
Something invisible is being left behind, like a convex hull perhaps. The player camera is clipped by these 'ghost' objects after they have been despawned.
I will write this up properly in vote-modding-features when I have some time but just wanted to see if anyone else has noticed something like this?~~
Edit: It may have been an error in my code. I seem to have fixed it by doing things a different way.
yet again, this time happening while i was out of the creation
more player events would go hard, like player respawn, player teleport, player enter/exit/ejected seat
#1123915629653667943 
yeah yeah yeah yeah yeah
@novel maple
test just for signal
i have no clue how im going to work in a proper lifting gate arm yet
Cool 👌
If only we had an emissive shader 😭
the way they do it is usually
albedo+roughness texture
metallic texture
emissive texture
Moving arms are somehow possible. That's all i can tell you i am very much uneducated in this area
i remember @serene magnet made a hammer that went down on the player then reset with mods, maybe he can help
You just need the arms and the base to be seperate objects. Preferably have the pivot of the arm be at the connection to the base. When closing/opening you just need to use setRotation() on the arm.
You don't even need the pivot to be at the base, so long as you know how to use sin and cos
I wish mods could save a players blueprint in the data_dynamic folder
And then load it from there too
Never gonna happen :(
Imagine all the possibilities, mods could be so much more interactive. Having the option to save a players blueprint and beeing able to load them again could make modding a lot more interesting, imagine beeing able to come across vehicles that you made in your world.
You could have mods that automatically give you the blueprint you last used when the mod was active, this would be huge for custom campaigns
not only with mods imo, i think you should be able to play with blueprints externally too
||we need Frans to leak the encoding code||
||and the protobuf description file..?||
In practice the ton of issues that would appear from hacked blocks far outweigh anything good you could do with it
Don't have the back up as a gif rn but I basically just make a call once it reaches the end of the swing to another function that just rotates it back
But you could also setup a timer to count down till the second function is called
Anyone got any better ideas at detecting a respawn?, In the past i've just be relying on backspace being pressed for a certain amount of time, similar situation with detecting repair
maybe check the number of blocks, if it has changed. that would also detect transforms
for backspace maybe you can check if the player went from multiple structures to only one, but idk how well that would work
Perhaps my keydown approach is best then for backspace currently, I just worry how it translates to people using controllers
im pretty sure it doesnt translate at all
Anything else will mean doing work on each frame, which adds more load in the game
Maybe add triggers to spawnpoints? You will still need to do extra checks when triggered to make sure they aren't just driving there, but at least you don't run code for all players on each frame
Yep, had some complaints with missile mod not working with controllers exactly because of that
is there any way of completly stopping a blueprint from moving?
tm.physics.SetTimeScale(0) obviously
everything else runs normally, just one blueprint stuck in place
idk could calculate addforce values based on velocity? how to do that i couldn't tell you though
that's what i was thinking of too, it would be the only way
i find it painful how modstructures only have addforce meanwhile modblocks have addtorque and its variants
Making it static, nor setting position can't be done, no, so adding forces is your best bet
I have gotten a great idea that im sure will work flawlessly
@warm canopy you could add the emojis from the guides to the category selector
i'm having trouble with tm.players.SpawnStructure(playerId, blueprint, structureId, position, rotation), when i try to spsawn a structure, in the log, it says this Blueprint with id Blueprint.png not found. does anyone know what i'm doing wrong. This is my code tm.players.SpawnStructure(playerId.playerId, "Blueprint.png", 10, tm.players.GetPlayerTransform(playerId.playerId).GetPosition(), tm.players.GetPlayerTransform(playerId.playerId).GetRotation())
Iirc you have to first load the png, like you'd do with custom objects
so like tm.physics.AddTexture(filename, resourceName)
It worked, thanks!
spawning a blueprint that crashes the game, with mods, still crashes the game
Im having a literal nightmare with structures in terms of getting a flying structure to follow a path.
Ground structure is fine as your not dealing with lots of rotations
But flying ones I’m not even sure I can fully make it work with the api we have
Torque just isnt adequate enough
what is the problem, do they wobble a lot?
show gif
Its supposed to be flying in a straight line along the road with very little elevation
yikes
are you using a pid for making it fly level?
No
A pid and some cheating with add force would probably make it work perfectly
can i try fixing it?
Yeah give me a second, let me package all the stuff up
so this is what non spaghetti code looks like
^_^, Its the physics library that handles the movement of the structures
yeah i found it
Any luck?
so far i only know that yawTorque works perfectly
rollTorque and pitchTorque are doing some wierd stuff and i have no idea why
also the plane seems to just go straight up because of forceY
how are you getting internal game errors
but the server did crash right as the mod did a thing
decompressing ErrorLogs. sometimes they contain mod errors
especially related to UI because its client side
ngl i might want to try single process server to see if i can get more errors
Are the server logs not in there?
idk i was hosting a server
no info in AppData\Local\Temp\Flashbulb\Trailmakers\Crashes so
shouldn't you try to get less errors?
oh the idea is to expose the errors that arent seen, if any
i misspoke a bit
hmm
A friend has been getting a bit carried away while testing all the new stuff in TCP for me 🤓
will you also make ip?
?
peak comedy
ah shit here we go again
ngl I have no idea what it means 
idk either but i know tcp is a networking thing and im sure youre aware ip is also a networking thing
i think tcp is networking...
Tcp is the most common transport layer protocol
Correct! lol. Now my dumb ass brain get's it 🤦♂️ 
SetDragAll is 0.0-1.0 right?
No idea, but it would make sense with values >1
oh god this is beautiful
so compact compared to the old way i did it
old way, but add SetMass with the similar values to each
decoration is replaced by drag btw, but now its dynamic
actually i dont need the mass variable, just /10 at the setmass line
can we get the drag of blocks with mods?
No
being able to set it but not know it is painful
real
☹️
you can do value:sub() and value:find()
Is the set drag function even consistant? I remember that it was apparently broken some time ago
no idea, never tested it to see
Unless it magically fixed itself it should still have this issue https://discord.com/channels/296562030624899072/1374141031418826762
Did I really end up not uploading the mod i tested with... Man i did a shoddy job
where?
you used string.sub and string.find
@scenic echo fix my code
sometimes build mode UI is added even when it already exists and sometimes it tries to remove ui that doesnt exist
ui is contained in data_static\KM_UpdateUI
you can find remove ui errors in your client's ErrorLogs
ok, seems like a easy fix, i hope
oh the fun part
the ui errors in errorlogs dont tell you where it is or what the id is
its just
"RemoveUIElement failed"
"have fun!! :DDD"
does it crash when that happens?
removeui errors happen when banned blocks are placed (use anchor pin to test)
sometimes...?
maybe depends how long you have banned blocks error running
happens more often in multiplayer
i feel like the duplicate ui / remove ui errors COULD be a race condition
@scenic echo would this start at 0?
like i=0 for the first iteration
which is why it gives a removeui error
because error.banned_blocks-0 NEVER exists
maybe, you can try changing that
but lua doesnt start at 0 
yeah
what is the i used for in that for loop?
removes ui with the id of error.banned_blocks-i
hm?
(unrelated to the mod i just noticed this)
wow that is a lot of blueprints
ohh its probably trying to view all the blueprints in build mode before theyve loaded
it might have worked?
i didnt get any errors
ok, found a bug still, if you have more than one engine then you delete it and then you place it back, the weight and bouyancy ui will still show up and when you get out of build mode the error ui will vanish
ahh ok that helps a lot
@dapper jay like this?
you are explicitly telling it to start at 0. There are no languages that have an exclusive range start
yeah
crashed my game with a string too long award
if i want a permanent subtle message, do I just make it last really long?
i do mine for 32767 seconds
roughly 9.2 hours
Now when I do my usual 32million years session it's gonna disappear, way to ruin immersion :p
-# this is actually an AJ quote
workshoppers would unironically complain about it