#General modding chat

1 messages Β· Page 11 of 1

paper bone
#

oh i guess i still need to fine tune it a bit

#

it came to ~62k before it crashed

warm canopy
#

Do you have the code so I can also try?

formal crane
# paper bone

you hit the hard limit of PioNet sync. objects πŸ’€

paper bone
warm canopy
#

Damn I wanted 500,000 trees

paper bone
#

@formal crane i dont remember if you have already answerd this but
Are you perhaps also looking at alternatives/improvements for the mesh importer?

median cobalt
#

proceeds to add a render pipeline thats based on PBR hidden behind advanced settings

surreal junco
serene magnet
#

I'm pretty sure I hurt Frans mentally with 20k though so maybe 500k isn't a great idea

median cobalt
#

gonna be looking into my multiplayer HP mods and make them look a bit better today, if anyone wants to help out with the technical block names of the dlcs after 1.9.5 id be glad

median cobalt
#

also, about the richtext part

#

if someone has extensive information about the glyphs, thatd be great

#

oh theyre thrown together

#

guess its worth making a small thread

median cobalt
#

oh thats not good

#

i cant overwrite mods anymore

#

its now making duplicates instead even though the mod folder did not change name

#

@formal crane we have issues with overwriting mods now, it seems ; trying to update my mods results only in duplicates

paper bone
#

update through steam maybe?

median cobalt
#

steam duplicates them instead of overwriting them

#

i cant just update them manually through steam

paper bone
median cobalt
#

i guess everytime a new version is due itll be a new mod

median cobalt
#

i have not changed my folders name since v 1.0 and im at 2.4 now and it breaks

paper bone
#

when you do it through the Trailmakers upload menu or when you actually do it on the steam workshop page?

median cobalt
#

when i do it through the trailmakers mod menu AND when i do it through the workshop page

#

both seem to break now

paper bone
#

oh

median cobalt
#

now all the new parts work as intended on the mod atleast, so thats good

formal crane
median cobalt
#

i mean it has been

#

i was able to overwrite mods before

#

its how i kept updating my multiplayer HP mod

#

from v1 to 2.3

#

now in 2.4 it broke

regal bear
#

"PFB_StoneWall_Large" seems to no longer cast a shadow πŸ‘€

serene magnet
#

August 28th, our prayers will be answered

formal crane
#

it will be pretty chill

serene magnet
#

I pray for anything at this point LOL

#

You could fix one thing and id be happy LOL

formal crane
#

And we still working on it!

serene magnet
#

I might actually cry, it's so beautiful.

formal crane
#

I will say that we have prioritised bug fixing like I have been rambling about in here for a while now.
So not a lot of new stuff.

That story is still not done and will continue for a while until we smashed all the major broken things.

serene magnet
#

I don't even care about new stuff. The fact that we aren't left to rot is what's beautiful to me.

summer cairn
#

yea im completely fine with getting bug fixes over new content cuz they can be much more annoying

scenic echo
serene magnet
formal crane
#

This shits hits harder with voice message 😭

Glad to hear! Lets gooo

warm canopy
#

antimatter and his voice messages - never change

serene magnet
warm canopy
#

I think you are one of the only people on discord that use that feature, nothing wrong with that though

serene magnet
#

It's so nice that I can properly express tone using VM's. I'm terrible at doing it over text LOL

cinder spruce
#

ooo frans on stream tomorrow
peak

thorny sparrow
formal crane
#

COMPUTER - HALLUCINATE THE TEXT

cinder spruce
#

i know there isn’t a ton of new content so will the stream also be including some larger bug fixes?

formal crane
#

I am cooking up a demo yes. But wont include 80% of the fixes.

cinder spruce
#

im guessing you’re just going to show off the full changelog here at some point

formal crane
summer cairn
paper bone
#

I pray for server owned structures johannespray

median cobalt
#

oh right, sorry

#

done

#

btw frans do you have any way to look into if perhaps the workshop api changed

#

cuz its still trying to duplicate items

#

i cant manually reupload code into a workshop item either

#

unless id actually tap into the pure API itself which i dont feel like is aligned with the whole TOS

formal crane
median cobalt
#

would be worth asking steam directly but i wont get nowhere , not being a dev nor on a high priority anyways

thorny sparrow
#

Is anyone else having the issue? If it’s unique to you it’s probably not related to a change with the API…

topaz arrow
formal crane
topaz arrow
warm canopy
#

Not had the issue

paper bone
#

heatmaps properly implemented

median cobalt
#

this is an issue that is happening at the level of the api, in either way

#

the mod directory didnt change, i have not changed where the game is located, i have been updating it since v1.0 and only now do i get this issue

#

before i was able to overwrite the mod with a new name and new description every version change

#

now it duplicates EVERY mod including those without name changes OR description changes

#

making overwriting mods essentially useless

near parcel
#

If nobody else can repro it, it's either you or your pc. The API/game is fine

formal crane
ivory agate
#

Wrote this so I can come back to it later

#

Or I guess I oculd have just followed it but yeah

#

I might make a custom map

median cobalt
#

only thing i change is the end of the title and a new description when its a new version, but that hasnt ever made a duplicate up until now

near parcel
#

That's indeed user error

median cobalt
#

its always mods/multiplayerHP as a directory

#

has never been different

#

and that seemed to work for like... ages

near parcel
#

That never worked

paper bone
#

πŸ–ŠοΈ

formal crane
#

With that said; I think there is a lot of confusion in this and it could be improved.

But for now. I see no direct issue.

formal crane
paper bone
#

yeah

formal crane
# paper bone yeah

What sort of heightmap data are you using? I wouldn't expect image since you cant really read the pixel data.

ivory agate
near parcel
paper bone
paper bone
#

i first wanted to read the binary data of the image using the lua mod but i was advised against that lol
(probaply for the better)

formal crane
ivory agate
#

Oh okay yeah I saw the frans edit

#

-# Though I don't even have an lsp because I just use notepad like an idiot lol

serene magnet
ivory agate
#

No, lsp

#

Basically all I have is autocomplete from previous code i've written and syntax highlighting

#

And sometimes a bit more, but not much

#

So I can't install the TM modding autocomplete because you can't do that with notepad I think

serene magnet
#

Oh.

warm canopy
#

The L on discord really looks like an I at a glance

serene magnet
#

Yeah...

ivory agate
serene magnet
#

I'm 90% sure I can't even install the autocomplete either. I use Pulsar as my IDE

cinder spruce
serene magnet
regal bear
#

Quick preview of my new multi object placement tool for Track Creator Plus called the "StringAlong" Tool:

https://youtu.be/IP7pl_jbwNE

It allows you to create a line that follows your path and then choose an object to repeatedly spawn along that path. You can then edit many parameters including rotation, position and scale along with the ability to randomize those parameters separately.

This is not in the same class as Blockmantahampta's tool but is still useful within the mod.

Quick preview of my new "StringAlong" tool for Track Creator Plus. This tool is a multi object placement tool. It allows you to create a line that follows your path and then choose an object to repeatedly spawn along that path. You can then edit many parameters including rotation, position and scale along with the ability to randomize those para...

β–Ά Play video
ivory agate
#

This is just thinking but is it possible to get material info from a raycast?

#

Or the very least what object it is

formal crane
#

No. Only the position, normal and distance

