[Fast3] Glider's Plugin Pack v1.82d (Fast 3.2.2c+)

Discover FAST, a records keeping server control script with a public records system called Dedimania, which will show records from the server on tm-exchange.com

Moderators: Slig, TM-Patrol

User avatar
AstroGlider
smooth traffic navigator
smooth traffic navigator
Posts: 237
Joined: 13 Aug 2005 01:10
Owned TM-games: TMF, TMU, TMS, TMI?
Location: Tampa, Florida, USA

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by AstroGlider » 22 May 2008 21:07

utal wrote:if i understood well, this way only the best players takes advantage on the betting system. unfortunately i hardly bet on me as all other week players eheh.
Maybe the option to challenge only one specific player for a head-to-head bet would be something useful? That way the 'best players' cannot just accept the bet and take all the coppers ^^
utal wrote: it's hard for me also to be giving coppers to the server so others can win them. in the beginning of TMU, jfreu pluggin allowed you to bet on witch player you want, with a minimum players on the server. a part of those coppers were for the server so that server could work alone without server admin giving coppers to it. i believe that this system would be more used by the players.
Players generally know who the best drivers are.. seems to me it would be obvious who to bet for, and what if everyone bets on the same player? They split the coppers with the server? ^^
utal wrote:is there a way to donate to the server with a command? the /don command don't work with server accounts.
You can also use the built-in Fast command /pay to donate to the server.
Image
Image

User avatar
utal
speedy pilot
speedy pilot
Posts: 408
Joined: 30 Apr 2006 01:25
Owned TM-games: TMN, TMU, TMO, TMS
Location: Massamá, Portugal
Contact:

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by utal » 22 May 2008 21:25

ty again :)
AstroGlider wrote: Players generally know who the best drivers are.. seems to me it would be obvious who to bet for, and what if everyone bets on the same player? They split the coppers with the server? ^^
that "generally" is more random than i and the rest of the ppl winning :P

in jfreu tmu i think that the coppers were split yes.

User avatar
Viok Tof
pedestrian
pedestrian
Posts: 14
Joined: 20 Apr 2008 11:39
Owned TM-games: tmuf
Location: Toulouse, France
Contact:

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by Viok Tof » 22 May 2008 22:50

Yeah, that's not a bad idea at all. Only problem is that I don't speak French, and online translators are often inadequate. I would need to compile a list of phrases/sentences, and have someone (preferrably a human ) translate them to French and other languages if there is a need for it.
no problem
just make a separate file in english and I'll translate it in french

User avatar
mcm
road tourist
road tourist
Posts: 75
Joined: 30 Jan 2007 21:19
Owned TM-games: UNO
Location: in da house ;)
Contact:

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by mcm » 23 May 2008 08:02

excelent work glider, you are a pro ;)
i realy would like to use some features so i have some requests....at the moment you build the whole menu with the sa but if i dont want to use juke or mapinfo or the server cannot handle coppers the menu is still the same and can crash fast if the coresponding plugins are not present..so u could check which plugins are used and build the menu dynamicaly eg. no juke plugin, no juke settings and i guess also no dyntime settings..or if no tmx plugin then no tmx settings in the menu...
for second could u move the files from logs folder somwhere else (maybe you create a new folder data into fast folder if not already present ;) ) sometimes i stop fast, rename the logs directory and let fast create a new one on startup.

and one question : how will you handle the language thing?

User avatar
AstroGlider
smooth traffic navigator
smooth traffic navigator
Posts: 237
Joined: 13 Aug 2005 01:10
Owned TM-games: TMF, TMU, TMS, TMI?
Location: Tampa, Florida, USA

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by AstroGlider » 23 May 2008 09:37

mcm wrote:excelent work glider, you are a pro ;)
i realy would like to use some features so i have some requests....at the moment you build the whole menu with the sa but if i dont want to use juke or mapinfo or the server cannot handle coppers the menu is still the same and can crash fast if the coresponding plugins are not present..so u could check which plugins are used and build the menu dynamicaly eg. no juke plugin, no juke settings and i guess also no dyntime settings..or if no tmx plugin then no tmx settings in the menu...
for second could u move the files from logs folder somwhere else (maybe you create a new folder data into fast folder if not already present ;) ) sometimes i stop fast, rename the logs directory and let fast create a new one on startup.

