CoupleStar error.

Support for technical issues with Trainz or CMP. (Errors, crashes, faults, problems, install help, etc...)
Post Reply
User avatar
slenderman7676
Past 100!
Posts: 139
Joined: Mon Jul 09, 2018 5:42 pm
Trainz Version: T:ANE
Trainz Build: 4
Author KUID: 628458

CoupleStar error.

Post by slenderman7676 »

Hello. I've been building a coach and have finally got it in game. I put on all the attachments in the right places for couplings and used the CSExample script to add basic CoupleStar functionality. Only problem is that the couplers are not behaving right. So I put it into TS12 to look at it in railyard to get the debug info from JetLog and here is what it said.

Code: Select all

?   0:41.9 : SCRIPT> -----------------------------------------------------------------------------------------------
?   0:41.9 : SCRIPT> | CoupleStar bluestar coupling system support (<kuid2:75134:99002:13>) Copyright Dave Renshaw (Eldavo's Railway Emporium) 2005
?   0:41.9 : SCRIPT> |
?   0:41.9 : SCRIPT> | Checking config.txt for EPS Mk3 Generator Coach 1 kuid <kuid:628458:100862>
?   0:41.9 : SCRIPT> |  instance id is '54'
?   0:41.9 : SCRIPT> |
?   0:41.9 : SCRIPT> | Checking bluestar entries in config.txt...
?   0:41.9 : SCRIPT> | bluestar_coupler     50  (drawhook with screwlink coupler)   OK.
?   0:41.9 : SCRIPT> | bluestar_coupler      4  (air brake hose)   OK.
?   0:41.9 : SCRIPT> | bluestar_extras      mainreshose
?   0:41.9 : SCRIPT> |
?   0:41.9 : SCRIPT> | Checking kuid-table entries in config.txt...
?   0:41.9 : SCRIPT> | CoupleStar_coupler_coupled    <kuid2:75134:15012:1>   OK.
?   0:41.9 : SCRIPT> | CoupleStar_coupler_stowed    <kuid2:75134:15015:1>   OK.
?   0:41.9 : SCRIPT> | CoupleStar_coupler_hanging    <kuid2:75134:15014:1>   OK.
?   0:41.9 : SCRIPT> | CoupleStar_airhose_hanging    <kuid2:116035:2009:1>   OK.
?   0:41.9 : SCRIPT> | CoupleStar_airhose_coupled    <kuid2:116035:2010:1>   OK.
?   0:41.9 : SCRIPT> | CoupleStar_mainreshose_uncoupled    <kuid2:116035:2012:1>   OK.
?   0:41.9 : SCRIPT> | CoupleStar_mainreshose_coupled    <kuid2:116035:2013:1>   OK.
?   0:41.9 : SCRIPT> | CoupleStar_lamp    <kuid:2512:9>   OK.
?   0:41.9 : SCRIPT> |
?   0:41.9 : SCRIPT> | Checking mesh-table entries in config.txt...
?   0:41.9 : SCRIPT> |
?   0:41.9 : SCRIPT> |   **ERROR** unable to find effects section inside the mesh-table section of config.txt!
?   0:41.9 : SCRIPT> |   config.txt should contain a mesh-table with effects entries for the coupler and hose attachments.
?   0:41.9 : SCRIPT> |
?   0:41.9 : SCRIPT> | Checking assets can be created...
?   0:41.9 : SCRIPT> | CoupleStar_mainreshose_coupled     OK.
?   0:41.9 : SCRIPT> | CoupleStar_mainreshose_uncoupled     OK.
?   0:41.9 : SCRIPT> |
?   0:41.9 : SCRIPT> | 1 errors found.  Vehicle will NOT operate correctly.
?   0:41.9 : SCRIPT> -----------------------------------------------------------------------------------------------
This does not make sense because my config.txt does have the mesh table with the effects entries. I'll leave the mesh table here.

Code: Select all

mesh-table
{
  default
  {
    mesh                                "gencoach.im"
    auto-create                         1
  }
  
  shadow
  {
    mesh                                "shadow.im"
    auto-create                         0
  }
  
  body
  {
    mesh                                "att.im"
    auto-create                         1
    
    effects
    {
      coupler_a
      {
        kind                            "attachment"
        att                             "a.couplera"
      }
      
      coupler_b
      {
        kind                            "attachment"
        att                             "a.couplerb"
      }
      
      lamp_a
      {
        kind                            "attachment"
        att                             "a.lampa"
      }
      
      lamp_b
      {
        kind                            "attachment"
        att                             "a.lampb"
      }
      
      airhose_a
      {
        kind                            "attachment"
        att                             "a.couplefront"
      }
      
      airhose_b
      {
        kind                            "attachment"
        att                             "a.coupleback"
      }
      
      mainreshose_a
      {
        kind                            "attachment"
        att                             "a.couplefront"
      }
      
      mainreshose_b
      {
        kind                            "attachment"
        att                             "a.coupleback"
      }
    }
  }
}
I hope somebody could point out what I've done wrong here.
Cheerio!

Edit: To clarify the gencoach and att meshes. The "gencoach" mesh is of the vehicle itself and the "body" mesh is simply just a mesh with all the attachment points in it created using the PEV attachment maker. It has to be like this because afaik Sketchup does not support adding attachment points into the model itself.
User avatar
greeni
Past 750!
Posts: 808
Joined: Sun Dec 12, 2010 5:33 pm
Trainz Version: TRAINZ22PE
Trainz Build: 123799
Author KUID: 174088
Location: Wigan, Lancashire. WCML

Re: CoupleStar error.

Post by greeni »

try and rename attachments to this

mainreshose_a
{
kind "attachment"
att "a.mainhosefront"
}

mainreshose_b
{
kind "attachment"
att "a.mainhoserear"
}


try this type as it may get confused with a.couple front on these


airhose_a
{
kind "attachment"
att "a.couplefront"
}

airhose_b
{
kind "attachment"
att "a.coupleback"
}
User avatar
slenderman7676
Past 100!
Posts: 139
Joined: Mon Jul 09, 2018 5:42 pm
Trainz Version: T:ANE
Trainz Build: 4
Author KUID: 628458

Re: CoupleStar error.

Post by slenderman7676 »

Tried your advice but no changes. Still behaving the same. Maybe the CSExample script provided from Dave's site does not play ball with newer versions of the library? If I can't fix it myself I guess I will have to hand the asset over to someone who can.
User avatar
greeni
Past 750!
Posts: 808
Joined: Sun Dec 12, 2010 5:33 pm
Trainz Version: TRAINZ22PE
Trainz Build: 123799
Author KUID: 174088
Location: Wigan, Lancashire. WCML

Re: CoupleStar error.

Post by greeni »

try this as your meshtable and see what it does amend the names on your attachments

mesh-table
{
default
{
mesh "gencoach.im"
auto-create 1

effects
{
coupler_a
{
kind "attachment"
att "a.couplera"
}

coupler_b
{
kind "attachment"
att "a.couplerb"
}

lamp_a
{
kind "attachment"
att "a.lampa"
}

lamp_b
{
kind "attachment"
att "a.lampb"
}

airhose_a
{
kind "attachment"
att "a.airfront"
}

airhose_b
{
kind "attachment"
att "a.airback"
}

mainreshose_a
{
kind "attachment"
att "a.mainhosefront"
}

mainreshose_b
{
kind "attachment"
att "a.mainhoseback"
}
}
}

shadow
{
mesh "jib_shadow/shadow.IM"
}
}
User avatar
slenderman7676
Past 100!
Posts: 139
Joined: Mon Jul 09, 2018 5:42 pm
Trainz Version: T:ANE
Trainz Build: 4
Author KUID: 628458

Re: CoupleStar error.

Post by slenderman7676 »

I’m off my PC but I know that wouldn’t work because the attachment points are not located in gencoach.im they are all in the other mesh that just has the attachment points. Maybe once I get back on tomorrow I might try to make the attachment mesh the default then attach the actual coach body to the attachment mesh through simply placing an attachment point at 0,0,0 named something like a.body. I guess I’ll try that tomorrow.
User avatar
greeni
Past 750!
Posts: 808
Joined: Sun Dec 12, 2010 5:33 pm
Trainz Version: TRAINZ22PE
Trainz Build: 123799
Author KUID: 174088
Location: Wigan, Lancashire. WCML

Re: CoupleStar error.

Post by greeni »

so its not a couplstar problem then its a config problem, your not setting it up correctly
User avatar
slenderman7676
Past 100!
Posts: 139
Joined: Mon Jul 09, 2018 5:42 pm
Trainz Version: T:ANE
Trainz Build: 4
Author KUID: 628458

Re: CoupleStar error.

Post by slenderman7676 »

I'm happy to announce that I fixed it. I made the mesh with attachments the default then attached the body to that through simply editing the config. Thanks for all the help. I'm still making minor tweaks to the model and considering what else could be done.
Post Reply