Welcome Message plugin

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

  1. McFlex

    McFlex Registered

    Joined:
    Feb 23, 2012
    Messages:
    1,031
    Likes Received:
    317
    Any news on this? This is the last issue which keeps us away from using it in our league
     
  2. Tygernoot

    Tygernoot Registered

    Joined:
    Feb 26, 2012
    Messages:
    114
    Likes Received:
    64
    Let me see if I can do this soon (in a week or two) when I have some time available :)
     
    McFlex likes this.
  3. Gonzo

    Gonzo Member

    Joined:
    Oct 5, 2010
    Messages:
    954
    Likes Received:
    303
    WelcomePlugin_2.1.zip Link above is down again.
    Any ressources of it, anyone?

    Thanks in advance
     
  4. Tygernoot

    Tygernoot Registered

    Joined:
    Feb 26, 2012
    Messages:
    114
    Likes Received:
    64
    Hi. I'll upload the files to my server today :)

    I reproduced the rejoin thingy. The reason it doesn't work now is because a driver remains listed in the race / plugin data, even if he disconnects. So my plugin doesn't pick up on it when a driver rejoins. I'll need to check if there's a flag to use to detect this. Will do some tests today and let you know.
     
    McFlex likes this.
  5. Gonzo

    Gonzo Member

    Joined:
    Oct 5, 2010
    Messages:
    954
    Likes Received:
    303
    have you access to his latency?
    Otherwise you could use his position (in pits, in garage) or something like that.
    Thanks, pls give me a hint if you can provide it again.

    Maybe i should create an rF2 filebase.
     
  6. McFlex

    McFlex Registered

    Joined:
    Feb 23, 2012
    Messages:
    1,031
    Likes Received:
    317
    That's great to hear :cool:
     
  7. Tygernoot

    Tygernoot Registered

    Joined:
    Feb 26, 2012
    Messages:
    114
    Likes Received:
    64
  8. Gonzo

    Gonzo Member

    Joined:
    Oct 5, 2010
    Messages:
    954
    Likes Received:
    303
    tyvm!
     
  9. Gonzo

    Gonzo Member

    Joined:
    Oct 5, 2010
    Messages:
    954
    Likes Received:
    303
    works like a charm!
    Good idea to have a config file per profile, because i am using several server profiles on this machine.

    keep in mind that the new ui will be on html5-base ;), this opens doors for way better welcome-messages.
     
  10. Tygernoot

    Tygernoot Registered

    Joined:
    Feb 26, 2012
    Messages:
    114
    Likes Received:
    64
    Sorry for the lack of updates, I moved (countries) early this month, so didn't have a lot of time. I did have a look earlier, but I couldn't easily figure out a way yet to detect whether a driver rejoined, so it might be tricky...
    If I can't find a plugin value, I suppose I need to 'hack' the interface a bit more to read out the server messages in the chat window. If I find a "<driver> has left" message, I can flag that driver for when he rejoins.
    Or we need to ask Studio 397 to do a plugin update :)
    Although one thing just pops into mind... perhaps the game temporarily marks the player as DNF during the time he has left the server..? Hmmm, will have a look at that and keep you posted :)
     
    McFlex likes this.
  11. Nico Barclay

    Nico Barclay Registered

    Joined:
    Dec 16, 2014
    Messages:
    96
    Likes Received:
    70
    Hello i installed on my dedicated server the pluggin attemtping to have automatic ballast for ppl joining ive done it both ways editing the lines where it should go..

    1-
    "DriverMassOptions": {
    "Nico Barclay": 50,

    2-
    "DriverMassOptions": {
    [Nico Barclay]
    mass=50

    In the Log seems say it "loads" but in the server i get no notice of the weight added and when i try to put a Welcome message same deal. i get this msj:
    "Succeeded to open handle to the dedicated window (chat button)
    Succeeded to open handle to the dedicated window (chat edit)
    Error parsing JSON file: C:\RaceServer\rfactor2-dedicated\UserData\player\WelcomePlugin.json
    Driver joined the server: Nico Barclay
    "

    Any ideas? ty
     
  12. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    @Nico Barclay Editing a JSON file with notepad or similar requires you to be very careful with the syntax. Can you paste the entire file contents here? You can use Insert -> Code (in the post editor) to avoid it actually filling the page here.
     
    Nico Barclay likes this.
  13. Nico Barclay

    Nico Barclay Registered

    Joined:
    Dec 16, 2014
    Messages:
    96
    Likes Received:
    70
    thx, yeah im no expert just filling the blanks and trying to not mess the "exterior"
    https://www.sendspace.com/file/my5ygt
     
  14. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    @Nico Barclay You're certainly trying it with a fair few names in there lol

    Only thing I've noticed with a quick look is this:
    "Osvaldo Angelone: 50,

    Which is missing the second " .
     
  15. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    I probably should have tried the lazy option and googled for a json editor... seems something like this might work:
    http://www.jsoneditoronline.org/

    Only thing is it doesn't like the final , before the } to close the list of names - Tygernoot's files include it, so it might not be a problem. But that missing " after the name will definitely cause issues.
     
  16. Nico Barclay

    Nico Barclay Registered

    Joined:
    Dec 16, 2014
    Messages:
    96
    Likes Received:
    70
    The only difference i see beside the last " is the bracket type does it make any difference?
    original file
    "DriverMassOptions": {
    },


    Editor
    "DriverMassOptions": [
    ],


    Still getting the
    "
    Succeeded to open handle to the dedicated window (chat button)
    Succeeded to open handle to the dedicated window (chat edit)
    Error parsing JSON file: C:\RaceServer\rfactor2-dedicated\UserData\player\WelcomePlugin.json
    Driver joined the server: Nico Barclay
    "
    is the server not allowing the dll to work?
     
    Last edited: Apr 3, 2017
  17. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,405
    Likes Received:
    953
    Nico, try this...worked on my test server, changed Osvaldo's name to mine and got the 50kg penalty message.
    My fix was to add " after Angelone and remove the , after the last 50
    Code:
    {
       "DriverMassOptions": {
           "Ignacio Revoredo": 50,
           "Ricardo Dorador": 50,
           "Carlos Luksic": 50,
           "Sergio Avendano": 50,
           "Tonga Guardia": 50,
           "Nicolas Rocha": 50,
           "Carlos Reina": 50,
           "Diego Castillo": 50,
           "Carlos Andres Ladines": 50,
           "Jonathan Levy": 50,
           "Emilio Concha Fernandez": 50,
           "Diego Carranza": 50,
           "Argenis Riera": 50,
           "Giancarlo Velarde": 50,
           "Nico Barclay": 50,
           "Gonzalo Rivero": 50,
           "Osvaldo Angelone": 50
          
       },
       "WelcomeText": [
           "Line1",
           "Line2",
           "Etc",
           "It is not recommended to put more than 5 lines for performance reasons",
           "The maximum length for each line is 95 chars, the rest will be truncated"
       ],
       "SendWelcomeTextEverySession": true
    }
    My editor of choice is notepad++, you can get it here
     
    Nico Barclay likes this.
  18. Nico Barclay

    Nico Barclay Registered

    Joined:
    Dec 16, 2014
    Messages:
    96
    Likes Received:
    70
    it works! i dont know what u did but i did notice the allignment works, so if i want to add a welcome message i go
    "Line1" insertmessage before the comma?,

    ty!
     
  19. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,405
    Likes Received:
    953
    Any messages should have the " at the start and end, so if you highlight Line1 only and type your message you should be fine. eg
    "Hello and welcome",
     
    Nico Barclay likes this.
  20. McFlex

    McFlex Registered

    Joined:
    Feb 23, 2012
    Messages:
    1,031
    Likes Received:
    317
    Hey Tygernoot any news on the rejoin issue?
     

Share This Page