#General modding chat

1 messages · Page 7 of 1

formal crane
#

But it might also have been an issue on my part - I went on a frenzy to do this as I was so annoyed by not knowing the various spawnables.. The process was just so intensely tedious

shadow iris
#

it seems like it has its collision still but the texture is gone

#

from my testing

formal crane
#

ah that could be

shadow iris
#

I couldnt get noco to work though

#

it seemed the same as the first one I think in 1.9.5

#

although that could have been trailedit's fault

shadow iris
# formal crane ah that could be

is the team aware that quite a lot of pfbs have broken (in most cases shiny) textures? I'm sure you noticed kungfuflaglol is broken though lol

regal bear
regal bear
#

A new version of Track Creator Plus is now live on the Workshop. More details here:
#1242291936715608205 message

warm canopy
scenic echo
#

how can i change the rotation of a custom object?

radiant lion
#

.GetTransform().SetRotation(Rot)

scenic echo
scenic echo
near parcel
scenic echo
near parcel
#

sorry, i misremembered that function having a field for the rotation

formal crane
scenic echo
# formal crane No, you should be able to do it the line right after. Maybe share the code?

function SpawnBullet(block, playerId)
local PosOld = BlockPosOld[block]
local Pos = block.GetPosition()
local Rot = block.forward()
local Rotz = math.atan2(Rot.x, Rot.z)
local Rotx = math.atan2(Rot.y, math.sqrt(Rot.x^2+Rot.z^2))

local sinz =  math.sin(math.pi/2-Rotz) * math.sin(math.pi/2-Rotx)
local cosx =  math.cos(math.pi/2-Rotz) * math.sin(math.pi/2-Rotx)
local cosy =  math.cos(math.pi/2-Rotx)

local PosOld1 = tm.vector3.Create(PosOld.x + cosx*4, PosOld.y + cosy*4, PosOld.z + sinz*4)
local Pos1 = tm.vector3.Create(Pos.x + cosx*4, Pos.y + cosy*4, Pos.z + sinz*4)

local Vel = tm.vector3.Create((Pos1.x-PosOld1.x)*Tickrate,(Pos1.y-PosOld1.y)*Tickrate,(Pos1.z-PosOld1.z)*Tickrate)

local Bullet = tm.physics.SpawnCustomObjectRigidbody(tm.vector3.Create(Pos.x + cosx*4, Pos.y + cosy*4, Pos.z + sinz*4), "bullet", "roadtex", false, 1)
Bullet.AddForceVelocityChange(Vel.x+cosx*PlayerDataTable[playerId].BulletSpeed, Vel.y+cosy*PlayerDataTable[playerId].BulletSpeed, Vel.z+sinz*PlayerDataTable[playerId].BulletSpeed)
Bullet.SetIsTrigger(true)
Bullet.GetTransform().SetRotation(Rot)
table.insert(Bullets,Bullet)

end

#

this is the function that spawn the bullets

#

it gets the rotation from a block with .forward() on first four lines

#

and then does Bullet.GetTransform().SetRotation(Rot) and the rotation of the bullet does not change

#

the last 5 lines spawn the bullet

scenic echo
#

i have a bit of a issue with the ui, it disappears when i respawn or backspace and when i press esc it comes back

regal bear
scenic echo
regal bear
#

For the UI check all the places you've got the function tm.playerUI.ClearUI(playerId). It looked like each time you repaired it refreshed the UI but changed what parts should be visible.

regal bear
scenic echo
regal bear
#

