RustyXXL Posted May 15, 2016 Share Posted May 15, 2016 As well as a standardized way of implementing the item so that its added after the vault. I still have trouble with that, myself.I'm using Removed - registrator2000 posted a much better version below. In my main Quest Script. Might not be the most elegant solution, but it works, and none of my testers complained about it not working. MQ102 obviously is a questproperty, pointing to MQ102 :wink: Link to comment Share on other sites More sharing options...
Maduin81 Posted May 15, 2016 Share Posted May 15, 2016 As well as a standardized way of implementing the item so that its added after the vault. I still have trouble with that, myself.I'm using Function WaitForPipboy() ; Wait until the Player got his PipBoy. while !MQ102.IsStageDone(6) Utility.Wait(15.0) endWhile Game.GetPlayer().AddItem(SettingsHolotape, 1) endFunction Event onInit() if MQ102.IsStageDone(6) Game.GetPlayer().AddItem(SettingsHolotape, 1) else WaitForPipboy() endif endEvent In my main Quest Script. Might not be the most elegant solution, but it works, and none of my testers complained about it not working. MQ102 obviously is a questproperty, pointing to MQ102 :wink: Oh my god, thank you for that. That's actually really similar to my attempt, except I registered OnLocationChange for leaving the vault to add the item and then unregister the event instead of a while loop.. Of course, the funny thing is that when I go to compare your example to mine, it appears I at some point overwrote the changes and that explains why it wasn't working at all. Lol. I think I'll start using yours, though. It looks a lot more foolproof, I think. Link to comment Share on other sites More sharing options...
RustyXXL Posted May 15, 2016 Share Posted May 15, 2016 Well, it's not perfect, but works quite welll, and shouldn't put to much strain on the scripting engine, as far as I can tell.One potential issue could be, if a player starts a new game with the mod installed and then uninstalls it before getting the pipboy. I'm not sure how the AddItem() under the While loop would behave, and didn't test it. I was more busy with adding functionality, but it might be smart to check if your plugin is still loaded before adding the settings holotape in WaitForPipboy(), just to be safe.Something like: Removed - registrator2000 posted a much better version below. The one in the onInit() should be fine, as it only gets called when the plugin is loaded, but as far as I understand it the WaitForPipboy() stays in the savegame until the the while loop has ended, and therefore the Function finishes, and if I understand it right, this should prevent even this potential problem. Link to comment Share on other sites More sharing options...
Maduin81 Posted May 15, 2016 Share Posted May 15, 2016 Well, it's not perfect, but works quite welll, and shouldn't put to much strain on the scripting engine, as far as I can tell.One potential issue could be, if a player starts a new game with the mod installed and then uninstalls it before getting the pipboy. I'm not sure how the AddItem() under the While loop would behave, and didn't test it. I was more busy with adding functionality, but it might be smart to check if your plugin is still loaded before adding the settings holotape in WaitForPipboy(), just to be safe.Something like: Function WaitForPipboy() ; Wait until the Player got his PipBoy. while !MQ102.IsStageDone(6) Utility.Wait(15.0) endWhile if Game.GetFormFromFile(0x000800, "myplugin.esp") Game.GetPlayer().AddItem(SettingsHolotape, 1) endif endFunction The one in the onInit() should be fine, as it only gets called when the plugin is loaded, but as far as I understand it the WaitForPipboy() stays in the savegame until the the while loop has ended, and therefore the Function finishes, and if I understand it right, this should prevent even this potential problem.Well that should guarantee that the object exists regardless at the time of execution. I'd been checking the script owner itself to make sure the script is valid - if self.GetFormID() == 0 Then calling shutdown functions if true, it seems to work relatively well. Regardless, I think we're steering from topic here. I appreciate the advice (and examples) though, it'll help me out a ton ^_^ Link to comment Share on other sites More sharing options...
ad3d0 Posted May 15, 2016 Share Posted May 15, 2016 (edited) a1a3a6a9 (maker of Don't Call Me Settler) says that after he switched from [] to (), which sorts closer to the top, people stopped complaining about not finding his holotapes.Personally, of all the things inside MISC, settings are what I access the most. Top-sorted seems more useful to me.But more mods use [], so perhaps there's a reason. Is there?Are there any reasons NOT to use (Settings) instead of [settings]? I personally do not use () or [], I just put one empty space before holo-tapes name. (as also isathar does in his PPB mod) This makes it appear on the most top in the misc list. So my suggestion is to use" [settings]" instead. (without quotes ^^) Edited May 15, 2016 by ad3d0 Link to comment Share on other sites More sharing options...
Maduin81 Posted May 15, 2016 Share Posted May 15, 2016 a1a3a6a9 (maker of Don't Call Me Settler) says that after he switched from [] to (), which sorts closer to the top, people stopped complaining about not finding his holotapes.Personally, of all the things inside MISC, settings are what I access the most. Top-sorted seems more useful to me.But more mods use [], so perhaps there's a reason. Is there?Are there any reasons NOT to use (Settings) instead of [settings]? I personally do not use () or [], I just put one empty space before holo-tapes name. (as also isathar does in his PPB mod) This makes it appear on the most top in the misc list. So my suggestion is to use" [settings]" instead. (without quotes ^^) From what I understand, Vald is offering to make a category specifically for the mods to roll up in, which means all the mods that follow this standard might be listed in their own separate inventory page, so putting a space would basically just put your mod on top of everyone else's, which imo would just start an arms race for who can put the most spaces in their name to top out the other mods. The other alternative, if it wasn't shot down, was to call them (Settings) which would stick them towards the top of the list even without an item sorting mod. I don't know where we're at on this? Link to comment Share on other sites More sharing options...
registrator2000 Posted May 16, 2016 Share Posted May 16, 2016 Please don't use a while loop to poll for whether the player has received the Pip-Boy! Functions that don't exit are saved into players' save files. Dangling scripts that don't terminate are never good. A Timer would be a much better choice for timed events. In this case though, polling isn't necessary - using events is an even better way to add an item to the player only after the Pip-Boy is received. Quest Property MQ102 Auto Const Event OnInit() ; Stage 6: Pip-Boy Boot Sequence. If (MQ102.IsStageDone(6)) Game.GetPlayer().AddItem(MyItem) Else RegisterForRemoteEvent(MQ102, "OnStageSet") EndIf EndEvent Event Quest.OnStageSet(Quest akSender, int auiStageID, int auiItemID) If (akSender == MQ102 && auiStageID == 6) Game.GetPlayer().AddItem(MyItem) UnregisterForRemoteEvent(MQ102, "OnStageSet") EndIf EndEvent Link to comment Share on other sites More sharing options...
RustyXXL Posted May 16, 2016 Share Posted May 16, 2016 [...] Thanks a lot. I'll change that.I'm still a beginner with papyrus, and my Programming background doesn't always help that much with it. In some parts the methology is very different from what I'm used to....but I always aim to improve. :) Link to comment Share on other sites More sharing options...
Maduin81 Posted May 16, 2016 Share Posted May 16, 2016 Just an update, I've recently updated RuleBreaker to go along with the whole [settings] convention in its last update. Journey will be updated as well on its next update. I'll change them again if necessary if something else is decided. Link to comment Share on other sites More sharing options...
Pelinor Posted May 16, 2016 Share Posted May 16, 2016 I don't have anything to add to the holotape naming topic, but I wanted to let you all know that work on MCM is progressing. It's still very much in the initial stages, so I'm open to any requests or requirements you folks might have. No ETA unfortunately, but the menu building and managing is going to be much more streamlined than previous versions. Not a fan of Flash/Scaleform, though. :dry: Link to comment Share on other sites More sharing options...
Recommended Posts