Coder Social home page Coder Social logo

dvdvideo1234 / trackassemblytool Goto Github PK

View Code? Open in Web Editor NEW
21.0 3.0 2.0 9.87 MB

A Garry's mod tool for assembing a prop-segmented track

License: GNU Affero General Public License v3.0

Batchfile 0.88% Lua 95.76% C++ 3.36%
garrysmod garrys-mod garry-mod tool track assembler script segments props entities

trackassemblytool's Introduction

TrackAssembly


Copyright 2015 ME !

IF YOU HAPPEN TO FIND REUPLOADS WITH DIFFERENT ORIGIN REPORT THEM TO ME IMMIDEATELY !!!

TrackAssemblyTool

Description

This script can give you the ability to connect prop-segmented track pieces fast. It is optimized and brings the track building time consuming to a minimum. It uses pre-defined active points to snap the segments the best way there is in Garry's Mod.

General FAQ:

Donations

I am supporting this tool in my free time mostly and it was quite a ride since I already first created it. But since my lack of time for playing gmod has been drastically increased some people asked me if I accept donations, here is the link to my PayPal.

How can I install this?

You can subscribe to it in the workshop here or obtain a *.zip file here. You can also either clone this entire repository in your ../GarrysMod/garrysmod/addons folder and the tool will appear in the menu. However I no longer bother with making releases as they are outdated.

Why did you consider making this thing ?

I was always annoyed when building a railroad track in-game, spending a lot of time just to align the pieces together, so I thought Here is a bright idea! and there you have it :) Also, another great achievement progress is in place, so 10x guys for helping me, help you, help us all !

What kind of features does this script have?

Where can I find the tool in-game ?

You can find the tool in the Constriction section of Garry's mod spawn menu under the name of Track assembly. The name of the tool depends on what language are you using when playing Garry's mod. On the right in the tool's menu, you can locate the track pieces tree. Expand the desired piece type to use for building your track by clicking on a node, then select the desired piece.

How can I chose and select a desired track end ?

Just hold KEY_LALT ( Def: LALT ) and turn the mouse scroll around. This will make the script chose the track active point you want. When You hold SPEED ( Def: SHIFT ) the script will switch to adjusting the next active point for the track stacking option. This will affect what point is chosen when you continue the track you build. The current and next active points will not be the same.

I am scrolling and the point mouse scroll is enabled. Why is the track end not switched?

Sometimes selecting last weapon is bind to the KEY_LALT ( Def: LALT ) button by default. If that condition is present for you, the mouse scroll track piece selection will not work. If you insist of using the mouse scroll and I don't blame you, because it's faster and much convenient, just unbind the KEY_LALT ( Def: LALT ) button via unbind alt ( unbind <key_binded> ). That way the game will no longer process alt with priority to last weapon switch.

How do I use the old way for switching between the active points ?

There is this variable trackassembly_enpntmscr and as its name suggests it controls the enable end-point mouse scroll. Set it to 1 if you want to switch the track ends via the mouse scroll or set it to 0 if you want to use the old-school for the way of changing and selecting track ends.

Hey, I cannot align my track curves properly. Can you help ?

Yep sure. In the right panel, there is a drop-down menu which has a bunch of tool modes listed. Go ahead and select the Active point intersection. After you change the mode, an intersection relation entity is needed to complete the process. Hitting SPEED + RELOAD ( Def: SHIFT + R ) just like the anchor, will select the relation active point of the entity in question, which is closest to the player hit position. Now trace a track piece and the ghost of the curve will be drawn. You can clamp the spawn position in a box using the primary position flag applinfst ( Apply linear first ) or switch the origin angle with the ray direction angle by using primary angle flag appangfst ( Apply angular first ). In this working mode the angular and linear offsets adjust the piece offsets relative to the ray intersection position where the trace and relation rays meet. Press ATTACK1 ( Def: Left Mouse Button ) if you are happy with where the ghost is located and where the spawn piece will go at.

The tool has too few track varieties. Can you make the pieces resizable ?

In sorta yes, however, there is no way to add this feature natively and so far I did not found a decent method, which will not potentially break the entire game. While resizing props client-side is quite easy, in the server, this task is very hard, close to impossible. The gmod API does not provide an elegant solution to this, which meets the real-time performance requirements. Resizing track curves is by far the most complex task of this sort as far as every single piece is concerned. If you take the track width in consideration, the resizing method must not just select X, Y or Z axes, because the piece will get distortions along the curve ( ex. For 90 degree curves stretching by X will increase first point length, however, it will also adjust the second point width ) In Gmod there is this PhysicsInitConvex API that does just that, but the spawning will take a very long time considering the amount it takes to resize every polygon on the server. When the track is spawned outside the map bounds it will immediately crash the game. Thus, I believe that stacking two or more tracks is always better than resizing a prop !

