#General modding chat

1 messages · Page 4 of 1

shadow iris
#

ty ❤️

#

most useful and straight to the point tutorial on the internet

reef musk
#

Pressing A selects all btw

open acorn
#

data_dynamic for people that download the mod from the workshop is saved in the userdata section of steam, however the file directories for file loading is relative to the mod folder, and seeing as we cannot go back in folders, it makes this not possible

#

tm.physics.AddMeshDynamic(path, id) when?

buoyant cave
#

Could anyone help me with the creation of a race track?

#

or could someone please assist me with how to export trackmaker mod to trailmappers?

shadow iris
#

the extra scripts and stuff won't be there but the actual track maybe possible

buoyant cave
#

what da heck

radiant lion
#

You can't import the track (it's something I should have done a while ago) but you can load both a map and tracks with this #modding-archive message

#

It should still work

buoyant cave
regal bear
# buoyant cave how do i access the save file for the track?

Mod save files are buried deep within your Steam Installation. Eg, for Jess' Trackmaker:
C:\Program Files (x86)\Steam\userdata\[your usercode]\585420\remote\Mods\2509484109\data_dynamic\Saves
You can search your C: drive using the mod code 2509484109 and Windows will eventually find it.

[your usercode] = a unique number code that Steam assigns to you eg. 87654321 (not the same as your Steam ID)
585420 = the Trailmakers Steam code
2509484109 = Trackmaker Steam Workshop code

I've asked the Devs to please provide a button in TM so that players can easily find these save files. Still hoping but it's been a while.

grave trellis
#

Hi, im sure poeple ask this all the time but besides Trailmappers links i have not found many answers yet or just don't know how to look for them properly so i'll try my luck here: how do poeple make custom maps? Theres maps with water and everything on the workshop, that look like they're made on a custom map foundation, or by altering the official maps and i would realy like to learn how to do that.

near parcel
#

