EPDGaffney Posted July 3, 2018 Share Posted July 3, 2018 You seem pretty good at picking it up. I think you'll be fairly expert in a few months, and hardly an amateur before that. This scripting language is much simpler than C++ or something like that, so it's kind of good for jumping right in. But sometimes you miss things from the more complex languages (not that I know what I'm doing in those, but I'm learning). The problem is SetDestroyed doesn't remove the reference from the game. It just makes it so the player can't see rollover text or Activate it. For all we know, the collision box is still hanging around. Your code should have worked without SetDestroyed, so I'm not sure of the nature of this bug. Link to comment Share on other sites More sharing options...
YanL Posted July 3, 2018 Author Share Posted July 3, 2018 (edited) finish to compile EPD script......I'm speechless. 0_0 Ok, let me talk more about this mod. It includes in the safehouses some special items, to encourage the player to liberate all of then, to keep in the good side with all the factions. So we have: 1) Campfire portable in Legion2) reloadbench portable in Ranger house3) Workbench portable in BoS4) and in the Followers safehouse, we have a chemistry kit this is the vanilla script scn GSChemistrySetScript short Button begin OnActivate if IsActionRef playerShowMessage GSChemistrySetMsgendif end BEGIN MenuMode 1001 set Button to GetButtonPressed if ( Button == 1 )player.AddItem Stimpak 5SetDestroyed 1elseif ( Button == 2 )player.AddItem Psycho 1player.AddItem Buffout 1player.AddItem Mentats 1player.AddItem NVSteadyChem 1player.AddItem NVReboundChem 1SetDestroyed 1endif END To not destroy the thing, I supose I just change SetDestroyed to 0, right? Course, this must be limited. Maybe one use every 3 days? How to impose this limit? Edited July 3, 2018 by YanL Link to comment Share on other sites More sharing options...
JustChill Posted July 3, 2018 Share Posted July 3, 2018 You seem pretty good at picking it up. I think you'll be fairly expert in a few months, and hardly an amateur before that. This scripting language is much simpler than C++ or something like that, so it's kind of good for jumping right in. But sometimes you miss things from the more complex languages (not that I know what I'm doing in those, but I'm learning). The problem is SetDestroyed doesn't remove the reference from the game. It just makes it so the player can't see rollover text or Activate it. For all we know, the collision box is still hanging around. Your code should have worked without SetDestroyed, so I'm not sure of the nature of this bug.Why thank you. :D Hm, but "MarkForDelete" removes the reference. It's already a part of the first recommendation.I got this one from an old post by jazziparis in 2013. There he used PlaceAtMe but then MarkForDelete to destroy the reference and avoid savegame bloating. @YanLI think you may be better with not being too enthusiastic for "SetDestroyed".If something is destroyed, it cannot be interacted with. No "OnActivate" block. I got this command from plants.Harvesting plants destroys their activator.So if you drop that item, you cannot pick it up again when it is destroyed. You actually may be better with EPDGaffney's recommandations. :wink: Link to comment Share on other sites More sharing options...
EPDGaffney Posted July 3, 2018 Share Posted July 3, 2018 Oh, so it works now? Great. Wish I understood what it was doing before, but all's well that ends well I suppose. Are you scripting with JIP LN? If you want to do an every-three-days limit (which I'm not sure I would, cos players can just wait three days and still abuse it), using JIP LN would be much easier. The alternative I had in mind would use the vanilla GetSecondsPassed, which would be real time, rather than game time, and would be easier to do. You can just delete the SetDestroyed line entirely to stop it getting destroyed. Link to comment Share on other sites More sharing options...
EPDGaffney Posted July 3, 2018 Share Posted July 3, 2018 Yes, MarkForDelete should remove the reference, but if YanL can still see rollover text, I don't know what it's actually doing. Also, MarkForDelete doesn't really delete mod-added references in most situations, though it does alleviate some performance issues and is still good to use. I think PlaceAtMe mod-added items do get deleted but it's hard to be sure based on what's here:https://geckwiki.com/index.php/MarkForDelete Link to comment Share on other sites More sharing options...
JustChill Posted July 3, 2018 Share Posted July 3, 2018 I guess that's a gamebryo bug disabling an object which the player is interacting with? Therefore your method is the best, as that can simply be avoided with the Activate function to pick the misc item up. Link to comment Share on other sites More sharing options...
YanL Posted July 3, 2018 Author Share Posted July 3, 2018 Oh, so it works now? Great. Wish I understood what it was doing before, but all's well that ends well I suppose. Are you scripting with JIP LN? If you want to do an every-three-days limit (which I'm not sure I would, cos players can just wait three days and still abuse it), using JIP LN would be much easier. The alternative I had in mind would use the vanilla GetSecondsPassed, which would be real time, rather than game time, and would be easier to do. You can just delete the SetDestroyed line entirely to stop it getting destroyed. Neh, forget it, it is a stupid idea. I have a better one, a goatskin flask. I would copy the canteen vault script. Does this make my mod illegal? Because the idea is NOT require the courier stash for this mod. Link to comment Share on other sites More sharing options...
EPDGaffney Posted July 3, 2018 Share Posted July 3, 2018 I'd say no. But you can just make some edits to the script so that it's 'yours'. After all, the functions are what they are and there's not a lot of room to use alternatives. Paste it here if you want me to modify it. Link to comment Share on other sites More sharing options...
EPDGaffney Posted July 3, 2018 Share Posted July 3, 2018 (edited) Wait, just had a look. It's very short, but it uses an effect you'd need to remake, and a message. The message can be less copyright-threatening. The script is really impossible to do differently. I wouldn't worry about it. Edit: If you kept the message the same, it would definitely count as a parody, which would bypass copyright laws. I think you'd have a harder time intentionally breaking the law here than avoiding it. Edited July 3, 2018 by EPDGaffney Link to comment Share on other sites More sharing options...
YanL Posted July 3, 2018 Author Share Posted July 3, 2018 (edited) the message is ""you take a swig from your trusty legionary goatskin flask" Since is a swig and not a sip, double the values for the Vault Canteen. And that´s it. Just need to create a misc item, the message, the heal effect and reproduce the script, with my item, right? There´s a quest there, but I THINK is just to put the item into player inventory Edited July 3, 2018 by YanL Link to comment Share on other sites More sharing options...
Recommended Posts