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!
Scholar
#26 Old 23rd Aug 2018 at 9:52 PM
No but I still have his private messages that he had sent me explaining how it works. Do you want me to post all of his messages here?
Advertisement
Trainee Moderator
staff: trainee moderator
Original Poster
#27 Old 23rd Aug 2018 at 10:04 PM
Quote: Originally posted by Squidconqueror
No but I still have his private messages that he had sent me explaining how it works. Do you want me to post all of his messages here?


Okay

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Scholar
#28 Old 23rd Aug 2018 at 10:49 PM
Alright here they go. I'm posting them in an easy to read format so they won't be that confusing to read. I don't know how to put a spoiler tag on this post but I would if I knew how to.

Quote: Originally posted by skydome
You can check out this mod I made. If you're interested in pushing an interaction. Making a social interaction is also in that mod if you're interested.

Quote: Originally posted by skydome
skydome mentioned you in a post!

Me:Cool so how do I go about disabling the EA Skeeball interaction and replacing it with my own interaction? I love your enhanced witches mod by the way.


Squidconqueror so sorry for late reply. Disabling can be done through the script or with an ITUN. I use ITUN but you can use script too. If you're using ITUN cahnage the <Disallow DisallowAutonomous="False" DisallowUserDirected="False" DisallowPlayerSim="False" /> to false. These will be usually true. Making them false will disable the interaction.
Removing it with script I'm forgetting but it's something like sim.RemoveInteraction() or something like that.[/infobutton][/QUOTE]

Me:Thanks for the answer, I think that bit of info would help me out a lot when I try to make the mod. What I don't really understand however is the part when you said that I could copy and paste the code from EA. Would that still use the same EA hard-coded age restrictions but then again I know absolutely nothing about programming?

Yea the copied code will have the restriction but you can change it if you want. When you decide to make the mod. PM me. I'll explain it better. Right now I'm about to have dinner and sleep.
Good luck with your mod in the future
I change the code to remove the age restrictions that's scripted by EA and Maxis? This is the code that I found in the dll files.
// Sims3.Gameplay.Objects.Electronics.SkeeBall
using Sims3.Gameplay;
using Sims3.Gameplay.Abstracts;
using Sims3.Gameplay.Actors;
using Sims3.Gameplay.ActorSystems;
using Sims3.Gameplay.Autonomy;
using Sims3.Gameplay.Core;
using Sims3.Gameplay.EventSystem;
using Sims3.Gameplay.Interactions;
using Sims3.Gameplay.Interfaces;
using Sims3.Gameplay.Objects.Electronics;
using Sims3.Gameplay.Skills;
using Sims3.Gameplay.Socializing;
using Sims3.Gameplay.Utilities;
using Sims3.SimIFace;
using Sims3.SimIFace.Enums;
using Sims3.UI;
using System;
using System.Collections.Generic;

