Really need a separate Battle Log

Thought I’d ask again about having a separate Battle Log.

Especially in a turn-based game, there can be a LOT of events (I just got 27 and had 65 the previous turn!) so it’s very easy to skip through those and miss someone sending you tech, a player going AFK/QUIT/declaring War, etc.

I.e. it would be great to have a third tab: Diplomacy, Events, and Battle Log.

5 Likes

Here’s a hacky fix, enjoy! :stuck_out_tongue:

(function() {
  var u = NeptunesPride.universe;
  var npui = NeptunesPride.npui;
  var np = NeptunesPride.np;

  var filter = 'o';

  var originalHeader = npui.InboxEventHeader;
  npui.InboxEventHeader = function () {
    var header = originalHeader.apply(this, arguments);
    Crux.DropDown(filter, {
        'c': 'Combat',
        'o': 'Other'
      }, 'change_event_subtype')
      .grid(10, 0, 10, 3)
      .roost(header);
    return header;
  };

  np.on('change_event_subtype', function (e, d) {
    filter = d;
    np.trigger('show_screen', 'inbox');
  });


  var originalInboxRowEvent = npui.InboxRowEvent;
  npui.InboxRowEvent = function(message, _args) {
    var row = originalInboxRowEvent.apply(this, arguments);
    var subtype = message.payload.template.indexOf('combat') === -1 ? 'o' : 'c';

    if (filter != subtype) {
      row.hide();
    }
    return row;
  };

})();

Bookmarklet version:

javascript:(function()%7B(function()%20%7Bvar%20u%20%3D%20NeptunesPride.universe%3Bvar%20npui%20%3D%20NeptunesPride.npui%3Bvar%20np%20%3D%20NeptunesPride.np%3Bvar%20filter%20%3D%20'o'%3Bvar%20originalHeader%20%3D%20npui.InboxEventHeader%3Bnpui.InboxEventHeader%20%3D%20function%20()%20%7Bvar%20header%20%3D%20originalHeader.apply(this%2C%20arguments)%3BCrux.DropDown(filter%2C%20%7B'c'%3A%20'Combat'%2C'o'%3A%20'Other'%7D%2C%20'change_event_subtype').grid(10%2C%200%2C%2010%2C%203).roost(header)%3Breturn%20header%3B%7D%3Bnp.on('change_event_subtype'%2C%20function%20(e%2C%20d)%20%7Bfilter%20%3D%20d%3Bnp.trigger('show_screen'%2C%20'inbox')%3B%7D)%3Bvar%20originalInboxRowEvent%20%3D%20npui.InboxRowEvent%3Bnpui.InboxRowEvent%20%3D%20function(message%2C%20_args)%20%7Bvar%20row%20%3D%20originalInboxRowEvent.apply(this%2C%20arguments)%3Bvar%20subtype%20%3D%20message.payload.template.indexOf('combat')%20%3D%3D%3D%20-1%20%3F%20'o'%20%3A%20'c'%3Bif%20(filter%20!%3D%20subtype)%20%7Brow.hide()%3B%7Dreturn%20row%3B%7D%3B%7D)()%7D)()

Thanks Annan, I will implement this as soon as I can get back to NP.

You might also be interested to know if blight I have both a game wide chat and separate battlelog

!

1 Like

Ooh, that’s really cool. Love the global chat!

Having multiple tabs is a good idea. I used the drop down because it required less added code.

So any idea Jay when you’ll be able to get back to NP?
The last update in the “Galactic News” was April 23rd … :frowning:

Be really nice to have this feature added (Chat has also been often requested) and since you already wrote the code for Blight, maybe not much work to back-port to NP?

Yep, not to much work to do the port. I added it to Blight because I knew how much NP needed it.

I’m rushing rushing rushing to get blight ready to show the general public at Pax Aus in 5 weeks.

Then fingers crossed there is an influx of new players so there will be bugfixes and feedback to respond to, but I should be able to share the love around for both games.

(just a follow up, NP right now pays about 1/5th of a salary so I think it’s only fair that it gets at least one day a week on it. That’s how I think about it anyhow)

1 Like

Oh, Jay, for sure, follow the money! Besides, if HULK weren’t such a hyperactive star killer, he would have fewer messages to wade through.

Everyone buy more badges, then Jay can dedicate 2 days a week ;-D

1 Like

Just put my money where my mouth is… how long do they take to show up on your account? Purchased an hour or so ago but no sign of them yet.

Should be instant! I’ll have a look at what happened.

Update: I’ve given you 10 credits manually but some glitch in Paypal may mean you get another 10 later. I dont know whats going on.

Ok thanks

wfmcgillicuddy: Yea, the Hulk can get a bit carried away with his SMASHING! :wink:

We’re actually in the last stage of this 32-user game … thought for sure I was going to get squashed between a couple of players early on, but one bailed … and then somehow the Big Green Machine just started rolling.

It’s an 8-tick turn based game with lots of stars and here’s the most recent screenshot - 39 events … of which 37 are combat related, 1 is finishing a level of tech, and 1 is an alliance request - a player with a single star wanted to see the carnage, so I was happy to oblige.

At this point, I don’t care too much about those combat events but be nice to see the “other” events in that separate tab. A reminder for Jay that as reported before, events aren’t sorted correctly for multiple-pages … you start at the bottom of the first page & work your way up, then go to the bottom of the second page & work your way up, go to third page, etc.