Author Topic: 'World' Chat?  (Read 2867 times)

Etarnalazure

  • Guest
'World' Chat?
« on: September 16, 2013, 06:44:04 PM »
Hello again,

I've had some problems wrapping my head around this
and I've been looking at previous topics about this, however
none of them seemed to help.

Basically,
I want to make a World chat, allowing players to chat
with each other no matter what channel they are currently
in.

From what I read this SHOULD be possible, after all from what
I understand from earlier posts, you can 'whisper' users in other
channels.

So it should be possible to modify that to just broadcast what ever
one person say to ALL the players correct?

Anyway. I simply wanted to ask if there was an inbuilt option
for a world chat before I begin to mess about with the code
for the chat. (I'm using the chat from Starlink (Though I have
modified it a tad to fit my own needs))


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 'World' Chat?
« Reply #1 on: September 17, 2013, 01:21:48 PM »
I don't believe there is anything in place for that right now, but it does seem like a useful thing to have so I will add in in a future version. The best way to add it would be to add a new Target type -- Target.Broadcast -- that will get handled by the server accordingly, sending the RFC to all connected clients, not just those in the same channel.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 'World' Chat?
« Reply #2 on: September 17, 2013, 01:38:19 PM »
In fact... I just went ahead and did just that. You will be able to use Target.Broadcast in the next version.

Etarnalazure

  • Guest
Re: 'World' Chat?
« Reply #3 on: September 18, 2013, 12:02:12 AM »
Great!

Cant wait!

However, could you tell in advance which class it is in?

I have fiddled around in some of TNet's classes to make them fit what I need
and I cant honestly remember which ones I played around with. By knowing
which class it belongs to, I can import just that one and I will be able to pin point
any errors a lot faster that way :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 'World' Chat?
« Reply #4 on: September 18, 2013, 01:17:26 PM »
Easiest way to do this on your end would be to use a versioning system. Check everything in, then update to the latest version and check the diffs.

Several files changed to make this happen. From the user's POV all you need to know is that there is now a Target.Broadcast type. You use it the same way you'd use everything else, such as Target.All when sending an RFC.

Etarnalazure

  • Guest
Re: 'World' Chat?
« Reply #5 on: September 18, 2013, 08:53:13 PM »
So pretty much, instead of this:

protected override void OnSubmit (string text)
{
   tno.Send("OnChat", Target.All, TNManager.playerID, text);
}

We write this:
protected override void OnSubmit (string text)
{
   tno.Send("OnChat", Target.Broadcast, TNManager.playerID, text);
}

? :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 'World' Chat?
« Reply #6 on: September 19, 2013, 03:26:23 PM »
Yup.

Etarnalazure

  • Guest
Re: 'World' Chat?
« Reply #7 on: September 20, 2013, 04:09:16 AM »
Great, when can we expect the new update?

From what I've seen theres two different schedules.

One for the people that bought the 90€ pack
and the ones that bought the professional pack.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 'World' Chat?
« Reply #8 on: September 20, 2013, 05:17:17 AM »
TNet standard is $65, TNet Pro is $95 -- the difference isn't as big as that of NGUI standard vs pro. Won't be too long now. Likely this weekend.