Better Simbot w/ Plumbot Parts Script Development
Hey guys, I think this is the right board to be asking for help. I've been struggling but slowly picking at a project to make a script mod to allow Simbots to use Plumbot parts, while retaining their simbotiness while keeping the Face VFX (Unsure if hoverVFX will be possible to keep), and maybe plumbot unique interactions (Debate plumbot rights etc). I can *sort of* do this with a mastercontroller and a glitch, covered in another thread
here. This method of course only gives the simbot the plumbot body parts. Stuff like the FaceFX (eyes and mouth) will not work.
So far from poking around the site, I've managed to put together a sort of test script. Upon world loading, it scans the town for any Simbots, and apply the censor pixels to them. Something easy and silly to make sure the script is actually doing something.
Unfortunately, this is about where my knowledge of C++ and stuff runs out, not exactly my specialty
Code:
using System;
using System.Collections.Generic;
using System.Text;
using Sims3.Gameplay;
using Sims3.Gameplay.Actors;
using Sims3.Gameplay.Autonomy;
using Sims3.Gameplay.EventSystem;
using Sims3.Gameplay.Interactions;
using Sims3.Gameplay.Utilities;
using Sims3.SimIFace;
using Sims3.UI;
using Sims3.Gameplay.CAS;
using Sims3.Gameplay.ActorSystems;
namespace Twenny
{
public class Splumbots
{
[Tunable]
protected static bool kInstantiator = false;
static Splumbots()
{
World.OnWorldLoadFinishedEventHandler += new EventHandler(OnWorldLoadFinished);
}
private static void OnWorldLoadFinished(object sender, EventArgs e)
{
foreach (Sim sim in Sims3.Gameplay.Queries.GetObjects<Sim>())
{
if (sim != null)
{
SplumbotCheck(sim);
}
}
}
public static void SplumbotCheck(Sim sim)
{
if (sim.SimDescription.IsFrankenstein)
{
MakeSplumbot(sim);
}
}
public static void MakeSplumbot(Sim sim)
{
sim.EnableCensor(Sim.CensorType.FullBody);
}
public static bool Exception(Exception exception)
{
try
{
return ((IScriptErrorWindow)AppDomain.CurrentDomain.GetData("ScriptErrorWindow")).DisplayScriptError(null, exception);
}
catch
{
WriteLog(exception);
return true;
}
}
public static bool WriteLog(Exception exception)
{
try
{
new ScriptError(null, exception, 0).WriteMiniScriptError();
return true;
}
catch
{
return false;
}
}
}
}
Of course, making pretend-naked Simbots is not my goal here, and I'd love to execute more methods (Is that the right terminology?) within the "MakeSplumbot" class (I think its called a class). I poked around in Net Reflector for a while and had found quite a few potentially useful methods.
Sims3.Gameplay.CAS.CASSupernaturalData.Create : I think this is what handles what CAS information is pulled? I tried using this in my MakeSplumbot function like so, but It didn't seem to do anything.
Code:
public static void MakeSplumbot(Sim sim)
{
CASSupernaturalData.Create(Sims3.UI.Hud.OccultTypes.Robot);
}
Sims3.Gameplay.ActorSystems.OccultRobot contains quite a few methods that seem useful, but I can't figure out how I can implement them. Of interest is "StartRobotVFX" but I can't figure out how I would properly implement it into "MakeSplumbot" as that is static, and StartRobotVFX is not static, and visual studio rightfully yells at me if I try to use it.
Sims3.Gameplay.ActorSystems.OccultRobot.SetupInstantiatedSim(Sim owningSim); seems useful as well, atleast for understanding how Plumbots are setup, but I can't figure out how to meaningfully use this one either.
If anyone is able or willing to help and talk me through this (Or if I'm unknowingly taking on the biggest hurdle ever), I would be super duper grateful and happy to work with you. :D