public class SkeeBall : GameObject
{
public enum WatcherLocation : byte
{
Random,
Left,
Right
}

private sealed class WatchSkeeBall : Interaction<Sim, SkeeBall>
{
private enum ReactionQueueType
{
None,
Negative,
Positive,
VeryPositive
}

private sealed class Definition : InteractionDefinition<Sim, SkeeBall, WatchSkeeBall>
{
protected override string GetInteractionName(Sim actor, SkeeBall target, InteractionObjectPair iop)
{
return LocalizeString(actor.IsFemale, "WatchSkeeBall");
}

protected override bool Test(Sim a, SkeeBall target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
if (target.SimPlayingSkeeBall == a)
{
return false;
}
return target.SimPlayingSkeeBall != null;
}
}

private ReactionQueueType mQueuedReaction;

public static readonly InteractionDefinition Singleton = new Definition();

protected override bool Run()
{
if (base.Target.SimPlayingSkeeBall == null)
{
return false;
}
if (!CreateAndDoRouteForWatchingSkeeBall(base.Actor, base.Target.SimPlayingSkeeBall, base.Target))
{
return false;
}
base.Actor.LookAtManager.SetInteractionLookAt(base.Target.SimPlayingSkeeBall, 300, LookAtJointFilter.TorsoBones);
base.Actor.RouteTurnToFace(base.Target.Position + base.Target.ForwardVector);
base.StandardEntry();
base.EnterStateMachine("GenericWatch", "Enter", "x");
base.AnimateSim("PositiveWatchLoop");
base.BeginCommodityUpdates();
mQueuedReaction = ReactionQueueType.None;
RegisterCallbacks();
bool flag = DoLoop(ExitReason.Default, WatchLoop, base.mCurrentStateMachine);
base.AnimateSim("Exit");
base.EndCommodityUpdates(flag);
base.StandardExit();
base.Actor.LookAtManager.ClearInteractionLookAt();
return flag;
}

public override void Cleanup()
{
UnRegisterCallbacks();
base.Cleanup();
}

private void RegisterCallbacks()
{
if (base.Target.SimPlayingSkeeBall != null && PlayerToTableMap.ContainsKey(base.Target.SimPlayingSkeeBall))
{
PlaySkeeBall currentPlayerInteraction = PlayerToTableMap[base.Target.SimPlayingSkeeBall].CurrentPlayerInteraction;
PlaySkeeBall playSkeeBall = currentPlayerInteraction;
playSkeeBall.GameComplete = (PlaySkeeBall.GameCompleteCallback)Delegate.Combine(playSkeeBall.GameComplete, new PlaySkeeBall.GameCompleteCallback(PlayGameReaction));
PlaySkeeBall playSkeeBall2 = currentPlayerInteraction;
playSkeeBall2.BallPlayed = (PlaySkeeBall.BallPlayedCallback)Delegate.Combine(playSkeeBall2.BallPlayed, new PlaySkeeBall.BallPlayedCallback(PlayBallReaction));
}
}

private void UnRegisterCallbacks()
{
if (base.Target.SimPlayingSkeeBall != null && PlayerToTableMap.ContainsKey(base.Target.SimPlayingSkeeBall))
{
PlaySkeeBall currentPlayerInteraction = PlayerToTableMap[base.Target.SimPlayingSkeeBall].CurrentPlayerInteraction;
PlaySkeeBall playSkeeBall = currentPlayerInteraction;
playSkeeBall.GameComplete = (PlaySkeeBall.GameCompleteCallback)Delegate.Remove(playSkeeBall.GameComplete, new PlaySkeeBall.GameCompleteCallback(PlayGameReaction));
PlaySkeeBall playSkeeBall2 = currentPlayerInteraction;
playSkeeBall2.BallPlayed = (PlaySkeeBall.BallPlayedCallback)Delegate.Remove(playSkeeBall2.BallPlayed, new PlaySkeeBall.BallPlayedCallback(PlayBallReaction));
}
}

public void WatchLoop(StateMachineClient smc, LoopData loopData)
{
switch (mQueuedReaction)
{
case ReactionQueueType.Negative:
if (RandomUtil.RandomChance(60f))
{
base.AnimateSim("Boo");
}
else
{
base.AnimateSim("Clap");
}
break;
case ReactionQueueType.Positive:
if (RandomUtil.RandomChance(60f))
{
if (RandomUtil.CoinFlip())
{
base.AnimateSim("Clap");
}
else
{
base.AnimateSim("Cheer");
}
}
break;
case ReactionQueueType.VeryPositive:
if (RandomUtil.CoinFlip())
{
base.AnimateSim("Clap");
}
else
{
base.AnimateSim("Cheer");
}
break;
}
mQueuedReaction = ReactionQueueType.None;
PlaySkeeBall playSkeeBall = null;
if (base.Target.SimPlayingSkeeBall != null && PlayerToTableMap.ContainsKey(base.Target.SimPlayingSkeeBall))
{
playSkeeBall = PlayerToTableMap[base.Target.SimPlayingSkeeBall].CurrentPlayerInteraction;
}
if (playSkeeBall != null && !playSkeeBall.EndedGamePrematurely)
{
return;
}
base.Actor.InteractionQueue.CancelInteraction(base.Id, ExitReason.CanceledByScript);
UnRegisterCallbacks();
}

private void PlayGameReaction(bool playerAchievedGoal)
{
if (playerAchievedGoal)
{
mQueuedReaction = ReactionQueueType.VeryPositive;
}
else
{
mQueuedReaction = ReactionQueueType.Negative;
}
}

private void PlayBallReaction(SkeeBallPointValue ballScore)
{
if (ballScore != SkeeBallPointValue.FiveThousand && ballScore != SkeeBallPointValue.TenThousand)
{
return;
}
mQueuedReaction = ReactionQueueType.Positive;
}
}

private sealed class WatchCurrentPlayer : SocialInteraction
{
private sealed class Definition : InteractionDefinition<Sim, Sim, WatchCurrentPlayer>
{
protected override string GetInteractionName(Sim actor, Sim target, InteractionObjectPair iop)
{
return LocalizeString(actor.IsFemale, "WatchSkeeBall");
}

protected override bool Test(Sim a, Sim b, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
if (a == b)
{
return false;
}
return PlayerToTableMap.ContainsKey(b);
}

protected override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters)
{
InteractionInstance interactionInstance = base.CreateInstance(ref parameters);
interactionInstance.Hidden = true;
return interactionInstance;
}
}

public static readonly InteractionDefinition Singleton = new Definition();

protected override bool Run()
{
SkeeBall target = sPlayerToTableMap[base.Target];
InteractionInstance instance = WatchSkeeBall.Singleton.CreateInstance(target, base.Actor, base.mPriority, base.Autonomous, true);
base.Actor.InteractionQueue.PushAsContinuation(instance, true);
return true;
}
}

