Andyno Posted October 6, 2016 Author Share Posted October 6, 2016 I'm kinda confused. Your script is referring to only one item - mask. But in the 2nd sentence you're talking also about cannister. Link to comment Share on other sites More sharing options...
Mktavish Posted October 7, 2016 Share Posted October 7, 2016 (edited) I'm kinda confused. Your script is referring to only one item - mask. But in the 2nd sentence you're talking also about cannister. The oxygen canister is the ingestible ... it doesn't have to be in the script ... it is the item which once its clicked on in inventory , its effect runs the script.The mask is only there as an aesthetic item ... Which the player could still equip from inventory , but it would do nothing without clicking on the oxygen canister. You could put a description line on the mask like ... " Load with oxygen canister" The line " Player.GetItemCount MyBreathMask > 0 " is just there to keep the player from getting water breathing without the mask , to simulate that its needed. Although you could set the mask so they can't drop it , and as long as they can never find oxygen cans without first having the mask. Then you don't really need that line , nor have to worry about them clicking on an oxygen can to only have it wasted.But a more complex script could make sure all the odd scenarios don't happen either.That's what I mean by tailoring it a bit for the final render of your mod.This is just the simplest method I can think of without really knowing how your mod is going to play out. So to sum up what I suggest here ... #1 You have your apparel item " the mask " So the player can see something being equiped. #2 You make an ingestible item "The oxygen canister " #3 You make that script , and select it as an "Effect" type in the drop down box on the script header. #4 You make a Base Effect ... Select "Script" in the drop down archetype ... then select the new script as the associated item. Then check the boxes ... "Recover , Self , NoMagnitude , Display name only "Fill the name in for what you want to show up when looking at the oxygen canister effect in inventory. #5 Go to your ingestible , and add the new Base Effect to it. Fill in the duration here. Edited October 7, 2016 by Mktavish Link to comment Share on other sites More sharing options...
Andyno Posted October 7, 2016 Author Share Posted October 7, 2016 I think we have a misunderstanding. :wink:My first idea was about "reloading" rebreather, but since I realized it's not so easy to create, I just sticked with an idea of only one item - I mentioned that in the post #5: https://forums.nexusmods.com/index.php?/topic/4872835-reloadable-rebreather/&do=findComment&comment=42785330So if I got a rebreather, I don't need a canister, because rebreather could be used only one time - no need to "reload" anything with anything. Link to comment Share on other sites More sharing options...
Mktavish Posted October 7, 2016 Share Posted October 7, 2016 I think we have a misunderstanding. :wink:My first idea was about "reloading" rebreather, but since I realized it's not so easy to create, I just sticked with an idea of only one item - I mentioned that in the post #5: https://forums.nexusmods.com/index.php?/topic/4872835-reloadable-rebreather/&do=findComment&comment=42785330So if I got a rebreather, I don't need a canister, because rebreather could be used only one time - no need to "reload" anything with anything. Yes this Idea goes along with that ... and I was taking this into account when you said this ... " Player will "eat/use" a rebreather and it automatically appears on player's face. " The only way to make it appear on the players face ... is to make an apparel item. An ingestible item does not have an equiped model. But if you don't need it to show anything equiped , then all you need is the "Ingestible (consumable) "And I guess it doesn't really matter if it is a mask ,canister or just pills . Link to comment Share on other sites More sharing options...
Mktavish Posted October 7, 2016 Share Posted October 7, 2016 Okies so ... If you don't want a mask , this can be done even simpler with no script .And I guess for realism sake ... Re-using the Jet chem as an oxygen booster inhaler would work ? But to do this ... you do need to remake a base effect of the vanilla "WaterBreathing" ... that way you won't be messing with the MirkLurkWaterBreathing. #1 So just duplicating Base Effect "WaterBreathing" Then uncheck the "No duration , no magnitude" Leaving "Recover , Self , Display name only " Then in the name field write what will display for the ingestible effect. Example : Increase breath by 30 sec #2 Find Jet in the "Ingestibles>chems" And duplicate it . Then remove all its effects and the addiction ... to then add your new base effect , And select the duration "30 sec" ??? And Magnitude " 1 " (that's important) Then that ingestible you can place anywhere in the game for the player to pick up .But keep in mind , the player can use them while underwater. Effectively staying under for as many as they have , plus the additional 10 sec breath count down everytime the effect expires. Link to comment Share on other sites More sharing options...
Andyno Posted October 7, 2016 Author Share Posted October 7, 2016 Alright, here are some screenshots I made so you can see my progress: As you can see, the script is not attached to anything - I tried to attach it to an ingestible, but it doesn't appear in the list (probably because it's set to "effect" type). BTW, if it helps, I can upload somewhere my whole mod, so you can look at it more thoroughly. ;) Link to comment Share on other sites More sharing options...
Mktavish Posted October 7, 2016 Share Posted October 7, 2016 (edited) OIC ... (because of the BlackMesa file) You were the one making a mod to simulate Half life ? I seem to remember discussing how to set up an escort package ? Sorry ... I remember your name from the old beth forums ... just didn't remember the associated stuff. Anyways ... So it looks like you definitely want to have the apparel item which will show the Biped model (equipped) ???But you do not want to have to have 2 inventory items. And you want this item to be consumable ? So good thing you already have the apparel item. But on the ingestible ... it's better if we don't attach the script there. And yes it doesn't show up , because it has to be an "Object" type script to assign it to an ingestible object . And the reason we don't want to use an object script , is because we can't use "ScriptEffectStart" & "ScriptEffectFinish" (Begin Blocks) ... in anything but an "Effect" type script.Yes it could be done with other block types , but it would get more complicated imho . So instead , you must make a new base effect "Script" archetype ... and attach your script to the base effect. Then you select that new base effect from the ingestible ... And I'll relist the step by step , with a new script at the bottom. #1 You have your "BMRebreatherApparel" Item ... so next #2 You make an ingestible item "BMRebreather " #3 You make the script I'll show below this list , and select it as an "Effect" type in the drop down box on the script header. #4 You make a Base Effect ... Select "Script" in the drop down archetype ... then select the new script as the associated item. Then check the boxes ... "Recover , Self , NoMagnitude , Display name only "Fill in the name for what you want to show up as the effect.#5 Go to your ingestible , and add the new Base Effect to it. Fill in the duration here. Here is the script ...~~~~~~~~~~~~~~~~~~~~~~SCN BMWaterBreathingscript Begin ScriptEffectStart Player.AddItem BMRebreatherApparel 1 1 Player.EquipItem BMRebreatherApparel 1 0 Player.SetAV WaterBreathing 1 End Begin ScriptEffectFinish Player.RemoveItem BMRebreatherApparel 1 0 Player.SetAV WaterBreathing 0 End ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And the only item you have to place in the world , is the ingestible. Edited October 7, 2016 by Mktavish Link to comment Share on other sites More sharing options...
Andyno Posted October 8, 2016 Author Share Posted October 8, 2016 (edited) Just for the recapitulation, here's another screenshot: As you can see, No Hit Effect is checked, because it was checked in original WaterBreathing Base Effect, although I don't know what does it stand for. On the GECK page is written "No visual effect is played on the target of this effect." but I have no idea what it means. Another things that just came into my mind:1. Can player remove manually the mask after it automatically equips? I suppose it should be invisible in inventory or something, so the player can't tinker with it. Maybe will help just unchecking Playable flag, but that's just a guess.2. What happens if the player has a helmet or another mask that covers face? Edited October 8, 2016 by Andyno Link to comment Share on other sites More sharing options...
Mktavish Posted October 8, 2016 Share Posted October 8, 2016 (edited) Just for the recapitulation, here's another screenshot: As you can see, No Hit Effect is checked, because it was checked in original WaterBreathing Base Effect, although I don't know what does it stand for. On the GECK page is written "No visual effect is played on the target of this effect." but I have no idea what it means. The no hit effect is for hostile stuff , and primarily used for radiation in the vanilla game. What it does in that case is keep the actor from conituing to act like they are being damaged. My guess is the person setting up the base effect , which was only used for MireLurks in vanilla. Thought maybe they needed it for being underwater because of the radiation. When in reality the waterBreathing effect was not the detriment.So it doesn't really matter if its on or not. Another things that just came into my mind:1. Can player remove manually the mask after it automatically equips? I suppose it should be invisible in inventory or something, so the player can't tinker with it. Maybe will help just unchecking Playable flag, but that's just a guess.2. What happens if the player has a helmet or another mask that covers face? Ya sorry I thought of explaining how that was taken care of ... but decided not to overwhelm you with info from the start.In this line " Player.EquipItem BMRebreatherApparel 1 0 "The "1" at the end there sets a flag so the item will not be able to unequip , the "0" at the end sets a flag so a message of the item being equiped will display. And any Item that the mask replaces , will just be put in inventory ... which they will have to manually put back on after the mask gets removed and deleted at the end.There will never be an apparel item in the players inventory ... atleast not for more than about a 20th of a second. Because the item gets added then equiped. And I turned off the message to display for when the item gets added. Otherwise it would say item added then equiped in 2 different messages.I think the waterBreathing message will be displaying also ... and show what the name is because of checking the box "display name only"And to clarify ... the only item in inventory will be the "BMRebreather" Ingestible. Which will disappear when its used. Wanted to add ... on the name of the effect ... you may want to add in how long it lasts , so that the player is aware of the temporary situation.Something like "Water Breathing 30 sec"And technically a smart player , might wait till they have been under water for nearly 10 sec before they consume it. Giving them nearly 50 sec of breath time under water. Which brings up a thought I had for content ... an easter egg of sorts.Could have something under water for the player to click on which is not possible to do and still survive the swim journey. Without having started swimming before using the rebreather. But of course they could still survive by using up stimpaks ... just a thought . Edited October 8, 2016 by Mktavish Link to comment Share on other sites More sharing options...
Andyno Posted October 9, 2016 Author Share Posted October 9, 2016 Alright, I tested that in game, and everything seems to be fine. Good job! :thumbsup:Although I had to remove Playable flag, because it was still visible in inventory after equipping.Regarding that easter egg - what do you mean by that clicking?Of course I originally thought that player could simply heal self with a bunch of stimpaks. But stimpaks are not around every corner, and enemies (mostly crowded) are relatively tough, so I can't risk that player gets stuck in the flooded passage because he doesn't possess so many stimpaks to survive the situation. Link to comment Share on other sites More sharing options...
Recommended Posts