Back in the saddle

Well, par for the course, life got in the way and I stopped playing Fallout for a while. Well, I am back, doubly invigorated because somebody released an inferior mod doing some of what my mod does. Anyhow, the download link on the right now has the FurtherNeeds mod as a master so that I could release an ESP for TTW. It's nice seeing my mod working in the Fallout 3 environments too. I'll have to backport the mod to work with FO3 soon as well. 

It also fixes a nasty bug where I wasn't completely undressing the PC when they "go". I now cycle through every available slot that NVSE provides for me and in a loop redress them when we're done. I'll post the code later if anybody is interested. It uses a form list to store what was removed so that I can easily redress the player when they're done.

HUD Revamp

The HUD has been revamped. I also bubbled up the food, water and sleep meters. This looks significantly better with DarN's UI but also works with a stock UI. It looks like this

Stock UI

DarNified UI

Getting it to work with the FOMOD installer is a not exactly working with an installed DarNified UI at the moment. To make it go, install it using the FOMOD. Select Darnified UI instead of Vanilla. Say No when asked to overwrite the hud_main_menu.xml file.

After it installs, go into the <GameDir>\Data\Menus\Main directory and modify the hud_main_menu.xml file. Add the following line...

<include src="FurtherNeeds.xml"/>

...just before the final </menu> closing tag. Doing this will enable the nicer, smaller font, HUD UI.

Water bottle usage solved

So using water bottles from the inventory are now scriptable. There was a bit of a workaround required but I got it up and running. Could really use some more beta testers about now. The download is on the right hand side of this page. There is a known issue if you have DarN's UI installed via a FOMOD. Do not override the hud_main_menu file as this is modified automatically.

I know there are several small bugs remaining, and I would definitely like to get some feedback on rates of hygiene and waste increase and their effects on the game. Please comment or send me an email.

Thanks

Getting closer to a Nexus release

I'm slowly but surely making my way through my internal bug fixes. Tonights progress includes:

Fixes
  • Using purified water, dirty water or irradiated water yields you an empty whiskey bottle that can be refilled using a normal water source
  • Hallway water fountains are no longer outdoor water sources (i.e. big water)
  • If the water source is better than your bottled water, your dirty or irradiated water will be emptied and refilled with the better water. e.g. At dirty water your irradiated water will become dirty water. At pure water your dirty and irradiated water become pure water
  • Some more stability checks
New Bugs
  • (Unconfirmed) The check to see if you are bottling water from a bottle of water is no longer in place. Can't be checked currently because it's difficult to determine whether or not a bottle of water was used from the inventory slot
  • Water fountain (indoor ones) continuously play sound when used for drinking. Need to figure out why. Otherwise works as intended.

 

As a side note, I think I understand why my menu from inventory water isn't working. It dawned on me tonight as I fixed a bug that you cannot activate a base object as retrieved from something like WaterPurified.GetBaseObject. Only instances of an object can be activated (it seems). This means that I may have a fix if I can figure out how to create an activatable instance of the various water types from an inventory base object type.

Meebo Chat Widget

On the right hand side I've added a Meebo chat widget. Meebo is a universal instant messenger client in a web browser. One of the cool things it can do is the widget you see on the right. If I am online, you can chat with me directly. If I am away or sleeping, you can still type in messages and when I next log on, I'll be able to see what you had to say.  It's a slick way to keep in contact and allows direct contact with me when I'm online.

Next Fallout Mods

Since I'm at work and can't actually work on my mod I was daydreaming about future Fallout mods while my server restarts. I was thinking of a mini-series that hooks into the Start New Game button from the main menu.

It would present you with the option to continue on and play a normal New Vegas game or allow you to start a (or one of) my mini series. These would take place outside the normal mapped area of Fallout New Vegas.

Concept

  1. The first idea I had was you start off outside of a broken vehicle with no weapons (one of the models from Fallout 3 that seemed to be lying around everywhere but this one is not completely broken). It finally ran out of gas. You alongside a road, broken like most but navigable. 
    • The player then needs to head off and figure out what to do next. I was thinking of having a house with one or more psychopathic serial killers. The player if she heads there will be invited in, basically normal raiders but with conversation and a hidden motive.  

      One of the things I hate about the NPCs in Fallout is that they are very one dimensional when found in the wastes. Usually anybody you see is hell bent on killing you without even getting to know you first.

    • Other things that could happen might be the player finds an old gas station nearby, but it seems deserted. As she looks around for fuel she sees a child running away (maybe to the house of serial killers).

    • Or perhaps she comes into a town where people basically push her away but if she takes something or tries to persuade them to accept her it goes bad. She wakes up underground in a locked room or something. She finds a way out and then needs to escape the city itself, etc. etc. etc. 

Got any other ideas? Sound off

WOOOHOOO!

