coke202 Posted June 2, 2010 Share Posted June 2, 2010 I been looking around and can't find a script I need for my personal mod, when activating like a switch a menu come's up with different items that has been written on it, after picking what you want another menu come's up with how many you want. Now this is the hard part, there's player.additem that add what ever in your inventory but im looking to see if it can like drop it in particular place in a room then the player may pick it up or what ever. It was done in Morrowind, but I cant find the mod, it had like a brick, pillow or coin to choose from. Link to comment Share on other sites More sharing options...
Skevitj Posted June 2, 2010 Share Posted June 2, 2010 Could you provide a bit more information please? I'ts not hard to do, but dropping items into the game world (especially outside a container) is fraught with danger, ie, dropping them inside a wall cavity. So any information you can provide is usefull in making the script "safe". If you could possibly provide context, such as a screenshot of the switch, the room containing the switch and mark where the player would be standing and/or where you want the items to spawn, even a drawing representing it would help. Calling placeatme on a reference marker (moved relative to the switch/player pos) can be used depending on what the items are, numbers, and what they are for, but creating millions of objects in the game world is a bad idea no matter which way it's done. At any rate, the more specific you are the easier it is for us. (Unfortunately I'm supposed to be studying at the moment so I'm probably not going to be able to help on the coding side, but I can help you clearly define it so another scripter can get it done quick.) In the mean time, have a look at http://cs.elderscrolls.com/constwiki/index.php/PlaceAtMe that should give you an idea of how it would be done and the likely problems. Link to comment Share on other sites More sharing options...
GreatLucifer Posted June 2, 2010 Share Posted June 2, 2010 May I suggest you only use placeatme when you really have to, as this can cause save-game-bloating, which may induce crashing lateron. If there's a limited number you wish to choose from, it'd be safer to make an extra, empty, unconnected cell and place all your items in here. Make sure they're all persistent, and use the moveto (marker or whatever). If you're still set on the placeatme function, may I suggest you put a boundary on it (set max number of X). If this does not answer your question or sounds like gibberish, please specify your question and I (or we, the community) will do our best.. Lucifer Link to comment Share on other sites More sharing options...
Skevitj Posted June 2, 2010 Share Posted June 2, 2010 May I suggest you only use placeatme when you really have to, as this can cause save-game-bloating, which may induce crashing lateron. If there's a limited number you wish to choose from, it'd be safer to make an extra, empty, unconnected cell and place all your items in here. Make sure they're all persistent, and use the moveto (marker or whatever). If you're still set on the placeatme function, may I suggest you put a boundary on it (set max number of X). If this does not answer your question or sounds like gibberish, please specify your question and I (or we, the community) will do our best.. Lucifer When I said "likely problems" that's the main one, and it's a biggie. If it will work in your mod (any you plan on this script being able to theoretically create infinite amounts of items), having the items being spawned inside a chest (any container would do) will make things a lot simpler. Link to comment Share on other sites More sharing options...
GreatLucifer Posted June 2, 2010 Share Posted June 2, 2010 Skevitj, it was not ment as backtalk ;) Out of curiosity; I know of the 'official' problems, been studying up on this 'scripting language'. But sofar haven't had trouble with any errors myself, despite using placeatme frequently. Do you or anyone else for that matter have any idea what's about the max I can use it before it starts crashing..? Lucifer Link to comment Share on other sites More sharing options...
Skevitj Posted June 2, 2010 Share Posted June 2, 2010 Skevitj, it was not ment as backtalk ;) Out of curiosity; I know of the 'official' problems, been studying up on this 'scripting language'. But sofar haven't had trouble with any errors myself, despite using placeatme frequently. Do you or anyone else for that matter have any idea what's about the max I can use it before it starts crashing..? Lucifer Don't worry, I didn't interpret it as backtalk, you were clarifying a point I didn't go into detail about. My second post was just pointing out for coke that that was the main problem he has to understand from the construction set wiki page (and that spawning the items in a container instead would make it easier). As far as placeatme bugs, yeah, It's only really a problem if used recklessly, It's mostly related to the save game size, I don't know enough to give an informed answer, so anything I say should be taken as a guestimate, but I'm assuming that there is a maximum number of references the engine can handle at a time, so as you start approaching that, reference re-allocation efficiency hits the deck, causing the performance hit people see, then it eventually gets to the point where it can't load everything, something critical isn't loaded, and the game dies. If you manage to hit a 10M save file though (taken off the construction set wiki, never got anything close to that myself), you're doing something really wrong. Selling stuff to a merchant, of leaving it in a cell which gets reset deletes the problem references so it's either one hell of an effort or a very serious coding error which would cause something like that to occur (stockpiling thousands of items in a cell which is constantly being visited). It's easy enough to create scripts which can make use of it safely. Link to comment Share on other sites More sharing options...
coke202 Posted June 2, 2010 Author Share Posted June 2, 2010 sorry about the wait I had work, here are the pics ya'll ask for (if there not good tell me and I'll make new ones) :note that I know wht happens when you to many items are in one place :) and the only thing I know that would be made from this script is gold for now the X makers are the key points, when Skevitj said that you can use placeatme and gave me the link I thought I could write it (HA) but I had a brain fart again lol, not much of a scripter but last night I was able to get the ARPitStairs01 to go up and down I just made a new script and use the whole raised script and adding a few line that are in the gate script so I'm patting myself on the back for that lol http://i81.photobucket.com/albums/j206/BigFan_01/pic1.jpg http://i81.photobucket.com/albums/j206/BigFan_01/pic2.jpg http://i81.photobucket.com/albums/j206/BigFan_01/pic3.jpg Link to comment Share on other sites More sharing options...
ecksile Posted June 2, 2010 Share Posted June 2, 2010 OBSE has i believe a command which can clean up the placeatme items so no bloating happens. Link to comment Share on other sites More sharing options...
GreatLucifer Posted June 2, 2010 Share Posted June 2, 2010 Thanks for the reply, but that I know... I was wondering what the max is to where you can use it? How many Items or whatever would you have to spawn before the game starts crashing? Sofar I've used it like... 60x max. How much more could the engine handle? Link to comment Share on other sites More sharing options...
Argomirr Posted June 2, 2010 Share Posted June 2, 2010 That depends entirely on the size of your savegames. Most people start having trouble at 10 MB, some can still play for hours without crashes at 50 MB. They'll have huge loading times though. Each item adds about 76 bytes to the savegame, so it's okay to use it a couple of times. Of course, it's better not use PlaceAtMe at all, but if you know what you're doing it can't do any harm. Link to comment Share on other sites More sharing options...
Recommended Posts