Jump to content

dagobaking

Premium Member
  • Posts

    235
  • Joined

  • Last visited

Posts posted by dagobaking

  1. No sure what topics do you mean. In quests you may add conditions to a player dialogue. Double click on the text in the info-window and add a condition "HasKeyword".... Just a guess

     

    I am trying to follow the advice on the SayCustom page: https://www.creationkit.com/fallout4/index.php?title=Topic_Script

     

    Script properties pointing to Topics often end up being Null do to loading issues. If you try to fill a Topic property before a quest finishes promoting its topics, you will end up with a Null property at run time (even though the editor happily lets you set the property).

    Recommendations for getting actors to say things on cue:

    • Put them in a scene, and use a dialogue scene action
    • Put them in a Say/Forcegreet Package
    • Use the SayCustom - ObjectReference function instead (which uses keywords instead of topics)

     

     

     

    So, I'm looking for how to implement the last recommended method. Setting up the SayCustom code is straight forward. But, I'm not sure how to associate keywords with the lines/audio that will be said.

     

    Anyone?

     

    Bueller?

     

    Bueller?

  2.  

    Afaik, you can assign values to the properties within the script without needing to set them in CK via the Property dialog.

     

    For example,

     

    float Property my_float = 10.5 auto

    string Property my_string = "just testing" auto

     

    I just did a quick test and added the above to a script and it compiled, at least, so I think it should work. NB. I use Caprica to compile all my Papyrus scripts, so it might be a compiler-dependent feature?

     

    As for the large IF statement, would switch-case statements be useful to you? The Caprica compiler supports switch-case statements.

     

     

    Switch

    The Switch statement may only be used on an Int or String, and the case values must be literals.

    <switch> ::= 'Switch' <expression>               ['Case' (<integer>|<string>)                 <statement>*]*               ['Default'                 <statement>*]             'EndSwitch'

     

     

    Thank you.

     

    The settings get populated from XML after load. So, I don't really need to populate them in their declaration like that. The issue is that, from my experience, when you add/change/remove properties on a script, you have to go into the properties panel in CK for it to do some sync with the esp/esm and re-save that.

     

    But, maybe Caprica somehow handles that part too? Haven't used it.

     

    For Switch, is that creating a real switch statement? Or, is Caprica just using that syntax and then turning it into an If statement for the Papyrus compiler?

  3. Unfortunately, only properties. Why are you restricted to variables only? What are you trying to accomplish?

     

    I have a settings system that uses an XML file to hold all settings.

     

    I don't want to create a direct dependency on MCM. But, I want other modders to be able to make MCM, holotape or whatever they want to affect the settings if they wish as an add-on. So, I made an API function to change settings externally through Papyrus.

     

    They send in the name of the setting as a string along with the new value.

     

    This is ok for most of the settings because they work in Flash. But, I also extend some of them out to act as Quest script level settings in Papyrus. So, I want to add a check in to apply changes to those too.

     

    It would be elegant to simply have something like:

    questScriptScope[varTitle] = newVarValue

    Instead, I have to have a large If statement like this:

    If (varTitle == "setting_to_change")
    setting_to_change = newVarValue
    Else If (varTitle == "blah_de_blah")
    blah_de_blah = newVarValue
    ...
    ...

    It's not the end of the world. But, just clunky as I am often adding/removing settings in this phase of development.

     

    I CAN use properties. But, then I would have to mess around with the CK whenever I add/remove settings which is probably worse.

     

     

    Variables are private, so Like Reneer said, they aren't accessible. You can only access variables indirectly via a property or function, if available.

     

    That said, there are functions such as GetAnimationVariableBool, GetAnimationVariableInt and GetAnimationVariableFloat that can access certain variables using string identifiers.

     

    Thank you.

     

    So you basically want a hashMap/associative array?

     

    Papyrus doesn't support that.

    You could approximate that by using two arrays, one being a string array, containing the keys, and the other one containing the values.

    Then you do something like

     

    int i = keyArray.find(myString)

    if(i >= 0)

    do something with valueArray

    endif

     

    Thank you. That would work. Though, I think a big If statement is probably a similar amount of effort with a little less processor cost.

  4.  

    Maybe we're all over reacting to what to us is an insignificant release of a Fallout MMOG that has no impact whatsoever on either TES or FO.

     

    They've got Elder Scrolls Online. Kinda makes sense they've have a Fallout online, when you think about it.

     

     

    It makes sense in that it follows the same strategy pattern as Skyrim. Yes.

     

    But, I don't think it's an over-reaction for users to express disappointment. It was our dollars that turned Bethesda into a wealthy company. So, when they turn around and hand the keys over to marketers who want to milk their titles instead of focusing on what users want (more releases faster) it should be called out.

     

    My feeling is that its really just too late with Bethesda. I'm looking for other companies/titles to fill the space of moddable open-world games. Hopefully someone like ProjectRed does that.

  5. I think it's pretty clear now that Bethesda's business strategy is being driven by marketers, over-estimating their standing with players and milking their titles beyond capacity.

     

    In the short term, 76 will make them more money. But, in the long-term, they are opening the door for other companies to step into the open world, moddable space at the same level.

     

    I predict that new open-world games from other companies with strong mod communities will over-shadow the release of TES6 and FO5.

  6. Thank you both for the help!

     

     

    The closest you're going to get, without using F4SE, is using Utility.GetCurrentRealTime, which returns the number of seconds since the game was launched.

     

    Using F4SE is ok. My mod is already dependent on that. But, I wouldn't want to add another plugin dependency...

     

     

    Just in case you come back and say you want the REAL time(Earth time), only one guy has figured that out(author of A Matter of Time in Skyrim) and his source doesn't reveal how he did it. RealHoursPassed() keeps running even when the menu is paused, so there will always be a gap between the two times.

     

    Indeed. I'm hoping to use real time so that I can guarantee that the identifier number will always be unique to that playthrough.

     

    It's not exactly difficult to figure out - A Matter of Time gets the real-world time by using Scaleform / Flash and displays that as a widget.

     

    Well. My mod uses Flash extensively. So, if its available that way it should be easy to get. Not sure why I didn't think to look for a UTC time function in Flash. I guess it was late.. :)

     

    Will look into that.

     

     

    As for generating a unique value, something like Utility.GetRandomInt() might work well.

     

     

    That is my plan B. In reality, it probably would never happen if the number is large enough. But, my OCD doesn't like a system that could theoretically make the same number twice.

  7. I could be off. But, I am not sure about the math in that link.

     

    It seems to me that scaleA/scaleB as they use it in that link would be the proportional difference. But, the number to scale by would be slightly different than that because it is relative to a different starting value.

     

    They say that the imprecise number is due to floating point limitations. But, it looks like the number is always off in one direction. If it were a rounding issue I would expect it to be off in both directions.

  8. Ok. It looks like SetScale is indeed relative.

     

    So, anyone know what the geometry is to have it go from .98 to 1.0?

     

    It's not as simple as just 1.0/.98. That only gives the relative difference. Not the amount that .98 needs to grow by (relative to its starting scale) to land on 1.0 even.

  9. I'm trying to make small adjustments to an NPC scale. From .98 to 1.0 to be exact.


    However, when I use:




    targetActor.SetScale(1.0)



    They stay at 0.98.


    Where it gets confusing is when you enter a large number like 2.0. As expected, they get large. But, the scale they grow to is often slightly off from the number. So, it seems like some kind of odd rounding system.


    Any help would be greatly appreciated.

×
×
  • Create New...