- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Experimenting with EA's Debugging tools
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Experimenting with EA's Debugging tools
Replies: 2 (Who?), Viewed: 676 times.
#1
4th Sep 2020 at 2:26 PM
Posts: 3,856
Thanks: 8484 in 67 Posts
Experimenting with EA's Debugging tools
Heya!It's unknown that the game still has a lot of debugging code. And some of it is actually quite valuable stuff! So I kinda wanted to dedicate this thread to open this treasure chest The Debugging code that i'm specifically looking for is really more the technical stuff, especially since nraas debugenabler did already an awesome job on finding debug options But it makes sense that they didn't get to enable debug options for non-interactions.
Currently, I've been able to get the following to work:
'Draw line & Draw circle' :
Now, this is a very regular one tbh. If you have WA, you might recognise these lines (They use the same debug code for creating arrows). Currently I got it to work with it showing the forward vector. Which also keeps in mind where the sim will stand and starts it's interaction with the object. (base.StandardEntry() is the function that will lead the sim to here). Same can be used for sims!
Now the circle stuff I still need to fix. I'm actually using the wrong vector3 positionings for it to work. And it takes some maths and brains to figure out the middle of a circle
Toggle Debug Info:
This, I will say, since I've discovered it, is actually a super helpful one when script modding (especially the heavy work!). It shares the Frame rate, the memory usage, how many 'Tasks' there are currently running But also, how much script memory there's still left. Furthermore it includes the time it took to render the game's frame, and how excessive that 'render frame' call was to begin with.
This also updates in realtime
What I'm currently trying to get to work:
Currently I'm working on getting the 'AnimationDebugWindow' to work and show up. Looking at the code itself, it seems SUPER helpful for debugging jazz scripts and just animations to begin with! Haven't yet been able to even pop up correctly but that was partial because it doesn't like static functions.
If you guys have any functions or things that you'd like to see up and running or just share some code/images/things, I'd love to see it!
Advertisement
#2
6th Sep 2020 at 2:33 PM
Last edited by Lyralei : 8th Sep 2020 at 12:44 PM.
Posts: 3,856
Thanks: 8484 in 67 Posts
So by pure accident, I also found another Debug menu! I noticed that EA actually has 4 different 'views'. You know how when you press F10, the UI will disappear?
Well, there are 4 different "UI appearances". I think 2 of them have actually been removed from the initial release, from the looks of it. But whenever I select 'UI appearance 0' I actually get to see this:
This also turns on another debug thing, where if you hover over any lot, you'll see the Lot ID, the filename where the lot had been saved and the residential name. Now, this is my test lot, so you don't see many fun things happening currently.
Num NPC Drivers, is really just what it means. How many NPCs are driving currently in the game? Now the original code for it actually has a few more options:
I still have trouble getting that AnimationDebugModal to show up tbh, it just really doesn't like to be called :p
EDIT: Also! I just noticed the draw calls keep getting 'exceeded'. :p
Secondly, the debug panel I talked about always is stuck at paused. And the Num PC drivers seems to also stay at 0. Furthermore, it really doesn't seem to function at all, like the slow motion thing doesn't actually link to the cheat.
Well, there are 4 different "UI appearances". I think 2 of them have actually been removed from the initial release, from the looks of it. But whenever I select 'UI appearance 0' I actually get to see this:
This also turns on another debug thing, where if you hover over any lot, you'll see the Lot ID, the filename where the lot had been saved and the residential name. Now, this is my test lot, so you don't see many fun things happening currently.
Num NPC Drivers, is really just what it means. How many NPCs are driving currently in the game? Now the original code for it actually has a few more options:
Code:
The weird thing is though, I can only get this to show in custom worlds :/ Maybe this is why Sunset valley 2 existed :p ea's test world. public void UpdateDisplayPanelText() { bool visible = false; Color textColor = default(Color); textColor.Alpha = byte.MaxValue; string text = ""; if (GameUtils.IsPaused()) { text += "Paused\n"; textColor.Red = byte.MaxValue; visible = true; } if (Sims3.Gameplay.Gameflow.SlowMotion) { text += "Slow Motion\n"; textColor.Green = byte.MaxValue; visible = true; } if (!AutonomyRestrictions.IsDefault()) { text = text + AutonomyRestrictions.GetLevelString() + "\n"; textColor.Blue = byte.MaxValue; visible = true; } if (LotManager.sAlwaysAllowUserToMoveObjects) { text += "Always Allow User To Move Objects\n"; textColor.Green = byte.MaxValue; textColor.Blue = byte.MaxValue; visible = true; } object obj = text; text = obj + "Num NPC Drivers: " + CarNpcManager.Singleton.NpcDriversManager.NumDrivers() + " \n"; mDisplayPanelText.Caption = text; mDisplayPanelText.TextColor = textColor; mDisplayPanelText.Visible = visible; }
I still have trouble getting that AnimationDebugModal to show up tbh, it just really doesn't like to be called :p
EDIT: Also! I just noticed the draw calls keep getting 'exceeded'. :p
Secondly, the debug panel I talked about always is stuck at paused. And the Num PC drivers seems to also stay at 0. Furthermore, it really doesn't seem to function at all, like the slow motion thing doesn't actually link to the cheat.
#3
15th Jan 2022 at 11:32 PM
Posts: 3,856
Thanks: 8484 in 67 Posts
I know this is super ancient ago, but I did finally figure out (after literally 2 years :p) how to make the draw circle:
Code:
public static void DoStuff() { //Getting position of actor/activesim Vector3 position = PlumbBob.SelectedActor.Position; // Gladly ignore this. We need this for lazyloading. List<ulong> mDrawObjects = new List<ulong>(); DrawCircle(position + Vector3.UnitY * 0.1f, 10f, Color.Preset.OpaqueRed, ref mDrawObjects); } public static void DrawCircle(Vector3 center, float radius, Color color, ref List<ulong> drawObjects) { Vector3 center2 = center; center2.y += 0.25f; Lazy.Add(ref drawObjects, DebugDraw.DrawCircleTimed(center2, radius, color, 3.40282347E+38f)); }
Who Posted
|