simplywayne90 Posted December 9, 2010 Share Posted December 9, 2010 (edited) Okay I'm going to try to discribe what I need from the scripts. I'm using these to try to recreate the Unqiue/Special, Random Encounters from Fallouts 1 and 2 The first thing I need to know is possible or not, is a script that would run on every loading of a new exterior cell, but not include the towns cells as that wouldn't make sense. Second, The base game script for random attacks from factions or this script, Could a script like that be used for triggering the random encounters via a message box with a choice to have the encounter or not? And if so, How would a script make some encounters more likely than others? And Could a different script disable each encounter after you've had them, so they don't happen repeatidily?Something like FirstKnightsEncounter=0 (Means you haven't completed the encounter)Then after you finish the encounter you activate a scripted activator to leave the area, that sets that value I mentioned to 1So then it'd be FirstKnightsEncounter=1 (Which means you won't have that encounter again) And could the same script enable an encounter in response to another encounter being disabled? And example would be,The second encounter with the Knights is not possible until you met them in the first encounter so something likeFirstKnightsEncounter=0 ThenSecondKnightsEncounter=2 (As in its impossible to get until you met them a first time) So when FirstKnightsEncounter=1, then you could trigger the script to set the SecondKnightsEncounter value to 0 and thus make it accessable by the random event script. The main thing that boggles me if how to make the encounters just rare enough to where a player may get a special encounter every once and awhile and could play the game all the way through and still not get too many. Perhaps a global variable of some sort? I don't want people to play through the mod in a couple of days and then be tired of it, I want to make them rare enough where when people get the chance to have one they won't be able to say no because they'll be so excited at what it might be. I know that seems like its too rare, but of course players with moderate luck would get one every (real-life) hour or so of gameplay, I might let them be more frequent later since I hope to get many encounters to put in game, Edited December 9, 2010 by simplywayne90 Link to comment Share on other sites More sharing options...
simplywayne90 Posted December 9, 2010 Author Share Posted December 9, 2010 Haha, well, first of all, there's a function "IsPlayerMovingIntoNewSpace" you can read up on it here: http://geck.bethsoft.com/index.php/IsPlayerMovingIntoNewSpace it basically tells you yes you're moving into a new cell or no, you aren't, and you can set conditions for another section of the script to run when it finally says yes (meaning you fast traveled or left the cell) the section of script that would need to run would need to wait for probably 2 minutes or so, with a timer that starts as soon as you leave the cell, (basically giving the player time to load in the new area) after the timer's up, another function would be set to run using the function "GetRandomPercent" http://geck.bethsoft.com/index.php/GetRandomPercent set a variable for it like "int EncounterDice" or something and set it to the GetRandomPercent. you wouldn't need to disable the encounter with a desperate script. just set a constant global variable for each encounter and make it required to be 0 to start the encounter. at the end of the encounter put something like "set EncounterToggle to 1" then that script can never run again unless you script in a way to change it back to 0. then you have the next segment of script set to only run when EncounterDice hits a specific number, or give it a higher chance to happen by setting a group of numbers, something like: If EncounterToggle == 0 If EncounterDice >= 5 && EncounterDice <= 10 ;show the accept encounter message box set EncounterToggle to 1 EndIfEndIf that would give it about a 5% chance instead of 1%. you can make it less than one percent by having GetRandomPercent Run several times and add onto itself. run it 10 times and you have a chance to happen out of about 990 and yeah, you could make getting that encounter enable another one. in the new encounter's global variable, set it to a constant 1 and make getting the first encounter set the new encounter to 0 at the end of the script. Haha, I'm reading your topic on the forum and answering this at the same time so some of my answers may be out of order, and i see i explained some things you asked about later in the post, sorry about that the scripting for making encounters happen would be no trouble at all. scripting the actual events of the encounter i couldn't help you with yet, i haven't tried scripting any quests, npc actions, ai, stuff like that at all. i've been dealing primarily with magic effects, manipulating objects and the worldspace, etc. the biggest problem i always seem to face is how to make sure the script is running on the player in the first place. the easiest method would likely be a hidden perk. it wouldn't show up in your perk list, but the effect it applies on the player would be this script, constantly. i do know how to do message boxes and menus though, so let me know if you ever need help with that. Alright, i think that covers your questions there, let me know if you need to know anything else. PS: I stopped working on that car and started working on the airship... be excited, it's just a flying chair right now while i'm setting up it's fake physics effects, and it's already easily one of the most complex vehicle mods ever done... it actually banks when you turn, haha. If anyone is willing to build on his explanation it'd be appricieated. Link to comment Share on other sites More sharing options...
rickerhk Posted December 10, 2010 Share Posted December 10, 2010 I haven't done anything with random encounters, but i've done a lot of testing with IsPlayerMovingIntoNewSpace, and so has another modder, and it is unreliable/nonfunctional in a script. It is meant to be a condition on a package, or so i've heard. Link to comment Share on other sites More sharing options...
Honeybiscuit Posted December 10, 2010 Share Posted December 10, 2010 (edited) http://www.tesnexus.com/downloads/file.php?id=13969 From this link get the PDF file on the Morrowind script manual. I was reading in there where you have local and global scripts. Plus hints on cpu usage. I know that its Morrowind but the script lingo is the same so it should answer what your asking. Edited December 10, 2010 by Honeybiscuit Link to comment Share on other sites More sharing options...
Recommended Posts