#General modding chat

1 messages · Page 5 of 1

open acorn
#

game do be oh no!-ing again
only happens when I include the plane.Plane.AddForce(force.x, force.y, force.z) line
I can't quite figure out what about applying the force is making it crash, there's no mod error logs, and the game crash logs aren't very helpful

#

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

dapper jay
#

lol i was right

#

PioNet is a networking framework that the game uses

open acorn
#

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

open acorn
dapper jay
#

What the plane doin

icy schooner
#

Does anyone here do mod commisions? Im looking for a really simple thing. Nothing crazy

sour bridge
#

Is there a tutorial somewhere for how to get into Trailmakers modding?
Ideal would be something made for idiots.

open acorn
#

someone should make a mod

warm canopy
#

someone should update the modding api

dapper jay
cinder spruce
icy schooner
#

@open acorn why the laughing reaction to my message? im actually curious.

cinder spruce
#

cuz its funny

warm canopy
#

How much you offering? 💰

cinder spruce
#

i mean thats what commission means

radiant lion
#

I did one once

cinder spruce
icy schooner
sweet dove
#

@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?

cinder spruce
sweet dove
#

How so? I'm the one coloring the block, and everything else works. These two setting are the only ones failing

cinder spruce
#

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

sweet dove
#

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

cinder spruce
#

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

sweet dove
#

Figured, it was working fine before and jess didnt update the missile mod afaik

#

that sucks then, 2.0 will take a while

cinder spruce
sweet dove
#

woah didnt know there was a thread for it

#

my bad then 🙏

cinder spruce
#

it actually released on the thread before steam ws

sweet dove
#

i need to explore #1126842222898315274 more then

#

Thanks for the help friendHappyCat

radiant lion
open acorn
#

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

dapper jay
#

jess and terrosoul have already done that so yeah

open acorn
#

oh I had no idea, are either of such mods public?

radiant lion
dusk finch
cinder spruce
#

it broke in hotfix 3, now its hotfix 4 so yippee

dapper jay
#

You can probably use the depot downloader to download hotfix 2

dapper jay
#

simp??

warm canopy
dapper jay
#

Theres a tool for downloading previous versions of games on steam

formal crane
#

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

Trailmakers Wiki

Below is a list of spawnable prefabs available in the game.

cinder spruce
#

wth is kungfuflaglol

open acorn
#

in race island

cinder spruce
#

kungfuflaglol

open acorn
#

truly the best naming system

regal bear
formal crane
#

@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 ❤️

copper oak
#

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.

near parcel
#

You can't

final wave
#

is block editor having issues? as of the last update (i think) i cant use custom colors

open acorn
final wave
open acorn
#

strange

median cobalt
#

how does someone do a custom modtransform

#

seems like theres 0 documentation on it

radiant lion
#

Do a custom mod transform? Like create one from scratch?

#

Cause that you can't, unless you just mean a custom object

median cobalt
#

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

shadow iris
near parcel
# median cobalt i DO mean make one from scratch

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

radiant lion
near parcel
radiant lion
#

Seems pretty straight forward, a vector for position and one for rotation (tho the playerID part I feel could have been avoided)

near parcel
#

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

median cobalt
#

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

near parcel
radiant lion
#

Iirc you can use ; instead of ,

#

(I am sure you can in tables, possibly also in functions, which might be what he means)

near parcel
#

only in tables, and it's cursed that it's allowed

median cobalt
#

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

near parcel
#

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

median cobalt
#

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

near parcel
#

spawn location id is the name of the "spawnpoint", which is made up of a spawn position/rotation for each player id

median cobalt
#

so its just a table of spawnpoints named after the string

#

meaning i COULD technically just predefine it with one table

near parcel
#

essentially, but you need to create each spawnpoint through the tm.players.SetSpawnPoint() function

near parcel
median cobalt
#

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

near parcel
#

essentially you need to do

for i=0,7 do
    tm.players.SetSpawnPoint(i, "spawnpointname", position(i), rotation(i))
end
near parcel
median cobalt
#

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

near parcel
#

the team is ignored there