Success! Finally figured out a way to script the outdoor water sources. Turns out when I finally resigned myself to creating a bunch of Actor Effects and Base Effects, I took a closer look at the Water Types. It seems every water type (at least every one I could see the usages for) is used outdoors by default.

This means, and even though I must do more testing, that I can assume all those sources are big water sources (meaning I can use the hard mode of my mod). I was also able to show a message menu and get a response when activating a non object based water type.

This is pretty big. I need to make sure it doesn't affect things like bottled water that will need their own object script but so far so good. The best part is I only had to duplicate the 6 Actor Effects, their 3 Base Effects and the 3 scripts attached to those Base Effects (so far).

Signing off, but finally on a good notel.  Андрей you can expect another update very soon. Probably tomorrow some time. This one will include support for

  • Bathtubs
  • Water Valves, Water Pipes, Etc...
  • Outdoor Water Sources (Lakes, Wells, etc...)

If I am really productive you may also see updates for

  • Easy, Moderate and Hard modes
  • Water bottles
  • Filling other bottles like empty whiskey bottles, empty sasparilla bottles, etc...

This was the major breakthrough I needed to get this mod moving. I don't know how many nights I spent trying to find a way to script something through an Effect script as though it were an Object script.

Sigh....

Well after spending two full nights trying to see if there was any way around going full out to handle the outdoor drinking water (lakes, ponds, etc...) there just doesn't seem to be a way. I will have to create roughly 150+ objects. If any of the Water Type objects reflect anything that deals with indoor water usage or object water usage then I'll be in trouble.

I've sent out some emails to the NVSE guys for help. So far, nothing. I tried building the source code for NVSE and it seems to build successfully but if I change it in any way it fails to load the game. Also there seems to be some important code missing (the code to build the nvse_editor_1_4.dll file). Without this code, even if I could add new commands to the scripting language I would be unable to add it to a mod. Even assuming I could, the NVSE guys would have to approve my changes and add the code to the trunk or only I would be able to use it. For that to happen they'd have to respond to me first.

So I'm gonna try the brute force method. Failing that, I don't think I'll be able to make the mod changes I want to make in order to make this mod more usable. I'll still be able to do some of what I want, but not everything.

Sorry for any delays out there...

I took the last two weeks off as I was recovering from a small surgery I had. Now that I'm feeling better I'll be jumping back into this. I found out recently that Skyrim uses a completely different (and seemingly more capable) scripting engine than all the previous titles. Interested in looking into this and I'll probably spawn off a new blog for future Skyrim mods, but I want to finish at least one mod first.

I actually have another uncompleted mod for Fallout 3 as well. That mod was an alternate start mod for added replayability. It allowed you to have a different past and start in a different part of the capital wasteland.

How to solve the water usage quandry...

So as the few followers I have (I know of only one; feel free to post guys) knows, one of the things I am struggling to provide a good solution to is the mod's ability to allow you to choose how to use and consume water. There are three real choices I'd like to make available.

  1. Bottling the water
  2. Drinking the water
  3. Bathing with the water

The menu options I want to present will allow the user to use water in the game with the mod in various combinations of these three ways.