and one question : how will you handle the language thing?
Hi mcm,

I made this pack to be used as a collection, because the logistics of splitting them up and all the different scenarios of "use plugin 1 and 2, but not 3" or "don't use 1 and 3, but use 2 and 4" etc. would be a nightmare. I know what you're saying though, and of course it's possible. I just don't want to turn "Glider's Plugin Pack" into "Glider's Bits and Pieces" :roflol: And this is already a lot more work than I bargained for when I started, and although I enjoy the coding, I don't see the point of creating more work unnecessarily. Of course, the plugins have a variable degree of dependency on eachother, which just adds to the complexity. But you could take the tmx plugin out and it wouldn't crash Fast. There's only two config buttons for it in the menu anyways: the source to use and the environment to search for. There may be some warnings and errors in the console/logfiles, because of missing variables etc, but I guess that just proves my point.

As far as the language thing goes, in the file fast_general.php (includes directory) there's a nice function by the name of localetext() which translates the text based on the players language settings (provided the entries are present in the locale.xml.txt files.
Image
Image

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by Slig » 23 May 2008 11:59

AstroGlider wrote:As far as the language thing goes, in the file fast_general.php (includes directory) there's a nice function by the name of localetext() which translates the text based on the players language settings (provided the entries are present in the locale.xml.txt files.
yes, all files beginning with 'locale.' and finishing with '.xml.txt' (in the directory 'plugins', and in next release also in directory 'custom') are parsed.
You can see the form of the datas in existing files. The form should be something like :

Code: Select all

<fast>
  <locale>
    <en>
      <pluginname.name1>name1 text in english</pluginname.name1>
      <pluginname.name2>name2 text in english</pluginname.name2>
    </en>

    <fr>
      <pluginname.name1>name1 text in french</pluginname.name1>
      <pluginname.name2>name2 text in french</pluginname.name2>
   </fr>

    <de>
      <pluginname.name1>name1 text in german</pluginname.name1>
      <pluginname.name2>name2 text in german</pluginname.name2>
    </de>

  </locale>
</fast>
Note that it can be all in one file or splitted in multiple files. You can do in game a "/debug $_locale" to see all languages parsed data in log (or "/debug $_locale['en']" to only english entries). If the entry does not exist in the player language, then it will use the default language (so english).

As indicated at the end of locale.en.xml.txt, it uses a sprintf(), si you can also use in texts %d / %s / %f etc. replacements and call localeText($login,$tag,...) with the needed args. In such case add a comment about what arg is used in the call, so the translators will know what is what (the nicer order of args is not always the same in all languages).

You can use localeText($login,$tag,...) , or for all users messages in chat, use multiLocaleText(mixed,mixed,...), which build an array usable in ChatSendToLanguage() like methods.
// get localized string using login language
// localeText($login,$tag,...)
// set login to null if not related to a player
// tag is the searched tag in the locale file
// other params are sprintf like params
// get localized array for ChatSendToLanguage TM method for all used languages
// multiLocaleText(mixed,mixed,...)
// all mixed are concatenated, each mixed can be :
// - an array($tag,...) , where tag is the searched tag in the locale file, and
// other params in the array are sprintf like params
// - any other value will just be concatenated
You have localeText() examples in many plugins, and multiLocaleText() example in the welcome plugin.

Note also that you can use /lang xx to test your fast and plugin localization in another language without changing your game config.

User avatar
AstroGlider
smooth traffic navigator
smooth traffic navigator
Posts: 237
Joined: 13 Aug 2005 01:10
Owned TM-games: TMF, TMU, TMS, TMI?
Location: Tampa, Florida, USA

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by AstroGlider » 23 May 2008 12:34

// localeText($login,$tag,...)
// set login to null if not related to a player
I was going to ask you abouut that... it seems when you use localeText with a null parameter, it does not actually translate anything, it just uses the first matching datas in the xml file(s), so its only purpose is for text formatting and such? Otherwise I need some more sleep ^^
Btw, in retrospect I wish I would have done the multilanguage route from the beginning, because it is quite a tedious task to go over and modify everything after the fact.
:gobananas:
Image
Image

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by Slig » 23 May 2008 22:17

