Jump to content
IGNORED

AAF Turn The Light ON


Recommended Posts

AAF Turn The Light ON

View File

About This MOD
+ This very mini MOD places 1 to 3 light sources (and a dummy object if turned ON in MCM) at the start of an AAF scene.

+ For the player character, and NPCs if set in MCM. (For NPCs, there are only 3 slots for NPCs, so it'll not light from the 4th.)

+ Light Radius, dummy usage, Light Level Threshold etc can be set in MCM.

- This MOD is ESL.

- I'm not so good at English, so please bear with my poor English and  I hope that I can tell you what I want to tell. Sorry.

 

 

+ Some Notes

+ The light level thresholds are set to 42 by default, but if you keep that values, TTLO may light up even in a slightly dim place.

 

+ TTLO has two objects as dummy, 'oil lamp' and 'fire barrel'.

- Dummy objects may overlap actors depending on the animation being played.

- So please adjust the placement distance in MCM according to your animation MODs while playing your FO4.

 

+ The light from the 'optional light (In this MOD, it ’s called AO-Light)' passes through the object and may be visible from the other side of the object (such as a wall) that normally blocks the light.

 

+ All lights and objects are reset when saving data is loaded.

 

+ Please please let me know if you noticed any bugs! Thank you!

 

+ For Modders: If you send "TTLONoLightUp" on Meta, TTLO will not light up that AAF scene.

+ If you need Japanese version of config.json for MCM, please download it separately.

- Files other than config.json, ie ESL file, script do not need to be translated.

- If I forget to explain something or the English text is very wrong, this description will probably be updated without updating the file. Sorry.


  • Submitter
  • Submitted
    10/22/2019
  • Category
  • Requires
    AAF.esm, MCM

 

Link to comment
1 hour ago, Indarello said:

This mod crash my game when I load save

F4SE 0.6.17

Mod Configuration Menu 1.37

AAF 0.97b

Hi, Indarello. Thank you for your report.

This MOD locks the own script to not listen to AAF events when loading a save. And I think that the function used when loading is only vanilla's one, so it isn't related to what other MODs' versions.

I'd like to test it myself, so please tell me in detail the situation when it was saved and when it was loaded.  I am sorry for your inconvenience!

Link to comment
1 hour ago, Indarello said:

Don't know what details will help you

It was saved in front of red rocket, it was morning, lol

Save was made without this mod and I load it when I enter game

Thank you for uploading your saved data and coming up with this!

I too couldn't think of something that could lead to CTD, So, if you did something, I thought I might come up with something.

I tried opening your saved data with Resaver, but again, from that, I couldn't come up with anything but one thing. However, I am not currently using the function that automatically start AAF scenes between NPCs, so I thought when many scenes stop at once when loading a save, there was something that the script couldn't handle, and maybe it was the cause. But then, nothing happened when I tested.

 

So, about one thing, Uh... well, there are 677 Unattached Instances in the saved data that you uploaded. Meaning that, there is something bad script data left in this saved data, and this remaining script data may conflicting with TTLO. In that case, I'm very sorry, but there is nothing I can do...

Although it is possible to clean Unattached Instances in Resaver, this action does not solve everything, and the saved data after cleaning 677 Unattached Instances at once is probably not loadable, I think. I'm sorry I can't help you.

 

Please let me know if you have any other ideas. I will continue the test. Thank you.

Link to comment

SO... I'm sorry :(. I tried various tests, but nothing happened. Considering the number of Unattached Instances, this saved data is likely to have been a number of MODs uninstalled. As a result of uninstallation, CTD occurred. And probably it was the same time that TTLO was installed, coincidentally. I will suspend this test. That's all for the report. Thank you.

Link to comment
  • 5 weeks later...

Hi,

 

First of all, thank you for this mod, it was much needed!

 

A couple of questions, please:

 

    fROTzPOSxy[0] = PlayerRef.GetAngleZ()
    fROTzPOSxy[1] = afLocations[0] + (Math.sin(fROTzPOSxy[0]) * (fPlaceDistance + Utility.RandomInt(0, 8)))
    fROTzPOSxy[2] = afLocations[1] + (Math.cos(fROTzPOSxy[0]) * (fPlaceDistance + Utility.RandomInt(0, 8)))

 

Can you please explain the math / the logic behind calculating the light position? I am not sure I follow it. Reason I'm asking is that I am trying to script place some sex scenes around the player, but not directly on top of the player, and I'd like to replicate the logic. Current AAF API doesn't provide for this, you can specify the player as location but then the scene would start exactly on top of the player, not nearby.

 

The second question is: I have noticed the lamp being placed on top of surrounding furnitures instead of clipping into the furniture, and, again, I am trying to understand how you've accomplished that. Also considering this logic for another mod of mine, I am trying to script place some statics attached to room ceilings, if indoor

 

Thank you very much again

 

 

Link to comment
2 hours ago, SAC said:

 

Can you please explain the math / the logic behind calculating the light position? I am not sure I follow it.

 

I don't want to be rude and interrupt the conversation but I was using same logic for my new vegas mod when placing graves in front of the player.

The light is positioned to some distance according to player; and the distance vector converted to X,Y coords.

 

With my 30 years old trig knowledge and with my magnificient drawings:

 

gfx.png

 

 

here:

distance r = fPlaceDistance + Utility.RandomInt(0, 8 )

and angle a = fROTzPOSxy[0]

 

I hope it helps.

 

Link to comment

Hi, @Hanaxar. Thank you so much for the explanation and image! I really appreciate that!

 

On 11/23/2019 at 6:23 PM, SAC said:

Hi,

 

First of all, thank you for this mod, it was much needed!

 

...

 

The second question is: I have noticed the lamp being placed on top of surrounding furnitures instead of clipping into the furniture, and, again, I am trying to understand how you've accomplished that. Also considering this logic for another mod of mine, I am trying to script place some statics attached to room ceilings, if indoor

 

Thank you very much again

 

 

Hi, @SAC. Sorry for the late reply!

As I mentioned in my very primitive script source, the placement location's calculation is a copy of a vanilla script's function, and I only understood it by sense, not by theory. Thanks to Hanaxar's image, I understand it now, hehe.

The original script name is "TestTownINVScript".

I’m sorry to tell you something extra if you already know, but the Sublime3 can search for a word in all the text in some folders and giving you easy-to-read-and-use search results (Double-clicking the search result will open the file and jump to that line). So when I can't find the function I need on the CK wiki, I'm searching for "\Fallout 4\Data\Scripts\Source\Base" etc using some words that I think are valid. Searching from 7945 vanilla sources takes only about 10 seconds at most. It's very useful.

 

About the second question, I'm using only a following function:
PlacedBarrel.MoveToNearestNavmeshLocation()

https://www.creationkit.com/fallout4/index.php?title=MoveToNearestNavmeshLocation_-_ObjectReference

If the lamp was placed on a furniture, I didn't do anything special, but probably because that furniture has some NavMesh. 

I think it can be done if you know in advance that the height of the ceiling is constant, but since FO4's statics are pre-combined, I can't think of how to put it on the ceiling in various situations...

 

Sorry for not helping you much!

Link to comment
  • 10 months later...
  • 8 months later...
  • 5 months later...
On 12/25/2021 at 5:59 PM, Kasba7 said:

This mod is not working with the latest AAF patches.

Okay two things, first I want to say thanks for posting to this topic as I had missed this mod previously and decided to try it out.

Second, it worked for me, when scenes start it gives a light glow around the scene, enough to let you see it but not so much as to scream "Hey look here for sex".

So I'm not sure which AAF patches you are referring to but the mod does in fact work.

Edited by ercramer69
typos and grammar correction
Link to comment
11 minutes ago, ercramer69 said:

Okay two things, first I want to say thanks for posting to this topic as I had missed this mod previously and decided to try it out.

Second, it worked for me, when scenes start it gives a light glow around the scene, enough to let you see it but not so much as to scream "Hey look here for sex".

So I'm not sure which AAF patches you are referring to but the mod does in fact work.

Which AAF version do you have ? I have 166 beta

Link to comment
14 hours ago, ercramer69 said:

I'm using 164.0.0beta which I downloaded on 12/1.  
However in 2 days I'll be starting a new playthrough when Ivy 6 is released so I'll upgrade and report back for you in a couple of days.

Hold on. I think I've actually figured it out. This mod works when starting some animations and not all of them and my guess is those were the animations present back then, others were added in later updates. So when one of the new ones play TTLO doesn't recognise it and add lighting to it. Because I noticed it happens when playing an old BP animation (Mistress) for example their be light, but if the one after it (pit doggy) is selected to play instead there will be no light. I have yet to test playing an old animation to spawn the light then cycle to a new one.

Edit: Okay so, choosing an old animation first then navigating to a new one once all actors join (The screen goes black for the AAF scene to load) seems to keep the light spawned during the new ones.

Edited by Kasba7
Test complete
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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