A-Net Online

  • Mystic Questions

    From niter3@911:1519/1 to All on Sat Dec 3 08:40:12 2022
    So I'm in the process of creating/updating mods.

    Is there a way you can have Mystic call up a file for settings?

    So for instance, I have a seperate file that contains settings. This way there is no need to update the .MPS but only the config file....

    Thanks for any help!

    ... DOS=HIGH? I knew it was on something...

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: Clutch BBS * telnet://bbs.clutchbbs.com (911:1519/1)
  • From xqtr@911:30210/0 to niter3 on Sat Dec 3 20:03:27 2022
    Is there a way you can have Mystic call up a file for settings?
    So for instance, I have a seperate file that contains settings. This way t is no need to update the .MPS but only the config file....

    Not sure if i got the question correctly, but this depends on the mod. If the mod has a separate settings file you are OK, but if it doesn't then you have to alter the code in the MPS to read an external file for settings, which is quite a lot of job. Is that what you are asking?

    .
    :: XQTR :: Another Droid BBS :: andr01d.zapto.org:9999 :: xqtr@gmx.com

    --- Mystic BBS v1.12 A47 2020/11/23 (Raspberry Pi/32)
    * Origin: Another Droid BBS # andr01d.zapto.org:9999 (911:30210/0)
  • From niter3@911:1519/1 to xqtr on Sat Dec 3 13:50:52 2022
    Not sure if i got the question correctly, but this depends on the mod.
    If the mod has a separate settings file you are OK, but if it doesn't
    then you have to alter the code in the MPS to read an external file for settings, which is quite a lot of job. Is that what you are asking?


    I'm asking what would be the best way to write a MPS to pull in an external file for settings? Just looking for examples.

    ... Electricity is really just organized lightning.

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: Clutch BBS * telnet://bbs.clutchbbs.com (911:1519/1)
  • From jack phlash@911:1423/0 to niter3 on Sat Dec 3 14:03:41 2022
    on 03 Dec 2022, niter3 said...

    I'm asking what would be the best way to write a MPS to pull in an external file for settings? Just looking for examples.

    Yep, there are various ways to do this. Most are pretty simple. It sounds like what you really need is a good example, and unfortunately I can't think of any off of the top of my head, though I'm sure there are numerous ones out there.

    |08j |15A C K |08p |15H L A S H |08!

    --- Mystic BBS v1.12 A47 2021/12/25 (Windows/32)
    * Origin: d i s t o r t i o n // d1st.org (911:1423/0)
  • From xqtr@911:30210/0 to niter3 on Sun Dec 4 00:14:24 2022
    I'm asking what would be the best way to write a MPS to pull in an externa file for settings? Just looking for examples.

    There isn't a "best" way, only the way you prefer :)

    You could save settings in a simple text file, with no formating like the DOOR.SYS file does. You could use a text file, with a format like an INI file, or a CSV and you could also use a binary type file, in which you can save some record.

    Also there is the question where to save this settings file. Some prefer to make a directory, specific for mod related files and others use the ./scripts folder, where the .MPS file is.

    Each way, has its pros and cons. Personally i tend to use simple text files, with an INI like, format style, just for readability and easy customization for others to do. A plain text file, in which a line is a variable for some setting of the mod, doesn't tell much to some other who wants to change it.

    .
    :: XQTR :: Another Droid BBS :: andr01d.zapto.org:9999 :: xqtr@gmx.com

    --- Mystic BBS v1.12 A47 2020/11/23 (Raspberry Pi/32)
    * Origin: Another Droid BBS # andr01d.zapto.org:9999 (911:30210/0)
  • From paulie420@911:1503/0 to niter3 on Sat Dec 3 15:55:17 2022
    I'm asking what would be the best way to write a MPS to pull in an external file for settings? Just looking for examples.

    You could download a few of the RCS mods that were released last year... one of them is called Game Room, and it uses .ini files and creates menus using them - but basically, its pulling in text settings from an outside file. The ZIP is named rcsgr12.zip and can be found @ 2oFB, or on the fsxNet File Areas...

    Thats the best part about MPS - 96% of every mod is open-sourced and you can just read thru...

    I suggest checking out work by;
    XQTR
    Black Panther
    MeaTLoTioN
    DreamMaster (although not much a47/a48 compatible stuff...)

    ^^^ learn from the greats - some of em even #comment better than Wayne Bell. :P



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: 2o fOr beeRS bbS>>20ForBeers.com:1337 (911:1503/0)
  • From paulie420@911:1503/0 to xqtr on Sat Dec 3 15:56:34 2022
    Also there is the question where to save this settings file. Some prefer to make a directory, specific for mod related files and others use the ./scripts folder, where the .MPS file is.

    If you do create a directory, don't name it something generic like /scripts/settings or /text/ansi - better choices are /scripts/mymodname_settings /text/mymodname_ansi. :P



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: 2o fOr beeRS bbS>>20ForBeers.com:1337 (911:1503/0)
  • From niter3@911:1519/1 to paulie420 on Sat Dec 3 19:57:46 2022
    On 03 Dec 2022, paulie420 said the following...

    I'm asking what would be the best way to write a MPS to pull in an external file for settings? Just looking for examples.

    You could download a few of the RCS mods that were released last year... one of them is called Game Room, and it uses .ini files and creates
    menus using them - but basically, its pulling in text settings from an outside file. The ZIP is named rcsgr12.zip and can be found @ 2oFB, or
    on the fsxNet File Areas...

    Thats the best part about MPS - 96% of every mod is open-sourced and you can just read thru...

    I suggest checking out work by;

    Thanks, I appreciate the feedback and will take a look.

    I am not exactly new to coding, its just been some years...

    ... What do you mean, QWK? It took me over an hour to read!

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: Clutch BBS * telnet://bbs.clutchbbs.com (911:1519/1)
  • From esc@911:1719/0 to niter3 on Sat Dec 3 17:33:25 2022
    Is there a way you can have Mystic call up a file for settings?

    You can have separate .cfg or .ini files, mpl is quite powerful insofar as you can do basically most things you'd be able to do writing a pascal BBS mod. It's really up to your creativity. But there aren't any real strong helper functions or anything to get this done for you, you'll just have to write the code.

    --- Mystic BBS v1.12 A48 2022/07/11 (Linux/64)
    * Origin: m O N T E R E Y b B S . c O M (911:1719/0)
  • From xqtr@911:30210/0 to esc on Sun Dec 4 12:41:52 2022
    It's really up to your creativity. But there aren't any real strong helper functions or anything to get this done for you, you'll just have to write code.

    ...or just copy/paste. There are many MPL mods, that use different ways to save setting, no need to recreate the wheel ;)

    The easiest way, for the programmer, would be to save variables, directly into a binary file. For example someone could have a record type variable, that would contain all settings, for example:

    Var
    Settings = Record
    folder:string;
    username:string;
    lastseen:longint;
    etc.
    End;

    When the programmer wants to save/load them, he could easily do a blockread/blockwrite of this variable and... that was it. :)

    INI files, are more readable for sure and allow others to change settings more easy, but take more programming effort for the modder, for sure.

    .
    :: XQTR :: Another Droid BBS :: andr01d.zapto.org:9999 :: xqtr@gmx.com

    --- Mystic BBS v1.12 A47 2020/11/23 (Raspberry Pi/32)
    * Origin: Another Droid BBS # andr01d.zapto.org:9999 (911:30210/0)
  • From esc@911:1719/0 to xqtr on Sun Dec 4 15:21:32 2022
    ...or just copy/paste. There are many MPL mods, that use different ways
    to save setting, no need to recreate the wheel ;)

    Yep!

    In fact I was thinking that a library of helper functions for MPL would make a cool standalone release :)

    --- Mystic BBS v1.12 A48 2022/07/11 (Linux/64)
    * Origin: m O N T E R E Y b B S . c O M (911:1719/0)
  • From jack phlash@911:1423/0 to esc on Sun Dec 4 16:25:39 2022
    on 04 Dec 2022, esc said...

    In fact I was thinking that a library of helper functions for MPL would make a cool standalone release :)

    Yes, it would.

    *eyes the two Demonic members in this thread.* :P

    |08j |15A C K |08p |15H L A S H |08!

    --- Mystic BBS v1.12 A47 2021/12/25 (Windows/32)
    * Origin: d i s t o r t i o n // d1st.org (911:1423/0)
  • From niter3@911:1519/1 to esc on Sun Dec 4 19:33:00 2022
    On 03 Dec 2022, esc said the following...

    Is there a way you can have Mystic call up a file for settings?

    You can have separate .cfg or .ini files, mpl is quite powerful insofar
    as you can do basically most things you'd be able to do writing a pascal BBS mod. It's really up to your creativity. But there aren't any real strong helper functions or anything to get this done for you, you'll
    just have to write the code.

    Just wanted to let you know, after a long time banging my head, I my mod working with a settings.ini file.

    ... A truly wise man never argues with a Unicorn

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: Clutch BBS * telnet://bbs.clutchbbs.com (911:1519/1)
  • From niter3@911:1519/1 to paulie420 on Sun Dec 4 19:36:11 2022
    You could download a few of the RCS mods that were released last year... one of them is called Game Room, and it uses .ini files and creates
    menus using them - but basically, its pulling in text settings from an outside file. The ZIP is named rcsgr12.zip and can be found @ 2oFB, or
    on the fsxNet File Areas...

    Thanks, this was helpful. I got stuck for a while. I was running it through an array and for unknown reasons it wouldn't work with an array using the case statement.

    Finally, I put it together the same way you had it using just a loop. 'While Not fEof(filename) Do begin.....

    I was trying to read it in an array first and it was actually storing the content into the said variable, but for no reason it would just crap out on certain variables.

    Anyways, it's working now!

    ... The seminar on time travel will be held two weeks ago

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: Clutch BBS * telnet://bbs.clutchbbs.com (911:1519/1)