[Relz] - Immersive Mining

Post » Tue May 17, 2011 9:55 am

Does Oblivion have a 'Drop' command? I know FO3 does. When you would get the nugget, just add one, and then drop one.



Hmm, not that I know of. Did a quick search through the OBSE docs too and didn't see anything like that. What exactly does this command do in FO3?


Heh, yes there is: "http://cs.elderscrolls.com/constwiki/index.php/Drop". :)


But, I′m not sure if you can use it on container. But note that once you get the container ref using getcrosshairref, you can also just use "placeatme" to place the item at the container. You can even get the ref of the placed gold piece, like this: "set myref to containerref.placeatme mygolditem 1,0,0" for example.

Yes, there′s talk about placeatme causing bloat, but in this case, cause it′s inventory item meant to be picked up, the ref should be cleaned out when picked up. The problems arise if a mod places an activator after activator to the game world, to for example cast spells, cause those can′t be picked up and disabling wont delete them. So just use placeatme, it′s a great function if used for the right purposes. :)


EDIT: added "and"
User avatar
Hairul Hafis
 
Posts: 3516
Joined: Mon Oct 29, 2007 12:22 am

Post » Tue May 17, 2011 8:59 am

Solution to another problem I noticed discussion of: :)


Tag the containers that has already been used, with a scripted item, that removes itself after certain amount of time. Use a ring, without any slot, which is unplayable ("playable" check box empty). This way it wont show in the container, if the player looks inside it.

Note that you can also disable the ore containers dynamically by http://cs.elderscrolls.com/constwiki/index.php/SetDestroyed. This way if the player clicks on the ore container it wont open. Could be what you want to do, presenting the ore veins as non-containers. :)

Pseudo code combining suggestions:

set containerref to getcrosshairrefif(containerref.getitemcount myunplayablering > 0) ;see if the vein is tagged as exhausted  returnelse containerref.setdestroyed 1 ;now we have the container, and it can′t be activated ;player mines ore ;if success  ;ore pops out containerref.placeatme goldnugget 1,0,0 ;tagging the vein as used containerref.additem myunplayablering 1endif 



And the myunplayablering item would have the following kind of script (scripts on items keep running even in containers). The script below will remove the exhausted flag after three days:

(BTW, See here for time tracking: http://cs.elderscrolls.com/constwiki/index.php/Special_variables)

short dayaddedshort initbegin gamemodeif(init == 0) set dayadded to gamedayspassed set init to 1elseif(gamedayspassed >= dayadded + 3) removemeendifend

User avatar
Eibe Novy
 
Posts: 3510
Joined: Fri Apr 27, 2007 1:32 am

Post » Tue May 17, 2011 12:36 pm

Heh, yes there is: "http://cs.elderscrolls.com/constwiki/index.php/Drop". :)


First off, :facepalm: . Of course I go straight to the complicated OBSE stuff without even checking the vanilla functions :P. Thanks for pointing that out to me.

And thank you so much for all the help!! I had thought about the placeatme function before, but I was hesitant to use it because I know it causes bloat. But thank you for clarifying that for me. And that sounds like an excellent solution to the time problem. I'll try to implement all this into the mod soon, thanks again!!
User avatar
James Rhead
 
Posts: 3474
Joined: Sat Jul 14, 2007 7:32 am

Post » Tue May 17, 2011 1:27 am

First off, :facepalm: . Of course I go straight to the complicated OBSE stuff without even checking the vanilla functions :P. Thanks for pointing that out to me.

And thank you so much for all the help!! I had thought about the placeatme function before, but I was hesitant to use it because I know it causes bloat. But thank you for clarifying that for me. And that sounds like an excellent solution to the time problem. I'll try to implement all this into the mod soon, thanks again!!


No problem! :)

Heh, yeah I know what you mean, I have many times just browsed Obse documentation, and found what I needed only when I searched CS Wiki - in the form of Vanilla function. :P
User avatar
Cathrine Jack
 
Posts: 3329
Joined: Sat Dec 02, 2006 1:29 am

Previous

Return to IV - Oblivion