OK. I don't know if you can get the block's structure that way (others may know if it's possible) but you can get structure attached to the seat that the player is currently in if that helps.

#

local plrSeat = tm.players.GetPlayerSeatBlock(playerId)
local plrStructure = plrSeat.GetStructure()

scenic echo
#

i'm just going to use a ball for the thing i have so i don't need to rotate it

regal bear
#

a ball is a good idea

scenic echo
regal bear
#

Are you sure a keybind isn't interfering?

scenic echo
#

yeah

#

if i press backspace for a second it doesn't do it

#

it's when i respawn

regal bear
#

Well something is running the function that you have your UI elements in everytime you repair

scenic echo
#

checked again and it's only called once per tick in the update() function

regal bear
#

Why are you calling the UI everry tick?

#

that will make it flicker every tick

scenic echo
#

don't buttons have to be ran every tick?

regal bear
#

nope

#

when they are clicked they run the function you've given them

near parcel
#

All events use callbacks

scenic echo
#

then i'm gonna doing it only when it needs to update

regal bear
#

Also you can update the value of each UI element without refreshing the UI

#

tm.playerUI.SetUIValue(playerId, id, value)

scenic echo
regal bear
#

Yep it sure is. My racing UI makes extensive use of it. You can update subtle message values too which is also cool.

shadow iris
radiant lion
#

I doubt you can change icon, since it has to be given when when sending the subtle message and the update value function only works with strings

#

So no, no bad apple in the subtle messages

serene magnet
#

so is it just me or is SetHealth broken

regal bear
#

it's broken

shadow iris
regal bear
#

You could but because new messages slide in from the screen edge and old ones take time to slide away it would not be a smooth animation.

scenic echo
regal bear
granite hill
#

Where do I find the names of blocks? Like specifically the minigun?

warm canopy
#

Use block editor mod in Trailmakers, it’ll give you the block id when you select the block in build mode

serene magnet
#

Just wanted to pop in and ask if you could set the gravity of a player and their creation separately from everyone else

#

So like one player has normal gravity and another has zero gravity

near parcel
#

Only if you manually simulate gravity by adding forces

serene magnet
#

are you able to use os.time() in tm?

cinder spruce
serene magnet
#

yeah i just need to use os.time with coroutines to create a wait function

#

update: yes. you can use os.time im just stupid

regal bear
serene magnet
#

Also I should just announce that I'm working on an extensible mario kart framework. (If possible) it will allow map builders to add my custom objects to their tracks and my mod will handle all the heavy lifting of making them functional

#

Building it to work with trailmappers (sorry Lua map makers)

regal bear
#

Trailio Kart perhaps? 😛

dapper jay
#

did 2.0 add any modding functionality? for example, enabling fuel consumption?

dapper jay
#

one can dream...

warm canopy
#

Nothing in terms of modding in 2.0, Thats not to say we won't get any additions in later patches

radiant lion
#

One can only hope

hoary skiff
#

when we finally get good ui for mods I'm making it work with TSX

ionic jacinth
warm canopy
#

TSX?

radiant lion
#

Interacting with logics is honestly one of the things I wish for the most

#

Less after 1.9, but still enough

regal bear
#

I notice we've lost some sound FX in the update. Not sure if it's intentional or not.

median cobalt
#

So with the addition of transfering damage between transforms , does this confirm the devs have found out a way to properly handle saving damage data

#

And if so, does this open the portal for a gun capable of undoing damage from a damaged creation

nova salmon
#

Is there any 1x1 rotating servo mod? Or is that even possible with the current modding tools?

near parcel
#

it's not possible

regal bear
serene magnet
#

i am going slowly insane. i just need to texture it and i should have this map ready for TM

serene magnet
#

its a new race course im working on called Neoterra City

serene magnet
#

still have to do texturing and fix some holes in my geometry

serene magnet
#

it takes almost a minute to load... and thats with models and textures cached...

#

are we able to create custom light sources through the api?

regal bear
regal bear
serene magnet
shadow iris
scenic echo
scenic echo
serene magnet
#

yeah the corners are also tight

#

the stuff is meant more for smaller kart league stuff

#

i could simply scale up the models to make them work for larger vehicles

thorny sparrow
#

Wipeout vibes. Looks awesome!

radiant lion
#

No way, Lego drome racers in tm (stile is surprisingly similar)

serene magnet
#

lemme see if i can get a full run in a faster vehicle

#

my drivings not the best but its good enough to show high speed on the current course

#

(BG music is People by Half Alive)

#

gonna be making a version for karting with boost pads on the arrows and item boxes on the X's

regal bear
#

Yeah that is just so cool 🙂

serene magnet
#

trying to figure out lighting for the tunnels rn

#

i found exactly what i need. now to find how to get it

shadow iris
serene magnet
#

Yeah I figured that out... I'm now gonna go cry

#

That single asset is perfect for what I need and it's not prefab but I can acquire a ton of plants instead

radiant lion
#

Yeah, especially these latest updates that haven't been adding too many of the used stuff
Edit: tho of the space map we got almost everything

#

Also the lamps might be part of the space station itself

serene magnet
#

I'm also realizing how much I need transparency and opacity for my ideas. Holograms? Nah, they look bad being solid. Light beams? Nah, they look bad being solid. 2d trees on the side of the road to help rendering? Nah, have to have a black background

regal bear
#

I've used this pipe for tunnel lights before

serene magnet
#

Yeah that's what I was thinking for the side lights

serene magnet
#

Hello modding gods, I am here today to ask if Lua has a require/import function and if so does it still work in the thing that is trailmakers lua

#

Like how in python you can take functions and classes from other files

near parcel
#

tm.os.DoFile(filename) executes a given file as a module. Anything declared local at the top level of that file will be private to it (can ony be accessed from that file, not declaring things as local is not recommended). You can add a return statement to the top level of the module to return anything you want to be public (typically a table of elements), which will be returned by the tm.os.DoFile() call

regal bear
near parcel
#

you will get very unorganized code that's very difficult to reason about (specially as the code size grows), since you will have to always keep in mind how any other part of the code could mess with each component. You also can run into name collisions unintentionally, causing all sort of seemingly weird errors. The better way to do things is to return a table of values which form the public API of the module, and make everything else local. That way other parts of the code can only interact with the module through that API, allowing it to control what can and can't be done to the module. A good rule of thumb is to keep everything local unless you have a good reason to make it part of the module's public API

dry sentinel
#

Locals are just stored as an index in an array (vector?) for the scope

regal bear
median cobalt
# serene magnet problem

hang on, is this a portover from a BallisticNG map? did you get allowance from Vonsnake for these?

#

I do not see you on his server, i dont know if this map would be considerable as allowed on the workshop, but i can ask vonsnake

median cobalt
#

This isnt your own track, be responsible and give credits to vonsnake at minimum

errant dew
#

Hello this is a controversial question, but I know that the EULA prohibits modding outside the API for good reason. I want to do modding that can’t be achieved using the API. if I use it ONLY in single player and I don't use it for leader bord manipulation ext. also if I do this then I won’t upload it online what is the rules on that? if you say I can’t then I won’t. I want to make a mod to make logic gates more efficient and make a performance mod of sorts.

shadow iris
near parcel
#

^ and even ignoring the EULA, it's extremely unlikely you would be able to improve performance in any significant way

wispy crescent
#

Unlike Minecraft the devs actually optimize their own game, Mojang should take notes

serene magnet
#

what the heck is a GetStackableBox call? my autocomplete keeps trying to get me to use it same with a vector2 instead of a vector3

wet grail
#

is it possible to add new blocks with mods?

near parcel
#

not in any good way

scenic echo
scenic echo
wispy crescent
#

Considering how complicated adding that feature would be I’d expect to see a built in level editor first and we’ve already been told not to hold our breath’s for something like that…

median cobalt
#

Still waiting for ui mod support so we can begin making gamemodes

#

Maybe with that editor itll bring a bit of stuff

#

Funnily enough the gamemode part itself is not difficult to make - the ui just wouldn't allow you to do much

paper bone
#

You can make a custom model and create a camera for the player who opend the UI in front of this model.
Downsides:

  • No simple way to display Text either all Hardcoded in your models or you make your own "Font" alphabet of models which you need to painly assemble.
  • to use the cursor on this UI the player first needs to press F4 by themselves
  • probaply more Issues which i cant think of rn
#

It would certainly be great if we could force the players cursor to be unlocked with the api.
(And hide it again)

cinder spruce
median cobalt
#

id love to introduce a whole custom ui with trailmakers ui assets to just make a neat little KOTH or Conquer Territory type gamemode

#

im fairely sure once we have 2.5 or 2.6 we might have a sneak peak into that stuff

#

im also fairely sure that then we also get the ability to maybe get better object support (meshes that dont implode after 2048 or a total of 32462 vertecies)

ionic jacinth
shadow iris
median cobalt
shadow iris
median cobalt
#

weird extra metadata seems to be added onto it

#

i have no idea what they use for 3d model imports from unity

shadow iris
wet grail
#

Is it possible to make custom race tracks on custom maps?

#

With checkpoints and stuff

paper bone
#

yes

shadow iris
#

yeah using track creator plus by krunch

wet grail
near parcel
#

you can make a mod for it

shadow iris
#

tcp x trailmappers crossover when

wet grail
serene magnet
#

im currently on crash 286

serene magnet
#

I FUCKING GOT IT. ALL 96 BASEPLATE MESHES

#

all it took was 342 crashes

wet grail
#

Why does your map crash?

#

Is it big or smth?

serene magnet
#

need to update my textures to fit the new theme of the map but heres a 32 tile base test with the Foliage Meshes loaded

#

well part of it because the replay didnt save all of it and i dont wanna open OBS rn

regal bear
# wet grail I don't know how :\

It's worth giving modding a try. You might find you can master a few tricks in lua. Creating checkpoints in the lua code isn't too hard and you can look at mods like mine to see how it can be done.

Alternatively you can place checkpoints using Track Creator Plus on an existing track very easily and then save them to a file. You could even include that file in the map with instructions on how to move it to the right place for loading.

serene magnet
#

So if I simply load 5 meshes at a time by having the player click a button to manually load them whenever their pc catches up the game doesn't die. Let's go

#

That being said just the third of the map I have in game would cause a potato pc to spontaneously combust

shadow iris
#

i might have just figured out how to do some vague form of subsurface scattering looking stuff, hang on

#

maybe not

#

yeah probably not

regal bear
serene magnet
#

The problem with the autoloader is it doesn't care if the game is overloaded. It will continue to try and load more models

regal bear
serene magnet
#

I could try

#

I have around 500 total assets I need to load though so I gotta be incredibly careful

#

Think I'm gonna be closer to 580-600 by the time I'm fully done

dry sentinel
#

Change the i % 25 to change amount loaded, also may need to make changes, no clue what's new with modding api

topaz arrow
#

how do i change the steam workshop thumbnail of a mod?

shadow iris
#

unless you can do wizard tricks with steam console that i dont know

topaz arrow
#

unfortunate, wish that was added somehow, seems like a rather useful thing to be able to do (unless there is an easy way that i somehow missed)

radiant lion
#

Isn't it done by just putting the png in the mod folder called Preview.png or something and it gets done automatically?

#

Or is there another kind of thumbnail that I'm forgetting about

shadow iris
shadow iris
near parcel
#

pretty sure replacing the file works

radiant lion
#

^ I think so too, pretty sure I changed mines a few times

#

Yep, my gravity mod definitely changed thumbnail

topaz arrow
#

Huh, will have to try that tomorrow

serene magnet
#

Yes. It is Preview.png. just adding a file named that works

dry sentinel
serene magnet
#

I mean. You don't need comments if you write good code

radiant lion
#

You don't need comments if you abandon your code

#

||I mean: comments are good, sorry obojętnie||

serene magnet
#

True

#

And comments are great but the best way is to have readable code. Just name your functions and variables in a way that you know what they do

radiant lion
#

Splitting the code into file is also something that can help quite a bit

serene magnet
#

Basically to say don't name your variable x

serene magnet
#

If you can write modules and call them from a main script that works great

cinder spruce
serene magnet
#

Exactly

#

Name your variable AdvertisementSpawningProgressCounter

#

Its long but you know exactly what it does

radiant lion
#

But... Long to type

#

PPointing is the best i can offer

#

(i don't remember what the p stands for)

#

Point possibly

serene magnet
#

Yeah. The long to type kinda sucks and there are better ways to do it but that's the basics of readable code

warm canopy
#

PPointing function is legendary, I still find myself using it

radiant lion
#

Yeah, the file with all those useful functions is probably the best thing in my mods folder

#

TargetRot my beloved (I pretty much know them all by heart now)

shadow iris
regal bear
neon ice
#

C h i c k e n f i n g e r s

dapper jay
#

chicken jockey

serene magnet
#

mmmm. i finally have a single piece of the new map done. im going to bed

paper bone
#

i made a Mod which sprinkles selected Prefabs onto a map and exports it into Trailmappers format

#

cant upload it rn but i will try to later today.
its still pretty limited and there are many qol features i have yet to add

scenic echo
#

this is a great while we wait for ridicolas to come back and add it to trailmappers

paper bone
#

any reason why it just ignores the decimal point?
and how could i fix this?

local objectDataPath = "objectTable.json"
local objectTable = json.parse(tm.os.ReadAllText_Static(objectDataPath))
local object = objectTable[math.random(1, #objectTable)]
local spawnedObject = tm.physics.SpawnObject(spawnPos + tm.vector3.Create(object.offset), object.name)
        spawnedObject.GetTransform().SetRotation(spawnRot)
        spawnedObject.GetTransform().SetScale(tm.vector3.Create(object.size))
dapper jay
#

maybe its only uniformly scalable?

dry sentinel
#

Are you passing in a vec3 for rot?

near parcel
#

if you want to create a vector from a string, you are missing the parenthesis

dapper jay
#

oh lol

paper bone
cinder spruce
paper bone
#

ok imma try that

#

sadly not. it doesn't change anything

paper bone
#

Any other ideas?

scenic echo
#

Maybe that works but its janky

regal bear
# paper bone Any other ideas?

Don't know why it's not working for you. I don't do it that way. In my saved files I separate out the vector3 values. When I read the file back in I use the tonumber() function on each value as I recombine them into a new vector3.

paper bone
#

Yeah i guess seperating them should most likely work better, will probaply do that then

scenic echo
#

can distance sensors detect custom objects set as trigger?

solar mica
#

does anyone know something that emits proper light in trailmappers? or is it possible to make a custom model that emits light?

regal bear
shadow iris
#

take this with a grain of salt but i don't think they can?

regal bear
#

The Powercre Crate emits a blueish light

shadow iris
regal bear
#

The lava prefabs emit orange/red light

shadow iris
#

but i will try that salvage timed trick

shadow iris
#

btw the lava light scales with the prefab i think

#

which is unique to it

regal bear
#

I find all the lights tend to LOD out fairly early too, so you have to get quite close to see them emit.

shadow iris
#

idk why but the yellow flashing arrow sign has early LOD

#

i used a scaled physics cone as a back cover for it

regal bear
#

yes annoying

#

nice

shadow iris
#

apparently some of the small desert rocks (small desert rough/smooth in tmmm i think?) also disappear at distance for some reason

regal bear
#

That makes sense though - they are small

shadow iris
#

but i realized flashbulb uses desert pointy lumpy for the rocks along the bottom of cliffs (e.g. by the tunnel on treasure island)

#

and actually uses pointy lumpy along the sides of cliffs too

#

strangely flashbulb use desert tall lumpy extremely rarely if at all

shadow iris
median cobalt
#

gonna put this here, theres a mesh splitter for 2.79 i might be testing out later to see how far i can push loading alot of smaller segments of a map to make something look proper

#
Blender Artists Community

The error suggests the code is expecting at least one modifier. Here is hopefully a tweak that checks if there are any modifiers before trying to access the first one: MeshSplit1.1.1.zip (1.8 KB) Do bear in mind that it’s been a few years since I wrote that, and it was written for v2.79, which I’m not using since 2.8x is the current versi...

#

this splits meshes by 3000 polys so it might need to be changed to 2000

serene magnet
#

I have a script that I use for mine that splits my meshes into 500 polygons each but it have to change parameters by hand each time so it's probably not great

scenic echo
#

i tried to color distance sensors with custom colors but it seems like they have the same issue as thrusters =(

topaz arrow
#

try a different color that you set?

#

maybe that will work

scenic echo
topaz arrow
#

i mean instead of using R, use G or B. or instead of secondary, use primary or sth

#

cuz the vast majority of CMM experimental works

scenic echo
#

like how it's bugged for thrusters

topaz arrow
#

so its different with different blocks 😭
wth is the bug?

scenic echo
#

from what i know and experimented rocket thruster, space thruster and distance sensor have this issue, it may be all thrusters but i havent tested all

scenic echo
topaz arrow
#

thats some truly weird stuff. i sure hope when/if they fix it, they will tell us what caused that behavior

median cobalt
#

You could "apply all transforms" in blender to center the origin to 0 0 0

serene magnet
#

hmm

#

i could try that

#

i havent been splitting my most recent stuff because its low poly but i might need to

paper bone
#

any idea why the function configure Object does not know what my key value is?

--UI creation:
for key, object in pairs(objectTable) do
        tm.playerUI.AddUIButton(playerId, "btn"..object.name, object.name, configureObject, key)
    end```

```lua
function configureObject(callbackData)
    tm.os.Log("Configuring object: "..callbackData.key)
end
#

cannot access field key of userdata<Trailmakers.Mods.Api.ModApiPlayerUI+UICallbackData>

#

i had to use CallbackData.value and not CallbackData.key
silly me

#

oh actually it is .data to get the index and not the text

regal bear
#

Yep I've done plenty of 'oopsies' like that too 🙂

serene magnet
#

Quick question: is there any way to change the grip of a model? I wanna make a snowy map but wanna make it be more slidey than normal custom models

#

Either the grip of the model or just the grip of tires overall

cinder spruce
shadow iris
#

and the airborne grassy islands have grass too

paper bone
#

~~i guess the Raycasts really dont like the Trailmakers terrain ~~
easy fix apperently there are some kind of triggerboxes there

#

exports nicely,
all thats missing now are instructions and then i will release it

scenic echo
#

DOes anyone know all of the rgb values of the colors in buildmode?

paper bone
#

I think you could just use a color picker, iirc the color picker from gimp can pick colors from anywhere on your screen

scenic echo
topaz arrow
#

Ye, and the game may put a filter the screen, so i wouldnt trust gimp for that

scenic echo
#

i seem to already have a mod that gets the colors HappyCat

serene magnet
serene magnet
#

damm

paper bone
#

lol

serene magnet
#

less excitement

#

lets gooo

#

you are a fuckin lifesaver

#

all i gotta do is replace it with my models and clean up the roads

#

you have genuinely saved me hours of work

paper bone
#

:D im happy it already has been usefull for somebody

#

it currently only supports prefabs but i guess it should be possible to change it to also support custom models, but that will have to wait

serene magnet
paper bone
#

Fair, btw it always exports with a data footer that includes things like Trailmappers Camera position and things like that, keep in mind that you will have to remove that when merging the files

serene magnet
#

Yep

paper bone
#

does anyone know where downloaded mods save their dynamic data? it isnt near the lua file so i was wondering

#

ah found it
#modding-archive message

paper bone
serene magnet
#

yeah. i run into limitations pretty much every single day

#

ill add another soul to my list of offers to the devs if we can just get transparency for textures

#

like i can just make all my models formed to my textures to eliminate transparency but that adds so many extra triangles that it hurts performance

#

and god knows performance already hates me enough

topaz arrow
#

or even just get the lines of text closer

shadow iris
#

seems like barrels not despawning was fixed sometime after 1.9.5!!

shadow iris
#

yeah it was working for me with trailmappers map

regal bear
regal bear
shadow iris
shadow iris
#

@regal bear mod idea: inactivity kick - kick inactive players after x minutes

#

or maybe despawn their builds

shadow iris
#

i forgot if disabling repairing was per-player or not

regal bear
#

Yeah disabling repair is per player

shadow iris
regal bear
#

Funny I thought of that exact thing the other day when updating Repair Restrictor 🙂

shadow iris
#

i think that idea as a standalone mod would do very well

#

as it also prevents in-motion repairing during dogfights- which a lot of people dislike

regal bear
#

I've had code that detects a repair operation but only the standing still one. Can't detect moving repairs or transforms.

regal bear
shadow iris
regal bear
#

But preventing them is easier

shadow iris
regal bear
#

So if the health of the structure suddenly goes up compared to a recent baseline I call it a repair and it gets counted. I also check changes in the number of structures as that indicates certain things too.

shadow iris
#

surely its not that hard to get velocity

regal bear
#

easy

shadow iris
#

actually probably the hardest part for me would be getting velocity, from there it would be mod thumbnail

regal bear
#

--- Gets the velocity of the player inside of the structure.
--- @return ModVector3
function ModStructure.GetVelocity() end

--- Gets the speed of the player inside of the structure (m/s).
--- @return number
function ModStructure.GetSpeed() end

shadow iris
#

💀

regal bear
#

so check if player is in seat (tm.players.IsPlayerInSeat(playerId)))
if so check if velocity is above a threshold
if so prevent repairs
if not allow repairs

#

Feel free to look at and use any code in my mods

shadow iris
#

and i am amazed that not of your mods ever mentions modstructure

#

NOIRO IS GOATED

#

STOLE HIS METHOD FROM ONE OF HIS MODS

#

WORKED

regal bear
shadow iris
regal bear
#

lol you missed it in my code then

shadow iris
regal bear
#

fair enuf

shadow iris
#

probably good enough. works in multiplayer on the first attempt

#

and as i expected the mod thumbnail is the hardest part lol

regal bear
#

I'd suggest making an Activate/Deactivate button

shadow iris
#

already exists in the game, might as well use it

regal bear
#

Annoying for the host

shadow iris
regal bear
#

Also allows host to send a message to all players when it's activated or deactivated

shadow iris
regal bear
#

up to you

shadow iris
#

i can probably code that myself just fine but i dont think i really need to

#

if i were to add that it would probably be a ctrl+ bind

#

and then a global subtle text probably

regal bear
#

Also this might interfere with other mods that set repair enabled or disabled becuase you are doiing it constantly. You could first check and store the status of RepairEnabled.

shadow iris
#

might want to antialias the outline lol

#

some speedlines too

regal bear
#

Maybe a big X over the spanner?

shadow iris
regal bear
#

Yep looks good. Just thought that you wanted to show that it's blocking moving repairs.

shadow iris
#

oh my god the thumbnail upload bug strikes again

#

time to fight the workshop for 3 hours trying to get it to upload the thumbnail

#

oh i swear to god if its because i need to update steam..

regal bear
#

Never had that bug. What happened?

shadow iris
#

and guess what updating did

regal bear
#

dang

shadow iris
#

am i really the only one with this issue

#

can you try uploading a mod right now?

regal bear
#

The file is named correctly?

shadow iris
regal bear
#

Preview.png?

shadow iris
#

dude i swear if its actually called Preview.png im going

#

FUCK

regal bear
#

lol

shadow iris
#

I FORGOT FROM LAST TIME LOL

regal bear
#

Shouldn't the mod be called "No Moving Repairs"?

shadow iris
#

and also DAMNNN Preview.png BETRAYED me

regal bear
#

Maybe give it time

shadow iris
#

and the mod description says it very straightforwardly

shadow iris
regal bear
#

What dimensions and file size is the preview file?

shadow iris
#

it broke even with dethrone patches' icon, it is not an issue with the preview image

regal bear
#

🤷‍♂️

#

The mod was showing up on Steam but now it isn't

shadow iris
#

did it show the default gray thumbnail or the actual one?

regal bear
#

It was the default grey

shadow iris
#

yeah its not working on steam either

shadow iris
regal bear
#

I've never had to put the full path

#

You could have made the preview a bit bigger 🙂

shadow iris
#

it gets scaled in game though

regal bear
#

yup

shadow iris
#

I LOVE STEAM

#

i made it 128x128 ill see how that goes

regal bear
#

I think you should mention in the description that this mod will prevent other mods from blocking repairs

shadow iris
#

man close enough right

shadow iris
#

there you go lol

#

oh i should put a grid behind it because its a bit flat rn

regal bear
shadow iris
#

thats what i got out of the mod description

regal bear
#

Ah yes true. I thought the mod's second button was for moving repair but it's blocking build mode.

shadow iris
#

new challenge: figure out keydowncallback

#

(and also not detect while chat is open)

shadow iris
#

fixed it. it was because i had it inside of update()

regal bear
#

Just about to ask that 🙂

shadow iris
regal bear
#

Yes was just about to ask if you were running it in update 😉

scenic echo
shadow iris
regal bear
#

Variables and/or tables

shadow iris
scenic echo
regal bear
#

Update runs every mod tick from top to bottom

shadow iris
regal bear
#

You can set variables per player in a player data table

scenic echo
# shadow iris store the old IsPlayerInSeat

In the function that gets called when a player joins you can do
PlayerDataTable[playerId]={
OldIsPlayerInSeat = false
}

And then to store the value you just do PlayerDataTable[playerId].OldIsPlayerInSeat=value

#

That's how i do it

regal bear
#

Yep. And make sure to actually call the OnPlayerJoined function.

shadow iris
#

im able to detect entering/leaving a seat, i think

#

i wont need to detect entering a seat but its cool i guess

shadow iris
regal bear
#

So you're not just checking IsPlayerInSeat?

shadow iris
#

yall im cooking

shadow iris
#

detecting entering a seat = one trigger when you actually go into a seat

#

btw it is correctly detecting when you get ejected from a seat :D im gonna test rollovers now

#

IT WORKS FOR ROLLOVERS TOO

regal bear
#

cool

shadow iris
#

im goated, it works

#

aw man i die when i leave a seat intentionally

regal bear
shadow iris
regal bear
#

It doesn't really matter. There are ways to make it only check under certain circumstances. I do seat checks a fair bit in my mods.

near parcel
#

You could have checked when the variable changed value (by storing its previous value as well and comparing them)

median cobalt
#

if it doesnt return userdata then it might be that it reruns on ANY keypress regardless of id

scenic echo
eternal monolith
#

Just to confirm: I don't see any functions for changing the power of pistons, so I am assuming that is not possible correct?

near parcel
#

Pistons don't have power

shadow iris
eternal monolith
shadow iris
shadow iris
#

i think i got it working again

shadow iris
#

i can now detect when players de/accelerate at a certain amount

wispy crescent
shadow iris
shadow iris
#

the subtle message is shown but the player is not killed? the other use of KillPlayer works just fine though

paper bone
shadow iris
#

i figured that out

#

it was because i was giving it player.playerId instead of playerId

#

although i think its stopped working again ?

shadow iris
#

how can i detect when a player respawns?

eternal monolith
shadow iris
eternal monolith
shadow iris
#

alright i might have fixed randomly dying on respawn with a really really dumb fix

#

but i don't know why deceleration death doesnt work

shadow iris
eternal monolith
#

60 kph in one frame seems intense, are you getting that kind of acceleration values?

shadow iris
#

and when i test ingame 60kph minimum seems pretty good

eternal monolith
#

Sorry, I'm a physicist at heart so I call everything acceleration

#

Huh, very odd that it is not working

shadow iris
#

oh yk what, im gonna move the DecelerationDeath function above the update one

#

didn't work

eternal monolith
#

bleh

#

The only thing I can think of is if somehow the playerId being passed into the function is not right, or has somehow changed since it was saved thinking_girl_tm

shadow iris
eternal monolith
#

oh right, the UI elements, yeah those shouldn't work if my theory was true. blehx2

shadow iris
#

i made the subtle message display the playerId, and it IS 0, which is my playerId

eternal monolith
#

Have you printed out tm.players.CanKillPlayer(playerId)?

shadow iris
#

what would that do?

#

oh do you mean its return value? iirc its always nil

eternal monolith
#

It would display false if there is something stopping you from killing the player. It should be true, but, I'm grasping at straws right now

shadow iris
#

i'll try it anyway

eternal monolith
#

That's weird! Mine says it returns a boolean 😮

shadow iris
#

IF player CAN be killed... odd

#

OH

#

thats a different thing lol

eternal monolith
#

Oh, yeah I just saw these are different functions lol

#

I just woke up from a nap, the ol' kitty Brian is not purring on all cylinders yet

shadow iris
#

why is the player invincible now?

eternal monolith
#

Welp, there's yer problem! 😄 But why??? 😠

shadow iris
eternal monolith
#

I am assuming that you have Invincible players turned off in session right?

eternal monolith
#

Thought I'd ask anyway

#

Hmmmmmm

shadow iris
#

all false, but update does work

#

oh NOW update doesn't kill me?!?

eternal monolith
#

I wonder if maybe there's a loose global variable named playerId out there somewhere messing you up

#

I don't use Lua very often so I don't know how it handles that sort of stuff

shadow iris
#

hmm, the logging is a bit inconsistent for both

eternal monolith
#

I suppose it wouldn't hurt to call tm.players.SetPlayerIsInvincible(playerId, enabled) before trying to kill the player :\

shadow iris
eternal monolith
#

😄 nice

shadow iris
#

i also tried re-enabling the mod while the player invincibility session option was off and that didnt work

eternal monolith
#

bleh

shadow iris
#

x3 x4? x3

eternal monolith
#

lol yes

shadow iris
#

i think i actually figured out why respawning triggers deceldeath

eternal monolith
#

ooo?

shadow iris
#

its for the same reason getting into a vehicle after leaving a fast moving one

#

because it jumps from one value to 0 in 1 frame (because it updates after getting in)

#

thus if i also check for inseat/oldinseat that SHOULD fix it

eternal monolith
#

ahhh, like because it is only tracking it while you are in a seat, yeah that makes sense

shadow iris
#

wait wtf whyd it go from +29 (last tracked value) to -309 (new tracked value starting from ~0) when entering

#

oh god to detect entering a seat i gotta store the previous frame's F key value too

eternal monolith
#

omgoodness

shadow iris
#

because inseat and oldinseat are both false when you press f

#

but that means you can be anywhere when you press f

#

regardless of if theres actually a seat

#

and guess whatttttt
i dont think it actually sends playerid in

#

so i dont think i can store this per-player

#

which means i cant store past frame state

#

yeah i'm lost on whats causing killplayer to not work, probably gonna need to summon krunch's magic when hes on

eternal monolith
#

I'm interested to see what he says because I've got nothing at this point

shadow iris
#

@median cobalt any ideas why kill player isn't working? sending lua in a sec

scenic echo
#

Maybe you need, in session options, to have the invincible player option off, not only in the mod

shadow iris
#

logs specify that the player is invincible despite the session option being off and setting all players to be killable via the function

scenic echo
#

It's not the first time finding broken functions

shadow iris
#

weird thing is that the killing used to work fine in the first written use of it

#

but since I added the invincibility function line it hasn't worked

scenic echo
shadow iris
#

I can't test anything rn cause its late but if somebody could test or fix the lua file I sent it'd be nice

shadow iris
#

it's before the first mention of killplayer

scenic echo
shadow iris
#

yeah or something to do with when I added the checks for logging

scenic echo
shadow iris
#

I should check on the not broken version if 1st mention throws a player is invincible error like the 2nd one does

median cobalt
regal bear
regal bear
regal bear
scenic echo
scenic echo
shadow iris
shadow iris
shadow iris
shadow iris
#

wait what if its a rate limit of sorts because my mod sometimes calls killplayer twice at once or while the player is already dead

#

yupppp now its not working

#

now ill restart my game

#

nah still false

#

wait is it because of build mode

scenic echo
shadow iris
scenic echo
#

does it kill the player if he is at -5000 altitude?

shadow iris
#

but that would cause the camera to be there too

scenic echo
#

then that's probably better than spawning a explosion

#

less laggy

shadow iris
#

yeahh but also looks really bad cause the camera during death is also in the void

eternal monolith
#

I think there are functions for controlling where the camera is but I haven't messed with them yet

shadow iris
#

i think this might be a problem with explosions (theyre too far behind to kill me)

#

actually this is kind of a cool unintended feature

#

its like your creation is turning too aggressively and rips itself apart
crashes and wall collisions still should work fine too

#

but a lot of people wont like this

paper bone
# shadow iris

any reason you are using the KeyState Variables globally instead of per player?

shadow iris
paper bone
#

ok

#

got it figured out now?

shadow iris
#

noiro told me that this should work?

#

gonna try it

paper bone
#

yes

shadow iris
#

oh it did work

#

wtf flashblub

#

the issue is clear as day now

#

yeah, backspace causes deceldiff to trigger

#

alright i think deceldiff on respawn is fixed

scenic echo
shadow iris
scenic echo
#

what it does

shadow iris
#

it makes it easier to be killed, more alike in campaigns

#

because even with player invincibility off, in sandbox its harder to die than in campaigns

shadow iris
#

it is

scenic echo
#

i know some seats are invincible to dying due to acceleration in both campaign and sandbox

eternal monolith
#

I'm really interested in the decel death mod, I think it would pair well with what I'm working on currently

scenic echo
shadow iris
scenic echo
shadow iris
scenic echo
shadow iris
#

oh my god why is backspacing so varied even in sandbox

#

DIFF IS 0

#

RAHHH

scenic echo
#

i think it might be lag

#

i remember going through the same problem when detecting blocks after a player backspaces

shadow iris
#

that is the correct diff for that time btw

#

i need to widen the clear gap then

#

time to add the other two variables

#

CurrentKph,OldKph,Diff

#

OH

#

I SEE WHATS HAPPENED

scenic echo
wispy crescent
#

Looks neat, you should make a thread for it

shadow iris
#

YUP, WORKS

scenic echo
shadow iris
#

now just gotta wait for flashblululululululb to fix KillPlayer and this mod will be fully good

shadow iris
#

but i know what i did and when based on speed and backspace time

paper bone
#

if you open it in vsc it will show in real time

scenic echo
#

i should start making my mods with logs, before i used the ui as a way to debug but logs definetly will be better

shadow iris
#

but again, i know when i do stuff and what causes specific log messages

#

fake news:

#

explosions also dont work-

paper bone
#

wdym there is no log file? the log file is always the same, only the content changes

shadow iris
paper bone
#

does it really? idk i always log when a player joins so i always log something instantly

shadow iris
#

ngl server logs mod would be awesome

#

yk log join/leave (username included), backspacing, spawning structures, repairing, when guns are shot(?)

#

yk ill add the regular killplayer function and if it fails the workaround is also ran

#

eh

#

who cares about killfeed anyway

#

W function name

scenic echo
shadow iris
#

this means IsPlayerInSeat MUST be returning true...

#

FLASHBULB WTF

#

it sets current/old/diff to 0 when not in a seat

#

works fine if i intentionally leave a seat with F

#

watch in horror as all of my log functions stop working

#

finally it triggered

#

as it turns out it actually just wasnt triggering because i was hitting the ground too hard causing tm to kill me before the mod could

#

sigh... respawning after death has the same bug as backspacing

shadow iris
#

NOO NOT AGAIN

#

we upload later because workshop is STILL BROKEN DEVS ISTFG FIX YOU GAME

paper bone
#

@shadow iris try ModStructure.Dispose()

shadow iris
paper bone
#

maybe that will help kill the player

scenic echo
#

might work

shadow iris
#

nah that would just kick the player out, no?

paper bone
#

it would delete the players structure

shadow iris
#

so what

paper bone
#

better than trying to blow it up with explosions lagging behind

shadow iris
#

ok at least the explosions work at all

paper bone
scenic echo
#

get the velocity in meters/tick and then add it to the position

#

this might help in the cases that player is too fast for the explosion to kill them

shadow iris
#

boo complicated

#

caveman go BOOM

#

🔥🔥🔥

#

caveman go POOF

#

wher cat go

#

😭

eternal monolith
regal bear
regal bear
#

Just chill and most probs can be sorted with time 😉

shadow iris
#

cant think of any ways to fix/simplify/optimize sensitive seats rn so im gonna work on inactivity kick

regal bear
#

For Repair Restrictor I ended up running some things at a much slower rate to ensure that certain detections happened first.

shadow iris
#

doesnt work too well when you're trying to store the previous frame's data. for me it runs fine, but i do have a high end pc for TM hosting it seems

#

8 player unmodded runs at 100% speed unless somebody teleports/respawns or a big collision happens

#

so basically 99% of the time it runs at 60fps

#

with 8 players

regal bear
#

Yes but you don't have to have all detections being instantaneous. I run a 'slowdelta' at 6 while the mod Delta is at 60.

shadow iris
#

itll look best at 60 fps. maybe i could run detections at 30 fps but idk. would need to do broader performance tests to see if that is necessary

#

probably most needed optimizations would be entirely remove the use of globals, clean up the code + improve readability, while at the same time improving exit vs eject seat detection and also flashbulb fixing KillPlayer

regal bear
#

It still runs at 60 for important things but killing a player half a second after the detection of their deceleration isn't a problem

regal bear
#

no

#

lag that misses a detection for a kill looks bad

shadow iris
regal bear
#

I'm just talking about getting accurate detections

#

Eg. you could slightly slow down your deceleration detection (check over more than one frame) to ensure accuracy - just an example.

#

Also it might be why you were getting multiple player kills as you mentioned earlier.

shadow iris
#

i imagine theres no way to detect single/multiplayer besides a 2nd player joining

regal bear
#

Not sure. I haven't tried to detect that.

shadow iris
#

gore (i havent done special keys yet)

#

no im not keeping this

eternal monolith
#

out of curiosity, what is the purpose of keeping a list of key names? Not critisizing, I just can't think of what you are using it for

shadow iris
median cobalt
eternal monolith
#

To confirm my understanding is correct: When you hold left mouse on a ui button it only triggers once per click. There is no (quick and easy) way to make it trigger multiple times while being held. Is this correct?

shadow iris
eternal monolith
shadow iris
#

THEY MADE CHASERAI WORK AGAIN

#

WTF

#

IT HAS NO TEXTURE

#

BUT IT WORKS

#

wait do some of these race start pfbs actually exist??? but theyre so far away in the sky and rotated

#

yooo what
PFB_ChallengeSignUpExpedition

#

they have like 800,500,-430 ish offset though

#

and the "signup" billboard is offcenter from the start zone

near parcel
shadow iris
eternal monolith
shadow iris
shadow iris
#

very fun

eternal monolith
#

aaa that's cool!

eternal monolith
#

Science is hard ya'll cryingchirpo

topaz arrow
#

could i get the modder role?

shadow iris
eternal monolith
#

Not sure what the modder role is for but I spend most of my time in this game modding now so....?

shadow iris
#

i know its used for making posts in #1123915629653667943 and idk what else

serene magnet
#

I haven't built anything in ages

#

But anyways once again shoutout to sprinkle tool for being an incredible mod

#

Mapped my terrain and put down trees

eternal monolith
shadow iris
shadow iris
#

truly a General modding chat moment

serene magnet
#

Like I still have to fix the trees for the 7th time and I have to fix the hitbox on the nonstatic objects

#

Not to mention that this is like my 9th attempt at making a map. Hopefully this one doesn't have a huge flaw I'm not seeing yet

scenic echo
scenic echo
topaz arrow
scenic echo
topaz arrow
#

Well, thank you Johannes then!

eternal monolith
#

My mod keeps making the game crash, how do I get support? Do I create a new thread with the error report or is there something else I am supposed to do?

wispy crescent
#

You might be able to get a dev to look at your error logs to see if that points to the problem

eternal monolith
wispy crescent
#

I wouldn’t dm them but post about it in bug reports

radiant lion
#

Thread is for the best, mod errors are treated different than normal ones, and Devs aren't the only ones who can help

scenic echo
#

my code is so broken that sometimes i need to fix my mod by removing a line of code, saving the lua file and then putting that exact line of code back

topaz arrow
scenic echo
ocean delta
#

can i mod xbox?

cinder spruce
shadow iris
#

just try saving again, if its that then you dont have to edit

shadow iris
#

using setistrigger for no collision (via trailmappers export rn) seems to not remove collision for prefabs, currently known with the grayrock+orange rock prefabs but it happened with a different one too that i forgot

#

can somebody else confirm this?

eternal monolith
#

I have a map where there is an invisible cube with CanCollide false where you can still collide with the top of the cube only if you are moving downwards and the back of the cube only if you are leaving the inside and going out. I might post it somewhere if it is useful for bug hunting

shadow iris
#

the convex collision cant be removed so people usually put vertexes super far out in blender so the convex collision is far away

eternal monolith
#

I see, interesting

serene magnet
#

And that's seems to be both with trailmappers export and handwriting the code to spawn them in

scenic echo
regal bear
shadow iris
#

hmm i found more details with the barrel despawning bug:

  • barrels respawn when theyre LOD'd (players are far away from it)
    • this happens when you clear them while up close, and then move away
    • they immediately respawn if they are cleared while players are far away
    • once respawned they will be untouchable by the mod (needs testing)
  • pfbs with ai (tested with PFB_Runner, PFB_Runner-Monkey) also respawn with side effects
    • no collision
    • wandering ai preserved partially? needs more testing
#

oh does that happen for all physics/ai pfbs

shadow iris
#

dispensable prefab scales (for the ones that scale visual and collision mesh weirdly)

PFB_Dispensable-BeachBall 2
PFB_Dispensable-Cone 2
PFB_Dispensable-MetalCrate 2
PFB_Dispensable-Mine 0.05 (visual ground contact)
PFB_Dispensable-Present 1
PFB_Dispensable-Torpedo 0.5
PFB_DispensableBall 0.49 (visually identical to PFB_DispensableBoulder?)
PFB_DispensableBoulder 0.61
PFB_DispensableCube 0.5
PFB_DispensableSnowball 0.5
PFB_DispensableSphere 2

shadow iris
#

PFB_TimeOfDayTrigger did SOMETHING to the sky for like 1 frame, wtf

#

and i cant seem to reproduce the effect? idk

#

maybe it cant change the time of day because the cycle is locked? idk

shadow iris
#

they ACTUALLY FIXED PFB_SpaceWreckage2!!!

shadow iris
#

kungfuflag is also working again

#

forgot to say that here

shadow iris
#

bug: custom cameras do not work when player's vehicle camera is set to orbit or sticky orbit

#

custom camera also significantly increase fog; dunno how this could be used but its cool

eternal monolith
shadow iris
#

lol what i paused the game while in a custom camera while underwater is this my mod or something

shadow iris
primal plaza
#

wanted to ask here as i'm messing around with custom maps and theory testing, is there any way to randomly rotate a asset while map is loading via a random number / variable or even randomly only SELECT a handful of props to spawn or not spawn

I.E i want to randomly rotate a custom asset between 1-180 on load

I.E i want to spawn a rock every 1/10 times the map loads, every other time the rock isn't there.

i'm asking this because my knowledge of code is limited and no better with the knowledge of the modding capabilities of trailmakers

primal plaza
#

i'd assume the first is possible with some coding, second one i'd be doubtful but still assume its possible

shadow iris
#

like if object has randomspawnchance==0.6 and randomvalue>=0.4 then spawn

primal plaza
#

i think what i'm trying to do will be possible

#

just gonna need to figure out the code part to connect the rotation variable to the random number

regal bear
# primal plaza wanted to ask here as i'm messing around with custom maps and theory testing, is...

You should be able to do both those things.

You can use the "math.random()" and "math.randomseed()" lua functions.
https://www.lua.org/pil/18.html

For the second one you'll also need to write out a file to save the map's load count, and load the file each time the map loads
"tm.os.WriteAllText_Dynamic()"
"tm.os.ReadAllText_Dynamic()"

Alvaroping's handy
Trailmakers API/Lua reference:
https://github.com/ALVAROPING1/Trailmakers-API-LuaLS/blob/master/library/tm-api.lua

fast oyster
#

is reshade against tos since its an DLL?

radiant lion
#

Is it? Probably (don't remember exactly what the EULA says)
Will the devs be fine with you using it? Also probably, the devs are usually chill with modifying DLLs as long as you don't ruin the game for other people, reshade is local and only affects you

#

I am not a dev, so don't blindly trust that, but I am mostly sure

eternal monolith
#

The way I look at DLL mods is that they can contain potentially harmful code, so they devs don't want people to normalize downloading DLL mods from each other. Modding your own game, in a way that is not cheating, is (probably, I'm not a dev) okay from my understanding. That said, I won't encourage DLL mods since they don't want them to happen

cinder spruce
dry sentinel
#

Reshades pretty universal in general, not even specific to Trailmakers

near parcel
#

afaik reshade works at the driver level, it doesn't directly modify the game

median cobalt
#

Have to agree with alvaro for once, Reshade hooks into draw calls directly to get geometry data etc, so you can run stuff like wide ambient occlusion or raytracing

#

OFC this will hog the actual frame gen so you might encounter half the framerate

#

To my knowledge you cant gain proper advantages from it since Trailmakers does Culling which Reshade cant undo so anything not in the BSP area will just dissapear

#

however, game code injectors are banned from usage, defacto

fast oyster
shadow iris
fast oyster
near parcel
#

even if it dynamically patches the game in-memory, considering it just changes the graphics, you will likely be fine as it doesn't hurt anybody

fast oyster
#

the only thing it will be hurting is my frames

shadow iris
fast oyster
shadow iris
#

but as a player do they match the area?

fast oyster
#

ig

#

as long as you can get out of the spawn point it will make sense placement wise

fast oyster
#

the sand kinda throws it off

shadow iris
fast oyster
#

can you import blender models into the game?

#

im not a modding guy tho i know basic python, im want to make a desert map with a pyramid and stuff and thought just making it in blender is easy since i know the program

shadow iris
#

but they cant be super duper high quality

#

theres a 32767 vertex limit i think

fast oyster
#

so can i make a full map with textures and all

#

it would be a pretty small map

shadow iris
#

yeah and textures the maximum practical size is 4096x4096

#

but i would recommmend 1024x1024 if you can get away with it, 1024^2 loads a lot faster

fast oyster
#

ok, thanks for lmk

shadow iris
# fast oyster ok, thanks for lmk

textures use png, and the alpha/opacity channel determines roughness. the lower the opacity of a pixel, the rougher or less shiny it is

fast oyster
shadow iris
#

2.15 mb wtff

fast oyster
#

its very simple as i want too figure out

#

how to import it first

shadow iris
#

yeah this isnt going to fully load into tm, tm is gonna start removing random triangles until it works

fast oyster
#

ok

shadow iris
fast oyster
#

idk,its my first time, (sorry)

shadow iris
#

if it has less than 32767 triangles then yes

warm canopy
scenic echo
eternal monolith
# warm canopy

I've occasionally thought about making a horror story mod, this would be perfect for that omgosh!

#

Mod idea: Gravity gun. Allows the player to pick up and move physics objects as if their character is holding a tractor beam block

warm canopy
#

Noiro did it with the hands mod, its a tad janky

shadow iris
shadow iris
#

@warm canopy i overwrote the default list audio but this audio is new i think

#

there may be more that arent on your site, idk

#

yeah new audio ids with 2.0

empty nexus
#

is there a way to change terrain using mods? Current trailmakers maps just move and resize assets, but what about changing the actual terrain? I was thinking about making a f1 racetrack with uneven terrain, which is basically what we have in real life, something similar to the track on melvin island, but the "smoothness" of driving on the melvin island track can't really be achieved with just normal assets.

empty nexus
cinder spruce
#

i know right
api being kinda left in the dust DoggoScream

empty nexus
#

just like there should be a way to change camera sensitivity for mouse and keyboard Chadhannes
||i know this has nothing to do with modding, i just wanna show that i'm mildly infuriated||

eternal monolith
#

Technically speaking it should not be impossible to extract the terrain from the game into a 3D modeling program, make your changes there, and then import it back into trail mappers. But don't ask me how exactly to do that because sigh looong story

cinder spruce
#

but then there you're losing the "smoothness" of using in game terrain, like he needed

#

custom models aren't the best to drive on

eternal monolith
#

I thought custom models were how people did terrain so now I guess I'm confused

cinder spruce
empty nexus
cinder spruce
empty nexus
#

that's a bit silly

shadow iris
dry sentinel
#

Probably some way including a bunch of raycast points

regal bear
# empty nexus can you not use the tarmac texture by doing that? Cuz i've seen some race maps b...

You could use Blender to create your track and verge surfaces, then build up terrain around it using prefabs (eg like Greenstone Circuit: https://steamcommunity.com/sharedfiles/filedetails/?id=3355601599&searchtext=greenstone)
For F1 style tracks the custom object surface is perfectly fine. All the asphalt surfaces in my Asphalt Valley map are custom objects and that map is designed for making race tracks using Track Creator Plus.

empty nexus
# regal bear You could use Blender to create your track and verge surfaces, then build up ter...

but what i'm talking about is the fact that you can't make those custom objects have a "grippy" texture like tarmac, the asphalt for the circuit on your map is not actual asphalt and works very similarly to grass instead, my vehicle with top speed of 355 kph barely reaches 220 kph on this material, the metal diamond plate on the other hand is very grippy, acting just like tarmac does on any trailmakers map

#

even the "grass" on your map has better grip than the actual circuit, because it is an actual asset from the game

regal bear
empty nexus
#

i know (that the grass is rock)

scenic echo
empty nexus
#

well, it's a vehicle with different "gears" so to say

paper bone
scenic echo
# paper bone

Wait you are not in f5, free cam without f5 sounds nice (it took me a few seconds to see that you had ui and it wasn't the f5 ui)

topaz arrow
#

when using the camera set position on a fast moving block, it seems the camera is offset from the block. does anyone know how to combat this? idk if the offset is linear, doesnt feel like it, and idk how to move the camera to stop this from happening

#

here i tried combatting this (there is a static offset of the camera + linear based on speed, didnt seem to help much)

warm canopy
#

It’s because the camera teleports between positions rather than move, it’s unavoidable. You can use lerp to try and smooth it out a little

topaz arrow
#

even worse, i think this may not be a camera specific issue but rather be in general. that is: Modblock.getPosition() is not at the same place where the block is visually when at high speeds

scenic echo
scenic echo
scenic echo
topaz arrow
scenic echo
topaz arrow
scenic echo
topaz arrow
#

From my last tests felt more than 8, but i did some funky offsets so i will need to check what those offsets did (since i tried compensating for it)

scenic echo
topaz arrow
#

Hmm, maybe im misremebering the missile i used then? If you want, i can ping/dm you when im free and we can both test it out

scenic echo
topaz arrow
#

Alr, will do!

topaz arrow
scenic echo
topaz arrow
scenic echo
topaz arrow
#

Huh

topaz arrow
#

Camera there is doing a funky (i made it do the funky to be precise)

scenic echo
# topaz arrow Huh

not gonna lie but the camera catches the missile but it seems the flame particles are in front of the missile

topaz arrow
scenic echo
topaz arrow
# scenic echo what was the problem you had with the camera?

Same with the particles to be honest. I wanted the camera to be x blocks behind the missile, but as the missile accelerated, the camera moved further towards and then in front of the missile. The gif shows some funky code that isnt compensating properly, but the particles are on the block position which also shows the issue

topaz arrow
radiant lion
#

Problem with the camera position is that it doesn't seem to be delayed by just one tick, if it were the distance from the missile should be linear to the speed, and a fix for that is technically present in what he's doing.
The fact that the camera goes from behind to in front of the missile suggests that the original camera/missile offset grows logarithmically for some reason

topaz arrow
radiant lion
#

If the linear adjustment was wrong it should either slowly get further behind or further in front, but here it's switching from back to front

#

Unless it's the static offset doing funky stuff

scenic echo
#

looking at the gif the speed which the camera is closing in on the missile seems constant

scenic echo
topaz arrow
scenic echo
near parcel
scenic echo
near parcel
#

Spawning/moving/updating is

scenic echo
topaz arrow
topaz arrow
topaz arrow
scenic echo
shadow iris
#

ive managed to make a mod that can (somewhat unreliably) detect dropped server performance!

shadow iris
#

it now displays frametime in milliseconds (i dont know how accurate this is, or if its accurate at all)

#

but going off of ctrl+i networking hud's performance percentage and the millisecond behind value i think its accurate?

shadow iris
#

so setting physics speed based on lag does work but trailmakers does NOT take a fast changing physics speed very well (it crashes the server near instantly)

#

what might be happening is that changing physics speed messes up the frametime calculation, which makes it think its running slower, and then speeds up/down the game in a wave-like pattern

#

i have no idea why creations get absolutely sent though

#

changing physics speed too quickly or too drastically or a mix of both causes:

  • inaccurate collisions (bouncing with abnormal velocity)
  • extreme velocity applied to some weld-groups(?) as if you used many hinge glitches
  • weld groups glitch similarly to how distant weld groups behave
#

changing physics speed past 200% (2.0) can cause severely incorrect things to happen
try 300% for a mild example
try 500% for a severe example
try 1000% to deliver all of TM's technical debt to your door

shadow iris
shadow iris
#

according to this mod i made, repairing (including motion repairs) and teleporting are by far the most performance heavy actions in the game

shadow iris
shadow iris
#

seems like ModStructure.Destroy() is a bit unstable when used at the same time that a structure is spawned in

ModStructure.Dispose() seems to break build mode quite a bit, got stuck with a ghost gimzo and constantly rotating anything i had selected. was also unable to exit build mode, some blocks were "locked"

#

⬆️ ModStructure.Dispose() issues