Jump to content

custom rating


go2die
 Share

custom rating value  

21 members have voted

  1. 1. Do you think players should be able set their rank in-game (not in the lobby) - current 0ad or future releases? example go2die(Queen) instead of go2die(1234)

    • Yes, that would be awesome
    • No, I'm strictly against


Recommended Posts

Custom Rating mods allows you to change text inside your brackets in game. 
 

Download here latest version

customrating_0.25.2.zipNEW for 0.0.25

changes log - version released

 

 

0.25.2 - small bugfix to see other custom rating players from lobby in the game
0.25.1 - first initial version for 0ad 0.0.25 vanilla - should work with most of modules
0.24.1 - first initial version for 0ad 0.0.24 vanilla only (as there is no fgod ported)
0.11      - custom rating vanilla introduced (fgod version still not updated will come shortly)
0.10.3 - minor changes
0.10.2 - any custom text can be added 
0.10.1 - init public

 

tested and works well with these mods
autociv 0.17.9 (older version having problem with autoselect civ - upgrade Autociv mod here)

known bugs:
- by using this mod other vanilla users won't see you in-game with direct clicking on your nick [this mod has fix for it] - i requested little fix on fgod level
- if you join game hosted by someone using autociv and this mod too and say civilization name it won't get assigned and host of the game has to do it manually [fix in future autociv version] fixed in autociv 0.17.9
- if you were kicked from the game and respond yes to in-game request box to rejoin and host of the game has enabled to join observers you will join to the game as observer with wrong player name user (text) (text) - workaround is to rejoin the game from lobby.
 

report to me please

 

This mod won't affect your rating number nor 1 vs 1 plays. You can always check player rank from left lobby menu

Result

image.png.619c4b3a5c8e471e80e02d94dba84967.pngimage.png.94fd8b9e417f466c7301802e9516b46b.png

Settings in-game

image.png.bb701c62b0235c6cda743f47f0b2fda2.png

 

 

image.png

 

customrating_0.25.1.zip

Edited by go2die
added new version for 0ad 25
  • Like 3
Link to comment
Share on other sites

17 hours ago, Boudica said:

The ability to add some more info to your username might be a good alternative to creating a new username.

As much as I agree this can be positive, the underlying issue to duplicate accounts is players forgetting passwords or not being able to rename the account name

  • Like 1
Link to comment
Share on other sites

To make it work you need to have fgod 1.6.23 installd (thanks to @ffffffff and nani)

any bugs reports here. 

I mostly have 0 credits for that I wanted just educate myself how to make mod. 

Enjoy make 0ad community equal... 

 

this is result

image.png.c8f97c38a98796c693f8fbee035063ed.png

 

 

 

 

 

image.png

Edited by go2die
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

current version of custom rating is not working correctly with special characters not included in latin-1 encoding. Issue is related to the way how 0ad options page (especially save button) is saving/converting char-set of user.cfg config file. If there is extra character it will save it as (file -i user.cfg)
user.cfg: application/octet-stream; charset=binary
otherwise as:
user.cfg: text/plain; charset=us-ascii

So this is limitation of configuration file not supporting fully utf8 characters. Anyway java script and all codes are supporting utf8.
 

due to this limitation I did small workaround and some extra characters can be used: currently (if you have some others in mind please post them I will not support whole utf8 coz not all are displayed correctly anyway.. I will release new version obtain some feedback to this post.

∞ ♡  ™  
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

New version 0.11 introduced for vanilla players (those who don't used fgod) so for fgod players there is no update at this moment. 

Check first post for download and details.

And if you like it send me hearts

I used autociv code to implement some startup checks I hope @nani won't feel angry to me :)

  • Like 2
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Settings > Options > Custom Rating
config => result

problems by using numbers:

just_spec => just_spec
just1_2spec => just_spec
just12spec => justspec
just1spec  => justspec

 

Edited by seeh
Link to comment
Share on other sites

  • 4 months later...
On 06/04/2021 at 11:02 AM, seeh said:

Settings > Options > Custom Rating
config => result

problems by using numbers:

just_spec => just_spec
just1_2spec => just_spec
just12spec => justspec
just1spec  => justspec

 

Maybe i will update filtering ... custom rating only does not allow replace rating number if so you will see spaces original would be go2die (1234) with mod go2die ( 1234 ) 

New upgrade for 0ad 0.25 is coming soon, it is in test phase of few players.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

## was possible (linux ubuntu):
I°°°-I²³°
just_spec
spec_notPlay
i_spec!_not_play!
i spec! not play!
I°°°…I²³°

≥I°°°…I²³°
≤I²³°
aus I°°°-1²³°  wird I-²³°

## was not possible:
1000-1230

 

Edited by seeh
Link to comment
Share on other sites

@go2die

maybe helpful for your sourceCode:

customrating_value = customrating_value.replace(/^[^\d\w\-]*[0-9]+[^\d\w\-]*$/g,''); // if its only a number. cut it out

reason:

i want have allowed something like

900-1100 but not a single number 1980 (i read before that you don't want it)

and i added a option field:

customrating_value = customrating_value.replace(/\^5/g,"spec\=i not play."); // max. 25 letter, then its not cut off.

 

 

{ "value": "^6", "label": "maybe 100 more"  },
customrating_value = customrating_value.replace(/\^6/g,g_UserRating + " maybe 100 more");
customrating_value = customrating_value.replace(/\^7/g,g_UserRating + "\+100 maybe");

simplificated version of this first regex :

https://regex101.com/r/P2pwbE/1

Edited by seeh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...