Judasace Posted September 24, 2009 Share Posted September 24, 2009 Has anyone ever made a new bobblehead? Not a model, but an item with different effects...like say maing a Damage Resist one, or One that adds to two skills instead of one. If anyone has, I could use a few pointers as to how to go about it, thanks. Link to comment Share on other sites More sharing options...
Cipscis Posted September 24, 2009 Share Posted September 24, 2009 The vanilla bobbleheads are very simple - they're just scripted miscellaneous items. When picked up for the first time, they use ShowMessage, and some AV functions in order to display a message and alter the player's stats. For example, here is the script attached to the Agility bobblehead, after being cleaned up slightly:ScriptName BobbleheadAGLScript ;This is a Bobblehead script for the Collector Bobbleheads located in game ;On pickup, you recieve the motivational phrase and the appropriate buff short DoOnce Begin OnActivate player if DoOnce == 0 set DoOnce to 1 if player.GetPermanentActorValue Agility < 10 player.ModActorValue Agility 1 ;Mod the perm. pool so it sticks endif ShowMessage BobbleheadAGLBuffMessage ;This is the corner buff message Activate ;Allow item pickup set BH01.Carrying to 1 ;Tell the script the player has one or more Bobbleheads (for display case) set BH01.HaveAGL to 1 ;Set the variable for Display Case ModPCMiscStat "Bobbleheads Found" 1 set BH01.Bobbles to BH01.Bobbles + 1 if BH01.Bobbles == 10 AddAchievement 49 elseif BH01.Bobbles == 20 AddAchievement 50 endif endif End When making a new bobblehead, you can ignore all of the code affecting variables in the script attached to "BH01", and possible the AddAchievement stuff too. You could use this code as a template for a new bobblehead script:int bDoOnce Begin OnActivate player if bDoOnce Return else ;if bDoOnce == 0 set bDoOnce to 1 ;Apply effect here ShowMessage <Your Bobblehead Message> Activate ModPCMiscStat "Bobbleheads Found" 1 set BH01.Bobbles to BH01.Bobbles + 1 if BH01.Bobbles == 10 AddAchievement 49 elseif BH01.Bobbles == 20 AddAchievement 50 endif endif End For example, you could use this code in the place of ";Apply effect here" to increment the player's Repair and Small Guns skills by 5 each:if player.ModActorValue Repair 5 player.ModActorValue SmallGuns 5Nice and easy - right? Cipscis Link to comment Share on other sites More sharing options...
Judasace Posted September 24, 2009 Author Share Posted September 24, 2009 Hey, thanks I will see if that works. One thing that I found confusing though was This mod: http://www.fallout3nexus.com/downloads/file.php?id=1560. It reduces the bobblehead skill growth from 10 to 4, but doesn't alter the script. Instead it changes ability functions in the Geck, which seem specially created for each bobblehead. The thing I couldn't see was how these bobblehead skill functions were tied to the bobblehead object. Link to comment Share on other sites More sharing options...
Cipscis Posted September 25, 2009 Share Posted September 25, 2009 I just checked that mod out in the GECK and FO3Edit, and it looks like all of those effects are orphaned. Are you certain that the mod does what it's supposed to do? Cipscis Link to comment Share on other sites More sharing options...
Judasace Posted September 25, 2009 Author Share Posted September 25, 2009 I checked it again and I think you're right, it's just the message part that's working right...it says you've gained 4 points but you're actually getting 10. Thanks! Link to comment Share on other sites More sharing options...
Galahaut Posted September 27, 2009 Share Posted September 27, 2009 Hah, figures that the one mod I didn't even bother to test because I assumed it was so simple would fail so spectacularly. Thanks for noticing (strange that no one else did, including the person who requested the mod in the first place... :confused: ). I'll fix it eventually, but I actually have to reinstall FO3 first (had a computer meltdown resulting in a reformat of the drive that it was on). I've added a note about the mod not working to its page for now. Link to comment Share on other sites More sharing options...
Recommended Posts