DoctaSax Posted April 27, 2014 Posted April 27, 2014 You may need to get & set debugmode in the mcm script directly as well as in your MQ; prideslayer did that in NG & I copied that from him. I don't know why this is needed, but it works.
nyaalich Posted April 27, 2014 Posted April 27, 2014 It's that way in NG but not SCR, which I thought was weird. Of course, trying to follow the vars down the script/quest hole sometimes leads to insight and sometimes leads to dizziness and stubbed toes.
nyaalich Posted April 27, 2014 Posted April 27, 2014 It's hard to know when to copy/paste/alter and when you know enough for it to work on your own. I'm getting the toggle info to show up properly in the console the way that it does when you toggle debugging for NG. When I go back to the game, I get the runtime crash again. This is obviously more Tech Support, but I just want to make sure that my C++ dists are the way that they should be or if anything should be uninstalled since there are many upon many. Running Win 7 x64
Halstrom Posted April 27, 2014 Author Posted April 27, 2014 Using anything other than a letter for a script, item or variable name is just asking for trouble, you'll get away with it 99% of the time but the other 1% will drive you or other people nuts
Guest tomm434 Posted April 27, 2014 Posted April 27, 2014 So, I want to make new option for player to rape captives in TTW. After he did, I add them Travel package to gol to certain location. I mark it "Must complete", "Must reach location". On the end of the package I add them new Revenge package(that's a dialogue package without Start\Wait or trigger location). The problem is - I want to make sure that Captives don't find player if he or she is in some DLC location or in my custom cells. But the dialogue revenge package only adds itself one time! So if I put a condition of "player.getInWorld DCWasteland" and player will not be in this world at this particular moment but in some DLC location, what happens to the NPC? Will it revaluate package untill player is in DC or will it drop packages at the moment of receving it? I sneaked peek into NW NCR dialogue package where NCR soldiers warn player about their crimes against NCR. I looked at the quest and it's pretty difficult to understand. Update. I travelled to point Lookout and captive doesnt' appear there. I marked her dialogue package as "Must complete" and "Must reach location"." But I have another problem now - captive follows PC anywhere, even despite that I gave conditions to her package that player shoudn't be in interior. Can I somehow solve that problem without creating additional quest? i shoose playerref as reference for the condition
Guest Posted April 27, 2014 Posted April 27, 2014 if the conditions are not satisfied (if the npc is not in the correct space) he will drop the package and re-evaluate another one. If he can't find a second package he probably will get stuck in that position. If you enter in DC and then exit before he reaches you, I assume he will stick where he arrived, but I don't exactly know how he will behave when he's not around the player. Personally I would use a script attached to a quest, to be sure it works when I want it, something like "if the player is in the correct worldspace/cell and the npc is not using a find package -> place the npc behind the player and addscriptpackage dialogue package/or he already has the package etc.", it would be like if the npc stalked the player but I don't know if it's reliable for you. I think it was something you already used for that ghoul in the sewers.
Guest tomm434 Posted April 27, 2014 Posted April 27, 2014 if the conditions are not satisfied (if the npc is not in the correct space) he will drop the package and re-evaluate another one. If he can't find a second package he probably will get stuck in that position. If you enter in DC and then exit before he reaches you, I assume he will stick where he arrived, but I don't exactly know how he will behave when he's not around the player. Personally I would use a script attached to a quest, to be sure it works when I want it, something like "if the player is in the correct worldspace/cell and the npc is not using a find package -> place the npc behind the player and addscriptpackage dialogue package/or he already has the package etc.", it would be like if the npc stalked the player but I don't know if it's reliable for you. I think it was something you already used for that ghoul in the sewers. I delete all of his vanilla packages through script when he is released(he has of them I checked and he travelled to his destination after I got to the point lookout. One of my concerns was that he will follow player in DLCs but he doesn't do it. Now he always follow player despite of conditions(if player in interior etc.) So, last chance I've got is to add him another package with conditions like 'player is in interior". Maybe if he has 2 packages he will reevaluate and, for example wander near his current location. But if that doesn't work.... I would have to create additional quest like you said. With one check and delay time of 5 seconds I doubt it will slow the game down. And it will be very temporarily. oh no, he is doing wander package anyway. Guess I will have to create a new quest. Or leave it as it is.
Guest Posted April 27, 2014 Posted April 27, 2014 yeah that was funny, seeing him swimming to reach point lookout I once have meet Viktor that told me "you must be careful out there", you know, the first meeting you make with him outside Goodspring after a combat, well I meet him in a city in San Bernardino mountains while I was playing Project Brazil, after a hard combat where I risked to die... I guess Viktor took days to reach that place and he arrived at the right moment What condition are you using, IsInInterior == 0? you specified the player reference in that condition, didn't you? I'm not sure he should follow you always, you know? if a condition in a package is not satisfied, the package will drop even if it's the only one, as consequence the npc simply won't do anything. The thing that I don't know is how exactly your npc behaves when he's not rendered/he isn't in your cell, that's what I can't tell if it will act correctly. So for example, when you are in the exterior, you should test to see the exact moment when he is running to you, if at that point you go in an interior are you sure he follows you there? because I more think he will stick waiting outside. Also, did you try a find package instead of a dialogue package? it will start conversation with Greeting topic so it's quite good too. oh I've seen you just realized he won't pick the second package, yes that's how I was thinking about.
jaam Posted April 27, 2014 Posted April 27, 2014 You may need to get & set debugmode in the mcm script directly as well as in your MQ; prideslayer did that in NG & I copied that from him. I don't know why this is needed, but it works. No reason to do that unless to be sure whichever script needs it first got it set before it is run.
Guest tomm434 Posted April 27, 2014 Posted April 27, 2014 yeah that was funny, seeing him swimming to reach point lookout I once have meet Viktor that told me "you must be careful out there", you know, the first meeting you make with him outside Goodspring after a combat, well I meet him in a city in San Bernardino mountains while I was playing Project Brazil, after a hard combat where I risked to die... I guess Viktor took days to reach that place and he arrived at the right moment What condition are you using, IsInInterior == 0? you specified the player reference in that condition, didn't you? I'm not sure he should follow you always, you know? if a condition in a package is not satisfied, the package will drop even if it's the only one, as consequence the npc simply won't do anything. The thing that I don't know is how exactly your npc behaves when he's not rendered/he isn't in your cell, that's what I can't tell if it will act correctly. So for example, when you are in the exterior, you should test to see the exact moment when he is running to you, if at that point you go in an interior are you sure he follows you there? because I more think he will stick waiting outside. Also, did you try a find package instead of a dialogue package? it will start conversation with Greeting topic so it's quite good too. oh I've seen you just realized he won't pick the second package, yes that's how I was thinking about. yes, I set player in this condition. I've got a problem(and it's not the first time) - some NPC dissapear. Raper victim dissapeared after he arrived at his destination. Then if I type "moveto refid" command, I get loading screen, then another loading screen and return to the place where I was before enetering "moveto" command. Also while making quest I got to move some NPC I disabled earlier. So I enabled him, then if Cruckref.getdisabled ==0 && doonce ==0 Cruckref.moveto Marker set doonce to 1 endif And he didn't want to move to this marker. I found the solution of moveing him to marker every 5 seconds while stage 10 is active. After dialogue with him stage is set to 15 and he can moove freely again. I decided to leave Capture option as it is. He will find player ANYWHERE he can go. That's a strange thing about Victor - how could he move to Project Brazil? And how can any NPC move to other cell if there is no portal between these cells or if this portal is closed? Even now if I go to cell and close door with "lock 255" rape victim can't find me. I don't go where he goes but I have to wait a lot of time before he finds me after I exit the closed cell.
Guest Posted April 27, 2014 Posted April 27, 2014 You did good, the moving every 5 seconds. That's the kind of redundancy I'm used to do. Even because as I told you when a mod works for me it doesn't mean it will work for a modded environment and that's the only way I can make scripts a bit more bomb-proof. The fact they disappear is very strange but I assume you must look your answer in your scripts and only there. If you come back to your starting place I think it means that cell doesn't exist, that what usually happen when you reload a game where you saved in a cell and then you de-selected that esp, you will find yourself in Goodspring. Really, if they disappear there should be a reason, because even if they die you should still be able to moveto their corpse, assuming the corpse wasn't "destroyed" by the engine itself as it should happen after some days from the death. About Victor, it was definetely strange. I think I still have a picture somewhere, let's see if I can find it, it was so funny. Assuming that there's no script that moves Victor near the player in some ways, I only can think that it comes under the "suspicious activities" npcs do when they're not near you, as I said I don't know what happens to them. But I really have the feeling that they don't actually "walk in game" when they use a travel package for example. I mean, I more think (but let me underline it's just my FEELING) it's some sort of math that approximately decides their position and shows them if you approach to their cell / zone, concerning the pass of the time. I more than a time have seen NPCs fighting among them only when I was approaching them, and they weren't random spawns. Maybe this is decided by the No Low Level Processing flag, but these are just assumptions, I never had a reason to make tests on them. Oh here it is Victor in Project Brazil http://www.mediafire.com/view/olzd151j4lj3vgj/victor.jpg
Guest tomm434 Posted April 27, 2014 Posted April 27, 2014 You did good, the moving every 5 seconds. That's the kind of redundancy I'm used to do. Even because as I told you when a mod works for me it doesn't mean it will work for a modded environment and that's the only way I can make scripts a bit more bomb-proof. The fact they disappear is very strange but I assume you must look your answer in your scripts and only there. If you come back to your starting place I think it means that cell doesn't exist, that what usually happen when you reload a game where you saved in a cell and then you de-selected that esp, you will find yourself in Goodspring. Really, if they disappear there should be a reason, because even if they die you should still be able to moveto their corpse, assuming the corpse wasn't "destroyed" by the engine itself as it should happen after some days from the death. About Victor, it was definetely strange. I think I still have a picture somewhere, let's see if I can find it, it was so funny. Assuming that there's no script that moves Victor near the player in some ways, I only can think that it comes under the "suspicious activities" npcs do when they're not near you, as I said I don't know what happens to them. But I really have the feeling that they don't actually "walk in game" when they use a travel package for example. I mean, I more think (but let me underline it's just my FEELING) it's some sort of math that approximately decides their position and shows them if you approach to their cell / zone, concerning the pass of the time. I more than a time have seen NPCs fighting among them only when I was approaching them, and they weren't random spawns. Maybe this is decided by the No Low Level Processing flag, but these are just assumptions, I never had a reason to make tests on them. Oh here it is Victor in Project Brazil http://www.mediafire.com/view/olzd151j4lj3vgj/victor.jpg the screenshot is beautiful. And my rape victim didn't die becaue I placed a check on him for that case. Well, it doesn't matter now anyway. Do you, by the way, know any way to keep npc from exiting the door? I've got cells in my mod and NPC should not exit these cells even if doors are open. but I don't want to set distance <100 to their sandbox package. Can I somehow make them stay in the cell?
Guest Posted April 27, 2014 Posted April 27, 2014 There's a flag you can put on the window door, "ignored by sandbox", I think that should make the trick. If that works, I think it still can't block NPCs from flee from that door during a fight. Also you could not use "wander" as sandbox, maybe placing some furnitures / idles would still make it quite realistic
jaam Posted April 27, 2014 Posted April 27, 2014 They should not use a door whose ownership is not valid for them. At least out of combat.
Guest tomm434 Posted April 27, 2014 Posted April 27, 2014 So they won't go through a door even if it's open?
nyaalich Posted April 27, 2014 Posted April 27, 2014 @tomm434: There's an IsInInterior condition/fxn. I know that there's a Can Use Doors flag for NPCs, but I don't know if it's something that you can change in game.
Guest tomm434 Posted April 27, 2014 Posted April 27, 2014 A.J, Jaam, Thanks. @tomm434: There's an IsInInterior condition/fxn. I know that there's a Can Use Doors flag for NPCs, but I don't know if it's something that you can change in game. Yes, and it works. Actually, debug is very useful when it comes to implementing things like that. So, this flag only applies to sandbox packages, right? If I want some NPC to walk into the room using travel package, they should do it, right?
nyaalich Posted April 27, 2014 Posted April 27, 2014 There is also DebugPrint which does the same thing but it appears in the console instead, you get to the Console by the ~ "tilde" squiggle key. You need to turn DebugConsole on for each plugin using it though so you would use SetDebug 1 DebugPrint "MyModNameMyScriptName: Code Running Ok Here, Variable at %3.2f percent" fMyVariable Oh if you leave that "f" off the end of a DebugPrint or MessageEx variable, you will get slightly annoying CTD everytime it is excecuted I'm assuming that the 'f' here is referring to %f? Or am I missing some other f?
Guest Posted April 27, 2014 Posted April 27, 2014 A.J, Jaam, Thanks. @tomm434: There's an IsInInterior condition/fxn. I know that there's a Can Use Doors flag for NPCs, but I don't know if it's something that you can change in game. Yes, and it works. Actually, debug is very useful when it comes to implementing things like that. So, this flag only applies to sandbox packages, right? If I want some NPC to walk into the room using travel package, they should do it, right? Usually that flag is used for creatures, so for example a dog usually can't open a door but you could want it on a dog follower
Halstrom Posted April 27, 2014 Author Posted April 27, 2014 I found in my Sisters of Chastity Alpha that the new NPC's I created will entre the portal taking them into the vault I created, sometimes for no apparent reason they just walk to the door and enter it, they will follow me into it if they are attacking me in combat too.
Spanners44 Posted April 28, 2014 Posted April 28, 2014 Hi. I'm trying to write the scripting for my own Sexout mod and am getting a CTD from the following Quest script: scn NVWHClientQuest00Script; This Quest is used when Client decides to find a Hooker; It locates the closest free hooker and moves client to her and activates herRef rClient ; This must be set to the Client Ref before starting QuestRef rHookerRef rTempFloat fDistanceFloat fTempShort sCntrShort sTempBegin GameModePrintToConsole "Running Client Quest 00 with Client Id: %i" rClientIf rClient != 0 ; Only work with a valid Client Ref If rClient.IsActor Set fDistance to 1000 ; Max distance to find a hooker PrintToConsole "Client Quest 00: Pasted Client Id test." Set sCntr to ListGetCount NVWHFreeHookerList ; Get number of available hookers PrintToConsole "Client Quest 00: Free Hooker List Count: %2" sCntr While (sCntr > 0) Set rTemp to ListGetNthForm NVWHFreeHookerList sCntr ; read a hooker from free list Set fTemp to rClient.GetDistance rTemp ; get distance to hooker If fDistance > fTemp ; if the distance to this hooker is closer than last stored Set fDistance to fTemp ; Store this distance Set rHooker to rTemp ; Store hooker ref Endif Set sCntr to sCntr - 1 ; reduce counter Loop PrintToConsole "Client Quest 00: Hooker Distance: %4 . Hooker Ref: %i" fDistance rHooker If fDistance < 1000 ; if we have found a hooker closer than max distance ListRemoveForm NVWHFreeHookerList rHooker ; remove hooker form available list so no other clients will not pick her rClient.StartConversation rHooker NVWHClientSolicit ; go activate hooker to start her script runing (OnActivate) Endif EndifEndif PrintToConsole "Client Quest 00 finishing"Set rClient to 0 ; ensure the script doesn't run without the Client Ref being set by caller firstStopQuest NVWHClientQuest00End I set the rClient variable before starting the quest and in a SetConsoleOuputFile txt file I see the first PrintToConsole showing the correct Client Ref. I also see the second PrintToConsole but not the thrid. I don't see how the ListGetCount would CTD as I know there is an entry in the NVWHFreeHookerList and even if there isnt it should return 0. Maybe the third PrintToConsole didn't get written to the txt file because of the CTD so have no idea whats causing it. Any help would be appriecated.
jaam Posted April 28, 2014 Posted April 28, 2014 A.J, Jaam, Thanks. @tomm434: There's an IsInInterior condition/fxn. I know that there's a Can Use Doors flag for NPCs, but I don't know if it's something that you can change in game. Yes, and it works. Actually, debug is very useful when it comes to implementing things like that. So, this flag only applies to sandbox packages, right? If I want some NPC to walk into the room using travel package, they should do it, right? Well the faction ownership will definitivly block them from entering the room.
Halstrom Posted April 28, 2014 Author Posted April 28, 2014 Hi. I'm trying to write the scripting for my own Sexout mod and am getting a CTD from the following Quest script: PrintToConsole "Client Quest 00: Free Hooker List Count: %2" sCntr I set the rClient variable before starting the quest and in a SetConsoleOuputFile txt file I see the first PrintToConsole showing the correct Client Ref. I also see the second PrintToConsole but not the thrid. I don't see how the ListGetCount would CTD as I know there is an entry in the NVWHFreeHookerList and even if there isnt it should return 0. Maybe the third PrintToConsole didn't get written to the txt file because of the CTD so have no idea whats causing it. Any help would be appriecated. I'm 99% sure this is the problem, you should have "%2.0f" PrintToConsole "Client Quest 00: Hooker Distance: %4 .Hooker Ref: %i" fDistance rHooker and "%4.0f" I'm not sure of "%i" I've never tried it myself.
nyaalich Posted April 28, 2014 Posted April 28, 2014 CTD advice: With messages, check that you've got the "F" in %#.#f and that your fingers didn't get dyslexic and type the % after the letter. : P
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now