How can I use switchers ? I can't seem to make them work.

Every addon has its own way for dealing with the switchers. Others that are not listed here do not have dedicated track switchers, so to switch them you must use two track pieces inside each other. Swap their solidness around using the fading door tool, so when one is solid a.k.a. CLOSED and you can't pass through it, the other must be no-collided to all OPENED. Therefore, the wheels of the train will follow only the track that is currently set being solid with fading door CLOSED function state:

  1. Dedicated entity addition like a lever you must press with your USE key
  2. Dedicated switcher entity class you must press with your USE key. You must press the entity custom switcher class itself:
    • Sligwolf's mini trains
    • SligWolf's White Rails
    • Ron's 2ft track pack
  3. Dedicated switched/unswitched model. You have to swap the two models around to switch the track by using a script ( gLua, E2, EAdv, Starfall )
    • Robster's pack
    • AlexCookie's 2ft track pack
  4. Dedicated switcher model and a switcher moving needle that you must assemble to get track switching functionality
    • Mr.Train's M-Gauge
    • Mr.Train's G-Gauge
    • Battleship's abandoned rails

How to use the tool control options when building a track ?

  1. Pressing ATTACK1 ( Def: Left Mouse Button )
  • CURVE and TURN: Spawns server task to handle segmented curve interpolation on condition:
    1. The holder piece must be valid database entry.
    2. Two or more vertices must be present on the curve stack.
    3. The holder piece must have more than one active points.
    4. The holder piece start point data must persist in the cache
    5. The holder piece end point data must persist in the cache
    6. The holder piece active points distance must be positive
    7. The holder piece must not be a curving track.
    8. The holder piece must not be a U-turn track.
    9. The holder piece must not be a ramp track.
  • OVER : Flips over every entity that is a track present in the flip-over list where for flip normal uses trace normal and for flip origin trace OBB.
  • When you are looking at the world the piece will be spawned on the map.
  • When you are looking at one of track piece's predefined active points
    • Will snap the piece that you're holding to the trace one.
    • If the traced piece's type is different from the holder piece's type, please check Ignore track type check-box to snap it.
    • If Enable advisor is checked, a coordinate system will appear, marking the origin position on the traced piece visible.
    • If Ghosts count is larger than zero ghosted track pieces will be rendered to assist you with the building.
  • When not looking at trace entity piece predefined active point will update the bodygroup/skin according to trackassembly_bgskids.
  1. Pressing ATTACK1 ( Def: Left Mouse Button ) + USE ( Def: E )
  • When not looking at trace entity piece predefined active point will update the trace entity physical settings and constraints ( Based on anchor ).
  1. Pressing ATTACK1 ( Def: Left Mouse Button ) + SPEED ( Def: SHIFT )
  • SNAP : Stack pieces according to trackassembly_stackcnt ( Pieces count ):
    1. The value in trackassembly_stackcnt must be positive.
    2. The database record of the holder model must have at least two active points.
  • OVER : Flips over every entity that is a track present in the flip-over list where flip normal and flip origin are extracted from active point. Ray intersection position between the two selected points can be utilized for flip origin and the closest active point normal is utilized for flip normal when the trace entity model is equal to the holder model.
  • When you are not looking at one of track piece's predefined active points will flip over the anchor entity relative to the trace normal vector as flip normal and trace entity OBB center as flip origin.
  1. Pressing ATTACK2 ( Def: Right Mouse Button )
  • CURVE and TURN: Inserts a curve node on the stack.
  • OVER : Inserts the trace entity ID to the flip over stack.
  • When pointing to the world will open the Frequent pieces by <PLAYER_NAME> frame, from where you can select your routine pieces to use again in the track building process as well as searching in the table either by MODEL, TYPE, NAME, LAST_USED to obtain the piece you want to continue your track with.
  1. Pressing ATTACK2 ( Def: Right Mouse Button ) + USE ( Def: E )
  • When trackassembly_enpntmscr is disabled, you have to press this, for changing the active track points using the old method of selection.
  1. Pressing ATTACK2 ( Def: Right Mouse Button ) + SPEED ( Def: SHIFT )
  • CURVE and TURN: Updates the hit closest curve node on the stack.
  • When pointing to a prop will select the trace model to use as a piece for building a track.
  1. Pressing ATTACK2 ( Def: Right Mouse Button ) + DUCK ( Def: CTRL )
  • When trackassembly_enpntmscr is disabled, you have to press this, for changing the next active point by using the old method of selection.
  1. Pressing ATTACK2 ( Def: Right Mouse Button ) + SPEED ( Def: SHIFT ) + USE ( Def: E )
  • CURVE and TURN: Updates selected curve node in condition:
    • When trace is a track piece, utilizes the trace entity active point as a curve node.
    • Otherwise will check various conditions and pick the most suitable curve node location vector:
      1. When both neighbour (start and final) nodes are track active points will intersect their rays
      2. When only one (start or final) node is an active point will project the hit node on its ray
      3. When none of the neighbors are active points will project the hit node on their line bisector
  1. Pressing RELOAD ( Def: R )
  • When trace entity is a valid piece will just remove it.
  • When trackassembly_devmode is enabled, will update the log control options.
  1. Pressing RELOAD ( Def: R ) + USE ( Def: E )
  • When pressing on the world and trackassembly_exportdb is enabled, the external database manager menu will be opened to configure database prefixes, otherwise will export the server database sv_ as a file in DSV format.
  1. Pressing RELOAD ( Def: R ) + SPEED ( Def: SHIFT )
  • When pressing it on the world will clear the tool's selected operational track pieces which are used for various things. Works differently based on the mode selected.
    • SNAP : Clears the anchor entity which all new pieces will be automatically constrained to.
    • CROSS: Clears the relation ray defined for using active point intersection between two pieces.
    • CURVE and TURN: Clears all nodes defined for using the curving algorithm. Otherwise clears the last point on the stack.
    • OVER : Clears the stack variable holder for all the flipped over entity base IDs
  • When pressing it on the trace prop will set it as the tool's selected operational track
    • SNAP : Selects the trace entity for using it as an anchor.
    • CROSS: Selects the closest trace active point origin to use it as relation ray.
    • CURVE and TURN: Clears all nodes defined for using the curving algorithm. Otherwise clears the last point on the stack.
    • OVER : Clears the stack variable holder for all the flipped over entity base IDs

