Increasing build.js build numbers

Discussion in 'Mod Discussions' started by killerkiwijuice, June 4, 2015.

  1. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    The faction mod has sorta ran into an issue. Build.js is limited to a maximum of 15 units per bar (0-14). I tried to get around this by adding two of the same numbered units, but then one of them disappears and cann't be built.

    Anyone know how to fix this?
  2. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Nevermind, it was an easy fix by increasing the ITEMS_PER_ROW in live_game_build_bar.js

    but this is definitley not a practical way to add new build bars.
    Gorbles likes this.
  3. Gorbles

    Gorbles Post Master General

    Messages:
    1,832
    Likes Received:
    1,421
    It actually makes sense from an object-oriented approach; you define var limits at the top level, and they filter down into child declarations, etc. Problem is, JS vanilla isn't designed very well for object-oriented programming (or really, programming at all :p), you'd need something like Angular (urgh) or React to really build on this approach.

    Upvoting purely for being arsed to provide the fix you found <3 A lot of modders forget to do that with their own threads (in general, not just with PA), haha.
    killerkiwijuice and Nicb1 like this.

Share This Page