• Adding custom user attributes to db

    From aLPHA@21:4/158 to apam on Mon Nov 8 07:03:26 2021
    Hey apam, if I am understanding the new function to store custom
    attributes in users.sqlite3 -- I can create and store simply by running a function like this from a lua script?

    bbs_set_user_attribute(script_avatar_id, "1")

    |04a|12LPHA
    |03Alpha Complex |15- |11alphacomplex.us:2323

    --- Talisman v0.30-dev (Linux/armv7l)
    * Origin: alphacomplex.us:2323 / https://discord.gg/BmEj4KY7Qj (21:4/158)
  • From apam@21:1/151 to aLPHA on Tue Nov 9 08:23:16 2021
    bbs_set_user_attribute(script_avatar_id, "1")

    try

    bbs_set_user_attribute("script_avatar_id", "1")

    :) should just create and store as you want.

    Andrew

    --
    |03Andrew Pamment |08(|11apam|08)
    |13Happy|10Land |14v2.0|08!|07


    --- Talisman v0.30-dev (Windows/x64)
    * Origin: The Grinning Cat - telnet://gcat.talismanbbs.com:11823 (21:1/151)
  • From aLPHA@21:4/158 to apamr on Mon Nov 8 16:16:07 2021
    bbs_set_user_attribute(script_avatar_id, "1")

    try

    bbs_set_user_attribute("script_avatar_id", "1")

    :) should just create and store as you want.

    Excellent! Going to convert the 'avatar' mod to utilze these new calls to
    the db. Will make the code so much more clean as well. I found parsing and replacing a key/value pair in a text file (using lua) a bit convoluted
    anyway!


    |04a|12LPHA
    |03Alpha Complex |15- |11alphacomplex.us:2323

    --- Talisman v0.30-dev (Linux/armv7l)
    * Origin: aLPHA cOMPLEX: You are in Error. No one is screaming. (21:4/158)
  • From apam@21:1/151 to aLPHA on Tue Nov 9 15:07:05 2021
    Excellent! Going to convert the 'avatar' mod to utilze these new calls
    to
    the db. Will make the code so much more clean as well. I found parsing
    and
    replacing a key/value pair in a text file (using lua) a bit convoluted anyway!

    Cool. Where do you store the avatar ansi files? Are they somewhere
    specific for your BBS? Or in the script data folder?

    What I'm wondering is how hard it would be for other scripters to utilize
    the avatars in their own scripts without knowing particulars of the
    sysop's installation.

    Andrew

    --
    |03Andrew Pamment |08(|11apam|08)
    |13Happy|10Land |14v2.0|08!|07


    --- Talisman v0.30-dev (Windows/x64)
    * Origin: The Grinning Cat - telnet://gcat.talismanbbs.com:11823 (21:1/151)
  • From aLPHA@21:4/158 to apam on Tue Nov 9 06:46:11 2021
    Cool. Where do you store the avatar ansi files? Are they somewhere
    specific for your BBS? Or in the script data folder?

    What I'm wondering is how hard it would be for other scripters to
    utilize
    the avatars in their own scripts without knowing particulars of the
    sysop's installation.

    Currently it's all just pulling from gfiles/faces.ans. Would there be a
    better place for it?

    |04a|12LPHA
    |03Alpha Complex |15- |11alphacomplex.us:2323

    --- Talisman v0.30-dev (Linux/armv7l)
    * Origin: aLPHA cOMPLEX: You are in Error. No one is screaming. (21:4/158)
  • From apam@21:4/158 to aLPHA on Tue Nov 9 17:55:08 2021
    Currently it's all just pulling from gfiles/faces.ans. Would there be
    a
    better place for it?

    Hmm, well if you want to allow people to upload them i might suggest
    splitting them up into individual ansi files for each face and then
    perhaps you could go by filename rather than offset, if they were
    individual files i might suggest having them in a sub directory so they
    are stored together.

    I'm thinking of biting the bullet and attempting to add an ansi editor
    into talisman and making it available to scripting, particularly for this
    mod, but I'm sure it could be useful for other things.

    Andrew


    --- Talisman v0.30-dev (Linux/armv7l)
    * Origin: aLPHA cOMPLEX: You are in Error. No one is screaming. (21:4/158)
  • From aLPHA@21:4/158 to apam on Tue Nov 9 19:41:15 2021
    Hmm, well if you want to allow people to upload them i might suggest splitting them up into individual ansi files for each face and then
    perhaps you could go by filename rather than offset, if they were
    individual files i might suggest having them in a sub directory so
    they
    are stored together.

    That sounds waaay cool... Also happy to add to git it you want to mess
    with the code as well! I'll work on splitting out the individual avatars.


    |04a|12LPHA
    |03Alpha Complex |15- |11alphacomplex.us:2323

    --- Talisman v0.30-dev (Linux/armv7l)
    * Origin: aLPHA cOMPLEX: You are in Error. No one is screaming. (21:4/158)
  • From apam@21:1/182 to aLPHA on Wed Nov 10 13:54:22 2021
    That sounds waaay cool... Also happy to add to git it you want to mess
    with the code as well! I'll work on splitting out the individual
    avatars.

    Sure, if you want to, at present I'm working on the Ansi Editor, I'll
    work on uploading / downloading via scripts after that.

    This might take a while though :)

    Andrew
    --
    |03Andrew Pamment |08(|11apam|08)
    |13Happy|10Land |14v2.0|08!|07

    --- Talisman v0.30-dev (Linux/x86_64)
    * Origin: HappyLand v2.0 - telnet://happylandbbs.com:11892/ (21:1/182)