Context menu pieces manipulation

The context menu options are used to manipulate the selected track pieces directly or as an interface to export various entity values to the tool console variables. Explanation of each control option is given in the summary below.

  1. Piece model option exports the selected track model to the tool console variables. This is the same as copying the model via right click.
  2. Bodygroup/Skin option transfers the generated bodygroup/skin selection to the tool console variables and populates the dedicated value display in the tool panel. The textbox is only a display and cannot be modified manually.
  3. Surface material name option will export the surface material name to the tool console variables. This option will also update the properties name combo box to display the new value that is used.
  4. Piece mass option exports the selected track mass to the tool console variables. The tool panel mass slider is updated accordingly
  5. Ignore physics gun option toggles the physics gun grabbing function on the track piece selected. When the grabbing is disabled, the player cannot interact with the track piece in any way, including grab, shake or unfreeze. This is good when you make turntables or attach moving tracks or needles, which must not be affected by any player's physics gun. If the option is enabled, click it again to disable it or the other way around.
  6. Freeze piece option will put the track piece in a frozen state and it will disable its motion. The piece stays in the same position until external fore is applied on it. This is good when you want your track bridge to have fake non-welded pieces. If the option is enabled, click it again to disable it or the other way around.
  7. Apply piece gravity option controls the gravity affecting the selected track piece. If the option is enabled, click it again to disable it or the other way around.
  8. Weld option controls the created welds on a piece. You must select an anchor to weld the right clicked piece to, when you are in regular SNAP mode displayed on the tool screen. when the anchor is not selected or it is invalid, a message will be displayed to warn you. You can also remove welds by holding SPEED ( Def: SHIFT ) and clicking the option. The amount of welds will be displayed next to the option control.
  9. NoCollide option controls the created collides on a piece. You must select an anchor to nocollide the right clicked piece to, when you are in regular SNAP mode displayed on the tool screen. When the anchor is not selected or it is invalid, a message will be displayed to warn you. You can also remove nocollides by holding SPEED ( Def: SHIFT ) and clicking the option. The amount of nocollides will be displayed next to the option control.
  10. NoCollide world option controls the created world collides on a piece. The constraint anchor in this case is the world itself. Click on the option to create no collide world constraint or by holding SPEED ( Def: SHIFT ) and click to remove it. The flag of the constraint will be displayed in the menu control option. The value will be true if there is a still a no-collide world and phys_ragdollconstraint between the piece and the world. If it stays in true after you remove it, that means there are more constraints remaining connected to the trace.

