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
Original Poster
#1 Old 9th Feb 2017 at 6:03 PM
(Extremely)Newbie modder with a newb question about script mods
Hello everyone I'm Skydome I recently(4 days ago) started learning how to mod. I've figured out how to make tuning mods fairly quickly cause they're really easy. Now I'm learning script modding which is slightly harder, however I'm not gonna let that deter me from learning. I have a working understanding of C, C++, Java so I'm confident I'll learn with practice you know. I've been reading and learning from the tutorials in this site which have really helped.

Anyway my question is that can I use a script mod to edit a pre existing moodlet. What I wanna edit cannot be done using tuning mod. Moodlet related script tutorial created by NonaMena is no longer available. I probably wouldn't have to ask if it were available.

Basically I wanna make a mod to edit BuffMummysCurse such that the sim won't die when the Buff times out. Now I know there is a function called
public override void OnTimeout(BuffManager bm, BuffInstance bi, Buff.OnTimeoutReasons reason)
and killing of the sim is done using
if (actor.CanBeKilled())
{
actor.Kill(SimDescription.DeathType.MummyCurse);
}

But like how do I make my own script which will edit this pre existing function. In C and C++ we couldn't change the way built-in functions work.

Don't tell me I need a core mod to do something this simple cause that would really suck.
Any help anyone can give will be greatly appreciated.
Advertisement
Site Helper
#2 Old 9th Feb 2017 at 9:49 PM
The downloads and tutorials at simlogical are still intact there, but you have to hunt through the archive linked at the front page to find them.

http://www.simlogical.com/ContentUp...e/uploads/1063/ is NonaMena's Moodlet tutorial which I think you were looking for.

I am Ghost. My husband is sidneydoj. I post, he downloads, and I wanted to keep my post count.
Group for Avatar Makers* Funny Stories *2017 Yearbook
Scholar
Original Poster
#3 Old 9th Feb 2017 at 10:21 PM
Quote: Originally posted by Ghost sdoj
The downloads and tutorials at simlogical are still intact there, but you have to hunt through the archive linked at the front page to find them.

http://www.simlogical.com/ContentUp...e/uploads/1063/ is NonaMena's Moodlet tutorial which I think you were looking for.


Ahh thank you this would be a great help to me . I hope this will teach me enough to edit an already existing moodlet as well as creating new moodlet
Scholar
Original Poster
#4 Old 12th Feb 2017 at 9:21 PM
Hi I'm having a problem with this code BuffManager.ParseBuffData(data, true);
It says BuffManager does not contain a definition for ParseBuffData.
I'm still able to use BuffManager.HasElement or BuffManager.RemoveElement no problem but the ParseBuffData is not appearing.
I'm using Visual Studio 2015 and I've so far successfully created 2 mods. But now this problem is happening.
Can someone plese help???
Inventor
#5 Old 13th Feb 2017 at 1:56 AM
Access Modifiers (C# Programming Guide): All types and type members have an accessibility level, which controls whether they can be used from other code in your assembly or other assemblies.

So I think ParseBuffData() method is private or protected, or maybe you are trying to access a static method from an object.
https://msdn.microsoft.com/en-us/library/ms173121.aspx

Another way is to decompile the dll and recompile it changing all the classes, methods and variables to public so you don't need to worry about it anymore.
Scholar
Original Poster
#6 Old 13th Feb 2017 at 8:34 AM
Quote: Originally posted by douglasveiga
Access Modifiers (C# Programming Guide): All types and type members have an accessibility level, which controls whether they can be used from other code in your assembly or other assemblies.

So I think ParseBuffData() method is private or protected, or maybe you are trying to access a static method from an object.
https://msdn.microsoft.com/en-us/library/ms173121.aspx

Another way is to decompile the dll and recompile it changing all the classes, methods and variables to public so you don't need to worry about it anymore.


Yes you were write I checked BuffManager.cs in .NET Reflector and ParseBuffData() is a private function. So how do I make it public should I decompile Sims3GameplaySystems.dll with ildm.exe (or was it ildsm.exe) like we do when we make core mods?? and then get Visual studio to re-reference Sims3GameplaySystems.dll.

Is my understanding correct?? Is that what I have to do??

Nona Mena uses the ParseBuffData() function in the tutorials and and mods. Other creators have used this function too when making mods.

Any reply will be helpfull.
Inventor
#7 Old 13th Feb 2017 at 9:18 PM
Quote: Originally posted by skydome
Yes you were write I checked BuffManager.cs in .NET Reflector and ParseBuffData() is a private function. So how do I make it public should I decompile Sims3GameplaySystems.dll with ildm.exe (or was it ildsm.exe) like we do when we make core mods?? and then get Visual studio to re-reference Sims3GameplaySystems.dll.

Is my understanding correct?? Is that what I have to do??

Nona Mena uses the ParseBuffData() function in the tutorials and and mods. Other creators have used this function too when making mods.

Any reply will be helpfull.


yes ^ 3
Back to top