all maps are made by spawning assets on normal maps. Trailmappers is the easiest way to do that (it's a separate program that generates all the files required to spawn the objects in the game)

grave trellis
#

Ty, now i know what i need to look for to get started. mikkel

solemn sinew
#

how do i make mods?

radiant lion
#

Could you be a bit more specific?

#

For now I can tell you that you gotta use Lua to make your mod, the default ones are good examples, you can find the mod directory directly from the in-game mod menu

formal crane
ionic jacinth
#

Is there a way to find the vector of which direction a player's camera is facing?

#

Nvm its been requested in vote-modding features 😦

hoary skiff
#

I've been making mods with typescript sungals

#

you might have to f||Duck||k with it a little to make it work it's a little finicky

radiant lion
hoary skiff
#

if you don't know how to code why start with a worse language

#

also yeah you should use lua this isn't polished enough yet

radiant lion
hoary skiff
#

knowing typescript would definitely be more useful to most people than lua because of all of the web dev it would let you do

#

also yeah I have been trying to make it easier to just start using

radiant lion
hoary skiff
#

ew

radiant lion
#

Or php like cool people

hoary skiff
#

ewer

radiant lion
#

Or python like lame people

#

(don't)

hoary skiff
#

I did not understand why anybody would use typescript but now every time I have to use js I just end up adding types to make it easier to work with

#

if you have a big enough codebase you will make bugs that would have been caught if you used typescript

radiant lion
#

Well, I can't deny that, especially since I lack the experience

hoary skiff
#

you should try typescript some time it's fun

radiant lion
#

Nah, I have some php code injection to do

hoary skiff
#

fair enough

near parcel
# hoary skiff if you don't know how to code why start with a worse language

Lua is easier to learn than typescript, and isn't worse. It also requires less setup since it's directly supported (and you don't need to worry about transpilation, which could have it's own errors and make debugging harder as you might only get the error location in the transpiled lua code which you would need to be able to read anyways)

hoary skiff
#

but also lua is definitely a worse language, I'm not saying ts is good, but lua is worse

#

array indexing literally starts at 1

formal crane
#

already had this chat before 😉

radiant lion
#

That ain't a good reason to say it's bad

hoary skiff
#

every other language does it from zero, doing it from one just causes bugs when you forget

radiant lion
#

Skill issue

hoary skiff
#

you seem like the kind of person who would say "why use rust? just don't write memory unsafe code"

radiant lion
#

Just don't use other languages and you won't forget

formal crane
#

if you'll going into general discussion about whether lua, ts or whatever else is least bad, then please take it to #off-topic

hoary skiff
#

sorry sorry

radiant lion
#

Time to move

near parcel
# hoary skiff I believe there is a compilation setting in ts2lua that overwrites the error cod...

errors messages are generated by the game with all the relevant information as a single string, so you would need to manually parse that to get the line/column number and then use a mapping between the code in the 2 languages. You can't overwrite the error message generation function as that's inside of the game rather than on the lua side. That doesn't solve the problem of errors in one language making no sense in another though, you would need a complex mapping for that or knowing the language the game is executing and how the transpilation is changing things to be able to understand the error directly. If you know what you are doing, it can be done, but you are adding more moving parts that can fail and you need to understand

hoary skiff
#

seems like a problem with the game then, it should be an actual normal error message

near parcel
#

it's not though, having error messages as strings is normal. Even if it was a struct with the column/line/message fields (which wouldn't be that hard to parse anyways), that wouldn't solve the bigger problem of translating error messages across languages

hoary skiff
#

it doesn't need to translate any error messages, just the line numbers

near parcel
#

then you potentially get errors that don't make sense, because they will be about the lua code that's being executed rather than your original code. Unless the only difference between the languages is syntax or you implement a full interpreter in the target language, you will always have to deal with that and by extension be able to understand what code is actually being executed

hoary skiff
near parcel
#

the debug module as a whole is disabled in the sandboxing

hoary skiff
#

and yes, it is a syntax difference

#

there are some slightly different things like es functions that compile down to lua ones, but generally the output lua code looks like the input ts code

near parcel
#

i know there is a syntax difference, my point was that that would need to be the only difference. Any semantic differences in the languages throw a wrench at the error message conversion

hoary skiff
#

the semantic differences are documented in the the ts2lua docs, like what values are truthy and falsy, and how undefined just compiles to nil

near parcel
#

then there are in fact extra semantic differences you need to know when using it. My point isn't that it can't be done, it's that for a newcomer interested in tm modding it's just easier to go with the officially supported language (lua) as there are less things you need to learn/know/remember

hoary skiff
#

I already said that

near parcel
#

sorry, didn't saw that

hoary skiff
#

I use it because I understand how it works and how to get around its problems, other people can if they are willing to do that too

#

my goal is to make it as easy as possible to use typescript to make mods, right now that is not the case

regal bear
#

Track Creator Plus mod Drift Mode vid posted here: #1242291936715608205 message

regal bear
#

Can anyone tell me the mod api name for the Airborne map?

open acorn
regal bear
regal bear
#

The new version of the Track Creator Plus mod is now live on Steam. If anyone gives it a go please let me know of any bugs or issues (in the TCP mod thread).

open acorn
#

chirpowow power core crates look like very nice as glass

open acorn
#

I love how sometimes when using concave meshes the wheels on one's car straight up decides to become hover wheels

scenic echo
#

how can i spawn a explosion with a specific size?

open acorn
scenic echo
#

thanks

radiant lion
#

I am quite sure you can't scale explosions, just use the different sizes

open acorn
scenic echo
#

why does the "failed to call update" error usually appear?

radiant lion
#

That means that something in your update function (or a function called in the update) is giving issues

scenic echo
#

Is ModBlock.GetStartHealth() broken and is there a way to see if it is?

radiant lion
#

I guess make a little test mod to see if it works, just something that with a button grabs the blocks and prints the values

scenic echo
#

Found out that the 1x2 block and many other blocks have different health than what ModBlock.GetStartHealth() shows, for example the 1x2 has 175 hp but the ModBlock.GetStartHealth() function says it has 400 hp

dapper jay
#

i love health so much

open acorn
#

very healthy

regal bear
#

Some blocks must be eating too much processed food

open acorn
#

done some testing and it seems the blast radius of "PFB_Explosion_SeatDeath" at scale 1 is around 48 blocks (could be off by about 5 idk)

open acorn
#

SeatLock

forest dome
#

does anyone know whats up with the lack of weapon based attributes

#

?

radiant lion
#

There are simply better things to be added (getColor was a godsend)

hoary skiff
open acorn
#

Holy macaroni, you actually wrote a tm mod in a seperate language to lua?

#

impressive

#

(even if typescript isn't as flexible)

hoary skiff
#

for this, typescript is working just as well as lua, just with a syntax I prefer and static typing

open acorn
hoary skiff
#

uh

#

that's... strange?

#

let me try and fix it

#

try now

#

yeah I have no clue why it didn't upload any files the first time lmao

open acorn
#

sometimes steam workshop has servers lagging on their end, steam's not perfect, but it's pretty good

open acorn
hoary skiff
#

you might have to remove and re download it

#

if it still doesn't work it probably like hasn't updated or something

open acorn
#

it doesn't say you updated it, to update it go into the workshop ingame > "my uploads" > your mod > "edit mod"

hoary skiff
#

done, steam is waiting to analyze it

#

yeah, for some reason editing the existing one doesn't work, I had to upload a new one

#

but that one seems to have worked

#

wait... it still didn't?

#

f||🦆||k it

#

(not a zip bomb I promise)

open acorn
#

all this work just to change the time of day every few seconds
+respect

open acorn
hoary skiff
#

there's a little more than just the time of day mod

#

I have some ui classes

#

and a random id generator

#

this is the ts code for a very simple version with no ui or anything

const DAY_LENGTH = 480;
let time = 240;

function update() {
        const delta = tm.os.GetModDeltaTime();

        time = (time + delta) % DAY_LENGTH;

        tm.world.SetTimeOfDay((time / DAY_LENGTH) * 100);
}
hoary skiff
#

anybody want some classes that represent ui elements on screen?

#

they automatically generate their own unique id and you interact with them as a class instance as opposed to via an id you give them

hoary skiff
#

This should contain everything you need to create a mod with typescript

shadow iris
scenic echo
#

What does tm.os.SetModTargetDeltaTime(targetDeltaTime) do and how do i use it?

radiant lion
#

You set it to something like 1/60 and that's how often the update function gets called (in that case 60 times a second)

scenic echo
#

so it needs to be tm.os.SetModTargetDeltaTime(1/60)

radiant lion
#

Yes, if you want it to update 60 times a second (you can do it slower, like 1/30), but you can't do it faster

scenic echo
#

Thanks

scenic echo
#

how do you give the mod menu only to the host?

near parcel
#

only load it for player id 0

scenic echo
#

Thanks

hoary skiff
#

working with a class that represents a UI label feels so much nicer than having to use an ID to interact with one

hoary skiff
hoary skiff
#

published that to npm and now it's as simple as installing it and I can easily make different pages of ui

hoary skiff
#

wait I still don't have the modder role

#

i have now published a mod to the workshop someone give me that I'm special

hoary skiff
hoary skiff
#

I'm doing it I'm making a workflow to automatically upload mods to the workshop

#

github actions I love you

#

and steamcmd

#

should be possible to do everything without ever needing to upload from in-game

hoary skiff
hoary skiff
#

@near parcel could I have the modder role, I'd like to be able to post in vote-modding-features

open acorn
#

average trailmakers mesh shenanigans

hoary skiff
#

what the hell

#

time to write react but for trailmakers sungals

#

not really react, I hate the architecture of react

#

but a reactive ui library

hoary skiff
split skiff
#

Guys, I downloaded a map for Trailmakers on the internet, and I don't know how to put it in the game, I don't use Steam Workshop because I don't have it in the stem

dry sentinel
#

If you downloaded something you don't understand, delete it now; could easily be malware

split skiff
#

I downloaded it from a trustworthy website that I always use, and it doesn't have malware

dry sentinel
#

It's clearly not that trustworthy, considering the only official distrubtion for maps is through steam

split skiff
paper bone
dry sentinel
#

Thank you, was just about to send this 😆 #newcomers message; basically, if you're looking where to drop a bunch of files that aren't .lua right now on your pc, there's a chance its malware

near parcel
scenic echo
#

how can you get the number of players in a server?

near parcel
#

#tm.players.CurrentPlayers()

regal bear
#

I'm having problems with "RegisterMouseDownPositionCallback" and custom meshes.

It seems that MouseDownPosition (along with the player's footsteps and the jetpack particles) doesn't respect the concave hull collision. In fact these things seem to use a convex hull for collision. Yet raycasts and other object collisions seem to respect the concave hull.

The attached pic shows objects spawned by mouse clicking the surface of a large custom terrain object. They form a line at the same height which points across to the distant high point, even though the terrain curves down at the points that they were spawned.

Devs, is this something that can be fixed? I really hope so, otherwise I'll have to completely redesign my track editor so that custom terrain works with it 😬

open acorn
regal bear
cinder spruce
#

im making a large desert map for flying, and i have 2 airfields on opposite sides of the map. is there a way i cant have 2 spawnpoints for players to spawn or at least a way to teleport them from one to the other

near parcel
#

I looked into it a while ago, but afaik steamcmd can't delete workshop uploads

open acorn
cinder spruce
open acorn
cinder spruce
#

how to make a plane:

  1. fuselage
  2. thrusters
  3. wings
  4. tail

5 seems a lot easier

open acorn
#

just landing gear?

cinder spruce
#

found an odd bug
if you load a overcomplex build in the builder then a mod is turned on with a custom spawnpoint, it will automatically spawn you with the overcomplex creation at the spawnpoint

open acorn
cinder spruce
#

mmm backspace

open acorn
#

managed to make it to where I can click on a block and directly track it rather than tracking the closest to the click position on the ground

open acorn
# cinder spruce what the vr mod

nah pretty much just detecting the click position, sending a raycast in that direction (to detect structures and concave collision), and having hand models rotate toward it if it's not near a block, however if it is, still rotate toward it, but instead the block, and apply velocity to the block to attract it toward the hands

#

an earlier version of it is currently on the workshop, however there's a few bugs that I'm fixing

radiant lion
#

Tm gravity gun

shadow iris
radiant lion
#

Not in a clean way, you could check the nearest detached and destroy it, but it won't always work

cinder spruce
#

6 am moment

radiant lion
#

Eh, I woke up

open acorn
open acorn
#

I forgot if this is local or global, I hope it's global, however it shouldn't be too hard to adapt what I'm doing to make it local

radiant lion
#

It's global btw

regal bear
#

Frans - please don't delete the original #modding-archive channel. Some form of accessible archive for it would be much appreciated.

open acorn
#

🤔 there is quite a lot in #modding-archive that does deserve to stay, I definitely agree

formal crane
radiant lion
#

I check it once in a while when I question the quaternions

#

But i'm also not sure how easy it is to migrate without losing some random possibly important thing

formal crane
#

Maybe just as a future not, see if you could post the info here. Then I (and maybe someone else) wouldn't mind moving that to the wiki somehow 🙂

But nice to hear the channel is useful. I was under the impression that it was getting a little outdated at this point / information had now been reshared here.

EDIT: Just to clarify, won't delete it 🙂

paper bone
regal bear
cinder spruce
#

quick question does anyone know what the size of the world in meters?

regal bear
#

Which world? Planet Earth? One of the maps in TM? World of Tanks? 😛

cinder spruce
#

tm map

#

im trying to get a heightmap of a place in the irl world and i want it to be the same scale as the game

regal bear
#

I think there is some variation in the limits of the TM maps. Eg Space Sector is much bigger than any other map. For scale, I ~think~ the player character might be 1m tall? Could be wrong.

cinder spruce
#

player is 1.25m tall, based of what the distance sensor says, 1m = 4 blocks

#

i was hoping someone measured it with the in game with the player distance

regal bear
#

You could try making a track with my TCP mod and go dead straight across Test Zone. It gives an approximate track length in metres - but I happen to know it's not super accurate with that 😬

open acorn
open acorn
cinder spruce
#

or just have a friend go to the opposite corner of the world and square that value

#

but i dont have a friends

#

wait no dont square

#

i forgot hwo to geometry

#

x sqrt(2) = one side length

cinder spruce
#

or dont make it complciated and go to adjacent corners

#

what 1 am does to me

open acorn
# cinder spruce tm map

about 15000 x/z on test zone and what appears to be around 7200 metres from the ground (ground is at 300 y level)

cinder spruce
#

found a friend

open acorn
#

too bad you already get measurements

cinder spruce
#

21212 opposite corners on test zone

#

darn was same number

#

actual it was 14999x14999

open acorn
formal crane
#

WLD_TestZone Test Zone
Width 15000
Height 15000

WLD_AirborneIsland Airborne
Width 15000
Height 15000

WLD_Exploration Stranded
Width 4000
Height 4000

WLD_HighSeas High Seas
Width 5000
Height 5000

WLD_KingOfTheHill Dethrone
Width 1100
Height 1200 😢

WLD_RaceIsland Race Island
Width 4000
Height 4000

WLD_Sandbox Treasure Island
Width 2500
Height 2500

WLD_StuntIsland Danger Zone
Width 4000
Height 4000

WLD_TheMoon Space Sector
Width 25000
Height 25000

These numbers might also be completely wrong -- I remember some discussions ago that we did have maybe 2 systems for world boundaries and I am not really familiar with either of them.

Also this is on Unity X and Z axis. I didn't look up the Y (height).

cinder spruce
#

yea so i was testing a map sized directly to the border on test zone; on dethrone it was still the same sized border

regal bear
full grove
#

will these mods be available on the microsoft/xbox edition?

radiant lion
#

Here you can read why they likely won't

#

Not soon at least

paper bone
#

what kind of message id is expected to remove Subtle Messages?
it doesnt seem to be this

#

oh i see the issue

paper bone
#

Custom Model wont load correctly.

it just spawns a White Cube in its place with the correct Rotation, any ideas?
i checked other mods but couldnt find what they were doing different

near parcel
#

are you loading the mesh first?

paper bone
#

no, i have to do that?

radiant lion
#

Yes

near parcel
#

you need to call tm.physics.AddMesh(filename, resourceName) once to load the mesh

paper bone
#

ok Thank you

#

nice it works

elder zinc
#

so my friend has got to my build and got my modded build on HIS nick name on my build id 3281870343

#

on workshop

#

pls fix that]

#

mine build

paper bone
#

#workshop-reports if you want to report a stolen build, keep in mind that you can only report builds that you have uploaded before they did.

paper bone
#

how can i spawn a beacon that is only visible to a certain player?

elder zinc
#

nah i dont upload

near parcel
paper bone
hoary skiff
#

y'alls opinion on this api?

uneven oyster
#

can someone show how to get started with a mod

#

like how to make the project or what not

reef notch
#

uhmm I dont know where else I can ask this but, in trailmappers can I copy paste a model from a diff map to an existing one?

formal crane
open acorn
#

what happened to the #1126842222898315274-faq channel?

#

just curious

formal crane
#

I might misremember, but I think all (up to date) material got moved to the wiki.

open acorn
#

ah

open acorn
#

yes that is possible

#

to my knowledge

reef notch
open acorn
reef notch
#

im afraid that im using the term models wrong, I just meant copy pasting objects to another

#

for example I just want to copy paste this animal friendly contraption on another map

#

with the same scale and placement

open acorn
#

I honestly don't know how the maps are saved while using trailmappers, so maybe there's a way to do it there aswell

paper bone
paper bone
reef notch
#

I see thanks for the help! 👍

open acorn
#

oh, that seems simple enough, just finding the right set of objects and pasting it into the other map, then reloading the software

paper bone
#

just have to identify the models you want to copy

reef notch
#

Ooh that could work too

regal bear
#

If you use a tool that formats a JSON file it's easier to find stuff in the map file. Eg in Notepad++ there's a plugin called JSON Viewer which can format the file. It can also 'un-format' (compress) it again.

reef notch
near parcel
reef notch
# reef notch 🙃

This worked better for me since I have to do it to multiple things rather than manually doing it in trailmappers

#

Also sorry bout the confusion before

paper bone
#

is it currently possible to spawn a arrow like this for a player?

formal crane
paper bone
#

would be cool to have a function to display a arrow like this that points at a Position Vector you supply it with

formal crane
#

You can do a real nitty gritty one thats is spawned above the player structure using a custom mesh. Everyone would be able to see it though

cinder spruce
#

i have a problem where if an aircraft with a large amount of weld groups is moving at a high speed and is a far distance away from a player (a player in cinematic cam recording it) it does some funky things and looks bad. the only way to fix that is for the player position to be close to the plane. is there a way for player to be invisible so i can move the player near the plane while being in the cinematic camera?https://cdn.discordapp.com/attachments/1252048392612216883/1259029022407524413/2023-12-21_16-04-24.mov?ex=668a31a6&is=6688e026&hm=e026be3552aa200bf2bbd935e3ecf1f95f8eb30550ea12099ce0a6043ac44157&

#

i kinda need this since im making a short film on this

#

(oh yea that footage was taken before the cinematic cam before and used custom missile mod with a camera to look at the target)

formal crane
#

Interesting problem; My gut feeling says that teleporting the player near the player shouldn't be interfering with the cinematic camera, but completely untested.
So worst case you could find spots to "hide" the player. I am not sure if anything exist out there for this problem at the moment though.

cinder spruce
#

it isnt that it is interfering with the camera, its just that i need the player in the camera to be in close proximity to the person flying without being visible on screen. im guessing this is caused by some sort of LOD system. having a second seat on the plane does work and fix the problem, but its hard to fit another seat onto 13 total very complex aircraft with very limited space

formal crane
#

I did understand that 🙂
I am just not sure if you can teleport the player closer to the plane so this doesn't happen WHILE the cinematic camera is active for said player
And whether teleporting the player would break the cinematic camera for the player.

cinder spruce
#

i could test this but if the player is in first person would it keep them invisible in cinematic cam?

formal crane
#

snip.
misunderstood

#

I think it might. But maybe the airplane is close enough to something where you could just hide the player behind such that it is not visible to the camera?

#

I believe we have explictally always made sure to show the player when in cinamtic camera, also if you start in first-person camera.
I at least remember this being reported and fixed as a bug before it was released.

#

Alternative, teleport the player behind the plane from the persepective of the camera... Hopefully the plane is big enough to hide the player :p

cinder spruce
#

hmmm

#

is it possible to access the cinematic cam position and rotation?

#

also most the planes should be big enough

formal crane
#

No. But it looked like the position was fixed no? And you don't need the rotation. Just need to draw a line from the camera towards the planes position.

cinder spruce
#

yes i guess, but wouldnt you need to input the position of the camera every time you want to make small adjustments?

formal crane
#

Yes. I am just trying to work with the limitations. I can't come up with any other solution at the moment

#

If it is small adjustment and at long distance then I think your adjustment margin is alright.

cinder spruce
#

well i hope i can solve this problem soon but shouldnt be too big of an issue right now

formal crane
#

Alternative just teleport the player above/below the plane and fix it in post 🤷

#

Maybe johannes and the marketing team has some solution to the problem of jittering of far objects that I am not aware of.
Most of the team is on vacation the next 2 weeks mind you.

uneven oyster
#

didnt expect it to be lua

dapper jay
radiant lion
paper bone
#

is there a way to create an object with the name of a variable.
for example if i want to spawn a CustomObject that "belongs" to a certain player, can i name it something like "object_playerId" ?

near parcel
#

there is no good reason to do that, just store the spawned object reference in a table with a key for each player

paper bone
#

alr thanks

paper bone
#

does anyone have an idea what the problem here might be?

near parcel
#

what's at line 54 and 55?

paper bone
#

the playerData.cargoHandling = ....

near parcel
#

you are passing a function to tm.vector.Distance

paper bone
#

do i have to save the vector first?

near parcel
#

and trying to index the GetTransform function

near parcel
paper bone
#

i dont think i can quite follow you, how would that look like?

near parcel
#

add () after the function names

#

like in the first line

paper bone
#

ah ok yeah makes sense

hoary skiff
paper bone
#

why does it have problems with a null value?

near parcel
#

are you initializing all varaibles/table fields?

paper bone
near parcel
#

cargohandlingp isn't initialized there

paper bone
#

doesnt it use 0 when there is no value at that position?

dapper jay
#

no lol

near parcel
#

no, it uses nil

paper bone
#

aw

#

so do i just use a or there then

near parcel
#

just initialize the field before trying to read it

dapper jay
#

whats this mod going to be?

paper bone
#

about Transporting different cargo around a map by land

#

and doing so in as little time as possible while also being gentle with the cargo

dapper jay
#

Ah cool

radiant lion
#

Can't check the logs rn, anyone know if you can do controller presses other than keyboard ones

#

If not then if there is any way to detect a repair that's not just checking for an r press

open acorn
open acorn
regal bear
radiant lion
radiant lion
regal bear
radiant lion
#

Ye, stuff like that and controller binds should have been asked a while ago

regal bear
#

Isn't there an old list of modder requests somewhere?

radiant lion
#

Yeah, but quite sure they ain't in there

regal bear
#

Damn. I guess they got lost in translation. Are you going to make those requests now?

radiant lion
#

I don't have a reason not to

#

Just need to find the channel

formal crane
#

#1123915629653667943

regal bear
# formal crane <#1123915629653667943>

Hey Frans - what about posting your list somewhere so that we can see what's already been requested? Might save you some extra hassle reading through repeat requests?

formal crane
#

Hi! What do you mean "your list"?
All the posts in there are intended as "the list". Every entry is a suggestion

#

The intention is that we delete the post or mark them as "implemented" if it has happened

regal bear
radiant lion
#

There should be a pdf somewhere

#

I'd say look for terror's messages with a file attached

formal crane
#

I think we had 1-2 internal "passes" on fixing things in that document (and a I believe another one? it is a while ago).

It was hard to answer to specific points and request previously, so that's why we moved to a thread based solution where we could discuss and implement certain features 🙂

At this point, I would say, create a new thread for specific things you want to see as it is -- this is pretty much the place we go to when we looking to add more modding functionality.

warm canopy
#

Looking forward to more modding functionality 🙏

warm canopy
#

I recall Simon did also have a list a long long time ago, I think the pdf I made had some of the suggestions from that original list

uneven oyster
#

wait does lua not support object oriented code?

#

if not...

#

😢

radiant lion
#

You can

uneven oyster
#

HOW

#

are there classes?

radiant lion
#

Tables also act as classes

uneven oyster
#

ok

#

ill learn thos

#

im new to lua

#

(coming from C#)

radiant lion
#

Basically here you only have tables that act as arrays, dictionaries, classes...

uneven oyster
#

why do we make mods in lua?

radiant lion
#

Easy to implement/learn, interpreter is real portable, fast

uneven oyster
#

also makes my life harder

radiant lion
#

I mean, they can't possibly add support for all languages

#

Someone will have to suffer

uneven oyster
#

i meant they could've just gone with C#

#

like unity

radiant lion
#

So gorilla tag mods are in c#?

#

(spied your profile)

uneven oyster
#

i dont like to talk about my old modding history

#

but all of unity is just C#

radiant lion
#

It says "if you have any questions I'll answer"

uneven oyster
#

😐

radiant lion
#

And c# is annoying cause compiled

uneven oyster
radiant lion
#

Reasonable

uneven oyster
#

and im not trying to start a fight here but in my opinion i think object oriented code is pretty easy

radiant lion
#

There's nothing stopping you from doing it in lua

radiant lion
#

It just also has a bunch more options

uneven oyster
near parcel
uneven oyster
near parcel
#

and much harder to embed into another program

radiant lion
#

Options are expensive in developer terms

uneven oyster
#

yea

#

also does anyone know the firerate of a minigun

#

preferably rpm

uneven oyster
#

so i cant change the fire rate of guns

#

but you can change the power of engines?

near parcel
#

correct

radiant lion
#

Yep

#

But you might be able to spawn bullets

uneven oyster
#

huh

#

it said i spammed

#

stupid dyno

#

you prob know this but anyone know how to make a delay

hoary skiff
#

so why exactly do the methods for getting keyboard input take in a string with the name of a global function as an argument?

#

instead of just a function?

near parcel
#

probably because they were among the first to be implemented and the devs didn't know you could just pass functions as arguments, i suggested changing it a while back (https://discord.com/channels/296562030624899072/1134472573380468848) but i don't know how hard it would be to change without breaking older mods (easiest way would be with a new function, not sure how hard overloading the current one would be)

hoary skiff
#

wouldn't break old mods

near parcel
#

That's the overloading approach i suggested, but again, i'm not sure how hard that's to implement from the C# side

kindred drum
#

someone should make a mountain map that you can drive up and down

hoary skiff
#

yeah moonsharp supports overloaded methods

#

I'm making a lot of assumptions though, this is assuming it's implemented in the best way possible which obviously might not be true

near parcel
#

The problem is that i don't know how moonsharp/C# handle function overloading. Using tables for named (optional) parameters for example was surprisingly difficult to do because it forced functions to take any type parameters

hoary skiff
#

seems it does some "dark magic" (quote from the docs) heuristics to figure out which overload to call

#

moonsharp I mean, C# is more deterministic

#

Overloads

Overloaded methods are supported. The dispatch of overloaded method is somewhat a dark magic and is not as deterministic as C# overload dispatch is. This is due to the fact that some ambiguities exist. For example, an object can declare these two methods:

void DoSomething(int i) { ... }
void DoSomething(float f) { ... }

How can MoonSharp know which method to dispatch to, given that all numbers in Lua are double ?

To solve this issue, MoonSharp calculates an heuristic factor for all overloads given the input types and chooses the best overload. If you think MoonSharp is resolving an overload in a wrong way, please report to the forums or discord, for the heuristic to be calibrated.

MoonSharp tries as much to be stable with the heuristic weights, and in case of a draw of scores between methods, it always deterministically choses the same one (to provide a consistent experience among builds and platforms).

This said, it’s entirely possible that MoonSharp picks an overload which is different than the one you think of. It’s extremely important then that overloads perform equivalent jobs so that the impact of calling the wrong overload is minimized. This should be a best practice anyway, but it’s worth reinforcing the concept here.

hoary skiff
#

raycast direction is in euler angles

#

relative to what though

#

and in degrees or radians?

#

or something else?

near parcel
#

euler angles=degrees, but i don't remember the order used

hoary skiff
#

degrees relative to what, up?

near parcel
#

yaw/pitch/roll

hoary skiff
#

angle isn't absolute

near parcel
#

doesn't matter, because you can just interpret a rotation as a transformation that rotates your object by the given amount on each axis once you know its rotation when at (0, 0, 0) angles

hoary skiff
#

I don't know it's rotation when at 0, 0, 0 angles

#

it's a raycast

#

so degrees relative to what, up?

#

trailmakers map

#

ignore the bad code I was just trying to make something work

near parcel
#

@radiant lion do you remember the order in which the euler angles rotations were applied?

hoary skiff
#

depth map of danger zone from the top

#

created using raycasts straight downwards

radiant lion
#

But honestly I thought raycasts took for direction a vector parallel to the ray

#

But if it says Euler then degrees, and go spawn a whale with trailedit, with a given rotation the ray will follow the nose

near parcel
#

yeah, i thought so as well, but it says euler angles in the docs

radiant lion
#

Sounds kinda stupid tbh

#

To use Euler instead of vector

hoary skiff
#

I think it has something to do with unity

#

the api is very similar to unitys api for raycasts so maybe that's how it is in unity

radiant lion
#

If you want i have a basic function that turns a direction vector into euler

hoary skiff
#

that would be great

radiant lion
#

(which probably unity also has, but idk if is included in lua)

hoary skiff
#

unity does I believe

#

just doing 160,000 raycasts rn

radiant lion
#

turns out my function is not too clean (it's TargetRot, with PosHun being an empty vector and PosTar being your direction vector)

#

you can delete any reference to PosHun if you want to not do 3 extra sums

hoary skiff
#

trailmakers doesn't like me doing 160,000 raycasts 😔

radiant lion
#

if you are just mapping the map you can probably do them in waves

#

btw how are you turning it into a pic?

hoary skiff
#

writing it to a file and then some shitting code with p5.js

#

not shitting code damn my hands

#

shitty code

radiant lion
#

ah, understandable

#

(image generation trough unity functions when?)

hoary skiff
#

might be possible to write a simple bitmap image writer or something

radiant lion
#

ascii moment

hoary skiff
#

game logic still frozen

#

hasn't crashed yet though

#

wonder if coroutines would help

radiant lion
#

(quite sure just reading a jpg and then re-writing it corrupts it)

near parcel
hoary skiff
#

good to know

#

made a higher res version it took like 15 minutes to do all the raycasts

sweet dove
#

@radiant lion in your missile tracker mod, can't mines set off dynamites? It doesn't seem like it

#

I wanted to use a mine with a micro explosion to create a proximity trigger for a dynamite

#

maybe the micro explosion isn't enough to destroy the dynamite?

radiant lion
#

But putting mine near dynamite or in front of a sensor should work

sweet dove
# radiant lion No, they can't directly

When i say set off, i mean detonate with the explosion. But i think i found the problem: anything below a medium explosion won't damage the block enough to detonate it

#

Also, i didn't understand from the mod description. Is there a way to make the mod only react to other players, without using targets? Mines and trackers

radiant lion
#

You should have a "targets" menu, there you can choose who you want/not to target

#

So you can disable targets and leave players

sweet dove
#

got it, thanks!

radiant lion
#

i can check if the rotation remain constant for a moment, doable, but sure is annoying

#

i sure hope lag won't be lagging

#

AAAA, flying repair is too fast, i can't put it in my slow update

#

wth, not even the fast update can always detect it

radiant lion
#

and now it's just behaving nonsensical. when using vector equals it's fine, if i only use x it goes always false... even with a not in front... confusing

#

AAA, changed the == to ~= and it now at least gives different results, i give it a not so it acts opposite, and it once again breaks, always returning true this time

radiant lion
#

stuff keeps being nonsense, if i call it every frame i get like 15 repair checks on avarage, if i call at half speed i get like 2... if i'm lucky...

regal bear
#

OK well I guess my code is hugely inefficient as it just 'brutes' the job - not unexpected for my coding ability hehe. Last I checked it was working ~95% of the time but that was only with 3 players in the server, and possibly before the last update.

radiant lion
#

Ye, there wasn't air repair yet

regal bear
#

Ah yes true

#

The other thing I did was check for damage before penalising a repair. Probably adds more strain.

warm canopy
#

Feel like we are missing at times some core functionality for modding, hopefully the devs can catch up with the backlog with modding

regal bear
#

I agree. Fingers crossed they do manage to make it a priority to fill out the API and assets. It would be a win/win scenario for sure.

radiant lion
#

anyone messed with tm.players.SetCameraRotation()? it seems to just not work

near parcel
#

what's the issue?

radiant lion
#

correction, seems to work in some mystical way, these sure ain't euler angles

near parcel
#

iirc it's a direction vector

radiant lion
#

was just about to try that

#

would be real dumb tbh

#

expecially since raycasts use euler

#

and here having z would actually make sense

#

it is a direction vector btw

paper bone
regal bear
radiant lion
#

Ye

#

But there at least having roll isn't important

dapper jay
#

scammed by the devs 😭

jade ibex
#

are there any mods that add a type of area 51 map in test zone?

novel maple
#

am i just schizo or did they move the dethrone island origin point before and now theyve moved it back? i used to have some issues with maps that covered up the island, but now they are as they were

hoary skiff
#

if anyone needs a way to search for individual methods and stuff in the trailmakers api this will probably help

#

it's for a different thing but it happens to have all of the definitions and docs for the builtin apis

near parcel
hoary skiff
#

oh wait yeah mine has all of that stuff

near parcel
#

most of it will be the same if you used the trailmakers_docs.lua bundled with the game as a base (since i did so too), but i manually cleaned that afterwards and added more information nvm, you seem to have used my version as base

hoary skiff
#

(+ I cleaned it up a little for typescript)

cold knoll
#

Is it just me or do weapons ignore the block health set by block.SetHealth() I've tried both 0, 99999, etc and every combination, and weapons do not care at all
For all its worth the visuals seem to respect it (or just break)
Also it seems to bug when trying to set all colors on large creations

dapper jay
#

the health functions are borked

cold knoll
#

Is there expected to be a fix in 1.9?

#

why CatScream @warm canopy

regal bear
# cold knoll Is there expected to be a fix in 1.9?

It's been brought up a few times so we can always hope. 🤞 With the new impact damage system coming in 1.9 they might be revising the whole block/structure health system. It would make sense to update the modding API then also. If they don't update the API then I imagine a lot more things could be broken after the update.

cold knoll
#

I was making an armor mod because I thought the block healths are stupid. Like i'm building a battleship that's massive and I can't afford to be shredded to paper

#

but turns out the block health is just ignored

#

except for impacts

#

for some reason impacts work fine

regal bear
#

Yep it used to work. My Super Strength mod used block health to make vehicles much stronger. Sadly that mod doesn't do anything now.

cold knoll
#

I was planning to increase the strength of blocks proportional to their size

regal bear
#

nice idea

wet dagger
#

Hey guys I'm a programmer who recently fell in love with trail makers. I was wanting to hopefully make new logic gates to expand on what we currently have. Does anyone have any resources for modding?

near parcel
#

mods can't currently add new blocks

wet dagger
#

I wonder if there's a way to override a block and bring up a GUI window to configure it

#

Cause I know custom missiles has its own menu

#

Would be awesome to add a timer block, etc

near parcel
#

there isn't, closest thing you can do is use color to store 3-4 floats worth of information. Other than that you can only add forces, change mass/drag/power (of engines/thrusters)/a couple more general things

#

btw, all blocks already have built-in timers

formal crane
#

.tmwiki Modding

mint oxideBOT
formal crane
#

There is also a basic modding guide

#

.tmwiki basic modding guide

mint oxideBOT
cold knoll
radiant lion
#

But we don't have that yet

loud slate
# wet dagger Hey guys I'm a programmer who recently fell in love with trail makers. I was wan...

Custom logic blocks are something that I have an idea to make.

  1. Save the logic type, connected output block indexes and input key to the colors with a bit conversion.
  2. Use distance sensors as end gates to send the signals to the blocks you need.
  3. Make an ui where you can just click the block to be connected with colored boxes that are ontop of the logic gates and show the type with 3d text.

Pros:

  • More logic gates
  • More compact
    Cons:
  • Performance (maybe)
  • Has to use in-game blocks as logic blocks
#

I have most of the bit compression methods already

loud slate
worldly ice
#

jess' missile/tracker mod

loud slate
radiant lion
#

Ye, it's just the classic mod ui

radiant lion
#

Gonna ask here because I know it was mentioned, tho not really TM related

#

How were those 3d textures called? The one that vary based on world position

#

Those that stuff like camo paint uses

radiant lion
#

Thank you

dusky dagger
#

What do you put in mod directory when uploading a mod to the workshop?

#

I put the path there and it didn't do anything

near parcel
#

mods/mod_folder_name

dusky dagger
#

I'm bad with files lol

near parcel
#

theoretically you can use the full path to the directory, but there is little reason to bother when you can use the mods/ shortcut

dusky dagger
#

Uh

near parcel
dusky dagger
#

Ohh

#

Thx

#

Yay! It worked thx

final wave
#

is it possible to overlay the layout of a map onto trailmappers to make it easier to build?

final wave
#

aight thanks

cinder spruce
#

i made a race track really easily

#

like literally yesterday

paper bone
#

Is it possible to check for modGameObjects that a different mod has spawned?

paper bone
#

Didnt find anything that would work for that so i guess not

dapper jay
#

can you hook the function for creating them?

cold knoll
dapper jay
#

well umm not really

#

raycasts return no info about the hit object(why?)

open acorn
formal crane
#

What information would you want to see? I presume collider?

cold knoll
#

Hi frans summons in general for you

formal crane
cold knoll
#

Have the block health setting methods been fixed in the current build of 1.9?

#

Last i checked they simply do nothing but bug the visuals

cold knoll
#

:(

#

so expect them to never be fixed?

formal crane
#

I doubt that they would never be fixed.

#

how do you english that sentence; I would doubt, if they never were to be fixed.

dapper jay
#

block health fix will come next update for sure 🙏

cold knoll
#

devs knew about this for a while now, I don't see why it couldn't come in 1.9

#

considering it did work before 1.8 I believe

near parcel
#

it broke in 1.7 because airborne changed how weapon damage worked. Modding has always been a low priority

cold knoll
#

I could see an option, instead of setting absolute block health, setting a block health multiplier might make it easier to integrate with the airborne damage changes. Similar to what the devs have already done with gravity

regal bear
# formal crane I doubt that they would never be fixed.

Sadly I also feel that a large number of broken and buggy things in the API are never going to be fixed.

Some of them are 'day one' bugs so after 3 years... what hope is left?

I'd love to hear Flashbulb commit to fixing the API bugs and commit to a timeline for it too - but honestly, I don't expect that to happen.

open acorn
storm basalt
#

we need a mod for this

cinder spruce
#

with new logic update u can prob use the new 1x1 panel and surround a all sided pipe with those

dapper jay
#

but thats larger than an actual 1x1

#

🤓

regal bear
#

A new version of Track Creator Plus is coming very soon. I've posted a new video in the TCP Mod's channel:
#1242291936715608205 message

warm canopy
#

Can we seriously look into the custom meshes again at some point, having to split terrain up into 1000 tiles is crazy

#

No amount of caching capabilities aint going to fix a inherently flawed implementation in its current state

#

This frustration comes from spending multiple days trying to create similar terrain polygon level as the games maps, I dont think its unreasonable to expect the game to handle a mesh that is a mb or two without the game freezing up, splitting the mesh up even into low poly 170kb tiles still causes lag spikes - some also due to the fact that the caching system seems to have some sort of lazy loading feature on the first load which is adding to this

cinder spruce
#

why does a simple 1024x1024 texture take about 10 minutes to load. ive made maps people play on and they didtn even realize stuff had custom textures until it finally loaded

#

making small changes in textures is a PITA cuz of that

open acorn
#

if only they redid the texture and mesh loading of mods, it wouldn't break any already existing, as it'd just be a new system for loading it, and the things being loaded will stay the same

cold knoll
#

I mean it takes a noticable amount of time for the api to load even 256 pixels, and that was a hellish amount of optimization for noiro's spherical planets mod

#

Also one thing i noticed is tm sends like 50x the amount of data than should be required to load a mesh, maybe they're using json to send it over? Would explain some of the lag

#

Even then its easy to do this shit right. Dunno about the networking, but creating textured meshes runtime shouldnt be an issue

#

The code is MIT-0 licensed, so they could straight up rip this into the game with no consequences, other than better mods (i am not a lawyer)

unique oriole
#

Hey, I've tried to get a basic mod down and i was wondering how i can set the strength of an engine?

near parcel
#

call the .SetEnginePower(power) method of the block

unique oriole
#

How do i call this function for all the engines that are loaded?

unique oriole
#

Nvm

#

I might have it

#

Just wondering how i can get the block type that is selected if I have the Modblock

radiant lion
#

By block type you mean engine/thruster/ecc?

unique oriole
#

yes

#

So that i can only modify it if the correct block is selected

radiant lion
#

You have to go by names, there isn't a pre-made way

unique oriole
#

Alrighty

radiant lion
#

For example most thruster have Jet in the name, so you'd check for that (iirc tho the dlc ones don't)

unique oriole
#

Tyyy

#

Ill have a look

#

Ill ping you if i have questions

radiant lion
#

Sure

unique oriole
#

@radiant lion How do i get all blocks that are loaded?

radiant lion
#

you have to first go trough all creations "tm.players.GetPlayerStructures(playerId)" then through all blocks "ModStructure.GetBlocks()"

unique oriole
#

Thanks

#

I was looking for the GetPlayerStructures function

#

The documentation isnt amazing

radiant lion
#

yeah, it works if you already know what you are looking for, not really when you don't

unique oriole
#

Sorry, another question, when i call tm.players.GetPlayerStructures(player.playerId) and i try to itterate it it just throws a bunch of errors

radiant lion
#

To be more specific?

#

(it might be a pairs/ipairs problem)

near parcel
# unique oriole The documentation isnt amazing

if you are using the auto generated documentation, you might want to take a look at https://github.com/ALVAROPING1/Trailmakers-API-LuaLS/blob/master/library/tm-api.lua instead which is a version i manually cleaned and improved to add more information and be easier to use for new players

GitHub

Definitions for the Trailmakers modding API. Contribute to ALVAROPING1/Trailmakers-API-LuaLS development by creating an account on GitHub.

unique oriole
#

Nvm

#

I did something dumb

loud slate
#

@unique oriole If you do a lot of block processing consider splitting the blocks into chunks and process them in those chunks (not having to process like 4k blocks every frame but split the work across multiple frames)

#

Especially getting the coordinates of the blocks is very expensive

unique oriole
#

I'll have a look, I might also check every 4th frame or something

#

But how could I do block processes most effectively

#

Split by structure or something?

cold knoll
radiant lion
cold knoll
#

Block health methods still broken innit?

radiant lion
stable sand
#

do the mines for the missile mod work?

#

have them on medium and they dont seem to explode at all

radiant lion
#

Last I checked they worked, just make sure the mine is armed and the targeting options are set properly

dapper jay
loud slate
loud slate
cold knoll
#

It shoudn't be doing those global calls tbh

cold knoll
#

If a block knows its local position, and the parent weld group, those two and a matrix multiplication is all that'd really be necessary

radiant lion
#

It should be just directly linked to unity's transform.position

#

Which iirc by default is global

cold knoll
#

from my unity experience transform.position is relative to the parent node

radiant lion
#

.localPosition is relative to parent

stable sand
cinder spruce
#

is there some way to fix it, its really bugging me (pun intended)

unique oriole
#

I was wondering if it is possible to add blocks into the builder?

warm canopy
#

Nope

unique oriole
#

Thats a shame

#

is there any other way of adding things like 1x2 blocks?

near parcel
#

only hacky ways: spawn the "block" as a 3d object and manually move/rotate it to track the creation

dapper jay
#

and it cant be integrated into the game's systems soo

cold knoll
cinder spruce
radiant lion
#

It would be cool if they allowed us to select a size and a mesh and it would add said object to a new tab, but honestly i think it's low priority

#

Given just the general difficulty, requirements so you can choose where it connects and supposedly mesh position

unique oriole
unique oriole
scenic echo
#

is there a way to see weld groups with mods?

cinder spruce
#

nope

open acorn
cold knoll
#

You know what would be epic for cinematics? A blueprint to 3D model converter

warm canopy
#

It used to exist in the base game

near parcel
#

it was a quick hack, was unmaintained, and eventually stopped working correctly though

radiant lion
#

AAA, am hella confused

#

the "ModBlock.SetDragAll" seems to have some sort of permanent effect on all other blocks of the same kind

#

but extremely unreliable

warm canopy
#

That function has always been unreliable, we also can't reset back to default I dont think

radiant lion
#

mod ain't even active, i add a new one of said block, works fine,remove and add another, not fine

radiant lion
#

video coming up, just need to make it discord compatible

warm canopy
#

The mods not disabling properly happens a-lot for me, I've had cases where a mod is actively running even though its disabled in-game

radiant lion
#

also not the issue, it would activate only on specific colors to begin with (it works properly, i logged the activations) and now it's also commented out

warm canopy
#

So many issues with the modding api

radiant lion
#

first time: no drag
second: tons of it
third: no drag
fourth: a bit

dapper jay
loud slate
cold knoll
#

Modding is very neglected in this game, even though its the main source of secondary content on steam. Prolly the reason its neglected is that it only works on steam

#

However, xbox games have had official(ish) mod support done in the past
https://news.xbox.com/en-us/2019/02/20/paradox-mods/

Xbox Wire

We are absolutely thrilled that Paradox Interactive has teamed up with Microsoft to release Paradox Mods on Xbox One! Now, for the first time, PC mod creators have a direct line to showcase and publish their work for Xbox One gamers to enjoy — making this a momentous day for gamers and modders everywhere. Surviving […]

final wave
#

How do you import a map into trailmappers? trying to work on my map after i reset my pc, but the directory doesnt seem to work

cold knoll
final wave
cold knoll
final wave
#

aight ill try that

cold knoll
#

Both the map.json and preview.png

final wave
cold knoll
final wave
cold knoll
final wave
#

i downloaded it from the workshop cause my pc was reset, so it hasnt been exported

cold knoll
#

Show ss of the entire folder
there should be this folder

#

This inside the folder is the map data

final wave
#

the data static is empty

cold knoll
#

ok, you're looking in not exactly the correct folder

final wave
#

oh that would be why

cold knoll
#

Steam steamapps workshop content 545820

#

then you need your mod ID

#

(as in steam content id)

#

open the folder

#

mine wont match yours

final wave
#

found it

cold knoll
#

Copy the map file into the folder, rename it to map.json

#

(the folder where your map files are in for trailmappers)

#

where preview.png existed

final wave
#

did that, its not showing up in trailmappers

cold knoll
#

it should be in the "yes" folder

final wave
#

it worked, thanks for your help

paper bone
near parcel
#

they deleted it themselves

warm canopy
#

Yeah I deleted it, since the caching feature was added the loading of actual meshes the first time is slower than it was before caching

shadow iris
#

deleted messages plugins are against discord tos

#

nuh uh uh

radiant lion
#

was there a specific channel for mod reposts?

#

can't confirm yet, but i feel like this is a copy

#

yep, identical files

warm canopy
#

Great, now it’s happening with mods

radiant lion
#

ye

#

i mean, there was that time where a guy uploaded the whole mods folder, but i think this is the first actual rip

#

(and maybe the complexity mods, there are plenty enough that some might be copies)

#

@open acorn

near parcel
#

probably use #workshop-reports

formal crane
#

I think I can clear, can you link?

EDIT:
Should've been removed now.

dapper jay
#

I think someone should make a mod

frail galleon
#

anyone know if trailmakers is moddable if the game was bought via xbox pc gamepass

#

?

open acorn
regal bear
cinder spruce
#

same username too

dapper jay
lament arch
#

does anyone know of any like relistic tank mods?

#

what is it?

#

also i was more looking for realistic tank cannons and stuff

lament arch
#

okay

loud slate
dapper jay
regal bear
minor snow
#

THOUGHTS?

#

(not finished)

open acorn
minor snow
open acorn
minor snow
regal bear
minor snow
open acorn
minor snow
dapper jay
#

oh oops accidentally tried using a 10k vertices model silly me

#

devs you really gotta fix the mesh importer because its just trash

dapper jay
dapper jay
#

issue circumvented

paper bone
#

When better mesh importer??

dapper jay
#

better mesh importer tomorrow

paper bone
#

Yipeeee

dapper jay
#

ive secretly been a trailmakers dev for 5000 years and i can confirm that this is 100% true

#

thats kinda cursed

#

good that it works though lol

near parcel
dapper jay
#

im talking about how i can use nextId

near parcel
#

Ah, i thought it was related to the other image, but being able to use nextid inside the function is normal as well, that's how closures work

warm canopy
#

I think we need to start a crowdfunding campaign for a different mesh importer. Lol

dapper jay
#

seems like the mesh importer has jumped off a cliff since then

formal crane
formal crane
dapper jay
#

its just the pirate anti air enemy's seat model

formal crane
dapper jay
#

from what i could tell it just freezes indefinitely
I only waited like 2-3 minutes, after that i just quit back to the main menu
(its really great how UI is handled separately)

dapper jay
formal crane
#

Might have to try with the texture as well as they are usually much heavier in bandwidth.

dapper jay
#

i just use addmesh and the game dies?

formal crane
#

Could you send me the texture as well?
Maybe just send me the whole mod, just wanna be sure I am not missing anything obvious.

dapper jay
#

all that happens is that i add the 3k model, nothing else

#

seems like it does eventually do something

#

nevermind

dapper jay
dapper jay
dapper jay
formal crane
# dapper jay heres the mod, at line 207 you can adjust what assets the mod should load

There we go. Now my game crashes as well. I am not sure what's going on with this mod, and I'll have to do some digging to figure out what is actually crashing here.
But yeah, didn't have any issues with the big nor small mesh and the small texture with the spawnadvmod. Could you maybe verify that it is the same in your end?

EDIT: or thats what you meant in the message above?

EDIT 2: Okey that 7MB dif.png texture is rather huge.

dapper jay
#

loading the bigger texture doesnt crash my game but it does take ages to load

#

and i cant load either of the higher poly models without the game dying

dapper jay
dapper jay
dapper jay
#

went back to 1.5 to see if the assets would work, but it seems like loading them all at once makes it freeze as well

#

alright this is weird
big texture - still takes ages
base - as quick as current day
base_seat - freezes the game
seat - works fine

#

loading base and seat together works fine

#

the obj importer has always been picky it seems, but it also seems to have been better?

#

idk man this entire thing is so weird

#

oh this is new
loaded just base_seat, and after some time it seemed to actually load it
but everything outside of the graphics is frozen, i can see the character playing the idle animation, but I cant move or anything
I clicked the spawn object button but nothing has happened yet

#

still nothing lol

glass lake
#

Does anyone know if we can mod custom blocks?

near parcel
#

not atm

dapper jay
#

sooon???????

#

block support tomorrow

wet burrow
#

can i ask here for like

#

uhh

#

a certain mod

#

and why it does work or why it works like it works

dapper jay
#

maybe

wet burrow
#

the custom missles mod

dapper jay
#

#1174457776601305118 ?

wet burrow
#

ig ill use that

#

if its even an active thread

limber matrix
#

is there currently a mod that gives fireworks damage, or if not is that even possible

cinder spruce
#

not possible unfortunatly

open acorn
limber matrix
#

damn

dapper jay
#

it is big sad

dapper jay
#

if i spawn a crate or something it spawns where i want(directly in front of the barrel)

#

the blueprint im spawning is just a single dynamite

#
---@param rotation ModVector3 Euler angles defining the rotation
---@param vector ModVector3 Vector to rotate
---@return ModVector3 # Rotated vector
function GetVectorRotation(rotation, vector)
    local q = tm.quaternion.Create(rotation)
    local qInverse = tm.quaternion.Create(-q.x, -q.y, -q.z, q.w)

    local p = tm.quaternion.Create(vector.x, vector.y, vector.z, 0)
    local pRotated = q.Multiply(p).Multiply(qInverse)

    return tm.vector3.Create(pRotated.x, pRotated.y, pRotated.z)
end

function cannonShoot(pId)
    local cannonId = playerData[pId].cannonId
    if not cannonId then return end

    local cannon = cannons[cannonId]
    local rot = cannon.seat.GetTransform().GetRotation()
    local id = "cannon_projectile_"..projectileCount
    tm.players.SpawnStructure(pId, "projectile", id, cannon.origin + GetVectorRotation(rot, barrelPos), rot)

    local force = GetVectorRotation(rot, vec3_fwd) * 100
    for k, structure in pairs(tm.players.GetSpawnedStructureById(id)) do
        structure.AddForce(force.x, force.y, force.z)
    end

    --tm.physics.SpawnObject(cannon.origin + GetVectorRotation(rot, barrelPos), "PFB_Dispensable-BeachBall")

    projectileCount = projectileCount + 1
end
dapper jay
#

Carrying over from #general-trailmakers:
What does SetIsTrigger actually do?

#

Because this is not true

formal crane
#

It is one of the more cursed functionalities we have.
I would say the Docs are not good on that part.

It goes through all RigidBodies of the gameobject (and its children) and sets their isTrigger to whatever bool you set.

BUT there is a milion gotchas with triggers in TM and I would say this API does not take these things into account probably.
Using them to disable colliders I would argue against.

But it is currently the only way to toggle colliders (ish) that we have, hence why people use it for such thing.

dapper jay
#

idk what to say other than that it just does not work on anything

#

i have rigidbodies spawned and i cant pass through them no matter what i set

#

the only effect it seems to have is mess up seats

#

mappers take note!!

#

if i set the player to not be a trigger it doesnt happen

formal crane
#

Yeah I cringe every time I see this 🙂
I believe this is more know to a few mappers at this point. But yes, SetIsTrigger is very broken.
And doing SetIsTrigger on the player sounds very cursed and I was under the impression that we had safeguards for that.

near parcel
dapper jay
formal crane
warm canopy
#

I just want to see some progress on the backlog/list as havent really seen much movement

#

With some things we even seem to have gone backwards

radiant lion
#

who was the guy that decided what we can do .Forward/Back/Left/Right for blocks and structures but not Up/Down?

#

i mean, i can do the cross product, but it's kinda stupid

regal bear
regal bear
formal crane
#

--
Something completely different; what is the process of uploading a mod to the workshop?

I checked out the wiki article on how to upload blueprints. Is it just the same? Does steamcmd upload all the files located together with the .vdf or do you need to add kind of files var or something to it?

radiant lion
#

It upload anything in the folder you tell it to upload, yes, if you only write "mods" it uploads the whole mods folder (at least a guy managed to do so a while ago)

warm canopy
#

I thought an error popped up if you put just mods, damn if that’s true I need to be super careful with uploading mods as my mods folder has 50 mods in it

formal crane
# radiant lion It upload anything in the folder you tell it to upload, yes, if you only write "...

Just to be sure
I have a folder trailmakers/mods/mymod
In there I have a mymod.vdf - Do I even need this or is this just for metadata?
Then in steamcmd I simple type workshop_build_item trailmakers/mods/mymod or full path to the vdf required?

I would just like to know the intended practice, as I am having trouble finding proper documentation.

Second question; how is the mod tag given? Can you do that from the vdf or do you do it through web somewhere?

radiant lion
#

the intended practice is doing it trough the in-game "upload mod" button

#

which handles by itself giving the tag, doesn't need vdf, and applies the preview image if you have a file named "Preview.png"

formal crane
radiant lion
#

yeah, it would be quite a pain having to use steamcmd for everything

formal crane
#

And how do you update the workshop item? Also using upload mod and simple use same title?

radiant lion
#

if you find your own mod in the in-game workshop (aka look for your uploads)

#

there is an update button

formal crane
#

Cheers!

regal bear
regal bear
dapper jay
#

would SetCollision change the collision mesh or toggle the collider?

#

if its the latter, then just fix SetIsTrigger lol

radiant lion
#

@formal crane not sure if you know about it, but are you able to confirm that blueprints spawned by mods must have an onwer?

#

(which makes sense as an ease to add point of view, just annoying that a player could always just... press b when near it, also they despawn if you backspace)

warm canopy
#

Yeah they need to fix that so that the server can be the owner

radiant lion
#

:(

warm canopy
#

Or just make it so we can assign a playerid that isn’t used such as player Id 8,9

formal crane
#

I am not the best to answer this; but it requires a player instance, as it uses the build system to spawn the blueprint. So requires some refactoring in order to spawn through server.

radiant lion
#

about what i expected

#

still annoying tho

warm canopy
#

The more I use the caching system the more I’m not that keen on it, it creates a huge lag spike/game freeze on the initial loading of a model

radiant lion
cinder spruce
sweet dove
#

@radiant lion I've been experimenting with your custom missiles mod a lot, and I'm curious, what kind of things have you done with it? That are more complex than sticking an eyeball onto a rocket and making it track

#

I've been trying to get a cruise missile thing working, putting an eyeball on a weak setting between distance sensors, to have gyros turn a bigger thing

radiant lion
sweet dove
#

I figured you'd have made something different with it, besides it's original purpose

paper bone
#

Sareth and Mr Nothing have made a camera rig that follows players

radiant lion
cinder spruce
paper bone
#

how can i despawn a players structure?
both of these dont work and give the same result

near parcel
#

tm.players.DespawnStructure() is for blueprints spawned by the mod itself, for others use ModStructure.Dispose() (instant despawn) or ModStructure.Destroy() (destroy all blocks)

paper bone
#

ok thanks

loud slate
#

Is it only me or is the ModBlock.SetPrimary/SecondaryColor broken?

radiant lion
#

If the missile mod still works then the function works

#

Remember that the color goes from 0 to 1, not 0 to 255

paper bone
dusty umbra
radiant lion
#

Minor....?

dusty umbra
#

Bugs etc are always in our backlog to fix, but we haven't planned any new functionality as we are focusing on content for all platforms.

cinder spruce
#

not again

shadow iris
open acorn
#

smallmakers moment

dapper jay
#

ratmakers mod

tall lava
#

Lol

open acorn
#

why isn't there a way to add torque, or atleast rotational force to structures, eh probably could do it from the seat anyways, still strange

ember sparrow
#

Does anyone know why my game crashes when I change the power of a thruster with the custom missiles mod?

#

It wasn’t crashing before but just wouldn’t change it to the speed I set, it would set to -614.567 or something

open acorn
ember sparrow
#

oh damn

#

is there anyway to fix it?

open acorn
thorny sparrow
#

The crash from doing that is new to us. Send Error Logs from when it crashes so we can see why. We are only aware of the thrust value not storing correctly and the colour not changing.

cinder spruce
#

i mean the mod itself has been crashing a lot more recently just due to how big its been getting, could be unrelated

cinder spruce
dapper jay
#

hi chat is anyone making a mod

open acorn
#

no

#

are you?

cinder spruce
#

moddig has felt dead for a bit now

open acorn
#

somebody should make more mods

#

and we need modmakers 2 stream

dapper jay
#

the most ive got are random unfinished ones

dapper jay
#

Block Behaviour - Attach custom behaviour to blocks, for example press space to spawn crates
Creation Grab - Grab creations and throw them
Delivery Quest - Dialogue and quest system test
Flak Cannon - The pirate Flak Cannon enemy but as a useable entity
Handheld Tools - Tools that the player can hold, a pistol for example
Nuclear Bomb - Sawn bombs that create big booms

warm canopy
#

Lack of modding functions and broken modding functionality sort of kills the spirit

dapper jay
#

someone managed to upload their mod folder again

loud slate
paper dove
#

(for the missile mod) It'd be cool to have like a lofting system for the missile mod, i know the math would be pretty complicated which is why im saying that this should only be taken as a suggestion not a neccesary feature, but itd be cool to like have a part of the menu to where when modifing the seeker head theres the additional option of "Lofting: on/off" then you would like insert the burn time and power of the missile's engines and it would calulate what angle it needs and what not, i know it wouldnt have much of a purpose but itd add some realism for more modern missiles, im actually not even sure if this is possible tbh.

cinder spruce
formal crane
dapper jay
#

oh thats neat

open acorn
#

messing around with a 4D spheres mod and decided to make them float, but after adding a decent amount (a lot of them) they all seem to sink, is there a limit to how many objects can have a force applied to them at once? I assume so from what I'm experiencing here, as everything else seems to work fine, and it isn't spitting any errors

dapper jay
#

do rigidbodies not float on water?

warm canopy
#

Nope

open acorn
dapper jay
#

well that sucks

dapper jay