[Question] Is there a way to debug my mod to discover errors?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Max Bain
Posts: 1463
Joined: Wed, 27. Jun 18, 19:05
x3ap

[Question] Is there a way to debug my mod to discover errors?

Post by Max Bain »

How do you guys debug your mods? I wanted to add a new weapon and I think I did all fine but I can not see the weapon in the weapon selection. How can I find out what the problem is? Do you have any useful tips?

Thnak you!
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link
TheGreatGooglyMoogly
Posts: 8
Joined: Sun, 18. Sep 05, 23:36
x4

Re: [Question] Is there a way to debug my mod to discover errors?

Post by TheGreatGooglyMoogly »

I dont know how people do this but I'd suggest writing to the Tips logbook page as its barely used.
Antaran
Posts: 166
Joined: Wed, 6. Nov 02, 20:31
x3tc

Re: [Question] Is there a way to debug my mod to discover errors?

Post by Antaran »

Max Bain wrote: Thu, 13. Dec 18, 18:49 How do you guys debug your mods? I wanted to add a new weapon and I think I did all fine but I can not see the weapon in the weapon selection. How can I find out what the problem is? Do you have any useful tips?

Thnak you!
First thing you could do is go to the control settings and create a shortcut for the debug menu in the game, it should be one of the bottom settings, there you should see f.e errors loading mods and stuff. (Settings->Controls->General | At bottom, Debug Log), it is not set to anything by default but by setting a shortcut to it you can open it to see some debug information.
Tyrant597
Posts: 299
Joined: Wed, 9. Apr 08, 05:52
x4

Re: [Question] Is there a way to debug my mod to discover errors?

Post by Tyrant597 »

The above can also be viewed outside the game. Run the game with the parameter -logfile debuglog.txt . You can add that in steam, under "launch options" for X4. The file will be available in the games directory in My Docs folder.

viewtopic.php?f=181&t=402452
You don't talks about X:Rebirth...
X4 Mods: Collect Inventory Wares Stations Supply Build Storage Mass Move Marines

Return to “X4: Foundations - Scripts and Modding”