1 (edited by KillaBilla 2017-01-25 20:58:32)

Topic: [MOD] VoteExtension

VoteExtension

Version: 2.1

What is VoteExtension?

Its not really a mod. Its just a small patch with little new features for the kickvote page.
Of cause there are other features for the kickvote page like mute/unmute whatever,
but I only want to release new stuff.

What are the features?

You can set a vote option as a headline by setting the first character of the option to one of this tokens:
- + ~ * > < = / \ ! . , _ #
All other vote commands will be indented a bit, but only if there is a headline. And the main thing is that you can't vote for the headlines what some players like to do.

Why headlines?

If you see some commands in the vote options you maybe don't know what it does.
"Oh sv_bonus 50 lets vote for it, I don't know what it affects but lets try out and go on the other players nervs."

What does it look like?

Screenshot


How do I write the addvote config commands?

To make a headline: f.e. addvote ~Change the map
To make a normal vote just use the command as normal: addvote sv_map ctf5

Download

The Patch is for Teeworlds Version 0.5.2. Only the client has to be patched. Gametype must not be changed.
It won't make any sence to use a client only with this feature. Now the it works with much more headline indicators so you don't have to know the exact indicator, because most of the used tokes will be found. Would be good if this could be integrated into the Gamer Client or the Client Pack.
Download the Patch

Changelog
  • 15.3.2011: V1.0 released.

  • 18.3.2011: V2.0 released. Changed:
    - Normals votes won't be indented if no headline is before it.
    - Headlines can start with different tokes.

  • 28.3.2011: V2.1 released. Changed:
    - Now the indicators at the end of the headline will be removed, too.
    - Fixed an bug that the text moves around if there are many votes
    - If the whole headline would get removed it stays without any changes
    - Fixed bug that the headline starts not at the right position if the vote looks like this "= = = = blabla"

Copyright / Licence

Give credits if you use the mod in your client. Add the credits where ever you want.
http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png


Credits
  • KillaBilla: Modder, Idea

  • Dune: He supported me and gave good ideas how to improve VoteExtension. Thx. wink

2

Re: [MOD] VoteExtension

good but I don't see a reason why should you create a patch for this???
wouldn't it be a better idea if you contacted the devs and asked them to implement this in 0.6.0 ??? cuz it certanly deserves to be official but imo you didn't have to create a patch wink

Power corrupts,and absolute power corrupts absolutely

3

Re: [MOD] VoteExtension

Elite Tee wrote:

good but I don't see a reason why should you create a patch for this???
wouldn't it be a better idea if you contacted the devs and asked them to implement this in 0.6.0 ??? cuz it certanly deserves to be official but imo you didn't have to create a patch wink

I first want to know if you like the mod. And it's just for those who make there own client with the features they like, so they can patch the client, if they like the feature.

4 (edited by DARK HUNTER 2011-04-20 18:21:19)

Re: [MOD] VoteExtension