public sealed class PlaySkeeBall : Interaction<Sim, SkeeBall>
{
public delegate void GameCompleteCallback(bool playerAchievedGoal);

public delegate void BallPlayedCallback(SkeeBallPointValue ballScore);

private sealed class Definition : InteractionDefinition<Sim, SkeeBall, PlaySkeeBall>
{
protected override string GetInteractionName(Sim actor, SkeeBall target, InteractionObjectPair iop)
{
if (target.LotCurrent.IsCommunityLot)
{
return LocalizeString(actor.IsFemale, "PlayCommunitySkeeBall", kCostToOperate);
}
return LocalizeString(actor.IsFemale, "PlaySkeeBall");
}

protected override bool Test(Sim a, SkeeBall target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
if (a.IsSelectable && target.LotCurrent.IsCommunityLot && a.FamilyFunds < kCostToOperate)
{
greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(LocalizeString(a.IsFemale, "InsufficientFunds"));
return false;
}
return target.SimPlayingSkeeBall == null;
}
}

private bool mShouldExitGameLoop;

private bool mGameTerminatedNaturally;

private int mBallsPlayed;

private SkeeBallPointValue mScore;

public GameCompleteCallback GameComplete;

public BallPlayedCallback BallPlayed;

public static readonly InteractionDefinition Singleton = new Definition();

public bool EndedGamePrematurely => mShouldExitGameLoop;

protected override bool Run()
{
DateAndTime a = default(DateAndTime);
if (base.Target.SimPlayingSkeeBall != null)
{
return false;
}
base.Target.SimPlayingSkeeBall = base.Actor;
if (base.Actor.IsSelectable && base.Target.LotCurrent.IsCommunityLot && base.Actor.FamilyFunds < kCostToOperate)
{
base.Target.SimPlayingSkeeBall = null;
return false;
}
if (!base.Target.SimLine.WaitForTurn(this, SimQueue.WaitBehavior.DefaultEvict, ExitReason.Default, kTimeToWaitToEvict))
{
return false;
}
if (!base.Actor.DoRoute(base.Target.PlayerSpotJig.RouteToJigA(base.Actor)))
{
base.Target.SimPlayingSkeeBall = null;
return false;
}
base.Actor.SkillManager.AddElement(SkillNames.ArcadeMachine);
base.StandardEntry();
base.BeginCommodityUpdates();
PreLoop(ref mScore, ref a);
while (true)
{
if (mShouldExitGameLoop)
{
break;
}
if (base.Actor.IsSelectable && base.Target.LotCurrent.IsCommunityLot && base.Actor.FamilyFunds < kCostToOperate)
{
break;
}
base.EnterStateMachine("PlaySkeeBall", "Enter", "x", "skeeball_bm");
base.AnimateSim("Wait");
if (base.Target.LotCurrent.IsCommunityLot)
{
base.Actor.ModifyFunds(-kCostToOperate);
}
base.Target.CumulativeScore = 0;
mBallsPlayed = 0;
base.Target.ScoreIndicatorLevel = SkeeBallScoreIndicatorsLit.None;
base.mCurrentStateMachine.SetParameter("scoreIndicatorState", SkeeBallScoreIndicatorsLit.None);
PlayBall(mBallsPlayed);
while (!base.Actor.HasExitReason(ExitReason.Default))
{
mBallsPlayed++;
SetScoreIndicatorState(base.mCurrentStateMachine);
OnBallPlayed(mScore);
if (mBallsPlayed >= kNumTimesToThrowBalls)
{
mGameTerminatedNaturally = true;
base.Actor.AddExitReason(ExitReason.CanceledByScript);
}
else
{
PlayBall(mBallsPlayed);
}
}
if (base.Cancelled || a <= SimClock.CurrentTime() || base.Actor.HasExitReason(ExitReason.Default))
{
mShouldExitGameLoop = true;
}
base.mCurrentStateMachine.RequestState("x", "Exit");
if (mGameTerminatedNaturally)
{
mGameTerminatedNaturally = false;
base.Actor.RemoveExitReason(ExitReason.CanceledByScript);
int clampedArcadeSkill = GetClampedArcadeSkill(base.Actor);
if (base.Target.CumulativeScore < kScoreForSuccess[clampedArcadeSkill])
{
OnGameComplete(false);
base.Actor.ShowTNSIfSelectable(LocalizeString(base.Actor.IsFemale, "EndSkeeBallFailureTnsMessage", base.Target.CumulativeScore), StyledNotification.NotificationStyle.kGameMessageNegative, ObjectGuid.InvalidObjectGuid, base.Actor.ObjectId);
base.Actor.PlayReaction(ReactionTypes.WhyMe, ReactionSpeed.AfterInteraction);
}
else
{
OnGameComplete(true);
base.Actor.ShowTNSIfSelectable(LocalizeString(base.Actor.IsFemale, "EndSkeeBallSuccessTnsMessage", base.Target.CumulativeScore), StyledNotification.NotificationStyle.kGameMessagePositive, ObjectGuid.InvalidObjectGuid, base.Actor.ObjectId);
base.Actor.PlayReaction(ReactionTypes.Cheer, ReactionSpeed.AfterInteraction);
}
base.Target.SetGeometryState(GeoStateNames[0]);
}
}
base.EndCommodityUpdates(true);
base.StandardExit();
base.Actor.RemoveInteractionByType(WatchCurrentPlayer.Singleton.GetType());
base.Target.RemoveInteractionByType(WatchSkeeBall.Singleton.GetType());
PlayerToTableMap.Remove(base.Actor);
base.Target.mCurrentPlayerInteraction = null;
base.Target.SimPlayingSkeeBall = null;
base.Target.SetGeometryState(GeoStateNames[0]);
return true;
}

private void SetScoreIndicatorState(StateMachineClient smc)
{
int cumulativeScore = base.Target.CumulativeScore;
int num = kScoreIndicatorValues.Length - 1;
while (true)
{
if (num >= 0)
{
if (cumulativeScore < kScoreIndicatorValues[num])
{
num--;
continue;
}
break;
}
return;
}
if ((int)base.Target.ScoreIndicatorLevel != num)
{
if (num == kScoreIndicatorValues.Length - 1)
{
Audio.StartObjectSound(base.Target.ObjectId, "sting_skee_ball_high_score", false);
}
else
{
Audio.StartObjectSound(base.Target.ObjectId, "sting_skee_ball_score", false);
}
base.Target.ScoreIndicatorLevel = (SkeeBallScoreIndicatorsLit)num;
base.Target.SetGeometryState(GeoStateNames[num + 1]);
base.mCurrentStateMachine.SetParameter("scoreIndicatorState", base.Target.ScoreIndicatorLevel);
}
}

private void PreLoop(ref SkeeBallPointValue score, ref DateAndTime timeToStop)
{
PlayerToTableMap.Add(base.Actor, base.Target);
base.Target.mCurrentPlayerInteraction = this;
base.Actor.RemoveInteractionByType(WatchCurrentPlayer.Singleton.GetType());
base.Actor.AddInteraction(WatchCurrentPlayer.Singleton);
base.Target.RemoveInteractionByType(WatchSkeeBall.Singleton.GetType());
base.Target.AddInteraction(WatchSkeeBall.Singleton);
timeToStop = SimClock.Add(SimClock.CurrentTime(), TimeUnit.Minutes, (float)kMaxTimeToPlay);
}

private void PlayBall(int ballsThrown)
{
mScore = GetSkeeBallPointValue(base.Actor);
base.Target.CumulativeScore += GetPointScore(mScore);
base.mCurrentStateMachine.SetParameter("pointValue", mScore);
base.mCurrentStateMachine.RequestState("x", "PlayBall");
EventTracker.SendEvent(EventTypeId.kSkeeBallScore, base.Actor, base.Target);
}

private void OnGameComplete(bool playerAchievedGoal)
{
if (GameComplete != null)
{
GameComplete(playerAchievedGoal);
}
}

private void OnBallPlayed(SkeeBallPointValue ballScore)
{
if (BallPlayed != null)
{
BallPlayed(ballScore);
}
}
}

