Creating an NRaas project Interaction refuses to replace

Talk nerdy to us here.
User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7568
Joined: December 30th, 2011, 6:00 pm
Answers: 81
Contact:

Interaction refuses to replace

Post by Chain_Reaction » January 25th, 2014, 5:05 pm

I've been trying for quite a while to replace the SendWooHootyTextFromRelationPanel interaction and it just refuses to do so. I don't know why. I used the template Twallan uses to replace every interaction. I guess it has to do with that interaction not having a singleton? I imagined to replace the main interaction for the text fine (SendWooHootyText) and even when I click a Sim's portrait in the relationship panel it calls my custom Test function on the main interaction if two Sims are considered romantic by EA default because the relation panel interactions have their InteractionDefinition overwritten with the main one. That doesn't stop the CanTextWithEachOther on the relation panel version from firing though. I need to kill the romantic test from there so the interaction shows up on Sims in the panel not normally considered romantic. I even tried modifying RelationshipPanel where the interaction is added to the panel and that failed too. Maybe I just didn't do it right. I don't really want to force users to have to get another mod to have features of Woohooer work right though.

The relationship panel calls

<!-- ws:start:WikiTextCodeRule:0:
<pre class="text">public InteractionDefinition GetSendWooHootyTextFromRelationPanelDefinition(IMiniSimDescription simToText)<br/> {<br/> return new SendWooHootyTextFromRelationPanel.Definition(simToText);<br/> }</pre>
-->
<style type="text/css"><!--
/**
* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
* (http://qbnz.com/highlighter/ and http://geshi.org/)
*/
.text {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

-->
</style><pre class="text">public InteractionDefinition GetSendWooHootyTextFromRelationPanelDefinition(IMiniSimDescription simToText)
{
return new SendWooHootyTextFromRelationPanel.Definition(simToText);
}</pre>


this to add it.

I thought about replacing the base of SendWooHootyTextFromRelationPanel which is SendTextFromRelationPanel and seeing if that helped me any but it's definition is an abstract class that takes a type and I have no idea how to begin to replace that or even if I can.

Halp? :)

User avatar
JunJayMdM
Reactions:
Posts: 262
Joined: April 2nd, 2012, 6:00 pm

Post by JunJayMdM » January 25th, 2014, 5:17 pm

What's the whole class? Yours I mean, to see how you did it

User avatar
JunJayMdM
Reactions:
Posts: 262
Joined: April 2nd, 2012, 6:00 pm

Post by JunJayMdM » January 25th, 2014, 5:20 pm

P.S. I'm missing 2 files from the project, SendWoohotyTextEx.cs and SendWoohootyTextFromRelationPanelEx.cs, so my Woohoer won't compile

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7568
Joined: December 30th, 2011, 6:00 pm
Answers: 81
Contact:

Post by Chain_Reaction » January 25th, 2014, 6:01 pm

Both can be found here: <a href="http://chain-reaction.wikispaces.com/fi ... ons.zip</a>

Them being in the project file is my oops. Apparently I managed to keep the code out but the project file slipped past me. I don't want to add code that isn't finished to the project.

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7568
Joined: December 30th, 2011, 6:00 pm
Answers: 81
Contact:

Post by Chain_Reaction » January 25th, 2014, 6:03 pm

If you can get the "Custom CanTextWithEachOtherCalled" to fire in the CanTextWithEachOther function inside SendWooHootyTextFromRelationPanel when clicking on a Sim in the relation panel that isn't romantic and is in town, you win. I tried just about everything.

User avatar
JunJayMdM
Reactions:
Posts: 262
Joined: April 2nd, 2012, 6:00 pm

Post by JunJayMdM » January 25th, 2014, 6:17 pm

It says I have no access when I click your link, this is discrimination, I'll have your van towed! :P

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7568
Joined: December 30th, 2011, 6:00 pm
Answers: 81
Contact:

Post by Chain_Reaction » January 25th, 2014, 6:39 pm

Try again :P

User avatar
JunJayMdM
Reactions:
Posts: 262
Joined: April 2nd, 2012, 6:00 pm

Post by JunJayMdM » January 25th, 2014, 6:53 pm

Got them ;) Let's see....

User avatar
JunJayMdM
Reactions:
Posts: 262
Joined: April 2nd, 2012, 6:00 pm

Post by JunJayMdM » January 25th, 2014, 7:13 pm

What does this override do exactly, what's the objective? Cos I see comments saying it's unfinished

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7568
Joined: December 30th, 2011, 6:00 pm
Answers: 81
Contact:

Post by Chain_Reaction » January 25th, 2014, 7:21 pm

The objective is to make it follow Woohooer's rules in that WooHooty texts can be sent and accepted among Sims that aren't romantically involved, near relation, and so on. I have it working fine for the sim/phone interactions but clicking a Sim in the relationship panel doesn't show the Send WooHooty text on Sims that aren't romantic by EA standard because of the CanTextWithEachOther call in SendWooHootyTextFromRelationPanel.Definition calling the static Phone.SendWooHootyText.SimCanTextWIthActor and it won't override with my new definition which calls SendWooHootyTextEx.SimCanTextWithActor (which I now realize needs to be static but I can't even get the game inside the replaced CanTextWithEachOther function).

Post Reply