Inactive [MECH] SignLink v1.24 - Show text on signs based on keys [2320]

Discussion in 'Inactive/Unsupported Plugins' started by bergerkiller, Sep 3, 2011.

  1. Offline

    bergerkiller

    [​IMG]

    Description

    This plugin acts as a bridge between plugins and signs to easily display text on signs. Instead of entering commands, clicking the sign, or any other routine plugins could use, players can enter 'variables', key values starting (and ending) with %, to show information at that spot.

    It also includes features no other plugin is needed for, such as custom text and ticker values you can set in values.yml. Signs are stored on file, they survive reloads and server restarts.

    A simple video showing what it does:


    See WIKI page for more information

    Configuration

    The linkedsigns.txt contains information of where signs are located. The values.yml sets the (standard) usable keys. If your ticker message does not 'flow' over all signs, add more spaces at the end or start of your message. This is simply how it works. :)
    Show Spoiler

    Code:
    # In here you can set default values for this plugin.
    # The ticker property can be LEFT, RIGHT or NONE and sets the direction message is 'ticked'.
    # tickerInterval sets the amount of ticks (1/20 of a second) are between the ticker update.
    # The value is the thing to display or tick.
    # To use colors in your text, use the § sign followed up by a value from 0 - F.
    # Example: §cRed to display a red colored 'Red' message.
    # You can find all color codes on the internet (they may use & there, ignore that!)
    sign:
        ticker: NONE
        value: This is a regular message you can set and is updated only once.
    test:
        tickerInterval: 3
        ticker: LEFT
        value: 'This is a test message being ticked from right to left. '


    time and date formats

    These can be set in the config.yml file:
    You can find more help on the format on the internet, search for 'system date format'.

    pauses

    As for 1.o1 you can set ticker pauses. This example shows the test message, with a pause of 10 ticks (2 * 5) after each word.
    Show Spoiler
    Code:
    test:
        tickerInterval: 2
        ticker: LEFT
        pauseDelays: [5, 3, 2, 5, 8, 6, 7, 5, 6, 3, 6]
        pauseDurations: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
        value: 'This is a test message being ticked from right to left. '

    Simply put: it ticks as long as the first delay, then pauses the duration, then goes to the next pause segment. This does not reset after ticking the full line, so try to use delays the length of the entire String. (or use none)

    Permissions and commands

    Use /togglesignupdate to turn sign updating on or off, just in case someone made a huge amount of updating signs that causes lag. Use /reloadsignlink to reload the values.yml.
    Permission nodes (Bukkit permissions):
    Code:
        signlink.addsign:
            description: Allows you to build signs containing variables
            default: op
        signlink.toggleupdate:
            description: Allows you to set if signs are being updated or not
            default: op
        signlink.reload:
            description: Allows you to reload the values.yml
            default: op
    TODO
    - Fix values.yml to allow multiple player-specific values (90% done)
    - Commands to set variables and tickers
    - Possible to set time and date formats

    Plugins that use SignLink

    TrainCarts (arrival signs)
    WebAuctionPlus

    Download

    Download SignLink from GitHub
    View the source code at GitHub

    Changelog

    Show your appreciation for my plugins by donating
    [​IMG]
     
    woodzy and fromgate like this.
  2. Offline

    bergerkiller

    @dog.big I have no idea how you manage to get these errors...but ow well time for more NPE checks...
    Won't increment the version though.

    EDIT

    Done, see the re-uploaded version on Github. Note that you may have to update Bukkit instead, it's odd that the netserver handler of the player is null.
     
  3. Offline

    paully104

    @bergerkiller

    Here is my config, i don't understand why i cannot get the %spawn to work.
    Code:
    # In here you can set default values for this plugin.
    # The ticker property can be LEFT, RIGHT or NONE and sets the direction message is 'ticked'.
    # tickerInterval sets the amount of ticks (1/20 of a second) are between the ticker update.
    # The value is the thing to display or tick.
    # To use colors in your text, use the § sign followed up by a value from 0 - F.
    # Example: §cRed to display a red colored 'Red' message.
    # You can find all color codes on the internet (they may use & there, ignore that!)
    sign:
        ticker: NONE
        value: This is a regular message you can set and is updated only once.
    test:
        tickerInterval: 3
        ticker: LEFT
        value: 'This is a test message being ticked from right to left. '
    spawn:
        tickerInterval: 3
        ticker: LEFT
        value: 'Spawn. '
     
  4. Offline

    bergerkiller

    @paully104 appears to be working here, after copy-pasting the spawn node. Did you use:
    to reload the values? (not sure if you added the node while the server was running or before starting)
    You can also use commands to get it to work, see the WIKI page.
     
  5. Offline

    paully104

    I added it before, i got the values to work, however they will not spread to other signs, i did %spawn with blank signs to the left and right just to double check it wasn't spreading correctly I'm assuming its my lack of experience with the plugin, since i solved the first error on my own. How do i make the text spread to all the signs to the left / right.
     
  6. Offline

    bergerkiller

    @paully104 ooow I see. Well it's fairly simple: you need to add spaces to the value text. For example:
    Code:
    value: 'Spawn point.                                                '
    It's due to the fact that the ticker simply removes characters from the left and adds them to the right - to fake having a ticker. If the value is too short, it won't show it's value over all signs.
     
  7. Offline

    paully104

    Hmmmmm, alright. I'll update the variable and include 10+ more spaces and get back to you.
     
  8. Offline

    kahlilnc

    How bout adding a permissions node just for the colors ?
     
  9. Offline

    bergerkiller

    @kahlilnc not sure if that's such a good idea. If someone made a colored sign and someone else edits it that can't use colors, it will get rid of the coloring. (and no one is going to like that)
    I can add it though, but will be true by default.
     
    kahlilnc likes this.
  10. Offline

    dog.big

  11. Offline

    bergerkiller

    @dog.big I see you used %playername without an ending %-sign?
    I have no idea what the results are for this...
    Will %time be used on the playername sign? Will it interfere? I am not sure what happens, but I guess it's best to end the name with a %-sign.
     
  12. Offline

    dog.big

    is possible to add %playername to change dynamicali, when player comes to it :)
     
  13. Offline

    bergerkiller

    @dog.big that's the task for plugins. Other plugins can (very easily) alter variables on signs. It can basically be done in 1-3 lines of code. Playername is just an internal example of what's possible with dynamic variables, such as time and tickers.
     
  14. Offline

    Mozartripper

    awesome been searching for something like this since bukkit has superseded hmod :D
     
  15. Offline

    Bence98007

    Bazd ahogy néztem a cfg fájlt láttam h sztem te magyar vagy.... ha nem jól tudom akk srry**
     
  16. Offline

    lipe123

    Using CB 1596 and your newest ver of signlink
    2012-01-01 22:13:06 [SEVERE] [MyWorlds] An error occured while updating the signs:
    2012-01-01 22:13:06 [SEVERE] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    2012-01-01 22:13:06 [SEVERE] at java.lang.String.charAt(Unknown Source)
    2012-01-01 22:13:06 [SEVERE] at com.bergerkiller.bukkit.sl.API.Ticker.right(Ticker.java:183)
    2012-01-01 22:13:06 [SEVERE] at com.bergerkiller.bukkit.sl.API.Ticker.update(Ticker.java:110)
    2012-01-01 22:13:06 [SEVERE] at com.bergerkiller.bukkit.sl.API.Variable.updateTickers(Variable.java:143)
    2012-01-01 22:13:06 [SEVERE] at com.bergerkiller.bukkit.sl.API.Variables.updateTickers(Variables.java:35)
    2012-01-01 22:13:06 [SEVERE] at com.bergerkiller.bukkit.sl.SignLink$2.run(SignLink.java:194)
    2012-01-01 22:13:06 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    2012-01-01 22:13:06 [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:493)
    2012-01-01 22:13:06 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    2012-01-01 22:13:06 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)

    This happens when you change the /var setticker bla bla info on a existing variable. The text just stops scrolling and those errors appear.
    If you do /var clear and redo it all, it works again.

    Also I noticed var's we create in game does not show up in the yml file, does it only get saved on server restart?
     
  17. Offline

    Paulifan1000

    You'r F**** Plugin Destrois my Server.
     
  18. Offline

    bergerkiller

    @Paulifan1000 Mission accomplished? Achem, any errors whatsoever, and what version did you use? (if you downloaded from BukkitDev, note that a wrong GitHub link was put there) This is not really constructive whatsoever, so please explain what happened, when and what the results are.

    @lipe123 See the new 1.15 version, added checks for empty ticker values. Note that the syntax is:
    To set the value, use:
     
  19. Offline

    lipe123

    @bergerkiller I'll try it. I did not set empty values tho. It was just impossible to modify an existing ticker with a new value without clearing it all first.

    Think I know what I did wrong, I didn't do a /variable edit before doing the setticker thing. Slightly unclear in documentation :p
     
  20. Offline

    MuisYa

    Very very very useful information!

    bergerkiller Whouw, good job on the plugin. Not using it but what i see in youre videos is amazing. Nice work!
     
  21. Offline

    bergerkiller

    MuisYa thanks :)
    Also, thanks for reminding me of SignLink, still need to fix a few things so the ticker is not disabled when 'downgrading the ticker rate'.
     
  22. Offline

    derfuzzi

    Hey, we need a new version please!!! It doesn't work on the #1818+ !!!!

    I have to shut down the server because I can not write a new text when the server is online.... what i mean is:
    -Server is online, write a new text in the values.yml
    *this text is after a reload of the server missing
    -so I have to shut down the server and the I can write the Text
    -after that I can start the Server and the text is there[...]
    that is really annoying! Greetings derfuzzi

    sry for my bad english....if it is bad :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  23. Offline

    bergerkiller

    derfuzzi use /reloadsignlink to reload the values.yml file. You can use the commands to edit the values in-game.
    (it saves the latest values on shutdown, that is why it got overwritten)
     
  24. Offline

    derfuzzi

    Ohh, ok, thank U very much bergerkiller, where do you come from? I'm from germany, your name sound like german too. :D
     
  25. Offline

    bobacadodl

    Request: Make it so that you can set a variable for a whole group, not just an individual. This would be really useful for server admins. (different "notification boards" depending on your permission group)
     
  26. Offline

    _Alf

    Any idea why my text is getting black when getting to the left side (the range between border and the point when a colored text turns black seems to be the charcount of the variable) of the sign?

    Using BKCLib 1.09, SignLink 1.17, Bukkit-1.1-R4-b1938

     
  27. Offline

    bergerkiller

    _Alf yeah it is a known issue, haven't been able to fix it yet. The color codes also transition to the end of the value text, which causes the text to fail basically. Haven't had time to figure out a solution...

    Uploaded 1.18 for CB 1988 R6
     
  28. Offline

    _Alf

    Then i might add another problem i have with traincarts (1.6) and arrival signs, don't know if it's SignLink related. It's not working:

     
  29. Offline

    bergerkiller

    _Alf use the following on the display sign:
    From top to bottom: the time, destination and train name.
     
  30. Offline

    _Alf

    Cool thing, thanks alot, it's working [gold]
     
  31. Offline

    Flenix

    Any way to add custom variables like the time and date ones? I want to add one for in-game time in hours and minutes.
     

Share This Page