DaBooch Posted July 5, 2008 Share Posted July 5, 2008 Howdy all. Here's my scenario. I'm not great at scripting (yet). I figured that I could add an object (call it object X) into my mod (through CS) and attach a new script to it. I loaded the mod that object X originally came in (as a modders resource of course) into CS and found the object and copied the script attached to it into Word. I then closed CS, reopened CS with my mod as the active mod (I have no problem creating the new object X in my mod) and tried to create a new script through "Gameplay - Edit Script". Every time I try, I get various errors. The script is identical and was working in the other mod...why not with mine? Thanks for any input. Link to comment Share on other sites More sharing options...
nosisab Posted July 5, 2008 Share Posted July 5, 2008 Howdy all. Here's my scenario. I'm not great at scripting (yet). I figured that I could add an object (call it object X) into my mod (through CS) and attach a new script to it. I loaded the mod that object X originally came in (as a modders resource of course) into CS and found the object and copied the script attached to it into Word. I then closed CS, reopened CS with my mod as the active mod (I have no problem creating the new object X in my mod) and tried to create a new script through "Gameplay - Edit Script". Every time I try, I get various errors. The script is identical and was working in the other mod...why not with mine? Thanks for any input.Some things you are saying get me confused. I'll try figure what is going on. First thing to clarify communication, your mod is "always" the active one albeit you can have others loaded in the same session (most of times is not advised doing so). At this point enters the concept of "index" Oblivion use to identify mods. It work this way: Oblivion have aways 00 in that index, this means all standard items references initiates with 00 like in 00001AB2 ... your mod being the first loaded receive index 01 (this is aways hexa, not decimal). The second one will be 02xxxxxx and so on, but in game this index is dependent the load order. This is the reason one can't reference objects from another mod (except it being ESM, but this forces the user having that another mod when playing). The second point is if you used another mod, in the CS, as the source item it need to be loaded in the next session, you can't just load only yours since it will point to objects from the other. The point here is the only way to grant the objects from the other mod are present is the mod user having this mod too. Remember you have the necessary texture and meshes files from the source mod in your /data (even if the mod isn't active) and this may misguide you thinking your mod works and after it fails sorely for another user that doesn't have it. Here is said, if you "cloned" the source item, better saying you created a new formID of it in your own mod. The third point is: scripts are tricky since they may refer to object names (indeed this is valid to any reference) and so fail to work if this name is changed. If some script does so is impossible to know without analyzing it. Edit: OMG :) you used Word for scripting? FATAL ERROR :)(To avoid Windows lovers complaints, this isn't because the office itself, is the same to any Document editor rather Text editor, since it include control characters that breaks the script) I advise you downloading a free Text Editor as Notepad++ (google for it) and you can better it yet more downloading a mod that include the CS format in its languages supported. You will be amazed with this editor. Link to comment Share on other sites More sharing options...
DaBooch Posted July 5, 2008 Author Share Posted July 5, 2008 Thanks for the quick reply, nosisab. I guess I shouldn't have cut corners with the details of my problem. If any of this sounds like a noob error, I've only been doing this for 2 weeks and I'm rough around the edges. OK...here goes. I wanted to build my own house. I like Bernius Manor so I chose that as a template but made significant changes to the house. I wanted to use objects to make life easier in the house. For example, I wanted to use the Automated Alchemy Sorter from Daleth. I downloaded the file (which was meshes and a plugin). I copied the meshes into my data file since the Readme said you don't need to use the plugin...it's a modders resource. I then opened CS. I "X"'s Oblivion as Master and made my mod the active mod. I right clicked on the Object Window and clicked new. I clicked "add NIF File" and found the NIF file for the Alchemy Shelf with Jars that I had previously moved to my Data folder. Now I can add the shelf anywhere in my mod (at least that's what I think). The problem is that the Shelf requires a script to go through your inventory and remove all of the ingredients. I could not find the script in the download, so I closed CS and reopened it with Oblivion as the Master and Daleth's Plugin as active (mine's not "X"'d or opened here). I found the Alchemy Shelf in the Skingrad house in CS and clicked on it to view the script. I copied the script into Word (I will use Notepad from now on) and closed CS. I reopened CS with Oblivion as the Master and mine as Active (Daleth's was not even "X''d but it is still in the Data folder). I went to my Display Room where my Alchemy Shelf is and it was still there. In CS I clicked on "Gameplay" then "Edit Script". I clicked "new" and pasted the script from earlier. When I try to save the script, I get errors as per here... http://thenexusforums.com/index.php?showtopic=65423 If this makes things clearer and somebody knows what exactly what I'm doing wrong, I'd be much obliged. I'll try your advice nosisab...I very much appreciate it. Link to comment Share on other sites More sharing options...
nosisab Posted July 5, 2008 Share Posted July 5, 2008 Thanks for the quick reply, nosisab. I guess I shouldn't have cut corners with the details of my problem. If any of this sounds like a noob error, I've only been doing this for 2 weeks and I'm rough around the edges. OK...here goes. I wanted to build my own house. I like Bernius Manor so I chose that as a template but made significant changes to the house. I wanted to use objects to make life easier in the house. For example, I wanted to use the Automated Alchemy Sorter from Daleth. I downloaded the file (which was meshes and a plugin). I copied the meshes into my data file since the Readme said you don't need to use the plugin...it's a modders resource. I then opened CS. I "X"'s Oblivion as Master and made my mod the active mod. I right clicked on the Object Window and clicked new. I clicked "add NIF File" and found the NIF file for the Alchemy Shelf with Jars that I had previously moved to my Data folder. Now I can add the shelf anywhere in my mod (at least that's what I think). The problem is that the Shelf requires a script to go through your inventory and remove all of the ingredients. I could not find the script in the download, so I closed CS and reopened it with Oblivion as the Master and Daleth's Plugin as active (mine's not "X"'d or opened here). I found the Alchemy Shelf in the Skingrad house in CS and clicked on it to view the script. I copied the script into Word (I will use Notepad from now on) and closed CS. I reopened CS with Oblivion as the Master and mine as Active (Daleth's was not even "X''d but it is still in the Data folder). I went to my Display Room where my Alchemy Shelf is and it was still there. In CS I clicked on "Gameplay" then "Edit Script". I clicked "new" and pasted the script from earlier. When I try to save the script, I get errors as per here... http://thenexusforums.com/index.php?showtopic=65423 If this makes things clearer and somebody knows what exactly what I'm doing wrong, I'd be much obliged. I'll try your advice nosisab...I very much appreciate it.try again using a text editor to copy the script before going ahead... remember never using Word or whatever Document Editor in pure text files, like .ini and programing codes (not even wordpad). Notepad++ isn't the MS Notepad ... it's a complete text editor directed to programing and highlights the reserved words from several different languages. A wonderful application. Edit: when opening another thing than your mod avoid marking it as active. Better having none. Edit: if you download the plugin for Notepad++ meant to Oblivion scripts it will color all script functions (even the OBSE ones) and special words. Answered the specific question in the other thread, avoid creating more than one. Link to comment Share on other sites More sharing options...
DaBooch Posted July 6, 2008 Author Share Posted July 6, 2008 Thank you, Thank you, Thank you, Thank you, Thank you. All my scripts are working now!!! Many thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.