OSP Code MP Poll and admin enhancements for mod creators (updated for 1.126)

Users who are viewing this thread

The devs need to see this. These are EXTREMELY good Admin/ Player tools. I love the message you can send in big letters to people to warn them or whatever.
A big thanks to you and well done.
 
Vornne said:
ACC1 said:
If / when this has all the bugs worked out Id be interested to look at getting it on our servers.
I thought it could be added to the Oceanic mod, so more people would test it... what do you think, Alec?

I already did this the moment I saw it out! I didn't even see the screenshots before I tested it!  :lol:
 
ACC1 said:
Will it require everyone to download and run a mod for it to work or can it just run server side and everyone join as usual?
Sorry; I don't think there is any possibility for most of the features to be compatible with unmodified Native.

To be specific, the only features that work when just applied to your client are the new voting keys and the adjustments to the poll presentation (I've been playing on the servers with them for a week or two already). Features that can be applied to the server and some clients - keeping compatibility with unmodified clients - are the poll admin override (modified to remove the different poll result message on the clients), and sending the poll name and reason for all polls except the "map and factions" one, which is probably the most common annoying poll; it uses up all the available network message values, leaving none to spare. All other features effectively require a new mod, as they add new network message types or change the meaning of some values in existing messages.

NaglFaar: probably :wink:. It started simply as an attempt to make a server side patch to show the requester name and kick/ban reason - which unfortunately couldn't be completed, as previously explained. So then I decided to try implementing a few other ideas I'd had and suggestions I'd read around the forums, which in some cases turned out to be easier than I expected. One of the reasons I decided to release this now was that I'd run out of good ideas to try; if people give me more good ideas or feedback about what they dislike and want changed, I'll probably try to implement them. I'll also keep it updated as new versions of the module system come out.
 
Showing who voted a poll can be done by changing 2 lines in the module system, I don't understand why the devs didn't do it yet, altough I hope it will be in the next patch.
 
Arch3r said:
Showing who voted a poll can be done by changing 2 lines in the module system, I don't understand why the devs didn't do it yet, altough I hope it will be in the next patch.
Not very likely, see these bug reports (rejected):

http://bugs.taleworlds.com/edit_bug.aspx?id=1410
http://bugs.taleworlds.com/edit_bug.aspx?id=1150

And for some of the other features (all closed):

http://bugs.taleworlds.com/edit_bug.aspx?id=243
http://bugs.taleworlds.com/edit_bug.aspx?id=443
http://bugs.taleworlds.com/edit_bug.aspx?id=2480
http://bugs.taleworlds.com/edit_bug.aspx?id=2156
 
This has made my day. Vornne, if I were female and had a uterus, I would have your babies.
 
Vornne said:
To be specific, the only features that work when just applied to your client are the new voting keys and the adjustments to the poll presentation (I've been playing on the servers with them for a week or two already).

Could you post a file containing only your new poll presentation? Yours looks a lot better then the default one that is distracting and covers the whole screen.
 
I can understand the name on votes thingy, but not the rest.

  • Admins can send a message to a particular player or to all players, which shows up in big red letters in the middle of the screen, whether alive, dead, or spectating. This could be used for unambiguously warning players that are breaking rules, or to inform all players of something you require them to do. Unfortunately the text box for your message is not automatically selected, you have to click on it before typing. A useful addition to this feature could be to have a key which brings up the message box to all players, if admins use it repeatedly; to order people around at special events, for example.

Is this feature not wanted by... all Admins? Is it not the most annoying thing when your warning before a kick is just lost in the sea of CAPS, spam and kills?
Sometimes I don't understand the devs. It feels like they're holding back on M&B potential sometimes :sad:

But, if they had wanted my opinion I would have a red flag by my name. I just needed to ventilate.
 
Vornne said:
Arch3r said:
Showing who voted a poll can be done by changing 2 lines in the module system, I don't understand why the devs didn't do it yet, altough I hope it will be in the next patch.
Not very likely, see these bug reports (rejected):

http://bugs.taleworlds.com/edit_bug.aspx?id=1410
http://bugs.taleworlds.com/edit_bug.aspx?id=1150

And for some of the other features (all closed):

http://bugs.taleworlds.com/edit_bug.aspx?id=243
http://bugs.taleworlds.com/edit_bug.aspx?id=443
http://bugs.taleworlds.com/edit_bug.aspx?id=2480
http://bugs.taleworlds.com/edit_bug.aspx?id=2156
I managed to accomplish it by replacing two strings. (one for vote kick and one for vote ban)
If I would add change map and change factions that would be 4 strings. All in module_presentations.
 
Blabil: sure. The height is almost half the size of the original, and the text size is 85%, but I could make it smaller if you want (and have got good eyesight); also, would you want the changed poll keys and the "escape doesn't vote no" bit? Do you think the colours and text outline make the poll more readable, or less? I tried various colours for background and font, but white text seemed the best; the idea behind the red background was that people could get used to seeing it out of the corner of their eye and ignoring it, when busy with an intense fight.

Here it is mostly unmodified, anyway. Apply it according to the instructions at the end of the first post, except edit the files in your Native module rather than the module system (make backups first). Note that you must add the "str_poll_keys" bit on the very last line of strings.txt, or else a lot of strings in game will be wrong. Still give me feedback on how you would like it changed though; I'm fairly good at lining things up and fixing glitches, but no professional UI designer :wink:.
@@ -140,8 +140,8 @@


prsnt_multiplayer_poll 3 0 2
-60.000000  65 2124 1 1000 911 2 72057594037927936 1441151880758558776 921 2 72057594037927936 0 922 2 72057594037927936 68 729 2 1 50 730 2 1 50 926 2 72057594037927936 1 729 2 1 37500 730 2 1 4500 925 2 72057594037927936 1 4 0 31 2 144115188075856804 0 2121 3 1224979098644774912 144115188075856805 720575940379279851 2105 2 1224979098644774912 216172782113785456 2320 2 0 1224979098644774912 910 3 72057594037927936 216172782113785490 16 5 0 31 2 144115188075856804 1 2350 2 0 144115188075856805 910 3 72057594037927936 216172782113785488 16 5 0 31 2 144115188075856804 2 2350 2 0 144115188075856805 910 3 72057594037927936 216172782113785489 16 5 0 31 2 144115188075856804 3 2121 3 1224979098644774912 144115188075856805 720575940379279851 2105 2 1224979098644774912 216172782113785456 2320 2 0 1224979098644774912 2335 2 1 144115188075856806 2335 2 2 144115188075856807 910 3 72057594037927936 216172782113785491 131088 5 0 2133 2 72057594037927936 144115188075856805 2133 2 72057594037927937 144115188075856806 2335 2 0 144115188075856768 2335 2 1 144115188075856769 910 3 72057594037927936 216172782113785492 131088 3 0 921 2 72057594037927936 16777215 4 0 2147483679 2 144115188075856804 3 2147483679 2 144115188075856804 4 729 2 1 400 730 2 1 100 926 2 72057594037927936 1 5 0 729 2 1 50 730 2 1 70 926 2 72057594037927936 1 729 2 1 750 730 2 1 60 929 2 72057594037927936 1 3 0 2370 1 1224979098644774913 2121 3 144115188075856572 144115188075856809 1224979098644774913 2133 2 72057594037927936 144115188075856572 910 3 144115188075856573 216172782113785493 32776 921 2 144115188075856573 16777215 729 2 1 790 730 2 1 60 926 2 144115188075856573 1 77 1 2 77 1 3 902 1 999999
-61.000000  29 2071 1 1224979098644774912 4 0 1073741895 1 1 71 1 3 32 2 1224979098644774912 500 389 2 22 0 78 0 902 1 0 5 0 71 1 2 32 2 1224979098644774912 500 389 2 22 1 78 0 902 1 0 3 0 2370 1 1224979098644774913 2121 3 1224979098644774914 144115188075856809 1224979098644774913 4 0 2147483679 2 1224979098644774914 144115188075856572 4 0 2147483678 2 1224979098644774914 0 78 0 902 1 0 5 0 2133 2 144115188075856572 1224979098644774914 2133 2 72057594037927936 144115188075856572 920 2 144115188075856573 216172782113785493 3 0 3 0
-60.000000  69 2124 1 1000 911 2 72057594037927936 1441151880758558776 921 2 72057594037927936 1114112 922 2 72057594037927936 68 729 2 1 10 730 2 1 10 926 2 72057594037927936 1 729 2 1 40500 730 2 1 2500 925 2 72057594037927936 1 910 3 72057594037927936 216172782113786969 65552 921 2 72057594037927936 16777215 729 2 1 415 730 2 1 15 926 2 72057594037927936 1 729 2 1 850 730 2 1 850 925 2 72057594037927936 1 4 0 31 2 144115188075856804 0 2121 3 1224979098644774912 144115188075856805 720575940379279851 2105 2 1224979098644774912 216172782113785456 2320 2 0 1224979098644774912 910 3 72057594037927936 216172782113785490 65552 5 0 31 2 144115188075856804 1 2350 2 0 144115188075856805 910 3 72057594037927936 216172782113785488 65552 5 0 31 2 144115188075856804 2 2350 2 0 144115188075856805 910 3 72057594037927936 216172782113785489 65552 5 0 31 2 144115188075856804 3 2121 3 1224979098644774912 144115188075856805 720575940379279851 2105 2 1224979098644774912 216172782113785456 2320 2 0 1224979098644774912 2335 2 1 144115188075856806 2335 2 2 144115188075856807 910 3 72057594037927936 216172782113785491 65552 5 0 2133 2 72057594037927936 144115188075856805 2133 2 72057594037927937 144115188075856806 2335 2 0 144115188075856768 2335 2 1 144115188075856769 910 3 72057594037927936 216172782113785492 65552 3 0 921 2 72057594037927936 16777215 729 2 1 415 730 2 1 35 926 2 72057594037927936 1 729 2 1 850 730 2 1 850 925 2 72057594037927936 1 2370 1 1224979098644774913 2121 3 144115188075856572 144115188075856809 1224979098644774913 2133 2 72057594037927936 144115188075856572 910 3 144115188075856573 216172782113785493 98312 921 2 144115188075856573 16777215 729 2 1 860 730 2 1 15 926 2 144115188075856573 1 729 2 1 850 730 2 1 850 925 2 144115188075856573 1 77 1 66 77 1 67 77 1 68 902 1 999999
-61.000000  33 2071 1 1224979098644774912 4 0 71 1 67 32 2 1224979098644774912 500 389 2 22 0 78 0 902 1 0 5 0 71 1 66 32 2 1224979098644774912 500 389 2 22 1 78 0 902 1 0 5 0 71 1 68 32 2 1224979098644774912 500 78 0 902 1 0 3 0 2370 1 1224979098644774913 2121 3 1224979098644774914 144115188075856809 1224979098644774913 4 0 2147483679 2 1224979098644774914 144115188075856572 4 0 2147483678 2 1224979098644774914 0 78 0 902 1 0 5 0 2133 2 144115188075856572 1224979098644774914 2133 2 72057594037927936 144115188075856572 920 2 144115188075856573 216172782113785493 3 0 3 0


prsnt_tutorial_show_mouse_movement 3 0 2
@@ -1,5 +1,5 @@
stringsfile version 1
3161
3162
str_no_string NO_STRING!
str_empty_string _
str_yes Yes.
@@ -1680,11 +1680,11 @@
str_poll_change_map_to_s1_by_s0 {s0}_started_a_poll_to_change_map_to_{s1}.
str_poll_change_map_to_s1_and_factions_to_s2_and_s3_by_s0 {s0}_started_a_poll_to_change_map_to_{s1}_and_factions_to_{s2}_and_{s3}.
str_poll_change_number_of_bots_to_reg0_and_reg1_by_s0 {s0}_started_a_poll_to_change_bot_counts_to_{reg0}_and_{reg1}.
str_poll_kick_player Poll_to_kick_player_{s0}:_1_=_Accept,_2_=_Decline
str_poll_ban_player Poll_to_ban_player_{s0}:_1_=_Accept,_2_=_Decline
str_poll_change_map Poll_to_change_map_to_{s0}:_1_=_Accept,_2_=_Decline
str_poll_change_map_with_faction Poll_to_change_map_to_{s0}_and_factions_to_{s1}_versus_{s2}:_1_=_Accept,_2_=_Decline
str_poll_change_number_of_bots Poll_to_change_number_of_bots_to_{reg0}_for_{s0}_and_{reg1}_for_{s1}:_1_=_Accept,_2_=_Decline
str_poll_kick_player Poll_to_kick_player_{s0}
str_poll_ban_player Poll_to_ban_player_{s0}
str_poll_change_map Poll_to_change_map_to_{s0}
str_poll_change_map_with_faction Poll_to_change_map_to_{s0}_and_factions_to_{s1}_versus_{s2}
str_poll_change_number_of_bots Poll_to_change_number_of_bots_to_{reg0}_for_{s0}_and_{reg1}_for_{s1}
str_poll_time_left ({reg0}_seconds_left)
str_poll_result_yes The_poll_is_accepted_by_the_majority.
str_poll_result_no The_poll_is_rejected_by_the_majority.
@@ -3161,3 +3161,4 @@
str_offer_gift_description _improve_my_standing_by_offering_a_gift.
str_resolve_dispute_description _improve_my_standing_by_resolving_a_dispute.
str_feast_wedding_opportunity _If_your_betrothed_and_her_family_are_present,_then_this_may_be_an_opportunity_for_you_to_celebrate_the_wedding.
str_poll_keys F8_=_Accept,_F9_=_Decline,_F10_=_Abstain
On a side note: does anyone know what the variable_uses.txt file is for? It often has conflicts when merging or patching with git; so I've not bothered to change it at times, which didn't seem to affect anything.

NaglFaar: well, the developers haven't rejected the admin message feature as far as I am aware; only ignored or  haven't seen the requests on the forums. They might not be against implementing it; though probably not using my code, as it isn't ideal due to limitations of the module system.

Arch3r: I don't understand how that would work, as on the server the poll requester is known, but the messages sent to all the other clients don't contain it. Also, the problematic poll is the singular "change map and factions" which uses all values of multiplayer_send_4_int_to_player: poll id, map id, faction 1 id, faction 2 id; I got around this by storing the poll requester id in the unused upper bits of faction 1 - which makes it unrecognisable to unpatched clients. I would love to be proven wrong about the possibility of patching the server to show name and reason without breaking compatibility...
 
OMG THE DEVS NEEEEED to add the following to the native mod

  • Admins can send a message to a particular player or to all players, which shows up in big red letters in the middle of the screen, whether alive, dead, or spectating. This could be used for unambiguously warning players that are breaking rules, or to inform all players of something you require them to do. Unfortunately the text box for your message is not automatically selected, you have to click on it before typing. A useful addition to this feature could be to have a key which brings up the message box to all players, if admins use it repeatedly; to order people around at special events, for example.

  • Admins can choose to ban players temporarily, like a successful ban poll, rather than adding them to the permanently banned list. The time a temporary ban lasts seems to be an hour, from my testing, rather than the half hour of popular rumour.

  • Admins can start a poll with a custom question that has no effect when it ends; this can be used to administrate the server according to the player vote.
 
Back
Top Bottom