ivory agate
#

Oh okay, I know noiro got vehicle block positions but I have no idea how

near parcel
#

There are specific apis for that

ivory agate
#

I saw nothing in TerrorSouls stuff but maybe it's named something different

near parcel
#

ModBlock.GetPosition iirc

ivory agate
#

Oh okay, I guess I just assumed modblock was like something specific to modding and not just all the blocks

near parcel
#

It's the proxy class for a block

median cobalt
formal crane
#

also which one

median cobalt
#

basic lineintersect raycast

#

wont need much more complicated stuff i think

#

well, i would need to find a way to properly position all the pixels

#

the tracespeed to beat would be 400 full* traces / s
-# or about 2500 traces/s

formal crane
#

sounds expensive

median cobalt
#

well, im planning to redo a render engine ive made using lua before

formal crane
#

we use normal non-jobified raycasts, but i dont have any exact numbers.

And from very quick looks of it it hits most things, so properly pretty expensive.

Especially taking Lua binding into account

median cobalt
#

nonjobified is fine

#

my raytracer also was nonjobified

#

im planning to recreate this pipeline btw:
mipmapping, AO, rough phong shading, no speculars, and texture mapping based on cube projections

#

this render took 40 minutes to output and has a res of 512x512 at 128 samples (at 4AO samples per sample)

#

so thats a time to beat in the long term

#

ofc since trailmakers might not be limited by operations a second it might be faster

#

but then again id need to manually set the color of each pixel probably meaning id need to re-spawn assets at a high rate

#

question is, what will crash first, the renderer or the unity engine

#

given this raycast wont have material info alot of my code might just not even be used

#

something else im wondering, by the way

#

unity uses directx here as a native render pipeline right

#

or are we using openGL

warm canopy
#

But gl

median cobalt
#

insanity is part of my routine

#

noone believed id be able to make a raytracer on an inferior cpu bound single core network-bottlenecked pipeline

#

(you had to network each pixel manually onto the screen from the server to clients because that display is a leftover from 2006 implementations)

#

ofc if theres more flexibility with trailmakers unity raycasts this might be even faster

#

because if theres a way i can use sphere raycasts for AO it would probably speed the render time up by 8x

#

whats the max spawnables limit btw

#

cuz with a 512x512 screen ill be spawning a whole 262144 planes (twice if i cant directly write color after being spawned)

formal crane
median cobalt
#

maaan thats so tiny

formal crane
median cobalt
#

can i atleast manipulate UV on custom objects

#

so i can just have a chunked object that i can map a LUT table to so i can still set the color per quad

median cobalt
formal crane
median cobalt
#

throws bandwidth at the guy from australia connecting

near parcel
ivory agate
#

I guess there would be tons of issues with implementing shaders though, even if they could be fun

ivory agate
ivory agate
#

I mean yeah slow*6 is still slow but

median cobalt
#

i could only set up 6 extra instances before id get thread overlap

#

and trailmakers really glitches out having 6 individual same players on one map

#

2 was already very weird

formal crane
#

Have the current list of fixes πŸ™‚

It is not done yet, but growing strongly 🦾

Subtle Messages and GUI elements will now throw a mod error if the message is too long instead of Oh No’ing.

Subtle messages will now throw error if duration is outside range instead of Oh No’ing.

Spawning PFB_Explosion and variants will no longer Oh No after player late-joining. 

Fixed collision on the top of oibjects marked as SetIsTrigger to true.

PFB_Barrel did not always despawn.

Fix exceptions being thrown when trying to remove a UI element that doesn’t exist.

Failed mod loading now shows Error icon for subtle message.

Fixed rare case where failed to load mod exceptions message would be null when throw to user.

Fixed wheel deformation on custom meshes with concave colliders.

Mouse clicks on custom mesh with concave colliders will now be registered correctly.

Soundsbanks from Wwise will now be loaded dynamically, adding 226 new sounds from space sector and pioneers.

Fixed SetPrimary/SecondaryColor being unreliable. Can now be used outside of builder.

Fixed rare case where failed to load mod exceptions message returns null.

Sticky orbit- and Builder camera will no longer override mod camera

Audio Play and Stop should now be more reliable.

Player camera now collide with Custom Meshes

SetTimeOfDay is now clamped between to 0-100.
fallow fox
#

also Frans you better make that beginner modding guide

formal crane
paper bone
#

server owned structures? o.o
pls

formal crane
#

And it is also so different from whatever we do.. It has to be a little bit unsexy.

formal crane
paper bone
#

😭

formal crane
# paper bone 😭

But have this WIP leak that I know you personally want πŸ™‚
It is not done yet, and we are prioritising other stuff at the moment.

elfin yarrow
#

message so this shows up in me chat

formal crane
#

rally map gogogo

cinder spruce
#

wait custom model surfaces πŸ‘€

formal crane
elfin yarrow
#

lmao

formal crane
#

anyway sorry for not being able to answer questions; just had to keep up the vibe and I was also nervous.
But like hit me with questions here if needed πŸ™‚

paper bone
#

Frans #1385250615340306523 message
have these blueprint related bugs been looked into?

formal crane
#

Not yet, but are quite cursed atm.
Structures are generally very complicated and always requires talking with a few people.

paper bone
#

ah ok, i think most of them occur because the player is also the owner of the mod spawned structures

cinder spruce
#

any updates on the progress of block health functions?

paper bone
#

would be awesome if we could just spawn blueprints like that without a owner, but from the sound of it thats probaply way more complex than i imagine

warm canopy
#

The ability to disable backspace would be wonderful πŸ™‚

cinder spruce
formal crane
formal crane
warm canopy
#

Think its the only disable function that is missing in terms of gameplay

dim wolf
warm canopy
#

Well it could be used as a potential solution for blockhampters structure issue in terms of we could have structures spawned, if backspace cant be pressed then the structure cant be messed with. Sometimes I like to handle the whole respawn/teleport login myself, in the aerobatic aces mod in the start menu screen, if someone presses backspace it becomes a whole issue as it deletes the structure in the custom menu I made.

#

Also fireworks in the end screen of the aerobatic aces, but if the host presses backspace then no more fireworks

dim wolf
#

Pro move would be to highjack the button completely, @formal crane. That way modders could just say "nah this does new things now"

#

Maybe it should be a general thing, so that modders potentially could override all button actions in the game. "Only turn left race, right makes you blow up" or minigames where you can only jump... or whatever

regal bear
warm canopy
#

We can't handle controller keybinds currently anyway, think thats a separate issue

regal bear
#

Indeed - wish we could πŸ™‚

#

But doing stuff with backspace is pointless if it can be overridden on a controller

#

We need access to the actual events

near parcel
warm canopy
#

Do you have plans for a wind setting that is more localised. So at a specific radius around a vector3 etc. It could be used for turbulence and winds in specific areas

dim wolf
#

That way you intercept the intent instead of saying "this button does this"

#

And works with rebinds

warm canopy
#

Sounds good to me

scenic echo
warm canopy
#

Yeah, itd also solve that detection of repairing (on controllers)

near parcel
#

that's exactly what they are saying, you could run custom code on a callback from that action

dim wolf
near parcel
#