median cobalt
#

why is it ignored

near parcel
#

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

median cobalt
#

so its team dependant

#

or what

#

i cant set spawnpoints that ignore teams and set teams manually?

near parcel
#

with your code, the player id determines the team of the player, and the player id can't be changed

median cobalt
#

what id do i need instead

near parcel
#

You need a spawn location id for each team, and each of them should have a spawn point for each player id

median cobalt
#

then tell me what this is

near parcel
#

2 teams = 16 spawnpoints

near parcel
#

read the documentation

median cobalt
#

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

near parcel
#

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

median cobalt
#

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

near parcel
median cobalt
#

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

near parcel
median cobalt
#

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

near parcel
#

i would need the code and the full errorlogs from the mod

paper bone
#

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)
near parcel
#

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)

paper bone
#

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?

near parcel
#

diff = elementpos - neighbor
direction = diff/diff.magnitude()

#

not sure if it's +diff or -diff at the end atm it's +

paper bone
#

alr thx

formal crane
#

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
near parcel
#

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

formal crane
#

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.

near parcel
#

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
paper bone
#

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

formal crane
#

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

paper bone
#

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

dapper jay
#

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

paper bone
#

lol

dapper jay
#

so basically, what the fuck?

paper bone
#

Dyno doesnt like you to post the code

dapper jay
#

its weird because im basing things on the blocks' relative distances

#

so, there should be no difference whatsoever

warm canopy
#

Noiro had a grab block mod aswell

dapper jay
#

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?

paper bone
dapper jay
#

i have also had issues with not being able to apply forces to prefabs

topaz arrow
#

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

dapper jay
#

you can calculate it yourself

topaz arrow
dapper jay
#

if its not listed in the docs then it doesnt exist

topaz arrow
#

😦

dapper jay
#

if only we had dependencies

scenic echo
#

is there a way to get a players rotation?

radiant lion
#

Yes

#

Perhaps GetRotation()

scenic echo
#

thanks

topaz arrow
#

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?

dapper jay
#

probably most likely not

topaz arrow
#

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

loud slate
#

I did this in my mod but it isn't 100 % accurate

scenic echo
#

is there a way to detect if the server is lagging, like going at 50% speed?

paper bone
#

maybe check if the delta time is over a certain value

scenic echo
#

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

dapper jay
#

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
scenic echo
#

it seems like it just lags the game

dapper jay
#

maybe swap getmoddelta and target in the division

scenic echo
#

the same thing

dapper jay
#

welp too bad

scenic echo
#

nevermind

#

i did something wrong

#

now it just put the game to 1000 speed

scenic echo
scenic echo
#

what does tm.physics.GetTimeScale() do?

#

from what i checked it just gives 1

radiant lion
#

Yeah

#

Iirc it gets how fast the game is running

#

Compared to nornal

scenic echo
#

so if i laged the game it should give something like 0.5 for example

dapper jay
#

no

radiant lion
#

No

#

You can set it to different values

#

And like that you can get it back

scenic echo
#

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

near parcel
#

it essentially gives the value you set it to with tm.physics.SetTimeScale()

scenic echo
#

yup

open acorn
#

🤔 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

paper bone
#

or just make the sky dance by using the ToD

open acorn
#

or I guess spawning objects and raycasting to detect them, sending data in binary or booleans

scenic echo
#

how can you get the modder role?

paper bone
#

i think they get handed out manualy

open acorn
#

indeed

scenic echo
#

do you need the modder role to make a suggestion on vote-moding-features?

paper bone
#

i think so

scenic echo
#

=/

paper bone
#

just ping johannes||(on your own risk)||, he probaply doesnt have anything better to do after all he is the community manager

hardy meadow
dapper jay
paper bone
#

Yeah every mod has its own environment

dapper jay
#

and you cant mess with tm either iirc

#

welp too bad

regal bear
#

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.

median cobalt
#

can mods directly alter the accumulator block

cinder spruce
#

nope

median cobalt
#

damnit

#

one day chirpo

cinder spruce
#

cant interact with much besides basic things like thruster power, health, drag

median cobalt
#

