Closed Rasinzz closed 3 years ago
Just figured out why this was happening. It was because the radius data was also stored in raceData.json.
Still an issue though. Need a way that checks if there are any changes to any of the sample races and if there is, update it in raceData.json
Never mind just realized you have a command for all of this
At first, I was wondering why it didn't change if altering the radius, but it only applies to New races that users create. You have to manually redo any changes to already made races.
So what is the command if to change all radius of races already created?
Well I assumed that /races updateRaceData
or /races updateRace
would work, but I just imported a race and tried both of those commands to update the raceData.json
but none of them actually updated it.
Old versions of the scripts did not save radius information in the files produced by the scripts. The newest version of the scripts save radius information in the files produced by the scripts. The newest version of the scripts include sample races with the radius information in the sampleraces/
folder.
NOTE: Do not import a non-updated race with races import myrace
or races importwblt myrace
before doing the following commands. If you try, it should fail without importing the file.
Put your non-updated raceData.json
file in your server's resources/races/
folder. Run the server. In the SERVER CONSOLE, not the client console, type races updateRaceData
, not /races updateRaceData
. The updated file will be named resources/races/raceData_updated.json
. You will need to move the non-updated raceData.json
file to a different folder if you want to keep it for some reason. Rename resources/races/raceData_updated.json
to resources/races/raceData.json
. Now you will be able to run the client with the updated file. If you run races updateRaceData
and there is no resources/races/raceData_updated.json
file created, then the file is already updated.
If you exported a race from the public race list in the previous version of the scripts with the command races export myrace
or races exportwblt myrace
, it will be exported as myrace.json
. Put that file in your server's resources/races/
folder. Run the server. In the SERVER CONSOLE, not the client console, type races updateRace myrace
, not /races updateRace myrace
. The updated file will be named resources/races/myrace_updated.json
. You will need to move the non-updated myrace.json
file to a different folder if you want to keep it for some reason. Rename resources/races/myrace_updated.json
to resources/races/myrace.json
. Now you will be able to run the client with the updated file. If you run races updateRace myrace
and there is no resources/races/myrace_updated.json
file created, then the file is already updated. You will need to do this for every race that you exported with the previous version of the scripts.
Changing the radius of a checkpoint in the sample races doesn't work. Checkpoint radius just stays the same. If I use the same JSON code and import the race, the checkpoint radius actually works.
I will try to have a look into this when I get the chance, just wanted to make you awake of it though.