Name changeable?

N33

Train Photographer
I'm unsure as to where i should post this so please forgive me if this is in the wrong area.

I recently created this:
and I am wondering how one would make it so text is shown and can be edited.

Something like this on the name which the user can edit:
Except on the object i created.

Uploaded with ImageShack.us

Many thanks,

Johan
 
Add an attachment point on it as a.name0 and add the appropriate text to the config file. See pages 13 and 14 of the TRS2004 CCG. This will allow changing the text, color, and letter size.

Keep in mind changing the actual text that goes on the sign in the config file will change all signs at the same time. For different text on different signs clone the item as many times as necessary.

Ben
 
Add an attachment point on it as a.name0 and add the appropriate text to the config file. See pages 13 and 14 of the TRS2004 CCG. This will allow changing the text, color, and letter size.

Keep in mind changing the actual text that goes on the sign in the config file will change all signs at the same time. For different text on different signs clone the item as many times as necessary.

Ben

Um, i created the object in google sketchup.

Do I add the attachment point in CCP or in sketchup?

Regards

Johan
 
You'd create an empty in Sketchup, being sure to name the attachment as the previous poster cited.

ns

Um, i'm new to sketchup so I don't know how to do that :eek: .

A screenshot would be usefull :) .

Regards

Johan
 
Um, i'm new to sketchup so I don't know how to do that.

A screenshot would be usefull.

Well, even though you're new to Sketchup, you know more about it than I do. The word "empty" is used in Blender, my preferred modeling medium. I assume Sketchup has a facility that also provides for referring to a particular point on a model, but I don't know what it is.

One thing I did that might be helpful to you: when I was new to Blender, there were not many people using it in Trainz, and I found it useful to spend time on the Blender forums, where I could ask questions such as "I'm creating a model in Blender to use in the game Trainz, and I need to add a name to a particular point on the mesh. How do I do this?" This got me an answer from someone who knew how to do what I wanted to do, but did not necessarily know Trainz.

ns
 
"Keep in mind changing the actual text that goes on the sign in the config file will change all signs at the same time. For different text on different signs clone the item as many times as necessary."

If you just name it "name" then each one can be named differently in surveyor by clicking on it with the question mark.

http://www.trainsim.com/vbts/showthread.php?303335-Encouragement-for-hackers

Posts 4, 5 and 7 in that one. I think I've tried every 3D model making program available including sketchup and blender, was never able to figure out how to make even a basic cube. PEV attachment maker I could figure out though, so that's what I used to add a.name0, a.name1, a.name2, and a.name3 attachments to that switch tower. Download;

Switch Tower 18,<kuid:522774:100400>

to see how it's put together,

Chicago Metro 2.2,<kuid2:522774:100023:2>

to see it in actual use on a route for giving different junctions unique names visible on the signs and in the map.
 
Orientation?

@sniper297 Many thanks to you, I have it working :D .

Only problem now is that I would like to get it central on the sign.

With config set to this:

kuid <kuid2:460492:100035:1>
description "Another model created in Google SketchUp and exported to Trainz with RubyTMIX."
username "U-bahn sign nameable"
trainz-build 2.9
kind "scenery"
category-class "BR"
category-era "2010s"
category-region "US"
author "N33"
organisation
contact-email
contact-website
license "Freeware for private use."

mesh-table
{
default
{
mesh "u_bahn_sign_nameable.im"
auto-create 1
}

attachments
{
mesh "attach_mesh.im"
auto-create 1
}

name0
{
mesh "attach_mesh.im"
auto-create 1
position 0,0,0
orientation 0,0,0
att-parent "default"

effects
{
name
{
kind "name"
att "a.name0"
fontsize 0.11
name "name"
}
}
}

kuid-table
{
}
}


This is what it looks like.
Uploaded with ImageShack.us

Is there a way of doing this without changing the position of the attachment on the mesh and by changing it's position in the config or would i have to edit the position of the attachment using the PEV attachment adder?

Many thanks,

Johan
 
You could probably do it either way, what I'm looking at it appears the name needs to be a larger font (try 0.5 or 0.6 instead of that 0.11) and also needs to be moved forward slightly - it looks like it's partially inside the sign.

Once you get the size close, it might need moved;

position 0,0,0

Those numbers are left/right, front/back, and up/down. Left back and up are positive (normal) numbers, right forward and down add a minus sign in front of the number. So example;

position -1.3,-0.05,0

That should move the center of the name to the right 1.3 meters, forward 5 millimeters, and stay in the same place vertically. Have to tinker with it and check in game to see the results, for instance forward might bring it out of the sign or move it further inside the sign, it depends on which way the designated "front" is.
 
@sniper297 I have it in place now :) .

Only issue remaining is the rotation of the text,

I presume that is the orientation?

Regards

Johan
 
On the issue of rotating the text,

If this helps it is currently at 0,0,0 on the orientation. I wish to rotate it 90 degrees so the top goes from horizontal to vertical.

This is currently how it looks,

Uploaded with ImageShack.us

Any help on changing this would be appreciated. :)

Regards

Johan
 
Might be easier with PEV attachment maker, when I rotate stuff in that it uses plain vanilla compass degrees so 90 is right face, 180 is about face, 270 is left face. Let me look at my hacknotes, the orientation in the config.txt is in some rocket science math called "radians".

X Y Z Pitch Roll Yaw last two in radians 3.15 = 180 degrees 1.575 = 90 4.275 = 270

That's what I have in the notes, it may be wrong since I think the orientation for objects and camera views is in a different order. So the first number 3.15 might pitch it up or down 90 degrees, I'll have to check that.
 
~snip~ orientation in the config.txt is in some rocket science math called "radians".
Just been doing them in maths so it should make it easier :)

X Y Z Pitch Roll Yaw last two in radians 3.15 = 180 degrees 1.575 = 90 4.275 = 270

That's what I have in the notes, it may be wrong since I think the orientation for objects and camera views is in a different order. So the first number 3.15 might pitch it up or down 90 degrees, I'll have to check that.
I'll try that sometime today, thanks for your help :D

Regards

Johan
 
Back
Top