Forged Alliance Forever Forged Alliance Forever Forums 2013-10-13T21:21:45+02:00 /feed.php?f=45&t=4685 2013-10-13T21:21:45+02:00 2013-10-13T21:21:45+02:00 /viewtopic.php?t=4685&p=55808#p55808 <![CDATA[Re: Creating the Map Veto function]]>
(doesn't need any server work for all that).

If you do, from there, I can explain you what you need to do to update the matchmaker protocol to use these votes.

Statistics: Posted by Ze_PilOt — 13 Oct 2013, 21:21


]]>
2013-10-13T21:17:09+02:00 2013-10-13T21:17:09+02:00 /viewtopic.php?t=4685&p=55807#p55807 <![CDATA[Re: Creating the Map Veto function]]> Statistics: Posted by Anaryl — 13 Oct 2013, 21:17


]]>
2013-10-06T14:58:05+02:00 2013-10-06T14:58:05+02:00 /viewtopic.php?t=4685&p=55266#p55266 <![CDATA[Re: Creating the Map Veto function]]>
Ze_PilOt wrote:
What is tiresome for me is making the interface showing all maps and selecting veto/pro map.

And I'm even less prone to do it because I think it's a placebo, not something useful.


That's why I thought about the solution I posted above: it doesn't require any interface work. Players who really care about this veto function would update their user forum preferences and not cry about the lack of interface as long as they are sure they won't play on their hated map.

Statistics: Posted by pip — 06 Oct 2013, 14:58


]]>
2013-10-06T13:22:01+02:00 2013-10-06T13:22:01+02:00 /viewtopic.php?t=4685&p=55261#p55261 <![CDATA[Re: Creating the Map Veto function]]>
And I'm even less prone to do it because I think it's a placebo, not something useful.

Statistics: Posted by Ze_PilOt — 06 Oct 2013, 13:22


]]>
2013-10-06T13:12:06+02:00 2013-10-06T13:12:06+02:00 /viewtopic.php?t=4685&p=55260#p55260 <![CDATA[Re: Creating the Map Veto function]]>
The information would allow users to pick a "veto for ranked map number X". If there is 20 maps in the map pool, a number from 1 to 20 would be assigned to each map and the users would write a single number. Then, the server would ignore it when a ranked game is launched involving that user. 0 or blank would mean there is no veto. I think numbers are easier to handle than map names (which can change, etc).

Statistics: Posted by pip — 06 Oct 2013, 13:12


]]>
2013-09-12T00:12:52+02:00 2013-09-12T00:12:52+02:00 /viewtopic.php?t=4685&p=53695#p53695 <![CDATA[Re: Creating the Map Veto function]]>
:D :lol:

Statistics: Posted by Bliss — 12 Sep 2013, 00:12


]]>
2013-08-28T07:54:35+02:00 2013-08-28T07:54:35+02:00 /viewtopic.php?t=4685&p=51924#p51924 <![CDATA[Re: Creating the Map Veto function]]>
Send that to the server, catch the right signal back, and you've got your map list dynamically.

Statistics: Posted by Ze_PilOt — 28 Aug 2013, 07:54


]]>
2013-08-28T04:58:49+02:00 2013-08-28T04:58:49+02:00 /viewtopic.php?t=4685&p=51917#p51917 <![CDATA[Re: Creating the Map Veto function]]>
Alluminati wrote:
Hm... Still trying to figure out, where I find that said "stat" function.

I don't really feel like trying around too much, since testing stuff means logging on and off constantly, takes a lot of time.
Any help on that stat function to get the ladder names? I read zep's post but I really want to see that function before I used it.


file: "src/stats/mapstat.py" 213 lines --79%--


175 def mapselected(self, item):
176 ''' user has selected a map, we send the request to the server'''
177
178 self.mapid = item.data(32)[0]
179 self.client.send(dict(command="stats", type="ladder_map_stat", mapid = self.mapid))
180 self.mapstats.clear()
181
182 realmap = item.data(32)[1].split("/")[1][:-4]
183
184 self.mapstats.document().addResource(QtGui.QTextDocument.ImageResource, QtCore.QUrl("map.png"), maps.preview(realmap, True, force=True))
185
186 self.mapstats.insertHtml("<img src=\"map.png\" /><br><font size='+5'>" + item.text() + "</font><br><br>")
187
188
189 @QtCore.pyqtSlot(dict)
190 def updatemaps(self, message):
191
192 self.maps = message["values"]
193
194
195 self.mapstats.insertHtml("<font size='+5'>Stats since : %s</font>" % self.getSeasonDate() )
196 self.mapstats.insertHtml("<font size='+1'><br>Number of game played :</font><font size='+1' color = 'red'> %i </font>" % message["gamesplayed"] )
197
198 #clearing current map list
199 self.maplist.clear()
200
201 for mp in self.maps :
202 mapid = mp["idmap"]
203 name = mp["mapname"]
204 realname = mp["maprealname"]

