I have a nasty bug on my Naval Academy Mod, and I need to inspect what happens. But the bug only occurs in multiplayer.
Debug MP Script
Moderators: Slitherine Core, BA Moderators
-
Amaris
- Captain - Heavy Cruiser

- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Debug MP Script
I have a nasty bug on my Naval Academy Mod, and I need to inspect what happens. But the bug only occurs in multiplayer.
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
pipfromslitherine
- Site Admin

- Posts: 9929
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Debug MP Script
For MP games, you need to make sure that you are calling Rand() the same number of time at the same points on each machine during the playback. FXRand is for use where you want randomness, but it is only going to be used for visual effects and nothing that affects the model (note - things like floating text etc can affect the model by delaying other text etc - it's nasty!).
Debug is disabled in MP, this is to prevent cheating. I have a task on my list to turn it off when you are playing yourself, but it's not implemented yet.
Cheers
Pip
Debug is disabled in MP, this is to prevent cheating. I have a task on my list to turn it off when you are playing yourself, but it's not implemented yet.
Cheers
Pip
-
Amaris
- Captain - Heavy Cruiser

- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Debug MP Script
This is a part of my problem. Thanks.pipfromslitherine wrote:For MP games, you need to make sure that you are calling Rand() the same number of time at the same points on each machine during the playback.
That would be perfect.pipfromslitherine wrote:Debug is disabled in MP, this is to prevent cheating. I have a task on my list to turn it off when you are playing yourself, but it's not implemented yet.
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
Amaris
- Captain - Heavy Cruiser

- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Debug MP Script
Well, well I found a 'secret' way to access to the debug windows (F6) in MP.
To this must be in debug mode and just add a GetAttrib(id, string) somewhere with string that corresponds to nothing. This generates a simple warning.
But it opens the debug window where are displayed the result of Log() functions.
As it seems useful I publish it here. Now if it interferes remove this post.
To this must be in debug mode and just add a GetAttrib(id, string) somewhere with string that corresponds to nothing. This generates a simple warning.
But it opens the debug window where are displayed the result of Log() functions.
As it seems useful I publish it here. Now if it interferes remove this post.
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
pipfromslitherine
- Site Admin

- Posts: 9929
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Debug MP Script
LOL
Fair enough. I think that the restriction might be a little too strict anyway, so not a problem.
Cheers
Pip
Fair enough. I think that the restriction might be a little too strict anyway, so not a problem.
Cheers
Pip