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!
Test Subject
Original Poster
#1 Old 16th Oct 2014 at 1:18 AM
Default Replace EA Interaction?
Hello. I can't replace an interaction EA.
I'm trying to:

Code:
private static readonly InteractionDefinition MyInteractionSingleton = new MyInteraction.Definition();

public static void OnWorldLoadFinishedHandler(object sender, System.EventArgs e){
			RolePaparazzi.FollowCelebrity.Singleton = MyInteractionSingleton;
}


But it does not work. The Sims still use the interaction "FollowCelebrity" EA. (sorry for my english). Can you help me?
Advertisement
Inventor
#2 Old 16th Oct 2014 at 8:03 AM
For now I'll just point you to THIS TUTORIAL (read all the thread not just the first posts).
If I can I'll try to help you more if you need.
Test Subject
Original Poster
#3 Old 16th Oct 2014 at 2:52 PM
Hey, thanks. I tried the tutorial, it didn't work. Then I found a Tawllan MOD:



I tried to do the same, but also didn't work.
Inventor
#4 Old 25th Oct 2014 at 2:45 PM Last edited by Arsil : 26th Oct 2014 at 10:53 AM.
Any progress?

Why do you want to replace the interaction?
To add the code related to the active profession?
Will NPC Paparazzi still be able to do their job?

If you want I'll try to help you, but I need some code to get my hands dirty.
Test Subject
#5 Old 27th Oct 2014 at 4:44 PM
Trying to just remplace it won't work because the original InteractionDefinition method is a static readonly one so you will have to remove the old interaction and add your new one instead. ( You can also see how to do it in the tutorial that Arsil linked )
1978 gallons of pancake batter
#6 Old 27th Oct 2014 at 5:39 PM
I would like to recommend this thread: http://www.den.simlogical.com/denfo...hp?topic=1689.0 It enables you to overwrite readonly fields.

Background: readonly (or initonly in IL) is something that gets enforced by the compiler and the runtime. If the modifiers get removed from the assemblies in question, the compiler will have no problem with it. Also TS3 uses a version of the MONO portable runtime that doesn't enforce things like readonly, sealed etc., so you can actually overwrite the fields in question even though the original assemblies the game uses still have the readonly modifier.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Back to top