AstroGlider wrote:I was going to ask you abouut that... it seems when you use localeText with a null parameter, it does not actually translate anything, it just uses the first matching datas in the xml file(s), so its only purpose is for text formatting and such?
Using localetext() for formatting prefix was just an easy way to make it configurable using the same mechanism. null just use default language, so english...
AstroGlider wrote:Btw, in retrospect I wish I would have done the multilanguage route from the beginning, because it is quite a tedious task to go over and modify everything after the fact.
That's why there are still some texts in Fast that are not translated for monthes and monthes :mrgreen: It took me some time to localize the menus a week ago ;)
I would suggest to keep pure config chat messages in english, and localize menus, then panels, and informative chat messages. :P

User avatar
utal
speedy pilot
speedy pilot
Posts: 408
Joined: 30 Apr 2006 01:25
Owned TM-games: TMN, TMU, TMO, TMS
Location: Massamá, Portugal
Contact:

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by utal » 24 May 2008 00:12

is /cv working for you? for me isn't working :(

is there a way to save the settings in order that if there is a restart of the server, the settings of GPP are loaded?

ty!
utal

User avatar
AstroGlider
smooth traffic navigator
smooth traffic navigator
Posts: 237
Joined: 13 Aug 2005 01:10
Owned TM-games: TMF, TMU, TMS, TMI?
Location: Tampa, Florida, USA

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by AstroGlider » 24 May 2008 12:37

utal wrote:is /cv working for you? for me isn't working :(
I removed the chat command when I added it to the menu, but I'll put it back in the next version.
utal wrote:is there a way to save the settings in order that if there is a restart of the server, the settings of GPP are loaded?
Not yet, but it's a good idea to retain the settings between server restarts. I'll figure something out before release of the next version. Thanks for the idea.
Image
Image

User avatar
utal
speedy pilot
speedy pilot
Posts: 408
Joined: 30 Apr 2006 01:25
Owned TM-games: TMN, TMU, TMO, TMS
Location: Massamá, Portugal
Contact:

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by utal » 24 May 2008 15:49

heys again :roll:

just to say that in linux the plugin is creating 2 files

fastlog\gbMsg.txt
fastlog\saVips.txt

instead of fastlog/

ty!

User avatar
AstroGlider
smooth traffic navigator
smooth traffic navigator
Posts: 237
Joined: 13 Aug 2005 01:10
Owned TM-games: TMF, TMU, TMS, TMI?
Location: Tampa, Florida, USA

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by AstroGlider » 24 May 2008 19:51

utal wrote:heys again :roll:

just to say that in linux the plugin is creating 2 files

fastlog\gbMsg.txt
fastlog\saVips.txt

instead of fastlog/

ty!
Forward slash vs. backward slash.. makes no difference in windows, so I assumed it was the same in linux. Just in case I'm wrong, I changed it for the next version :?

By the way, I am now accepting volunteers for French translation, and whichever other language is supported/requested :)
Image
Image

xis101
happy cruiser
happy cruiser
Posts: 154
Joined: 14 Aug 2006 01:22
Owned TM-games: TMUF
Manialink(s): gn
Contact:

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by xis101 » 24 May 2008 20:19

I have a request :)

Is it possible to have the EZ-Bar as stand-alone plugin with "last map", "next map", "restart map" and "force endround". Nothing else ;)

User avatar
AstroGlider
smooth traffic navigator
smooth traffic navigator
Posts: 237
Joined: 13 Aug 2005 01:10
Owned TM-games: TMF, TMU, TMS, TMI?
Location: Tampa, Florida, USA

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by AstroGlider » 24 May 2008 20:53

xis101 wrote:I have a request :)

Is it possible to have the EZ-Bar as stand-alone plugin with "last map", "next map", "restart map" and "force endround". Nothing else ;)
Might not be such a bad idea, but if you read about 9 posts up I hope you understand why I'm not going to do it, sry :P
Image
Image

xis101
happy cruiser
happy cruiser
Posts: 154
Joined: 14 Aug 2006 01:22
Owned TM-games: TMUF
Manialink(s): gn
Contact:

Re: Glider's Plugin Pack v1.2 (FAST 3.2.0v)

Post by xis101 » 25 May 2008 08:01

Ok, I see ;)

Though could you please include an "force endround" button" to the ez-bar. Would be very useful for me in rounds mode. Thanks

Post Reply