PDA

View Full Version : Dedicated Server API



Pages : 1 2 [3]

Alexandru Marian
01-03-2016, 12:30
Thanks for your response Marian.

Back to the "Nürburgring" Problem.

Years ago when most typewriters and first PC's came to german language people there was no problem to use "ue" instead of "ü" or "ae" / "ä".
In this old time it was strictly forbidden to use characters higher than ASCII 128 for e.g. passwords.

So why not change this for the future use of such special names.
Good old ASCII will never make problems. Just make it simple.

The reason for this is because the Dedicated Server gets all the tracks names directly from the game data when it is built. It also needs to match the same names that the game uses.

Another reason is because we are under legal obligation to use the correct names because of the licensing contracts we've signed to be allowed to use the track. Granted, they might never check the Dedicated Server but who knows? :p

I'll see if we can add code to automatically do a conversion to UTF-8 from whatever encoding you guys are saving your config files in but not sure if we can change it so it uses anything else than "Nürburgring" and "Müllenbach".

satco1066
01-03-2016, 13:00
Ok, i understand.

Then i would suggest, to update the documentation in the lua script section, to point to that special case.
If anyone cannot type this characters with his notepad or something else, he can solve it with copy & paste.

If it's documented, it should be no problem any more.

aurel
01-03-2016, 13:20
satco: Even early predecessors of common typewriters already supported German umlauts, here's an example from 1924:
https://de.wikipedia.org/wiki/Olympia_Werke#/media/File:Mignon_Mod.4,Bj.1924.jpg

Except for the short era of early home computers (and early Usenet), there was never an excuse to use the "ue" workaround. :cool:

It's 2016, UTF-8 is 20 years old and has, as far as I am aware, been the default on all modern operating systems for years.

Alexandru, what about just allowing the numeric track id as an alternative for the track name in the "TrackId" field of sms_rotate_config.json? I seem to remember that, in the main server configuration, only the numeric id is accepted in this field; I always thought it was a confusing inconsistency that I have to use the numeric id in one place and the name in another. So this solution would solve the problem for the "weird charset people" and mitigate this inconsistency.

Also, may I ask for your attention to a few of my posts of the past months?
http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=1212880&viewfull=1#post1212880
http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=1216177&viewfull=1#post1216177
http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=1225460&viewfull=1#post1225460

Also, can you make the UI people fix the chat UI in the "Online Lobby" (the one you enter from the pit menu after joining a session in progress)?

The "pre-event" chat works, the small chat window you get on the track works, but in the "in-event" Online Lobby, the chat only updates once when entering the "Online Lobby" for the first time. It will never update again, you will not see anything you send yourself or anything other players are sending. Also, you can use the mouse wheel over the chat window to move UI elements around to quickly demonstrate that this screen is somehow broken. :)