public const string kScoreIndicatorIncreaseSound = "sting_skee_ball_score";

public const string kScoreIndicatorFullSound = "sting_skee_ball_high_score";

public const string kEndGameSuccessTnsLocalizationKey = "EndSkeeBallSuccessTnsMessage";

public const string kEndGameFailureTnsLocalizationKey = "EndSkeeBallFailureTnsMessage";

public const int kMaxSkillLevel = 10;

private static readonly string sLocalizationKey = "Sims3.Gameplay.Objects.Electronics".Substring(6).Replace('.', '/') + "/SkeeBall";

public static string[] GeoStateNames = new string[6]
{
"Score0",
"Score1",
"Score2",
"Score3",
"Score4",
"Score5"
};

private static Dictionary<Sim, SkeeBall> sPlayerToTableMap = new Dictionary<Sim, SkeeBall>();

private static Dictionary<int, float[]> sScoreChancesBySkill = new Dictionary<int, float[]>();

private int mScore;

private WatcherLocation mNextWatcherLocation;

private Sim mSimPlayingSkeeBall;

private SocialJigOnePerson mPlayerSpotJig;

private SkeeBallScoreIndicatorsLit mIndicatorState;

private SimQueue Line = new SimQueue(SimQueue.WaitLocation.DoorOutsideRoomOfTarget, 2);

private PlaySkeeBall mCurrentPlayerInteraction;

[Tunable]
[TunableComment("Time to wait to evict a lower priority Sim from this object, in Sim minutes")]
private static float kTimeToWaitToEvict = 15f;

[TunableComment("After this amount of time a Sim will not begin a new game, in Sim minutes")]
[Tunable]
private static int kMaxTimeToPlay = 60;

[TunableComment("Number of balls to play per interaction")]
[Tunable]
private static int kNumTimesToThrowBalls = 10;

[Tunable]
[TunableComment("Cost to play a game of kNumTimesToThrowBalls balls")]
private static int kCostToOperate = 100;

[Tunable]
[TunableComment("Description: The chances that a sim with an Arcade skill of 0 would land a ball in each hole. The first index is a miss. The last index is 10,000 points.")]
private static float[] kBeginnerSimScoreChances = new float[7]
{
15f,
25f,
25f,
15f,
10f,
5f,
5f
};

[TunableComment("Description: The chances that a sim with an Arcade skill of 10 would land a ball in each hole. The first index is a miss. The last index is 10,000 points.")]
[Tunable]
private static float[] kProfessionalSimScoreChances = new float[7]
{
5f,
5f,
10f,
25f,
25f,
15f,
15f
};

[TunableComment("Description: These are the values at which the score indicator for the game will increase the number of lights that are lit up.")]
[Tunable]
private static int[] kScoreIndicatorValues = new int[5]
{
5000,
10000,
15000,
25000,
40000
};

[Tunable]
[TunableComment("Description: These values indicate the score that a sim must meet (based on skill levels 0-10) in order to be \"Successful\" in the game.")]
private static int[] kScoreForSuccess = new int[11]
{
6000,
7000,
8000,
9000,
10000,
11000,
12000,
13000,
20000,
25000,
35000
};

public override SimQueue SimLine => Line;

public int CumulativeScore
{
get
{
return mScore;
}
set
{
mScore = value;
}
}

public SkeeBallScoreIndicatorsLit ScoreIndicatorLevel
{
get
{
return mIndicatorState;
}
set
{
mIndicatorState = value;
}
}

public Sim SimPlayingSkeeBall
{
get
{
return mSimPlayingSkeeBall;
}
set
{
if (mSimPlayingSkeeBall != null && value == null)
{
DestroyJigs();
}
else if (mSimPlayingSkeeBall == null && value != null)
{
CreateAndPlaceJigs();
}
mSimPlayingSkeeBall = value;
}
}

public SocialJigOnePerson PlayerSpotJig => mPlayerSpotJig;

public static Dictionary<Sim, SkeeBall> PlayerToTableMap => sPlayerToTableMap;

public PlaySkeeBall CurrentPlayerInteraction
{
get
{
return mCurrentPlayerInteraction;
}
set
{
mCurrentPlayerInteraction = value;
}
}

public WatcherLocation NextWatcherLocation
{
get
{
return mNextWatcherLocation;
}
set
{
mNextWatcherLocation = value;
}
}

private static string LocalizeString(bool isFemale, string name, params object[] parameters)
{
return Localization.LocalizeString(isFemale, sLocalizationKey + ":" + name, parameters);
}