i mean setting the value

#

just setting the value itself

cinder spruce
#

still no

median cobalt
#

yea as i thought lol

cinder spruce
#

its more block properties rather than the actual in game input system

median cobalt
#

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 Melwhat

cinder spruce
#

we havent had many major modding improvements since 1.7 and none confirmed for 2.0 sob_guy_tm

topaz arrow
cinder spruce
#

i think we need a better ui system that can actually incorporate sprites

topaz arrow
#

thats true

median cobalt
topaz arrow
radiant lion
#

when we'll be able to interact with logics i'll make sin/cos ecc.. gates

#

finally inverse kinematics in tm

topaz arrow
#

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?

radiant lion
#

there is no function :)

#

best i can offer is a graph made by alva, but iirc there is no direct function

topaz arrow
#

thank you!

topaz arrow
#

also, any clue if theres a way to have it be linear?

topaz arrow
radiant lion
#

not as far as i know (tho once we get logic interactions i was also planning on a block that mitigates this issue)

radiant lion
topaz arrow
#

i feel that once we get logic interactions the modding scene will boom

radiant lion
#

btw if you want all actual values for the hinges you can find them in alva's guide

#

here

#

.logic

mint oxideBOT
near parcel
paper bone
radiant lion
radiant lion
#

or files and trackmaker

paper bone
#

yeah true

topaz arrow
radiant lion
#

the biggest thing that will increase use of mod and by consequence how devs see them is a youtuber using them

paper bone
#

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

radiant lion
#

can tell on experience

topaz arrow
# radiant lion ye

its hard to fix? why... the servos seem to work fine. sth isnt adding up to me

radiant lion
#

something about the speed steering whatever thingy iirc

#

steering help (?)

paper bone
radiant lion
#

i prefer the other way

median cobalt
radiant lion
#

eeehhhh

median cobalt
#

it involves two accumulators to create a quadratic function

#

but it is jank, thats for sure

radiant lion
#

time for scuffed robot arm then

#

btw also atan?

topaz arrow
#

steering help is messing this up? man, i would trade steering help for linear stuff any time (and getting speed readouts, angle readouts, etc)

near parcel
#

hinges are designed for controlling vehicles, not for generally rotating blocks. That's what servos are for

radiant lion
topaz arrow
radiant lion
#

(it's a whole mess of a pid and calculating a final position that wouldn't cause an "illegal" rotation of the hinge)

near parcel
radiant lion
#

||just add a new block called "hinge 2: electric boogaloo" it will be just like hinge 1, but no steering help||

paper bone
radiant lion
#

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)

paper bone
topaz arrow
radiant lion
#

i'll take the chance to repost this, too bad it cuts right when it happens

topaz arrow
paper bone
topaz arrow
near parcel
paper bone
#

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

topaz arrow
near parcel
#

the vast majority of times trim is used it's with a constant input

topaz arrow
topaz arrow
median cobalt
#

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 )

open acorn
radiant lion
median cobalt
#

I cant find that one, you got a link to it?

median cobalt
#

Ty

median cobalt
#

oh god you can set the custom block color as your main one i think

#

hold on

scenic echo
#

yeah

#

i did that with a wierd green

median cobalt
#

waaait a second does this mean it can also be saved without mo-

#

IT SAVES

scenic echo
#

it's a great unintentional feature

median cobalt
#

time to mod the mod to support hexcolor modifications

radiant lion
#

Doesn't it already do?

median cobalt
#

i had the wrong mod loaded, it does have it

#

ok neat, multiplayerHP is now updated

cinder spruce
radiant lion
#

Before we also had a bug that allowed to copy-paste modded colors to other blocks, was kinda useful, but reasonably removed

scenic echo
#

what does tonumber() do?

near parcel
#

tries to convert a string to a number

viral vortex
#

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

median cobalt
#

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

open acorn
#

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

median cobalt
#

im throwing it out there anyways, im sure some of the dev team might take a stab at it

dapper jay
#

Can you make custom dethrone maps by spawning the crown object thingie?

radiant lion
#

Nope

#

At least before, doubt it changed

