Forged Alliance Forever Forged Alliance Forever Forums 2013-11-03T11:23:09+02:00 /feed.php?f=45&t=5644 2013-11-03T11:23:09+02:00 2013-11-03T11:23:09+02:00 /viewtopic.php?t=5644&p=57064#p57064 <![CDATA[Synchronized Replay Sessions: How to get UID]]> Statistics: Posted by RoLa — 03 Nov 2013, 11:23


]]>
2013-10-31T23:01:40+02:00 2013-10-31T23:01:40+02:00 /viewtopic.php?t=5644&p=56901#p56901 <![CDATA[Re: Synchronized Replay Sessions / Streams]]> https://bitbucket.org/rola/modular-clie ... bd8bad5982

In the next step i will try to add the invitation for replay and team chats. I would suggest to have some options to enable/disable auto accept invitations.
Menu->Chat->Accept Invitiations
->None
->From Friends
->Not Foe
->All

You should be able to right click on a chatter in any chat room to invite him in any of your other open chatrooms. Of course all standard chat rooms should be excluded from the invitation list. Perhaps we should limitate these channels per user to "#team-nickname" for team/clan game preperation and "#replay-nickname" for replay sessions. These team/replay/game channels could be also used in conjunction with mumble. What do you think?

Statistics: Posted by RoLa — 31 Oct 2013, 23:01


]]>
2013-10-31T22:08:03+02:00 2013-10-31T21:52:07+02:00 /viewtopic.php?t=5644&p=56889#p56889 <![CDATA[Re: Synchronized Replay Sessions / Streams]]>
Nombringer wrote:
If you manage to do this I will give you a big sloppy kiss...
:o :shock: :? :oops:

Can i install the server part for develpment on a local machine? Or how can i test my modifications without connecting every time to the server?

Statistics: Posted by RoLa — 31 Oct 2013, 21:52


]]>
2013-10-31T20:58:53+02:00 2013-10-31T20:58:53+02:00 /viewtopic.php?t=5644&p=56886#p56886 <![CDATA[Re: Synchronized Replay Sessions / Streams]]> Statistics: Posted by Nombringer — 31 Oct 2013, 20:58


]]>
2013-10-31T11:19:12+02:00 2013-10-31T11:19:12+02:00 /viewtopic.php?t=5644&p=56859#p56859 <![CDATA[Re: Synchronized Replay Sessions / Streams]]> Statistics: Posted by Ze_PilOt — 31 Oct 2013, 11:19


]]>
2013-10-31T11:02:32+02:00 2013-10-31T11:02:32+02:00 /viewtopic.php?t=5644&p=56853#p56853 <![CDATA[Re: Synchronized Replay Sessions / Streams]]>
to client class
Code:
newReplaySession = QtCore.pyqtSignal(str)


to chatwidget
Code:
self.client.newReplaySession.connect(self.openReplayChat)

Code:
@QtCore.pyqtSlot(str)
def openReplayChat(self, uid)
        ...


and to replayitem
Code:
def pressed(self, item):
        ...
        actionReplaySession = QtGui.QAction("Replay Session", menu)
        actionReplaySession.triggered.connect(self.startReplaySession)
        menu.addAction(actionReplaySession)
        ...

def startReplaySession(self,uid):
        self.parent.client.newReplaySession.emit(uid)

Statistics: Posted by RoLa — 31 Oct 2013, 11:02


]]>
2013-10-31T09:33:53+02:00 2013-10-31T09:33:53+02:00 /viewtopic.php?t=5644&p=56849#p56849 <![CDATA[Re: Synchronized Replay Sessions / Streams]]>
Then on the chat widget, you need to connect a function to a signal. Look at any other class, search for
Code:
self.client.<signalName>.connect(self.<function>)

Statistics: Posted by Ze_PilOt — 31 Oct 2013, 09:33


]]>
2013-10-31T00:35:01+02:00 2013-10-31T00:35:01+02:00 /viewtopic.php?t=5644&p=56828#p56828 <![CDATA[Re: Synchronized Replay Sessions / Streams]]>
I have added an item "Replay session" to replay menu in replayitem.py.
I want to call from within my action handler a function from _chatwidget.py or should can i directly connect a function from _chatwidget.py as action handler?

EDIT:
My preferred programming languages are Java for bigger things with GUI and FreeBasic for small console/fullscreen programs. I tried to dig around in the source files. It's like looking for a needle in a haystack. What i would really apreciate is if someone just tell me: look in that file at function ... and in that file at function ...

Statistics: Posted by RoLa — 31 Oct 2013, 00:35


]]>
2013-10-28T18:26:54+02:00 2013-10-28T18:26:54+02:00 /viewtopic.php?t=5644&p=56715#p56715 <![CDATA[Synchronized Replay Sessions / Streams]]> viewtopic.php?f=2&t=5597&start=10

First part is a mod which writes to the replay log file the current gametime in seconds, and reads from a lua file the gametimes from the other players. If another player falls too far behind(2-3 seconds) the game will be paused and resumed again later.
The basic operations in lua mod:
Code:
local lasttimer = GetGameTimeSeconds()
function MyBeat()
   if SessionIsReplay() then
      if (GetGameTimeSeconds()-lasttimer)  > 5.0 then
         lasttimer = GetGameTimeSeconds()
         local playertimes = import('/mods/MyMod/modules/playertimes.lua').Playertimes
         LOG("MyBeat: " .. GetGameTimeSeconds())         
         LOG( playertimes )
         --SessionRequestPause()     
         --SessionResume()
      end
   end
end

The second part should be integrated in to the lobby. I looked at the IRC chat channel code and i think it should be realized with a chat room, like the "post-game channel". So anyone should be allowed to create exactly one replay session room. In the context menu of the replay vault, there could be added the function "create replay session". The replay will be downloaded but not started and the replay room is created as "#replay-playername-replayuid" . Now you can invite other users ( context menu of users in chat). They get a popup where they can accept invitation(there should be an option "ready for replay session" which is disabled by default). After accepting, the replay is downloaded and the chat room is opened. While / after users joined your replay channel they can chat normally. The session creator can start the replay by typing "START". The replay is started on everyones computer. The mod pauses all replays at the beginning and writes a status message. After all participants have loaded their replay, the lobby writes resume command which will be read by all. The lobby is reading the gametime written by mod from replay.log and writes the time to the chat channel. At the same time lobby is reading messages from channel and writing them to lua script file which will be read by mod.

Where can i insert the context menu items. And can i create a new channel and invite others only based on modifications of the lobby. Or is there a modification on server needed? I looked at "def processGameExit(self):" in _chatwidget.py Perhaps someone can give me some hints on python code.

Statistics: Posted by RoLa — 28 Oct 2013, 18:26


]]>