Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

New Creator Theme: Elders! - posted on 1st Sep 2018 at 11:43 AM
Replies: 6 (Who?), Viewed: 2438 times.
Forum Resident
Original Poster
#1 Old 1st Jul 2018 at 7:16 PM
Default Mods that add moodlets added by other mods.
Gaybie's potion mod got me thinking and making a mod that adds other potions...
Lets say i wanted to make a mod that adds a potion that adds certain moodlets to a sim. Easy Peazy, just follow Gabie's XML tuning mod.
But ah, now I want to make a potion that gives a sim a moodlet that isn't an EA moodlet.
How would I do that? I've tried and it doesn't work. I think the namespace is different so it can't find the moodlet.

Sims are better than us.
Advertisement
Forum Resident
Original Poster
#2 Old 2nd Jul 2018 at 3:58 AM
Well, made some interesting new (not replacement) potions, like one to give the alien abduction pregnancy. Potion doesn't work on female sims, which I didn't anticipate. If there is an EA moodlet, you can make a potion for it. I can do EA moodlets and EA commodities all day long.
Doesn't look like the same can be done with the chemist bench - those are done in a script mod not an XML mod.
Then I screwed up the mod and messed up my game. This is why there are things like "git". Gonna have to start over.

Sims are better than us.
Forum Resident
Original Poster
#3 Old 3rd Jul 2018 at 5:01 PM
My sim is starting an alien invasion with his "Alien Abduction Pregnancy" potion. He just throws 'em at every young adult and adult man on the street.
Yep, the town's goin' green...

Sims are better than us.
Site Helper
DELETED POST
4th Jul 2018 at 3:38 PM
This message has been deleted by Ghost sdoj. Reason: never mind: I didn't read
Instructor
#4 Old 7th Jul 2018 at 2:38 PM
I don't know if you can add custom moodlets through xml. I think you'll have to add the hash of the moodlet that is created by the modder

Code:
public class BuffUnluckyCustom : Buff
{
private const ulong kCustomBadLuckBuffGuid = 0x0822598C6222E445;
public static ulong StaticGuid
{
get
{
return 0x0822598C6222E445;
}
}


And this is the xml for the moodlet

Code:
<BuffList>
<Hex>CustomBadLuckBuff=0x0822598C6222E445</Hex>
<BuffName>FeelingUnlucky</BuffName>
<BuffDescription>FeelingUnluckyDescription</BuffDescription>
<ThumbFilename>moodlet_feelingUnlucky</ThumbFilename>
<AxisEffected>None</AxisEffected>
<EffectValue>-30</EffectValue>
<TimeoutLength>360</TimeoutLength>
<CustomClassName>EnhancedWitchMoodlets.BuffUnluckyCustom,Skydome_KidsMagic</CustomClassName>
</BuffList>
</buffs_WitchEnhanced>



So if you have my Enhanced Witches mod installed. Try adding 0x0822598C6222E445 instead of the EA moodlet. If that doesn't work try CustomBadLuckBuff or CustomBadLuckBuff=0x0822598C6222E445.
If you try this let me know how it went.
Good luck and Happy Simming
Forum Resident
Original Poster
#5 Old 12th Jul 2018 at 6:19 PM
i see the Hex and custom class names in the mod with the modlets, as well as the hex call outs in the mod's dll.
But what I want to know is how to add this buff in a potion XML..
I've tried adding the <Hex> and <CustomClassName> entries, using the appropriate entries. That didn't work.
Example of potion XML that adds the nausea buff...
<AlchemyRecipes>
<Key>NauseaPotion</Key>
<Name>NauseaPotion</Name>
<Description>NauseaPotionDesc</Description>
<Category>PotionDrink</Category>
<SpellcraftSkillLevel>1</SpellcraftSkillLevel>
<DisallowedOccults>Robot</DisallowedOccults>
<ServicesAllowed>Babysitter,Butler,Maid,Repairman</ServicesAllowed>
<ActiveRolesAllowed>Paparazzi,Tourist,Explorer,FutureHobo</ActiveRolesAllowed>
<InactiveRolesAllowed>Paparazzi,Tourist,Explorer,GenericMerchant,PotionShopMerchant,LocationMerchant,SpecialMerchant,PetStoreMerchant,Pianist,FutureHobo</InactiveRolesAllowed>
<MedatorName>alchemyPotionSquare</MedatorName>
<ModelName>alchemyPotionSquare</ModelName>
<MaterialName>Green</MaterialName>
<IdleVFX>ep7PotionGlowG_main</IdleVFX>
<ThrowAtSimThrowerVFX>ep7PotionThrowSquare_main</ThrowAtSimThrowerVFX>
<ThrowAtSimTargetVFX>ep7PotionThrowGreen_main</ThrowAtSimTargetVFX>
<CreationCauldronBubbleVFX>ep7CauldronBubbleG_main</CreationCauldronBubbleVFX>
<Price>16</Price>
<CreationSpellcraftSkillPoints>500</CreationSpellcraftSkillPoints>
<Ingredient1>Insect:Any</Ingredient1>
<BenefitValue>-3</BenefitValue>
<Effect1>Buff,Nauseous</Effect1>
<EffectTNS>NauseaPotionEffectTNS</EffectTNS>
<EffectThrowAtTNS>ThrowAtSimNauseaPotionEffectTNS</EffectThrowAtTNS>
</AlchemyRecipes>
DOH!! I forgot to add it to the initial definition XML!! there's no hex in it
It still may not work, but what I did shouldn't work!

Sims are better than us.
Instructor
#6 Old 12th Jul 2018 at 9:24 PM
Oh it didn't work?
Right now I don't have any other ideas. I'll reply again if I can think of something else. Please let us know if you figure it out on your own.
Lab Assistant
#7 Old 13th Jul 2018 at 7:11 AM
You probably need to add the namespace before it. I have no time to look at the code right now, but to understadn what I mean: I think it has to be Skydome.EnhancedWitches.CustomBadLuckBuff, just with the real namespace and classname used.
Back to top