Help with MOD

Discussion in 'Work-In-Progress Mods' started by startege1, May 21, 2015.

  1. startege1

    startege1 Active Member

    Messages:
    355
    Likes Received:
    58
    Hi,

    I'm just about to make a mod where you build units that produce ECO. But I had the problem that you start out too little eco had then, for this reason, I have installed a new unit that is scheduled for launch. But in the long run of the game takes too much.

    For this reason, I wanted to ask if anyone knows how to set a limited lifetime? which gradually decreases and then dies. Is the? What should I do?

    and

    If I, a new replacements a factory (already take that design what is there) How can I adjust the there will be a new section. I can already build the factory then in the game but only either Bot or Vehicle. How can I open another section or is not it?

    Sorry for the bad translation.

    /in German

    Ich bin gerade dabei einen Mod zu machen in dem man Einheiten baut, die ECO produzieren. Ich hatte aber das Problem das man am Anfang zu wenig eco dann hatte, aus diesem Grund habe ich eine NEUE Einheit eingebaut die für den start vorgesehen ist. aber auf dauer bringt die zuviel.

    Aus diesem Grund wollte ich fragen ob Jemand weiß wie man eine begrenzte Lebenszeit einstellt? die nach und nach abnimmt und dann stirbt. Geht das? Was muss ich mache?

    und

    Wenn ich eine Fabrik, eine neue einbaue, (nehme das Design was schon da ist) wie kann ich einstellen das es eine neue Sektion wird. Ich kann schon die Fabrik dann bauen im Spiel aber nur entweder Bot oder Vehicle. Wie kann ich da eine andere Sektion eröffnen oder geht das nicht?


    yours sincerely

    startege1
  2. startege1

    startege1 Active Member

    Messages:
    355
    Likes Received:
    58
  3. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Oh no, it has been HOURS without a reply! So impatient... :p

    Anyway, the mod you might want to take a look at for new factories is ModX. I think it has added a new tech 0 factory next to the existing factories.
    Heizmeister likes this.
  4. zx0

    zx0 Well-Known Member

    Messages:
    295
    Likes Received:
    319
    About the second question (if I understend correctly). I didn't try following myself, so I may have missed something. Look at /ui/main/shared/build.js and /ui/main/game/live_game/live_game_build_bar.js. Near to the top of live_game_build_bar.js their is code that creates new build tabs and sets tabs' order. Add whatever tab you need, don't forget about commas. There's list of units in build.js that states which tab each unit belongs to.
  5. startege1

    startege1 Active Member

    Messages:
    355
    Likes Received:
    58
    thanks for you answer

    does not go anyway, because I have yet add what.

    there I have it inserted:

    Code:
     var self = this;
           
            // Maps a spec in the current selection to a build list
            self.selectedSpecs = ko.observable({});
            // Maps a build item spec id to a BuildItem
            self.buildItems = ko.observable({});
            // Maintains the tab list
            self.tabs = ko.observableArray([
                new BuildTab('factory', '!LOC(live_game_build_bar:factory.message):factory'),
                new BuildTab('combat', '!LOC(live_game_build_bar:combat.message):combat'),
                new BuildTab('utility', '!LOC(live_game_build_bar:utility.message):utility'),
                new BuildTab('vehicle', '!LOC(live_game_build_bar:vehicle.message):vehicle'),
                new BuildTab('bot', '!LOC(live_game_build_bar:bot.message):bot'),
                new BuildTab('air', '!LOC(live_game_build_bar:air.message):air'),
                new BuildTab('sea', '!LOC(live_game_build_bar:sea.message):sea'),
                new BuildTab('orbital', '!LOC(live_game_build_bar:orbital.message):orbital'),
                new BuildTab('ammo', '!LOC(live_game_build_bar:ammo.message):ammo'),
                new BuildTab('nw', '!LOC(live_game_build_bar:ssa.message):nw'),
            ]);
            var tabOrder = _.invert([
                'factory',
                'combat',
                'utility',
                'vehicle',
                'bot',
                'air',
                'sea',
                'orbital',
                'ammo',
                'nw',
            ]);
    "nw" is the new section

    is no going. the factory can i build in the game. no units. 1 unit is in the factory set in.

    What should i do?

Share This Page