-
Posts
235 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by dagobaking
-
-
I am wanting to use "SayCustom" in order to cause Actors say dialogue lines via Papyrus script.
It looks like you can do this by attached keywords to topics.
However, in the CK, I don't see where you can add a Keyword to a Topic. Can someone clarify how that is done?
Thank you.
-
Interesting. Going to look more into that. Thank you.
-
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?
-
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.
-
Thank you. Yes! That is what I need. But, I need it for regular variables rather than properties. Is that available?
-
Thank you. That is not what I am needing.
I need MyString to be used to dynamically reference any number of other variables.
-
This is possible in most languages.In Actionscript, for example, it looks like this:
theVar = theObject["theVarYouWant"];
Is there an equivalent of this in Papyrus?
-
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.
-
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.
-
I'm sure that they thought of this and will use a good encryption scheme of some kind.
Maybe it will leak anyway or have a work-around. But, I would be surprised if there was any easy access to this content out of the box.
-
I believe it means that you've set that form to be deleted. It shouldn't be there once you save and reload that mod.
-
Thank you for this.
The dll that my mods use was built by someone else. Unfortunately, I don't know c++ well enough to use this.
-
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.
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.
-
There is no such event in papyrus. But you can try using SaveLoadMessageStringEvent global event from native f4se plugin. I havent tested but it seems it should fire when save/load message appears on screen.
I can't find anything about this type of event. Is there a place where this is documented?
-
Is there an event somewhere that fires when the game gets saved?
If not, is there some other Event that fires reliably after a save is done? Maybe player onload fires again?
-
Is there a way to get the real current time/date in Papyrus?
If not, is there some other way to generate a string that is guaranteed to be unique?
I'm trying to work out a scheme for saving data and need to generate a unique identifier for an individual game being played (when there might be multiple separate saves on one machine).
-
When describing code problems you should always show exactly the code you are using rather than short-hand because it will throw off people trying to help.
Try this:
Form equipment = PlayerRef.GetWornItem(3).Item PlayerRef.UnequipItem(equipment)
-
If you are using "GetWornItem" it is already equipped.
-
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.
-
SetScale always operates on the base object scale. That is, if the object is set at 1.3 scale, SetScale(1.0) will set it back to 1.3 scale, not 1.0. This is all according to the Skyrim Wiki entry.
Thank you! I should have remembered to check the Skyrim entry. That link covered everything I needed to know.
-
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.
-
Aha. That could be. I will test.
That seems to conflict with the description of the function that says its based on the original art size:
https://www.creationkit.com/fallout4/index.php?title=SetScale_-_ObjectReference
-
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.
-
To me, switching out to work in Blender is the detour that causes a lot of extra steps in that workflow.
I think that Nightasy's (Brain Poof) videos are fantastic for this subject: https://www.youtube.com/user/BrainPoof
How do you add Keywords to Topics?
in Creation Kit and Modders
Posted
I am trying to follow the advice on the SayCustom page: https://www.creationkit.com/fallout4/index.php?title=Topic_Script
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?