Using Gen String (veh)

Discussion in 'Car Modding' started by D.Painter, Nov 6, 2016.

  1. D.Painter

    D.Painter Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,039
    Likes Received:
    2,341
    Hi all.
    Just a small thing. I've tried to search this out but came up empty.

    I'm wanting to use the entry, gen string in the veh ini.
    Example.
    HDVehicle=SGTseries_HSV010.hdv
    Graphics=SGTseries_HSV010.gen
    Spinner=SGTseries_HSV010_Spinner.gen
    GenString= ------ // Used to generate GMT names in *.gen file
    Cameras=SGTseries_HSV010_cams.cam
    Upgrades=SGTseries_HSV010_upgrades.ini
    Sounds=SGTseries_HSV010.sfx
    HeadPhysics=SGTseries_HeadPhysics.ini // Affects driver eyepoint only
    Cockpit=SGTseries_HSV010_Cockpitinfo.ini

    To use this I need to enter a number in the GenString= (1,2,3...)Example.
    But what I'm not sure of is how to set up the Instance in the Gen ini.
    Example.

    }
    Instance=<000>RAINLIGHT
    {
    Moveable=True
    MeshFile=VE_RLIGHT.GMT CollTarget=False HATTarget=False LODIn=(0.00) LODOut=(150.0) ShadowReceiver=False Reflect=True
    }

    Instance=<001>RAINLIGHT
    {
    Moveable=True
    MeshFile=VE_RLIGHT2.GMT CollTarget=False HATTarget=False LODIn=(0.00) LODOut=(150.0) ShadowReceiver=False Reflect=True
    }
    So with this if I use (Example) GenString=0 the car should use Token <000>
    If I use (Example) GenString=1 the car should use Token <001>

    Is this right?
    Doesn't seam to be working ATM.
    Could someone get me on the right road with this please.
    Thanks guy's.
     
  2. Liquid4653

    Liquid4653 Registered

    Joined:
    Sep 30, 2013
    Messages:
    202
    Likes Received:
    46
    Instance=RAINLIGHT
    {
    Moveable=True
    MeshFile=VE_RLIGHT_<1>.GMT CollTarget=False HATTarget=False LODIn=(0.00) LODOut=(150.0) ShadowReceiver=False Reflect=True
    }

    this makes slot 1 in the genstring change rainlight options and files should be named......

    VE_RLIGHT_1.GMT
    VE_RLIGHT_2.GMT
    etc.

    so genstring=1 in veh will use VE_RLIGHT_1.GMT and genstring=2 in veh will use VE_RLIGHT_2.GMT

    <2> will make use of slot 2 in the genstring= part and so on.

    it can also be written differently, I put an underscore in to make it visually simpler, but the <1> part is the important bit and following name conventions like demonstrated above.

    Good luck.
     
    D.Painter likes this.
  3. SERPENTS ON A VESSEL

    SERPENTS ON A VESSEL Registered

    Joined:
    Oct 4, 2010
    Messages:
    24
    Likes Received:
    1
    You should use the Tuning menu instead because it allows the user to change whatever they want very easily. Genstrings are really hard to use with the way RF2 handles skins.
     
  4. D.Painter

    D.Painter Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,039
    Likes Received:
    2,341
    Thanks Steve. I'll give that a try.
    Let you know the out come.
     
  5. D.Painter

    D.Painter Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,039
    Likes Received:
    2,341
    Renamed the GMT to VE2_RLIGHT_1 and VE2_RLIGHT_2

    ---------------------------------------------- Gives a Error loading TOKEN VE2_RLIGHT_2-------------------------------------------
    Gets past VE2_RLIGHT_1 but gets stuck on the second token.
    Have tried this but with only one Instance. Removed second one. Same error.
    Also removed the underscore. Same result.

    }
    Instance=RAINLIGHT
    {
    Moveable=True
    MeshFile=VE2_RLIGHT_<1>.GMT CollTarget=False HATTarget=False LODIn=(0.00) LODOut=(150.0) ShadowReceiver=False Reflect=True
    }
    Instance=RAINLIGHT
    {
    Moveable=True
    MeshFile=VE2_RLIGHT_<2>.GMT CollTarget=False HATTarget=False LODIn=(0.00) LODOut=(150.0) ShadowReceiver=False Reflect=True
    }


    ---------------------------------------------- This Turns the Instance OFF but it loads to track-------------------------------------------
    Rainlights don't work.
    }
    Instance=RAINLIGHT<1>
    {
    Moveable=True
    MeshFile=VE2_RLIGHT_1.GMT CollTarget=False HATTarget=False LODIn=(0.00) LODOut=(150.0) ShadowReceiver=False Reflect=True
    }
    Instance=RAINLIGHT<2>
    {
    Moveable=True
    MeshFile=VE2_RLIGHT_2.GMT CollTarget=False HATTarget=False LODIn=(0.00) LODOut=(150.0) ShadowReceiver=False Reflect=True
    }

    The guy's at Enduracer have this working on the Flat6 mod but the Mas is locked so I can't study how it's written.


    Also tried this, same result.
    ---------------------------------------------- Gives a Error loading TOKEN VE2_RLIGHT_2-------------------------------------------

    }
    Instance=RAINLIGHT
    {
    Moveable=True
    MeshFile=<VE2_RLIGHT1>.GMT CollTarget=False HATTarget=False LODIn=(0.00) LODOut=(150.0) ShadowReceiver=False Reflect=True
    }
    Instance=RAINLIGHT
    {
    Moveable=True
    MeshFile=<VE2_RLIGHT2>.GMT CollTarget=False HATTarget=False LODIn=(0.00) LODOut=(150.0) ShadowReceiver=False Reflect=True
    }
     
    Last edited: Nov 6, 2016
  6. T1specialist

    T1specialist Registered

    Joined:
    Jan 11, 2012
    Messages:
    237
    Likes Received:
    163
  7. D.Painter

    D.Painter Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,039
    Likes Received:
    2,341
  8. D.Painter

    D.Painter Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,039
    Likes Received:
    2,341
    Ok. I've follow Liquid's example. Following the same lines I've change it around in all the combination I can think of and are still getting the Token 2 error.
    Token 1 is loading but locks up at token 2.
    Sent a Email to Enduracers to ask for help because I know they have it working in their Flat6 mod. No reply.
    Surely this isn't hard! Someone would know how it works in rF2.

    The above is for rF1 and If hear rF2 is the same as rF1 @#$%! It's not even close.
    Anyone from ISI, Studio 397 must know surely.

    I haven't been able to find a tutorial on this anywhere.
     
  9. lordpantsington

    lordpantsington Registered

    Joined:
    Oct 5, 2010
    Messages:
    849
    Likes Received:
    79
    What is the genstring you are using?
     
  10. Liquid4653

    Liquid4653 Registered

    Joined:
    Sep 30, 2013
    Messages:
    202
    Likes Received:
    46
    Doug, some info on you rainlights needed, are you looking to have 2 rainlights on together?, or one rainlight where you have 2 variations and want to have one or the other showing? or the option to have 2 rainlights independfently changeable?

    you don't do tokens but having multiple instances, the idea behind the tokens is to switch out stuff so you only have 1 instance for the part.

    Once I know the finer details, we can get you moving again np.
     
    Last edited: Nov 7, 2016
  11. D.Painter

    D.Painter Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,039
    Likes Received:
    2,341
    Yep ok.
    Basically I want to change out two different rainlight configs.
    One has 1 light and the other has two. Each style has it's own GMT. The double rainlight is still only one GMT. Both are working fine individually but some liveries use one light and others use two.
    I want to set in the veh GenString=1 (single rainlight) and veh GenString=2 (double rainlight)
    Simple enough if the way you described it above worked in rF2. But it wont read the second <2> string.
    It works for one.
    There must be something different from rF1 in rF2 that it wont.
    Edit}
    Just got the reply I was hoping for. Marc has confirmed the way it's set up is exactly the same as rF1. The example is exactly the same as Liquid has already described above.
    So no idea why I'm getting the error all the time. I guess I'll just keep trying.

    Thanks guy's for your help.
     
    Last edited: Nov 7, 2016
  12. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,779
    Likes Received:
    2,241
    Are you sure your gmts are named correctly? Can you upload your veh and gen files to pastetext(for easier viewing) so we can see if there is maybe something else going on?
     
  13. klaasvh

    klaasvh Registered

    Joined:
    Oct 5, 2010
    Messages:
    172
    Likes Received:
    193
    If your 2 gmt's are named VE2_RLIGHT_1 and VE2_RLIGHT_2, you only need one entry in your .GEN file. The genstring should only contain a "1" or "2". These entries simply replace the <1> so rF2 reads it either as VE2_RLIGHT_1.gmt or VE2_RLIGHT_2.gmt
    }
    Instance=RAINLIGHT
    {
    Moveable=True
    MeshFile=VE2_RLIGHT_<1>.GMT CollTarget=False HATTarget=False LODIn=(0.00) LODOut=(150.0) ShadowReceiver=False Reflect=True
    }
     
  14. lordpantsington

    lordpantsington Registered

    Joined:
    Oct 5, 2010
    Messages:
    849
    Likes Received:
    79
    Klaasvh's response is what I was getting at. The Genstring creates an array. For each (column) character position <1>, <2>,<3>... in the genstring you can have (row) Values A, B, C... It is unfortunate that the examples we are given use the coincidental values 1, 2, 3...
     
  15. D.Painter

    D.Painter Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,039
    Likes Received:
    2,341
    Hey guy's.
    Thanks for trying to help. I've been talking with Marc from EnduRacers Modding Team via email. He's been very helpful.
    Still not working in the GenString none the less. A working install and then added the needed to both the Gen ini and the veh ini , GMT's are already named and installed but rF2 crashes before it gets to the menu.

    I've given up on the Genstring idea.
    So I've gone down a different road by using two Gen ini. One has RL 1, the other RL 2 then I set the Graphic= line in the veh ini to look for either one. This is working now.
     
  16. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    Just to try and help clarify the usage, <n> substitutes the nth character from the genstring. So if you have a Meshfile=VE2_RLIGHT_<1>.GMT in an instance:

    a vehicle with GenString=1 will load VE2_RLIGHT_1.GMT,

    while a vehicle with GenString=2 will load VE2_RLIGHT_2.GMT.


    As I understand it, GenString=456 would produce:
    <123> = 456
    <13> = 46
    <31> = 64
    etc. (but happy to be corrected!)

    *and wow, am I bad at spotting the post date on this forum...
     
  17. Nibiru

    Nibiru Registered

    Joined:
    Dec 24, 2011
    Messages:
    1,200
    Likes Received:
    1,295
    Can you elaborate on that? I'm a little slow
    I can understand the object naming but how do you work out the gen string?

    Say I have 4 different items Rim, wing, bumper, light. and each item has different amount of options 1 has 3 , next has 5, then 4 and the 2 lights above. How does the gen string work? Or how do you calculate it.
    Say i just have rims i want to change with 4 options how does that work out?
     
    Last edited: Jan 16, 2017
  18. lordpantsington

    lordpantsington Registered

    Joined:
    Oct 5, 2010
    Messages:
    849
    Likes Received:
    79
    In Lazza's example:
    Genstring=456

    The first character of the string is the number 4.
    The second character is 5.
    The third is 6.

    The things inside of < > get substituted with the entry for the listed character number.
    So in his examples a
    Meshfile=VE2_RLIGHT_<123>.GMT
    goes looking for VE2_RLIGHT_456.GMT

    Meshfile=VE2_RLIGHT_<13>.GMT = VE2_RLIGHT_46.GMT
    Meshfile=VE2_RLIGHT_<31>.GMT = VE2_RLIGHT_64.GMT

    If it helps think of the Genstring= entry in the VEH file as an array defining (Rims, Wing, Bumper, Light). If you have the 3rd style of rim, the 5th of wing, the 4th of bumper, the 2nd of light, the entry becomes Genstring=3542. Psuedo entry for your GEN is
    Meshfile=Rims<1>.GMT
    Meshfile=Wing<2>.GMT
    Meshfile=Bumper<3>.GMT
    Meshfile=Light<4>.GMT

    edit: Found my notes, valid index values are: 123456789:=?@
     
    Last edited: Jan 17, 2017
    DaREALMastaD and Nibiru like this.
  19. Nibiru

    Nibiru Registered

    Joined:
    Dec 24, 2011
    Messages:
    1,200
    Likes Received:
    1,295
    @lordpantsington thanks heaps for that explanation. I now understand and have my genstring working
     
    Woodee likes this.

Share This Page