205
206 item = QtGui.QListWidgetItem (name)
207 item.setData(32, (mapid, realname))
208 self.maplist.addItem(item)
209
210 self.maplist.sortItems(0)
211
212
213



i think this class used for gw but we can act it like an example,hope it helpful

Statistics: Posted by ingenic — 28 Aug 2013, 04:58


]]>
2013-08-23T09:36:14+02:00 2013-08-23T09:36:14+02:00 /viewtopic.php?t=4685&p=51518#p51518 <![CDATA[Re: Creating the Map Veto function]]>
I don't really feel like trying around too much, since testing stuff means logging on and off constantly, takes a lot of time.
Any help on that stat function to get the ladder names? I read zep's post but I really want to see that function before I used it.

Statistics: Posted by Alluminati — 23 Aug 2013, 09:36


]]>
2013-08-17T10:44:20+02:00 2013-08-17T10:44:20+02:00 /viewtopic.php?t=4685&p=50878#p50878 <![CDATA[Re: Creating the Map Veto function]]>
You'll probably want to use a curried function to do stuff with the signals of the checkboxes.

Code:
self.checkboxes = [list of checkboxes]
def generate_stuff(index):
    @QtCore.pyqtSlot(int)
    def f(self, index):
        handle_checkbox(index)
    return f
for i in range(len(self.checkboxes)):
    self.checkboxes[i].stateChanged.connect(generate_stuff(i))


hope it helps :)

Statistics: Posted by johnie102 — 17 Aug 2013, 10:44


]]>
2013-08-17T03:42:57+02:00 2013-08-17T03:42:57+02:00 /viewtopic.php?t=4685&p=50874#p50874 <![CDATA[Re: Creating the Map Veto function]]>
I haven't been active for more than a week because of TI3 (dota) and a couple other things. Only got back to work on this two hours ago.

Alright, here's where I'm at right now:

Image

...

As you can see, I successfully managed to add a button and the dialog itself =P
That was a bit tricky for me but I got through it without major frustration.

Now here's my plan:
Somehow, I'll get the map list from the server. Somehow. I haven't figured ANY of that out yet.
The code will "manually" create checkboxes for each map in a loop. That'll be a shitload of trial and error.
Then, I'm going to count the amount of vetos already done and disable all checkboxes when the limit of 3 is reached.
When "Save Vetos" is pressed, I'll save the maps that got vetoed to an array.
This array should then be available to the client. (I haven't figured global variables out yet, so wish me luck.)

After that, I got no clue how to continue.

As I have literally NO idea about how to do any of this, expect a couple days to go before I report back with my next results. As an alternative to that, you can continue helping me :D

Statistics: Posted by Alluminati — 17 Aug 2013, 03:42


]]>
2013-08-08T21:49:34+02:00 2013-08-08T21:49:34+02:00 /viewtopic.php?t=4685&p=50432#p50432 <![CDATA[Re: Creating the Map Veto function]]>
Alluminati wrote:
Yup I'm already at that point in the tutorial, I think I'm getting it ;-) This will be a lot of trial and error but it always is. I'll report back once I either produced something noteworthy or got a new question.

What I'm still not really getting is where the actual game UI is drawn... If I wanted to add a button to the game widget, where'd I place it?


The UI is made using Qt Designer. It is a program installed when you install pyqt. Designer creates .ui files that are loaded by the program.
Check \src\client\_clientwindow.py line 51. It loads it.
Designer should be easy enough to use.

Btw, the .ui file is actually just xml, so if you can't figure Designer out, you could just manually alter the xml ;)

Statistics: Posted by johnie102 — 08 Aug 2013, 21:49


]]>
2013-08-07T17:48:21+02:00 2013-08-07T17:48:21+02:00 /viewtopic.php?t=4685&p=50349#p50349 <![CDATA[Re: Creating the Map Veto function]]> This will be a lot of trial and error but it always is. I'll report back once I either produced something noteworthy or got a new question.

What I'm still not really getting is where the actual game UI is drawn... If I wanted to add a button to the game widget, where'd I place it?

Statistics: Posted by Alluminati — 07 Aug 2013, 17:48


]]>
2013-08-07T17:33:23+02:00 2013-08-07T17:33:23+02:00 /viewtopic.php?t=4685&p=50348#p50348 <![CDATA[Re: Creating the Map Veto function]]>
This is not that complicated once you grasp the basic concept behind them.

Statistics: Posted by Ze_PilOt — 07 Aug 2013, 17:33


]]>
2013-08-07T17:31:50+02:00 2013-08-07T17:31:50+02:00 /viewtopic.php?t=4685&p=50347#p50347 <![CDATA[Re: Creating the Map Veto function]]> Statistics: Posted by Alluminati — 07 Aug 2013, 17:31


]]>