1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[TOT] [TOTPP] Flags and Counters Library

Discussion in 'Civ2 - Scenario Creation' started by Prof. Garfield, Aug 15, 2019.

  1. Prof. Garfield

    Prof. Garfield Chieftain Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,134
    Location:
    Ontario
    This thread is for a "flags" library and a "counters" library.

    Basically, these are ways to access and modify the state table via functions (and allow for error checking and proper initialization). "Flags" can have values true and false, while counters can have numerical values.

    These modules can be required in other modules, as long as the flags and counters modules are also "set up" in the main events.lua file. More details are in the library code.

    As always, bug reports, bug fixes, feature requests, and code submissions are all welcome.
     

    Attached Files:

    Last edited: Sep 9, 2019
  2. JPetroski

    JPetroski Chieftain

    Joined:
    Jan 24, 2011
    Messages:
    1,452
    I'm sorry that you're not getting much input yet. I do appreciate what you're doing here. Once OTR is done, I have a few projects in mind that I'd like to use the converter and modules for.

    I'm interested to see how far I can get with both just using the modular pieces you've provided.

    Winter is around the corner and the lakes will be frozen soon! Activity will pick up!
     
  3. Prof. Garfield

    Prof. Garfield Chieftain Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,134
    Location:
    Ontario
    I've added a counter.lua file to the initial post (and edited out the line saying that the counter file was to come).

    I'm not too concerned. There are only a few of us, so I didn't expect any immediate action. Much of the code I've provided was examples for my last two lua lessons (in fact, I ask people to submit to the general library in a lesson in part to see if anyone gets there), and I wanted to get those done.
     

Share This Page