How to use the tool control panel and what function does each item have ?

  1. Track surface grip modifier combo box is used if you want to obtain different grip behavior for a wheel-powered/sliding train, you must use the surface material drop-down menu combo boxes as you select first TYPE from the top one to chose the group of properties you want to apply and then NAME, to select the actual surface material you want applied.

  2. Piece bodygroups and skin selection is used when you want desired bodygroups and/or skins on a piece. The textbox is a display showing the Bodygroup/Skin selection code (ex. 1,2,3,4/5) generated using the context menu. You cannot change the textbox value manually by typing. Currently, Bodygroup/Skin (ex. English) option name will vary based on the language used. When you click if it will populate the text display in the tool menu.

  3. Piece mass setup control slider is used to set the mass of the next track piece to be spawned. The larger the number the heavier spawned track piece gets. Larger values are recommended.

  4. Active radius control slider is used to set the minimum distance needed to select an active point when pointing at a piece. Keep this maxed out if you don't want to bother with track end selection.

  5. Stack count control value shows the maximum number of pieces to be snapped in Stacking mode. Change this to something larger than one if you want to extend your track by stacking.

  6. Angular alignment control The slider is used to snap the first piece ( Requested by Magnum ) to a user-defined angle ( Usually 45 ) so that the track building process becomes easier. The whole track build will be snapped also because you are building it relative to the first piece.

  7. Force limit control ( Requested by The Arbitor 90 ) defines the maximum force to be applied on the weld joint between two pieces connected before it breaks. You can use this to build collapsible track bridges. Set the option to zero if you want it to be unbreakable ( by default ).

  8. Options weld, no-collide, no-collide world ( Requested by Frosty ), freeze, phys-gun grab and gravity are considered basic Gmod knowledge, because they are defined by their own and not going to be explained further.

  9. Option Ignore track type if checked, will enable snapping between pieces of a different type.

  10. Option Spawn horizontally ( as the name suggests ) if checked, will spawn the next pieces horizontally relative to the map ground if the additional angle offsets are zeros, if not, they will be added to the resulting angle.

  11. Option Origin from mass-center if checked, will align the piece spawned to its mass-center.

  12. Option Snap to trace surface if checked, will snap the chosen track directly to the trace surface. SurfSnap

  13. Option Draw adviser if checked, will draw a composition of lines and circles to assist you with the building. DrawAdvaiser

  14. Option Draw assistant if checked, will draw circles to assist you where the active points are. PointAssist

  15. Option Ghosts count if greater than zero, will create a ghosts stack client-side to assist you with the track building process. If you set this option to zero, ghosting will be disabled.

  16. When building a track using a different than the default way is needed you may use:

  • Origin <ang_comp>, where <ang_comp> can be either pitch, yaw or roll are the angle offsets used for orientating the base coordinate system in order to snap the piece as the user desires.
  • Offset <vec_comp>, where <vec_comp> can be either X, Y or Z are linear offsets used for additional user offset regarding the next track piece to be spawned.
  1. The button V Reset variables V as the name suggests clears the offsets mentioned in (16).

What will happen if something gets updated?

First of all this FAQ will be UPDATED AS THE TOOL GOES. So everything that the tool supports will be represented here as a manual or something. More information I publish you can also find in the wiki page here. That's what is this FAQ for anyway ( Though most people don't bother to read it before asking )...

Which addons did you work on?

Here they are, with available status, why I did not do some of them ( at the time of developing ). The ones that are INCLUDED in Garry's mod do not have links and are marked below. Others are actually not meant to be used with TA at all, but instead in HAMMER by mappers. Some are supported by their own AUTHOR ( this is always better and easier to add stuff in a list ) so you should check with them. Another way of availability will be present only when the user MOUNT-s certain games that will include the content in question. In some rare cases, the author is to busy, not bothered or not interested anymore to maintain cetain track packs leading in NO SUPPORT, which is also OK and you need to value their time and effort:

Where are the trains/vehicles, are there any of these?

Dude seriously, make them yourself, what's the point of playing Gmod then ... xD

Dude the rails are not showing in the menu, what should I do ?

SUBSCRIBE TO THE OWNER OF THE ADDON !!!!

Are there going to be more of these?

Yes, I developed my dynamic database, so I can insert any model I want. When I have free time I will make more, because it's a lot of data I insert in the DB

Will you create more models in the future?

Well, It depends on what you mean by create. If it is for the making of the 3D models, then NO ( big one ) I've got no experience in that stuff neither am I a 3D artist. Other than that if the models are created by the 3D artists, I will be more then happy to add them into the Track assembly tool if their collision model meets the minimum requirements. ( Made a model once, but it turned out quite nasty xD, so better leave the job to the right people.)

Hey, do you remember that roller coaster assistant addon ?

Yes, it was snapping pieces when you got them too close to each other and they magically connect. When looking at the panel in the right, there is a check-box labeled Enable physgun snap that you must check. This makes the server to perform some traces relative to the active points of the piece and search for other pieces to snap to. If the snapping conditions are present, it will snap the trace piece on physgun release at that end, which the server trace hits. Check the wiki page for more information.

