Kraeten Posted June 12, 2013 Share Posted June 12, 2013 Papyrus isn't exactly an easy thing to just pick up and do, so don't get too discouraged. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 12, 2013 Share Posted June 12, 2013 Ok. Thanks for clarifying that it was an exact copy of what I had above. Simple mistake. I left off the word Property in the fourth line. ObjectReference ContainerRef Auto should be ObjectReference Property ContainerRef Auto Link to comment Share on other sites More sharing options...
ZeroCore Posted June 12, 2013 Author Share Posted June 12, 2013 Ok. Thanks for clarifying that it was an exact copy of what I had above. Simple mistake. I left off the word Property in the fourth line. ObjectReference ContainerRef Auto should be ObjectReference Property ContainerRef AutoAlright, but my question is this; how does it know to locate the container? Is "ContainerRef" how it locates the container that I've given the Reference Editor ID of Replicator? And if so, how does it do it? I really don't understand how to make it add an item directly to a specific container. I'm sorry, but it's not making sense to me. If the Reference Editor ID isn't the thing that's used anymore as a script target, then what is? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 12, 2013 Share Posted June 12, 2013 The ID name is what you use to target an object in a script BUT it has to be assigned to a property otherwise the script doesn't know what to do with it. Papyrus scripts are not directly connected to the ESP and do not know ID names and numbers automatically. To tell it what you want you have to use a property and then assign the value to that property on the form that you are placing the script. Think of the various object records as train cars in a train yard. Papyrus is the yard engine that is tasked with lining the cars up for their cross country trips. Until the driver of the yard engine is informed of which cars go where, he or she cannot do anything. Thus the properties equate to the work orders given to the yard engine driver while the script equates to the general workflow which must be followed. The script is an instruction set which says what should be done under certain conditions. The properties identify what the script is to work with. Properties utilize form records either base objects or specific instances. It all depends upon the type of property and in some cases the type of form the script is assigned to as to which type of record is used. It is reminiscent of my days working on a shipping dock. There was a warehouse full of boxes with no idea what to do with them. I was told that my task in general was to take boxes, put them on skids, shrink wrap them, label them to ship, and store the skids in designated areas. Even with that information I was lost. Then I was given a work order which detailed the exact boxes to collect, place on skids, shrink wrap, label and set aside for shipping. Maybe that cleared things up a bit... maybe not. I do have a tendency to make things as clear as mud :P Link to comment Share on other sites More sharing options...
ZeroCore Posted June 12, 2013 Author Share Posted June 12, 2013 The ID name is what you use to target an object in a script BUT it has to be assigned to a property otherwise the script doesn't know what to do with it. Papyrus scripts are not directly connected to the ESP and do not know ID names and numbers automatically. To tell it what you want you have to use a property and then assign the value to that property on the form that you are placing the script. Think of the various object records as train cars in a train yard. Papyrus is the yard engine that is tasked with lining the cars up for their cross country trips. Until the driver of the yard engine is informed of which cars go where, he or she cannot do anything. Thus the properties equate to the work orders given to the yard engine driver while the script equates to the general workflow which must be followed. The script is an instruction set which says what should be done under certain conditions. The properties identify what the script is to work with. Properties utilize form records either base objects or specific instances. It all depends upon the type of property and in some cases the type of form the script is assigned to as to which type of record is used. It is reminiscent of my days working on a shipping dock. There was a warehouse full of boxes with no idea what to do with them. I was told that my task in general was to take boxes, put them on skids, shrink wrap them, label them to ship, and store the skids in designated areas. Even with that information I was lost. Then I was given a work order which detailed the exact boxes to collect, place on skids, shrink wrap, label and set aside for shipping. Maybe that cleared things up a bit... maybe not. I do have a tendency to make things as clear as mud :P I made the changes to your script (replaceing "ObjectReference ContainerRef Auto" with "ObjectReference Property ContainerRef Auto". It still doesn't work and now it gives me an error message of: "c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\YourLeverScriptA.psc(15,41): only arrays can be indexedNo output generated for YourLeverScriptA, compilation failed." Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 12, 2013 Share Posted June 12, 2013 My bad. It is what happens when you copy/paste and modify other scripts. changeInt qty = ContainerRef.GetItemCount(entry[index])toInt qty = ContainerRef.GetItemCount(entry) At least I did state that you'd need to test the compilation of the script :P Think of it as a learning experience on how to resolve some compiler errors. Link to comment Share on other sites More sharing options...
ZeroCore Posted June 13, 2013 Author Share Posted June 13, 2013 My bad. It is what happens when you copy/paste and modify other scripts. changeInt qty = ContainerRef.GetItemCount(entry[index])toInt qty = ContainerRef.GetItemCount(entry) At least I did state that you'd need to test the compilation of the script :P Think of it as a learning experience on how to resolve some compiler errors. WAIT I think I get it now. I've managed to correlate the stuff here with the code structure in C++ (and I know that one, at least well enough to get an A in my comp sci class at college). I get what I was missing now in all of this. The list at the top (properties and whatnot), well, I can sort of compare them to function prototypes (if that isn't exactly what they are already). Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 13, 2013 Share Posted June 13, 2013 I couldn't tell ya. I know nothing about C++. In fact the only programming I know is self taught: Basic way back in the 80's; WeIDU for Baldur's Gate and other Infinity Engine games; Papyrus for Skryim; and a smattering of HTML. But hey, if it works and makes sense for ya that's cool. o.ob Link to comment Share on other sites More sharing options...
ZeroCore Posted June 13, 2013 Author Share Posted June 13, 2013 I couldn't tell ya. I know nothing about C++. In fact the only programming I know is self taught: Basic way back in the 80's; WeIDU for Baldur's Gate and other Infinity Engine games; Papyrus for Skryim; and a smattering of HTML. But hey, if it works and makes sense for ya that's cool. o.obNow however I'm stuck with another problem. I've named the references correctly, stuck the scripts in as you wrote them, they all compiled successfully this time too. I started up Skyrim, went to the Dwemer ruin I stuck this replicator in, stuck an item into the replicator, pulled the lever.... and nothing happened. It didn't work, and I have no idea why. I don't know if somehow I didn't attach the scripts correctly, or that I should have done something else with the things that I stuck them to, but the scripts DID compile and save correctly... but for some reason it still doesn't work. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 13, 2013 Share Posted June 13, 2013 Was the Dwemer ruin plus container & lever already in your save file? If so then most likely the save game prevented the scripts from actually applying. Try the following.At the main game menu open the console and type coc riverwoodopen the console again and type tgm (toggles god mode so you can coc to the dwemer ruin and not worry about enemies with a level 1 character)the use the coc command again but this time use the ID name of the cell that the lever and container are in. Link to comment Share on other sites More sharing options...
Recommended Posts