Ineffable Wingbolt Dahak Posted February 15, 2005 Share Posted February 15, 2005 1. What is the difference in purpose between set_state(which_state) and end(); 2. Are changed memory cells persistent between reloads? 3. I know we can up to 10 events, but it 10 total or 10 per day? 4. How do you determine where spawn_creature spawns? Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted February 15, 2005 Share Posted February 15, 2005 1. The call set_state is pretty much only useful in a creature or terrain script. There, it will run the state on the next turn. In any other script, as far as I know, it just ends everything. 2. I don't know. I wouldn't count on it. 3. As far as I know, it's 10 total. 4. As far as I know, it spawns in the same place as the original creature was placed. If you want to place a monster that doesn't do that, use place_monster. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Fort Posted February 16, 2005 Share Posted February 16, 2005 Remember that any real creature can be moved with other calls, so you can still resurrect any preplaced character that you want at any place desired. Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted February 17, 2005 Author Share Posted February 17, 2005 How do you make a creature ALWAYS drop a certain item? I tried to add it via the datascript, but it is not always. Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted February 17, 2005 Share Posted February 17, 2005 BoE's item-dropping percentages were mildly broken; maybe the same is true of BoA. Try giving it a 120% chance of carrying the item and see if that works. Of course, the surefire way to do it would be to give the monster a custom creature script and put some code in the DEAD_STATE that places the item on its current location. Link to comment Share on other sites More sharing options...
Curious Artila Aluion Posted February 17, 2005 Share Posted February 17, 2005 Memory cell values are persistant if you save and load a game while in the town. If you leave the town and then return, then memory cells will reset. If you are using basicnpc for your monster, or some other common script, you don't have to make a new script entirely. Just edit basicnpc (or whatever script you are using). In DEAD_STATE, add an if-then statement which checks an unused memory cell. If the memory cell is 0, no item should be placed. When the memory cell is set to 1, then place the item. If you have more than one creature that you need to drop an item, you can just add a different memory cell value for the item. This way, you don't have to have 20 different scripts if you have 20 monsters that need to drop 20 different items. Couple this with other scripts and you can have the monster drop a different item based on stuff-done flags, just by setting a different memory cell, provided that you call the script within the same town and before the fight begins. Of course, if you're using a custom script for the monster anyway, it's best to just take Thuryl's suggestion. Link to comment Share on other sites More sharing options...
Seasoned Roamer Phish Phlot Posted February 17, 2005 Share Posted February 17, 2005 where is the costum objects scripts Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted February 17, 2005 Share Posted February 17, 2005 A scenario's custom objects script is the file in the scenario folder named [scenario short name]data.txt. The scenario's short name is the name of the base file (the one ending .bas) after you remove the .bas file extension. So for example, the short name for Valley of Dying Things is valleydy, and its custom objects script is valleydydata.txt. Link to comment Share on other sites More sharing options...
Recommended Posts