Roggvir Posted June 17, 2015 Author Posted June 17, 2015 Progress report... Needed a break from the tedious dialog work, so i decided to make my own test cell filled with various furniture and cloned actors ready for action, to make testing easier. Now i am working on a way how to make it all work also with non-activable objects (somehow i forgot to implement that ). After i am done, i'll go back to finish the dialogs, then some interaction timing tweaks, and then... probably some release (but it will still take some time, got kind of busy lately again). EDIT: adding support for static objects, have to rework some things i already had working, so it might take some additional time.
Roggvir Posted June 17, 2015 Author Posted June 17, 2015 Progress report... Surprisingly, adding support for static object was quite easy. Took only to add 4 lines of code to actor alias script, and restructure procedures in the "GoAndSit" package. So thats done. Now i am going to add support for a few more objects into the default furniture library so i have more things to test this all on. Might have to change how the furniture/objects are registered to get rid of a lot of same furniture init code due to many variants of basically same object allowing same interactions.
Roggvir Posted June 18, 2015 Author Posted June 18, 2015 Is there a way how to get EditorID for given Form reference? I need something that is easily recognizable and readable, which uniquely identifies particular form. Of course i could just use Form IDs, but for ppl its much better to use SendActorTo("CommonChair01") instead of SendActorTo(0x0002ec1c), and its also a bit unreliable as the FormID value can suddenly point to a different form (or nothing) after changes in load order (unless i'd also store the name of ESP file it came from, which defeats the whole purpose of making things easier for the users as i can't get that programatically in any easy way, and it would also complicate things by having to store this value too). ...cant use <form>.GetName(), because unfortunately it can be just empty string (and it sometimes is, especially for some non-vanilla furniture/objects). I tried (<form> as String), and then split the result accordingly to get the EditorID, but that unfortunately doesnt work for forms (the string doesnt contain the editor id). This is soooooo annoying. Any ideas?
Barbarosa1 Posted June 18, 2015 Posted June 18, 2015 Before my maybe-junk/impossible-ideas of solving your ID problem, first this: I don't know papyrus scripting, nor CK in general, so don't rage on me when my ideas are completely impossible in CK/stupid. Also don't rage on me for bad English, it's not my native language. I might have translated your problem incorrect, but is your problem something like: So, you have a Form reference (RefID I take it), and you want to know what the EditorID is (the name of the furniture in CK). And you know how to get a BaseID you wrote. When I want to cheat some gold in skyrim, I open command console and use the code player.additem 00000f <amount here>. Then I Always get a message like: <amount> gold added. So i have the BaseID (00000f) and skyrim tells me: It is named gold (EditorID) by sending me that message. So I think skyrim has the right answer for your problem. If not, then you can Always think about the fact that you see all names of stuff if you are in command console and type: help "do" Then you get all BaseID's with name from things which have do or Do or dO or DO in them. I hope this helped you a bit, and if not, I'm convinced you will find the answer for this problem. For now, keep working on it and know that you have my full support if you have any problems with your mod, but please note i'm not an ID-knowledge-man, nor a CK-man in general, but I'am good in things that have conditions, loops, arrays, and such, like in PHP and Javascript (Further I know nothing more, except Mysql and sql and Arduin code O_o). If you have any problems with those things, just ask help and I 'll see if i can be of any assistance. For now, have a nice weekend!
Roggvir Posted June 18, 2015 Author Posted June 18, 2015 Before my maybe-junk/impossible-ideas of solving your ID problem, first this: I don't know papyrus scripting, nor CK in general, so don't rage on me when my ideas are completely impossible in CK/stupid. Also don't rage on me for bad English, it's not my native language. I might have translated your problem incorrect, but is your problem something like: So, you have a Form reference (RefID I take it), and you want to know what the EditorID is (the name of the furniture in CK). And you know how to get a BaseID you wrote. When I want to cheat some gold in skyrim, I open command console and use the code player.additem 00000f <amount here>. Then I Always get a message like: <amount> gold added. So i have the BaseID (00000f) and skyrim tells me: It is named gold (EditorID) by sending me that message. So I think skyrim has the right answer for your problem. If not, then you can Always think about the fact that you see all names of stuff if you are in command console and type: help "do" Then you get all BaseID's with name from things which have do or Do or dO or DO in them. I hope this helped you a bit, and if not, I'm convinced you will find the answer for this problem. For now, keep working on it and know that you have my full support if you have any problems with your mod, but please note i'm not an ID-knowledge-man, nor a CK-man in general, but I'am good in things that have conditions, loops, arrays, and such, like in PHP and Javascript (Further I know nothing more, except Mysql and sql and Arduin code O_o). If you have any problems with those things, just ask help and I 'll see if i can be of any assistance. For now, have a nice weekend! I sincerely thank you for trying to help, but unfortunately it doesnt help I think you misunderstood my problem. I need Papyrus function to get EditorID of given Form (or lets say "base object"), of course the game knows it, but there are no means how to make that information accessible inside a papyrus script. Anyway, thanks for trying.
Roggvir Posted June 19, 2015 Author Posted June 19, 2015 Progress report... Obtaining EditorID for given form: FAILEDFinding no way to get EditorID for given form via any existing vanilla or SKSE functions or tricks, i decided to try and create a simple SKSE plugin providing the neccessary function - silly me, how terribly wrong i was, hoping it would be a simple task, thinking SKSE doesnt provide such function simply because nobody thought it may be usefull.Well, it seems now, its actually not easy at all, which may be the reason why SKSE doesnt already have such function - that, or maybe i am just too dumb to figure it out (except for maybe creating some abomination that would search particular ESP/ESM file for given form id and grabbed the appropriate EditorID from some offset position there, but my conscience is uncapable to resort to such extremely ugly solutions).Anyway, that attempt failed, so i am back to my old system where every furniture info must have an 'editorId' property, which must be manually filled in - an annoyance i was hoping to get rid of. Using OnCrosshairRefChange event (to select actors and furniture to send them into): FAILEDAnother fail. I never tried to use this before, so my expectation were a bit too optimistic.Turns out, the OnCrosshairRefChange event doesnt fire for static objects, only for interactive furniture, activators, actors, etc., and as such is useless to me.So, time to go back to drawing board and find some other solution. ...but no worries, this wont stop me, not after all that horror i had to endure to get as far as i am now.
vldi4 Posted June 19, 2015 Posted June 19, 2015 I apprecia you very much for the work you are doing here,im reading your post everyday seeing your progres and i hope you will finish your work,there is no need tu hurry up because its a hard work what you are doing here and you need patience,something that i dont have.I wish i could help you but i know only very basics about modding.
JohnHead444 Posted June 19, 2015 Posted June 19, 2015 I don't no if this helps in the least bit sense i no nothing about scripting or programming but here's a shot at it............ This is CIPSCIS Words Not mine. There's one particular difference between Papyrus and the scripting language used for Oblivion and Fallout 3 that's giving a lot of people trouble. Even a fair number of experienced scripters have been tripped up by this. In the old scripting language, it was possible to use some base form or persistent reference in a script just by using its editorID. However, if you try to do that in a Papyrus script you'll find that it won't compile. What you need to use instead is a property. The way in which you'll almost always want to declare a property in Papyrus looks like this, using the type "ObjectReference" as an example: ObjectRefererance property MyRef Auto Taken from this site. http://www.cipscis.com/skyrim/tutorials/editorids.aspx I would really like to see the finale stage of this frame work because of all the things you could do with furniture the possibility's are endless and would be so much easier to animate off from. You can only do so much on a flat surface. Any way hope it helps and for the love of god would some one who has programming/scripting experience help the guy out or at least say some thing. Hope this helps have fun and best of luck to you.
Roggvir Posted June 20, 2015 Author Posted June 20, 2015 I don't no if this helps in the least bit sense i no nothing about scripting or programming but here's a shot at it............ This is CIPSCIS Words Not mine. There's one particular difference between Papyrus and the scripting language used for Oblivion and Fallout 3 that's giving a lot of people trouble. Even a fair number of experienced scripters have been tripped up by this. In the old scripting language, it was possible to use some base form or persistent reference in a script just by using its editorID. However, if you try to do that in a Papyrus script you'll find that it won't compile. What you need to use instead is a property. The way in which you'll almost always want to declare a property in Papyrus looks like this, using the type "ObjectReference" as an example: ObjectRefererance property MyRef Auto Taken from this site. http://www.cipscis.com/skyrim/tutorials/editorids.aspx I would really like to see the finale stage of this frame work because of all the things you could do with furniture the possibility's are endless and would be so much easier to animate off from. You can only do so much on a flat surface. Any way hope it helps and for the love of god would some one who has programming/scripting experience help the guy out or at least say some thing. Hope this helps have fun and best of luck to you. Nope, sorry, doesn't help at all. I know this CIPSIC site well, it was the first thing i read back then when i was about to start with any scripting for Skyrim. I still need the EditorID, resp. using EditorID would be the best and most convenient way to deal with what i am now working on. Having no way to get EditorID for a form (a "form" not object reference or actor - you can get EditorIDs for those easily, but not for a form), i have to resort to filling a string property with it manually. An explaination of what i need the EditorID for: Well, i have a lots of furniture or static objects that must be "registered" with the framework's "furniture library" in order to become usable in game. And for any "registered" object, i need some convenient, easy, and reliable way for modders to refer to those objects. I could simple use form IDs, but those are not reliable (i am too lazy to explain that now, so i wont ), or i could use the index number under which the object is "registered" in the furniture library (again, unreliable), but no mater which number i choose it will be a number - thing that doesnt describe what the object is, and thus rather inconvenient for people to work with. EditorID is the ideal tool here - it uniquely identifies objects across mods, and is often self explanatory - when you see "CommonChair01", you know that it probably refers to a common chair, while the number 143, or form id 2ec1c doesnt tell you anything unless you do remember these numbers and to which object they belong. If there would be a way to get EditorID programatically, i could spare modders from having to specify this identificator, not only to make it easier for them, but also to prevent conflicts - right now, you have to specify this UID manually, which means ppl will probably write anything they want, lazy ppl something like "chair1/2/3" which will result in conflicts. Dont forget this is a framework, so ppl will be able to use it to craft specific scenarios, or do things the way they wanna do them, so they will need some way to refer to registered furniture objects and work with them. Tell me what you find more convenient - RoggLib.GetNearestObject(player, 19), or RoggLib.GetNearestObject(player, "CommonChair01")? ...i bet i know the answer
Roggvir Posted June 20, 2015 Author Posted June 20, 2015 Got bit of a problem now. Still trying to find out a way for the player to somehow select nearby furniture/object. I thought there was some function to get the object player is looking at, but it seems there is not (apart from the OnCrosshairRefChange which doesnt work for static objects). So, i am probably gonna have to use my old dialog based system which relies on global variables set for each registered furniture/object and the old furnitureScanner script which is scanning the area around player for objects and sets the appropriate global variables accordingly. Problem is, the furniture scanner is slow, so there is quite annoying lag until it sets all the global variables according to which objects are nearby. I'd like to find some more efficient and elegant way, so i'd welcome any ideas.
zax Posted June 21, 2015 Posted June 21, 2015 I thought there was some function to get the object player is looking at, but it seems there is not (apart from the OnCrosshairRefChange which doesnt work for static objects). This? Game.GetCurrentCrosshairRef()
Roggvir Posted June 21, 2015 Author Posted June 21, 2015 I thought there was some function to get the object player is looking at, but it seems there is not (apart from the OnCrosshairRefChange which doesnt work for static objects). This? Game.GetCurrentCrosshairRef() Nope, thats the same thing as the OnCrosshairRefChange event - doesnt work with static objects
Dooge Posted June 21, 2015 Posted June 21, 2015 I like your rants. Thanks for writing them. Editor ID would be useful to get. Maybe we can contribute to next version of skse. I'm on my phone so I can't research but what language is used to develop skse? Some tool was made with Delphi and I'm proficient with that.
Roggvir Posted June 22, 2015 Author Posted June 22, 2015 I like your rants. Thanks for writing them. Editor ID would be useful to get. Maybe we can contribute to next version of skse. I'm on my phone so I can't research but what language is used to develop skse? Some tool was made with Delphi and I'm proficient with that. Thanks, thats one of the reasons i write these "rants", not only to air my grievances SKSE plugins are to be written in C++ I do intend to revisit this GetEditorId idea later again, but for now i decided to put it on hold after spending several hours on trying and thinking without actually getting anywhere - for now i can live without the EditorID and i have more important issues right now. In case you, or anyone, would be interested in trying, here's a nice page to get you started with making SKSE plugins: https://github.com/xanderdunn/skaar/wiki/SKSE:-Getting-Started
Dooge Posted June 22, 2015 Posted June 22, 2015 I like your rants. Thanks for writing them. Editor ID would be useful to get. Maybe we can contribute to next version of skse. I'm on my phone so I can't research but what language is used to develop skse? Some tool was made with Delphi and I'm proficient with that. Thanks, thats one of the reasons i write these "rants", not only to air my grievances SKSE plugins are to be written in C++ I do intend to revisit this GetEditorId idea later again, but for now i decided to put it on hold after spending several hours on trying and thinking without actually getting anywhere - for now i can live without the EditorID and i have more important issues right now. In case you, or anyone, would be interested in trying, here's a nice page to get you started with making SKSE plugins: https://github.com/xanderdunn/skaar/wiki/SKSE:-Getting-Started I wasn't aware one can make plugins for SKSE. Looking at that page you linked, that is actually something I am capable of doing. With Visual Studio (not much experience) or even with Delphi (lot of experience). I have both installed on my old laptop. I will have a look at it when I get home. Edit: OK it is not easily done with Delphi (Not just a case where you compile .dll) Perhaps it's doable in Visual studio but it will not be so easy for me since I am unfamiliar with Visual studio and C++ both.
Roggvir Posted July 12, 2015 Author Posted July 12, 2015 Sorry, got too tired of the crap called CK and Papyrus, need to take a break, but i'll be back as soon as i get over it
remois Posted July 12, 2015 Posted July 12, 2015 I can understand that... Don't worry skyrim is not going to disapear anytime soon.
RmX93 Posted July 22, 2015 Posted July 22, 2015 Any progress? I cant wait for this mod! It will be for sure one of the "must have" mods.
FsGAce Posted July 23, 2015 Posted July 23, 2015 i'm excited to see what you come up with it seems like an intriguing idea.
Roggvir Posted August 31, 2015 Author Posted August 31, 2015 So, i am back after a "short" break. Trying to finish this thing, but having a few problems: Sometimes the actors collide with each other, or with the furniture (no way of telling which is it), causing the actor in question to get in the "falling from height" or "jump" pose. It doesn't happen too often to make it a complete game breaker, but it is kind of annoying, and i am not sure i can find a way to fix this. The real problem here is when the player is involved, because then for some reason it happens much more often. Furniture "in use" can be still used by random idle NPCs For example... lets say you start some interaction involving a bed, everything is good and all, your char is having fun as it should be, but then some stupid NPC comes and lies down on that very bed, not bothered by the fact that some couple is having hard time focusing on their daily exercise with him sleeping right inside of them. And same things happens with EVERY normal furniture flagged as being usable by NPC (ie. every chair, bench, bed, etc. in the game). So far i have only one idea how to prevent this, but i dont know if it will be possible, reliable, and without other sideeffects - to create invisible non-interactive NPC that i would spawn and make them occupy all furniture slots so no other NPC can use it. ...and some other minor issues i cant remember right now, but i'll come back to that later. Anyway, just wanted to let you all know this thing isn't dead yet, it's just a real pain to make it work.
remois Posted September 1, 2015 Posted September 1, 2015 Hey, thanks for telling us. I wouldn't know much about these issue but when an npc is using furnitures like the tanning rack and you try to do the same, you get a message box that somebody is already using it. So there may be a state or keyword that tells it's in use. Otherwise you could try to lock people behavior to something else like a custom behavior, (like the onlooker mod). I guess it might be a little unrealistic but there are worse annoyances.
Roggvir Posted September 3, 2015 Author Posted September 3, 2015 Well, the problem is, when i make the actor in furniture start playing any animation, it breaks the normal "furniture in use" mechanic. When the actor start playing animations (which is obviously needed , the game no longer recognizes his "sitting" state and resets the "occupied" flag on the furniture 'sitting' marker. There seems to be no way around that. The original idea was that i will be able to use both interactive furniture (the chairs/beds/etc. where you press 'E' and you sit/lie down), and the static objects (same thing, but not interactive - you can't "activate" it). Both are causing me big headaches. Interactive furniture has this mentioned problem regarding breaking sitting state when anims are played, but it's easier to work with in some regards, for example the OnCroshairRefChange should work with it, returning a furniture reference you're looking at which is a great thing for ordering NPCs into furniture. Static objects cannot be returned by the OnCrosshairRefChange, so i have to use the "furniture scanner script" which searches the scene for nearest objects (including static ones) of given type. Right now, it would be better if i would just replace all interactive objects with static, but then NPC wont be able to sit on chairs, sleep in beds, etc., so thats obviously a no go. I just have to find some way to be able to use both types of objects while finding way around this problem. I could choose to ignore the problem and let other NPC to sit in your lap while you're having fun in your bed, but that would be ...unprofessional Maybe i could use BlockActivation() to prevent NPCs from activating the furniture? ...i must see what it does. I am a bit suspicious, something in the back of my head tells me it wont do exactly what i need (i have a feeling i already looked at this method, but maybe i am wrong). Anyway... The most annoying problem is the collision. I think it's caused by the furniture, because when i let it disappear by disabling it, it doesnt seem to happen anymore. But thats not a solution, because obviously i need that furniture to be visible :-) I am about to test if constantly repositioning the actors makes any difference. I also have a brand new problem... Sometimes the NPC voices stops working. For most of them it happens after a minute of interaction, or so, except for Brenuin, who doesn't make sounds at all from the start. Curiously, player can fix it in game by talking to that NPC - just engage in a dialog with that NPC and it resets something, and the NPC starts making sounds again (including Brenuin). Can't seem to find why this happens. I hope its some mistake in my dialogs, but i cant see any problem there. Another sound related problem is, that when some other NPC starts talking to player, or to any other NPC, the sounds that my actors make starts to fade a bit, sometimes significantly. I never noticed this during normal gameplay before - is it maybe an intentional feature? ...fading other voices in background to help the player hear what the nearby NPC has to say? ...well, there is always something. Oh, btw. i made a video showcasing what the mod does! ...unfortunately i cant find any good online storage that would allow me to upload those 3.2GB So, i'll have to edit it, maybe try to compress it more, which takes surprising amount of time - i mean the editing, takes a lot of time, and i'd rather spend the time working on the mod, instead of a vid, so no promises.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.