also, instead of full replace, it might be better to have a normal callback with an object to control the default functionality (like js does it). That way you can also add functionality without breaking the normal flow, or have multiple callbacks for the same event (which makes sharing libraries easier, as they can register their own callbacks without the library users having know of its existence and adding it manually)

regal bear
dim wolf
#

My thought would be:
You make a specific input subscription. You get the current input state on mod tick and you can choose to "consume" specific actions so they don't pass to the game. If you don't consume them, they will pass undisturbed.
This way you can also just listen without consuming.

near parcel
#

yeah, that's basically how js does it. You get an event object in the callback and you can call e.preventDefault() to consume it

median cobalt
#

wait

#

"Soundsbanks from Wwise will now be loaded dynamically, adding 226 new sounds from space sector and pioneers."

#

did you guys have sound bank limits before?

#

that sounds odd

warm canopy
#

They had to manually add them as available sounds for modding

median cobalt
#

ewwwwww ok thats alot better then

#

having to manually add them sounds like more work than needed

#

couldnt they just compile a soundlist

#

i mean yeah the .wem files are named randomly

#

but that is only when writing the files if i know wwise correctly

#

which i will most definetly check should a micropatch happen again

#

well

#

now that i know the modding API works as intended ill be able to finally finish the mod that had issues

#

meaning i can finally add a method to quickly re-paint blocks with certain colors into other colors

#

just have to wait

formal crane
median cobalt
#

oh i see

ivory agate
ionic jacinth
formal crane
median cobalt
#

Wind but you can define a Normal based on a function

#

would be nice

#

well, theres one way one can do that already but itd involve direct forces and none of the actual aero

radiant lion
#

I mean, you cooould use getDrag... But that's not exactly easy

#

Especially since you always get the full drag, even if faces are hidden, so drag would be totally off

warm canopy
surreal junco
regal bear
near parcel
#

there is only setdrag, you would have to make an approximate lookup table for each block name atm

radiant lion
#

Looking back at the docs that's right, I misremembered

regal bear
#

Yeah it doesn't make a lot of sense to not have it

topaz arrow
#

Also, what unit is setdrag in?

formal crane
formal crane
surreal junco
surreal junco
# formal crane No trailer or basic demo video? πŸ‘€

I do a little off roading in Trail Makers, On a map I made, in my 4 link HumVee
New custom Map on mods workshop
https://steamcommunity.com/sharedfiles/filedetails/?id=3559549149

A rock crawling map with extreme wall climbs.

The terrain is a formidable tapestry of jagged rocks and towering cliffs, a challenge that calls forth the most daring of...

β–Ά Play video
#

πŸ™‚

ivory agate
ivory agate
paper bone
#

(my SPAWNS_PER_UPDATE is currently set to 100 so it shouldnt even affect these examples in any way)

radiant lion
#

Is it just me or the other message is gone?

paper bone
#

for me both are still there

radiant lion
#

Well, someone stole mine

paper bone
#

oh yeah restarted my discord and its gone

#

well well well

radiant lion
#

Found the culprit

#

Anyhow, you said half and index==nil, by any chance are you doing table.remove inside a pairs?

paper bone
#

i am

radiant lion
#

That's your issue

paper bone
#

alright

radiant lion
#

So instead of ipairs just use a normal for starting from the highest index and going down

surreal junco
#

How would I adjust a hinge block to bend in 2 directions and swivel? I need a rod end so I can stop having to use 5 hinges in every linkage, instead of 2

paper bone
#

you cant modify blocks like that

near parcel
surreal junco
#

How do I talk the devs into making a Rod End / Universal Joint block? It would make off road suspensions be much simpler, For each 4 link suspension, I need 28 hinges, and I have 2 4 links on a rock crawler

radiant lion
#

Isn't it already a thing?

#

Tho 2x2x1

surreal junco
#

it is not free moviing

#

it is too stiff

#

so it can't be used

radiant lion
#

The one I'm thinking is only free moving

surreal junco
#

you are thinking of the trailer hinge

#

it is not free moving

radiant lion
#

Really?

surreal junco
#

really

radiant lion
#

Damn

near parcel
surreal junco
#

Not in all directions though it has resistance

#

That, and they are kind of big to put 20 of them in a build

surreal junco
#

Holy crap, they are, but becuse of where they pivit, they get stuck in weird places when you use them, I thought they had restricted movement.

#

mostly I think they are just broken

near parcel
surreal junco
#

oddly, they do have roll, but you can't put preasure on them because it's hard to center the force.

#

I figured out how to steady them, so they are usable, they just have some weird behaviors

scenic echo
#

so i made a 3d model in blender but in trailmakers it's mirrored, does anyone know why?
i used tm.physics.SpawnCustomObjectConcave to spawn it

thorny sparrow
cinder spruce
scenic echo
median cobalt
#

just noticed this but in pioneers, this mod breaks, showing transform slots as individual structures

#

i cant filter these

#

thats gonna make alot of spam

#

they also are precisely the transform slot theyre in, ordered accordingly

#

so slot 4 is place 1, and slot 1 is place 4

#

for some... reason

#

is this a bandaid patch from when transform slots caused some crashes

median cobalt
#

oh also can i check if a subtle message is no longer on screen somehow

#

if no, maybe thats something to add for 2.2

median cobalt
paper bone
#

They do return an id, but i dont think you can check wether or not the message still is shown

regal bear
regal bear
# paper bone They do return an id, but i dont think you can check wether or not the message s...

Yeah, as far as I can tell, when a subtle message is removed from the screen (for whatever reason) it can't be directly called back - even if you gave it your own ID.

Unity gives the message a GUID and that remains associated with your own ID unless you re-issue a new message using that same ID. In that case Unity then gives it a new GUID.

So unfortunately the onscreen state of a subtle message can't be detected via it's GUID it seems. Maybe there is something else that can be checked?
||Or we get more subtle message options in 2.2! :)||

formal crane
#

As a solution you can add duration to the subtle messages and then create a tracking table with timestamps for when you created them so you know when they should close down.

formal crane
#

Yeah try and goof around with these in the Export OBJ settings

#

