#General modding chat
1 messages · Page 6 of 1
hes already commented on it before
I mean there was also this fog https://discord.com/channels/296562030624899072/1210227611125551144
that suggestion was mostly just for much larger draw distances whilst also not having fog obstruct it and make it completely useless
someone should put the lighthouse in there
ill put them in
theyre now in
sorry for the delay, can you try this configuration?
{
"Lua.workspace.userThirdParty": [
"C:\Users\Kai\Documents\LuaAddons"
],
"Lua.workspace.checkThirdParty": true
}```
got tired of recoloring my crafts manually
currently making a palette swapping plugin
hopefully when it works it saves like hours of selecting blocks
honestly now i realize why i might want colored text
this could look amazing if i had it display a block character in the color
oop, ran across odd behavior
right, so i got the colors to choose from right here in my palette, normally these go to their dedicated editors
BUT, somehow, clicking them instantly returns it to... the previous menu for no reason? i dont even get my secondary menu and it acts like i pressed the back button
this only seemed to happen when i inserted my A/B function swapper for when i want to exclusively search primary colors or exlusively search secondary colors
lmk if anyone has spotted me lacking
full code block of PALEDIT
in fact it acts like the PALSWAP function is PALEDIT, still adding its own BACK button below. Am i hitting an interpreter limitation??
Can't see anything clearly out of place, but I can tell you from experience that the interpreter doesn't do stuff randomly (most times), I'd say put some logs and try to find out where the culprit is
Also, why did you mark this with rain world karma?
Ok, probably a question mark, am too far gone
it turns out that the culprit was function interlinking
the interpreter indeed did not like any of it
and im still figuiring out why it cannot handle my function correctly for changing the color
i would need to see the full code to explain why, since global/local function and ordering matters in lua
I found out the issue
apparently setPrimaryColor and setSecondaryColor is unstable on the API side, seeing how when you change the blocks color once it apparently returns invalid userdata
and given i run this ALOT in a big batch, it basically guarantees to break
giving me a big ol Interpreter crash
i can see it swap colors but immediately crashes after anywhere from 2 to 10 blocks
meaning until this gets "a bandaid patch" i think ill be trying to circumvent it in vain
that is until i find out how to directly access blockdata
and the times it DOES work, it fails to parse color info properly
making it fullwhite
i guess im at the same spot ridicolas is with his custom color tool that i managed to barely work again with the same unstable progress
We told you those functions were deprecated, they are not gonna be patched
You only supplied SetColor to be deprecated, not SetPrimary/SetSecondary, that one is on you
I mean, I'm pretty sure ridicolas' one worked well, at least a while ago, if anything broke I'm guessing it was in the last update, same problem that's plaguing the missile mod's set color, tho I'm pretty sure those just don't work, without throwing errors
sorry, i was misremembering the names. The deprecated function was setcolor, which was replaced with setprimarycolor/setsecondarycolor
is there a way to easily check for a structure's weight? this and would it be feasible to pick up a *nearby* structure in the general center of the screen if it's light enough?
is there a way to easily check for a structure's weight?
only method is to loop through the blocks and add their weights. Iirc some multipart blocks gave an inaccurate weight, but the difference in an entire structure should be small (you can also hardcode a table from block name to weight if you have enough free time)
this and would it be feasible to pick up a nearby structure in the general center of the screen if it's light enough?
elaborate
Wasn't a mod to grab structures already made?
elaborate
when you are controlling your character (this is surely able to be checked, right?), pressing a specified key will pull/teleport a light enough structure towards you
It is doable, yes
and im sure theres a thing for setting a block's buoyancy
this is for that raft minigame concept btw
does this apply if the block is saved as a blueprint, stored in the mod, and then spawned?
If it works same as thrusters, probably not
cause then i could just make all the spawnable debris beforehand
Is there also a setmass btw?
Nice
does setmass save in a blueprint?
I'd say check if it saves, if it doesn't you can make a tiny script that checks for a color and sets its buoyancy differently
it does not, wah.
then it wouldnt be possible to do actual buoyancy because you cant save it in a blueprint and it can only be set when in build mode?
my idea was to have parts floating in the ocean and you have to out, pick them up, and then add them to your build
but from the looks of it i cant have the parts float, "picking up" parts probably difficult to implement (unless i legally yoink the code with permission from that other mod) and maybe theyll stick to the build
hm, yeah, not if you spawn them with the mod itself
yeeah i doubt im gonna have players manually placing all the scrap down lol
pfb_barrel has buoyancy but those dont despawn properly and slip under from builds super easily
and everything else (explosive barrel, tire) are kind of annoying to work with
and neither of those are parts
and you can't force players in build mode, nor spawn stuff in their build mode, so that's also a no
ay actually as long as it doesn't hang, these blocks stick to the build decently
but with 50 other blocks? idk
oh my god it works decently
so assuming i get all the other crazy stuff to work, raftmakers might be possible
and because ill probably not spawn anchor pins, you'll actually have to design your raft properly else it collapses!
I was thinking (I have no idea how hard this would be), that it might be possible to implement the new update's aiming servo for VR, with the option to aim at the left hand, right hand or the way the headset is facing. Idk just throwing it out there
not possible, they will always face the camera and mods have little interaction with blocks
Ah
I mean one technically can spawn stuff in their build mode, it's just incredibly strange and generally not intended behaviour (spawning something with the same id as something in build mode that was already spawned via mod, but a little different)
no, there is absolutely no data relating to mass in a block's blueprint data, as it doesn't need to save mass anyways, same with buoyancy, ect.
also its ability to affect the creations performance outside of modded servers is an issue
whats all the sounds you can play
not sure how to log them with the thing you use to get them
tm.audio.getaudionames() i think
this is from alva's docs
as i said im too dumb to figure out how to convert it to something that can be logged
you can use any of the strings there
names = tm.audio.GetAudioNames()
for i, audioname in ipairs(names) do
tm.os.Log(audioname)
end
i think this should work
are you making raft in tm?
yes
ok well raftmakers does sound pretty cool
as a name
Does anybody know how to get the code for the smart canon if so I could use some help as I need it for a mod I’m making
are you trying to modify how the cannon works?
if so its just not possible to do
No I’m just looking to increase the damage and fire rate is that possible?
no mods rarely are able to change block values
Well I managed to make a mod that changes the power of thrusters so wouldn’t it be possible to change damage or fire rate?
the api only provides functions to change specific values for specific blocks (eg. thruster power, health, buoyancy, color)
theres is no function to change the values for gun damage/firerate
So there’s no possible way to change the damage of weapons?
I’m not very experienced in modding but for my thruster buff mod all I did was change the thrust number form 80 to 300 and then it worked in game so in the code for the smart cannon couldn’t I just change the damage number?
you probably used ModBlock.SetJetPower(power) to set the power of the engines, but unfortunantly theres no function like this that does that for bullet damage or fire rate
No, you can't
I see
You could change the health of the blocks you are shooting so it takes less hits, but that wouldn’t be exclusive for one type of damage
Yes I think I found I mod that did that but it lagged my game like crazy
i believe the function for setting health is currently not working as intended right now
Oh well modding api at its finest
Especially if there was more than one build
i feel like we should have a forum here deticated to modding bugs specifically
Yeah that sounds like a great idea
Btw does the terrain on custom objects have to be glossy?
No it depends on the alpha channel on your texture
So if your texture is very transparent your model will not have any gloss
How do I change that I’m making map with custom terrain but it’s always glossy and reflects the sky so it looks strange
Edit the texture file
In a 3d software?
No need to do that in a 3d Software
How then?
Just select every pixel and crank up the alpha channel
I’m not very educated on this topic so you may have to explain that to me
Get your texture in a image editing software like gimp and put the transparency of your texture to be very transparent
Ohhh I see
I kinda tasked my friend to get all the models and stuff for me while I actually made the map since I have no idea how anything other than trail makers building works
Does anybody have a runway with taxi way custom object I could perhaps use in a map?
there are textures in here for creating the runway patterns, and simple square section of a runway that you can duplicate and apply a new texture to change the length of the runway, this was used on the mach loop map i made
i recommend turning off collisions with the runways parts and having the ground beneath it as the collider
Thanks mate your a life saver
Does anybody know how to obtain the grass texture file?
that the base game uses? you can't get it officially and i dont think its a good idea to steal it but you can make your own/find one online that looks similar
I wouldn’t consider it stealing since I’m using it for a map but I still tried to find a custom one but they all didn’t work would you happens to have one?
i dont have the original tiling texture but i did screenshot one of them for some personal projects; dont think i'll upload anything with that scuffed screenshot i got
funnily enough I happen to have it saved
used it with quite a few maps of mine
Is the file there or is it just not loading for me?
it has a low alpha value, bc grass generally isn't shiny
Oh I see it now
which value is height (in a position vector)? y or z?
Y
I'm new to moding is it possible to check the light level of any spot in the world? and is there a list of all the commands?
Idk about checking the light level, but there should be a trailmakers docs file in the mod folder. If not, maybe you need to run a pre-installed mod to generate it or sth (i dont remember at this point, but there is a file with all the commands)
documentation is in trailmakers_docs.lua in your mods folder
yeah with enough work that should be possible, you can get the time of day, and do some math to get the direction of the sun, then run a raycast in that direction, if it hits something then it's in shadow, can also run other raycasts in slightly varying directions to get if it's in slight shadow
no, even if there is, its really janky
Has there been any changes to the mod api due to this update? (Anything fixed/broken?)
no
Good.
whats the new aim servo called
as a block item
patching my multiplayer HP mod rn
AimingServo i think
not even PFB_AimingServo?
RIP branded crate thingimabober
rest in peace. you will be missed. 🫡 😭 🪦
Do any of you guys think billboards would be useful as a modding feature? (IK you can do it with modgameobjects, but that is jank.)
i think having a good way to do custom ui rather than the 2003 gray ui would be higher on the list
if we get that, im sure someone will get doom to run on that
I can run doom on the current ui
shit, now I have to do that, don't I
gimme a few hours I'm in school, my linux laptop can barely run trailmakers and it crashes often
not gonna stop me though
I'm not, it's gonna look awful
but it'll hopefully be visible that it is doom
Hopefully
okay trailmakers just crashed while it was loading, this may need to wait until I get home
i mean you can do this so it should be easy enough lol
could someone create a mod that alows you to add or subtract attach points from blocks?
no
why not lol
because the api doesnt support anything like that
also how tf would that even work
Nothing wrong with people asking about what's possible. You don't know until you ask.
Is it just me or is trying to change the drag value on blocks really difficult?
I'm trying to reduce the forward drag (leading edge of wing) for 'PFB_ModularWingSmall' so that it works better for gliders, but I just get some really unintelligable results
If someone can point me to somewhere I can read more about this, or has a set of forward, back, left, ect... values I can borrow/modify that would be brilliant!
Changing drag makes the game bug out
That is very very unfortunate. I will have to implement my idea a different way then...
You can always no-drag the build
Actually not always, but in the vast majority of situations
I kept messing with the setdragall function and I got it to work as I originally wanted
I used these values with the ModularWingSmall: 0, 0, 1, 1, 1, 1 And now gliders can have long wingspans and a ~30% higher speed! without compromising either!
The problem is that it's not consistent. Sometimes it works, sometimes it doesn't, sometimes unrelated blocks are affected
Somehow for me, it has worked but I will probably not modify the drag system in my proper mod (for consistency as you've pointed out), and will use a wing chord length system for classifying builds to calculate an force vector to counteract drag...
is there a way to check wether a player has a camera?
how even
^
the comment you listed funnily enough is exactly the functionality I wanted from the setdragall function (as I was doing some block rebalancing for a mod), So that is why seems it works for me as I expected!
did custom asset loading get improved in 1.9.5? a 1920x1080 texture loaded in maybe 3 seconds and two ~22k vert models loaded in like 7 seconds total
Has anyone noticed that setjetpower(0) doesn't work for dragon jets and the large jet engine?
Crashed Oil tanker in the map I'm working on...
Annoyingly static objects that are 'not collidible' such as my oil spill still allow players to walk on it. If anyone has any tips to prevent this, pls help.
You are awesome thank you 🔥 🔥 🔥 !
why does the function AddForce not register / work? Did i use it wrong?
local selectedVehicle = tm.players.GetSpawnedStructureById("selectedVehicle"..playerId)
selectedVehicle.AddForce(0, 0, 10)```
> attempt to call a nil value
i have made sure that selectedVehicle is correct
probably too heavy
I tend to multiply the force by the weight of the vehicle to offset this issue, By doing that, I was able to make a simple updraft system near mountains to making gliding in my custom map more fun.
No, it gives the error : attempt to call nil value
Why not go through all vehicles the player has with a 'for' loop, and if it's id matches the "selectedVehicle" then apply the 'addforce'.
(There is probably a better way to do this, but I'd recon this could work)
The GetSpawnedStructure... Returns an array
You gotta do [1] or iteratie through all of it
how do i detect when a vehicle passes through a ring of fire?
You can't directly, you have to place a trigger inside it and create a callback function
oh ok
is there a tutorial for that
i'd love to learn modding in general but i haven't been able to find anything to learn from
do note that triggers only detect players
Ah thanks, that name is a bit misleading lol.
I'm pretty sure it's because structures can break, so they still have the same id, but are separate
Reminds me that I never noticed the [] on the return section on the documentation for too long
ah
how do you create a callback function? i've read the docs but i don't see anything meant to specifically do that
You need to use this:
tm.physics.RegisterFunctionToCollisionEnterCallback(targetObject, functionName)
First you have to create a function, like you would with any other function, with a single parameter, the parameter is the is of the player that enters the trigger
any tank track mods?
no
Here's some example code...
Awesome, I really appreciate it.
Haven't tried it, but should work, at least visually
*purely visually, it does nothing else (and even that doesn't completely work, as the tracks don't move)
I guess it's time for someone to make a realistic tank tread mod
Might work on this tbh since the realistic warfare is too heavy to run with TM modding API
what ways of interacting with logic do mods have? i know about applying a force, but if the force required is too high, then the whole build might be pushed, which i dont want, and if the force is too small, then inertia/air resistance (in moving vehicles) may also activate it. is there another thing that can be done that has a very small chance of being messed up on a moving build?
im pretty s ure you cant directly trigger stuff on a build using modding. only indirect stuff like as you said pushing the build causing logic to fire
ye, i realize that there is no "setLogicState()" function or anything, but if someone has a way to trigger a logic block physically it would help greately
wait, can you change the gravity per structure (or per block)?
don't think so
i know you can globally, so you can trigger sth globally with the new gravity sensor, but i need a per-build trigger
No, but you can add forces to certain blocks, which you could maybe detect with a spring and a speedsensor.
But that is very scuffed
speedsensor wont work on moving vehicles, and worse, the inertia of the block thats on a spring will cause the spring to bend when acceleration is experienced. if the spring is set to be tougher, then the force requried will grow and it may push the whole vehicle on which the contraption is sitting
nothing
How hard is it to make mod?
i want to use my boat on the airborne map, but theres no water
you arent able to create water on maps, at least the one that exists in game
damn
thank you
yea the api is very limited, but we make do
thx
Maybe you could spawn a custom object in front of a distance sensor?
maybe? tho im afraid that with a moving vehicle this would just create endless collision problems and possible explosions. plus last time i checked (which to be fair was a some time ago) they were a bit inconsistant when you had stuff around the distance sensors, so who knows if you also wouldnt get false positives
The spawn only has to be there for 1 tick. Also do custom objects that are set as trigger still get detected by distance sensors? If so that could work.
I haven't tested a custom object but I tested a prefab set to trigger and it does indeed get detected by a distance sensor. As long as the prefab isn't near the player or wheels it shouldn't collide with anything.
new years resolution: win over trailmakers custom model loading
Does anyone have a spreadsheet that has every single block name (e.g PFB_Frame_2x4 [server], ...) in the game in it?
(I'm going to make a quick excel script that allows one to create a list sorted by those block names in lua, that can have additional .mass , .buoyancy columns with custom values in or nil if to not be changed to allow easier bulk block rebalancing for custom campaigns.)
The output would be something like this:
BlockProperties = { ["PFB_Frame1x2 [Server]"] = {Name = "", Energy = nil, Buoyancy = nil, Weight = nil, Unlocked = true}, ["PFB_Frame_1x1x3 [Server]"] = {Name = "", Energy = nil, Buoyancy = nil, Weight = nil, Unlocked = true},
Otherwise, I'm going to have to do this slowly and painfully...
for custom campaigns you say...
wait whats that unlocked value about
trying to load a 9mb mesh into the game
ah the broken subdivision is 2.08mb, is that why it removes like 25-50% of the tris?
oh that does make sense
Biggest custom model in my map is 27.8kb, but could be even less with more optimisations
maybe it tries to reduce the model to 1mb so it deletes tris until it fits
and because its about 2mb, it deletes roughly 50% of the tris
Honestly I don't even know the limits of the tm api...
well if you make am odel too complex it goes all fucky
thats what we know rn
but i might have discovered the thing
Why not use 4 models instead of 1
And have their centers at the same point in local space
ooh and those 22k vert trees are only a little over 1mb and 800kb, thats why it works
because i dont wnana bother separating stuff manually, unless you know of a tool that does it automatically
besides, ill do some automatic optimization in blender and then maybe a little manual for stuff like angled slopes that are jagged
youre never gonna believe this, the 526kb model loaded fine
im pretty sure it is a 1mb limit
and it just cuts out tris to fit into 1mb
or something
I think I'm gonna make the spreadsheet manually...
although i have this much detail to work with
ingame it will be 10x larger than it is rn
Just gotta make another mod that concatenates the log output...
If its flat, why have so many verts?
because i plan to sculpt on it
ahh
so yk terrain mesh
one quad is probably like 20 nubs across or more
then you wil use the weld modifier and ctrl t to finish it off?
oh no one of the squares in the texture is 2 quads across
thus at 1x scale 1 quad is like 8 nub
80 nubs across per texture's squares
you can just use csv, it's easy to read from the mod's side and can be handled directly by all spreadsheet programs
i am defo gonna need to split this model...
The mod unfortunately isn't going to read directly from it... The spreadsheet is just going to be used as a better interface to modify values.
then what are you gonna use it for?
When you need to get the names of every item lol
ok actually crashed blender
yo boat campaign?
I'm not going to give many spoilers...
But a boat will be required...
i say this in the context of working on a campaign and needing to choose between building your own structure without limits, or only giving preset vehicles that have the limits. are you allowing players to build their own vehicles with limits, or are you giving preset ones, or something else?
I have made 3 different systems that direct players into building the right type of vehicles...
One just teleports them back to spawn if they use a blacklisted block, and then tells them the name of the block so they may remove it
i would just detonate the disallowed blocks and warn them in build mode if possible
Another system is changing the properties of certain blocks to 'nerf' them
The third system is making sure the environment is difficult enough to promote certain building techniques
that's what i meant, if you use csv the list can be easily modified with a spreadsheet app (as all programs support it) and loaded into lua
Hang on, I don't know what a CSV is, so I'm gonna ask chatgpt...
i cant exactly add a sky ceiling and youre supposed to do deliveries by land, but if i let players build their own stuff propellers and wings n such would be allowed and cause planes to be the main form of travel
Comma-Separated Values. It's essentially a table in plain text with very simple format. For example:
name,weight,available
engine 1,70.5,true
propeller,30.3,false
ohhh
Yh ur right then
alvaro do you have a different solution to the issue me and stormer were just discussing
?
cleanly preventing certain unwanted blocks from being used in player-made creations, instead of only allowing pre-set vehicles provided by the mod
on build mode leave->iterate through blocks->if any have a name banned, destroy the creation and show a subtle message with the banned blocks
if possible, i would also add a warning in build mode saying you have banned blocks.
get the currently selected block->check name->display subtle message
I have already done all of this, but it only activates upon the player leaving a preset building zone. Then they are teleported back into the build zone, and can only leave if their creation has no blacklisted blocks
make sure you set a flag to only check the creation once on leaving the area instead of every frame you are outside of it
Will do, otherwise it will be very laggy...
and then 32768 tris with collision..?
Thats 5.8 yandere dev toothbrushes
Fewww
Finally put (almost) all the blocks in trailmakers into an excel spreadsheet
213 entries
I've done it!
(Chatgpt did it)
I can now just edit a spreadsheet, and export a list formatted for lua that has all the specific block properties I need!
The spreadsheet:
The output produced by the spreadsheet:
||I blanked out one of the categories as it would be a spoiler for a feature in my mod.||
wah boring
An example of how I will use this spreadsheet, Is I will put the buoyancy of all wheel blocks to 0, and then set them to 0, so that the player cannot build any boats of any kind until they have unlocked proper buoyancy blocks...
This feature has been done before in a crude way... But my implementation is far from boring... And it creates a completely different way of designing builds in trailmakers...
If you were looking for values that mods can obtain from blocks, you couldve used my block stats mod, it already produces a csv
If only I had done that earlier...
Well, I've got the list of blocks now anyway...
Lol
you are the guy with the knowledge on custom assets right? was the 32767 tri count limit known?
Can't remember. Not sure if Noiro came across some limits
seems good to put it on the wiki yeah?
If its a limit, might want to confirm with the devs as-well as it could be a bug
alright
Block Limitation System...
does anyone know why my trigger box might not be showing up?
oo thats pretty good. would warn in build mode though as how alvaro said
I am somewhat sure that by default they are invisible, so you gotta set the isVisible to true... Or you might just be spawning it in the wrong position
i set visibility to true, and the position is the same as my ring of fire, but it isn't appearing
does trailmappers offset object positions or something? i matched the position of the trigger to the ring of fire placed in trailmappers.
trailmappers coordinates are different to in game ones i believe
oh
theres mods that display the coordinates of your player, use that to position the trigger
Iirc 300 or 310 lower
i see, i'll give that a try
So 0 on mappers would be 300 in tm
oh yk what that makes sense
i recall altitude sensors only working with a certain offset now that u mention it
its because trailmappers wanted 0,0,0 to be the test zone center, and test zone is 300m above the water level
yeah
If need be I think the default spawnmod always shows your coordinates
alright thanks you guys
alright so i fixed the coordinates but it still isn't there
is it not getting created?
Maybe, can you send that part of the code? Also make sure whatever function it's in gets called by logging something
i tried logging a message but it caused an error :/
i'll show u the code
i have it somewhere near the bottom of main.lua, it's not nested inside of anything
TriggerBox doesn't need to be set to an empty vector, you can leave it at nill, tho that shouldn't cause issue, are you actually calling the function anywhere, or did you forget?
Just:
createTriggerBox(whatever)
oh
Tho that will only call it for the specified player, for now you can try putting it below the function itself, tho you might want to put in in the playerJoined fun function, so it gets called once for each player
so just cut and paste into player joined?
The playerId is never used, so you can just add
createTriggerBox()
On the line after: end
Once a player enters the area the function onEnterTriggerBox will be called with the id of the player that went though it
What's it supposed to do?
add force to the structure that touches it
i might just be missing something obvious
Maybe too little force?
If you show the code it would help
here's the whole thing
i have very little knowledge of lua so this could be very wrong
It might just be that it's trying to call a function that doesn't exist yet, try moving the "createTriggerBox()" line after the onEnter.... Function
show the full error
Line 187 is the GetPlayerSeatBlock?
o
And if doesn't take vectors
Yeah for some reason no
whaaaa
is there a way to separate a vector3 into singular components?
AddForce(velocity.x, velocity.y, velocity.z)
oh thanks
it works just as intended!
thanks everyone
but uhh
is there a way to get the weight of a structure?
cuz lighter builds will be affected differently than heavier ones, which i don't want
probably looping through all the blocks in the structure and getting the weight of each
Yeah
Unrelated, but why must getVelocity only work for players...
also i don't see anything for weight in the documentation...is it missing something?
getMass
ohhhh
Btw I'll be going to sleep, if noone else answers you'll get an explanation tomorrow
But in basic you use a for ipairs and the getBlocks (I think) function
alright, i feel bad taking so much of your time anyway!
alright, i'll try it out
thanks for all your help today
Np, happy to help
anyone know of a tool that can automatically split a model into separate models based on tri count
cause i dont wanna just have aj do it all xd
These may not be the best sources, but they certainly help me quite a lot when modding so maybe you can get some help from there
https://trailmakers.ludixi.com/info/
https://flashbulb.atlassian.net/wiki/spaces/TMMOD/overview?homepageId=218071268
Information on Trailmakers Modding Functions, Spawnables and Audio IDs
I'm going to get to work on that now... I will post a GIF of it in action when completed.
Use both approaches, as checking in build mode isn't 100% reliable unless you want to tank performance
I think I will use a system that only does a check of if a block is banned, if the block selection has changed on that tick.
Unfortunately the drawback of my system would be that you can only check if your selected block is banned by clicking off it and clicking back on it, but it is a small price to pay...
hmm
maybe my method won't work...
It can work, I just need to be smarter...
I'm going to avoid adding this feature in as it isn't necessary, until I can find an example from someone else's code who has done it up to standard so I can learn the best method.
Is it possible ||no it isn't|| to make a subtle message without any texture popping up? Because when you leave it blank, a default icon is used, but is it possible to have absolutely nothing?
Seems like it is currently impossible... A 2x2 100% transparent png will work then...
Is the any mod that allows for space thrusters to be configured?
what do you mean by configured? Because there are plenty of mods which can change the power of the space thruster.
why are there no mods which let youadd power cores in campaign
mods dont have control over power core limit or block bans/blocks unlocked or any of that
oh ok
is there a way to use one of the other premade icons, so that i dont have to make my own? I couldnt find a list of them so im guessing that its not possible
ive seen some mods do random from the vanilla ones but idk how
i also saw in old trailmappers exports if you had a subtle message play and then load the trailmappers map itll use the subtle message from before
Error messages have random icons iirc
thats what i mean yh, ive searched but i couldnt find any still working
I have uploaded a mod to the workshop called: SpaceThrusterConfigurator
It should do what you are asking for.
ahh thank you so much
how can i save a vector in a json file?
do i have to save each axis separately?
since i dont see how i could create a new vector inside my json using the tm api
thanks :D
im not quite sure which one i need and where to then link it
am i here somewhere close to where i need to be looking?
It's probably gonna be quicker if you just save the vector as a table and json that
Either as {X=v.x,.....} Or array style {v.x,v.y,v.z}
Yeah
thanks 
You could save it as a string, you can pass that to tm.vector3.Create directly
they do have to be massively away from the object tho, otherwise wheels will try and commit self die and fuck up the physics as well due to them being raycast (or something i dont know, i know jack shit about programming) ||also, ancient message lmfao||
damn 8 days ago is ancient now
apparently
Last year was a long time ago
🐟
In my mod, due to the buggy nature of the custom map and to prevent exploits, repairing your vehicle will be disabled, so to make sure the player can get their vehicle unstuck (without using gyros as they will be banned), at slow speeds (<5m/s) the player will be able to yaw their vehicle with 'q' and 'e'. I've done some tests, and it is very difficult to exploit this system for free energy and it feels very satisfying to play with.
Feel free to copy this system/idea into your own mods!
Hopefully, when I put a bit more visual flair into the other features of the mod, they will be GIFified and posted here...
nice 🙂
I need a bit of help, i'm trying to make a square horn explode when it gets destroyed, but i don't know how to detect when it gets destroyed, how would i detect that?
I think you would make a list of modblocks and when going through the blocks in a build, add horn blocks to that list. Then save the position of those hornblocks, and check next time you go through the blocks in that structure if the same number of horn blocks exist. Then do the explosion at the position of the missing horn block.
It will require more than what I have mentioned, but is a very doable idea you have...
can you make explosions bigger?
you can spawn an explosion and scale it up
the results ive gotten seem kinda inconsistent to me but yeah
don't know why this happened but the corrupt model after the game forces the model to be <=32767 tris now has very weird tris from verts connecting which didnt before
wait these have collision... its dreaming up new tris with collision
oh is it trying to simplify the model but failing miserably because it also deletes 75% of the tris as well..?
where is mod cache stored, if we can access it?
In windows its %UserProfile%\AppData\LocalLow\Flashbulb\Trailmakers\ModCache
I have an interesting mod for everyone...
Fuel
Simple Video showing a fuel Mod made for trailmakers.
Be warned there is 16x speed up in this video.
#trailmakers #modding
Unfortunately this system is a bit too long to demonstrate within a GIF, so I've used a Youtube video instead.
Nice! Will there be a way to set how much fuel you put in or will it just be block based?
Each non functional block can store fuel. Usually a little less than it's weight, the 30kg and 50kg blocks store the most. I can balance this using a spreadsheet.
For example, flap wings store 0.6 litres of fuel, but non flap wings store 1.2 litres. This incentivises the player to use the minimal amount of functional blocks and design their vehicles intelligently for the task at hand.
I could theoretically refill predefined amounts/percentages of fuel, but that is not necessary for my mod.
The player refuels fully when they are at the home base (located at the centre of the map).
do you disable the engines by setting their power to 0?
Yh, Ideally I would be able to save the detected engine modblocks and check if they are on or not, but as we know the API can't do that (yet 🤞). Instead, I have to disable them until the player presses down the space bar and redisable them when the space bar is depressed.
(The thrusters crash the game if set to a power of 0, so I set them to a power of 0.1)
The drafting update for Track Creator Plus is now live:
#1242291936715608205 message
I've been making an item collection system. Blueprints will be scattered across the map, and once collected, the player will be able to build with the item(s) inside. But its awfully complex.
Has anyone done anything similar where items are scattered around and can be collected?
probably not
how would you prevent players from using the parts they havent unlocked yet?
Teleporting players back to spawn if they have illegal blocks
The illegal blocks are added to a list during build mode. And in order for fuel to be able to be used, you have to enter build mode.
And if the number of illegal blocks in the illegal blocks list exceeds 0, the player is teleported back...
ah i see
i haven't done it, but you should just be able to have some sort of table which maps a block name to a boolean which indicates if it's usable or not. When blocks are unlocked, you can just update that table, and when checking if the player used a locked block you can look up the block's name there
noiro did something for raftmakers
for spawning/collecting items
Backface culling for custom objects is a blessing!
And also a curse... It seems the autogenerated LODs aren't a fan of this technique...
omg this texture even if low res is pretty
i had a better setup but ill try getting that back
How hard would it be to set up custom spawn points that behave like the proper ones where by passing into its bounds sets it as your respawn point? Would it be able to work for individual players so they can “discover” spawn points independently?
Not that hard, if you are fine with square checkpoints
Actually circulars won't be any harder, if you can find a spherical asset that can be invisible and non-collideable
I’m guessing it also wouldn’t be hard to spawn a object to indicate you’ve activated it, though that wouldn’t be distinguished between players unless you gave each player they’re own color but that’s starting to sound over complicated
Ye, can't show an object to a singular player, so that's a bit more finicky
If anyone wants to do it themselves feel free to, else I could add it when I return active-ish (February)
I could try, but last time I looked at a document describing how to code in the relevant language my brain shut off. I need to find less dry learning materials
woo i love lods!!!!
I personally find it to be a great way to learn by looking at how other mods did certain things, like what functions did they use to get that button displayed or such. Lua really isnt that difficult of a language but it does have its weird moments
I have finally got saving progress, and collecting items to work within my mod!
It is now possible in my mod to collect new blocks from items scattered around!
Just gotta finalise and GIFify!
This is currently the item model I am using for my mod... but I need something that makes more sense than a chunk of ore...
I thought a blueprint might make more sense, but It would feel weird to have floating blueprints scattered around...
(For context, the interactable item, gives you access to build with a new block)
I might see if I am able to make a hologram effect for these items...
This is the best hologram effect I can currently make 😦
(Devs we really need transparent textures!!!)
This one is slightly better
This has a better view of the transparency
not bad
and custom surfaces and functional nocollision and half decent custom ui and half decent custom asset loading and fixed custom model complexity limitation
Maybe a toolbox?
I LOVE THAT IDEA!
We ideally need all of the standard material sections...
!!! Very good idea thank you Blockmantahampta, you will be credited in the mod description!
I think it will be time for a GIF
lol thanks :D
This is a demonstration of the system that allows my custom campaign to function. Players will be able to find toolboxes scattered across the map, and when they collect them, they will unlock a new block to help with their exploration!
Maybe the outline should be white instead of black?
I originally wanted to do that, but the culled faces still produce shadows, so a white outline makes shadows onto itself, turning it a weird grey. So I unfortunately have to use black as it won't change colour.
If we were able to use emissive materials, I wouldn't have this problem
is it possible to mod the pc xbox gamepass version?
no
pc-steam version only
For any of you curious, I am making a new map for my campaign mod, this one will have many more environmental challenges and be far far bigger (My last map was 2000x2000 and this one may be 4000 x 4000 with much more land focused gameplay). The attached GIF is an example of one such challenge. Of course the player can solve the challenge a different way, but that is part of the fun!
One downside, is that almost all of my challenges will require a fairly good understanding of TM physics meaning that less skilled players may struggle...
One downside, is that almost all of my challenges will require a fairly good understanding of TM physics
this is a good thing. i would say a significant part if not majority of the community doesn't really have difficult challenges besides stuff like build challenges, which aren't really baked into the game itself as much as a campaign is. my thought process is that i want a challenge, and think a lot of people do, so why not make some?
better yet, if someone doesnt know, but is willing to try, may learn stuff about the game they didnt know
this as well. though it depends on if the mechanic used is intuitive enough to be discovered by the player rather than told by the game
generally the people who download mods for a game already have experience, so it's a different audience from the normal campaigns
any tips/suggestions for mod icons? we need ones for map overview info, vehicle garage info, mission start/end/fail/info, player save data info, and probably a couple more generic mod info ones
my current idea for generic mod ones is to use that cube in the top left, and then a symbol for what type it is (info, alert, saving)
generic save icon is now also "done". idk about whether to move them further apart or to keep it scaled down like it is right now. if i keep them at the same scale i'd have to move them apart because they're too close but then it looks bigger than all the other vanilla icons. scaling it down causes it too look too small compared to the cube
Does anyone know how to stop my custom 3d models from having black faces?
Some of the LODs contain black faces which don't normally appear in the LOD 0 of the custom model
you can add a small vertex/triangle far from the normal model to extend the max range for highest quality LOD, although you will need to spawn it with concave hitbox to avoid weird collisions and might result in slighly worse performance (since you are essentially bypassing LODs, it's up to you to adjust the range for them to keep being effective)
Why is it that no-one talks about the wind volume prefab?
ITS BRILLIANT! And it works exactly like the wind in high seas!
This will allow me to make a wind tunnel that can only be surpassed with enough downforce or engine power!
because afaik it stopped working correctly a while ago
What part of it stopped working?
iirc it just did nothing, but i haven't personally tested it
Mine is currently working on Great Carrier Reef
(I wonder if it stops working in multiplayer or under other conditions...)
Another option is to scale your model down to some smaller size in Blender, re-export it then scale it up in your mod. It seems to scale up the lod distances when you do this.
Would mods ever get a tab built in game for consoles? Would make sense to be in 2.0 imo, I understand it might be challenging, but certain features like fan maps, and complexity mods are locked away from playstation and Xbox platforms.
Likely not, and complexity definitely no
RIP my hopes and dreams, kinda don't see increased complexity as an issue, but if it's off the table I'll live with it, kinda do want custom maps tho..
I'll keep prayin I guess, might get noticed one day.
As of now you can't even get controller inputs with mods
Aka even if you got them on console they can't really do much
what was the website that had all the audio again
I have another GIF for all of you! To access one of the areas in my map, you will need to get through a chokepoint with strong winds! If your vehicle doesn't have enough downforce, you'll just be chucked away!
This allows me to design challenges in areas only accessible to specific vehicle types which should make the challenges harder to cheat!
lol reminds me of old alpha demo and the wind bridges and stuff
It is likely that it will be very similar to the older campaign modes of the game, as I want to avoid letting players use bionic vehicles, which means making similar challenges.
However to make up for that similarity, we will have to deal with designing fuel efficient vehicles in this campaign!
i did not know the wind object still works. noted!
puts gigantic wind block over original trailmakers map to prevent players from accessing it
or just around the whole map in general
It is limited in size. I put the scale factor to 1000 and it only affected vehicles as if it were scale factor 200.
I think beyond a certain scale, scaling it stops having an affect on its size.
Additionally, you sadly cannot control the strength of the wind.
Edit, you can control the strength of the wind, its requires careful planning, and I'll make a graphic explaining how...
Encase the original island inside a very big dome
The Simpsons style
Scaled up force field + invisible ball for collision
By default, the wind speed of the wind volume is 58...
And this doesn't change regardless of the scale of the wind volume...
And wind is not additive, so having two parallel wind volumes stacked on top of each other, doesn't double the wind speed
HOWEVER!
Wind is subtractive!
If two wind volumes point in opposite directions, they will cancel out
And they cancel out each other's x, y and z vectors respectively!
Using this, you can make wind of any vector with a magnitude less than 58 in the overlapping region!
And potentially, this means that if you dynamically place wind volumes at the player's position using a lookup table which states what windspeed should be where with interpolation of some kind, you could create a very intricate custom wind system!
I might do that once I finish my campaign mod...
I've just done some quick maths, and I think this is very very doable!!!
And will involve isosceles triangles!
Edit, the vector maths is incredibly difficult (for me, even though I'm decent at maths!) and it will take me a while to make a Lua function that does this wind cancelling out
I've figured out the maths... Time to turn it into code...
The code is taking its time, but desmos is a trooper in helping me figure it out...
Also, this will be GIFified once I am done!
I have made a variable wind mod!
The PowerCore crate shows the direction the wind is heading to!
(It is not shown in this GIF, but you can control the magnitude of the wind...)
We technically can have wind in any map now!
This is the desmos tool I used to figure out the calculations necessary to make variable wind speeds!
https://www.desmos.com/geometry/g35rvkh5mj
I'll probably clean up the code for the wind function, then share it...
The general idea is that PFB wind trigger boxes have a magnitude of 58, so by using two of them, and rotating those two so that the resultant vector is the vector of wind we want, and then placing those two boxes onto the player so that they overlap, we can make wind that can be of any magnitude and direction!
The tricky part is figuring out the rotation since it requires the quadratic equation!
trailcargo campaign mode is probably going to run like complete garbage but its gonna be so amazing tech/feature-wise
hopefully the sandbox mode is performant
im pretty sure all that will be in the sandbox mode is:
- the detailed map
- spawnpoints + custom map screen
- dynamic and configurable wind
- toggleable dynamic time of day
I believe I will be helping with the wind?
i suppose yes
Amazing work! Well done 🙂
anybody have or know of an oddly spesific mod?
cuz i need a mod that will tell me like turn times and roll rates n stuff
that thumbnail looks nice but i feeel like its just basic road
you can use those big red mushroom prefabs i think in the shrub category as a grass surface
and then cover it with no collision stuff
Does anyone know why the wind volumes cannot be moved by .gettransform().setposition(pos)?
I currently have to delete and replace them which is laggy
They are a non-moveable object
My guess is because the wind itself is not really tied to the object, it’s more like a trigger. Wind also disables if you are not that far away from the object
Eh, its not that big of a deal fortunately
I am currently making some optimisations to the wind calculations, so they can be faster!
I have released a Utility for making custom wind in trailmakers!
I have uploaded a mod to the workshop called 'Hash wind mod'
I have updated Hash wind mod to have multiplayer support.
Please try it out!
If only they changed that, and allowed us to move it. Then I could make the system far less janky.
if only they added and changed the other 50000 things
theyll never o that within the next
Speaking of that, has anyone compiled a list of all the changes to the API we want?
no because it would take months to compile
hmmmmm
uhh some of the important changes/improvements/additions in general were:
- better custom asset loading times
- better texture material support (we have roughness, but theres other things like emissive)
I think there are quite a few random additions to some of the systems we have, like getting the velocity of a block, or the current logic input
I might make a list in my spare time and try and rank it from easiest to implement to hardest.
oh yes all the stuff like custom checkpoints, stuff related to structures (lift the requirement of being owned by a player)
that's what #1123915629653667943 is for
But does it not take ages to look though all of the changes?
If we had a concise list of ideas, that would be nice
#1123915629653667943 is what the devs use to see what to add to the API
Sometimes its nice as a modder to be able to see an overview of what API changes might come ||(in 10 years 💀 )||
that would essentially be the same as #1123915629653667943 , if you don't open the posts you can see a summary from the title
This list I would make, would likely be private anyway, so saying its redundant is not important to me.
I should maybe put this in vote modding features then
skimming at the suggested features i'm also surprised there is no mention of tri creation, there has been quite a lot of talk about it
Just wanted to ask here if there was a way to give a custom object textures like glow and such. Wanted to create an asset pack of neon objects but wanted to see if its possible
not possible
currently custom models only support a base color and roughness value, no emmisive textures
Ah dang
I didn't know about the roughness value either so thats also helpful LOL
Welp. Glad I asked before I made all the models
I would like to point out that fast communication between mods is possible, and I'm not talking about doing so through a complex multi raycast system. you can use the getwindspeed() function to get the windspeed from wind volumes places by other mods. And by using my function that modifies the windspeed at a position, you can make two mods communicate via a 58 signal bus (same as sending 6.5 bits of information between each mod each frame). I'm not really bothered in doing this myself, but it could be useful as a way to make modpacks, or make compound mods which are less laggy. And even better, by placing the wind volumes underwater, they don't affect players, but getwindspeed() still works!
If anyone does this, I would propose that both 58 and 0 are null signals, as other wind volume mods could interfere with the sent signals.
You would need to be able to code both mods, or you can say use position 0,-100,0 as your information access port, and have other mods access the windspeed information put through that channel.
if you want to make a modpack, you can just bundle all mods and load them on your main mod. Way faster communication with no overhead/lag, and users just need to install and load a single mod
it could be useful as a way to make modpacks
Emphasis on could.
In the context of modpacks I would imagine the main benefit would be allowing players to install just the modparts they want in a sort of jigsaw puzzle way, and to allow those individual modpacks to work together in some limited fashion.
Also, working on one huge mod is a pain, and if its possible to split it up, personally thats what I would do.
mods are small, just having flags to enable/disable components of a single mod would run much better in practice at the cost of just a few MB of extra storage in the worst case (which on PC nowadays is basically nothing)
Also, working on one huge mod is a pain, and if its possible to split it up, personally thats what I would do.
you can split mods usingtm.os.DoFile(filename)
Speaking about DoFile(filename) can the lua code that is run by it, access variables from the main.lua file?
I haven't used that function whatsoever so I don't know
if they are global, yes, but using global variables is a terrible idea anyways. If they are local, they can only be accessed in the scope they were defined in
I tend to avoid global variables for most things, but knowing that they can be used for this... I will make my mods far better!
if you use local variables defined outside of any function, they can only be accessed/modified through code in the file they were defined in
there are far better methods of handling it than global variables
I'm lazy 🫡 so Global variables it is
that will only give you more work a couple weeks from now when your code becomes and unreadable spaghetti you can't reason about
🍝 Spaghetti code is delicious! ||Jokes aside, I don't actually make mods complicated enough for them to become spaghetti||
Im one step ahead, I also had the exact same idea a week ago with the cross-mod communication
The problem is that wind despawns when out of player range so it cannot be relied on
I did however make a system that could communicate bools and single digits between multiple mods with help of raycast but idk
You just might be able to do send a quite large amount of data if mods can get the same spawned structure by id
Tho technically it can be done even without the getstructure(id)... The problem is the builds despawning when the player backspaces
The only way I could find when testing that couldn't be impacted by the player was having a raycast measure the hit position of a resizing cube that resized in height.
Devs should totally add a realistic way to communicate between mods, having an analog signal simulator, complete with noise and a low pass filter
What about spawning the wind a set number of units below the player...
I think I may make a quick and dirty test mod to test the despawn limit, so that I can find out it my approach is practical or not
But you cant move the wind object, youd need to constantly spawn/despawn the wind object at the player and that might be pretty heavy in terms of performance impact
could be optimised by only spawning the wind object at set grid points, e.g every 100 x or z units.
The other option is you use the time or teams to store data
I do still think that using thrust/health or whatever of a spawned vehicle would be one of the best option
The moment someone pressed backspace though all hell breaks loose
No interference between sets of mods, you can transfer full floats without imprecision, the only problem is loss of data on respawn
Of course you make sure it's handled properly, even the wind moving is gonna have some minor down time and you don't often need to transfer data on respawns
And possibly the build will despawn after 15 minutes
I think the limitation with the wind system is the distance at which it despawns. If it despawns 500 units away, it will be doable, <100 units will be near useless
Also depends on if x, y and z have different despawn ranges
There is one other hacky bad option that shouldn't be considered...
Have an external program read and edit values in each mod's datadynamic folder automatically...
Then it looses the ease of it just working
in practice, just bundling the mods will work better than any hacky solution to communicate independent mods
Probably but this is way more fun 😛
This is what I came up with a week ago but would be nicer if we had other ways
Also only works on treasure island as thats what it was setup for
An example of where this would be useful is being able to decouple maps from their custom campaigns
it would be useless in that case, since the map itself shouldn't have any logic other than the map loader (if decoupled), and as a result doesn't have a reason to send/receive any data to/from other mods
It might, you never know...
If the map has some moving part and you need to, for example, spawn stuff on it, it would be needed
But it's very niche case and only needs to get synced once
So a raycast won't be an issue
An example, would be a tunnel filled with wind. By default, this stays in the map mod. but the campaign mod may want to disable/reenable it during a cutscene ect, so being able to communicate would solve this issue.
if you know where the wind is, you can disable it with a second wind in the opposite direction, no communication needed
for this example maybe, but if the wind works in a more complex way, which it will be for any of my mods, then your method won't work
i present you some quite cursed and possibly useless tech
that's right, i'm building a cube piece by piece, since the devs didn't make the function to spawn custom tris i had to make one myself, no more pesky loading times and welcome real time procedurally generated stuff
||it's quite terrible, the hitbox is totally messed up, and even like this it gets culled from quite close up||
It’s built using triangles?
ye
Noice
this mesh, a bunch of times
i honestly think it'll kill the performance as soon as you spawn too many
Maybe, the terrain generator I made generated the mesh first then spawned it but maybe your solution is more performant
it should be quicker since it avoids having to load the mesh back into tm, i've sen how slow procedurally generated terrain like that is
tho, do note, it's a terrible idea to try to read and parse a large obj file all in one go, should be done line by line in the update function
Wait you are reading a obj file currently?
yeah, i can spawn triangles standalone, but rn it's together with an obj parser
Ah Nice
btw the limit of object parsing is somewhere between 8 and 459127 vertices
to be fair i don't know what i was thinking making the game create a table of half a million vectors (i didn't check how big the object was)
incredible render distance
how will textures work?
Not
All the tris get the same texture
It's mostly a proof of concept/challenge to myself, it honestly has too many drawbacks, tho it should work quite well for generated terrain and road
You might need to add a random polygon out of view
Maybe have the model bigger then scale it down?
That worked?
Very very impressive. Could this (theoretically) be adapted to animate things, like waves on a subdivided plane?
(Ik it would be too much effort lol)
Has for me in past I think
I'll see
Technically, yes, practically, it's probably gonna be quite twitchy, usual TM set position behaviour
Yeah unless it’s a rigidbody
It's also gonna need a move Tri function, but it's not hard to add
Could also make softbodies, no? :p
With enough effort...
Tho a bit scuffed since the hit boxes would need to be disabled (unless you are fine with 0 LOD)
Re-thinking about this it might actually be more annoying than expected
Due to how triangles and scaling works, I can use one object for any acute triangle, but I have to split obtuse triangles into 2
(yes, with a different 3d object it is technically possible to achieve obtuse triangles, but not all of them)
Long story short, moving triangles will require every Tri to already be split into 2 objects, could get laggy real quick
damn it, we have structure ModStructure.GetVelocity but not ModGameObject.GetVelocity
is it me or ModGameObject.AddForce straight up doesn't work? (i remember block having that same issue a while back)
like, any of the 4 options, on every object i tried till now
my guess is the function is broken..? it should work at least on the player, at least it did so when i jankily added it via dlls
something has been done
came out a fair bit worse than expected
but it works-ish
tm really isn't happy, a 4x4 with cover lags way too much, same as a 5x5 coverless
truly something
cloth physics in trailmakers before 2.0
and softbody
The physics itself is decent, but the tris really don't like it
new wheels mod, just make the thing into a rounded cylinder
||what if I were to say tank treads||
I would say: DO IT!
(If its easy enough)
maybe wheels alone first
@ionic jacinth dirt particles are a bit messed up with your new wind mods
but this isnt really fixable is it
Unfortunately not, the solution I used is quite hacky, even the windsock piece points in the completely wrong direction...
I have just thought of one or two optimisiations I can do for the wind mod. (I forgot to set some variables as local...)
I'll update the mods soon
That's a good question... The API limitation and all the general wonkyness sure don't help, no addforce at position... No constraints... I'll have to see
Or like... The unity wheel collider... That could have been something... Tho iirc main TM also doesn't use it
Quick question: are you able to apply custom textures to the objects that come with the game?
No
Dammit
Now I'm stuck between two rocks. Too many polygons to render custom assets, too many textures to use prefab from the game
made a new g force mod that actually uses centripetal acceleration, as supposed to noiros which i don’t think uses it.
it feels a bit more natural
https://flashbulb.atlassian.net/wiki/spaces/TMMOD/overview
what happened to this page?
or am i just in the wrong place?
explosions and fire
yeah a bookmark i had that did work, no longer does
its been nuked
😭
welp time to find spawnable prefabs the normal way
pfb?
yea mb
we had a list of broken pfbs over in trailmappers thread
out of date objects is close enough
thanks i got it already
Tm mods are not real
Is it possible to add custom models to Trailmakers?
Yeah, as long as they aren't too complex
I wanted to make a tornado object but didn't know if it was possible :)
You can't make stuff semitransparent unfortunately
Well, then you can look at the default spawnmodadv to see how to spawn them
hi guys, i hope this is the right chat for this. im trying to upload a modded map i made with trailmappers, as i did a few times before. But now i get a message that im missing a main.lua file. I have no clue what that is and why now all of a sudden i need it.... help?
did you export the map?
yeah. saved and exported. Also tested it a few times in Trailmakers. Works just fine, just wont let me upload it
what are you writing for the directory?
C:\Users\ ...\Documents\Trailmappers\Saves\Rally Mania
Rally Mania being the name of the mod and thus also the name of the folder
ah wait... i gotta add \Map.json dont i? i kinda missed that for days but now i feel like thats the easy solution
use mods/Rally Mania
hey, how would i change the roughness on objects?
lower the alpha/opacity of the texture
has anyone found an efficient way to detect block damage or destruction on creations? i really would like to make a mod that makes bullets have an explosive effect on impact but i cant think of great ways to detecting block damage that isnt likely to be really laggy
this might explain it
yea makes a bit of sense
kind of liked the structure of this website though
Is there any kind of documentation for moding in tm ?
Information on Trailmakers Modding Functions, Spawnables and Audio IDs
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.
thx
whats the limits/requirements for the mod icon again? it isnt uploading for me
512x512, 363kb
oh it isnt working even with trailmappers' icon
still isnt working but at least the default icon loaded
Anything less than a mb should work
Don't remember if jpg or png
trailmappers exports a png
rn its probably an issue with tm servers because regardless of if its trailmappers' export or my own, it fails to upload the icon
Quick question: can trailmakers run async functions?
you can use corutines for that, but if you want an async/await syntax you need to implement that yourself
sick
of course as soon as i get increment based spinning done on my saws i figure out quaternions exist and might be able to make my rotation both smoother and faster
yay
Please mod money
can somebody else upload a mod and see if custom mod thumbnails are broken? seems to still be broken for me
363 KB, 512x512, .png
trailmappers exports a 720x720 .png around 650 KB
HOWEVER i tried uploading the same mod with trailmappers' thumbnail and it also didnt work
ofc it works for the test upload but not the actual one god damnit
YAY IT WORKED but for the space-less version and only after like 20 attempts
I can try
YESSSIRRRRRR
Nice nice
Are there any mods for a big city map? Something to build cars trucks and things for
some have been posting screenshots/gifs but idk if it's released. @hollow yew
does anyone know how i would set the Axis when im creating a quaternion. the docs just say its a vector3 but i am being small brain
Thx
not yet...still wip. its around the size of those 3 maps together i think
figuring out smooth rotation. yippee
Are you able to use something like Lualanes to multithread within trailmakers?
If not then I can write my own multithreading library I just wanna see if I can save myself some work
Iirc lua by default has no support for multithreading, you can only use corutines for collaborative multitasking
yeah i just wanted to know if i could use libraries with the lua interpreter in TM or if i had to write my own local plugin to handle threading
well to psuedo thread
if the libraries use lua 5.2, don't have dependencies/multiple files, and don't use any of the disabled std lib functions, you can use them. Otherwise you will have to tinker a bit with them to get them to work
does anyone have a list of the default color values?
is there a nuclear bomb mod
i believe there was but i dont think it was ever uploaded
it was made by noiro and i dont think hes coming back to do so
how do you use raycast and know when it hits?
i have something like this and it does not work
local ray = tm.physics.RaycastData(pos, rot, 1200, false)
if ray.DidHit() == true then
....
end
Iirc you put a variable as the last input instead of false, the function then changes is to true if it hits
local hit=nil
local ray= TM.physics.Raycast(pos,rot,hit,1200,false)
if hit ~= nil then
...
End
This should work
If you want to use raycastdata instead of raycast yours seems correct
is hit the position of where it hit?
i'm gonna try this
can raycast hit blocks?
Last I checked yes
if i get the position and rotation of a block and use those for the raycast will it work?
this gives me a error when it hits so i switched back to what i had and it works
my problem was the ray not hitting
How can i get the rotation of a block? i tried GetRotation() but it doesn't update in real time
It works perfectly now, thanks
is there a way to remove a keybind made with tm.input.RegisterFunctionToKeyDownCallback(playerId, functionName, keyName)?
i don't think so, but you can add a check at the start of the function that returns without doing anything if some flag has been set, removing it in practice
is there any way to read the data of a specific axis on a vector3?
i could try using string.find but i wanted to see if there was a less hacky way to do it
.x .y and .z
thanks
how do you use triggers? i have some stuff set to it but i cant find either on the docs or the wiki on how to actually return a call when they are touched
--- 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
or
--- Registers a function to the collision exit callback of a game object
--- @param targetObject ModGameObject
--- @param functionName string
--- @return function
function tm.physics.RegisterFunctionToCollisionExitCallback(targetObject, functionName) end
@radiant lion knows more about it than me though as he wrote the code I use for checkpoints - ie getting more data out of a hit than the default register functions give you.
just need to write the name as a string
oh
eg.
tm.physics.RegisterFunctionToCollisionEnterCallback(pitInTrigger, "onCollisionPitInTrigger")
any errors?
So does your button call the same function as the trigger box does?
yeah
A button sends callbackData, the triggers only send the playerID I think
is the objects set as trigger?
he's not using any variables in the funciton, shouldn't change anything
ah... right
how tall is your trigger box?
yeah, the problem is simpler than expected, they just only detect players
not builds
so spawn a trigger, make it invisile and place it covering the area above
so maybe spawning a invisible cube above it with no collisions could fix that
the trigger box needs to be high enough to collide with the player
or make a trigger box with the triggerbox function
use tm.physics.SpawnBoxTrigger(position, size)
(better than spawning a cube, as those still have collision at times)
rotate it to match with the floor
and make it high enough so any bot gets detected
fixed it
and then once you are happy, make it invisible
just changed the scale attribute of my 1 face thing to like 1000 y
doesnt change the size of it because its 1 face but changes the hitbox
yep but you will have wheels and the player collide with it
not since its that big
collider is above the arena
so its only using the non collidable box
well, if you see any weird behaviour you know what to do
yep
but supposedly it should work, as long as the collider is that far aaway
yeah making an object that already has a hitbox into a trigger does not get rid of all the collision
yeah i noticed that with my floor tiles
in trigger mode an object's hitbox should be what makes the trigger work - but i could be wrong.
thanks for the help yall. im very much still trying to figure this all out LOL
np. I only figured things out by asking here. I still am figuring new things out lol. It never ends.
im still trying to keep my bots from sinking through my floor
good luck. I hear more polygons can help - but they cause other probs then 🤷♂️
oh dear god
ive already had to cut so many polygons just to deal with this shit custom asset rendering system
if i have slightly too many polygons in my model it just straight up crashes the game
lemme go check my vod from when we first used it. i think ive mostly fixed it now
heres a clip of it happening since i cant get it to retrigger with the new changes i put in place https://www.twitch.tv/antimatterdev/clip/AltruisticArbitraryMinkUnSane-lQqy76FyeIaviYE_
as you can see the floor has become not floor anymore
yeah wheels can pop under surfaces and they still detect the back face of the surface. They use raycasts and those raycasts go outward all around the wheel. Also motorbike wheels are really bad for popping under.
weird question but can you adjust the strength of a spawned explosion. like the PFB_Explosion_Small
because im trying to get the strength of the PFB_Explosion_Large or XL but with the radius of the Small
you can make a explosion smaller with .GetTransform().SetScale(size) but you can't make it bigger
Right now in two of my mods i have the issue of the server crashing after a player joined if a explosion was spawned before the player joined, does anyone know how to fix this?
Removing the explosion completely fixes it but i need it in the mod
i tested custom missiles mod too and it has the same problem
i made a quick mod that spawns one single explosion when the mod gets activated and then tested it in a server with the mod and the server crashed while someone tried to join
this is the mod i used, am i doing something wrong?
i think game sus
Not sure if it's related but I remember a while back encountering mod errors with any object that exploded or that was breakable. If you then tried to despawn all objects the mod would generate an error when it tried to despawn those objects that had already destroyed themselves (and therefore no longer existed).
Just thinking - maybe you can check for the existence of the explosion object for each player as they join?
If anyone wants them I'm gonna be writing out some of my useful functions into a plugin that can be imported into a Lua project
Like my quaternion turning function
By that you mean rotating a vector by a quaternion?
Here's a sneak peek at some of new things coming soon to TCP
More info here: #1242291936715608205 message
this is just me being pedantic, but geometric or quaternion slerp? (just curious)
||good job me for forgetting everything in a day, i'm guessing quaternion slerp, else it doesn't make sense mentioning them||
Yeah one of the main things is quaternion slerp my function just simplifies the process alot and coroutines it
Can you add velocity to a 3d model that has been spawned?
Yes but only if its a custom object
Im using it alot recently. U cought me intresteeedd
Let me know what to improve and also if you come across any bugs
i didnt checked new update so maybe this msg is usless.
there is a bug, umm no, i cant call it a bug, it is just a wrong use of my stupid ass XD
when im creating a track for laps, where should i finish it? on the start line? before? after?
normally now, im placing it a lil before the start line.
when i finish a race sometimes i accidently starting new one cuz start and finish are close to each other.
and when it does, the last score i got is replaced with the new one i started by mistake :
any way to avoid it? suggestion for a better finish line spot? maybe a 2sec delay before i can start new race?💜
That's interesting. When the player finishes they are removed from their vehicle and dropped a little distance past the finish so I guess you're start is right at that point. I always leave quite a gap between the finish and the start (the finish should be before the start) so I've never had this problem. If you have your start a bit further away it should be fine. As mentioned the next update will allow you to reposition both the start and finish if you want to. Is there a reason you want to have the start and finish close together?
how do you make maps for trailmakers?
Nvm i just figured it out but thanks
the best tool is an unoffical editor on the steam store named trailmappers
mega ultra late, but all the confluence modding docs got moved to the Wiki such that everyone can help us with creating a good knowledge base.
Here is the list of spawnables.
With pictures!
https://trailmakers.wiki.gg/wiki/Modding:Spawnables
how can i make a custom object have no collision?
Set as trigger (must be spawned as convex hull)
Note it will still collide with the player and wheels
@regal bear Well i do want them as single start/finish line only when doing laps track. But not necessary. Ill try today placing the finish further away from the start. Cant w8 for the pits
is there a way to get the position of a custom object?
Does the usual GetPosition() not work
i just didn't see it in documentation so i asked
alright
gives me a error
seems like it doesn't work
That's... Annoying
I knew custom objects were treated slightly different, but that's quite stupid
i wanted to make a raycast from the old position of a custom object to the current position to see if it passed through a build or the ground
but now idk if that's possible
And I'm guessing it has to be a custom objects?
yeah
i did GetTransform().GetPosition() and it doesn't give me errors so it may work
yeah it works
-_-
thats crazy bro a blank screenshot
also noco is back!?!
OK. I think the next update will make it better for you as the Finish line will be the timing line for all laps after lap 1. So that effectively means it's both the startline and finishline. It's only at the very start of the race that the startline is used as a timing line. After that it's ignored.
It sets expectation that either it is not working, or that it actually has no mesh :p