for people who write programs for elma

Feature requests and ideas for the new unofficial versions of Elma and general talk related to those.

Moderator: Moporators

Post Reply
ireneusz
Kuski
Posts: 9
Joined: 20 Apr 2004, 17:20

for people who write programs for elma

Post by ireneusz »

what I woudl like to find in elma 2 is library for getting times that every programmer for elma 1 has to get by his own from stats.txt.
teajay
Donator duck
Posts: 10043
Joined: 3 Apr 2003, 17:53

Post by teajay »

i don't understand really.
User avatar
John
first 35tt
Posts: 4738
Joined: 28 Sep 2002, 19:42
Team: WNO
Location: Luleå, Sweden

Post by John »

I think he means smth about some stats.txt for individual players
Image
User avatar
zworqy
Kuski
Posts: 3706
Joined: 19 May 2002, 23:17
Location: Lilla Edet, Sweden
Contact:

Post by zworqy »

He means that he want the stats times to be built-in in Elma, so you don't need the stats.txt file when making progs for Elma.
<Fihlvein> another case of zworqy-is-always-right closed i guess
<yoosef> zworqy doesnt suck at anything
ireneusz
Kuski
Posts: 9
Joined: 20 Apr 2004, 17:20

Post by ireneusz »

When you write prog for elma you have to get through the file stats.txt, get all times as a strings; convert it to numbers hh,mm,ss,cent; summ it to cents to calculate for example average or relative percents etc.
There should be library containing for example function Give_Me_The_time_in_cents(level,entry on the list) or Time_in_cents_to_string(time_in_cents)
I think if you want to make prog for elma you can think of others functions ...
User avatar
Abula
Moposite admin
Posts: 4449
Joined: 16 May 2002, 23:00
Team: FM
Location: Helsinki
Contact:

Post by Abula »

Yeha, it would make programming cooler but are those strings so hard to make yourself?
40:02,71 (151.) | WCup4: 8. | 3x WR | 3x GAA | 11x FEM | KOM | The History of Elasto Mania (1995-2018)
User avatar
milagros
Cheatless
Posts: 4560
Joined: 19 May 2002, 17:05

Post by milagros »

converting string to number is already implemented in every language (atoi, sscanf, ...), can't be any problem to any programmer
binary times are in state.dat, no need to convert it from string there:)
[carebox]
ireneusz
Kuski
Posts: 9
Joined: 20 Apr 2004, 17:20

Post by ireneusz »

Can't you just fink of other finctions?
Smibu
Kuski
Posts: 476
Joined: 15 Jun 2007, 13:17
Location: Finland

Re: for people who write programs for elma

Post by Smibu »

Ok, I guess this is the right topic for this:
Could someone make a simple program (at least it sounds like it) that would delete (or make a list of) all .rec files whose level files...
1. don't exist in Lev folder (ignoring internal recs of course..)
2. have been modified so that they're not watchable?

First point is more important than 2nd point, in case it's hard to make...

Or does this kind of prog already exist...?
User avatar
pawq
38mins club
Posts: 6547
Joined: 24 Aug 2008, 19:56
Team: TR
Location: Southampton, UK

Re: for people who write programs for elma

Post by pawq »

That's a nice idea, I'm often angry when I wanna watch Rec and error 'lev not found' occurs...
User avatar
Bismuth
Kuski
Posts: 2777
Joined: 26 Feb 2008, 07:11
Team: <3
Location: Not on lauta
Contact:

Re: for people who write programs for elma

Post by Bismuth »

najs idea.

Would be also nice to be able to sort recs by lev, no?
:mrhat:
DaFred
39mins club
Posts: 417
Joined: 17 Jan 2007, 21:00

Re: for people who write programs for elma

Post by DaFred »

1. and 2. is both not hard to do, I can write this in the next weeks if no one else did :)
Smibu
Kuski
Posts: 476
Joined: 15 Jun 2007, 13:17
Location: Finland

Re: for people who write programs for elma

Post by Smibu »

MAX THANKS DaFred in advance!!

Btw: what language do you use for this?
DaFred
39mins club
Posts: 417
Joined: 17 Jan 2007, 21:00

Re: for people who write programs for elma

Post by DaFred »

C# or maybe java, but i could also try to do it in c... what do you want?
User avatar
pawq
38mins club
Posts: 6547
Joined: 24 Aug 2008, 19:56
Team: TR
Location: Southampton, UK

Re: for people who write programs for elma

Post by pawq »

how does it matter?
User avatar
FinMan
36mins club
Posts: 2038
Joined: 13 Feb 2007, 11:14
Team: dat
Location: Jyväskylä, Finland

Re: for people who write programs for elma

Post by FinMan »

DaFred, i vote for C#. :P
Image
Smibu
Kuski
Posts: 476
Joined: 15 Jun 2007, 13:17
Location: Finland

Re: for people who write programs for elma

Post by Smibu »

Nah, use the language you want, DaFred :) I was just curious.
DaFred
39mins club
Posts: 417
Joined: 17 Jan 2007, 21:00

Re: for people who write programs for elma

Post by DaFred »