(If someone has time to figure out the correct settings please smash some words into https://trailmakers.wiki.gg/wiki/Modding:Custom_Assets)

Trailmakers Wiki

Supports OBJ meshes and PNG and JPG textures
Automatic LOD generation (3 levels) of meshes
Client-side Caching
The game has a dictionary with all mods and their resources. As you add assets, they get added to this list. Meshes and textures shares the same list, meaning that you cannot use the same key...

formal crane
#

crazy

scenic echo
ivory agate
#

Is this bennu or should I add something or remove something

#

I don't think anyone here is going to use Maya but I wanted to add more examples than just blender, even if it might be the most common program used here

median cobalt
formal crane
#

Well thats your timer then?

median cobalt
#

how do 954600seconds equate to 30 min

#

is there like an upper limit

formal crane
#

subtle messeges were never intended to be shown more than 5 seconds or whatever. I think there is some float packers that might compress the values in a way that is unexpected, but cant remember right now

#

But sure i support the idea of guids handling. But please discuss this further in a #1123915629653667943 thread

median cobalt
#

already done

regal bear
# formal crane subtle messeges were never intended to be shown more than 5 seconds or whatever....

I don't think it's related to duration timing. I have some messages set to 999999 duration (HUD elements when racing) and some set to 8 or so. They all work fine most of the time. However every now and then the game just randomly removes one or more of them.

It can be at the very moment they slide onto the screen or after several minutes or anything in between. I can't spot a pattern. The game seems to have some process that somehow hooks into a mod's subtle messages - and eats them!

formal crane
#

Might be we have some system that clears them in specific situations that I am unawre of.

The mod subtle messages shares the same ones as the built-in ones.

regal bear
warm canopy
#

Yeah, it is a tad unpredictable at times

formal crane
#

Maybe we should investigate duration=-1 and then these can be specially handled.

warm canopy
#

Any chance of getting some npc enemies as prefabs in the future?

formal crane
ivory agate
#

Is there a way to load a binary file or does it have to be plaintext

near parcel
#

You can only read text

#

Moonsharp lua has no way to store binary data. Normal lua uses byte arrays for strings, but moonsharp uses utf-8 encoded strings and not all byte sequences are valid utf-8

ivory agate
#

Aw okay

#

I guess I could make a preprocessor that takes binary and just dumps it as base64 or something

ivory agate
#

I'm assuming there's still a way to store binary data

#

Also it's lua 5.2? that's at least the link on the wiki

ivory agate
#

I'm reading the manual but it isn't exactly friendly lol

#

I do know the index 1 thing at least

near parcel
ivory agate
#

Yeah but that's fine by me, unless it does become a performance problem for some reason

#

Though since it's interpreted (right?) I don't have high hopes

near parcel
# ivory agate I'm reading the manual but it isn't exactly friendly lol

that's just a fairly standard grammar representation (in extended Backus-Naur normal form). It just means that a table constructor has the form of an optional fieldlist surrounded by {}, where a fieldlist is a list of fields separated by either , or ; (allowing a trailing separator). Each field is then either an expression between [] followed by an = and another expression, a name followed by = expression, or an expression

ivory agate
#

Oh I see now, I thought it was different tables for some reason so I got really confused, never seen this notation

near parcel
#

tl;dr: these are all valid table constructors

{}
{ 1, 2, 3, }
{ ident = 1 }
{ var = 2, foo = 3}
{ [1 + var] = 3, foo = 2, 5, bar = "bar" }
formal crane
#

guh
#1368999049188872204 message

scenic echo
ivory agate
#

I'm gonna try using vscode for once but I can't for the life of me install autocomplete so I'll have to make do without but I think I can make it work

near parcel
#

usually you just need to install the lua extension for basic autocomplete (and my docs for specific tm api autocomplete)

ivory agate
#

I have syntax highlighting at least

#

Also if there is no console where do log messages end up

#

Oh nvm it's just not working

near parcel
ivory agate
#

Weird that the selection would be considered a nil value, I guess I screwed something else up that's causing it to report completely different lines of code

#

Oh it was variable naming that was causing that, I guess it doesn't have a way to easily convey that

ivory agate
#

Are there bitwise operators

#

As in do we have the library or no

#

Yes Melvin

ivory agate
near parcel
ivory agate
#

yeah I found that

ivory agate
#

Nice :3

#

Got a basic base64 decoder working, and some basic syntax down at least

ivory agate
#

Interesting, loops don't break when you disable the mod

#

Oh

#

It doesn't error and it doesn't continue the loop, weird

#

What happens if you do happen to have strings with arbitrary data by accident?

ivory agate
#

if it's gonna take two minutes lol jogannes

#

Also it's so quiet here :3

ivory agate
ivory agate
#

This is just indexing directly, 200ms vs 2 minutes

#

I guess it doesn't cache the length so it had to calculate it over and over again

near parcel
#

Tables are hashmaps under the hood, counting the amount of elements is slow, and if you have a lot of elements adding another might require reallocating and copying the data

ivory agate
#

Equivalent to the native 'dofile' function in Lua.
Is it?

#

Okay I got something working for now at least

formal crane
near parcel
ivory agate
#

There's no way to like store a continuous blob of memory right? so if I want to get arbitrary length data, I'm gonna have to loop over with a bit index
As in
{0b00011100, 0b01110001, 0b11000111}
into 3-bit ints

#

(endian is wrong but that's just an example)

#

I have a feeling that doing this hundreds of thousands of times is slow

near parcel
near parcel
ivory agate
#

I guess I could just increment the current bit and if it's larger than 8 just subtract and add to the byte instead

ivory agate
near parcel
#

that still doesn't make sense

ivory agate
near parcel
#

tables are indexed with integers. If you are trying to split a blob of memory into table elements, you just need to do table[byte_idx]

ivory agate
#

Yes? I'm just treating the indexes as the bytes, I guess I could put 32 bit values too but I'll do that later if it's way too slow

Oh I see what you mean, I never got nil for some reason

ivory agate
ivory agate
#

It just happened to be divisible by 8

near parcel
ivory agate
#

I'm not sure how that's related

near parcel
#

if you are iterating through the table, you will always reach a nil index

ivory agate
#

All the good features seem to be in lua 5.3 πŸ˜”
Okay no maybe not all of them but still

narrow acorn
#

can someone help me with my first mod

regal bear
paper bone
ivory agate
#

It's weird because I've manually parsed the file and the first two symbols are 12 and 25

#

The uncompressed data is literally just 00s so I would expect some literals
12 is perfectly normal but I have no idea why 25 is there
Unless it's like flipped incrementing

dense trellis
#

does anyone know if reshade works on trailmakers?

ivory agate
#

That's dll modding

dense trellis
narrow acorn
scenic echo
ivory agate
#

Will we be ever able to specify our own LODs, I really like details so I'm not sure if I will like the result that the auto generated levels will be

formal crane
ivory agate
#

at the

Okay no but got it, hopefully we will at least get transparency soon

#

I'm assuming since this game is forward rendered we could have semi-transparent objects?
At least that's how I think it would work

#

But also they would have a different draw order? transparency isn't too simple

formal crane
#

I am butchering terminologies here, but the current internal proposal is to have shader variants where one does cheap alpha testing/cutout and one has alpbha blending.

But not promise here, it was just our "best" case proposal and not something I think will land any time soon.

ivory agate
ivory agate
formal crane
#

Not much you can do about that other than resolution πŸ™‚
But I mean works in the right context, eg. foliage, in-world UI, etc.

ivory agate
#

4k leaf texture jogannes

formal crane
#

this is why modding will never come to consoles

ivory agate
#

lmaoooo

#

-# I think I do actually have something close to it, a 4k "abstract" feather texture I think
I could make hyperrealstic melvin Melvin

formal crane
#

the furry community is not ready

ivory agate
#

The funny thing is, if I were to make realistic Melvin, I would basically use all the stuff I normally use for my furry art, since I specifically made some geometry nodes for placing haircards/feathers on a body

ivory agate
#

I need to rethink this ChirpoStatue

#

it's horrible

#

I also need an actual decoding tree, the current one I use is for an encoder, not sure why I chose that

narrow acorn
#

probably stupid qeustion but how do i get the player id in multi player

paper bone
ivory agate
#

I'm assuming it's faster to do multiple passes over a table to prevent a ton of function calls

#

Like do one pass for converting the bitstream into codes, then another for the back references

#

I'm thinking if I need to do error checking, not sure

#

I guess it would be useful for stuff that is unpredictable

ivory agate
ivory agate
#

What in the world, not sure how the lookback length is 23 just a few bytes in and it's so painful to manually decompress the file

ivory agate
#

Ooooh this is 25, so it can just reference it's own data apparently, interesting

ivory agate
#

Mostly just me here, but you know what, I don't mind :3

#

Also yeah it's working coolbennuπŸŽ‰
Now I just need to do the decompression

And then we're halfway there weepingchirpo

#

I still have no idea how to grow the dynamic trees but I will think about that when I get there

narrow acorn
#

What are u working one

ivory agate
#

https://datatracker.ietf.org/doc/html/rfc1951
Currently it's deflate compression

narrow acorn
#

Got no idea what that means

ivory agate
serene magnet
regal bear
elfin yarrow
#

where can i find this folder? it's certainly not in the same documents folder as the trailmakers blueprints

fallow fox
elfin yarrow
formal crane
elfin yarrow
#

am i missing something?

formal crane
#

And then you can switch to the Workspace tab

elfin yarrow
#

guh

near parcel
#

usually there is an option to open that directly, but i guess it doesn't show up if you don't have a workspace (i.e. folder) open

elfin yarrow
ivory agate
#

I'm not sure how the eyes would work though, since they're pretty dependant on refraction

ivory agate
#

I do hope lua is sufficiently fast enough for the things I want to do, but I have high hopes because I switched everything to local and got a 10x speed boost :3

#

It's just that deflate isn't optimized for speed but ratio instead

ivory agate
#

That's a secret as a surprise, alvaro might know but I'm not 100% sure

narrow acorn
#

can someone vc for help?

ivory agate
#

I wonder, does lua have support for variables with emojis

#

Okay no lol

serene magnet
#

Mmmm. Big things are coming soon

ivory agate
ivory agate
#

Getting started weepingchirpo

#

I'm gonna try to make it readable this time, I learnt my lesson on trying to make everything fast with the fixed block type

ivory agate
#

I just realized something is wrong too

#

It should be 7

#

Nevermind?

#

Oh 255 is not FatSeal

#

Classic naΓ―ve search mindset πŸ˜”

narrow acorn
#

could some one help me

formal crane
narrow acorn
#

thanks both im working on a mod that enables some sort of capture the point i have the position of the players and the points but idk how to look if a player is on the point i dont think i should just spam if statements but idk how i should do it

formal crane
# narrow acorn thanks both im working on a mod that enables some sort of capture the point i ha...

Quick high-level explanation, I can give details later maybe.

  • Have a list of capture points that is the positions
  • During every update, go through all player positions with for-loop checking whether their position is within distance of the capture points. From there you can determine if they "capture" it. tm.vector3 should have distance function to compare two vectors. Player position you can get using tm.players.GetPlayerTransform(playerId).GetPositionWorld()
narrow acorn
#

whats the difrence between getpositonworld and getpositon

formal crane
#

None. Get Position was just the old one that has now been deprecated in favour of the more explicit GetPositionWorld

narrow acorn
#

which one should i use

formal crane
#

GetPositionWorld

narrow acorn
#

tm.vector3.Angle(vector, otherVector)
so i would use this

near parcel
near parcel
formal crane
narrow acorn
#

ah ye i understand the vector distance now

paper bone
#

Seems like a much more performant way

narrow acorn
#

what are that

formal crane
narrow acorn
#

better

paper bone
#

Doing a bunch of distance calculations every frame is worse than having tp deal with boxes imo

formal crane
formal crane
near parcel
#

depends on how it's implemented under the hood (although c# is likely faster, and if it's done internally in unity it's likely to be in c/c++ and even more efficient)

formal crane
#

But anyway, in my head it was just a whole overhead of spawning a PioNet spawnable object which I felt was a little overkill.
Of course both solutions are totally durable.

paper bone
#

Fair

narrow acorn
#

cant find how to update the vectors

#

prob very simple

paper bone
#

Maybe share a code snippet, because im not quite sure what you're strugling with

narrow acorn
#

pointA= {834.7769, 345.2936, 1110.791}
pointB= {1947.75, 231.8369, 2247.872}
pointC= {1349.093, 204.0641, 581.9082}

function getpos (playerid)
local pos = tm.players.GetPlayerTransform(0).GetPosition()
tm.playerUI.AddSubtleMessageForPlayer(0, "location", tostring(pos), 5, "Icon")
tm.os.Log(tostring(pos))
return pos

end
--tm.input.RegisterFunctionToKeyDownCallback(0, "getpos", "p")

tm.vector3.Angle()

this is all i have now

#

the top should be vectors i think

paper bone
#

If you want to check the position every frame you need to define a update function:

function update()
-- code that executes every frame
end
narrow acorn
#

k

paper bone
#

In that function you could loop over your playerlist that you can get with tm.players.CurrentPlayers() iirc

narrow acorn
#

does this output the player ids or number of players

narrow acorn
paper bone
#

Yeah a for loop

paper bone
ivory agate
#

In what order?

narrow acorn
#

what are for ipairs and pairs

paper bone
#

Each player has a id that you can acces by player.playerId

paper bone
#

ipairs is for iterating a table with normal number Indices

#

If you have a table like {"test"=2, "test2" =3}
You would need pairs

#

Because it has strings as indices

paper bone
ivory agate
#

Oh

narrow acorn
#

i think index is a table or smth and the value the value of the table

paper bone
#

Index is the position the element is at inside the table,
And value is the value this element has

narrow acorn
#

ah makes sence

paper bone
#

But in any other table that doesnt have this notation with the = inside the table you normally have numbers for the indexes

#

Starting from 1 in lua

narrow acorn
#

whait ipairs or pairs

paper bone
#

Use ipairs to itterate over the table of player objects

#

You can imagine the playertable to have this structure: {player1, player2, ..}
This table can be itterated over with numbers

narrow acorn
#

what would the player table contain

ivory agate
near parcel
# ivory agate In what order?

undefined, order should never be relevant (because structures are graphs, and nodes in a graph don't have an order operation defined). Only relevant thing is that it's an array, so blocks are in indices [1, amount_blocks]

paper bone
near parcel
ivory agate
#

(docs being here)

paper bone
narrow acorn
#

im sry its a lot to remeber

#

ye staring at it

#

--- Get the GameObject of a player
--- @param playerId number
--- @return ModGameObject
function tm.players.GetPlayerGameObject(playerId) end

this?

formal crane
paper bone
#

No, the table you get returned from the function:
tm.players.CurrentPlayers()
Is a list of all player Objects

narrow acorn
#

what is a player object

ivory agate
paper bone
#

You can acces the playerId of your player object like this:

for i, player in ipairs(tm.players.CurrentPlayers()) do
local playerId = player.playerId
narrow acorn
#

but wouldnt this overight itself with the next player

paper bone
narrow acorn
#

ah

paper bone
#

You could for example call your other function there

paper bone
near parcel
narrow acorn
near parcel
#
for _, player in ipairs(tm.players.CurrentPlayers()) do
    local pos = tm.players.GetPlayerTransform(player).GetPosition()
    ...
end
narrow acorn
ivory agate
#

Also, I'm assuming variables need to be declared before being used, even in the top scope
-# I guess after is a bad habit from JS Melwhat

near parcel
paper bone
ivory agate
near parcel
#

const there is undefined within the function, because it's undefined at the time the closure is created and it's not in the fallback global environment. The scope of a local variable starts where it is declared

narrow acorn
#

and how do i get my cursor normall again

ivory agate
#

Insert key

#

It toggles between replace and insert

narrow acorn
#

tysm

#

its so anoing

#

can you explain vector3 better dont really understand it yet

#

thanks for all the help btw

cinder spruce
narrow acorn
#

how do you have mutible

formal crane
# narrow acorn how do you have mutible
-- I created one now
local pos_center = tm.vector3.create(0, 0, 0)
-- Now I create a second one
local pos_another = tm.vector3.create(1, 2, 3)

-- pos_center is x=0, y=0, z=0
-- pos_another is x=1, y=2, z=3

-- lets try print them, check the log for the result
tm.os.Log("Here is pos_center informatio")
tm.os.Log("My x is:" .. pos_center.x)  -- this prints the x of pos_center
tm.os.Log("My y is:" .. pos_center.y)  -- this prints the y of pos_center
tm.os.Log("My z is:" .. pos_center.z)  -- this prints the z of pos_center

-- etc
narrow acorn
#

ah ye makes sence

warm canopy
#

Trigger box is more efficient

median cobalt
#

question

#

are audio files able to be pitched discretely

#

and can i use doubles for their input

#

and crucially, are the soundmakers' files exposed to the audiolist

ivory agate
#

Is there a way to detect if someone does something in the editor, I don't see an obvious function in the docs

#

I guess I could just assume they've done something if they're selected a block, but that only applies to single selections

warm canopy
#

Like what

ivory agate
#

Edit a block or something

#

Or spawn another creation etc

scenic echo
radiant lion
#

we do have a getStructuresInBuild (or similar) you can check for number of blocks there to see if new where added, if more than one at the same time it's a new creation/copy
You cannot check if you edit the setting of a block
You cannot check anything with decals
You cannot differentiate moving a block and selecting another identical one
The rest should be doable

#

Oh, 6 years, I guess

cinder spruce
#

dang already?
crazy

ivory agate
regal bear
# median cobalt question

Personally I have no idea what any of these questions mean πŸ˜›
I hope someone else here can help you

radiant lion
ivory agate
#

Inflate (Deflate decompressor)

#

I think it will be the hardest part, everything else should be like a breather in comparison, but block type 2 is going to be a nightmare

warm canopy
narrow acorn
#

why does this output hex garbage

players= tm.players.CurrentPlayers()
tm.os.Log(tostring(players))

near parcel
#

Because tables don't have a tostring implementation, so you just get the address the pointer points to

ivory agate
#

When spawning custom models, is there a way to directly modify the transform matrix, or modify the depth it is rendered at?

#

Thinking for UI

near parcel
#

No

#

You can only spawn a camera at the correct location

ivory agate
#

What does that mean

radiant lion
#

Probably that you can spawn a camera for the player, and if you spawn it in the right position relative to the object you get the effect you want, problem is you can't apply this to the existing camera

ivory agate
#

I guess I'll just have to use CPU to move the geometry then chumkychirpo
At least for 2d elements, gizmos might be harder

ivory agate
#

Guh, literally magic

#

Maybe I'm just missing something obvious

ivory agate
ivory agate
#

I understand what it's doing but I have no idea how

ivory agate
#

It's generating sometihng, I'm gonna have to check if it's correct but I'm at least a bit happy that something works at least

scenic echo
median cobalt
# warm canopy

we really need access to all the ui elements it would be amazing

ivory agate
ivory agate
#

LaughingDog the react

#

Don't worry frans it's only like 45k triangles so it should be fine

#

No fun πŸ˜”

paper bone
#

I now have an idea for a mod

#

Angry birds but its fat chirpos

scenic echo
regal bear
ivory agate
#

What would be the pigs then? mildly sinful froggits?

paper bone
#

Hell yeah

ivory agate
#

The modding UI isn't showing up but everything else is working?

#

Oh nvm it was just ctrl u that freaked out for some reason

ivory agate
#

guh not even the gz dumper I found works

ivory agate
ivory agate
#

Do functions mutate tables FatSeal

#

They do

radiant lion
#

Yeah, tables are passed by reference, not copies

ivory agate
#

Even if I do this?
Wait is it local

#

Yeah it is, what FatSeal

radiant lion
#

Yes, even that will still reference the same table

#

You have to manually make a copy with pairs/ipairs

near parcel
radiant lion
#

so long as you don't have nested tables (you seem to be using them just as arrays, so that's fine) this should work

  local t2 = {}
  for k,v in pairs(t) do
    t2[k] = v
  end
  return t2
end```
ivory agate
#

I don't need it to not be permuted because I know the state and I kind of have the counterpart, but thanks

#

I'm not even sure it's worth the brain energy to do all this instead of brute force searching most of the values in the table (I mean max length will be 288)

#

I was just confused over why it happened

#

I'm trying to find if there's like issues with having a large table but all I can find is that having lots of small ones is wasteful

#

Like I could just create a 128 length table in this case, but later on I will have to deal with 2^15 so 32k, it's wasteful, but it should be fast if lua doesn't have like overhead for reading large tables for some reason

ivory agate
#

I mean at most 1% of the 32k table will be used but if it's float64 (which I don't know) then that's only like 130K

ivory agate
#

I was comfortable with the options that uInt8Array etc gave me because I didn't have to worry about the weirdness that tends to be implemented with general purpose arrays

#

I do feel like I need a break because it feels like i've been making minimal progress in the last days

formal crane
# ivory agate

You have been so busy with your project! I see you here almost all-day everyday!

ivory agate
#

I dont feel busy though cylinderchirpo it's more like exhausted

ivory agate
#

And if I get just one bit (could be literally) wrong I would have no idea where to even begin debugging but that's a problem for future me if it happens

So far ironically the only thing that's really been helping is checking my work with gpt, usually it would suck but apparently it's pretty okay at partially decoding something as it can just write its own program. I was a bit surprised but yeah

I do have like a 2 hour lecture thing I've also been using but it covers gz not zlib, so there's some extra stuff there, but yeah. It's not like "hard" in the sense of I logically can't see this, it's just hard because you have to remeber so much stuff and keep track of it

#

For now it's just some meaningless numbers but I hope to make even more meaningless numbers so I can make some more meaningful ones chirpowow

near parcel
# ivory agate

@formal crane in practice there is no reason to add that because of a couple reasons:

  • Lua has closures, so you can just create functions dynamically at the language level without having to evaluate strings. This achieves the same goal of dynamic code generation, but it's faster, less error-prone, and the editor can help you catch errors (since you are working with actual code rather than strings)
  • moonsharp already has dynamic.prepare()/dynamic.eval() to achieve the same thing
#

@ivory agate for your usage of self-modifying code, you can override/shadow function names (simply assign another function to the same variable/global name), although in practice using closures is all you need

paper bone
#

i wonder if we get access to all the space sounds like the voice lines and the elevator sounds, that would be awesome

formal crane
formal crane
#

Dont know what sounds though :p

ivory agate
#

I just coulnd't help it πŸ˜”

#

Also these variables are definitely something with the length_code_length and MAX_LENGTH_LENGTH

ivory agate
#

I swear I saw some earlier

near parcel
#

spawn a 3d object at the correct location and use mouse raycasts to detect where the user clicks

ivory agate
#

No like the rendering side

#

Because if I just move them closer to the camera then the perspective is gonna be off

radiant lion
#

If you scale one axis down and flatten it the prospective should look fine, but I'm not sure how good it will look with shadows

ivory agate
#

How would I do that? I don't think I can scale it on an arbitrary axis

#

But at that point it would be isometric so

near parcel
#

Iirc you can scale objects on each axis independently, and any other direction should be a combination of those

ivory agate
#

No? Because if I do it will just reduce the dimension I'm trying to flatten it on

#

Basically making it a line with two and just one point with three

radiant lion
#

If you don't set it to 0, but a low enough number it should still not be isometric, once you set it to 0 it will be so, as well as being pretty much the same as if infinitely distant.
You can scale separately the 3 major axis, but this means not every scaling can be made (you can't flatten it on axis that are not the main ones)

ivory agate
#

I'm not sure I understand anymore cylinderchirpo

#

What I thought I had to do was scale in the axis projected from the camera that forms the planes, therefore flattening it

radiant lion
#

Yes, BUT, since you can't arbitrarily scale any axis, only the 3 main one, you have to march the axis projected from the camera to one of those

ivory agate
#

But would't that look very wrong?

#

Okay so I really don't understand

#

Like, if I just scaled in the x y or z axis it would be wrong right?

radiant lion
#

ah, my fault, i forgot to say this but the axis are relative to the object (when it comes to tm scaling)

#

so as long as the object is rotated correctly you can scale it properly

ivory agate
#

Okay so it's local, but if I want to rotate it then flatten it?

radiant lion
#

then you can't, assuming i got correctly what you mean

ivory agate
#

Say this, like these two

radiant lion
#

it will only look in 6 directions+ any rotation on the remaining axis

radiant lion
# ivory agate Say this, like these two

yeah, this can't be done, not with a "normal" cone 3d model, you'd have to rotate it before exporting it to obj, but this will mean being stuck to that rotation, which i'm guessing is not what you want

ivory agate
#

Yeah no

#

So I have to make like 10k+ variations of the same model to get decent angular resolution

radiant lion
#

Yeah...

#

Can't wait for when we'll be able to make objects dynamically directly in-game

ivory agate
ivory agate
#

No it worked chirpowow

#

Hopefully fully though weepingchirpo

#

I have no idea until something breaks

ivory agate
#

Once I'm done with all this then I'll finally be 25% done, but that's after exams, have to do them for now SadDog

regal bear
#

Good luck with your exams

elfin yarrow
#

curious, is it possible to use SpawnStructure to spawn something like a custom bullet at a certain (adjustable?) location on a moving build?

near parcel
#

You can only spawn blueprints

elfin yarrow
#

yes, the custom bullet is a blueprint

#

like a dynamite stick or something

elfin yarrow
#

nice

paper bone
elfin yarrow
radiant lion
#

Would be the best option, yes

#

Just not sure how doable it is on a moving build, iirc spawning stuff takes a little and for that time it can't move, after that you can apply the force you want

#

You'd need to test it

ivory agate
#

Wait there's no way to do something every physics or graphics frame?

#

Okay so it does take 200ms to do the lookuptable construction

#

I'm sure that's fine

#

Also there's no debugger right? only print statments

paper bone
#

yup

near parcel
ivory agate
#

What is "faster than the game"? >60Hz?

ivory agate
paper bone
near parcel
ivory agate
#

Can't you do other things faster than 60hz?

near parcel
#

no

ivory agate
#

Also finally johannespray

ivory agate
#

Also damn vs code is slow guh

#

I mean it's an electron app so I guess it's kind of expected

#

Especially for 8KB of text

ivory agate
#

Yup, and it's also in the canonical algorithm which I barely understand guh

#

Okay apparently I just set some lengths wrong, let's just hope it wasn't for a specific reason
I'm not exactly sure why I set this to 5, I guess I should just name every constant

ivory agate
ivory agate
#

I forgot cylinderchirpo

#

0 is truthy in lua

elfin yarrow
ivory agate
#

almost 10% of my code is logging

elfin yarrow
#

damn

ivory agate
#

That's not supposed to happen

#

Nevermind FatSeal

#

It actually is like that for some reason

#

I swear this thing is full of off by ones

#

All made by me SadCat

mellow fern
#

i have no idea what ur even saying, is it maybe binary or smth?

ivory agate
#

Yeah I'm trying to do decompression

mellow fern
#

ok

ivory agate
#

Lmao

elfin yarrow
ivory agate
#

Total runtime for now is about 8 seconds, one of which is spent on a crappy base64 parser Melwhat

ivory agate
#

Do we have math? I assume

near parcel
#

yes

paper bone
ivory agate
#

How do I use callbacks

#

I just get
function is not a function and has no __call metamethod.

paper bone
ivory agate
#

Oh so I can't just put a function, I need to make a function that calls a function

#

I see

paper bone
#

i think you can also just put the name of a function, but i find it to be easier like this

#

its a little easier to keep track of your parameters this way

ivory agate
#

Oh right the parenthesis executes it

#

Right

#

Do structures actually contain data or are they just objects with methods?

#

Yeah I'm confused

scenic echo
ivory agate
#

The id of the structure

#

I have a structure but I know nothing about it

scenic echo
ivory agate
#

So I can get its blocks

scenic echo
# ivory agate So I can get its blocks

i don't think it has an id like player id but you can get all structures owned by a player, tm.players.GetPlayerStructures(playerId) (this gives a table with the structures) and then use ModStructure.GetBlocks()

ivory agate
#

So this is for mod spawned builds only?

scenic echo
cinder spruce
#

structures spawned by players don't have a structure id

ivory agate
scenic echo
ivory agate
#

Yeah that's the one I will use

#

Since I have no idea how to get the "focused build"

#

Or the one that the player is currently in

cinder spruce
ivory agate
#

No

cinder spruce
#

i mean theres no great way to know which structure the player is actually working on

ivory agate
#

Yeah just doing this to explore what I can do

scenic echo
# ivory agate Or the one that the player is currently in

one work around that i just thought about is using tm.players.GetPlayerSeatBlock(playerId) to get the seat block and then getting the position of that and then comparing it with the position of other structures to know in which one you are seated

ivory agate
#

I guess that could work

#

It's also much more sane than what I had in mind for the structure ID if there wasn't a getblocks πŸ’€

scenic echo
ivory agate
#

Yeah but you can't check if it's the one you're in

cinder spruce
scenic echo
cinder spruce
ivory agate
#

That's definitely a deer

#

Y up

#

Also what are like the coordinates? like sometimes I get the origin when I try build.GetPosition() and sometimes it's some arbitrary position that doesn't really represent anything

#

I might need to experiment my way to finding out what defines the rotation axis

near parcel
#

iirc it's local to their weld group

ivory agate
#

I'm pretty sure I don't even have the correct global coordinates for the structure either

#

It's just relative to the builder origin

ivory agate
near parcel
#

because it's likely what the game uses internally and the API just grabbed that

ivory agate
#

I didn't mean each of the parts, I meant the entire structure

#

No way to get any information about the builder right?

ivory agate
ivory agate
#

Order is relevant though

#

You're always spawned in one specific seat

median cobalt
#

Do we already have a slipstream drag compiler for racing

#

i dont see one just yet

regal bear
#

I fake slipstreaming in my mod with trigger boxes and forces

median cobalt
#

you ought to try saving drag levels of the structure and decreasing them instead of adding forces, it might be more dynamic and doesnt do odd forces when the car isnt facing the same direction

#

might be more stable in 2.2 but im fairely sure its not that broken rn

regal bear
median cobalt
#

o

#

then that might work for 2.2

radiant lion
#

That is assuming setDrag also stops behaving weirdly

ivory agate
#

uau it's been silent while i've been on the start of my 2 week minecraft obsession

serene magnet
#

does anyone know what the max size for a Preview.png is? i keep getting upload failures with my current and its 1000x1000 and 1113 KB

cinder spruce
serene magnet
#

dang

paper bone
#

Ayyy nice you uploaded ironwood

serene magnet
#

yep. with a final total of 312 custom models

#

now to work on the next map, with even more

scenic echo
#

We are now shiny HappyCat

cinder spruce
#

woah

paper bone
#

Damn

serene magnet
#

woah

regal bear
#

Oh yeah shiny - cool

serene magnet
#

It's nice seeing modders get some fun colors like wikimakers

paper bone
#

@shell ore you mispelled your map in your thumbnail xD
happend to me once too

near parcel
paper bone
#

alright fair enough

shell ore
feral cradle
#

i have comp mod but the game seems to just give up and crash at 2100 comp, any ideas as to why this is?

fallow fox
elfin yarrow
feral cradle
#

any way to get around it?

fallow fox
feral cradle
#

any other way?

fallow fox
feral cradle
#

there aint some magic mod for it?

fallow fox
feral cradle
#

aw

elfin yarrow
formal crane
ivory agate
cinder spruce
#

much smoothness
@radiant lion

ivory agate
scenic echo
# ivory agate

I know you can remove custom objects spawned by your mod

median cobalt
#

Do you recon trailmakers will like this much road as a custom object

#

ill most likely have it be decorated using trailmappers objects and hopefully some buildings from airborne or such if i can get that to work

#

currently sitting at sub 8k tris but it might turn into about 15k when im done

scenic echo
formal crane
#

Quick little update for changes to 2.1.2 sound list!

226 new sounds added

Here is a full list of them πŸ™‚
#1423565172018118768 message

They are very untested - it is pretty much one of the lowest of priorities due to resources available.

serene magnet
paper bone
#

-# I should really rework my road creation tool so that it is actually usable and can create intersections etc.

#

-# another thing that i will always keep on saying, but never actually do

ivory agate
#

You can't modify the audio right?

#

Like skip parts, pitch or anything like that

regal bear
median cobalt
#

itll probly trim that down to 4k

ivory agate
#

That way you could just spawn that many sounds each time to clip the previous

formal crane
ivory agate
#

How do I even do something every frame?

#

Everything I can think of just means stalling the cpu with work or checking if something has changed in a loop (which would probably stall it either way)

ivory agate
#

It's funny that it says timed out because it was basically instant
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ABBBBABAAABAAAABABBAAAABABBBBBABAABAABABABBBBAB: RepFuncQueue overflow

radiant lion
ivory agate
#

I guess it isn't in the docs for some reason

#

Also I*m not sure if it's my game but it feels like half the sounds that are avaliable do nothing

near parcel
#

It is

radiant lion
ivory agate
#

I'm gonna try all of them at once to check what it sounds like

#

Disappointment

#

What why is this even happening, i'm just trying to access an array from outside the update function
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.

near parcel
#

you are trying to use an object that has been despawned

ivory agate
#

I did figure it out it wasn't defined in the first place

ivory agate
#

Or maybe they're just a lot quieter

#

What does this mean? it doesn't mean time at least

near parcel
#

should be duration of the audio

ivory agate
#

but you can not stop or move the sound

#

Afaik it plays until it runs out, at least I tried with 1000, 1 and 0.1 but no difference

upper niche
#

Yo guys
would it even be physically possible to make a TM mod that could allow inputs from a VR Headset?
like binding things to controller rotation or making aiming servos point towards the angle of your controller/headset (Second one would probably be way better because you don't need to finetune the speed and stuff)

#

Yes this is because I want to become a giant robot

radiant lion
#

Nope, we can't even check controller inputs with mods

upper niche
#

damn that's sad
can I know why?
just curious

narrow acorn
#

speed = 0
for _, player in ipairs(tm.players.CurrentPlayers()) do
local playerId = player.playerId
tm.playerUI.AddUILabel(playerId, "speed", tostring(speed))

end
function update()
speed = ModStructure.GetVelocity()
end

why doesnt this work

near parcel
#

because it's not doing anything. You update the local variable speed, but never tell the game to change the UI after it is initialized

paper bone
narrow acorn
#

no this is the only code i have jet

near parcel
#

then modstructure isn't defined and that will spam errors

narrow acorn
#

ah k how do i do that

near parcel
#

You nees to define the variable and initialize it with valid data

ivory agate
#

But of course that would be outside of the game

ivory agate
#

Can a mod game object be a player or does it have to be something like a custom model or spawned object?

#

Asking for the extra sound options

radiant lion
#

I'm pretty sure you can get the playe game object, yes

radiant lion
upper niche
#

oh right

#

yeah nevermind

paper bone
#

tm.players.GetPlayerSeatBlock(playerId).GetStructure() this returns the structure the player with playerId is inside of
if the player is in no structure this will throw errors

#

you can check if the player is in a structure by calling tm.players.IsPlayerInSeat(playerId)

narrow acorn
#

for _, player in ipairs(tm.players.CurrentPlayers()) do
local playerId = player.playerId

if tm.players.IsPlayerInSeat(playerId) then
    tm.players.GetPlayerSeatBlock(playerId).GetStructure()
end

end

like this

#

?

paper bone
#

yeah

narrow acorn
#

k

paper bone
#

just this wont do anything right now as you dont save your structures

narrow acorn
#

is that in func update

paper bone
#

wdym? what do you aim to do with this mod?

narrow acorn
#

im trying to make smth like turn rate mod but with diffrent stats

paper bone
#

then you will want to check every players current structure every update cycle

narrow acorn
#

also whats the diffrence between getspeed and getvelocitie

paper bone
paper bone
#

@warm canopy could you please unmute burger he was just trying to get help on some code

tacit nymphBOT
#

dynoSuccess casdekker2010_41269 was unmuted.

narrow acorn
#

how do get that code text?

paper bone
#

do you mean how to format text to look like code?

narrow acorn
paper bone
#

for short code blocks you can put these `` around the code

#

for longer code blocks do
```lua ```

formal crane
#

can't believe i forgot a " but whatever

paper bone
narrow acorn
#

how do i update the value of a ui label

near parcel
#

Setuivalue iirc

regal bear
orchid elbow
#

is there any optimizing mods?

serene magnet
orchid elbow
serene magnet
#

unfortunate

#

but yeah no. besides structure cleanup we cant do performance mods with the current API

orchid elbow
#

on the lowest settings I could get i got like 30 fps on test zone

formal crane
polar harbor
#

not sure what channel to put this in but im wondering if the menu video is editable, here i have changed the original to just a general aviation video, but in game i am met with a frozen first frame of the original

frigid moon
ivory agate