private static void CreateScoreChanceArrays()
{
sScoreChancesBySkill.Add(0, kBeginnerSimScoreChances);
sScoreChancesBySkill.Add(10, kProfessionalSimScoreChances);
for (int i = 1; i < 10; i++)
{
float[] array = new float[7];
for (int j = 0; j < kBeginnerSimScoreChances.Length; j++)
{
array[j] = MathHelpers.LinearInterpolate(0f, 1f, kBeginnerSimScoreChances[j], kProfessionalSimScoreChances[j], (float)i / 10f);
}
sScoreChancesBySkill.Add(i, array);
}
}

public override void OnCreation()
{
base.OnCreation();
if (sScoreChancesBySkill.Count == 0)
{
CreateScoreChanceArrays();
}
base.SetGeometryState(GeoStateNames[0]);
}

public override void OnStartup()
{
base.AddInteraction(PlaySkeeBall.Singleton);
if (sScoreChancesBySkill.Count == 0)
{
CreateScoreChanceArrays();
}
}

protected override void DoReset(ResetInformation resetInformation)
{
sPlayerToTableMap.Clear();
sScoreChancesBySkill.Clear();
if (sScoreChancesBySkill.Count == 0)
{
CreateScoreChanceArrays();
}
mIndicatorState = SkeeBallScoreIndicatorsLit.None;
mScore = 0;
mNextWatcherLocation = WatcherLocation.Random;
mSimPlayingSkeeBall = null;
mCurrentPlayerInteraction = null;
base.SetGeometryState(GeoStateNames[0]);
if (mPlayerSpotJig != null)
{
DestroyJigs();
}
base.DoReset(resetInformation);
}

public static SkeeBallPointValue GetSkeeBallPointValue(Sim sim)
{
int clampedArcadeSkill = GetClampedArcadeSkill(sim);
return (SkeeBallPointValue)RandomUtil.GetWeightedIndex(sScoreChancesBySkill[clampedArcadeSkill]);
}

public static int GetClampedArcadeSkill(Sim sim)
{
int num = sim.SkillManager.GetSkillLevel(SkillNames.ArcadeMachine);
if (num == -1)
{
num = 0;
}
if (num > 10)
{
num = 10;
}
return num;
}

public static int GetPointScore(SkeeBallPointValue value)
{
switch (value)
{
case SkeeBallPointValue.OneThousand:
return 1000;
case SkeeBallPointValue.TwoThousand:
return 2000;
case SkeeBallPointValue.ThreeThousand:
return 3000;
case SkeeBallPointValue.FourThousand:
return 4000;
case SkeeBallPointValue.FiveThousand:
return 5000;
case SkeeBallPointValue.TenThousand:
return 10000;
default:
return 0;
}
}
public static bool CreateAndDoRouteForWatchingSkeeBall(IActor Actor, IGameObject Target, SkeeBall machine)
{
float num = 0.6f;
Vector3 vector;
YesOrNo yesOrNo = DetermineLeftOrRightAlignment(Target.ForwardVector, Target.UpVector, out vector, machine);
Route route = Actor.CreateRoute();
Vector3 a = (yesOrNo != YesOrNo.yes) ? ((0f - num) * Vector3.CrossProduct(Target.UpVector, Target.ForwardVector)) : (num * Vector3.CrossProduct(Target.UpVector, Target.ForwardVector));
a += Target.ForwardVector * -2f;
route.PlanToPointRadialRange(Target.Position + a, 0f, 1f, vector.Normalize(), 3.14159274f, RouteDistancePreference.NoPreference, RouteOrientationPreference.TowardsObject, Target.LotCurrent.LotId, new int[1]
{
Target.RoomId
});
return Actor.DoRoute(route);
}

private static YesOrNo DetermineLeftOrRightAlignment(Vector3 forwardVec, Vector3 upVec, out Vector3 alignmentVec, SkeeBall machine)
{
float num = (float)RandomGen.NextDouble();
if (machine.NextWatcherLocation == WatcherLocation.Random)
{
if (RandomGen.NextDouble() > 0.5)
{
alignmentVec = num * Vector3.CrossProduct(upVec, forwardVec) + (1f - num) * forwardVec;
machine.NextWatcherLocation = WatcherLocation.Right;
return YesOrNo.yes;
}
alignmentVec = num * Vector3.CrossProduct(forwardVec, upVec) + (1f - num) * forwardVec;
machine.NextWatcherLocation = WatcherLocation.Left;
return YesOrNo.no;
}
if (machine.NextWatcherLocation == WatcherLocation.Left)
{
alignmentVec = num * Vector3.CrossProduct(upVec, forwardVec) + (1f - num) * forwardVec;
machine.NextWatcherLocation = WatcherLocation.Random;
return YesOrNo.yes;
}
alignmentVec = num * Vector3.CrossProduct(forwardVec, upVec) + (1f - num) * forwardVec;
machine.NextWatcherLocation = WatcherLocation.Random;
return YesOrNo.no;
}

private void CreateAndPlaceJigs()
{
Vector3 positionOfSlot = Slots.GetPositionOfSlot(base.ObjectId, 824351308u);
mPlayerSpotJig = (GlobalFunctions.CreateObjectOutOfWorld("SocialJigOnePerson") as SocialJigOnePerson);
mPlayerSpotJig.PlaceJig(positionOfSlot, Position);
}

private void DestroyJigs()
{
mPlayerSpotJig.Destroy();
mPlayerSpotJig = null;
}

public override bool HandToolAllowPlacementInSlot(IGameObject objectToPlaceInSlot, Slot slot, AdditionalSlotPlacementCheckResults checks)
{
return false;
}
}

