Jump to content

Witchcraft DCS debugger


Recommended Posts

I was turned on to an old mod called DCS witchcraft which opens a web socket and lets you run lua commands live against DCS. You can issue commands and print the return value.  It was broken by modern node.js but I posted a version with it fixed for the new js api.  Posted here, hope it helps someone else. I’ll put better read me if anyone really uses it.

 

happy modding

 

https://github.com/MrBuzzKillington/dcs-witchcraft

  • Like 3
  • Thanks 2
Link to comment
Share on other sites

  • 1 month later...

Hello.  I really appreciate this effort, I had a similar issue and was surprised how little documentation there is to use Witchcraft with modern OSs and NodeJS versions.

However, your solution seems to have taken the "long way home".  If I may suggest, the changes required are much fewer!  You simply need to:
- Remove the included NodeJS version with the newest one (at the time of posting its 18.13LTS)
- Implement Socketio correctly  with just this two lines:

var server = app.listen(port, "0.0.0.0")
var io = require('socket.io')(server);

instead of

var io = require('socket.io').listen(app.listen(port, "0.0.0.0"));

 

That's really it.  No other modification required, and this doesn't force a global installation of npm packages and other unnecessary stuff.

If you try it and double check it to see it works, I'd be happy to support your Fork of the original asset.  If not, I'll probably create my own with this much simpler instructions.

 

Best regards,

Rafa.

ps. My solution does not address the automatic opening of a browser pointing to localhost:3000 , but that's really the only thing missing.

 

I'm Dragon in the Multiplayer servers.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...