Solved Where does the progress table come from?

Discussion in 'Mod Support' started by Jon Stephan, Jul 26, 2022.

  1. Jon Stephan

    Jon Stephan
    Expand Collapse

    Joined:
    Jul 21, 2022
    Messages:
    11
    If I look in the mission editor, some of the mission types have tables under the progress tab. Where is that defined?

    I'm trying to create a time-trial like flowgraph mission, but the final screen doesn't show the previous attempt times. I suspect this is defined for the mission, but I can't find any documentation on it.
     
  2. Jon Stephan

    Jon Stephan
    Expand Collapse

    Joined:
    Jul 21, 2022
    Messages:
    11
    Well, I figured out where this comes from. I think self.autoUiAggregateProgress gets set in constructor.lua in gameplay/missionTypes

    Now (I think) I just need to figure out how to override this in my flowgraph.
     
  3. Jon Stephan

    Jon Stephan
    Expand Collapse

    Joined:
    Jul 21, 2022
    Messages:
    11
    Ok, I figured out how to do what I need to do.

    In order to make a flowGraph mission's progress look like a time trial, I need to make a custom lua node with this text (this was copied and modified from the constructor for the time trial mission type):


    self.mgr.activity.defaultAggregateValues = {
    all = {
    bestTime = 0
    }
    }
    self.mgr.activity.defaultLeaderboardKey = 'highscore'
    self.mgr.activity.autoAggregates = {
    {
    type = 'simpleHighscore',
    attemptKey = 'time', -- key in the attempt
    aggregateKey = 'bestTime', -- key in the aggregate
    sorting = 'ascending', -- keeping the lower time
    newBestKey = 'newBestTime',
    leaderboardKey = 'highscore',
    newLeaderboardEntryKey = 'rankedOnLeaderboardIndex'
    }
    }
    self.mgr.activity.autoUiAttemptProgress = {
    {
    type = 'simple',
    formatFunction = 'detailledTime',
    attemptKey = 'time',
    columnLabel = 'bigMap.progressLabels.time',
    },
    }
    self.mgr.activity.autoUiAggregateProgress = {
    {
    type = 'simple',
    formatFunction = 'detailledTime',
    aggregateKey = 'bestTime',
    columnLabel = 'bigMap.progressLabels.bestTime',
    newBestKey = 'newBestTime',
    }
    }
    self.pinOut.flow.value = self.pinIn.flow.value
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice