Jump to content

Apply oxygen need to surface eg CELL or WRLD


Qrsr

Recommended Posts

I would like to add the oxygen mechanic which kicks in when submerged to a specific cell which obviously is not under water or flooded or else. I assume its possible via spell, which i would tie to either a hazard or a global interio/exterior effect, e.g. weather or else.

I cant find that specific "ability" only "waterbreathing". Any ideas?!

Edited by Qrsr
Link to comment
Share on other sites

Waterbreathing is a hardcoded Actor Value along with the actual ability/inability to breath underwater but you can achieve a similar feature without hardcoding anything.

I think the simplest approach (we shall call it the "most effective" as well) would be to use a Magic Effect. The hierarchy: Spell (added to the player) >> Magic Effect (referenced by the Spell's Effect Item entry thus, applied to the player when the Spell is added).

The Magic Effect should be: Detrimental, Actor Value Modifier and Delivery target is 'Self. Take a look at one of the vanilla abXXXXXX Spell and MagicEffect for an example.

What Actor Value you modify with it is up to you. But you'll probably want to decrease Action Points, then Health.

Edited by LarannKiar
Link to comment
Share on other sites

Thanks. Thats is also very unfortunate since the O2 icon is what i wanted to have.

Why would i want to do something? Because of deadly environment...

Quote

What Actor Value you modify with it is up to you. But you'll probably want to decrease Action Points, then Health.

well yes and no. Less oxygen will problem cause less oxygen for cells, lungs, body of course caused by lactic acid caused by fast (very) movement. But that is nothing i have in mind for this particular modding question 🙂 😛

Link to comment
Share on other sites

3 hours ago, Qrsr said:

Thanks. Thats is also very unfortunate since the O2 icon is what i wanted to have.

Why would i want to do something? Because of deadly environment...

well yes and no. Less oxygen will problem cause less oxygen for cells, lungs, body of course caused by lactic acid caused by fast (very) movement. But that is nothing i have in mind for this particular modding question 🙂 😛

O2 icon (HUD elements) can be added to the UI with either HUDFramework or F4SE. (There are probably other frameworks and approaches but I'm familiar only with these two).

To animate the icon, you'll need Adobe Flash and ActionScript (AS3). Interfaces, including "HUD Overlays" and complex Menus, are .swf files. To control the overlay from the game, you'll need a Papyrus script. As for F4SE, its vanilla Scaleform API provides enough functions so you don't need to have an F4SE plugin but Papyrus and Flash are still mandatory.

Link to comment
Share on other sites

1 hour ago, Qrsr said:

Hmm isnt there any framework which simply allows me todo just this without studying any programm? 🙂 Its a pity that its not so easily possible.

There might be.. but unfortunately I don't know any. UI files are Flash files so you'll need to have an asset file to load it ingame and the Creation Kit doesn't provide API for this. The vanilla one is the AP bar, it's the closest to O2.

By the way, in Fallout 4:

ActionPoints [AVIF:000002D5]

In Starfield:

Oxygen [AVIF:000002D5]

It just works 🙂 so if you'd like to redesign it as an O2 consumption mechanics as BGS did you can edit the vanilla HUDMenu.swf (probably in JPEXS Free Flash Decompiler and certainly in Adobe).

Edited by LarannKiar
  • Like 1
Link to comment
Share on other sites

Hmm i know JPEXS and some scripts are easy to mod maybe its already there and just some 0, 1 swapps 🙂

Oxygen [AVIF:000002D5]

Haha yeah i guess in vacuum there is not so much oxygen and AP probably is part of oxygen, i would find it interesting to split AP in Fallout into Oxygen as well but also Reaction (Time) or Initiative or something. Its technically Perception and maybe even hand eye coordination or just sensitivity.

Edited by Qrsr
Link to comment
Share on other sites

17 minutes ago, Qrsr said:

Hmm i know JPEXS and some scripts are easy to mod maybe its already there and just some 0, 1 swapps 🙂

Oxygen [AVIF:000002D5]

Haha yeah i guess in vacuum there is not so much oxygen and AP probably is part of oxygen, i would find it interesting to split AP in Fallout into Oxygen as well but also Reaction (Time) or Initiative or something. Its technically Perception and maybe even hand eye coordination or just sensitivity.

I like it even better:

Rads "Rads" [AVIF:000002E1]

 

EnvDmg "Environmental Damage" [AVIF:000002E1]

It sounds more and less "scientific" at the same time. 🙂 

 

Anyway, I just took a quick look at HUDMenu.swf and in under scripts >> ActionPointMeter, there are Public variables and functions like:

      public var Bracket_mc:MovieClip;
      
      public var MeterBar_mc:MovieClip;
      
      public var Optional_mc:MovieClip;
      
      public var ActionPointSegments_mc:MovieClip;
      
      public var DisplayText_tf:TextField;

These are usually set by the native code's SetVariable() or SetMember() function.

Public functions in AS3 like:

public function AddSegments(param1:Array) : *

by Invoke(), from the .exe as well.

Try editing these first and see how the game reacts to it. I think the text AP next to the bar ("bar" is usually referred as "Meter" in the game files) is localized so maybe in other languages it's not displayed as AP? In that case the text AP is certainly set by the game code through one of these functions.

Edited by LarannKiar
Link to comment
Share on other sites

  

Rads "Rads" [AVIF:000002E1]
EnvDmg "Environmental Damage" [AVIF:000002E1]
Quote

It sounds more and less "scientific" at the same time. 🙂 

😄 i would add magic to scientific maybe scientific magic since its the same FormID : 000002E1

Thanks for the JPEXS insight i will play around with it later. But maybe its to scientific for me, chances are i will ask again 😉

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...