#General modding chat
1 messages · Page 5 of 1
surprisingly it doesn't crash when saving the lua file with the line included though
also doesn't crash when loading in servers
I wonder if this has something to do with it then
in a server it works perfectly fine, but Oh No!s in singleplayer
huh?
might have something to do with how adding force still happens each frame of having the escape menu open (resulting in ridiculous velocity when exiting the escape menu), which is kind of really stupid
welp I guess it works in singleplayer now somehow
What the plane doin
Does anyone here do mod commisions? Im looking for a really simple thing. Nothing crazy
Is there a tutorial somewhere for how to get into Trailmakers modding?
Ideal would be something made for idiots.
someone should make a mod
someone should update the modding api
hey thats my line
at this point ill settle with bug fixes
@open acorn why the laughing reaction to my message? im actually curious.
cuz its funny
How much you offering? 💰
i mean thats what commission means
I did one once
free commissions 
Again, it should be a very simple mod. I could dm you and you could tell me what you think
@radiant lion for some reason the "start active" and the "Z lock" options dont stay. When i select them and leave build mode, it didn't save them, they are no longer salecter
any idea why?
due to one of the hotfixes, coloring certain blocks with mods has become impossible, likely wont be fixed until 2.0
How so? I'm the one coloring the block, and everything else works. These two setting are the only ones failing
i believe it depends on if its primary or secondary based on the block
all the settings that are toggled on and off such as z lock, lead target, and start active are stored and changed from the primary value, while all the other settings are stored in the secondary value
so it should be a problem with the primary colour then
then again, there are other on/off setting that work. I see no pattern
i dont know exactly what causes it but many issues involving colors with mods are just not working as intended
and it is not fault of jess, it cannot be fixed as of now
Figured, it was working fine before and jess didnt update the missile mod afaik
that sucks then, 2.0 will take a while
you could also post anything cmm related in https://discord.com/channels/296562030624899072/1174457776601305118, just to keep modding channel clear
it actually released on the thread before steam ws
Also a paid one :)
seeing as most (if not all) 3D models can be constructed with 90d edge triangles/right angle triangle (image for some very basic examples, every triangle should have at least one line that goes from a point to an edge at 90 degrees), I might see if I can do some sort of really low resolution deformable terrain
jess and terrosoul have already done that so yeah
oh I had no idea, are either of such mods public?
Deformable? No. Procedural? Yes
Solution, play on a previous version and don’t deal with the new updates aids
u cant anymore
it broke in hotfix 3, now its hotfix 4 so yippee
You can probably use the depot downloader to download hotfix 2
simp??
https://steamcommunity.com/sharedfiles/filedetails/?id=3333440426
Johannes favourite mod 2024
Theres a tool for downloading previous versions of games on steam
I didn't have a good way to finding spawnables while prototyping mods.
So I went through MOST of the current spawnables, screenshotted them and named them accordingly to their name.
I hope to add a note column later to specific whether a spawnable has special behaviour.
names + images can be found on wiki now
https://trailmakers.wiki.gg/wiki/Modding:Spawnables
wth is kungfuflaglol
kungfuflaglol
truly the best naming system
This is great! Thanks for doing that.
BTW I noticed that the image you have for the PFB_SmallRock_Spawner_01 is actually the PFB_Mine so I duplicated that image for the PFB_Mine entry. The PFB_SmallRock_Spawner_01 appears not to have a model at all.
@regal bear Yeah.. I didn't double check whether I got the names right.. It was a painful manual process.
I hope to give them a review at some point, but it would be nice to get some help with it regardless ❤️
Does anybody know how one would go about making audio mods for this game? I really just want to swap the weapon sounds out for something chunkier, but for one I've never made a mod before, and for two I do not know what software one would use for converting sound files to and from .wwise files or whatever they are.
You can't
is block editor having issues? as of the last update (i think) i cant use custom colors
since 1.9 hotfix 3 iirc
should only happen to propulsive blocks
been having issues with everything, not just propultion
strange
Do a custom mod transform? Like create one from scratch?
Cause that you can't, unless you just mean a custom object
i DO mean make one from scratch
i need to make a custom one as the mod that should allow me to make more than one spawnpoint, doesnt
unless someone tells me why setting a spawnpoint DOESNT TAKE A SINGULAR VECTOR as position
and why it parses a vector as userdata
that also makes no sense
is asking about modding
"this makes no sense"
surprise.jpg
that doesn't make sense. ModTransform is a wrapper type around a unity Transform object, which represents the position/rotation/scale of an object in the world. It doesn't exist in isolation, so you need to spawn an object to which it is attached
I'm guessing you are using tm.players.SetSpawnPoint()?
none of the functions do that
yep
Seems pretty straight forward, a vector for position and one for rotation (tho the playerID part I feel could have been avoided)
that takes a player id, a string, and 2 3d vectors for position and rotation. It doesn't parse any vector as userdata, because it doesn't take any vector (array) inputs in the first place
oh, hang on, mightve just been a typo in the code, its not throwing a moonscape interpretation error for uint32's
it mightve worked
ok nvm it did work i just managed to forget a ;
eyyy ok it works i think i dont have anyone else to test the spawn system with
how? lua doesn't use ; unless you are trying to combine multiple statements in a single line
Iirc you can use ; instead of ,
(I am sure you can in tables, possibly also in functions, which might be what he means)
only in tables, and it's cursed that it's allowed
ok turns out
even if it works fine for 90% of cases
spawnpoints sometimes arent being set at all
can i somehow just define two spawn points and then call them afterwards
you are likely misunderstanding what spawnpoints are
to create a "spawnpoint", you need to set the spawn position/rotation for each player id, and associate all of those pairs with a single spawn location id you can use afterwards
is that spawn location ID individual per player
can i litterally just name it one string if i only need to have it be one spawnpoint per player
cuz if not i might have found the issue
spawn location id is the name of the "spawnpoint", which is made up of a spawn position/rotation for each player id
so its just a table of spawnpoints named after the string
meaning i COULD technically just predefine it with one table
essentially, but you need to create each spawnpoint through the tm.players.SetSpawnPoint() function
yes, that's the intended usage
rn what i have is just when the player joins hes being given a spawnpoint at random based on the team he is in, but i could technically just predefine the team association and spawnpoints
essentially you need to do
for i=0,7 do
tm.players.SetSpawnPoint(i, "spawnpointname", position(i), rotation(i))
end
if you want it to be based on the team, you need a different spawn location for each team
actually alot simpler than i thought
for rotation, forward would be X+ right
if 0 0 0
should work right
oh wait forgot one part
there
the team is ignored there
why is it ignored
you are associating positions to player ids. You need a spawn location id for each team, and each of them should have a spawn point for each player id
so its team dependant
or what
i cant set spawnpoints that ignore teams and set teams manually?
with your code, the player id determines the team of the player, and the player id can't be changed
what id do i need instead
You need a spawn location id for each team, and each of them should have a spawn point for each player id
then tell me what this is
2 teams = 16 spawnpoints
you are using a single spawn location id
read the documentation
the documentation is why i have to ask here
and you wrote it so im asking you
how would i tell it to use spawnpoints for a different team
which is NOT specified in the documentation
Sets the position and rotation of the spawn point for a player ID at a given spawn location. Each spawn location is a group of spawn points, one for each player ID. spawnLocationId = id of the spawn location. playerId = player ID for which the spawn point will be used when respawning at the location
spawn points are completely unrelated to teams. You need to manually handle that if you want
so if i make spawnpoints and set the player to a different team it should not be interfering
what youre telling me right now instead is that spawnpoints are bound to be per-team
either way, with this set the moonscape interpretor is currently having an aneurysm
the system i use seems to work , creating spawnpoints in-time but failing sometimes
it fails to find a player for a tick, then implodes and recovers somehow
correct. It won't change the spawnpoint for that player, so if you have 2 groups of spawns at the base of each team, players won't spawn at the base of their team. They will chose a base based exclusively on their player ID, disregarding their team. If you assign player IDs to teams, the teams likely won't be balanced in amount of players and players won't be able to change team
well it would probably be unbalanced either way when the number is odd
right now my issue is that players arent "found" and their spawn position is not being considered
with your method, you could have a team of 4 players and a team of 0. If any player changes their team through the in game UI, it will also break
well it doesnt break right now with people changing it to 4 or 5 but the main issue is when someone joins they either spawn correctly, spawn incorrectly in the water, the interpretor freaks out OR it outright crashes me, all of which are inconsistent
i would need the code and the full errorlogs from the mod
this should get the angle of the "neighbor" object towards the "element" right?
local direction = neighbor.getTransform().GetPosition().Angle(neighbor.getTransform().GetPosition(), element.getTransform().GetPosition())
-- or simplified
local direction = neighborPos.Angle(neighborPos, elementPos)
no, it doesn't make any sense to calculate the angle between positions. You only have 2 points, but you need at least 3 to define an angle
your code assumes the 3rd point is the origin, which is completely arbitrary
btw, you would usually call the angle function as tm.vector3.Angle(vec1, vec2)
i want to apply a force to the "element" object but i want it to be pulling away from the neighbor. How could i calculate the direction the Force needs?
diff = elementpos - neighbor
direction = diff/diff.magnitude()
not sure if it's +diff or -diff at the end atm it's +
alr thx
Truly terrible discovery. table.unpack actually doesn't flatten or whatever as I would've expected.
local arr = {2, 3, 4}
local elements = {}
for _, num in ipairs(arr) do
table.insert(elements, {id = tostring(num)})
end
local test1 = {table.unpack(elements)}
for index, value in ipairs(test1) do
tm.os.Log("test1 " .. index .. ": " .. value.id)
end
-- This works as I expected!
-- test1 1: 2
-- test1 2: 3
-- test1 4: 4
local test2 = {
{id = "1"},
table.unpack(elements),
{id = "5"}
}
for index, value in ipairs(test2) do
tm.os.Log("test " .. index .. ": " .. value.id)
end
-- This does not work as I expected! Only got the first element :(
-- test 1: 1
-- test 2: 2
-- test 3: 5
table.unpack() unpacks a list-like table into multiple values, so you can do things like local foo, bar, baz = table.unpack({1,2,3}). It's mostly useful for variadic functions
Yeah thats what I realised. I think it JavaScript where you can unpack and array into the declaration of another array like this, but it actually makes up the different insertions. Super useful. Just caught me off guard.
the second case doesn't work as expected because when you use an expression which returns multiple values inside another expression, only the first is used unless the expression is variadic
this should work to flatten a list by 1 level
local function flatten(list)
local out = {}
for _, v in ipairs(list) do
if type(v) == "table" then
for _, vv in ipairs(v) do
table.insert(out, vv)
end
else
table.insert(out, v)
end
end
return out
end
in my softbodies mod it for some reason still struggles with applying the force, i checked it and the value makes sense, just nothing happens. It has no trouble getting the Position of the element but doesnt like to apply the force
doesnt even give any errors.
help would be very appreciated
thanks dyno
Have you tried 1. going with very extreme values just to see if the scale is off or whatever.
2. tried one of the other force types
yes i did both of that
doesnt even work with a Test Prefab
im starting to believe the AddForce funktion is bugged. atleast with mod Game Objects
i have discovered something weird
Ive made a mod for grabbing creations, and you select them by clicking on them with your cursor
since there is no way to get the block that you clicked on, i get the closest block to the click position, and if the distance is smaller than some value, then i deem that the block you clicked on
theres just one weird thing about this
here are the distance values of me clicking on my car in danger zone
and here are the values of me doing the same on the same car in test zone
lol
so basically, what the fuck?
Dyno doesnt like you to post the code
heres my code
its weird because im basing things on the blocks' relative distances
so, there should be no difference whatsoever
Noiro had a grab block mod aswell
damn my game crashed
im testing this more and its so weird?
in one rotation clicking on the wheel works, in another it doesnt
also my game crashed for the second time after refreshing my mod
meanwhile on test zone im unable to replicate this issue
im hoping that im just overlooking some weird thing in my code but i dont think i am?
Edit: it does work with custom Objects, just not Prefabs
i have also had issues with not being able to apply forces to prefabs
can i somehow get velocity of a block (or at least the velocity that a cluster of blocks has)? i tried via the structure, but it seems to give me the velocity of the main vehicle if i drop the block via a detachable thingy
you can calculate it yourself
i know that, but i hoped for a built in method, especially since it seems like something useful enough to be included
if its not listed in the docs then it doesnt exist
😦
if only we had dependencies
is there a way to get a players rotation?
thanks
is there a way to assosiate explosion objects with players? so that killfeed recognizes who got killed by who when the death was cause by a modded explosion?
probably most likely not
damn, thats a shame. after a quick look at the documentation, only thing i could figure out was spawning in a blueprint that immidiately explodes
but that seems like a bad way to solve this
I did this in my mod but it isn't 100 % accurate
is there a way to detect if the server is lagging, like going at 50% speed?
maybe check if the delta time is over a certain value
i did already and it kinda works but not for what i want to do
i want to make a mod that when the game slows down like 50 % speed it speeds it up with tm.physics.SetTimeScale()
with the delta time i can see only when ticks per second slow down, which is not what i need
shouldnt it be as simple as this
local target = 1/60
tm.os.SetModTargetDeltaTime(target)
function update()
tm.physics.SetTimeScale(tm.os.GetModDeltaTime() / target)
end
it seems like it just lags the game
maybe swap getmoddelta and target in the division
the same thing
welp too bad
that will break physics
i know
so if i laged the game it should give something like 0.5 for example
no
don't think it works
time mod sebi gives tm.physics.GetTimeScale()
or does it only give it back if it's in the same mod
i'm using my mod then a workshop mod to change time
yes it only gives it if it's the same mod
thanks
it essentially gives the value you set it to with tm.physics.SetTimeScale()
yup
🤔 I guess you could send data over the time scale thing between mods (albeit with some difficulty, and probably a lot of lag)
might be able to do it better with complexity if getting it shows the decimals put into the set function when ingame it doesn't
or just make the sky dance by using the ToD
or I guess spawning objects and raycasting to detect them, sending data in binary or booleans
how can you get the modder role?
i think they get handed out manualy
indeed
do you need the modder role to make a suggestion on vote-moding-features?
i think so
=/
just ping johannes||(on your own risk)||, he probaply doesnt have anything better to do after all he is the community manager
Given!
does every mod have its own environment? otherwise you can just use globals
Yeah every mod has its own environment
Some simple water physics in use in my heavily updated Velocity Island map (releasing soon).
Basically things just bob up and down if they have enough bouyancy or else they sink. If you are in the seat there is some 'pseudo' drag as well.
The transparent water surface is a scaled power core crate.
If you load the map in any level other than Test Zone this fake water is not loaded - you get real water from those maps.
can mods directly alter the accumulator block
nope
cant interact with much besides basic things like thruster power, health, drag
still no
yea as i thought lol
its more block properties rather than the actual in game input system
when block properties get final support by modding
im sure to finally make a code block mod
though it might actually cause another layer of interpretation
which would make it 3 layers 
we havent had many major modding improvements since 1.7 and none confirmed for 2.0 
code block? like programmable computers and stuff?
i think we need a better ui system that can actually incorporate sprites
thats true
yea basically
i so want that to be in trailmakers! sadly i doubt that will happen though
when we'll be able to interact with logics i'll make sin/cos ecc.. gates
finally inverse kinematics in tm
also, no clue where to ask elsewhere, but is there a channel for asking questions? not necessairly with building stuff exactly, like one of the things i would love to know is what is the function that determines hinges deflection based on input?
there is no function :)
best i can offer is a graph made by alva, but iirc there is no direct function
thank you!
damn that is annoying me now
also, any clue if theres a way to have it be linear?
theres probably a function for it (or a math equation or sth), just not known to the community
not as far as i know (tho once we get logic interactions i was also planning on a block that mitigates this issue)
well, it's technically not supposed to be there, it's a bug, so it's also not known to the devs :p
i feel that once we get logic interactions the modding scene will boom
its a bug????
btw if you want all actual values for the hinges you can find them in alva's guide
here
.logic
there is an approximation using iirc 2 quadratics
not if the rest of the modding api is still in the same state of brokeness. i dont think
ye
but it will mean i can make one more big scuffed mod, like when we got GetColor and i made missiles
or files and trackmaker
yeah true
i think itll boom, not to the maximum potential, but there definitely will be an increase, which may push the devs to fix the modding api
the biggest thing that will increase use of mod and by consequence how devs see them is a youtuber using them
you just want to rotate them with logic? Else you could theoretically also use Modded forces to turn your hinges. But i dont know how precise that would be
would also be very jank
can tell on experience
its hard to fix? why... the servos seem to work fine. sth isnt adding up to me
yeah thats what its called
i prefer the other way
you can already make sin/cos
eeehhhh
it involves two accumulators to create a quadratic function
but it is jank, thats for sure
steering help is messing this up? man, i would trade steering help for linear stuff any time (and getting speed readouts, angle readouts, etc)
hinges are designed for controlling vehicles, not for generally rotating blocks. That's what servos are for
can't hear you, too busy doing exactly that
ye, but precise control is fairly important. trim is a great example. i know that on one of my vehicles, trimming between -0.5 to 0.5 does very little, and then after that its very sensitive. still seems counterproductive in my eyes, tho ive never liked magically adjusting numbers so im a bit biased
(it's a whole mess of a pid and calculating a final position that wouldn't cause an "illegal" rotation of the hinge)
controlls working well on controller is way more important. Even if the hinges were linear, you would still be typing magic numbers because you aren't going to calculate the exact torque a given angle value will have
||just add a new block called "hinge 2: electric boogaloo" it will be just like hinge 1, but no steering help||
can the wheels go like this: 👉 👈 or do you also check for that?
it's based on seat position, so they can't go 👉 👈 (unless you land from a jump, since actual hinge strenght is 0 they fold on themselves for a moment)
you can even captialise on this idea since doing it for free would be to easy
honestly i thought this would be an even worse issue on a controller, tho i havent used one much. and i dont understand your point about them still being magic numbers, because the angle would be linear to my input, which is what in my eyes should happen (tho again, havent used a controller that much in this game)
ah interesting
i'll take the chance to repost this, too bad it cuts right when it happens
or make it one of the advanced options: "linear inputs (also disables steering help)"
you cant really capitalize on that tho
please dont give them ideas like that. im too afraid that it might come true
regardless of the actual curve used, your process for fine-tunning it would be the same:
- type a random value
- Test it
- Depending on which direction it goes, increase/decrease it
- Repeat
if you are clever, you will use binary search to make the process faster, but the steps won't change
im sure they have enough ideas already. I think atleast||(guess)||60% of their community buys most of the dlc's right as they come out, otherwise they wouldnt pump them out so frequently. So when you want to suggest a feature you might want to start thinking about its capitalization or fear its never getting added :P
modding cant really be capitalized that well on and is only available for 1 version of the game, so nothing you really can advertise with
that may work for a trim set before operation, but the vehicle im talking about changed flight characteristics dramatically between the start and the end of flying (custom munitions, heavy and change aerodynamics cuz fins). unless you mean fine tune for every configuration of munitions, and automatically switch between them, this method wouldnt work.
the vast majority of times trim is used it's with a constant input
damn, thats a shame. i just got one of the dlcs, and i doubt ill get any of the other ones. guess im a minority then
not from my experience, tho i guess i play in a fairly specific niche. i can see why steering help may be used by others, and why others may not want to lose it, but i still would trade it to have linear hinges
have all the blocks in the build mode been documented with their mod names
id need the names of the popup headlight , both gyro blocks, the hue light panel and large stabilizer with their hp values and complexity values aswell as the carseat and racingseat
the truss blocks might not be special unless their hp has changed which then means i need them too
as well as the windshield
(we should really add a tiny list of block names and their technical names )
people have already done that with base logic, pretty smooth as well, but iirc it does require an absurd amount of logic
Just check, iirc rids block mod tells you
I cant find that one, you got a link to it?
Ty
it's a great unintentional feature
time to mod the mod to support hexcolor modifications
Doesn't it already do?
it technically existed before 1.9 but you had to go to your profile file and change the values there (also required turning off ur internet for a second and it just was a pain)
Before we also had a bug that allowed to copy-paste modded colors to other blocks, was kinda useful, but reasonably removed
what does tonumber() do?
tries to convert a string to a number
Hello fellow builders. I am trying to upload my custom map made in Trailmappers and I always get an error message with "Upload was not successful" I am pretty sure I got the correct map directory and the mod works on my session. Any ideas to try ? And do I even have to upload it ? Can other players play with me on unuploaded map ? Thanks a lot
i really wonder when were going to be able to fundamentally modify the dethrone UI and use it in any map with anything in it... now that im thinking about it
if you had access to the functions to draw the bars, and then change the text, you could infact make Team Deathmatch or normal FFA Deathmatch with it
with the state of modding right now, asking "when" to anything in specific related to modding might not have an answer
I should play dethrone some time
im throwing it out there anyways, im sure some of the dev team might take a stab at it
Can you make custom dethrone maps by spawning the crown object thingie?
sadge
Yes you can run a server with your custom map and others can join it without you having to upload it to the workshop.
If you still can't get it to upload it to the workshop double check that you've typed the mod path correctly:
- Eg for a mod in a folder called MyMap it should be mods\MyMap
Also check in the actual folder for your mod to see if there is a problematic file.
Other than that I'm not sure what else to check.
Where can I find or look for the formula and inner workings of a CCIP system?
Constantly computed impact point
not too sure what that is but
like every other modding feature, “it probably isnt part of the api”
scratch that its 6 am i cant read
wonder if jess’s leading could work for something like that, just a simple bullet targeting computer
Not if the bullet is affected by gravity
not sure how much the normal bullets and lasers are affected but it could be negligible
or you could simply adjust the reticle compared to the closest targets distance
they are affected in some way
if you want, i can give you a basic function for 2d for that, and explain whats going on to give you the understanding necessary to implement it in ur own work
if you do want that, ping me here or dm me
Yeah i'd like that
I was hoping for a 3d one, but 2d is a good start
Send in dm pls
ive noticed block.setprimary is very buggy, why is that
something funky happened with hotfix 2 for 1.9, which means now any mods that rely on that do not work anymore. Jamie identified it as a bug from an attempted optimisations that broke coloring with modding
it does work
its just a new function
but the way it fetches the active block sometimes just doesnt return a valid block
or cannot access the color
i keep having to replace the block and then color it to get the paints properly
does OnPlayerLeft and OnPlayerJoin really not return the id that joined
also whats the maximum amount of letters in a header and message
I think it returns the whole player data, do you gotta do player.playerId
And there isn't a defined maximum, depends on text width
so its actually the function with the argument (player) already just supplied altogether
so its tm.Players.OnPlayerJoined(userdata player)
that might be more convenient
Yep
neat
does the message and header support unicode?
like full unicode
neh it doesnt
oh messages do have finite length
its 32
getting a very annoying case where ui id's are unable to be globalized for use later in the code
this is critical for what im working on right now
can we assign id's to messages manually
pls say yes
else this is litterally impossible to make
what are you making?
ive bandaid patched the hell out of it
ive made a hp bar mod
to go along with my multiplayer HP mod
how are players joining my campaign with sandbox items? how do i do this?
last guy said he edited his game files but i cant figure that either, just TMS files that i cant read
probably changing the respawn id of the spawnpoints with a build with sandbox items they want to have
yk trailmakers mods feel like a fun toy to me
like they aren't powerful enough
they'll get there
the api will improve with time
give it a year or so
no api changes confirmed for 2.0
only bug fixes
is there a way to have a GUI? like a window in which i can paint or sth? or even just a window with the default font that uses the default ascii characters and has no spaces inbetween lines (for ascii art gui)?
i believe alvaros screen utilities might work
you cant do much with the formatting of the ui system
#1141065535929450597 message
looks promising, tho i cant find anything about glueing it to a player or anything, let alone players camera, so might sadly not work for this application. thanks for replying tho!
it's not designed for that, it's intended for static screens. Depending on your usecase you might be able to use a static camera that can be toggled to open the UI though
well, i wanted to make a "radar" display to show where players are, maybe even have the ability to "lock" onto them on the screen. i figured ascii art would be best for that, but i tired and the spaces between lines and lack of basic ascii characters makes it impossible. was wondering if theres another way to do it, but apparently there might not be
assuming this is for missile mod, you could probably make a ring around the player that displays the direction of a player or a missile lock (no vertical indicator for balancing ig) and spawn 3d models around the ring as “UI” to replicate a radar. and have a circle spawned to show the selected target
just some ideas
have the models essentially be made of a plane with no back face to make the model invisible when not facing it
could be, but ive flown the realistic warfare mod, and it tires to do something like this, but the problem is that the jitter may make the ui hard to read or look at
There is also the thing with custom models that can't really follow players at high speeds, as well as them always having the top be collideable, technically both fixable, but annoying, (having to add to the position and checking if there is no build where you want to spawn the object)