OK... Sry for being noobish but how do I apply the patch(I don't know how tongue ) I have Windows

Power corrupts,and absolute power corrupts absolutely

5 (edited by KillaBilla 2011-03-15 14:04:55)

Re: [MOD] VoteExtension

Elite Tee wrote:

OK... Sry for being noobish but how do I apply the patch(I don't know how tongue ) I have Windows

btw: That downvote wasn't me!

To use the patch:
1. Download the GNU Patch Application. http://savannah.gnu.org/projects/patch/
2. Download the Patch
2. Extract your Teeworlds 0.5.2 Src folder
3. Put the Patch.exe and the VoteExtension.patch in the same folder as the teeworlds src folder
4. Then open the Commandline (cmd.exe) in this folder and type
"patch -p0 < VoteExtension.patch" (without ")
5. Now the teeworlds src folder should be patched.


Btw: I posted the idea on github.

6

Re: [MOD] VoteExtension

sry I'm having a little trouble with downloading GNU Patch Application sad

Power corrupts,and absolute power corrupts absolutely

7

Re: [MOD] VoteExtension

Elite Tee wrote:

sry I'm having a little trouble with downloading GNU Patch Application sad

Just download this file: ftp://ftp.gnu.org/gnu/patch/patch-2.5.9.tar.gz

8 (edited by Dark Twister 2011-03-15 14:53:52)

Re: [MOD] VoteExtension

Elite Tee
Also you can download the TortoiseSVN (http://tortoisesvn.net/downloads.html)

After install, right mouse click on patch and choose TortoiseSVN/Apply patch. Then choose the teeworlds source folder and click ok. Then you see Tortoise Merge window and filelist. Select files in filelist, right click and choose patch all.

P.S. Sorry for my bad English, i'm Russian

My nickname in game: Dark Twist3r. My team: Eclipse
I use&support TDTW <3

9

Re: [MOD] VoteExtension

The patch is unfortunately for 0.5.2, but many mods have been ported to 0.5 trunk already.

10

Re: [MOD] VoteExtension

Hey Killa,

I don't really see the use of such a client-sided patch.
I mean, you already can put labels over voteoptions by adding useless votes.
As an example:

addvote Vote for Maps:
addvote sv_map ctf1
addvote sv_map ctf2
addvote " "
addvote Vote for Gametypes:
addvote sv_gametype ctf

The only point you changed is the font size, and your patch would make no sense if not implemented in the standard Teeworlds - as it would be weird for clients not using the patch to use the ~, and the most of the admins won't know they need to put ~ before their labels wink

Not Luck, Just Magic.

11

Re: [MOD] VoteExtension

Dune wrote:

Hey Killa,

I don't really see the use of such a client-sided patch.
I mean, you already can put labels over voteoptions by adding useless votes.
As an example:

addvote Vote for Maps:
addvote sv_map ctf1
addvote sv_map ctf2
addvote " "
addvote Vote for Gametypes:
addvote sv_gametype ctf

The only point you changed is the font size, and your patch would make no sense if not implemented in the standard Teeworlds - as it would be weird for clients not using the patch to use the ~, and the most of the admins won't know they need to put ~ before their labels wink

Right, I could also add a command like addvoteheadline or whatever but then the server has to be patched too and new messages have to be added. There is another small change: you can't vote for this headlines (Some people like that). And I don't think that it looks much weird for other clients they just see the normal text with the ~ infront of it, they maybe recognise that this should be a headline. The thing with the admins is true but if this gets into the offical teeworlds there would be an explanation somewhere on the website or in the client.

12 (edited by ghost 2011-03-17 11:25:27)

Re: [MOD] VoteExtension

@KillaBilla: The problem is still that other clients can vote for those headlines. If we really need this, it should be server-sided. So this would be a task for 0.6 as we will have changes in the protocol there anyway. However, we have a ticket for setting aliases for votes in 0.6. This kinda makes this feature redundant.

13 (edited by Dune 2011-03-17 17:30:52)

Re: [MOD] VoteExtension

Well, KillaBilla, I guess it would always be a plus into Teeworlds to support this feature as the patch concerns about 15 lines of code; though there is still one point which makes me prefer the standard client, at the moment:

You've put some whitespaces before every vote option in the menu. This should not be when the client does not spot any headlines.

Also, as an other important point, I would avise you to check out what is currently used in the servers - so that the patch gets some use even without asking the administrators to put a ~ before their labels.

I randomly joined some servers using headlines for their votes, and some of them are using *- as a prefixe, some others are writing ----- before the label.

I would suggest you to seek for special characters (like *, -, >, ~) in the beginning of labels, and remove them all until you reach a non-special character. Thus, it would really get some use : )

About the rest, it's a nice and clean job, like always : )

Not Luck, Just Magic.

14

Re: [MOD] VoteExtension

Update to Version 2.0

New features:
- Normals votes won't be indented if no headline is before it.
- Headlines can start with different tokes.

Problems of that:
If you set a Headline f.e. "===Change the Map===" only the first === will be removed because if I would just remove everythinh after the last = there wouldn't be any text left. To avoid that the program looks for the tokens and after 3 times no token was found it stops looking for the tokens (=Ma= will be removed, =Maps= not). I think I could solve this problem by using C-Strings but I don't want to make it to difficult.

Download and more information in first post.

Special Thanks to Dune for his ideas!

wink

15

Re: [MOD] VoteExtension

Niiice job Killa this is going interesting! I really like your three-tokens idea.
Thank you for your work!
Gotta implement this into the gamer now, with your permission smile

Not Luck, Just Magic.

16 (edited by heinrich5991 2011-03-18 19:50:56)

Re: [MOD] VoteExtension

KillaBilla wrote:
Copyright / Licence

Give credits if you use the mod in your client. Add the credits where ever you want.
http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png

I suggest you not using the Creative Commons license for source code. Look here for the statement about this in the FAQ of Creative Commons.

17

Re: [MOD] VoteExtension

Dune wrote:

Niiice job Killa this is going interesting! I really like your three-tokens idea.
Thank you for your work!
Gotta implement this into the gamer now, with your permission smile

Of cause you have permission to implement it. You can put the Credits again on your Credits page. wink


heinrich5991 wrote:

I suggest you not using the Creative Commons license for source code. Look here for the statement about this in the FAQ of Creative Commons.

Ok I will look at it later, I just used this licence because I don't know all the English phrases for this licence things and with this it was easier at this moment. May change it later. wink

18

Re: [MOD] VoteExtension

heinrich5991 wrote:
KillaBilla wrote:
Copyright / Licence

Give credits if you use the mod in your client. Add the credits where ever you want.
http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png

I suggest you not using the Creative Commons license for source code. Look here for the statement about this in the FAQ of Creative Commons.

Another issue about the licence: Does the Share Alike force me to register the client I patch with this extension at the Creative Commons site or something?

Not Luck, Just Magic.

19

Re: [MOD] VoteExtension

Dune wrote:
heinrich5991 wrote:
KillaBilla wrote:
Copyright / Licence

Give credits if you use the mod in your client. Add the credits where ever you want.
http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png

I suggest you not using the Creative Commons license for source code. Look here for the statement about this in the FAQ of Creative Commons.

Another issue about the licence: Does the Share Alike force me to register the client I patch with this extension at the Creative Commons site or something?

No. It forces you to use a similar license.

20 (edited by KillaBilla 2017-01-25 00:45:36)

Re: [MOD] VoteExtension

Update to Version 2.1

Changed:
- Now the indicators at the end of the headline will be removed, too.
- Fixed an bug that the text moves around if there are many votes
- If the whole headline would get removed it stays without any changes
- Fixed bug that the headline starts not at the right position if the vote looks like this "= = = = blabla"

Download in first post.

21

Re: [MOD] VoteExtension

Good work!

Not Luck, Just Magic.