News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Cas

#421
Car Archive project / Re: Car repository indices (CRIs)
February 03, 2024, 11:59:23 PM
That's a good point. When the target is a garage, it doesn't matter much, but when it's Stunts directory, unzipping the whole package there could bring problems. Pretty Garage is currently doing just that. On the other hand, if you unzip to a garage directory and then try to move the car to Stunts, it will only pick up relevant files.

In order to fix this for extracting towards Stunts directory, one alternative is to extract files one by one from the zip, but I think it'll probably be simpler and faster to unzip to a temporary directory, then move the relevant files and delete the rest.

Relevant files currently are as many of the following as they are found in the package: carXXXX.res, carXXXX.cfg, stXXXX.3sh, stXXXX.p3s, stdaXXXX.vsh, stdaXXXX.pvs, stdbXXXX.vsh and stdbXXXX.pvs, case insensitive. If Linux, these could be really many files because you can have both carpmin.p3s and Carpmin.p3s in a zip file, but this normally won't happen anyway.
#422
Chat - Misc / Re: Association game
February 03, 2024, 06:07:45 PM
#423
Car Archive project / Re: Car repository indices (CRIs)
February 03, 2024, 05:04:57 AM
I agree. In the future, if we need to use more files for car packages, we can implement a rule of what their names would be like. Maybe car<car_id>.* or <car_id>*.dat.
#424
Stunts Related Programs / Re: Pretty Garage
February 03, 2024, 05:01:34 AM
2024-02-03 Update

An update of Pretty Garage which now supports repositories. To test it, I had to simulate a repository first, then create a temporary one, so chance of bugs is a little more than before, but still, nothing serious should happen. I've left this repository at R4K for you guys to use in your tests and you can set up your own if you want.

How it works

There's the online configuration now. A variable called "lastupdate" that will automatically be set to the current date whenever you run the program. You can leave that one alone. There's another field called "autoupdate". I think "yes" is the best configuration for most cases. It means that Pretty Garage will only attempt to update your repository lists either if the date has changed (so once per day) or if it's not finding the list in your local files. If you set this to "always", it'll download every time. Set it to "no" and it won't try to keep your list files updated, but it will try to download if you attempt to load the list and the file is not present. Set it to "never" and well, it will never download any list.

In the default configuration, I've included the simple R4K repository I've been playing with. You'll see it on the right with the groups and garages. You can use it to run your tests.

If you want to create your own repository, look at the CRI file that's downloaded and create a file with the same format listing the cars you have, then place it in your website and provide the address line in the configuration. Notice that for each car, you need to give an address line to the zip file, so the files don't need to be located at your server. They could be anywhere. This means that Pretty Garage is already capable of handling downloads from the Car Archive when they become available.

Requirements

Pretty garage has not been compiled with third party libraries. Instead, https get requests rely on curl, so you need to have it installed and in your PATH. If you don't have it, you won't be able to use online features, but the program will still work for everything else. Similarly, for unzipping packages, you need an external command. You can use any external unzipper. Edit the unzip field in the configuration to specify the command and variables $targetdir and $zipfile at the positions where these parameters should go. The default configuration will work for InfoZip, which is frequently found in Linux installations.
#425
Car Archive project / Re: Car repository indices (CRIs)
February 03, 2024, 12:01:16 AM
As far as I know, that has never been tested. My gut tells me that it would be accepted as long as the RES file isn't there. Anyway, I'm looking at Pretty Garage's code at that point and I'm thinking that maybe taking any *<car_id>.* for a valid car file is kind of risky. Depending on the car ID, it might pick up files that have nothing to do with it, especially when reading the Stunts directory. Within garages, it's not a problem. But I'm still evaluating it, because I'm thinking, as long as it's not *<car_id>*.*, this is very much unlikely to happen, except on purpose.

Yet, suppose a very wrongful car maker decides to use the car ID "UNTS", or "AULT". Maybe this is safe enough if I exclude some extensions, such as EXE, COM, TRK and RPL, but it gets complicated to do that. So for now, I leave it as it is and I'll keep thinking about it.
#426
Car Archive project / Re: Car repository indices (CRIs)
February 01, 2024, 06:34:06 PM
That's a good one!  For now, Pretty Garage can handle up to 8 files per car. I don't remember for Simple Garage. Originally, this is to contemplate the possibility that a car contains both a compressed and an uncompressed version of its files, even if only one of them will be used, that is, so that the file isn't just ignored.
#427
Chat - Misc / Re: Association game
February 01, 2024, 06:30:41 PM
McGyver
#428
Car Archive project / Re: Car repository indices (CRIs)
January 31, 2024, 05:53:35 PM
For a general readme, I think the best would be to just keep whatever the author chose to provide... but if it's more like an information file that's supposed to be displayed in a client or that contains complementary information for the car, then it probably would be best to use something like the carXXXX.cfg files I used in Simple Garage. As I said, Pretty Garage currently counts them among the car files, but does nothing with them. I did little to nothing with them even in Simple Garage, so I'm open to change their name and/or format, but I think the idea itself is useful. Dreadnaut mentioned something similar recently.
#429
Stunts Chat / Re: Stunts pages
January 31, 2024, 05:50:46 PM
All these should be in an article in the Wiki... and maybe we should copy them and protect them somewhere
#430
Team Zone / Re: Teams for 2024
January 31, 2024, 05:49:10 PM
Yeah, it's true. Unofficial (non-scoring) members can perfectly just agree to be part of the team without needing to register anywhere, anyway.
#431
Chat - Misc / Re: Association game
January 31, 2024, 05:47:56 PM
Turkey (the country, but as an extension, the bird)
#432
Custom Cars with Stressed / Re: Baronetti A-70
January 31, 2024, 05:47:14 PM
It really is incredible how, when racing in Stunts, just sitting on our desk chairs and with nothing by the monitor view and our finger pressure on the keyboard, we get to feel things like the "lightness" of a car, or its power, its stability... but it is so.

I hadn't realised it was the 50th race!  So lucky that this car was released just now and we coincided at this moment, because it's going to make a memorable race!
#433
Stunts Chat / Re: Your best track(s)
January 31, 2024, 05:35:38 PM
I have been trying Eroica in the past because it had been mentioned as one of the best tracks in ZakStunts history, indeed!  Looking at it now, I see it's OWOOTable, so it could be raced in R4K too, although it's a lot more interesting as a free-style track.

Alan, you have made many tracks yourself too. What are your best artworks?  8)
#434
Custom Cars with Stressed / Re: Baronetti A-70
January 30, 2024, 05:31:31 PM
Next race in R4K is already scheduled to go with this car!  8)
I haven't known of SergioBaro (AbuRaf70's son) for quite some time. He does know his father was very important to us, though.
#435
Car Archive project / Re: Car repository indices (CRIs)
January 30, 2024, 05:26:49 PM
Uhm... for now, I'll keep the files unpacked in garages, but I'll be considering this. There is one thing about zipping and it is that it allows you to repeat file names (like "readme.txt"; I would recommend carXXXX.txt instead, but...). When files are unpacked in garage, files with the same name are overwritten. In fact, Pretty Garage detects cars in a directory by file name, so it currently won't recognise anything but the default car file names (compressed and decompressed) and "carXXXX.cfg". This can be changed if we decide on something better.