java runs on all os but you need JRE (maybe not so important caus elma works only on win :)), C# needs installed .NET and a c programm only needs windows but is more work for me :P
I think C# is the winnar :D
Coc0k
39mins club
Posts: 344
Joined: 2 May 2005, 14:36
Location: 503

Re: for people who write programs for elma

Post by Coc0k »

try this
trashrecv0.1.rar
(41.88 KiB) Downloaded 298 times
ez 500 sms
Smibu
Kuski
Posts: 476
Joined: 15 Jun 2007, 13:17
Location: Finland

Re: for people who write programs for elma

Post by Smibu »

Oh, Coc0k was quicker :O

Cool program, it does the job I want! I found a couple of bugs, though:
1. It crashes if it encounters a lev with size 0.
2. It thinks replays that were driven in across levs are bad (it says "Level has other version"). I got 4 mchmxxx.recs like this, I'm glad I noticed this!

Would be maxest if I could somehow click and delete the recs I want straight from the list (like in ALE replay manager or something...), so no text file generation needed necessarily... :)
User avatar
Mawane
Kuski
Posts: 3299
Joined: 15 Apr 2007, 01:05
Team: SV
Contact:

Re: for people who write programs for elma

Post by Mawane »

another problem: doesnt work on Vista :(
Website || TT:41:45:64 || Team Image
Image[url=steam://friends/add/76561198025490048]Image[/url]
DaFred
39mins club
Posts: 417
Joined: 17 Jan 2007, 21:00

Re: for people who write programs for elma

Post by DaFred »

oh havent see it, heres my version ;)
max slow with many recs und levs so not really good imo...
Attachments
cleaner.zip
(6.53 KiB) Downloaded 138 times
User avatar
Mawane
Kuski
Posts: 3299
Joined: 15 Apr 2007, 01:05
Team: SV
Contact:

Re: for people who write programs for elma

Post by Mawane »

oh, cool, works now :)
very many thx guys :*
Website || TT:41:45:64 || Team Image
Image[url=steam://friends/add/76561198025490048]Image[/url]
Smibu
Kuski
Posts: 476
Joined: 15 Jun 2007, 13:17
Location: Finland

Re: for people who write programs for elma

Post by Smibu »

DaFred, your program is nice too, it seems to be very small :)
It has the same bugs as in Coc0k's one xD
DaFred
39mins club
Posts: 417
Joined: 17 Jan 2007, 21:00

Re: for people who write programs for elma

Post by DaFred »

really? ^^
which bug?

Dont know if anything works fine so better be carefull ;)

[edit]
ah found your bug posting...
User avatar
pawq
38mins club
Posts: 6547
Joined: 24 Aug 2008, 19:56
Team: TR
Location: Southampton, UK

Re: for people who write programs for elma

Post by pawq »

hmm could you modify this prog so it searches through all sub-folders in Rec Coc0k?
Coc0k
39mins club
Posts: 344
Joined: 2 May 2005, 14:36
Location: 503

Re: for people who write programs for elma

Post by Coc0k »

GUI version:
1. Across support
2. No Vista support
trashrecv0.2.rar
(215.58 KiB) Downloaded 269 times
Pawq wrote:hmm could you modify this prog so it searches through all sub-folders in Rec Coc0k?
what about lev files? where are they placed?
ez 500 sms
User avatar
pawq
38mins club
Posts: 6547
Joined: 24 Aug 2008, 19:56
Team: TR
Location: Southampton, UK

Re: for people who write programs for elma

Post by pawq »

in Lev ofc, but most of replays are put into sum subfolders like 'downloaded', 'old wrs' and 'balle wins'.
User avatar
Mawane
Kuski
Posts: 3299
Joined: 15 Apr 2007, 01:05
Team: SV
Contact:

Re: for people who write programs for elma

Post by Mawane »

seems to work fine on vista :)
http://up.k10x.net/hfaygxxsrmfcn/Vista.jpg