#

(the crowned minigame in workshop)

dapper jay
#

sadge

regal bear
# viral vortex Hello fellow builders. I am trying to upload my custom map made in Trailmappers ...

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.

sweet dove
#

Where can I find or look for the formula and inner workings of a CCIP system?

#

Constantly computed impact point

cinder spruce
#

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

cinder spruce
#

wonder if jess’s leading could work for something like that, just a simple bullet targeting computer

radiant lion
#

Not if the bullet is affected by gravity

cinder spruce
#

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

topaz arrow
#

if you do want that, ping me here or dm me

sweet dove
#

I was hoping for a 3d one, but 2d is a good start

#

Send in dm pls

median cobalt
#

ive noticed block.setprimary is very buggy, why is that

cinder spruce
median cobalt
#

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

median cobalt
#

does OnPlayerLeft and OnPlayerJoin really not return the id that joined

#

also whats the maximum amount of letters in a header and message

radiant lion
#

And there isn't a defined maximum, depends on text width

median cobalt
#

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

radiant lion
#

Yep

median cobalt
#

neat

#

does the message and header support unicode?

#

like full unicode

#

neh it doesnt

#

oh messages do have finite length

#

its 32

median cobalt
#

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

open acorn
#

ok I've said it, bye now

dapper jay
median cobalt
#

ive bandaid patched the hell out of it

#

ive made a hp bar mod

#

to go along with my multiplayer HP mod

dry escarp
#

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

open acorn
hoary skiff
#

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

cinder spruce
#

no api changes confirmed for 2.0

#

only bug fixes

topaz arrow
#

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)?

cinder spruce
#

i believe alvaros screen utilities might work

#

you cant do much with the formatting of the ui system

#

#1141065535929450597 message

topaz arrow
#

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!

near parcel
#

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

topaz arrow
#

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

cinder spruce
#

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

topaz arrow
#

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

radiant lion
#

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)

cinder spruce
open acorn
#

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)

cinder spruce
#

what

dapper jay
#

what the what

open acorn
#

what what the what?

dapper jay
#

what if there was a mod

cinder spruce
#

what if modding never existed

open acorn
#

that would be terrible

scenic echo
#

I'm trying to make a track with blender but it has weird collisions, is there a way to fix them?

warm canopy
#

Spawn it as a customobjectconcave

scenic echo
#

Thank you

fervent dove
#

Hello, could someone pls say me how I can Mod the game?

cinder spruce
#
Trailmakers Wiki

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.

scenic echo
#

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

radiant lion
#

Hah, you wish

#

||we all do||

open acorn
cinder spruce
empty dust
#

i have a mod suggestion

#

how about splitscreen cameras?

near parcel
#

not possible

empty dust
#

sad

cinder spruce
cinder spruce
#

does anyone have an example on how blueprint spawning would be done?

radiant lion
#

Not on hand, but you have to load the blueprint as you would a texture, then feed it to the spawn blueprint function

cinder spruce
shadow iris
#

how long would it take to load a roughly 8k texture

cinder spruce
shadow iris
cinder spruce
#

though i wouldnt know how to get a rough estimate though

shadow iris
#

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

cinder spruce
#

probably not a great idea

shadow iris
#

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

open acorn
cinder spruce
#

why does this return as a table?

near parcel
#

It doesn't

cinder spruce
#

ah wait nvm, thanks

