Jump to content

TheMedievalsKnights

Supporter
  • Posts

    295
  • Joined

  • Last visited

Posts posted by TheMedievalsKnights

  1. I have the following script that grabs an RGB array from a quest script and then pass it to a light to change its color. For some reason, the light does not appear ingame (even though it has a bright red default color) but it does show if I open the console or the inventory.

    I did use update3D but to no avail.

     

    Script :

     

     

    SCN LightScript

    ref mySelf


    array_var color


    Begin GameMode
    let Color := aLighting.Color
    set mySelf to getself
    mySelf.SetLightRGB Color
    mySelf.update3D
    End

     

     

     

    Screenshot of light with console opened :

     

     

     

    Screenshot with the console closed :

     

     

  2. Hi,

     

    I created the following OBSE function to convert an RGB color to HSV.

     

     

     

    SCN GetHSVColorFunction


    array_var localArray

    array_var RpGpBpArray
    array_var RpGpBpArraySorted

    float R
    float G
    float B

    float Rp
    float Gp
    float Bp

    float Cmin
    float Cmax
    float Delta

    float H
    float S
    float V

    short testE

    ;Convert RGB into HSV
    Begin Function { R, G, B }:
    let localArray := ar_Construct Array
    let RpGpBpArray := ar_Construct Array
    let RpGpBpArraySorted := ar_Construct Array

    ;Scale back RGB values between 0 and 1
    set Rp to R/255
    set Gp to G/255
    set Bp to B/255

    ;Assign rescaled values to array
    let RpGpBpArray[0] := Rp
    let RpGpBpArray[1] := Gp
    let RpGpBpArray[2] := Bp

    ;Sort the array in order to get the max and min
    let RpGpBpArraySorted := ar_Sort RpGpBpArray 0

    let Cmin := RpGpBpArraySorted[0]
    let Cmax := RpGpBpArraySorted[2]
    set Delta to (Cmax - Cmin)

    ;Hue calculation
    print "Began"

    if Delta == 0:
    set H to 0
    set testE to 1

    elseif Cmax == Rp:
    set H to (Gp - Bp)/Delta
    set testE to 2

    elseif Cmax == Gp:
    set H to (Bp - Rp)/Delta + 2
    set testE to 3

    elseif Cmax == Bp:
    set H to (Rp - Gp)/Delta + 4
    set testE to 4

    endif

    print "Ended"
    print $testE

    set H to 60*H
    if h < 0:
    set H to H + 360
    endif

    ;Saturation calculation
    if Delta == 0:
    set S to 0
    else:
    set S to Delta/Cmax
    endif

    ;Value calculation
    set V to Cmax

    let localArray[0] := H
    let localArray[1] := S
    let localArray[2] := V

    SetFunctionValue localArray
    printc H
    printc S
    printc V

    return

    End

     

     

     

    To test my function, I created a quest, where stage 20 has a result script that calls the function, (with arguments 100 200 50)

     

    However, when I try my function ingame with setstage myquest 20, it seems my function does not go past "hue calculation" since "Began" gets printed in the console but not "Ended".

  3. I have a problem with the door that teleports me to my sell, If I attach my script to the door, it wont teleport me when I activate it. If I remove the script it does teleport me.

     

    Door script :

     

     

    SCN WeatherSyncScript

    Begin OnActivate:
    if aWeatherSyncQuest.InCell == 0 :
    if GetIsCurrentWeather Clear:
    set aWeatherSyncQuest.WeatherSync to ClearInterior
    elseif GetIsCurrentWeather Cloudy :
    set aWeatherSyncQuest.WeatherSync to CloudyInterior
    elseif GetIsCurrentWeather Fog :
    set aWeatherSyncQuest.WeatherSync to FogInterior
    elseif GetIsCurrentWeather Rain :
    set aWeatherSyncQuest.WeatherSync to RainInterior
    elseif GetIsCurrentWeather Overcast :
    set aWeatherSyncQuest.WeatherSync to OverInterior
    elseif GetIsCurrentWeather Snow :
    set aWeatherSyncQuest.WeatherSync to SnowInterior
    elseif GetIsCurrentWeather Thunderstorm :
    set aWeatherSyncQuest.WeatherSync to ThunderstormInterior
    endif
    set aWeatherSyncQuest.InCell to 1
    activate
    else:
    if GetIsCurrentWeather ClearInterior:
    set aWeatherSyncQuest.WeatherSync to Clear
    elseif GetIsCurrentWeather CloudyInterior :
    set aWeatherSyncQuest.WeatherSync to Cloudy
    elseif GetIsCurrentWeather FogInterior :
    set aWeatherSyncQuest.WeatherSync to Fog
    elseif GetIsCurrentWeather RainInterior :
    set aWeatherSyncQuest.WeatherSync to Rain
    elseif GetIsCurrentWeather OverInterior :
    set aWeatherSyncQuest.WeatherSync to Overcast
    elseif GetIsCurrentWeather SnowInterior :
    set aWeatherSyncQuest.WeatherSync to Snow
    elseif GetIsCurrentWeather ThunderstormInterior :
    set aWeatherSyncQuest.WeatherSync to Thunderstorm
    endif
    set aWeatherSyncQuest.InCell to 0
    activate
    endif
    End

     

     

    QuestScript, it is just used to store my variables

     

     

     

    SCN WeatherSyncQuestScript

    ref WeatherSync
    short InCell
    short Synchronized

     

     

     

    Anyone knows what the issue is ?

    I looked at some scripted doors from the game that do something before teleporting the player but they don't seem to have anything more in particular in their script.

     

    Thanks a lot

     

  4. Hi everybody, hope you are doing well !

     

    Alright here is the deal : I am trying to create a house with a complex lighting system.

    Idealy, the feature that I am trying to implement are the following :

     

    • Lightbulbs that change depending on the time of day and weather,
    • Light beams that rotates with the time of day
    • Curtains and shutters that enable/disable the light beams and light bulbs

     

    First, let's consider a single window with one lightbulb, one lightbeam, one curtain and one shutter.

     

    The cell is behaving as an exterior : I duplicated the tamriel climate where all weathers are copies of the exterior ones except fog, sun light, ambient light and precipitaion are disabled. That way, only the sky is visible, and no light information are provided by the weather. When the player entered the cell, I assume I synchronized the interior weather with the exterior one.

     

    Now, the lightbulb will have its own script where a GameMode block calculate the light from the weather ambien and sun light thanks to OBSE functions. Yet, in the CSE render window, it seems the light is interpolated between the 4 time increments (dawn/noon/dusk/midnight). Anyone know the actual function used ? If not, how do you actually interpolate between 2 colors ?

     

    Next, because I can't attach an object script to the light beam, I will attach my script to an activator whose parent is the light beam. Then, a GameMode block will rotate the light beam depending on the gametime.

     

    Now, this I can't seem to get my fact straight.

    Because I want the player to be able to interact with the curtain and the shutters, these have to be activators. This seems like a good thing because I can parent the curtain to the lightbulb and the light beam and then disable them. Problem is, no matter who is the parent, the activator gets disabled.

    I can understand that if the parent is disabled, the child is too. But why does the parent gets disabled if the child is ?

    I even copy pasted some code from the game, and I get the same result. How can I disable and object, using an activator, without disabling the activator ?

     

    I tried going the trick from the CSE wiki tutorial where you duplicate the activator, parenting the duplicate to the other one and set its state as opposite. Problem is : because my activator is animated (there is an animation when the curtain opens or closes), I get weird result. Is there a way to control the animation state (begining/end) of an object ?

    Example :

    The curtain is opened,

    Player activates the curtain,

    Closing animation plays, once the script timer ends, I disable it

    The duplicate is thus enabled

     

    I would like this last stage to enable the duplicate in closed state, however it does not when I test my script.

     

    I know I could symply use the the reference of my objects but I intend to make the script as general as possible so that I only need a few that rely on parent/child relationship. But it seems to me that this is more like a link than an actual parent>child authority relationship.

     

    I hope you'll find the reading enjoyable if I was not clear enough, do not hesitate.

     

    Cheers,

     

     

    Erwan G.

  5. Hi everyone,

     

    I am curently modeling a sallet whose skullcap is covered with velvet. However, skyrim rendering engine being what it is (i.e. not that great) and velvet being a very complex material, I would like to know if any of you guys had any tips/tricks to come up with a result that actually looks like velvet.

     

    Note the skullcap itself is flat so I can't really manually add highlight/reflection like you would with a folded curtain or something similar.

     

    Thanks a lot for your help !

     

    Erwan G.

  6. I don't understand, I've made a lot of custom armour for skyrim and I never encountered these issues. Can you please post a picture of your Nif Exporter settings ? (the window that pops up when you export a mesh to the .nif format in 3DS max)

  7. Sorry just read the posts on this page (serves me right)..

     

    I was just generalising, as I had an unbelievable amount of PM's requesting permission to use this and that.

     

    I will expressly make the point I was only referring to the items I am qualified to grant permission to use, not those created/modded by any other individuals.

    So glad to see you back !!

     

    Btw, what did you mean with FO4 ? Fallout 4 ??!!

  8. Hi all!. Does anyone know how best to contact ActusReus? I'm making a mod that might involve some mod assets from the Credo Project, and for that I need to get permissions from him. I don't know if he can see the private message I sent him.

    Sorry to tell you that man but he rarely reads or answers to message. And I don't think he browse the nexus any more. You can still check his last activity on his profile.

  9. Hello guys, since I heard you (or maybe I didn't :D) saying : "Wow so much progress from the quest and landscaping teams but what about the 3D one ?"

    I think it's time to show you what we did since our last report.

     

    Nicolas made a lot of new awesome armor, especially leather and cloth armour that we wanted to make first.

    If you wan't some screnn, just take a look here, at his portofolio : http://ncrevon.wix.com/nicolas-crevon#!le-roy-cest-moi/c17oy

     

    And here is what I made, after following some tutorials to stop using existing models and creating mashup to finally create stuff from scratch :

     

     

    (It's a Poleaxe, I just finished the mesh, now I have to create the textures)

×
×
  • Create New...