Welcome Message plugin

Discussion in 'Plugins' started by Tygernoot, Mar 11, 2012.

  1. petrolhead

    petrolhead Registered

    Joined:
    Apr 26, 2018
    Messages:
    186
    Likes Received:
    31
    Can you add a message not using the plugin ie Multiplayer.json file and if so where
     
  2. Paul McC

    Paul McC Registered

    Joined:
    Oct 17, 2017
    Messages:
    970
    Likes Received:
    757
    Hi there Tygernoot! Only just got this working, know its been out ages. Just wanted to say Thankyou V much mate!
     
  3. Racecraft

    Racecraft Registered

    Joined:
    Sep 26, 2011
    Messages:
    24
    Likes Received:
    20
    Sorry for the "feature request" but it would be nice to have a non-whispered message option that is sent to chat at the start of every session.
    /w messages & weight penalties could be sent on user join
    And another more generic (non-whispered) message could be sent once at the start of every session.
     
  4. Jason K

    Jason K Registered

    Joined:
    Apr 20, 2020
    Messages:
    18
    Likes Received:
    8
    Does anybody else have a problem where the welcome plugin will intermittently fail to apply ballast with more than 10-ish drivers (AI or human)? It will work for some drivers but not others.
     
  5. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,405
    Likes Received:
    953
    The main reason I can think of for not working is that the driver names in the plugin not matching the drivers ingame name. Check the results .xml file for the drivers names that are affected and see if they match. Some human drivers manage to put a trailing space after their name.
     
  6. Jason K

    Jason K Registered

    Joined:
    Apr 20, 2020
    Messages:
    18
    Likes Received:
    8
    Yah, I've run into the trailing space issue and have verified all of the names.
    This isn't a problem with fewer than 10-ish drivers present. As long as we're under that number, the ballast is automatically applied normally.
    Above that number (again, either with human drivers or AI drivers or a mix of the two), ballast is only automatically applied to some drivers. I can manually apply the ballast using /setmass directly or invoking a /batch file.
     
  7. goonzo

    goonzo Registered

    Joined:
    Oct 19, 2012
    Messages:
    24
    Likes Received:
    0
    I have a similar problem. We never have more than ten drivers having success ballast(BTCC rules) but have regularly 20+ drivers joining our server, so everybody always get their success ballast set.
    But, when I add additional welcomeText to the WelcomePlugin.json some(of the ten) drivers are starting to NOT get their success ballast, so I assume this is a performance issue. Make sure to use the plugin ONLY for success ballast(not also for welcome message) and see if that fixes your problem. If that is already your case, then I don't know any workaround other than upgrading your server hw, or convince the authors to optimize the code.
     
  8. Tygernoot

    Tygernoot Registered

    Joined:
    Feb 26, 2012
    Messages:
    114
    Likes Received:
    64
    Jason sent me a PM a while ago about this issue, but I haven't looked into it yet. I have sort of given up on rFactor (and sim racing altogether) for the last year or two, so not really active in doing any plugin work for it either.

    The source is available in the first post though, so if anyone feels like compiling a new version, here's something perhaps worth trying.

    Instead of programmatically clicking the GUI button every UpdateScoring() tick, do it only every 3 ticks or so.

    Code:
    void WelcomePlugin::UpdateScoring( const ScoringInfoV01 &info ) {  
        if(WLC_hwndSendChatButton && WLC_hwndChatEdit) {
            m_nScoringCounter++;
            if(m_messageQueue.size() && ( m_nScoringCounter % 3 == 0 ) ) {     // update this if()
                DriverQueueMessage qMessage = m_messageQueue.front();
                  ...
    
    Otherwise, I can have a look if the plugin still compiles on my latest machine/setup.

    Best regards,
    Ed.
     
  9. MileSeven

    MileSeven Registered

    Joined:
    Apr 1, 2014
    Messages:
    650
    Likes Received:
    244
    Whilst I (now) appreciate that this is no longer being actively supported, does anyone know why multi-line messages in the WelcomeText section have started to appear in client chat boxes out of sequence?

    …and as a workaround, would fewer, longer lines of text with embedded carriage-returns allow a bit more control?
     
  10. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    715
    Likes Received:
    216
    Hello, anybody knows if the mass penalty system works on this plugin ?
    Looks like my "Vehicule CLass Name" is Wrong ... what should i use ?
    And where can i get the very last version ? I've got antivirus alerts on some links ...
    Thanks.
     
    Last edited: Nov 14, 2022
  11. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,405
    Likes Received:
    953
    Worked well last time I played with it, are you using the “Category” from the veh file as your class?
    BD7ED37B-5521-45E1-8DA8-2A4845E685D0.jpeg
     
    DanRZ likes this.
  12. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    715
    Likes Received:
    216
    Thanks, didn't read that properly ...
    For example, i should use "Ferrari, Ferrari 488 GTE" full with the comma ?
    Or "Ferrari 488 GTE" is enough ?
     
    Last edited: Nov 14, 2022
  13. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,405
    Likes Received:
    953
    I can't remember which one the game reads first, (I think it's the first entry) so I'd try with just "Ferrari" and if that doesn't work try the "Ferrari 488 GTE"

    Edit: the log analyser shows the category as "Ferrari"
     
  14. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    715
    Likes Received:
    216
    Thanks i will try multiple lines ...
     
  15. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    715
    Likes Received:
    216
    Do i have a message on console when it works on a class ?
    Both categories doesn't seem to work.

    By name i get the log on the chat console and it works with 200 kg.
    But i can't make it work by class ...
     
    Last edited: Nov 14, 2022
  16. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,405
    Likes Received:
    953
    ok GTE works;
    in the welcome.json;
    upload_2022-11-14_14-17-39.png

    When I join with Ferrari GTE, on server screen;

    upload_2022-11-14_14-18-29.png

    and ingame message as well
     
  17. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,405
    Likes Received:
    953
    Did a little bit of testing and it looks like that it's reading the first entry in the Class line in the .veh file, ie Line 39.
    upload_2022-11-14_14-46-39.png

    Dan, check in your server's ....userdata/player folder for a file called WelcomePluginLog.txt. Open it and check if there is an "error parsing json file" line. I had this when I grabbed a brand new download from page one.... I ended up copying the contents from a server I admin and pasted in and all worked then. Details of what I pasted in;
    Code:
    {
       "DriverMassOptions": {
           "DriverX": 15,
           "DriverY": 25,
           "DriverZ": 25
       },
       "VehicleMassOptions": {
           "GTE": 10,
           "Class2": 15,
           "Class3": 25
       },
       "WelcomeText": [
           "Welcome ",
           "Discord ",
           "Live Races ",
           "Log Analyser ",
           "Teamspeak "
          
       ],
       "SendWelcomeTextEverySession": false
    }
    
     
    DanRZ likes this.
  18. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    715
    Likes Received:
    216
    Thank you, i appreciate, i'm trying to make a "lazy BOP" but i struggle.

    I want to add X kilograms to the F488 GTE and Y kilograms to the Aston GTE. I can't use GTE class because they both have the same first category and so they will have the same penalty ... but X and Y are differents.

    I think i'm screwed or i will need to modify the plugin ...

    Or maybe i need to not add the GTE category when starting server in cars choice. I will try using all other possibilities only.

    Mass penalty by user name works perfectly.

    For the setups fixed i had to use "GTE GTE_FERRARI_488" maybe i need to use the all thing with blanks like in assigned setups ... I will try too.

    It would be cool to have a log option that lists the options of all players at connexion, like name, class ... that can be used in the json.
     
    Last edited: Nov 14, 2022
  19. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    715
    Likes Received:
    216
    I confirm it only works with first letters in Categories and so only GTE works. I'm screwed.
     
  20. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    715
    Likes Received:
    216
    I'm finally recompiling the plugin and using vehicule name instead of class which is "GTE" :confused:.
    Now i have "Ferrari 488 GTE #51" but i remove the " #51" and get some kind of generic car name ...

    And now my json is :
    Code:
        "VehicleMassOptions": {
            "Aston Martin Vantage GTE": 30,
            "BMW M8 GTE": 0,
            "Ferrari 488 GTE": 60,
            "Porsche 991RSR GTE": 15,
        },
    And it works perfectly ... just need to check all veh files to get all vehicle names ...
     
    Last edited: Nov 14, 2022
    Corti and Goanna like this.

Share This Page