#General modding chat
1 messages · Page 15 of 1
how does the shinyness of a custom model work, is it per pixel or for the entire model?
should be per pixel
thx
per pixel determined by the alpha value of the texture
yeah I guess that's fair
Is it just me or is ludixi down
does anyone know if its possible to create artificial gravity within a defined volume? im making a starcruiser map, and was wondering if i would be able to make gravity inside the ship and hangars
maybe try teleporting players that are within a set of coordinates in a way that feels and looks how you want but other than that as far as I know I don't think the modding api has a way to do it within just a specific area.
aw dang it, i guess my starship wont work in space lol\
also, that sounds so incredibly buggy and wierd, and i feel like if you introduced any build itd do an explode
yeah it definetely will be buggy but I feel like you could probably find a sweet spot where it looks and feels nice. I think there shouldn't be an issue with builds though unless you have a million weld groups something, I've made an autopilot function that uses the forces and torque functions to make it look like a build is driving/flying itself and it works fine with vertical movement
im trying to simulate gravity inside my spaceship
yeah I know?
idjk
I was trying to say that you could do the same thing I did and use the physics apply force function to make it work with vehicles and simply teleport the player when they aren't in a vehicle. I think that the teleporting will be hard to make it look good but it's probably possible. You would need to use a raycast or something to detect if they're touching/near ground so that you could stop it from happening though.
the physics force makes alot of sense, and i dont have the skill to make the player one lol but that explination makes more sense
on a differen note, is is possible to make like, a platform move, or would it have to be like, appear and dissapear in different spots rapidly
yes but if you plan on trying to do gravity by pushing the player with it rather than for parkour reasons I don't think it will be very helpful to you
what if i dont do gravity, im just trying to make an elevator, i gave up on thr gravity idea
that should work then
which one?
both
you'd need to get it's transform and set it's position to move it. Making it disappear and reappear rapidly is not a great or visually pleasing way to do it
Spawn it with tm.physics.SpawnCustomObjectRigidbody and your platform will be able to move smoothly
I think it's down because It gives a 503 gateway error on multiple devices and browsers but if someone else can still access it please let me know
A great example of feature creep from an old mod of mine
I never did end up getting to the "Must have features"
holy line length
Yeah I usually have my fingers near shift so I've gotten into the habit of not breaking up the lines and just shift scrolling
is there a way to change how custom model LODs work because these look really bad from far away
also some models seem to not be effected by the LOD thing at all
How did you even make this intersection
Like us this made with curve modifier
huh, its just a model made in blender
But how did you make it in blender
Somewhat, I don't know the exact metric but basically the larger a model is the least it is culled
just a 3d model nothing special
Since yours is on the ground you can add an extra Tri far underground and it should have a better lod
thx
Oh ok so they are laid down piece by piece
You could probably do it in geometry nodes pretty easily since roads can be simplified to lines, and just have special cases for intersections
i see you are using blender, i am experiencing issues with blender to trailmappers. I made just a simple cube and took a chunk out of the center to make a tube, and every time i send it to trailmappers its just a full cube
i was using it as a scale reference but its not working
anybody know what im doing wrong?
@serene magnet doeth thy have any inspiration for me 👉 👈
so uhhhh, idk why iots happening, but TM is connecting the verts even when they shouldnt be, the internal geometry is all there, but for some reason its covereing the ends?
I FIGURED IT OUT
note the lack of dividing lines on the corners because i did a boolean operation, so it didnt change the mesh, it just put a hole in it
well of course, i fix that and now it just dosent show anything
no visual mesh in trailmappers
and several thousand errors
is @radiant lion here? how ur formation mod work lol
I'm here
hi
So, first you are better using V2 by AJ, as it has some very neat fixes https://steamcommunity.com/sharedfiles/filedetails/?id=3585918112
Then what is the question? General how to use of now to use properly?
sorry
Not even blender likes concave ngons, a triangulate modifier should suffice though
Usually the engine triangulates but as you've discovered it might not do what you want
yeah, i figured that out lol, i have it working now
@cinder spruce once done, where should i post this if allowed. its a external program so idk if its a bad idea to post here.
ignore the ai image, i cant do designs my self :(
How are you communicating with the game?
through json files
Can you get the position of a blueprint spawned with a mod? i tried but i keep getting errors
fixed it
@cinder spruce @radiant lion how did you guys make the formation flying mod to be so accurate in it's position? is it a pid?
Ye
yes, its jess’s pid that i used
Tho in the original one I did something quite stupid, like considering the previous plane position 0,0,0, which is what prompted aj's v2
im making this public where do i post it 🙏
in modding?
i honestly dont know
Asking to DM you in the mod description sounds like the safest bet, else just put everything on GitHub and add a link
well i made a whole website for it :/
and my other mods
ama see if i can catch one of the higer ups in the general chats
and ask em
if it requires running code outside of the game, it's a liability
it dose, "it's a liability" is very vague can u explain pls
if something bad happens, the devs would be responsible for allowing it
understand
hi can blender be used to make maps for trailmakers?
yea
@near parcel my jarvis mod communicates to "C:\Program Files (x86)\Steam\steamapps\common\Trailmakers\mods\Jarvis - by Criticals\data_dynamic_willNotBeUploadedToWorkshop"
but i have had multiple ppl say that the file path dose not exist even tho mod is installed. but for some ppl it works. can u pls explain why and where the file path gose if u have any idea. iv tryd debuging it with a user who it did not work with. the mod folder would literaly not appear in the mod file only in the workshop file with raw code
Read the last dir name again
ik its not meant to. the mod creats json files in there. but the whole mod file dose not get created. like "C:\Program Files (x86)\Steam\steamapps\common\Trailmakers\mods\Jarvis - by Criticals" is not there but he got a log in the mods folder showing it was downloaded. and it was in his workshop folder
because that's not where mods are installed
On workshop it saves to a different folder
yeah i think i figured it out
tought it was installed to both.
trailmakers/mods is only for local mods
You basically need to be look in C:\Program Files (x86)\Steam\steamapps\workshop\content\585420
For a mod I am working on I want to draw shapes in the UI.
I was told I need to do it with 3D objects in front of the camera (how do I get camera position?).
Can anyone help me with something like an example mod or some tips?
you cant rn
im doing something similar but im just assuming the camera center to be a specific position
you can only know the camera position of cameras set by the mod
Space altitude sensor mod done (@fallow fox ): https://steamcommunity.com/sharedfiles/filedetails/?id=3733419901
nice
Cool, tested it and it works well.
Have a look at the "Trail of Duty" mod (by Noiro1). It has a custom interface using custom objects and a camera.
https://steamcommunity.com/sharedfiles/filedetails/?id=3090899486
It's quite easy to set a camera and point it at an object. You would then need to map the mouse click world positions to something meaningful in your code.
Thanks, I will look into that.
So um how many vertecies is to much again
around 32k is the limit iirc
And will it change anything if I slice it up into individual sections
Yes, the limit is per mesh iirc
Oh then I'll just split it
32k triangles
How can i make my ui text a different color?
put <color=(hex code)> in before the text and </color> resets it
unity docs for text formatting: https://docs.unity3d.com/Packages/[email protected]/manual/StyledText.html
Thanks!
Just updated Track Creator Plus. Details here: #1404642052129423466 message
i get this error whenever i try to load my map with textures, they are 2k and under 10mbs is that too high?
What resolution are your textures? 2k isn't a clear way to identify it.
10mbs is a bit rate - did you mean 10mb in size?
Also:
- how many textures are you trying to load?
- how many custom objects are in your map?
- how detailed are your custom objects (ie triangle count)?
By 2k I meant 2048, by mbs I meant megabyte(s) sorry if that was unclear, Im trying to load 2 textures, 5 models, 4 of which use one of the textures, all objects are under 15k verts
The mod API doesn't handle texture loading very well so 2 x 10Mb textures will take quite a bit of time to load. Even so it doesn't usually crash the game. It's possible that one or more of your meshes is causing the issue. Try loading one model at a time and see if you get a crash.
It insta crashes, and without textures everything loads no problem, scaling down the textures does nothing
add botnak with ai to the spawning api!
https://discord.com/channels/296562030624899072/1510079916081807420
you use the update function for stuff that happens each frame right? can't get anything to happen so I'm not sure if I need to set a callback or something
as long as function is named update it should run every frame
I realized you couldn't have it local
I just automatically named everything local
Not sure this is the best way to make a loop that needs to initialize but eh I guess it should work, I couldn't find anything about setting an on-update callback
there is no on-update callback, the global update function is everything there is for now
if you need to initialize something, you can do it at the top level of the module (and with onPlayerJoined callback if it's player related)
yeah I just did it on player join
on lua or json?
Speaking of which do you think I could track camera position by setting the position then somehow tracking mouse movements. Idk if tm mods support using things like libraries but if it does I was thinking about finding on that tracks mouse movement. If it doesn't my idea was to use the ui register mouse down function but I'm pretty sure it doesn't work how I want it to. Even if I did get it working there would be a ton of issues with there being so many camera modes on top of that being able to zoom in and out would be difficult to deal with too.
there is no way to track mouse movement, because that happens client-side
somehow I completely forgot I would need to make it work in multiplayer
I was also thinking of tracking player rotation
but that would be inaccurate
registermousedown uses a raycast, giving you world coordinates, not mouse movement. It also requires the user spamming the button while moving the mouse
yeah I haven't found a reason to use it yet but I had a feeling that's how it would work
lua, I just wrote a helper with tonumber
can anyone give me the modder role so i can post on #1123915629653667943 ?
you can use #1196793172429394050
huh?
I cannot tell why one of the examples work but mine doesn't
Is the playerId you get from currentplayers different from input callbacks?
because it seems so
no
oh it's just a capital letter
is there really a 64 character limit? or any way to get around it
I don't want to start doing formatting stuff but I guess I have to
yes, because the data needs to be sent to clients
Kind of works :P
so is there a way to make the UI local?
because obviously not everyone needs each other's UIs
why do I see registers and opcodes, are you making an emulator in tm
yeah just a chip 8 emulator, I thought i'd be able to make something like an amiga or at least a c64 but it seems like even writing 2 kilobytes of text per frame will be too much
(because of the network thing)
you tell it which player to create it for
something other than the addui functions?, because that's what I'm using and those require a player id
yeah, because it doesn't make sense to create an UI on the server where nobody can see it
you can use logs instead of an UI i guess if you want it to be server side
Hi is there no way to place down building blocks using code? I plan to create a playback of the building process and the use cinematic camera to record the building process, is there any way of doing this?
No
What I was wanting is a way to do client only stuff but I'm assuming that's not possible then
So you can only really go up to like 30 or whatever "things" before everything just slows down massively
I was considering trying to make a SWE solver but that's probably not possible considering how the modding api works
(or if it is it would be too slow to get any reasonable detail)
all mods run server side
@cinder spruce a little crude example for inspiration
tm.physics.AddTexture("particle.png", "fx_particle")
local particle_a = tm.particleBuilder
.SetShape(tm.enums.particleShape.cone)
.SetShapeAngle(15)
.SetShapeRadius(0.3)
.SetPosition(tm.vector3.Create(10, 0, 10))
.SetRotation(tm.vector3.Create(0, 0, 0))
.SetEmissionRate(30)
.SetLifetime(0.8, 2.0)
.SetStartSpeed(0.5, 1.5)
.SetStartSize(0.05, 0.12)
.SetStartColor(tm.color.Create(1, 0.45, 0.1, 1))
.SetEndColor(tm.color.Create(0.3, 0.1, 0, 0))
.SetGravityMultiplier(-0.2)
.SetTexture("fx_particle")
.SetLooping(true)
.SetDuration(0)
.Create()
particle_a.Play()
local particle_b = tm.particleBuilder
.SetShape(tm.enums.particleShape.sphere)
.SetShapeRadius(0.5)
.SetPosition(tm.vector3.Create(0, 2, 0))
.SetRotation(tm.vector3.Create(0, 0, 0))
.SetEmissionRate(0)
.AddBurst(0, 80)
.SetLifetime(0.4, 1.2)
.SetStartSpeed(3, 8)
.SetStartSize(0.1, 0.4)
.SetStartColor(tm.color.Create(1, 0.9, 0.2, 1))
.SetEndColor(tm.color.Create(0.2, 0.2, 0.2, 0))
.SetGravityMultiplier(0.3)
.SetLooping(false)
.SetDuration(0.1)
.Create()
particle_b.Play()
hmm interesting
thanks
I also like to look at other games mod api, can be very helpful to see what they come up 🙂
Main thing I always think about with these is that one might also need a SetParent function. I don't think PioNet is good at supporting hierarchy changes -- but usually you want the particles to be attached/parented to objects
hmm what about a trailrenderer too?
in the same vein, and a bit simpler
finally,
real trailmakers
I mean it could be made via these particles to some degree. But I would otherwise consider that a different thing if it was to directly connect with Unitys own Trailrenderer
But yes, seeing some of the Kerbal FX stuff I think it could be very relevant 😉
Holy smokes, particles would be amazing 
bet