I haven't installed Showtime yet that has introduced skeeball into the game and i'm still trying to figure out to install Sims 3 without Origin always running in the background running whenever I feel like playing again.

Usually yes in the test bool in the definition class is where we change the age restriction. I did that in my Enhanced Witches mod. But in this interaction the code doesn't have any age restriction at all. And there's no ITUN file for this interaction n the gameplaydata.package either, atleast I couldn't find it.This usually means that the socialdata.xml files have the data. But I couldn't find any skeeball interaction in those either.
Well anyway, you can still copy the interaction that EA made. The code you PMd me just now. Copy the class and paste it in your own script. After that add this interaction to the skeeball machine.These two tutorials will help you http://www.simlogical.com/ContentUp..._script_mod.pdf and http://www.modthesims.info/showthread.php?t=491875
Don't forget to change the name of the interaction in your script to make it more unique.(This is not really necessary but recommended) like change the class name from WatchSkeeball to WatchSkeeBall_SquidConqueror and in the class definition For eg. instead of private sealed class Definition : InteractionDefinition<Sim, SkeeBall, WatchSkeeBall> Make it private sealed class Definition : InteractionDefinition<Sim, SkeeBall, WatchSkeeBall_SquidConqueror>
Do this and show me the final code in the forum. Don't post the code through PM. Makes it difficult to read. It's easier to read in the forum. And also wrap the code in the wrap code tag like this
Code:
Hello

Makes it a lot easier for me to read.[/QUOTE]
Pushing the interaction is easy enough. I've already done it in my More real vampires version 2 mod. You can checkout the code for it if you want. I can explain more if you don't understand.[/QUOTE]
How did you learn how to do it? I'm interested in learning more about it and I'm glad that you had figured it all out.[/QUOTE]
In Sims 3 late night there's an interaction called convince to... You can convince other Sims to flirt or kiss or be mean to other Sims. That's how I learned how to push an interaction. There's also a moodlet from the love charm in supernatural which pushes Sims to kiss upon socializing. Learning those two codes is how I learned how to push interactions.[/QUOTE]

Me:That's awesome. Is there a way that I could examine the code for research?

You can check in .Net Reflector or ILSpy the same way you searched for the skeeball code. You can also download this mod http://modthesims.info/download.php?t=597392 . It's my Vampire mod. You can extract the .DLL file and open it with .Net Reflector ILspy. You can see how I pushed the interactions.

Oh and if you're looking at EA's convince to interaction Keep in mind that the convince to.. interaction is called YouShould in the code.

Me:I couldn't find the dll file in your mod.

If you open the More Real Vampires flavor 1(or 2 or 3...5) with S3PE there will be an S3SA file. Right click on it and an option appears in the menu Export .DLL file. Click that and choose a destination folder to export the dll file. After that open the .DLL file with ILSpy or .NET Reflector.

Me:Okay I opened up the dll file in ILSpy but what I got is this.

// C:\Users\wgame\Desktop\Sims 3 Projects\Custom dll\NewBuff.dll
// NewBuff, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// Global type: <Module>
// Architecture: x86
// Runtime: .NET 2.0

using Sims3.SimIFace;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("NewBuff")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NewBuff")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: Tunable]
[assembly: ComVisible(false)]
[assembly: Guid("6108f643-eebd-4fb2-b2fb-c14cac48b8e9")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]

I myself don't use ILSPY but there should be an option to check the code in the namespaces and classes and the code I used.

Me:I'm sorry but what exactly are namespaces and classes?

They're like blocks of code. Namespaces have classes inside. And classes can be used for many different things. Interactions usually have a class of their own.
A lot of people use ILSPY. You should ask in the forums and give screenshots. I can help better too if I can see the screen myself.

Me:I figured it out but how do you do the actual editing? In Visual Studios?

We don't really edit them. We make our own DLL then put it inside S3PE and then add it to mods/packages folder to load it in the game.
Directly editing the DLL is how core mods are done. Which are difficult to do. There are very few core mods as a result. Error trap, Awesome mod and XCAS sliders are probably the only core mods people have heard of.
Check out this tutorial http://modthesims.info/wiki.php?tit..._Studio_project and then this http://modthesims.info/wiki.php?tit...ripting_Modding to get started on making your own Script mod. After that try this one http://www.modthesims.info/showthread.php?t=491875 to learn how to add interactions in the pie menu.
Check them out and if you have doubts let me know.

Me:Thank you so much for your help. So basically I just use Visual Studio to edit or make my dll. Is that correct. I had already set up Visual Studio ready for coding and I pasted the Skeeball script in it but I still hadn't installed Showtime yet because I have no need for it right now but I'll install it soon so I can make my child-enabled Skeeball script.


Pretty much but you can edit only your own DLL not EA's DLL. EA's DLL are added as reference in your own project in visual studio but no direct changes can be made on them using visual studio.

Me: Is there a way that I could add the EA DLL references to my mod and was that mentioned in one of the tutorials that you had linked to me. I'm sorry for asking so questions there are just so many things that I need to learn about this.

You have to add EA DLLs as reference in your own mod. The very first tutorial link I gave you tells you how to do this. The second link also shows but not as detailed I think.

That's all the messages I had got from him so far. I had removed some of the more personal stuff out of respect for him.

If you are ever interested in making animations for Sims 2 then I have some messages from Ankoyume that I could send to you who told me how she had made her animations in her In and Out Mod which was pretty helpful. Perhaps you could use that info to make more animations for Sims 2.
Trainee Moderator
staff: trainee moderator
Original Poster
#29 Old 23rd Aug 2018 at 10:59 PM
Quote: Originally posted by Squidconqueror
Alright here they go. I'm posting them in an easy to read format so they won't be that confusing to read. I don't know how to put a spoiler tag on this post but I would if I knew how to.