Can you tell me how to read the physgun snap legend drawn on the screen ?

Easy. Here are some things to know for never getting confused with this:

  1. If the line with the middle circle is green, that means a valid prop entity is traced The green circle shows where the trace hits and the yellow what part of trace is inside the prop If in this case the trace is a valid piece, the origin and radius to the point selected are drawn using a yellow circle line, always shorter than the active radius. After that the spawn position and distance are drawn by using cyan circle and magenta line respectively. The forward and the up direction vectors of the origin are drawn using red and blue lines respectively.
  2. If the line is yellow, that means the trace has hit something else ( For example the world ) The yellow circle shows again where the trace hits and the red line the part inside the non-prop
  3. If there is a red line with yellow circle, then there is an active point there, which is searching for props to snap to when you drop ( release the left click ) the piece with the physgun. You can also disable the drawing by unchecking the Draw adviser check-box or unchecking the option for Enable physgun snap, making it pointless to be drawn without the base option enabled. To enable the drawing, both must be enabled ( Adviser and snapping ).

What is this green line/circle into the base advisor, what is it for ?

Remember when I got suggestions to do the switchers. This is an easy way of indicating which next active position ( of some ) is chosen when stacking is in place. The end of the line with the green circle points to the next active position that is chosen.

Does the script have manipulation panels of some sort like in precision alignment?

Yes, it does. You can find the manipulation panels description in the additional features list in the wiki page.

May I put this thing in another third party website ?

No I will not give you my permission to do that... Why ... That way you will upload some half-baked malicious tool, waste your time with stupid things and confuse everybody with this so-called unofficial version of the Track assembly tool. Not to mention that the stunned people will NOT GET ANY updates ! The best you can do is just point to the original GIT repository avoiding any version mismatches and confusions. So please don't upload the script to any other sites. I mean it!

trackassemblytool's People

Contributors

dvdvideo1234 avatar gedo789 avatar supinepandora43 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

trackassemblytool's Issues

[BUG] Ghosts are not getting cleared

Describe the bug
TA does not clear client ghosts on request

To Reproduce
Steps to reproduce the behavior:

  1. Pick TA. Ghosts are drawn
  2. Pick another tool
  3. Ghosts stay visible

Expected behavior
Ghosts to be deleted on swtch

Screenshots
image

Host machine (please complete the following information):

  • OS type: WIN
  • OS version: 11
  • Gmod platform: PC
  • Gmod branch: Chromium
  • Gmod version: LAST
  • Gmod instance: CLIENT
  • Tool version: LAST

Additional context

1
2
3
4	38
5	Entity [-1][class C_PhysPropClientside]
5	Entity [-1][class C_PhysPropClientside]
5	Entity [-1][class C_PhysPropClientside]
5	Entity [-1][class C_PhysPropClientside]
5	Entity [-1][class C_PhysPropClientside]
5	Entity [-1][class C_PhysPropClientside]
NET

[BUG] Remove line(s) of code causing "Do not rush context menu"

Describe the bug
Not a bug, this is just really annoying, and completely un-needed

To Reproduce
Steps to reproduce the behavior:

  1. Spawn two bridge props
  2. hold c
  3. go across both really quickly
  4. See error

Expected behavior
Not wanting it to spam my notifications
Screenshots
If applicable, add screenshots to help explain your problem.
image

Host machine (please complete the following information):

  • OS type: Windows
  • OS version: 10
  • Gmod platform:PC
  • Gmod branch: x64-x86
  • Gmod version: 2021-11-01
  • Gmod instance:
  • Tool version: 8.671

Additional context
Add any other context about the problem here.
why is this even needed, at all, this is a useless line of code

[BUG] Text shows up as "Oops, missing ?"

Describe the bug
All text in the tool is "Oops, missing?"

To Reproduce
Steps to reproduce the behavior:

  1. Subscribe to TAT
  2. Open tool
  3. All text is "Oops, missing?"

Expected behavior
My american friends can see the text on tool menu.

Screenshots
image

Host machine (please complete the following information):

  • OS type: Windows
  • OS version: 10
  • Gmod branch: x64
  • Gmod version: 2021.11.01
  • Gmod instance: CLIENT
  • Tool version: Latest workshop version

Additional context
I feel like this could be some kind of localization issue? I'm from the netherlands if that matters, yet i don't seem to have issues with other addons.

i don't know what to call this bug...