and i have subfolders in rec and lev
also, i have 2 rec folders in my belma directory, so i can just rename rec to chose which i want.
is there any possibility to select one or more folders to get 'em all?
Website || TT:41:45:64 || Team Image
Image[url=steam://friends/add/76561198025490048]Image[/url]
Coc0k
39mins club
Posts: 344
Joined: 2 May 2005, 14:36
Location: 503

Re: for people who write programs for elma

Post by Coc0k »

fixed old bugs, add new ones
trashrecv0.5.rar
(194.36 KiB) Downloaded 253 times
Mawane wrote: is there any possibility to select one or more folders to get 'em all?
i'll think about it.
ez 500 sms
Smibu
Kuski
Posts: 476
Joined: 15 Jun 2007, 13:17
Location: Finland

Re: for people who write programs for elma

Post by Smibu »

Well, I made my version of the program too, basically because I wanted to learn some VB!
ReplaySearch.zip
(12.86 KiB) Downloaded 126 times
Not sure if this works on Vista, but try!
Features:
-Search internal/external recs separately or at the same time
-Search with pattern. To search recfiles that begin with ab, just type ab*.rec in the box. To search all recfiles that have 4 letters, type ????.rec in the box. If you want battlerecs, type *_*.rec (I usually delete all of them regularly).
-Search bad recs: Recs with lev missing, or recs with wrong lev version in Lev folder. Takes across levs into account.
-Search replays with certain amount of frames (input bounds in the 2 boxes)
-Search subdirectories in Rec folder too, if wanted
-Delete selected replay - button
-View selected replay's properties (its lev file and number of frames)
-This prog doesn't have to be in Elma directory. You browse the Elma dir in the program.

Make sure you have no 0-byte levs or 0-byte recs, it may crash if it encounters any, I didn't test! I can fix it in next version anyway :)
User avatar
Xiphias
39mins club
Posts: 4098
Joined: 23 Nov 2004, 23:05

Re: for people who write programs for elma

Post by Xiphias »

well while you guys are on it, why not get coco's replay watcher implemented in the program =)
so there's A program for replays =D
Thorze wrote:I just wanted to make a cool topic like Juish have cool topics..
Coc0k
39mins club
Posts: 344
Joined: 2 May 2005, 14:36
Location: 503

Re: for people who write programs for elma

Post by Coc0k »

Smibu wrote:Well, I made my version of the program too, basically because I wanted to learn some VB!
i havent .net framework. fix it plz.
xiphias wrote:well while you guys are on it, why not get coco's replay watcher implemented in the program =)
so there's A program for replays =D
ppl first must install jre
ez 500 sms
Smibu
Kuski
Posts: 476
Joined: 15 Jun 2007, 13:17
Location: Finland

Re: for people who write programs for elma

Post by Smibu »

I guess simplest way to fix the problem is that you download .NET Framework 3.5 Service Pack 1 (Full Package). I don't know how to make my prog not need it.
Coc0k
39mins club
Posts: 344
Joined: 2 May 2005, 14:36
Location: 503

Re: for people who write programs for elma

Post by Coc0k »

over 200mb? its not for me.
ez 500 sms
User avatar
Coco
Kuski
Posts: 205
Joined: 20 Jun 2005, 14:41
Location: Bretagne
Contact:

Re: for people who write programs for elma

Post by Coco »

Coc0k wrote:
xiphias wrote:well while you guys are on it, why not get coco's replay watcher implemented in the program =)
so there's A program for replays =D
ppl first must install jre
parcially wrong... jre included in all browsers (ie, ffox, opera, ...) for few years :)
applet could be rewrited for another platform...
User avatar
totem
39mins club
Posts: 328
Joined: 26 Dec 2007, 14:04

Re: for people who write programs for elma

Post by totem »

Coco wrote:applet could be rewrited for another platform...
As we just said on elma france, i could take a look that way. Let's say C++/Qt4.5 and a funny novative replay display
User avatar
Mawane
Kuski
Posts: 3299
Joined: 15 Apr 2007, 01:05
Team: SV
Contact:

Re: for people who write programs for elma

Post by Mawane »

I would like a program to rename a pack of files. It's very long to rename manually hundred of recs, levs or anything other.
ex:

Code: Select all

p01x1407.rec
p02x1543.rec
p03x1800.rec
...
to

Code: Select all

01ProD.rec
02ProD.rec
03ProD.rec
...
Website || TT:41:45:64 || Team Image
Image[url=steam://friends/add/76561198025490048]Image[/url]
teajay
Donator duck
Posts: 10043
Joined: 3 Apr 2003, 17:53

Re: for people who write programs for elma

Post by teajay »

there are standard dos batches for those.
User avatar
Xiphias
39mins club
Posts: 4098
Joined: 23 Nov 2004, 23:05

Re: for people who write programs for elma

Post by Xiphias »

Mawane wrote:I would like a program to rename a pack of files. It's very long to rename manually hundred of recs, levs or anything other.
ex:

Code: Select all

p01x1407.rec
p02x1543.rec
p03x1800.rec
...
to

Code: Select all

01ProD.rec
02ProD.rec
03ProD.rec
...
http://www.123renamer.com/about18.htm
or google
http://www.google.com/search?hl=en&ei=B ... er&spell=1
Thorze wrote:I just wanted to make a cool topic like Juish have cool topics..
User avatar
Mawane
Kuski
Posts: 3299
Joined: 15 Apr 2007, 01:05
Team: SV
Contact:

Re: for people who write programs for elma

Post by Mawane »

wow, this is fully exactly what i needed and even more! :** to xiph
just need the registered version without virus now
Website || TT:41:45:64 || Team Image
Image[url=steam://friends/add/76561198025490048]Image[/url]
User avatar
Xiphias
39mins club
Posts: 4098
Joined: 23 Nov 2004, 23:05

Re: for people who write programs for elma

Post by Xiphias »

haha :D
Thorze wrote:I just wanted to make a cool topic like Juish have cool topics..
User avatar
zworqy
Kuski
Posts: 3706
Joined: 19 May 2002, 23:17
Location: Lilla Edet, Sweden
Contact:

Re: for people who write programs for elma

Post by zworqy »

I added the programs to my my Elma guide: http://zworqy.com/elmaguide
<Fihlvein> another case of zworqy-is-always-right closed i guess
<yoosef> zworqy doesnt suck at anything
Post Reply