Squidconqueror so sorry for late reply. Disabling can be done through the script or with an ITUN. I use ITUN but you can use script too. If you're using ITUN cahnage the <Disallow DisallowAutonomous="False" DisallowUserDirected="False" DisallowPlayerSim="False" /> to false. These will be usually true. Making them false will disable the interaction.
Removing it with script I'm forgetting but it's something like sim.RemoveInteraction() or something like that.[/infobutton]


That's all the messages I had got from him so far. I had removed some of the more personal stuff out of respect for him.

If you are ever interested in making animations for Sims 2 then I have some messages from Ankoyume that I could send to you who told me how she had made her animations in her In and Out Mod which was pretty helpful. Perhaps you could use that info to make more animations for Sims 2.[/QUOTE]

-------

Ah, thanks, looks very complicating to me, but I do understand little bits of coding.

I never thought of making animations for Sims 2, since I think you need Milkshape, which you have to pay for (though there's a free trial but I've already used it) plus, the 3D viewport is really sensitive and buggy.
And I'm not too interested in Sims 2 anymore, I rarely play it now...

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Scholar
#30 Old 23rd Aug 2018 at 11:16 PM
Quote: Originally posted by TheSweetToddler
I never thought of making animations for Sims 2, since I think you need Milkshape, which you have to pay for (though there's a free trial but I've already used it) plus, the 3D viewport is really sensitive and buggy.
And I'm not too interested in Sims 2 anymore, I rarely play it now...

Ah it's not really that bad once you get the hang of it. I have the full version of Milkshape but you could do by editing the animation files which is what Ankoyume did which is pretty time consuming to get decent results but doable once you get used to it.
Trainee Moderator
staff: trainee moderator
Original Poster
#31 Old 23rd Aug 2018 at 11:37 PM
Quote: Originally posted by Squidconqueror
Ah it's not really that bad once you get the hang of it. I have the full version of Milkshape but you could do by editing the animation files which is what Ankoyume did which is pretty time consuming to get decent results but doable once you get used to it.


Ah, but is the animating similar to in blender? If so, it'll be a piece of cake, I've been animating for a few months now, so I'm pretty fast at it.

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Field Researcher
#32 Old 24th Aug 2018 at 12:14 AM
About kids stretching when doing, attack with the claw.. you made sure the Clip Group number is the same as in Generations ep?
Trainee Moderator
staff: trainee moderator
Original Poster
#33 Old 24th Aug 2018 at 12:17 AM
Quote: Originally posted by Sofmc9
About kids stretching when doing, attack with the claw.. you made sure the Clip instance number is the same as in Generations ep?


Hmm...nope...or not sure, I don't know about the instance number, that's probably what's making the children stretch when performing the attack with claw interaction! Because I have seen that the kids mostly stretch with EP or ST interactions, so the Clip instance number must be wrong then, I hope.

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Field Researcher
#34 Old 24th Aug 2018 at 12:20 AM
Quote: Originally posted by TheSweetToddler
Hmm...nope...or not sure, I don't know about the instance number, that's probably what's making the children stretch when performing the attack with claw interaction! Because I have seen that the kids mostly stretch with EP or ST interactions, so the Clip instance number must be wrong then, I hope.


Oops, I meant the Group number not instance Skydome explained that when we convert animations from expansion packs the group number of the Clip files needs to match the ep group number.
Trainee Moderator
staff: trainee moderator
Original Poster
#35 Old 24th Aug 2018 at 12:26 AM
Quote: Originally posted by Sofmc9
Oops, I meant the Group number not instance Skydome explained that when we convert animations from expansion packs the group number of the Clip files needs to match the ep group number.


Ah, don't know about the group number either lol, so what do I have to do for the Clip files to match with the EP?

Edit: ah, I see a number on the cat's clip file to play in the toilet, it's 48, and mine are just 0s
Another Edit: So I see, I'll need to change mine to 48 too, thank you so much for telling me! These will probably work now, and our little tots might be able to finally play in the toilet...

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Field Researcher
#36 Old 24th Aug 2018 at 12:39 AM
Quote: Originally posted by TheSweetToddler
Ah, don't know about the group number either lol, so what do I have to do for the Clip files to match with the EP?

Edit: ah, I see a number on the cat's clip file to play in the toilet, it's 48, and mine are just 0s
Another Edit: So I see, I'll need to change mine to 48 too, thank you so much for telling me! These will probably work now, and our little tots might be able to finally play in the toilet...


Great!
Yes, for example, the Base game Clip files Group number is always 0x0000+ and Ep Clip group numbers are different. The converted animation has to match the ep group number.
Trainee Moderator
staff: trainee moderator
Original Poster
#37 Old 24th Aug 2018 at 12:41 AM
Quote: Originally posted by Sofmc9
Great!
Yes, for example, the Base game Clip files Group number is always 0x0000+ and Ep Clip group numbers are different.


That's awesome, that's probably why the toddler and children were always stretching when doing certain interactions like attack claw, play in toilet..etc.
I can't thank you enough, this has solved so many problems I've had, such as other interactions I've tried to do.

Edit: But one strange thing I still can't figure out is, why do like, children still stretch when they are being picked up? ...

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Field Researcher
#38 Old 24th Aug 2018 at 1:21 AM
Aw, welcome. I wouldn't know if it weren't for Skydome. ; )

