For Debugging purposes

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
MeteoricDragon
Posts: 141
Joined: Mon Feb 12, 2018 8:23 pm

For Debugging purposes

Post by MeteoricDragon » Sat Mar 24, 2018 11:03 pm

For Debugging purposes, what command can I put in the C# code to output the value of a variable while playing Daggerfall Unity? Like a messagebox?

User avatar
Hazelnut
Posts: 2132
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: For Debugging purposes

Post by Hazelnut » Sat Mar 24, 2018 11:15 pm

Usually you would have something like these statements and you would see the messages in the console:

Code: Select all


Debug.Log("Quest pool has " + pool.Count);

Debug.LogFormat("faction id: {0}, social group: {1}, guild: {2}, building guild: {3}", 
	npc.Data.factionID, 
	(FactionFile.SocialGroups)factionData.sgroup,
	(FactionFile.GuildGroups)factionData.ggroup,
	(FactionFile.GuildGroups)buildingFactionData.ggroup);
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
MeteoricDragon
Posts: 141
Joined: Mon Feb 12, 2018 8:23 pm

Re: For Debugging purposes

Post by MeteoricDragon » Fri Mar 30, 2018 12:39 am

Thanks for your help!

Post Reply