[Easy Mode]
The easy mode would be to do all three with any given source of water. This would allow the user to fill any available water bottles (as long as that water didn't come from an existing bottled solution).

[Average Mode]
The average or medium difficulty mode is the recommended one. It basically states that with any given source of water any one of the above three solutions will work (given that you're not filling all your bottles from a bottle; I may eventually allow filling a bottle from a bottle for completeness sake but aside from that it will be initially not allowed).

[Hard Mode]
Finally there is hard mode; this mode allows you to do 1 and 2 from all sources that make sense but only allows bathing from larger sources of water (such as lakes, bathtubs, etc...). This option will likely be cut unless I come up with a fairly clever solution to the problem that large bodies of water are not really something I can script. I have a potential roundabout solution but it likely doesn't provide enough granularity to make a lot of sense. 

The Trouble
The trouble with everything stems from the lack of scriptability of water from several sources. There are also issues with determining what source of water was even used. Some examples, I could say if the player is swimming then lower the hygiene penalty for simply swimming in water. The problem is that I have no access or reference to the type of water the player is swimming in so I have no idea how to script the hygiene monitors or recovery rates. This means you can swim in dirty radiated water and come out clean as a whistle as though you were using the Ultra Lux baths.

Another big issue is that you can drink from a pond or clear stream (pure water) but I can't attach a script directly to that action so, again, I have no idea what type of water the player is drinking from nor how to script even the option to offer the menu to allow the player a way to choose options 1, 2 or 3 above.

The Problems
Currently when drinking water a spell effect is added to the player to heal and sate H20 needs for hardcore mode. These get applied through Actor Effects (AE) linked to a particular water type. Each AE has a list of Base Effects (BEs) that affect the player. To each of the water AEs I've created and attached a BE that affects the new Hygiene attribute. Examples of the BEs normally attached to water are Damage Rads (for irradiated water), Restore Dehydration, Restore Health, etc... One frustrating experience I had when developing the hygiene BEs was that a very applicable attribute of BEs, magnitude, doesn't work on newly created scriptable BEs as there is no way to determine the magnitude from the script.

The flow is

Water -> Actor Effect -> Base Effect -> Script.

When I first started writing the mod I created 3 BEs to handle the hygiene penalty restoration, 20 BEs to handle hygiene penalty allocation, 20 BEs to handle waste penalty allocation and 43 associated scripts; one per BE. You may be asking me why do I need 20 BEs to handle allocation of these two new attributes? Rember the mangintude problem I described above? Yeah I have a ton of BEs with names like IncreaseHygiene5, IncreaseHygiene10, etc... I did 5 point allocation BEs from 5 to 100. One for each attribute where I could have had only one per attribute if the damn magnitude problem was fixed. 

That alone is staggering and it's not yet enough, nor does it include the other scripts I have in place to do things like monitor the hygiene and variables to track the rest of the mod values and modifications.

Loss of Granularity
The first loss of granularity with water happens in the first chain link. The water type is unknown as they all use one of about 5 different types of AEs. This means the granularity I have is down to the 6 levels of AEs (pure, rads, good, average, bad, terrible). From this point, I can almost hard code the AE type in the BE scripts and have the water use quest (see below) act accordingly.   

The second loss of granularity is in the 3 BEs I have handling the hygiene penalty resotration. 6->3 is, again, a 50% loss in granularity. I may end up having to write/copy the 3 BEs into 6; one per AE.

While limiting to the granularity of the AE types may seem to be sufficient, I lose one major component in the conversion from Water to AE. I now no longer know if the water source was a large body of water, a bathtub or a cup of water. This prevents me from allowing the players to play in Hard Mode. 

My first thought was to copy all 6 AEs and create "big water" versions of them. In order to make this work I had to also duplicate the 3 BEs I have from things like RestoreHygiene1 to RestoreHygieneBigWater1. This means that if I want to have a 1:1 solution from AE to BE I now not only need to move to 6 BEs for restoring hygiene but 12. This may work, but it creates some mod incompatibilities described in more detail below.

If Bethesda, Obsidian or the NVSE/FOSE team would provide a way to determine the water type source that invoked the original AE effect I could do so much more. But enough of the pining, lets start solving the problem.

Water Type Mapping
I counted around 78 distinct water types without about half of those not being used in Fallout New Vegas (many of which look like hold overs from Fallout 3 with names like MegatonBombWater and WaterTypeRivetcitySubmerged). 

If I created a 1:1 mapping for Water Type -> Actor Effects, I could essentially restore the bridge and loss of granularity. It would also require me to create a restore hygiene base effect for each actor effect. This would work for most of the problems I have and I could delete the existing 6 BEs I have (3 for water and 3 for "big water") as I would be able to tailor the restoration of hygiene to the specific water type. 

This is great, right? I mean what's a little monotony in exchange for a better user experience, right? It may be, but it does introduce a new issue. First of all, I have now made the mod incompatible with any other mod that directly modifies the 6 Actor Effects Bethesda provided. Now, that may already be the case if another mod wants to modify the base effects of existing water types. I don't know if they merge or overwrite. I suspect they do the later which would make the mods incompatible. 

If I stick to the original list of AEs, it would only conflict with mods that directly modify the AE's BEs. If you have ideas on an alternate solution to this, please let me know. I'm all ears.

Water Use Quest
So another issue with the whole BE/AE bits are that you cannot invoke a message box UI menu for the user from within an Actor Effect or Base Effect script. "But wait!" you cry, "there are already water bottling mods with menus when using the water!" 

I thought it would be easy to. On close inspection of those mods it's clear that they only affect objects that provide you with water, not lakes and statics or other furniture items like outhouses. My solution to this problem, I think (as I haven't coded it yet), is to create a Water Use quest that runs in the background. When I want to invoke a menu from the base effect (or anywhere else), what I do is set a flag on the Water Use (WU) quest to show the menu and likely a few other context values to let the quest know which menu and what types of options to provide

This way, even with items, I can simply say Set FurtherNeedsWaterUse.WaterType to 1 (I have to make a numeric mapping since we can't have string variables) followed by setting a reference if I have one and any other context variables I can think of. When those are set I saySet FurtherNeedsWaterUse.Process to 1. This would queue the quest script, which is always looping, to show the message box (menu) and begin the process. 

Closing Thoughts
This is a lot to read and process. If you have ideas or alternate solutions, please let me know. As I make some more progress I'll write more. Sorry Андрей, no updates yet.