following players at high speeds can be achieved, just not a simple setposition, and they require being a kinematic rigidbody, then adding the velocity * deltatime to the existing position of the target, although every few frames or so it will jump ahead before snapping back (due to frame inconsistency, and deltatime being time since previous frame)
what
what the what
what what the what?
what if there was a mod
what if modding never existed
that would be terrible
I'm trying to make a track with blender but it has weird collisions, is there a way to fix them?
Spawn it as a customobjectconcave
Parameters:
- position: ModVector3 (The position to spawn the object at)
- meshName: MeshName (The name of the mesh that the object will use. See
MeshNametype alias) - textureName: TextureName (The name of the texture that the object will use. See
TextureNametype alias)
Returns: ModGameObj...
Thank you
Hello, could someone pls say me how I can Mod the game?
DLL modding goes against the Trailmakers Terms of Service[1], promoting it on the official Discord server will result in a temporary ban at first which will become a permanent ban for serial offenders.
is there a way to change the grip of roads spawned with tm.physics.SpawnCustomObjectConcave? Like to make a ice road and make it really slippery
nope
and it's highly likely to be the case for a while
-# as adding a single function to change the physics material of an object would probably be quite a lot for the devs (jk)
-# way too much to ask, why are you even suggesting it
not possible
sad
basically the answer to every interesting mod idea, makes me sad
does anyone have an example on how blueprint spawning would be done?
Not on hand, but you have to load the blueprint as you would a texture, then feed it to the spawn blueprint function
alr yep i got it working :)
how long would it take to load a roughly 8k texture
probably depends on the computer
i5-13600kf, 32gb ram, 3060ti
though i wouldnt know how to get a rough estimate though
its still doing some thing i think
its been like 4 minutes
wtf when im in the map network usage goes to 750kbits/s rather than like 80
i wonder if thats loading texture
nvm
yeah i dont think it likes an 8k texture
probably not a great idea
ill try 4k instead
im gonna use it as reference to build this underwater map
so probably doesnt need to be loaded in tm
ok whatev its not actually gonna fnish
this even without the floor texture and only being this 1 prefab already is a good concept
possible but would take a lot of work on the devs' side
why does this return as a table?
It doesn't
ah wait nvm, thanks
im trying to get the block count of the spawned structure but it keeps giving me an "attempt to call a nil value" on line 12
local positions = {tm.vector3.Create(0, 305, 0), tm.vector3.Create(50, 305, 0)}
tm.physics.SetBuildComplexity(2500)
tm.physics.AddTexture("tower.png", "towerBP")
local originalBlockCount = {}
-- Spawn structures from all set positions on the array
for i, pos in ipairs(positions) do
tm.players.SpawnStructure(0, "towerBP","towerTarget" .. tostring(i), tm.vector3.Create(pos.x, pos.y, pos.z), tm.vector3.Create(0, 0, 0))
local targetstruct = tm.players.GetSpawnedStructureById("towerTarget" .. tostring(i))
-- Store the original number of blocks in structure
originalBlockCount[i] = #targetstruct.GetBlocks()
end```
#table gives a number
yes, im trying to get the total block count of the structure so im using # to get the array length, if using GetBlocks() gives an array of all the blocks in the structure.
# likely has higher precedence
ok wait i dont think that is the issue, GetSpawnedStructureById() is returning nil. the structureID should be the same as the structure spawned on the previous line right?
ah wait nvm i got it i had to index targetstruct on line 12
what does this do?
instantly remove build from existence
does it in a single frame, so yes you can spawn a seat and put the player in it then remove it in the same frame and make it look like you kicked someone from a seat (how seat lock mod works)
yea for some reason destroy was just not working at all
and started giving me unity errors where i shouldnt have been
what the FUCK!?
wha
?
nothing 😔
all that anticipation for nothing 😔
I was just very surprised
has anyone tried using animated pngs for textures
i don't think so
pngs can be animated?
yes, but it's a different file format (.apng)
i doubt the game has support for anything other than png tbh
doubt it has support for practically anything
unless .apng somehow behaves the same as .png in some way, i dont know enough to say
should probably test it
does anyone know how to update the mod you made
if it's about an uploaded mod: go to workshop ingame > find your mod under "my uploads" > press the edit button > input the directory again then save
nah he wasking how to re-export a trailmappers map if he already exported it before (he didnt know you can just export again to modify it)
ah sorry, the fact it's in the General modding chat, and clearly states "update the mod you made" is what confused me
he asked in here and trailmappesr at the same time
oh ok
sorry what
bro what
how can i make a texture not be shiny?
Set alpha to 0
make it more transparent, the transparency is the roughness of it, which does imply transparent textures can't be made, and yeah, they can't
IT WORKED, THANK YOU
what if... we had bullet prefabs... or something....
we used to have them but they got removed for some reason
I mean
we had bullet prefabs
i tried to make a mod like way back in 1.5 before autoaim to try and replace the bullets out of guns with the old homing bullet prefab, i had no idea what i was doing and just gave up lol
i used the cannon bullet prefab for one my of my things and then one day it just stopped working because the devs deleted the prefab
pretty sure thats not possible anyway so rip 😔
Reason was a whole bunch of errors being thrown in the background
fix them smh
too hard ig
what if you just use dithering within the model itself
and then apply a texture on that
hmm
Test Zone doesn't have a pre-existing map, and get mouse click position exists, I guess it would be possible to make a map with any map ui one wants, with player tracking, and teleport points using custom cameras and custom objects seeing as Test Zone has a free TAB key, just so long as it doesn't require water
Yep I'd been thinking the same thing. I just don't really think I have the skills to put all that together. Are you going to give it a go?
welp I am working on a map for test zone so I guess I will now
Cool
terrorsoul's golf map is really cool but wow the game does not like it
ive fallen through the track a few times by now
Don't yeet the ball 😛
Damn thats odd, I havent had that issue before
Nope, not unless you fall through
rip
was rolling around also a bit janky for you?
Not as much recently since the latest update
Are you using a certain graphics setting?
what certain graphics setting?
Can you host a server or shall I, Want to see this issue
the ball snaps around as if the position variable didnt have enough bits to represent the position properly lol
Oh that particular issue is the "rolling" animation, had to add it as we cant apply force to non rigidbodies and rigidbodies dont tend to roll properly
Thats a tuning thing with the rolling time
Your ball physically stops rolling but its still doing the rolling animation
Devs...
The amount of work arounds I've had to do lol
Im guessing your graphics quality settings are lower because I can see the test zone floor
are they?
i assume every map is supposed to have a skybox?
some dont for some reason
Yeah your missing things that I see on my end
We have the same graphics settings aswell
Two secs, let me try test zone again
I get the feeling test zone isnt compatible lol
Damn I thought I tested this
loaded the map on treasure island and everything seems to be loading now
yeah the mod is much cooler with the skyboxes lol
Lol
wtf i drop out of tm for like 3 months and now theres golf?
has anybody tested using animated pngs since i brought it up?
also its really clever how you used a creation for getting mouse input
oh yeah frfr (no)
Yeah had to come up with a work-around, also by playing on treasure-island or dangerzone youll also get the underwater biome and the isle biome
the underwater one is really cool
hm if i use a curvy mesh then could i use an animated png assuming it works to make a fish
issue is no transparency
even if it doesnt work, you can script the texture change now
"now" what have i missed
why not script moving the fish at that point
this was added a while back
Thats how I'm doing the ball selection
oh shit lava map
hmm would it be possible to convert a speedtree to obj if it doesnt already export to that and then use one of those ingame
speedtree?
if theyre not 5 million polygons each then probably yes
that would be funny
trying to find a model that isnt 5 million polygons on sketchfab first
the issue is that it uses planes of leaf rather than modelling each individual leaf (makes sense tbh)
WHAT
xD
Once you get into the higher difficulties it will start throwing all sorts of things at you
are these tracks procedurally generated?
Yeah
You have no idea how much pain the course generation code has caused me
oh i can imagine
i assume you use SetTexture to change the courses look as well?
Just spawning it with customobject
Each biome has a texture atlas
Also I think I just fixed the test-zone issues
Test Zone fix is now live
what was the issue?
I had reverted to an older version of the code yesterday and it rolled back the changes I'd made to the biome spawning part, it should have been relative to the current start height but it was just getting the values straight from the file. I made the biomes using trailmappers. I have to hard-code the start positions based on maps as different maps are different floor levels
Uh oh xD
whoops
This is the desert map?
i think so
The procedural really did do a beeline straight for that rock
All that other space but nope
it was hungry 🤫
Small fix pushed for that lol
In some of the early versions I had courses criss-crossing over each other, random gaps, overlapping
this is good
oh carp
Very close
fixed
no way
OH I HAVE AN IDEA
...whats the idea?
something... cool...
and ur gonna do it in 9 hours?
literally just pastes the original flappy bird 2d background on it
job well done
hmm uses apng for tht
it looks very bad
show
lol
might wanna change the tod
3am animation coding
try putting it really really close to the pillars so the shadows are minimized
its weird how the shadow makes it seem like there are holes in the model, even though there arent
i love the way melvin flies off when u crash
is he based off a rigidbody or what?
it does use a rigidbody but only for the faster refresh rate lol
i just set its position and everything
that's amazing lol
it is so jank
it probably looks fine on video but the input lag is crazy for some reason
it takes a few frames for melvin to jump and it feels really bad
there are 3 pairs of pipes that constantly go left, and if their x position falls below a certain value i just put them back at the right side of the screen
the side effect of this is that the pipes get this weird transition thing where you can see them quickly moving between those two positions
i fixed it by making them invisible for like 10 frames 😭
ive seen some weirdly placed commas at the end of these structures (or sth that looks similar at a glance). try putting a comma after 1 (no clue why it would work, but i also got no clue why it works in the other case so who knows)
Isn't that a problem with reading the file tho? I'd expect the JSON conversion to be done after
it seems to be a problem with tm.os.ReadAllText_Dynamic
but i have no idea why it wouldnt work
What's the doc say about it?
Also have you tried not having the file not be a .JSON? Would be weird if that was the case, but you never know
i basically just copy pasted the code from a previous project(on the left), and that one works fine
although the save file for that looks like this
ill try switching to a dictionary later(name: score)
hello there i have a question me and a friend want too use the custome missle mod but we dont know how too can somone maybe explain it i we never moded trailmakers
i can explain, tho im not sure if here or somewhere else would be better. this seems more like a chat connected with making/modifing mods, not using them. i can help either in DMs or in the custom missile mod channel thingy
Does anyone know where the file that controls the colour of damage is found?
you can't change the color of damage
Why is it that we can control the power of engines, propellers and thrusters with the api but not outboard engines or underwater propellers?
It seems like it would be quite easy to implement a 4th set of functions that would change the underwater propeller speeds...
Another thing that feels incomplete, is the subtle message update functions; you can update the header and text, but not the icon.
you cant expect much out of the api, as it benefits only steam and devs dont exactly like focusing on a single platform
@warm canopy i remember you asked earlier in chat how i did the towers and was in class so here
i simply saved the block count of the creation as they spawned in a list, and constantly checked if the block count is half as much as it started as
i want to try to make a more in depth mission maker where its a bit easier to set up
Ah nice, that's a really cool idea. In the past I've had to have a snowball pfb that I check if it gets destroyed
i also just put dynamite into the tower so it was basically guaranteed to get destroyed with rockets in 1 hit
also congrats on the win
ur just too good
@warm canopy absolutely stunning map/mod man! ||Congrats on the win you totally deserved it!||
what win
i am very confused
||rianlesski behavior when he doesnt get what he wants (winning)||
Amazing work by everyone who submitted. Some of that stuff just blew me away!
I reckon the best thing was to have an actual modding showcase! Thanks to Johannes/Flashbulb for doing that 🤓
yeah I genuinely don't know what everyone's on about
competition? what.
can someone explain how the ModBlock.addTorque() works? what are the X, Y and Z values?
Why does my image in this subtle message have these weird white bars? My image is 100px by 100px. Has anyone else had something similar happen?
you forgot to erase some edges
it adds rotational velocity around a global axis, eg. if you have a 4x8, then you add positive torque to it around the x axis, its z most point will then point down and rotate in that direction. If you have a full build and want to rotate it, just add torque to any of the blocks, it always rotates about the centre of mass
There are no edges at those positions.
The texture wraps around
Which shouldn't happen if you have a (5px or more ??) border
I will fix it, but it won't involve erasing anything...
I just had to move it down and to the left.
someone should make webfishing mod
what are the other map making mods again? I'm looking for the one that spawns stuff into the game
I noticed Exocross map is not on the workshop anymore, it was my favourite map, any know reason why it was deleted?
trailedit works as an in game builder system through mods
trailmappers is good for an external program that exports straight to your mod files, found on the steam store and reqesting access (its instant access)
theres likely some others too that you can look on the workshop for
trailedit, maptrail, and some other one I forgor
trail(insert suffix)
and most of all, (insert prefix) trail
Made in Heaven!
Does anyone know where Trailmakers saves it's username?
I know that it saves it in here C:\Users\<user>\AppData\LocalLow\Flashbulb\Trailmakers\BackendProfile but that isn't the only place
Well it does (making a python communication mod) addon which isn't against the TOS i think.
Communication between python and lua
again, it doesn't. Mods never interact with that
Yea mods don't but the Python side would write a suffix that has the player's steamID there
if mods can't read/write to it, doing so externally won't achieve any communication, and trying to modify that file outside of the game will just cause it to be pulled from the backend again
Yea that's what I was asking that is there a way to save the new username. If there isn't then it is a dead end to identify players.
no
Not even externally?
no. You can only change it in game
Aw man :(
and changing player's usernames is a bad idea anyways, it's terrible for UX
you know right that with mods you can write and read from a file in said directory
and python can also read and write to that same directory
(not the same directory, but to a different one for dynamic data)
||ye, I kinda forgot to mention any directory before saying "said"||
They can into the same directory (I tested and made it working in the python to lua direction)
I uploaded the mod to workshop for myself and it worked
It's just not in the same mods folder that it writes to
the locallow/flashbulb/trailmakers folder can only be read/written by the game, not by mods. Mods can only access mod_folder/data_static (read only) and either mod_folder/data_dynamic_willNotBeUploadedToWorkshop (read/write, only for local mods) or steam/userdata/<userid>/585420/remote/Mods/<modid>/data_dynamic (read/write, only for mods downloaded from the workshop)
then just use that instead of the username
yea but this was for the distinguishing of clients connecting to the host if they are using the plugin
just use their userid/username from the mod's side
that will make the same named users' data conflict
that's why I wanted to change the username since they can be gotten from the mod's side
Ignore edge cases
^it will basically never happen in practice
ill ignore edge cases for now
Why don't functions for spawning projectiles that are shot from certain guns exist?
Seems like something that would be easier to implement compared to other requested modding features.
there used to be bullet prefabs but apparently they spammed errors in the unity editor so the devs just snapped them out of existence 🫠
I hope they oneday take another crack at getting it implemented somehow...
My brains couldn't ignore the edge cases but I found a fix :D. Changing the version uploads the data to the backend effectively changing the username.
Now it automatically kills your game and restarts it thus automatically updating the username
I made it! It finally works! Now you can communicate between Python and Lua and be able to save and load JSON data non-locally to discord.
Oops well not quite yet (still some bugs). Well now everything works
This is kind of moding in a way does anyone know how the blueprints pngs store the data and if you can edit the blueprint by editing the png outside the game?
yes
and yes
they store their data via encoding values into the r g b of transparent pixels down at the bottom of the blueprint
you can indeed edit it, but it is quite difficult, the closest I've seen is the data of the blueprint laid out (with a few errors here and there), and since image editing is possible, it's definitely possible
the simplest of edits I know of is removing the username of whoever created the blueprint, it can be done by simply erasing the last 8 pixels of the transparent coloured ones
I do not know a lot about transparent pixels so I will do some research but this helps a lot Thanks!
Editing actual creation data isn't possible though, that's stored as compressed binary data and basically any change will corrupt the blueprint
hey so uh i'm making a race on stranded with trailmappers and it's permanently stuck at 98% loaded in-game. is there a way to fix this or do i have to tough it out and guess if the assets are spawned right instead of exporting and checking manually like i have been doing until now?
i fear for any answers to this problem i have since it's less than 10% done
this guy was the problem.
thank you noiro for helps
we need gridicolas to appear for 1 day to fix purple space chirp
ow ok lol
transparent pixels are the same as fully opaque ones just that one value (alpha) is changed
is ModBlock.SetHealth() still broken?
probably
if it was fixed people would probably be raving about it in here
can health only be set in builder?
can you only modify the values when a structure is in builder
ah
thought i asked if it was fixed
forgot i said "still broken"
nvm
just remembered f277f4's web-powered byte stream compiler, where you can get the blueprint data as a file, and feed it into his image generator again to get an image back, where it does actually recompile the blueprint data, works flawlessly, and since editing the byte stream isn't as difficult as editing images, yes editing blueprints is definitely doable
doing it with mods however... I doubt, unless you sacrifice your computer and free time to make something that compiles it into what you see when opening an image in notepad, then save many kilobytes of output to a file in the dynamic directory with .png at the end
Afaik f277f4's tool just extracts the data and injects it in a different image without modification. Modifying the actual data would require knowing how to interpret it, which isn't known
oh wait nvm there was also that github thing
managed to use it just now to parse my first ever blueprint
That doesn't seem to work correctly. It's missing a ton of data that must be stored in the blueprint (rotation/colors/block names/ids/...), and there is data you don't know how to interpret that likely must be consistent with other data (edges/weld groups at the end for example)
true, it didn't mention completely parsing it
someone should make a tm mod with the api
im gonna make a tm mod without the api
what
depends on how you do it
if you do it somehow really weirdly and still use normal modding format but somehow avoid the api then that's fine
but if it's dll modding...
oh i was just joking on making a mod that just does not use the namespace of tm
although that mod is basically gonna do nothing at all
You can't avoid the api, since it's what runs your code
oh dear bout to get
’d
though it was only conspiracy, didnt actually do it (and i dont even know how to)
anyone know where the default block style is found in the files
why?
just curious i want to see how it changes
you can't change it
compiled with the game. You can't change it
@devout umbra I think its saved here just edit the dwfault block and version and it should save
that's only the user default, which you can just change in game. You can't change the actual files
I was referring to this
i am too
i dont think they were referring to userprefs
I found a way if anyone wants to know there's a lot you can change in it like your character colours, block colours, how many coins you have but for it to update you need to open the game whilst your offline otherwise I think it fetches it from the server
Yes thats what he is pointing at here. This is already a known method
is there a way to have mods on campaign maps like airborn and stranded?
you can use mods on the respective sandbox version of the map but not on the campaign version
unfortunate, i wanted to make a hard mode of the airborn campaign
reprogram the airborne campaign restrictions
airborne sandbox still has quests
Can you ban/unban blocks with mods?
dont think so but noiro was coming up with a way to do it for a certain campaign map he is making
no
but you can delete builds and explode blocks (just 1 block, unless they patched scaling explosions) that are of the same name as what's in a table
how precise would the deletion process be with explosions?
when I was testing it a while (1.7) back it was near perfect
spawning explosion at the block position and scaling it down to 0.01
The scaled explosions are what delete the blocks in my old combat mod so it still works
Did you get any powercores from quests in the airborn campaign?
no, they're from powercore crates
Have we had any confimations of modding api changes/additions in either 1.9.5 or 2.0?
if i wanted to store a block and it's position in a table, how would i do that?
get the block->get its position->store references in a table however you want. What's the problem?
store references in a table however you want <- idk how to do this, do i need a table like Table[][][]?
idk how to store the block in a efficient way, i could initialize a table with 0, 1000 times and then just write it on there but idk if that's a good way to do it
i found out
that depends completely on your usecase and what information exactly you want to store
.
good to know
somewhat related: could blocks get an id property?
would make storing info for blocks a lot easier
It sure would be an easier way to check if the selected block changed
you mean without manual labor of storing an n-size id table?
i mean you can definety go ahead and just store n-size id tables iterating through the creation, but the issue will lie in finding the block you want to check for
you could group them by type, if its frame, gun, tech(thrusters etc) but that will be alot of tablespam when 8 people join a server with more than 2 creations
you can restrict it to the one where the player is in the seat, stripping off some computing time
meaning debris gets ignored
but this might still leave you with 8 500+ entry tables
so if we get an id property that might cut it down to perhaps 30 wanted blocks per creation
id say it should get added
along with tm.players.GetPlayerViewMatrix
mods are run server side, they have no information about players' camera
the only thing an ID function would do is allow having references to blocks that persist across repair/respawn/build mode, which is still useful but wouldn't change amount of computations you have to perform
smh simply have the server request the view matrix from the client and have the client send the entire thing every single time the function is called
effeciency
that's extremely inefficient. Typical ping is ~40ms, which would freeze the server process for 2-3 frames on each call, potentially >5 frames for far away clients
that's why I wasn't being serious lol
although, potentially it could be asynchronous
would make it less useful than it already would be, since a highly delayed view matrix isn't very useful
that also adds a lot of complexity to mods for when things are run/avoiding race conditions
ofc
Is a dedicated a thing and if not would it be possible to make. like a way to host a server without being in the server.
not with mods, with external stuff (it being illegal though) yes
Ok, thanks. (I will not make it just wondering if it is a thing)
@cinder spruce @open acorn
somehow kept trying to grab the position of the block even though it was destroyed
okay I've done something crazy in a very hacky way
I listen for every line in the log file for the mod and if it looks like an error according to a shitty regex I wrote I extract the line and column and run it through a source map
the generated code looks like this and the error is on line 25, so the error message says it's on line 25
and I'm running that through a source map
huh, I thought I had already fixed that, must've missed something though
Im siding with him here. This client to server transport is less than 2kb and if properly sent doesnt impact ping in the slightest.
The ping issue is due to bandwidth throttling, not functions
You can have 2ms ping to a server and it still restricts the max bandwidth to a total burst of 200kb/tick, barely enough to run structure info
It must be addressed for 2.0, it makes gameplay uneccesarely slow and when uncapped can go from a max of 200kb to a whole 10mb
People will be making more complex creations, undoubtedly - so having a low max bandwidth is going to cripple multiplayer
That looks promising. Let frans know about this, we really need better error logging (esp. When the interpreter throws its own errors)
Shut up dyno
Gotta post an image of what i wanted to say, hold on , 4 lines of code is too much for dyno
(dyno needs fixing left and right)
Im very used to this type of error logs
So theres a great suggestion from me - it does help alot more
this solution is specifically for typescripttolua so that the error messages point to the right place
unfortunately trailmakers doesn't have debug.traceback so it would be pretty complicated to get an error trace working
the way I'm thinking about it would involve a new first argument on every single function that contains its error context and passes it down to every function it calls
No. Ping is mostly due to the distance between the devices, the speed of the physical medium through which the data has to go, and how much load there is on the network. The amount of data you are sending has nothing to do with it.
it does if it's blocking
if you're sending more data and it's waiting for the data it'll take longer
which will create a pause
What i mean is that regardless of how much bandwidth you have and how small your data is, you will have to wait for 1 round trip time to get the data from the client, which is significant for a blocking call. Ping usually refers to the delay between a computer sending a packet and it arriving at the receiver computer, not how long a full message takes to send
been trying to get this to work better, but I can't think of a good way of extracting error messages, can log messages (eg. tm.os.Log) have newlines?
because if they can this is a bit harder
actually I might be able to get away with overwriting tm.os.Log and wrapping all code with pcall to listen for errors
and then logging that in whatever way I need to
Yeah, log can have newlines. All log mesaages are prefixed with a timestamp of when they were printed, so as long as you assume a modder will never print a log message with a timestamp in the same format as the game right after a newline, you can use that as the log message begin/end
just realized I don't need to do any of that, every log message will change the log file once, so when I'm listening for changes in the log file I can just get the new text (since it always adds to the end of the file) and that'll be the entire log message
same with errors
one file change is one log message
it means it wouldn't really be possible to scan the file after the fact and read the logs, but I think it's reasonable to have the listener running while you're making a mod and I can store my own representation of the log messages
Genuinely curious, are you studying / have studied electrical engineering?
I’m studying computer science atm, and you seem stupidly (in a good way) well versed in a lot of areas
watch for changes->read the file and transform it to your format in a separate file->clear the original log file->wait for the mod to create it again? Should avoid having to compare file contents at all
no, software engineering
that is a good idea, but it might run into issues if my script tries to clear the original log file while the game is writing to it
but just listening for changes should be fine, I don't really need to compare file contents, just have to read the file from where it left off
unless the game tries to write a huge file at once (>4KB), all file operations should be atomic
that's fair enough, but personally I don't really think the added complexity is worth it
whatever is easiest is best. If you can maintain a file read pointer across file writes and see the updates, that's the best solution
nodejs fs.watch has me covered here, since it tells me if the file gets deleted or renamed and I can just get a new read pointer when it's available
should be pretty simple, I'll share the code once I have something working well enough for me
@tired hound in here :)
(a map made with Trailmappers btw)
trailmappers->export map
in game->upload mod->set name/description->set mod location to mods/<map name>
@tired hound
i got it lol
Can I have some help setting up the modding environment I'm trying to use ALVA'S documentation with the VSCode Lua Language Server Extensions but I don't receive any prompt to enable it here's my workspaces JSON file
{
"Lua.workspace.userThirdParty": [
"\"C:\\Users\\Kai\\Documents\\LuaAddons\""
],
"Lua.workspace.checkThirdParty": true
}
If you open the workspace settings through the gui version, does it show the settings there?
yes
Do you get autocompletions if you delete the default documentation file?
doesnt seem like it
I'm not at home atm to check, i can check the setup i had tonight
Is it possible to get the creation (the seat) that the player is in?
tm.players.GetPlayerSeatBlock(playerId)
oh, thank you!
is it a ModGameObject?
ModBlock
ok, thanks
how can i get the "modder" role so i can post in the suggestions channel?
ask a dev for it
Oh, ok... do i just dm a dev?
I guess
alr, thx
or you could ping one when they're online
Definitely not right now, it's midnight for them
also you need to show that you are a modder
is it possible to directly set the position of a structure?
Iirc only on first spawn. You could dispawn it and spawn a new one though
i got it to work trough some AddForce shenanigans
-- s - our structure
local v = ((TARGETPOS - s.GetPosition()) - s.GetVelocity())
v = v * (1/tm.os.GetModDeltaTime()) * 0.02 * MASS
-- then add the force v
But it can cause a sonic boom if teleporting too far
Because you aren't setting the position, you are moving the creation. The further the target is, the faster it will have to move
yeah, i wish there was a way to just teleport a structure
like disabling the physics for a single frame, moving the structure and enabling it back
spawning some blueprints has a large lagspike that could last a few seconds in my testing, wouldnt be ideal for constantly updating the position
ah, now i need to make the same thing for rotation
There should also be the problem of not being able to spawn whatever build the player is in, only being able to use the ones you load
that's harder than position
I thought so
Else you'll just have to apply it to a block and hope it's on the main part
oh come on, now my game crashes onle i load my mod
Value ">> TM Replay V1 (by G-5) <<
Warning: TMR works only in singleplayer right now" is longer than the allowed length (max. 64 characters)
duh
i was debugging it for an hour and this was the problem...
is there any way i can get the (first) seat block of a creation? (without the player being in the seat)
Checking the names
does anyone have any idea how to rotate a structure so it faces a given rotation? I'm trying to implement it for more than 2 hours and I'm clueless
(sorry if I'm asking too many questions here)
Should just be a quaternion multiplication between the rotation it's at and the one you want
Maybe inverting one of the 2, but I am pretty sure you don't need to
hmm, weird, i tried that and it didn't really work, but I'll try it again later, thank you
It's been a while since I did it, but iirc the w likes to switch from negative to positive, and with it all the other values, aka, based on its sign you'll need to invert all the others
how feasible would it be to make raft in trailmakers; i call it raftmakers
garr how am i gonna make them float
hm
do i stuff the parts i want inside, inside of the tire or something?
scaling it by an equal amount in all dimensions seems to be more functional
but i dont want to spawn crates on top of scaled up tires
could also:
- automatically delete buoyant player-created blocks
then, - have players scavenge for barrels and build off stuff floating on barrels
this is really annoying to balance, would it be better to spawn singular large/medium buoyancy blocks instead of barrels?
U could just apply forces on them that simulate the water buoyancy, of course this would work best without waves
I mean you can create a new respawn point and respawn the player there, assuming the player's in the structure
oh, that's smart)
a good solution for just teleporting once, but for continious movement this is surpisingly smooth
the idea is to have things floating in the waves and you have to go out to get them
and what about if the barrels, which already slide out from under creations, are getting force while supporting something?
try it
having the halfpipe, the scaffolding structure, and all of the billboards as prefabs would be cool
these too
will there ever be options for fog? either in the vanilla game or through mods
its really annoying on making large scale maps