375253 [01-03-19 11:36:30] CLIENT > TRACKASSEMBLY [SQL] DRAW_PHYSGUN: Extension disabled
375254 [01-03-19 11:36:30] CLIENT > TRACKASSEMBLY [SQL] DRAW_GHOSTS: (gmod_tool) Swep other
375255 [01-03-19 11:36:30] CLIENT > TRACKASSEMBLY [SQL] DRAW_GHOSTS: Hook mismatch
375256 [01-03-19 11:36:30] CLIENT > TRACKASSEMBLY [SQL] DRAW_RADMENU: (gmod_tool) Swep other
375257 [01-03-19 11:36:30] CLIENT > TRACKASSEMBLY [SQL] DRAW_RADMENU: Hook mismatch
375258 [01-03-19 11:36:30] CLIENT > TRACKASSEMBLY [SQL] DRAW_PHYSGUN: Extension disabled
375259 [01-03-19 11:36:30] CLIENT > TRACKASSEMBLY [SQL] DRAW_GHOSTS: (gmod_tool) Swep other
375260 [01-03-19 11:36:30] CLIENT > TRACKASSEMBLY [SQL] DRAW_GHOSTS: Hook mismatch
375261 [01-03-19 11:36:30] CLIENT > TRACKASSEMBLY [SQL] DRAW_RADMENU: (gmod_tool) Swep other...

Keeps going FOREVER in console... can't see legitimate output...

I'll see if i can force a crash on the engine and include the latest dump.

[BUG]

User receives library error when installing custom database
Reporter: https://steamcommunity.com/profiles/76561199170637525

Description: Importing DSV raises Lua error as last line does not contain stuff and reader is expected to return a string and EOF flag. When trimming request is issued the library tries to auto-trim a nil value for GetStringFile(fS, nil) calls:

Error: https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/lua/trackassembly/trackasmlib.lua#L576

[Track Assembly Tool] lua/trackassembly/trackasmlib.lua:576: attempt to index local 'sLine' (a nil value)
1. GetStringFile - lua/trackassembly/trackasmlib.lua:576
2. ImportDSV - lua/trackassembly/trackasmlib.lua:3485
3. ProcessDSV - lua/trackassembly/trackasmlib.lua:3754
4. unknown - lua/weapons/gmod_tool/stools/trackassembly.lua:99
5. include - [C]:-1
6. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua:142
7. include - [C]:-1
8. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:353
9. include - [C]:-1
10. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/init.lua:10

[BUG] Some clients hard-crash with this addon installed due to a "Model not found" error, with a model this addon doesnt even have

Describe the bug
Garry's Mod clients on x86-64 seem to immediately hard-crash with this addon installed on the server. It is inconsistent (I do not get this issue, but other friends do, despite the fact they use x86-64). It complains about not being able to load a model that this addon doesnt even have, but then fails to load error.mdl immediately after.

I have an issue on the Garry's Mod issue tracker for it: Facepunch/garrysmod-issues#5798
I'll be updating that as I get more info, I don't have solid reproduction steps at the moment.

I isolated it to this addon by having one of the friends affected

  • Join with the addon installed on the server
  • Still crash
  • Join with the addon uninstalled with no other changes immediately after
  • No longer crash

[BUG] Clientside lua error

Describe the bug
Players are getting this clientside error whenever they're using the tool, im not sure how to reproduce it as i haven't had it myself.

lua/entities/gmod_ent_ttc/cl_init.lua:185: attempt to call method 'UpdateLinks' (a nil value)
  1. func - lua/entities/gmod_ent_ttc/cl_init.lua:185
   2. unknown - lua/includes/extensions/net.lua:33
   0.  func - lua/entities/gmod_ent_ttc/cl_init.lua:185
    1.  unknown - lua/includes/extensions/net.lua:33

Host machine (please complete the following information):
Gmod dedicated server linux 64x-86x

[BUG] Error is recieved when timer setting is set to empty string

Describe the bug
Why cant I see any tracks in the menu. I subscribed to this and Shinji85's Rails Train Pack but cant find it?

Also this Script error in console:

[Track Assembly Tool] lua/includes/extensions/string.lua:87: bad argument #1 to 'string_len' (string expected, got nil)
1. string_len - [C]:-1
2. Explode - lua/includes/extensions/string.lua:87
3. TimerSetup - lua/trackassembly/trackasmlib.lua:1948
4. unknown - lua/trackassembly/trackasmlib.lua:2293
5. unknown - lua/autorun/trackassembly_init.lua:1019

I literally removed every other addon and verified gmod. What the hell

To Reproduce
Steps to reproduce the behavior:

  1. Set timer setting to empty string
  2. Load Gmod

Expected behavior
Error must not be present

Screenshots
N/A

Host machine (please complete the following information):

  • OS type: All
  • OS version: All
  • Gmod platform: All
  • Gmod branch: N/A
  • Gmod version: No need
  • Gmod instance: N/A
  • Tool version: Last

