Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 3rd Sep 2023 at 9:56 PM
Default Game not launching after i made my own object mod?
Hi,
I was trying to learn some basic modding stuff and I followed this object tutorial => https://modthesims.info/wiki.php?ti..._Object_Modding

After I did everything according to the tutorial (no errors or warning on Visual Studio)(And i just select a different object,not teddybear but easel, rest is the same), I added my package to the mod folder as usual. When I open the game, it starts normally, but it turns itself off before I get to the maxis logo without any error. I tried to launch it without my test mod, then all mods, no difference. In the generated file in the documents, it says:

[Instruction data]
0058d916 => DasmX86Dll.dll not found.

This is the code I wrote by following tutorial:
Code:

using Sims3.Gameplay.Interactions;
using Sims3.Gameplay.Objects.HobbiesSkills;
using Sims3.Gameplay.Actors;
using Sims3.Gameplay.Autonomy;
using Sims3.SimIFace;
using Sims3.UI;
using static Sims3.Gameplay.Objects.HobbiesSkills.FamilyEasel.Familyphoto;

namespace Sims3.Gameplay.Objects.HobbiesSkills.FamilyEasel
{
    public class Familyphoto : Easel
    {
        public sealed class Talktome : ImmediateInteraction<Sim, Familyphoto>
        {
            // Fields
            public static readonly InteractionDefinition Singleton = new Definition();

            // Methods
            protected override bool Run()
            {
                base.Actor.ShowTNSIfSelectable("Hello!", StyledNotification.NotificationStyle.kSimTalking);
                return true;
            }

            // Nested Types
            [DoesntRequireTuning]
            private sealed class Definition : ImmediateInteractionDefinition<Sim, Familyphoto, Familyphoto.Talktome>
            {
                // Methods
                protected override string GetInteractionName(Sim a, Familyphoto target, InteractionObjectPair interaction)
                { return "Talk To Me";
                }

        protected override bool Test(Sim a, Familyphoto target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
                { return !isAutonomous; 
                }
    }
        }
        public override void OnStartup()
        {
            base.OnStartup();
            base.AddInteraction(Talktome.Singleton);
        }


    }

}

Attached files:
File Type: txt  xcpt DESKTOP-MKL5SQO 23-09-03 20.16.31.txt (20.1 KB, 3 downloads)
Advertisement
Instructor
#2 Old 4th Sep 2023 at 12:58 AM
The xcpt is mostly a generic crash log without any useful information for mod related crashes. It may help to install NRaas ErrorTrap and see if you get a proper ScriptError log, which can then be shared over on their forums for a more expert eye to read.

Otherwise, just a matter of waiting for someone with scripting knowledge to pop in and double check that code.
Test Subject
#3 Old 4th Sep 2023 at 3:21 AM
The order of your code actually matters! So you need to put the Definition class FIRST, then "public static readonly InteractionDefinition Singleton = new Definition();" then the Run() method. I would also definitely reccommend installing ErrorTrap like CardinalSims said, it'll be very helpful for future error logging! It usually even tells you which part of your code is throwing the error.
Test Subject
#4 Old 4th Sep 2023 at 3:23 AM
oh also you don't need to have "using static Sims3.Gameplay.Objects.HobbiesSkills.FamilyEasel.Familyphoto;"
Back to top