Script Adding Pipboy Crashing

Post » Sat May 28, 2011 5:04 am

I am in the process of making a pretty simple quicker start mod. It tweaks the VCG01 quest a little bit to halt the regular intro, then prompts a bunch of chargen menus and then loads you outside of Doc's house, at which point it sets the correct quests as active and you're good to go.

I'm having one major problem though. When you initially load into the game the player has no Pipboy equipped (despite the VCG001 stage 0 result script removing it, I can find no evidence of why they call for that there). So I need to add and equip the pipboy. Sounds simple right?

Well it's not. Something about running both player.additem pipboy 1 (and the glove) **AND** player.equipitem pipboy (and glove) crashes right to desktop. If I run one but not the other, I don't have that problem (but just running equipitem does not result in you actually having a visible pipboy.

This all happens inside a modified version of the VCG01 quest script. I just stuck an if block in that runs passes for my initialization steps. But at this point I'm stumped.


                   if bPass == 1					GetPlayerName					set bPass to 2				elseif bPass == 2					ShowRaceMenu						set bPass to 3				elseif bPass == 3					SetSPECIALPoints 40					set bPass to 4				elseif bPass == 4					SetTagSkills 3					set bPass to 5				elseif bPass == 5					ShowTraitMenu					set bPass to 6				elseif bPass == 6					;hand out pipboy, items					if IsPlayerTagSkill Guns					   player.additem CondNV9mmPistolLoot 1					   player.additem Ammo9mm75 30					endif					if IsPlayerTagSkill EnergyWeapons   						player.additem CondLaserPistolLoot 1   						player.additem AmmoSmallEnergyCell75 25					endif					if IsPlayerTagSkill Explosives   						player.additem LootNVDynamite75 8					endif					if IsPlayerTagSkill MeleeWeapons   						player.additem CondNVStraightRazorRaider 1					endif					if IsPlayerTagSkill Unarmed   						player.additem CondNVBoxingGloveLoot 1					endif					player.additem VaultSuit21 1					player.equipitem VaultSuit21                                        player.additem pipboy 1                                        player.additem pipboyglove 1                                        player.equipitem pipboy                                        player.equipitem pipboyglove                                        ResetPipBoyManager					set bPass to 7				elseif bPass == 7								ResetPipBoyManager					GSDocMitchellHouseIntDoorREF.Activate Player					;end quests, any other missing init					Set GameHour to 8					AutoDisplayObjectives 0					StopQuest VCG01					StartQuest VMQ01					StartQuest VCG04					Setstage VMQ01 10					AddAchievement 31					AddNote VMQ01CourierNote					set bPass to 8				endif

User avatar
NO suckers In Here
 
Posts: 3449
Joined: Thu Jul 13, 2006 2:05 am

Post » Sat May 28, 2011 6:03 am

This took me forever to figure out, but I eventually did.

The crash is caused by the pipboy processing in GameMode before ResetPipBoyManager is called. What you have to do is both "player.equipitem pipboy" and "ResetPipBoyManager" while the player is in a MenuMode such as the dialogues where FO3 and FNV give it to you normally.

User avatar
Loane
 
Posts: 3411
Joined: Wed Apr 04, 2007 6:35 am

Post » Sat May 28, 2011 6:28 am

This took me forever to figure out, but I eventually did.



Yeah, it actually hit me at work that maybe it would work in a different menu mode instead of gamemode. I'll try adding it during a chargen menu like SPECIAL points or something. Thanks for verifying my suspicions.
User avatar
Damian Parsons
 
Posts: 3375
Joined: Wed Nov 07, 2007 6:48 am


Return to Fallout: New Vegas