[BUG] attempt to index global 'asmlib' (a nil value), serverside error

Describe the bug
This errors happens at least daily on serverside, unknown what's directly causing it as we've not been able to replicate it yet. If i remember correctly we're using the workshop version.

lua/trackassembly/trackasmlib.lua:2424: attempt to index global 'asmlib' (a nil value)

To Reproduce
X

Expected behavior
X

Screenshots
X

Host machine (please complete the following information):
Gmod dedicated server linux 64x-86x

Additional context
Add any other context about the problem here.

[BUG] Shinji85's Rails Train Pack Cant Spawn

Describe the bug
It seems that some people and I can't spawn Shinji85's Rails Train Pack in Server Game mode,
And If I tried to spawn at the addon menu and it works.
To Reproduce
Steps to reproduce the behavior:

  1. Started GMOD server (srcds.exe.)
  2. Use the Track assembly tool to spawn Shinji85's Rails Train Pack.
  3. srcds log "The Perseveranceused the tool trackassembly on models/props_phx/trains/tracks/track_1x.mdl" No Error outputed and no track were spawn for Shinji85's Rails but other track are fine.
    Expected behavior
    No track for Shinji85's Rails Spwan. If played in single player still work fine. No restriction were set to block track,Run on as superadmin role then nothing can be locked.
    Screenshots
    If applicable, add screenshots to help explain your problem.

Host machine (please complete the following information):

  • OS type: Windows 11
  • OS version: 21H2
  • Gmod platform: PC,PC(server side)
  • Gmod branch: x86-64 for client side,for server-side not sure but it seem to be default 4000.
  • Gmod version: 2022.07.13
  • Gmod instance: yellow for server
  • Tool version: Lastest

Additional context
Server collection:

[BUG] POA Transform attachments raise a Lua error

Describe the bug
POA Attachments cannot be extracted correctly when ! token is used.

To Reproduce
Steps to reproduce the behavior:

  1. Subscribe to Plarail Advance
  2. Extract the addon with gmad.exe
  3. Change the origin and angle of straight/r01.mdl to !1, !2 in the data export
  4. Select the changed model

Expected behavior
The model must be selected normally

Host machine (please complete the following information):

  • OS type: Windows
  • OS version: 7 SP1
  • Gmod platform: PC
  • Gmod branch: General
  • Gmod version: No need
  • Gmod instance: CLIENT, SERVER
  • Tool version: 6.535

[BUG] Snapped rails are slightly misplaced

Describe the bug
Sometimes in certain cases, if the user tries to snap a track to already rotated and frozen track, a slight misplacement of the joint may be experienced leading to derailment and misplaced attachments. THIS IS NOT RELATED TO FLOAT MISPLACEMENTS

To Reproduce
Steps to reproduce the behavior:

  1. Load gm_construct
  2. Normal spawn PHX x16 track as points 1>2 to be water>wall
  3. Snap 16x PHX track to point 1 of the spawned track

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
How is it ghosted:
20210820162355_1
How it spawns:
20210820162403_1

Host machine (please complete the following information):

  • OS type: Win
  • OS version: Win7 SP1
  • Gmod platform: PC
  • Gmod branch: x64
  • Gmod version: 2021.08.09
  • Gmod instance: BOTH
  • Tool version: 8.661

Additional context
base-DB: stSpawn.BPos, stSpawn.BAng ( Trace piece database entry )
trac-EN: stSpawn.TOrg, stSpawn.TAng ( trace entity positio/angle )
base-CA: stSpawn.BPos, stSpawn.BAng ( Values after calling ENT:LocalToWorld )
hold: stSpawn.HPnt, stSpawn.HOrg, stSpawn.HAng ( Holder piece database entry )
orgn: stSpawn.OPos, stSpawn.OAng ( Origin/angin angle for matrix manipulations )
spawn: stSpawn.SPos, stSpawn.SAng ( Calculated spawn position and angle )

