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!
Lab Assistant
Original Poster
#1 Old 13th Jul 2017 at 10:30 PM
Default Other ways to write the mods
Whether there is a alternative solution writing mods, except for the way with the programs: ildasm, ilasm and writing mods in visual studio. Now I will explain: The ilasm compiler has great limitations when writing code, it does not allow adding more than 10 strings to the source code, and the project in visual studio does not compile almost anything, and if it compiles something in the game this is not work. Any help is appreciated
Advertisement
Scholar
#2 Old 14th Jul 2017 at 12:26 PM
Regarding Visual Studio, if it's not compiling than there's a problem with your code. It must be giving an error. Last time you were trying to make a very complicated mod when you don't seem as experienced to me. Try out an easier mod from one of the tutorial and see if those are compiling.
Oh and btw have you updated your game to patch 1.67? If you have then get unprotected DLLs from the Nraas github site.
Scholar
#3 Old 14th Jul 2017 at 2:38 PM
What is the error that visual studio is giving?? Upload a screenshot of the error.
Lab Assistant
Original Poster
#4 Old 16th Jul 2017 at 6:26 PM
skydome, If you mean a mod with the removal of a double voice in ghosts in cas, then this is a very complex mod. On account of the error, a screenshot I can not lay out, I have a program in another language is not in English, you are more likely, to not know this language.If I compile this code
Quote:
// Sims3.Gameplay.CAS.CASSim
private void AddRemoveOccultTraits(OccultTypes oldType, OccultTypes newType)
{
if (oldType <= OccultTypes.Genie)
{
if (oldType != OccultTypes.None)
{
if (oldType != OccultTypes.Vampire)
{
if (oldType == OccultTypes.Genie)
{
CASLogic.Instance.ExecuteRemoveTrait(TraitNames.GenieHiddenTrait);
}
}
else
{
CASLogic.Instance.ExecuteRemoveTrait(TraitNames.VampireHiddenTrait);
}
}
}
else if (oldType <= OccultTypes.Ghost)
{
if (oldType != OccultTypes.Werewolf)
{
if (oldType == OccultTypes.Ghost)
{
CASLogic.Instance.ExecuteRemoveTrait(TraitNames.GhostHiddenTrait);
}
}
else
{
CASLogic.Instance.ExecuteRemoveTrait(TraitNames.LycanthropyHuman);
}
}
else if (oldType != OccultTypes.Fairy)
{
if (oldType == OccultTypes.Witch)
{
CASLogic.Instance.ExecuteRemoveTrait(TraitNames.WitchHiddenTrait);
}
}
else
{
CASLogic.Instance.ExecuteRemoveTrait(TraitNames.FairyHiddenTrait);
}
if (newType <= OccultTypes.Genie)
{
if (newType != OccultTypes.None)
{
if (newType == OccultTypes.Vampire)
{
CASLogic.Instance.ExecuteAddTrait(TraitNames.VampireHiddenTrait, true);
return;
}
if (newType != OccultTypes.Genie)
{
return;
}
CASLogic.Instance.ExecuteAddTrait(TraitNames.GenieHiddenTrait, true);
return;
}
}
else if (newType <= OccultTypes.Ghost)
{
if (newType == OccultTypes.Werewolf)
{
CASLogic.Instance.ExecuteAddTrait(TraitNames.LycanthropyHuman, true);
return;
}
if (newType != OccultTypes.Ghost)
{
return;
}
CASLogic.Instance.ExecuteAddTrait(TraitNames.GhostHiddenTrait, true);
return;
}
else
{
if (newType == OccultTypes.Fairy)
{
CASLogic.Instance.ExecuteAddTrait(TraitNames.FairyHiddenTrait, true);
return;
}
if (newType != OccultTypes.Witch)
{
return;
}
CASLogic.Instance.ExecuteAddTrait(TraitNames.WitchHiddenTrait, true);
}
}

I get this error: "Expected class, delegate, enum, interface, or struct"
And if I compile the entire section to which this method belongs, I get the following error: one: "The type or namespace name 'GetPosition' does not exist in the namespace 'namespace' (are you missing an assembly reference?)"
two: "The type or namespace name 'SetPosition' does not exist in the namespace 'namespace' (are you missing an assembly reference?)"
If you know and understand, tell me.
Field Researcher
#5 Old 16th Jul 2017 at 7:52 PM
Quote: Originally posted by whiteman-Dara
skydome, If you mean a mod with the removal of a double voice in ghosts in cas, then this is a very complex mod. On account of the error, a screenshot I can not lay out, I have a program in another language is not in English, you are more likely, to not know this language.If I compile this code
I get this error: "Expected class, delegate, enum, interface, or struct"
And if I compile the entire section to which this method belongs, I get the following error: one: "The type or namespace name 'GetPosition' does not exist in the namespace 'namespace' (are you missing an assembly reference?)"
two: "The type or namespace name 'SetPosition' does not exist in the namespace 'namespace' (are you missing an assembly reference?)"
If you know and understand, tell me.


Is that all you have? You don't have any "using" things at the very top of your code. Where did you get that code from? Copy and paste from ILSpy?
Scholar
#6 Old 19th Jul 2017 at 3:37 PM
So this mod's purpose is to what? Add another occult into CAS? Which occult are you adding?
Scholar
#7 Old 19th Jul 2017 at 3:39 PM
From what the error is saying you're supposed to use some kind of using directive I think.
Lab Assistant
Original Poster
#8 Old 25th Jul 2017 at 3:42 PM
skydome, pjsutton, Thank you for your help, but I have already finalized this mod, but the problem has only been in one mod. The other ones I wanted to create. I understood them and I'm writing at the moment. When changing clothes, ghosts use a greeting, it's with a double voice, also when selecting traits in Audio is used by the echo, that's where it turns off? I found 3 files that have CAS in their own in sections, it's: SimIFace, UI, and GameplaySystems, so there's not much choice.
Back to top