cinder spruce
#

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```
near parcel
#

#table gives a number

cinder spruce
#

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.

near parcel
#

# likely has higher precedence

cinder spruce
#

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

cinder spruce
#

what does this do?

radiant lion
#

Same as delete, but inatant

#

Or possibly the other way around

open acorn
# cinder spruce 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)

cinder spruce
#

and started giving me unity errors where i shouldnt have been

dapper jay
#

what the FUCK!?

cinder spruce
#

wha

cinder spruce
dapper jay
#

nothing 😔

cinder spruce
#

all that anticipation for nothing 😔

dapper jay
#

I was just very surprised

shadow iris
#

has anyone tried using animated pngs for textures

near parcel
#

i don't think so

cinder spruce
#

pngs can be animated?

near parcel
#

yes, but it's a different file format (.apng)

dapper jay
#

i doubt the game has support for anything other than png tbh

cinder spruce
#

unless .apng somehow behaves the same as .png in some way, i dont know enough to say

dapper jay
#

should probably test it

errant arrow
#

does anyone know how to update the mod you made

open acorn
cinder spruce
open acorn
cinder spruce
#

he asked in here and trailmappesr at the same time

open acorn
#

oh ok

cinder spruce
#

sorry what

open acorn
#

bro what

scenic echo
#

how can i make a texture not be shiny?

near parcel
#

Set alpha to 0

open acorn
dapper jay
#

what if... we had bullet prefabs... or something....

dapper jay
#

we used to have them but they got removed for some reason

open acorn
cinder spruce
dapper jay
dapper jay
radiant lion
dapper jay
#

fix them smh

cinder spruce
dapper jay
#

😤

#

now my death cubes arent as fun

shadow iris
#

and then apply a texture on that

open acorn
#

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

regal bear
open acorn
regal bear
#

Cool

dapper jay
#

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

warm canopy
#

Don't yeet the ball 😛

dapper jay
#

i didnt

warm canopy
#

Damn thats odd, I havent had that issue before

dapper jay
#

its the same part where i fell through last time

#

is there a reset key?

warm canopy
#

Nope, not unless you fall through

dapper jay
#

rip

warm canopy
#

First time im seeing that issue

#

How is the ball even clipping into the ground

dapper jay
#

was rolling around also a bit janky for you?

warm canopy
#

Not as much recently since the latest update

#

Are you using a certain graphics setting?

dapper jay
#

what certain graphics setting?

warm canopy
#

Can you host a server or shall I, Want to see this issue

dapper jay
warm canopy
#

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

dapper jay
#

oh

#

rigidbodies dont tend to roll properly
how did that happen lol

warm canopy
#

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

dapper jay
#

are they?

#

i assume every map is supposed to have a skybox?

#

some dont for some reason

warm canopy
#

Yeah your missing things that I see on my end

dapper jay
#

hm

#

was i supposed to load it on a different map?

warm canopy
#

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

dapper jay
#

loaded the map on treasure island and everything seems to be loading now

#

yeah the mod is much cooler with the skyboxes lol

warm canopy
#

Lol

shadow iris
#

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?

dapper jay
#

also its really clever how you used a creation for getting mouse input

dapper jay
warm canopy
#

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

dapper jay
#

the underwater one is really cool

shadow iris
#

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

dapper jay
#

even if it doesnt work, you can script the texture change now

shadow iris
#

"now" what have i missed

#

why not script moving the fish at that point

dapper jay
warm canopy
#

Thats how I'm doing the ball selection

dapper jay
#

oh shit lava map

shadow iris
#

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

dapper jay
#

speedtree?

shadow iris
#

its expensive but fancy tree

dapper jay
#

if theyre not 5 million polygons each then probably yes

shadow iris
#

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)

dapper jay
warm canopy
#

xD

#

Once you get into the higher difficulties it will start throwing all sorts of things at you

dapper jay
#

are these tracks procedurally generated?

warm canopy
#

Yeah

warm canopy
#

You have no idea how much pain the course generation code has caused me

dapper jay
#

oh i can imagine

dapper jay
#

i assume you use SetTexture to change the courses look as well?

warm canopy
#

Just spawning it with customobject

#

Each biome has a texture atlas

#

Also I think I just fixed the test-zone issues

dapper jay
#

belvin

#

apparently the custom cameras dont work with some camera modes

warm canopy
#

Yup

dapper jay
#

yeah the two orbit cams

#

weird

#

everything else works fine lol

warm canopy
#

Test Zone fix is now live

dapper jay
#

what was the issue?

warm canopy
#

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

dapper jay
#

ah i see

#

is the skybox clipping through the track here?

warm canopy
#

Uh oh xD

dapper jay
#

whoops

warm canopy
#

This is the desert map?

dapper jay
#

i think so

warm canopy
#

The procedural really did do a beeline straight for that rock

#

All that other space but nope

dapper jay
#

it was hungry 🤫

warm canopy
#

Small fix pushed for that lol

#

In some of the early versions I had courses criss-crossing over each other, random gaps, overlapping

dapper jay
#

i tried loading the mach loop 😭

#

missing faces!!

warm canopy
shadow iris
dapper jay
#

guys i still have 2 days

cinder spruce
paper bone
warm canopy
#

Very close

cinder spruce
dapper jay
#

no way

cinder spruce
#

such a hard fix

#

totally didnt just flip the normals

dapper jay
#

oh lol

#

i should come up with a cool idea and make it until the deadline tomorrow

dapper jay
#

OH I HAVE AN IDEA

topaz arrow
dapper jay
#

something... cool...

cinder spruce
dapper jay
#

its pretty simple tbf

#

it needs more scripting than mapping really

dapper jay
#

idk if this would really count as a map though

#

maybe if i made a skybox for it

shadow iris
#

job well done

#

hmm uses apng for tht

dapper jay
#

it looks very bad

cinder spruce
#

show

dapper jay
cinder spruce
#

might wanna change the tod

dapper jay
shadow iris
# dapper jay lol

try putting it really really close to the pillars so the shadows are minimized

dapper jay
#

its weird how the shadow makes it seem like there are holes in the model, even though there arent

cinder spruce
#

is he based off a rigidbody or what?

dapper jay
#

it does use a rigidbody but only for the faster refresh rate lol

#

i just set its position and everything

open acorn
dapper jay
#

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 😭

dapper jay
#

question, can the game not parse this?

#

because i just keep getting this

topaz arrow
# dapper jay question, can the game not parse this?

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)

radiant lion
#

Isn't that a problem with reading the file tho? I'd expect the JSON conversion to be done after

dapper jay
#

it seems to be a problem with tm.os.ReadAllText_Dynamic

#

but i have no idea why it wouldnt work

radiant lion
#

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

dapper jay
#

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)

gusty scroll
#

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

topaz arrow
devout umbra
#

Does anyone know where the file that controls the colour of damage is found?

near parcel
#

you can't change the color of damage

ionic jacinth
#

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...

ionic jacinth
#

Another thing that feels incomplete, is the subtle message update functions; you can update the header and text, but not the icon.

cinder spruce
#

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

warm canopy
#

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

cinder spruce
#

i also just put dynamite into the tower so it was basically guaranteed to get destroyed with rockets in 1 hit

cinder spruce
#

ur just too good

regal bear
#

@warm canopy absolutely stunning map/mod man! ||Congrats on the win you totally deserved it!||

shadow iris
#

i am very confused

#

||rianlesski behavior when he doesnt get what he wants (winning)||

regal bear
#

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 🤓

open acorn
topaz arrow
#

can someone explain how the ModBlock.addTorque() works? what are the X, Y and Z values?

ionic jacinth
#

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?

open acorn
ionic jacinth
#

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.

dapper jay
#

someone should make webfishing mod

primal salmon
#

what are the other map making mods again? I'm looking for the one that spawns stuff into the game

hoary skiff
#

I noticed Exocross map is not on the workshop anymore, it was my favourite map, any know reason why it was deleted?

cinder spruce
#

theres likely some others too that you can look on the workshop for

open acorn
shadow iris
#

and most of all, (insert prefix) trail

ionic jacinth
#

Made in Heaven!

loud slate
#

Does anyone know where Trailmakers saves it's username?

near parcel
#

elaborate

#

that has nothing to do with mods

loud slate
#

I know that it saves it in here C:\Users\<user>\AppData\LocalLow\Flashbulb\Trailmakers\BackendProfile but that isn't the only place

loud slate
#

Communication between python and lua

near parcel
#

again, it doesn't. Mods never interact with that

loud slate
#

Yea mods don't but the Python side would write a suffix that has the player's steamID there

near parcel
#

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

loud slate
#

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.

near parcel
#

no

loud slate
#

Not even externally?

near parcel
#

no. You can only change it in game

loud slate
#

Aw man :(

near parcel
#

and changing player's usernames is a bad idea anyways, it's terrible for UX

loud slate
#

I thought of using invisible spaces as the distinct characters

#

(Already made that)

radiant lion
#

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

near parcel
#

(not the same directory, but to a different one for dynamic data)

radiant lion
#

||ye, I kinda forgot to mention any directory before saying "said"||

loud slate
#

I uploaded the mod to workshop for myself and it worked

#

It's just not in the same mods folder that it writes to

near parcel
loud slate
#

yea meant the userdata

#

which python can access

near parcel
#

then just use that instead of the username

loud slate
#

yea but this was for the distinguishing of clients connecting to the host if they are using the plugin

near parcel
#

just use their userid/username from the mod's side

loud slate
#

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

radiant lion
#

Ignore edge cases

near parcel
#

^it will basically never happen in practice

loud slate
#

ill ignore edge cases for now

ionic jacinth
#

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.

dapper jay
#

there used to be bullet prefabs but apparently they spammed errors in the unity editor so the devs just snapped them out of existence 🫠

ionic jacinth
#

I hope they oneday take another crack at getting it implemented somehow...

loud slate
# radiant lion Ignore edge cases

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

loud slate
#

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.

loud slate
#

Oops well not quite yet (still some bugs). Well now everything works

errant dew
#

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?

open acorn
# errant dew This is kind of moding in a way does anyone know how the blueprints pngs store t...

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

errant dew
near parcel
#

Editing actual creation data isn't possible though, that's stored as compressed binary data and basically any change will corrupt the blueprint

worldly ice
#

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

worldly ice
#

this guy was the problem.
thank you noiro for helps

shadow iris
#

we need gridicolas to appear for 1 day to fix purple space chirp

open acorn
cinder spruce
#

is ModBlock.SetHealth() still broken?

shadow iris
#

if it was fixed people would probably be raving about it in here

cinder spruce
shadow iris
#

i think its broken in general

cinder spruce
#

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"

open acorn
# open acorn yes and yes they store their data via encoding values into the r g b of transpar...

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

near parcel
#

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

open acorn
near parcel
#

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)

open acorn
#

true, it didn't mention completely parsing it

open acorn
#

someone should make a tm mod with the api

cinder spruce
cinder spruce
open acorn
#

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...

cinder spruce
#

although that mod is basically gonna do nothing at all

near parcel
cinder spruce
#

oh dear bout to get vibecheck’d

#

though it was only conspiracy, didnt actually do it (and i dont even know how to)

devout umbra
#

anyone know where the default block style is found in the files

near parcel
#

why?

devout umbra
#

just curious i want to see how it changes

near parcel
#

you can't change it

devout umbra
#

where is it saved though

#

if i were to change it manually

#

just for a test

near parcel
#

compiled with the game. You can't change it

loud slate
near parcel
#

that's only the user default, which you can just change in game. You can't change the actual files

loud slate
near parcel
#

i am too

dapper jay
loud slate
#

Oh okay

#

nvm then

devout umbra
#

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

paper bone
scenic echo
#

is there a way to have mods on campaign maps like airborn and stranded?

cinder spruce
scenic echo
#

unfortunate, i wanted to make a hard mode of the airborn campaign

open acorn
scenic echo
#

Can you ban/unban blocks with mods?

cinder spruce
#

dont think so but noiro was coming up with a way to do it for a certain campaign map he is making

open acorn
cinder spruce
open acorn
scenic echo
#

Did you get any powercores from quests in the airborn campaign?

open acorn
ionic jacinth
#

Have we had any confimations of modding api changes/additions in either 1.9.5 or 2.0?

scenic echo
#

if i wanted to store a block and it's position in a table, how would i do that?

near parcel
#

get the block->get its position->store references in a table however you want. What's the problem?

scenic echo
#

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

near parcel
#

that depends completely on your usecase and what information exactly you want to store

near parcel
scenic echo
dapper jay
#

somewhat related: could blocks get an id property?

#

would make storing info for blocks a lot easier

radiant lion
#

It sure would be an easier way to check if the selected block changed

median cobalt
#

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

near parcel
near parcel
hoary skiff
#

effeciency

near parcel
#

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

hoary skiff
#

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

near parcel
#

that also adds a lot of complexity to mods for when things are run/avoiding race conditions

hoary skiff
#

ofc

errant dew
#

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.

open acorn
#

not with mods, with external stuff (it being illegal though) yes

errant dew
novel cargo
cinder spruce
#

somehow kept trying to grab the position of the block even though it was destroyed

hoary skiff
#

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

open acorn
median cobalt
#

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

median cobalt
#

Shut up dyno

#

Gotta post an image of what i wanted to say, hold on , 4 lines of code is too much for dyno

#

SadDog (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

hoary skiff
#

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

near parcel
hoary skiff
#

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

near parcel
#

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

hoary skiff
#

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

near parcel
#

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

hoary skiff
#

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

dry sentinel
#

I’m studying computer science atm, and you seem stupidly (in a good way) well versed in a lot of areas

near parcel
near parcel
hoary skiff
#

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

near parcel
#

unless the game tries to write a huge file at once (>4KB), all file operations should be atomic

hoary skiff
#

that's fair enough, but personally I don't really think the added complexity is worth it

near parcel
#

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

hoary skiff
#

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

novel cargo
#

@tired hound in here :)

tired hound
#

thx

#

anyone know how to upload mods?

novel cargo
#

(a map made with Trailmappers btw)

near parcel
#

trailmappers->export map
in game->upload mod->set name/description->set mod location to mods/<map name>

tired hound
#

i got it lol

primal raven
#

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
}

near parcel
#

If you open the workspace settings through the gui version, does it show the settings there?

near parcel
#

Do you get autocompletions if you delete the default documentation file?

primal raven
#

doesnt seem like it

near parcel
#

I'm not at home atm to check, i can check the setup i had tonight

strange kraken
#

Is it possible to get the creation (the seat) that the player is in?

radiant lion
#

tm.players.GetPlayerSeatBlock(playerId)

strange kraken
#

oh, thank you!

strange kraken
radiant lion
#

ModBlock

strange kraken
#

ok, thanks

strange kraken
#

how can i get the "modder" role so i can post in the suggestions channel?

strange kraken
open acorn
strange kraken
#

alr, thx

open acorn
#

or you could ping one when they're online

radiant lion
#

Definitely not right now, it's midnight for them

near parcel
#

also you need to show that you are a modder

strange kraken
#

is it possible to directly set the position of a structure?

near parcel
#

Iirc only on first spawn. You could dispawn it and spawn a new one though

strange kraken
#

But it can cause a sonic boom if teleporting too far

near parcel
#

Because you aren't setting the position, you are moving the creation. The further the target is, the faster it will have to move

strange kraken
#

like disabling the physics for a single frame, moving the structure and enabling it back

cinder spruce
strange kraken
radiant lion
strange kraken
radiant lion
#

Depends

#

With quarternions it should be quite simple

strange kraken
#

can i even add torque to a structure??

#

doesn't seem like it

radiant lion
#

I thought so

#

Else you'll just have to apply it to a block and hope it's on the main part

strange kraken
#

oh come on, now my game crashes onle i load my mod

strange kraken
#

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)

radiant lion
#

Checking the names

strange kraken
#

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)

radiant lion
#

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

strange kraken
radiant lion
#

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

shadow iris
#

how feasible would it be to make raft in trailmakers; i call it raftmakers

#

garr how am i gonna make them float

#

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

shadow iris
#

could also:

  • automatically delete buoyant player-created blocks
    then,
  • have players scavenge for barrels and build off stuff floating on barrels
shadow iris
paper bone
open acorn
strange kraken
shadow iris
#

and what about if the barrels, which already slide out from under creations, are getting force while supporting something?

paper bone
#

try it

shadow iris
#

having the halfpipe, the scaffolding structure, and all of the billboards as prefabs would be cool

cinder spruce
#

will there ever be options for fog? either in the vanilla game or through mods
its really annoying on making large scale maps