No idea. Children should shrink to toddlers size. :/
Trainee Moderator
staff: trainee moderator
Original Poster
#39 Old 24th Aug 2018 at 1:47 AM
Quote: Originally posted by Sofmc9
Aw, welcome. I wouldn't know if it weren't for Skydome. ; )

No idea. Children should shrink to toddlers size. :/


Yep, I thank Skydome too, I just tested the interactions out and they work

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Scholar
#40 Old 24th Aug 2018 at 2:02 AM
It seems like you had gotten this all taken care of. Good luck with this mod. I'm really looking forward to watching the toddlers actually play in the toilet and not just stretch and stand idle the whole time. With each mod you make you make this game a bit better and as for my dream Skeeball mod that enables children to play it I guess I would ask Skydome some more questions about that once he gets his computer problem sorted out. I had finally got a hold of my dad this morning and told him about the faulty charger. He had said that he would send me a new one after he gets the proper information from me about the charger model. In the meantime I had found an old charger that he gave me that came with the last laptop that didn't last that long last summer which doesn't really charge my laptop but at least it keeps the power in the laptop that should hold me over until the new one arrives. So I guess everything worked well for all of us in the end which i'm really glad it did for you. I'll still be on your side even though I may not be that much help to you due to my limited knowledge about these kind of things.
Scholar
#41 Old 24th Aug 2018 at 2:06 AM
Quote: Originally posted by TheSweetToddler
Ah, but is the animating similar to in blender? If so, it'll be a piece of cake, I've been animating for a few months now, so I'm pretty fast at it.

Yes it's very similar but different at the same time. Well I guess it's time for me to finally lay back and watch Toonami while I wait for the classic Nick streaming site to work again.
Trainee Moderator
staff: trainee moderator
Original Poster
#42 Old 24th Aug 2018 at 11:31 AM
Quote: Originally posted by Squidconqueror
It seems like you had gotten this all taken care of. Good luck with this mod. I'm really looking forward to watching the toddlers actually play in the toilet and not just stretch and stand idle the whole time. With each mod you make you make this game a bit better and as for my dream Skeeball mod that enables children to play it I guess I would ask Skydome some more questions about that once he gets his computer problem sorted out. I had finally got a hold of my dad this morning and told him about the faulty charger. He had said that he would send me a new one after he gets the proper information from me about the charger model. In the meantime I had found an old charger that he gave me that came with the last laptop that didn't last that long last summer which doesn't really charge my laptop but at least it keeps the power in the laptop that should hold me over until the new one arrives. So I guess everything worked well for all of us in the end which i'm really glad it did for you. I'll still be on your side even though I may not be that much help to you due to my limited knowledge about these kind of things.


Yep, I'm happy about it, I just have to fix the locations now (toddler goes through toilet a bit), and I do hope your dream comes true, like mine did
That's great you're getting a new charger, and you can sure still be on my side, you did help me a little bit at least

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Scholar
#43 Old 24th Aug 2018 at 1:25 PM
Quote: Originally posted by TheSweetToddler
Yep, I'm happy about it, I just have to fix the locations now (toddler goes through toilet a bit), and I do hope your dream comes true, like mine did
That's great you're getting a new charger, and you can sure still be on my side, you did help me a little bit at least

Ha thank you. I'm glad that things are working okay for you. What seemed to the problem with the mod that you had fixed?
Trainee Moderator
staff: trainee moderator
Original Poster
#44 Old 24th Aug 2018 at 3:14 PM
Quote: Originally posted by Squidconqueror
Ha thank you. I'm glad that things are working okay for you. What seemed to the problem with the mod that you had fixed?


The group number, mine was set to basegame's and I changed it to pets.

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Scholar
#45 Old 24th Aug 2018 at 6:56 PM
Quote: Originally posted by TheSweetToddler
The group number, mine was set to basegame's and I changed it to pets.

How did you know what number to change it to for it to match Pets?
Trainee Moderator
staff: trainee moderator
Original Poster
#46 Old 24th Aug 2018 at 9:16 PM
Quote: Originally posted by Squidconqueror
How did you know what number to change it to for it to match Pets?


If you import one of EA's animations from Pets, you'll see a number in the group number, the basegame's just 0s, Generations is I think 38, Pets is 48 and Seasons is 78. I don't know the others since I haven't made an animation from another EP.

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Scholar
#47 Old 24th Aug 2018 at 11:47 PM
Quote: Originally posted by TheSweetToddler
I use the in-game camera to capture the pictures, but to capture the UI or other I use Fraps, the color comes out fine when taking pictures in-game with Fraps.


I think if you go to camera setting and enable capture UI then it'll do the trick with just the in game camera.

Oh and OBS recorder lets you record for as long as you want.

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Scholar
#48 Old 24th Aug 2018 at 11:59 PM
Quote: Originally posted by Squidconqueror
using ITUN cahnage the <Disallow DisallowAutonomous="False" DisallowUserDirected="False" DisallowPlayerSim="False" /> to false.


Oops I got this confused. You're supposed to change it to True if you want to Disallow not false. False enables it. I always confuse them

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Trainee Moderator
staff: trainee moderator
Original Poster
#49 Old 25th Aug 2018 at 12:20 AM
Quote: Originally posted by skydome
I think if you go to camera setting and enable capture UI then it'll do the trick with just the in game camera.

Oh and OBS recorder lets you record for as long as you want.


Quote: Originally posted by skydome
Oops I got this confused. You're supposed to change it to True if you want to Disallow not false. False enables it. I always confuse them


Ah yes, I forgot about that, that's a better option.

I knew something about that wasn't right lol

- When one gets inspired by the other, the one inspires another - Anything is Possible.

You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Page 2 of 2
Back to top