Alexandru Marian
01-03-2016, 13:24
All the track names can be found in the ServerTypes document (http://forum.projectcarsgame.com/attachment.php?attachmentid=228674&d=1456838574) linked in the first post (http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=925927&viewfull=1#post925927) of this thread.

I'll update the documentation for next version to contain an explicit mention of this limitation as well as the UTF-8 requirement.

satco1066
01-03-2016, 13:39
It's 2016, UTF-8 is 20 years old and has, as far as I am aware, been the default on all modern operating systems for years.



You should tell that Microsoft and Wordpad.

"Normal" PC users use Wordpad.
And with this "tool" it's definitely not working.

Also people all around the world have no keyboards with umlauts, but maybe other special characters.

If i follow your opinion, then they should have written ZUHAI in mandarin characters, because it's no problem to install simplified chinese and language set.
That really makes no sense.

Alexandru Marian
01-03-2016, 13:48
Alexandru, what about just allowing the numeric track id as an alternative for the track name in the "TrackId" field of sms_rotate_config.json? I seem to remember that, in the main server configuration, only the numeric id is accepted in this field; I always thought it was a confusing inconsistency that I have to use the numeric id in one place and the name in another. So this solution would solve the problem for the "weird charset people" and mitigate this inconsistency.

That might be doable, I'll have a look.


Also, may I ask for your attention to a few of my posts of the past months?
[...]
You should be able to escape the question mark as


%3F

This is what is called "Percent-encoding" or "URL encoding" (https://en.wikipedia.org/wiki/Percent-encoding) and is used a lot when sending HTTP queries. You could use this page (http://meyerweb.com/eric/tools/dencoder/) (for example) to figure out how to encode other things.

As to your other queries I'll have a look over the coming days.


Also, can you make the UI people fix the chat UI in the "Online Lobby" (the one you enter from the pit menu after joining a session in progress)?

The "pre-event" chat works, the small chat window you get on the track works, but in the "in-event" Online Lobby, the chat only updates once when entering the "Online Lobby" for the first time. It will never update again, you will not see anything you send yourself or anything other players are sending. Also, you can use the mouse wheel over the chat window to move UI elements around to quickly demonstrate that this screen is somehow broken. :)
I'll let the UI team know and we'll see if this work can be squeezed in somewhere soon.

DFAlex
01-03-2016, 13:56
Hello Alexandru Marian,
thx for the infos.
I think it can now stay in this form ^^ it's working, remember, never change a running system ;)
In the actual servertypes.pdf is the "german" version used, Nürburgring GP etc...
maybe it's good to change this for the next release, because the file got's overwritten with each new version/update...

THX for your feedback!

regards
Alex

DFAlex
01-03-2016, 13:58
..."Normal" PC users use Wordpad.
And with this "tool" it's definitely not working.....
Why not try the notepad++ ?
here (https://notepad-plus-plus.org/)
it's free and verry usefull!

regards
Alex

satco1066
01-03-2016, 14:15
Why not try the notepad++ ?
here (https://notepad-plus-plus.org/)
it's free and verry usefull!

regards
Alex

You are right. Im developer myself, and work for worldwide customers. I'm aware of that.
But standard users don't.
They use onboard tools ..... and fail.

A developer should know what problems could come and therefore warn and suggest the right tools in the documentation.
Or create a tool, where it's not possible to fail. ;)
e.g. a UI with pulldowns that creates everything in the background.
If users are professional enough, they can edit that generated xml's or cfg's by hand. But not by default!

DFAlex
01-03-2016, 14:24
OK I'll have a look at the disconnection issues. Thank you for the info you've provided.

However I do have to say that any Steam server issues will definitely cause something like this. At the moment the Dedicated Server is communicating with players that are connected to it via Steam so any problems on Steam's end would reflect in the game.

I'll investigate this and see what improvements we could reasonably make.
Hai,
if you need some logfiles, please contact Vittorio Rapa, i sended him user and server log from ouer last disco Event...

THX

regards
Alex

aurel
01-03-2016, 14:51
Also people all around the world have no keyboards with umlauts, but maybe other special characters.

If i follow your opinion, then they should have written ZUHAI in mandarin characters, because it's no problem to install simplified chinese and language set.
That really makes no sense.

I accept your argument and I see your point, but I disagree (and I have technological and cultural arguments that I don't want to bore you with). Let me just say, that I'd rather see "Nürburgring" (which we have now) and "Mégane" (which we haven't) than "Nurburgring" (or, worse, "Nuerburgring") and "Megane", but I still want pCars to use the latin alphabet for Zuhai, Dubai etc.

aurel
01-03-2016, 14:53
Alexandru, thanks for your response, we really appreciate your attention after the long drought. ;)


You should be able to escape the question mark as

%3F

Yes, I should be, but it doesn't work. URL-encoding works for any other character, but as soon as a (encoded) question mark is included in the content of a message, the server returns a "Bad request" error. I've tried this with the standard Python class for URL-encoding, but also with wget (wget URL-encodes GET parameters automatically) and telnet, to confirm that this is not an issue with (my usage of) the Python class.

Let me demonstrate:



steam@pcars:~$ telnet [HOSTNAME] 9000
Trying [IP]...
Connected to [HOSTNAME].
Escape character is '^]'.
GET /api/session/send_chat?message=%3E HTTP/1.0

HTTP/1.1 200 OK
Server: Project CARS DedicatedServer
Date: Tue, 01 Mar 2016 16:04:29 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 21
Cache-Control: must-revalidate,no-cache,no-store
Access-Control-Allow-Origin: *

{
"result" : "ok"
}
Connection closed by foreign host.

[In-game chat displays the character ">"]

steam@pcars:~$ telnet [HOSTNAME] 9000
Trying [IP]...
Connected to [HOSTNAME].
Escape character is '^]'.
GET /api/session/send_chat?message=%3F HTTP/1.0

HTTP/1.1 400 Bad Request
Server: Project CARS DedicatedServer
Date: Tue, 01 Mar 2016 16:04:50 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 99
Cache-Control: must-revalidate,no-cache,no-store
Access-Control-Allow-Origin: *

<html><head><title>400 Bad Request</title></head><body><h1>400 Bad Request, Oops</h1></body></html>
Connection closed by foreign host.

[In-game chat doesn't show anything.]



As to your other queries I'll have a look over the coming days.

Thank you!

optimalspieler
01-03-2016, 15:01
"Normal" PC users use Wordpad.
And with this "tool" it's definitely not working.rs.


Normal users don't set up a dedicated server though - they use the in-game feature :)

And admins will have no problem with UTF-8, especially since almost 50% of the servers (http://cars-stats-steam.wmdportal.com/index.php/servers) run Linux. A note in the docs is a good idea though.

RomKnight
01-03-2016, 15:08
The guys in charge of the server on/off are not necessarily the OS admins and I can assure you I know some way less tech savvy than I do (the server where I race is windows btw).

Beware of generalizations :)

/edit to not double post

The utf-8 works with the notepad as the server doesn't fail to launch anymore when the ü is in the config.

Alexandru Marian
01-03-2016, 15:51
Yes, I should be, but it doesn't work.

OK, this indeed doesn't work and is caused by the fact that we use libwebsockets (https://libwebsockets.org/index.html) internally to parse HTTP requests to the server. libwebsockets already parses Percent-encoded characters before passing the request to us which causes issues because we have no way of knowing if (in your case) a "?" character is one intended as a parameter value (to the "message" parameter in your case) or is the separator between the query path and the query payload.

We don't really have the resources to change the libwebsockets code or to replace it with something else at the minute so I'm afraid for the time being this sort of functionality is not possible. I'll have a think if there are any work-arounds we could implement to add the functionality you require but this is not really an easy fix so far.

aurel
01-03-2016, 16:07
OK, this indeed doesn't work and is caused by the fact that we use libwebsockets (https://libwebsockets.org/index.html) internally to parse HTTP requests to the server. libwebsockets already parses Percent-encoded characters before passing the request to us which causes issues because we have no way of knowing if (in your case) a "?" character is one intended as a parameter value (to the "message" parameter in your case) or is the separator between the query path and the query payload.

We don't really have the resources to change the libwebsockets code or to replace it with something else at the minute so I'm afraid for the time being this sort of functionality is not possible. I'll have a think if there are any work-arounds we could implement to add the functionality you require but this is not really an easy fix so far.

I see the problem. A workaround would be to only treat the first question mark as the special character that separates the path from the payload (there can only be one), and use every additional question mark verbatim as part of the parameter value. It doesn't feel right, though, because ampersand.

BTW, for your amusement: my bot uses one single piece of user-provided data, which is the Steam name, and some people actually have question marks and/or ampersands in their names. Every message that used their names as part of the message text was dropped until I implemented this ingenious workaround:

steam@pcars:~$ grep -A3 evil pyCarsBot/pycarsbot/pcars/messagequeue.py
# evil hacks
m = self.queue[0].replace('&', '+')
m = urllib.parse.quote(m.replace('?', '؟'))

F1_Racer68
01-03-2016, 17:21
In case you are not aware, you can generate the ü character on any PC by using the following keyboard combination.....

ALT+1+2+9 (Easiest if you use the Number Pad)

I am not sure of any other umlauted characters, but I do know the ü combination thanks to a former manager many years ago named Jürgen. He always liked getting emails with his name spelled correctly ;)

satco1066
01-03-2016, 23:31
Last message about the "ü"

Its really great, how many people are so smart about things like utf-8 and "umlauts" and Linux and all that.

Why then "Nürburgring" was a problem since 4 months.

first mentiond in post #369 6-11-2015
solved today.
Now that DFAlex solved it with a little hack, everybody knew it better.

Where have you been, clever guys.

Also it's right that 50% of permanent DS's are Linux.
But many use DS for temporary sessions, just on the local PC. To have the ability to kick and ban idiots.
Most of them u don't see on that statistics page linked above, just showing the list of just the second you made the request.

Thanks F1 Racer. I know ascii and utf-tables. Thats not the problem. Im native german and own a german keyboard (look at my sig). DFAlex too. But that did not solve the problem in the last 4 months. Before it worked. Now it seems to again.

So please don't imply with your wisdom, that Tiago or DFAlex are wimp, 'couse they fought with that problem.

F1_Racer68
02-03-2016, 03:19
Last message about the "ü"

Its really great, how many people are so smart about things like utf-8 and "umlauts" and Linux and all that.

Why then "Nürburgring" was a problem since 4 months.

first mentiond in post #369 6-11-2015
solved today.
Now that DFAlex solved it with a little hack, everybody knew it better.

Where have you been, clever guys.

Also it's right that 50% of permanent DS's are Linux.
But many use DS for temporary sessions, just on the local PC. To have the ability to kick and ban idiots.
Most of them u don't see on that statistics page linked above, just showing the list of just the second you made the request.

Thanks F1 Racer. I know ascii and utf-tables. Thats not the problem. Im native german and own a german keyboard (look at my sig). DFAlex too. But that did not solve the problem in the last 4 months. Before it worked. Now it seems to again.

So please don't imply with your wisdom, that Tiago or DFAlex are wimp, 'couse they fought with that problem.

Where did you see me doing that? I happened to come here today and saw some recent posts about issues with the ü in in the config files. I offered a possible solution for those who may not have been aware of an obscure keystroke combination. That's all.

Perhaps you answered your own question about where the help has been for the past 4 months..... no one is going to want to help anyone when they are immediately and wrongfully attacked for it.

You may want to think about your posting style in the future. If you want to be pi$$ed off at the problem that's fine, but don't take that out on those who offer some assistance (no matter how small that assistance may be).

satco1066
02-03-2016, 09:37
Not you F1. I wrote "Thank you".
Your tip helps how to get to "ü". Not helpful for germans, but for other ones.
But not not the blah blah about Linux utf etc from wise guys

F1_Racer68
02-03-2016, 09:43
Not you F1. I wrote "Thank you".
Your tip helps how to get to "ü". Not helpful for germans, but for other ones.
But not not the blah blah about Linux utf etc from wise guys

My apologies. I misunderstood your post. Thanks for clarifying.

Alexandru Marian
08-03-2016, 14:11
Alexandru, what about just allowing the numeric track id as an alternative for the track name in the "TrackId" field of sms_rotate_config.json? I seem to remember that, in the main server configuration, only the numeric id is accepted in this field; I always thought it was a confusing inconsistency that I have to use the numeric id in one place and the name in another. So this solution would solve the problem for the "weird charset people" and mitigate this inconsistency.

Quick update, found some time to look into this and you should actually be able to do it, for example this sets the track ID to Brands Hatch Indy:


"rotation" : [
{
// Any Road B car on Brands Hatch Indy, 5 minutes qualify then 3 lap race
"TrackId" : 1300627020,
"VehicleClassId" : "Road B",
"QualifyLength" : 5
}
]

Of course you will need to check what each track's hash ID is in the ServerTypes PDF document.

I'm still looking into the other issues raised but they will take a bit more time.

KingE71
22-03-2016, 16:33
I noticed that DS is now on build 88. Does someone know what is (hopefully) fixed in this build?

RomKnight
22-03-2016, 16:39
Probably just a version match

Kenaidoo
22-03-2016, 17:34
Probably just a version match

Now you have guessed ... in the PC version the game still has many bugs now. After yet another patch which dedicated to minor bug fixes it denotes the trend of development and support of pCARS. On the PC multiplayer dedicated server is no longer being developed and supported. Numerous bug and compromise the quality of MP on PCs.

-Replay are corrupt and have a bad quality with cars on the grid and cars with different liveries compared to race ... veichle not present in the replay.

-bug of pitstop wrapped doesn't return-after a session of nearly an hour on dedicated server with high bandwidth host, you experience lag in the game session.

-dedicated server bandwidth load is not totally run by itself but is shared a percentage even by the first user host and this compromises the online games of Championships when it drops the connection to the host.

-stability of the session MP with dedicated server very poor, despite having a dedicated server with wide bandwidth and client with excellent connections.


This only applies to the MP PC except that there are still bugs in the game that have not yet been resolved from day one:

-It takes to the track and the wheel does not respond and the only way to exit the runway is CTRL + ALT + DELATE invoking taskmenager to close pCARS.

-many times it happens that when you get off the wheel does not correspond to the same degree rotation as in previous sessions. you have to restart the game or even the PC.

-often the car physics is different than in earlier times. you have to restart the game and even the PC.

This thing happened in both Single Player and Multi Player ... the problem is in the MP especially when you're in League games such things happen ... and it's very sad not to be able to participate after spending time and effort to prepare.


These problems do not have happened only in my case but also to others who know. Many and all fed up with this situation.


that said, I'd read long ago that supporting the game would last 2 years, but looking at the latest patches and fixes that you've made it looks like the game seems intended as an end in itself.

I don't want to believe this I hope you do something to improve it.


Sorry for the outburst. but it's the truth.

Thx for all.

Orcajavi
22-03-2016, 21:44
Now you have guessed ... in the PC version the game still has many bugs now. After yet another patch which dedicated to minor bug fixes it denotes the trend of development and support of pCARS. On the PC multiplayer dedicated server is no longer being developed and supported. Numerous bug and compromise the quality of MP on PCs.

-Replay are corrupt and have a bad quality with cars on the grid and cars with different liveries compared to race ... veichle not present in the replay.

-bug of pitstop wrapped doesn't return-after a session of nearly an hour on dedicated server with high bandwidth host, you experience lag in the game session.

-dedicated server bandwidth load is not totally run by itself but is shared a percentage even by the first user host and this compromises the online games of Championships when it drops the connection to the host.

-stability of the session MP with dedicated server very poor, despite having a dedicated server with wide bandwidth and client with excellent connections.


This only applies to the MP PC except that there are still bugs in the game that have not yet been resolved from day one:

-It takes to the track and the wheel does not respond and the only way to exit the runway is CTRL + ALT + DELATE invoking taskmenager to close pCARS.

-many times it happens that when you get off the wheel does not correspond to the same degree rotation as in previous sessions. you have to restart the game or even the PC.

-often the car physics is different than in earlier times. you have to restart the game and even the PC.

This thing happened in both Single Player and Multi Player ... the problem is in the MP especially when you're in League games such things happen ... and it's very sad not to be able to participate after spending time and effort to prepare.


These problems do not have happened only in my case but also to others who know. Many and all fed up with this situation.


that said, I'd read long ago that supporting the game would last 2 years, but looking at the latest patches and fixes that you've made it looks like the game seems intended as an end in itself.

I don't want to believe this I hope you do something to improve it.


Sorry for the outburst. but it's the truth.

Thx for all.

+1:(

satco1066
23-03-2016, 22:14
No release notes?

I'm shure it will look like following lines, but it should be on page 1. :sleeping:

--
22.03.2016 - Build 88
Protocol version 1.36, compatible with game patch 10.0. No other visible changes.
--

Eddie.PND
23-03-2016, 23:29
Now you have guessed ...

...omissis...

Sorry for the outburst. but it's the truth.

Thx for all.


After six months working hard to build a league and a drivers community nothing works. Stone tyres, crashes, disconnections, lags, unaccettable replays.... a long list of bugs could follow.

Then the only dev really working about multiplayer was fired.

At the end our league was destroyed by Pcars bugs, multiplayer is a walking dead and Pcars is a joke, as AC is a joke too.


The solution? iRacing, expensive but working.


See you never.

Ademir
24-03-2016, 15:35
The previous comments say, in a simple and complete, what pCARS is: so many promises, but they all disregarded.
It is not a little angry, because the years of testing the game. As mentioned above, you are now committed to making cash with DLC (where they do not lack the bugs). the game support? What the fuck cares ?? The money you made them.
You will also develop a simulator of the madonna in pCARS 2, but as far as I have lost face and my estimation.
I have also been tweaking iRacing ...! Game I always hated about the cost, but I changed my mind! On the contrary of your product, the game works and has a fantastic multiplayer structure.
I leave you forever. I hope you read this post, while on break from post screen of the game on facebook.
Goodbye!

t0daY
24-03-2016, 16:13
The previous comments say, in a simple and complete, what pCARS is: so many promises, but they all disregarded.
It is not a little angry, because the years of testing the game. As mentioned above, you are now committed to making cash with DLC (where they do not lack the bugs). the game support? What the fuck cares ?? The money you made them.
You will also develop a simulator of the madonna in pCARS 2, but as far as I have lost face and my estimation.
I have also been tweaking iRacing ...! Game I always hated about the cost, but I changed my mind! On the contrary of your product, the game works and has a fantastic multiplayer structure.
I leave you forever. I hope you read this post, while on break from post screen of the game on facebook.
Goodbye!

You guys realise that here is still the dedicated server api thread and not "Complain and Goodbye" - posts? According to your 1 green bar and 7 posts in this forum after 1 year, i really cant believe you tested so much in these many years of WMD.

We all know now that pCars1 is not the game it wanted to be, still it has some good features. Your DLC comment is completly absurd. Look at the prizing, 5 dollars for couple cars and a track. I really do not believe SMS is doing so much cash with it. If you are more happy buying for 11,95 Dollar one car in iRacing or 14,95 dollar for a track then go for it. But also do not forget that iRacing is in development since 13 years. You are comparing a game which is over a decade tweaked, patched and whatever versus a game which was in development for 2 years and now released since a year. Your comparison is crap, sorry mate.

Ademir
24-03-2016, 18:27
I know that you have not understood what I meant. The reference to the DLC was that instead of thinking to fix the game, think about releasing paid DLC. In my opinion they should be other priorities, such as the multiplayer. Realize something serious is impossible. If you play online you can not deny.

My regret is due to the fact that after millle statements, we are in the presence of an incomplete game. And I say this with great disappointment. I did not even compare pCARS with iRacing, but only say that if I want to play online prefer iRacing. That's all

Vincent Boulard
10-04-2016, 08:16
Hi all,

We're running our league on dedicated servers and got a lot of disconnections last friday night. For instance 5 players (including me :() were disconnected at the same time.

Nothing unusual in the server log apart from the "WARNING: User XXXXXXXXXXXXXXXXX sent game datagram targeted to recipient with refId XXXXX, but there is no such member in the session" messages that other players already reported in this thread.

But I noticed this in my online.log file:


[22:54:35:358][0x00001a8c] [Info ] [SessionConnectivityMatrix::EvaluateSoftKick] [SessionNetworking] Evaluating soft-kick status of member with RefId 21066 at slot 10...
[22:54:35:358][0x00001a8c] [Warn ] [SessionConnectivityMatrix::EvaluateSoftKick] [SessionNetworking] -> KICKING 10 because of connectivity issues, 6 members voted to kick (physical session size = 19, logical session size = 19, votes needed = 6)
[22:54:35:358][0x00001a8c] [Info ] [SessionConnectivityMatrix::ApplySoftKick] [SessionNetworking] Session connectivity soft-kicked user with RefId 21066 at slot 10 with reason 5, physical member count 19, soft kick count 1
[22:54:35:358][0x00001a8c] [Info ] [SessionConnectivityMatrix::EvaluateSoftKick] [SessionNetworking] Evaluating soft-kick status of member with RefId 50572 at slot 12...
[22:54:35:358][0x00001a8c] [Warn ] [SessionConnectivityMatrix::EvaluateSoftKick] [SessionNetworking] -> KICKING 12 because of connectivity issues, 6 members voted to kick (physical session size = 19, logical session size = 18, votes needed = 6)
[22:54:35:358][0x00001a8c] [Info ] [SessionConnectivityMatrix::ApplySoftKick] [SessionNetworking] Session connectivity soft-kicked user with RefId 50572 at slot 12 with reason 5, physical member count 19, soft kick count 2
[22:54:35:358][0x00001a8c] [Info ] [SessionConnectivityMatrix::EvaluateSoftKick] [SessionNetworking] Evaluating soft-kick status of member with RefId 17294 at slot 14...
[22:54:35:358][0x00001a8c] [Warn ] [SessionConnectivityMatrix::EvaluateSoftKick] [SessionNetworking] -> KICKING 14 because of connectivity issues, 6 members voted to kick (physical session size = 19, logical session size = 17, votes needed = 6)
[22:54:35:358][0x00001a8c] [Info ] [SessionConnectivityMatrix::ApplySoftKick] [SessionNetworking] Session connectivity soft-kicked user with RefId 17294 at slot 14 with reason 5, physical member count 19, soft kick count 3
[22:54:35:358][0x00001a8c] [Info ] [SessionConnectivityMatrix::EvaluateSoftKick] [SessionNetworking] Evaluating soft-kick status of member with RefId 65424 at slot 16...
[22:54:35:358][0x00001a8c] [Warn ] [SessionConnectivityMatrix::EvaluateSoftKick] [SessionNetworking] -> KICKING 16 because of connectivity issues, 6 members voted to kick (physical session size = 19, logical session size = 16, votes needed = 6)
[22:54:35:358][0x00001a8c] [Info ] [SessionConnectivityMatrix::ApplySoftKick] [SessionNetworking] Session connectivity soft-kicked user with RefId 65424 at slot 16 with reason 5, physical member count 19, soft kick count 4
[22:54:35:358][0x00001a8c] [Info ] [SessionConnectivityMatrix::EvaluateSoftKick] [SessionNetworking] Evaluating soft-kick status of member with RefId 18578 at slot 18...
[22:54:35:358][0x00001a8c] [Warn ] [SessionConnectivityMatrix::EvaluateSoftKick] [SessionNetworking] -> KICKING 18 because of connectivity issues, 5 members voted to kick (physical session size = 19, logical session size = 15, votes needed = 5)


When I read this, this is what I understand : each player monitors connectivity of others players and a player A is kicked when X players - seems to be round(number of players/3) - report connectivity issues for this player A.
Is my understanding correct ?

If so, I can understand such a control being active on P2P sessions, but I don't for sessions running on a DS.

Vincent Boulard
11-04-2016, 11:31
Hello,

I got my answer: I misunderstood how DS works.
DS sessions are still P2P sessions, the *DS* is only a kind of virtual host.

Mike Laskey
11-04-2016, 14:34
What's the network topology here, first with the server and attached clients. How many players were there before the disconnect and how many continued?

Could you attach the following logs from that session please:

* The dedicated server
* Yours
* As many of the others as possible (including any that continued without disconnecting)

I'd like to review some of the detail.

Vincent Boulard
11-04-2016, 15:15
Hi Mike,

I can provide you with the server log and my own log files right now.
I'll try to collect other players data asap.

If if remember well, during the race, we were 19 players in the session before 4 players and I get disconnected (line 93172 in server.log).
The 14 other players continued.
Then players got disconnected one after the other, I cannot tell you the time elapsed between each disconnection.
Eventually they were 6 at the end of the race.

The server.log file is a bit long because the server is up 24/7, we restarted it the day before the race.
We also running some lua scripts for stats recording and live timing, that's why there is a lot of "Save persistent data" lines.
The session (FP1 + FP2 + Quali + Warmup + Race) takes place between line 63652 ([2016-04-08 19:58:45]) and line 111594 [2016-04-08 23:44:16].

Mike Laskey
11-04-2016, 16:33
DS is blocked for 15 seconds here, at which point the clients report problems and subsequently disconnect:

[2016-04-08 22:54:56] INFO: Saving persistent data for addon 'positions' into 'lua_config/positions_data.json'
[2016-04-08 22:55:11] INFO: Received request from 76561198195520239: leave user 76561197987565061, index 18, refid 18578, reason 1

What is the positions addon? Is it possible it could block?

Vincent Boulard
11-04-2016, 16:48
The "positions" addon records players positions on the track, times, session setup with no history (data is replaced each time the script writes into the file).
It didn't block anything during the 2 hours preceeding the issues.
And we tested it previously (I spent many hours) without facing any problems.
As we only log "info" level (and not "debug" level), it's hard to tell whether the lua blocks or something else blocks.
I attached the script to let you see what it does.

Vincent Boulard
11-04-2016, 17:26
Moreover, if it can help, here is the video of the beginning of the race (bug with cars at the beginning of the grid) and when I was disconnected (end of the video).
The video is unlisted.


https://www.youtube.com/watch?v=LYCc4RNgxTU

Vincent Boulard
12-04-2016, 06:57
Hello,
I attached logs of 6 other players of the session.
I should receive other data today.

Mike Laskey
12-04-2016, 11:11
Do you have logs from this client too please? 76561198229448408 ([SQ.R.T]_SyPH3R_FR)

Vincent Boulard
12-04-2016, 11:25
He's currently on holidays.
I will get his files when he's back on Sunday.

Vincent Boulard
13-04-2016, 07:19
Hello,
Here are 2 other players logs.

Alexandru Marian
15-04-2016, 12:09
FYI in the meantime build 89 is up, with the new Free Car 10 added (Mercedes-AMG GT3).

Dalhil
15-04-2016, 16:00
my server doesn't update at the moment, it's still v.88, only one file was updated: ServerTypes.pdf

RomKnight
15-04-2016, 16:06
I remember having to update a couple of times to make sure it updated months ago.

It actually reported something that I can't recall... cache something? If I remember i'll post it but just in case do try to update a few times.

Dalhil
15-04-2016, 16:16
I've just installed the dedicated server from scratch to another PC with another steam account and also there the version of the exe is v.88

Vincent Boulard
15-04-2016, 16:19
Same here, only the ServerTypes.pdf has been updated.

Dmitry Afanasyev
16-04-2016, 17:15
Alexandru it looks like there is no new AMG GT3 in DS API

Vincent Boulard
17-04-2016, 18:29
Hello Mike,

Here are the last logs I got.
These 2 ones might be interesting:
- Dbg_10.zip contains the logs of the player driving the ruf thrown against the wall at the start in my video in post #538 (http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=1264201&viewfull=1#post1264201)
- Dbg_11_zip contains the logs of the player you requested in post #540 (http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=1264523&viewfull=1#post1264523)

DFAlex
17-04-2016, 22:00
Moin,
hmm...my Win Dedi is on 88 too...but the Linux Dedi from MBB is at 89...hmm...

Alex

Alexandru Marian
19-04-2016, 09:13
This is odd, I'll push the update to Steam again to see if that fixes it.

Alexandru Marian
19-04-2016, 09:29
I've re-published the patch for Windows. Can you guys let me know if this fixes it for you?

Dmitry Afanasyev
19-04-2016, 09:35
Mercedes-AMG GT3 works currectly. Thanks

Vincent Boulard
19-04-2016, 09:36
Hello Alexandru!
I verified steam cache integrity, it identified new files to download and my DS now runs build 89 :D
Thank you!

blak
20-04-2016, 21:09
Hi,

may it be that the last update broke setting the "fill session with AI" flag via the HTTP API? It worked properly before on our project (Autostew) but now I seem to be only change able to change it via the configuration file.

Alexandru Marian
25-04-2016, 17:10
Hi,

may it be that the last update broke setting the "fill session with AI" flag via the HTTP API? It worked properly before on our project (Autostew) but now I seem to be only change able to change it via the configuration file.

I will investigate but literally the only thing the last update changed was to add the new car so it's hard to understand why the feature would stop all of a sudden.

blak
25-04-2016, 17:18
Thanks for the reply.

What definitely changed in the DS API is being able to set the ServerControlsSetup via the API, which broke our project for some configurations. I guess there is a good reason for this change, unfortunately it was not so good for us.

This may also have been the reason why we had issues with "fill session with AI" flag, but I can't confirm this.

Is there somewhere where we can find a changelog for the DS? This could spare us some headaches :)

Jaileh
25-04-2016, 17:30
Hello everybody, is there any way to enable race 2 on my DS? Some friends and I are running a small friendly league and we would like to organise our races like:

practice (45min)
qualifying (15min)
race 1
race 2 reverse order on start


Until now we played race 2 by launching a new race without practice nor qualifying and with a DIY rolling start on reverse order. It's quite artificial and the feature already exist so, I hope some will save us from boredom!

Alexandru Marian
27-04-2016, 14:53
Is there somewhere where we can find a changelog for the DS? This could spare us some headaches :)

Yes, the changelog is in the 2nd post in this thread (http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=925930&viewfull=1#post925930).

El Nano
27-04-2016, 15:57
Hello, i rent a Project CARS server, but i can find some car 's ID in the the documents. Example: Radical RXC Turbo, or Scion.
This is (http://harm.io/misc/pcars/) what i use, but this is not included in the foregoing cars id. Can u help me pls? Thx!

Alexandru Marian
27-04-2016, 22:01
Hello, i rent a Project CARS server, but i can find some car 's ID in the the documents. Example: Radical RXC Turbo, or Scion.
This is (http://harm.io/misc/pcars/) what i use, but this is not included in the foregoing cars id. Can u help me pls? Thx!

You can always use the ServerTypes.pdf (http://forum.projectcarsgame.com/attachment.php?attachmentid=231451&d=1460722025) document in the first post of this thread (or the same document in the Dedicated Server install folder at steamapps\common\Project CARS Dedicated Server). It lists all the vehicle IDs in the "Vehicle List" section.

Specifically, for the cars you were interested the IDs are:


Radical RXC Turbo: -1048050877
Scion FRS: -356101373
Scion FRS Rocket Bunny Edition: -1127314200

El Nano
28-04-2016, 14:57
I apologize for my careless... And thank you very much!

Mike Laskey
06-05-2016, 14:29
Alex will edit the first/second posts when back from hols, but the DS has been updated today:

06/05/2016 - Build 90 Added Pagani Nürburgring Combined Track Expansion (May DLC content) to the DS lists and documentation.

232726

F1_Racer68
06-05-2016, 14:53
Alex will edit the first/second posts when back from hols, but the DS has been updated today:

06/05/2016 - Build 90 Added Pagani Nürburgring Combined Track Expansion (May DLC content) to the DS lists and documentation.

232726

Thanks Mike!

nohopes
08-05-2016, 13:46
Hy guys,

get some one a php script for Serverstatus ? i failed with foreach ....

nohope

hophans
22-05-2016, 12:11
To fetch json data to php i use the following:


$url = "http://$dshost:$dsport/api/session/status?attributes&members&participants";

$result = file_get_contents($url);
$json = json_decode($result, true);

that will give you all the server data in an php array like:

$json['response']['state']

A short example:

// Session info //
print "Server Name: [<font color=green>". $json['response']['name'] ."</font>] - Server State: [<font color=green>". $json['response']['state'] ."</font>] - Member Count: [<font color=green>". $json['response']['attributes']['NumParticipantsValid'] ."</font>] ";
print "Session: [<font color=green>". $json['response']['attributes']['SessionStage'] ."</font>]";
You can check all the data in the DS api list.

To put driver data in to an numbered array i use:

for($i=0; $i<count($json['response']['members']); $i++)

a short php example:


and call the data (or you can stack them in you own variables):


$json['response']['members']["$i"]['attributes']['Ping']
or

$json['response']['members']["$i"]['name']

I hope that helps. Otherwiseyou are most welcome to ask any question you might have

Ci2e
07-07-2016, 17:00
So there is no actual documentation on lua scripting, it's just scattered in a forum?

Umer Ahmad
07-07-2016, 17:33
So there is no actual documentation on lua scripting, it's just scattered in a forum?

See links at end of first post (http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API)

Aaeon
07-07-2016, 18:58
So how do I accomplish the following:

Getting player ping and driver rating from Autostew displayed upon player joining lobby?

Vincent Boulard
18-07-2016, 10:46
Hello all and hello Mike,

Been a while since I posted the logs: did you find anything interesting in there?

By the way, we found what caused the issue with the Ruf on the grid (http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=1264201&viewfull=1#post1264201) (and we also reproduced it): it occurs when players reconnect during the warm-up (after a disconnection or when they intentionally leave and rejoin). It seems to mess up the grid. We removed the warmup session in our league to avoid this problem.

Have a good day all :)

Vincent Boulard
18-07-2016, 16:16
So how do I accomplish the following:

Getting player ping and driver rating from Autostew displayed upon player joining lobby?

Hello Aaeon,

I'm not an Lua expert but maybe I would be able to help you, mainly on the display part of your goal.
Before talking about lua, I think a point needs to be managed first: does Autostew expose data in any way?

hophans
18-07-2016, 16:46
Autostew does NOT expose ping/latency data.

There are a way to warn/kick on a ping limit, but it is a rather advanced procedure

In my case it required at least 50 programming hours and a high bandwidth sql server.
Im happy to share my data and tools.

Vincent Boulard
18-07-2016, 17:45
Autostew does NOT expose ping/latency data.

There are a way to warn/kick on a ping limit, but it is a rather advanced procedure

In my case it required at least 50 programming hours and a high bandwidth sql server.
Im happy to share my data and tools.

Hello,

You're right and I was not explicit enough when talking about Autostew (was in mind though): I was wondering whether Autostew exposes the rating or not.
Ping is accessible in the members attributes directly in the dedicated server.

cogent
18-07-2016, 19:59
So how do I accomplish the following:

Getting player ping and driver rating from Autostew displayed upon player joining lobby?

Hello Aaeon,

maybe this will help regarding ping limit from the DS.
http://forum.projectcarsgame.com/showthread.php?41405-Session-Info-Lap-Times-info-and-Chat-Commands-Lua-Addons
(Point NR 3)

cogent
19-07-2016, 14:46
Maybe this can also help someone regarding kick with ping limit.
http://forum.projectcarsgame.com/showthread.php?22370-Dedicated-Server-HowTo-(Work-in-Progress)&p=1253742&viewfull=1#post1253742

Alexandru Marian
04-11-2016, 13:46
We've published version 91 of the Dedicated Server executable and updated the protocol version for the main game.

04/11/2016 - Build 91
Protocol version 1.37, compatible with game patch 11.1. No other visible changes.

Ramiboo
04-11-2016, 15:04
Holy shark soup Batman, xD

hophans
05-11-2016, 12:19
Any note on what have been changed?
As a developer towards the PCars DS it would be nice to know.

Alexandru Marian
06-11-2016, 15:43
Any note on what have been changed?
As a developer towards the PCars DS it would be nice to know.

The only thing that changed is the protocol version, as stated above. This is to prevent older versions of the game connecting with the latest version (which can have unforeseen effects in game due the changes in the patch) Please see the patch notes for the main game (http://forum.projectcarsgame.com/showthread.php?49181-Project-CARS-PC-Patch-11-1-Release-notes) for changes there.

Ramiboo
23-11-2016, 12:21
Do we have a new DS Update for the new 11.2 Patch?

epinter
17-12-2016, 22:42
Here is my addon for ping limit:
http://forum.projectcarsgame.com/showthread.php?49517-PingLimit-Addon-for-Dedicated-Server

And penalty system:
http://forum.projectcarsgame.com/showthread.php?49470-Penalty-Addon-for-Dedicated-Server

Universesciencepark
04-01-2017, 10:50
Is it possible to join a DS on startup ? is there a launch option for this ?

stefan.mizzi
20-01-2017, 17:24
Hi!

Is there a way where I can instruct the dedicated server to start the session timing automatically? I dont want to users to click start, I would like that when the dedi starts, the session time starts ticking.

Thanks!

m1ndgames
03-06-2018, 09:18
Hi!

Is there a way where I can instruct the dedicated server to start the session timing automatically? I dont want to users to click start, I would like that when the dedi starts, the session time starts ticking.

Thanks!

This would be very nice, an option to "skip" the race (to have training only) would be cool aswell.

My question: Does anyone know if luasql is useable thru the DS lua? If not be default, can it be loaded?

I would like to send stats directly to a db. (currently i have to parse the json to do the same...)