trigger
base-DB:	2029.797363 0.000133 12.548828	0.000 0.000 0.000
trac-EN:	-19.115608 -2153.927002 -147.223434	0.000 90.000 0.000
base-CA:	-19.115435 -124.129639 -134.674606	-0.000 90.000 0.000
hold:	-370.036865 -0.000000 12.548828	-370.036865 -0.000000 12.548828	0.000 -180.000 0.000
orgn:	-19.115435 -124.129639 -134.674606	-0.000 90.000 0.000
spawn:	-19.115379 245.907257 -147.223434	-0.000 90.000 0.000
1:	-19.115379 245.907257 -147.223434	-0.000 90.000 0.000
2:	-19.115379 245.907257 -147.223434	-0.000 90.000 0.000
base-DB:	2029.797363 0.000133 12.548828	0.000 0.000 0.000
trac-EN:	-19.115608 -2153.927002 -147.223434	0.000 89.995 0.000
base-CA:	-18.920891 -124.129639 -134.674606	-0.000 89.994 0.000
hold:	-370.036865 -0.000000 12.548828	-370.036865 -0.000000 12.548828	0.000 -180.000 0.000
orgn:	-18.920891 -124.129639 -134.674606	-0.000 89.994 0.000
spawn:	-18.885368 245.907227 -147.223434	-0.000 89.994 0.000
base-DB:	2029.797363 0.000133 12.548828	0.000 0.000 0.000
trac-EN:	-19.115608 -2153.927002 -147.223434	0.000 89.995 0.000
base-CA:	-18.920891 -124.129639 -134.674606	-0.000 89.994 0.000
hold:	-370.036865 -0.000000 12.548828	-370.036865 -0.000000 12.548828	0.000 -180.000 0.000
orgn:	-18.920891 -124.129639 -134.674606	-0.000 89.994 0.000
spawn:	-18.885368 245.907227 -147.223434	-0.000 89.994 0.000
base-DB:	2029.797363 0.000133 12.548828	0.000 0.000 0.000
trac-EN:	-19.115608 -2153.927002 -147.223434	0.000 89.995 0.000
base-CA:	-18.920891 -124.129639 -134.674606	-0.000 89.994 0.000
hold:	-370.036865 -0.000000 12.548828	-370.036865 -0.000000 12.548828	0.000 -180.000 0.000
orgn:	-18.920891 -124.129639 -134.674606	-0.000 89.994 0.000
spawn:	-18.885368 245.907227 -147.223434	-0.000 89.994 0.000
3:	-18.885368 245.907227 -147.223434	-0.000 89.994 0.000

[BUG]

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Make a dedicated server in linux
  2. Game on the same machine
  3. Run TA
  4. Translations are missing

Reporter: https://steamcommunity.com/id/Jane_26A7

[BUG] nonsensical "Gradient" error with custom peices

Describe the bug
After appending a new piece to the sv_TRACKASSEMBLY_PIECES and the cl_ version too; my custom piece doesn't work with the curve work mode.

To Reproduce
Steps to reproduce the behavior:

  1. append the following to both the sv_ and cl_ versions of the TRACKASSRMBLY_PIECES.txt files located in data\trackassembly\dsv\ (github screws up the formatting, so here's a screenshot):

image

  1. load into your favorite map in Gmod
  2. equip the tool and switch the mode to "curve line segment fitting"; and select the fence model from the list
  3. make a curve and try to spawn the pieces
  4. See error
    image

Expected behavior
I expected it to work like any other piece available; curving and stuff.

Actual behavior
It seems to incorrectly detect a "gradient" in the piece. I don't know why. I looked at the source code and it seems to think that the points aren't aligned or something weird like that.

Screenshots
see above

Host machine (please complete the following information):

  • OS type: Windows
  • OS version: windows 10
  • Gmod platform: are you joking?
  • Gmod branch: 36x64 beta, running in 64bit mode
  • Gmod version: 2020-12-11
  • Gmod instance: N/A
  • Tool version: 8.622

Additional context
This isn't my normal setup; I'm stuck on a low-end laptop over the Christmas season and gmod doesn't run too well on this thing.

also, here are the files in case you don't want to type in the above screenshot text:
sv_TRACKASSEMBLY_PIECES.txt
cl_TRACKASSEMBLY_PIECES.txt

Bug with Track assemble Tool

after attempting to fix another issue with track assembly.
I can see the track in the tool options and see the ghosted prop but it will not spawn

2021-04-20.13-32-32.-.Copy_Trim.mp4

Track piece ghost gets stuck and stays visible after switching from weapon to different tool

The ghost entity gets stuck when deploying a different tool while having a non-toolgun equiped. It only unstucks itself when the Track Assembly Tool is redeployed. When the ghost is stuck, it stays visible and could even interfere with saves and dupes. It happens in singleplayer and multiplayer.

Do the following to reproduce the error:

  1. Equip the Track Assembly Tool and choose a random track piece.
  2. Switch to a weapon or physgun.
  3. Choose a different tool from the Q-Menu. Tool gets deployed.
  4. The previos ghost appear again and is stuck until Track Assembly Tool is redeployed.

This seems to be a similar issue to #50.

The expected behavior would be that the ghost disappears whenever the Track Assembly Tool is not deployed.

Here a video that shows the error:
https://github.com/dvdvideo1234/TrackAssemblyTool/assets/17761396/a7a4d73d-a088-48be-949d-b26b538ce63b

GMod Version: 2024.03.21 (main branch)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.