Jump to content

Arachnophobia by Miss Leeches (OBSOLETE!)


Recommended Posts

Sorry, I've been mostly silent for the most of yesterday evening. Monday's tend to get busy for me in real life.

 

Alright. Starting from post 323: Web traps are also also easy, it really is more a matter of what exactly would trigger the trap. As for egg-laying, consider that the amount of available animations to me are limited. The ZaZ pack is pretty well done, mind you, but I am not an animator myself, and therefore I don't have animations available to make a final-death cutscene, hence the current fade-to black/death cry.

 

Stiltzkin, thank you for digging around some on how things were done, I appreciate it and I'll be sure to have a look here, shortly.

 

For everyone else: I'm fairly certain this is going to be a particularly bumpy ride when it comes to followers in general but I'll do what I can. I still don't know how things will be handled when you have a quest follower with you or something.

 

However, WORST case scenario, will be, they'll just be standing on the floor looking at your hanging body waiting for you to break out. lol

Link to comment

However, WORST case scenario, will be, they'll just be standing on the floor looking at your hanging body waiting for you to break out. lol

If nothing else, the console command "set PlayerFollowerCount to 0" fires all of your current followers. Since this command doesn't require a target, my hope is that it would be easy to script into the mod? Not an ideal solution, but could work as a temporary measure until the puzzle behind follower mechanics is solved.

Link to comment

Sorry, I've been mostly silent for the most of yesterday evening. Monday's tend to get busy for me in real life.

 

Alright. Starting from post 323: Web traps are also also easy, it really is more a matter of what exactly would trigger the trap. As for egg-laying, consider that the amount of available animations to me are limited. The ZaZ pack is pretty well done, mind you, but I am not an animator myself, and therefore I don't have animations available to make a final-death cutscene, hence the current fade-to black/death cry.

 

Stiltzkin, thank you for digging around some on how things were done, I appreciate it and I'll be sure to have a look here, shortly.

 

For everyone else: I'm fairly certain this is going to be a particularly bumpy ride when it comes to followers in general but I'll do what I can. I still don't know how things will be handled when you have a quest follower with you or something.

 

However, WORST case scenario, will be, they'll just be standing on the floor looking at your hanging body waiting for you to break out. lol

no worries about being silent, we all have matters to attend to IRL.

 

yeah I'm curious about the web traps too, not sure if he meant like a "spider fishing line" of sorts that, if walked into, yanks you up and you end up cocooned or something (just my mental image based on what was said) or something as simple as walking into a big "web wall" and getting stuck in it. both sound kinda neat to me too, so those would be interesting, but I'm personally just interested in trying out what you've planned before this came up first, either way.

 

ah =x still having issues implementing followers atm? and yeah, might be best to tell people "make sure you finish your quest or have followers based on quests leave before you start this" if you can't figure out how to implement them. I'm sure not everyone has that issue anyhow. but it's great you're attempting to include quest followers.

 

lol, sounds kinda funny to me.

 

also, sorry if this is a bit too forward/probing, but I find myself a little curious after the last string of screenshots you posted, how close is this mod to release? do you think, at this point in time? based on your best guess if so needed. as was said before, this is a great new direction for the mod, and I'm not trying to rush you in any way, I'm merely curious how it's going thus far, seeing as it seemed like you made some pretty big leaps with it in the last page or so.

 

but again, apologies if it's too much of a pushy thing to ask

Link to comment

See, I knew that command (set PLayerFollowerCount to 0) was in there, but strangely enough, there isn't a script function to call that does that. To be honest, I was just going to do that and fire the followers before teleporting the player.

 

EDIT... wait a sec, PlayerFollowerCount is a global variable...

 

This changes everything. I'll test around and see if I can do this. As much as I wouldn't mind having followers with you, it's another part of the CK (and Papyrus) that I'm going to have learn later. If all goes well, I'll have a beta out by the end of the day (CT).

Link to comment

awesome! sounds like you've hit a milestone here to me, great work at that, and kudos to all of those that helped you out (IE: Ms Leeches and Stiltz now). so does this mean you're not going with follower support for it just yet now?

Link to comment

Edit: Fixed the code.

 

Function FindFollowers()
	Actor Property Player Auto
	Cell playerCell = player.getParentCell()
	int i = playerCell.getNumRefs(43)	; Not zero based, is actual count
	int j = 0
	while (j < i)
		j++
		Actor akActor = playerCell.getNthRef(j,43) as Actor
		if akActor.IsPlayerTeammate()
			; Do something with found follower here
		EndIf
	endWhile
EndFunction
The "43" specifies actor types. You can use the getNumRefs call to count the number of just about anything in the same cell as the player and the getNthRef call to get a reference to any specific one of those.
Link to comment

First off, thanks a million for that function!

 

Yeah, I did some reading on what those functions do and the 43 filters to find NPCs specifically. Then it's getting the variable "i" how many references there are that match that filter. Very clever. So while j is less than i (not sure what "j++" is doing, I think it's adding to J because the next part relies on what J is set to) the function is then getting the reference equal to j in the instance of the while loop that it is running. If that reference is a teammate then we can tell the function to do whatever we want with it as specified in the if statement there.

 

Do I understand this correctly?

Link to comment

First off, thanks a million for that function!

 

Yeah, I did some reading on what those functions do and the 43 filters to find NPCs specifically. Then it's getting the variable "i" how many references there are that match that filter. Very clever. So while j is less than i (not sure what "j++" is doing, I think it's adding to J because the next part relies on what J is set to) the function is then getting the reference equal to j in the instance of the while loop that it is running. If that reference is a teammate then we can tell the function to do whatever we want with it as specified in the if statement there.

 

Do I understand this correctly?

j++ is the same as j = j + 1

 

Looks like you read that just fine.

 

I adapted code from my SexAddicts mod so it's not just a guess at what might work.

 

Of course this code won't find any followers that were told to wait and left behind somewhere else but that shouldn't be a problem for you mod since those followers will not be interfering.

Link to comment

not sure what "j++" is doing

 The standard function n++ (in this case, j++) increments n by 1 in many programming languages. It's pretty much bread and butter for loops that run increasing by 1 each time.

 

EDIT: Waxen beat me to it, but nonetheless, hurrah teamwork! I will be beyond thrilled if this works out without further complications. Thanks for contributing, WaxenFigure, and for your continued work, Kazyn.

Link to comment

Yeah, the reason it wasn't compiling is because my CK isn't recognizing the SKSE functions. -.- So now I gotta figure what's causing that (I do have SKSE).

You have to install the Source files for the SKSE functions. They are optional in the initial install, but not for modders :).

Link to comment

\o/ Ms Leeches joins into the team work session, that's what I like to see! I'm going to say: thanks right now to everyone that helped towards this mod, especially to Kazyn, great to see this all come together like this! kudos all around

Link to comment

"J++" wouldn't compile.

"J+1" would compile, but come time the function was called, the script got stuck in the while loop.

"J = J + 1" also compiled, but then it seemed the function was skipped altogether.

Function FindFollowers()
    Cell playerCell = victim.getParentCell()
    int i = playerCell.getNumRefs(43)    ; Not zero based, is actual count
    int j = 0
    while (j < i)
        j = j + 1
        Actor akActor = playerCell.getNthRef(j, 43) as Actor
        if akActor.IsPlayerTeammate()
            Follower = akActor
        EndIf
    endWhile
EndFunction

I'm trying to use the function to assign the obtained reference into the Follower actor property.

Follower and victim are both defined at the beginning of the script.

 

Considering that the original "J++" should've worked, though, I'm also willing to bet something went wrong with my SKSE installation so I'm going to do a fresh reinstall of that.

Link to comment

Concerning the web traps, for the lelz;

 

What if the player were to "stumble" into a web wall, where they end up spread out in an X position. I think one could do this by using the X-cross animation and just strategically placing the player so that the X-cross itself would be hidden (I guess this would also be solved if there was an animation of that pose without the cross). Then the player would have to work their way out before a spider comes along and cocoons them again.

 

Another neat one would be if the player gets their hands caught on some sort of ceiling stuff, and uses the hanging cuff animation (much like how Bleeb said earlier). Again, strategic placement of the webs and player to hide the chains and cuffs (or ya know, if there's a version of the animation where those chains are not there... that would be easier).

 

Can't stress how much I'm exited to see this happening, comrade!

Link to comment

Function FindFollowers()
    Cell playerCell = victim.getParentCell()
    int i = playerCell.getNumRefs(43)    ; Not zero based, is actual count
    int j = 0
    while (j < i)
        j = j + 1
        Actor akActor = playerCell.getNthRef(j, 43) as Actor
        if akActor.IsPlayerTeammate()
            Follower = akActor
        EndIf
    endWhile
EndFunction

I'm hoping I understand this correctly, but I noticed you have

Cell playerCell = victim.getParentCell()

This is initializing the "playerCell" variable as a "Cell" type variable. And with

victim.getParentCell()

You're setting the variable equal to the parent cell of the "victim", which I'm guessing the game doesn't know how to handle, unless you already wrote extra script to handle that mention of "victim".

 

As Waxen's code had it,

Cell playerCell = player.getParentCell()

This sets the script up so that it will check the cell that the player is currently in. The player is an important part of it, because it means this function will run based on the player's current location.

 

As for

Actor akActor = playerCell.getNthRef(j, 43) as Actor
        if akActor.IsPlayerTeammate()
            Follower = akActor

Is follower a variable? If it is, then you're just overwriting that variable in each iteration of the loop. I'm not familiar with Skyrim's scripting, but is there anyway you can make a variable Follower(k), where the "k" here is actually the current numerical value of k, and only increments when a follower is found (so you get variables like follower(1), follower(2), etc, out of it)?

Actor akActor = playerCell.getNthRef(j, 43) as Actor
        if akActor.IsPlayerTeammate()
            k = k + 1
            Follower(k) = akActor

^-Don't actually use this block of code unless someone else approves/fixes it, or if you know how to fix it, because I'm sure it doesn't work like this-^

Follower(1) would then be assigned the first reference found, etc (If you used the variable "j" here, the numbers would be somewhat random, as the first follower could be the 9th actor found in the cell. This is why I suggest a new variable that only increments when an actual follower is found).

 

This kind of list of IDs for follower would be useful in that you could use the list to dismiss all of them, or take the first 3 and apply custom capturing script so they get captured with you, and then for any with a value greater than that, only the rest get dismissed. I want to stress that "follower(1)" is probably NOT a proper way to label them, but there should be a method of giving them (specifically, their reference IDs) variable names that the script is capable of creating multiples of.

 

As stated before, I'm NO EXPERT when it comes to coding for skyrim specifically, so if anyone has more experience doing so, please either translate this into skyrim code or ignore it and tell Kazyn how to fix his problem (it's possible I may be way off the mark here, but I know that at least the theory behind my idea is sound).

Link to comment

You want to use player.GetParentCell() because you want to be sure you are checking the cell where the player is at. All the active followers for the player will be in the same cell as a result of their follow package.

Best use of this would be in a function to build a list of followers and perform this just once at the start of a battle.

 

Actually considering how you are planning to handle followers this would only need to be run when you decide the player has been defeated.

 

 

Link to comment

 


Function FindFollowers()
    Cell playerCell = victim.getParentCell()
    int i = playerCell.getNumRefs(43)    ; Not zero based, is actual count
    int j = 0
    while (j < i)
        j = j + 1
        Actor akActor = playerCell.getNthRef(j, 43) as Actor
        if akActor.IsPlayerTeammate()
            Follower = akActor
        EndIf
    endWhile
EndFunction

I'm hoping I understand this correctly, but I noticed you have

Cell playerCell = victim.getParentCell()

This is initializing the "playerCell" variable as a "Cell" type variable. And with

victim.getParentCell()

You're setting the variable equal to the parent cell of the "victim", which I'm guessing the game doesn't know how to handle, unless you already wrote extra script to handle that mention of "victim".

 

As Waxen's code had it,

Cell playerCell = player.getParentCell()

This sets the script up so that it will check the cell that the player is currently in. The player is an important part of it, because it means this function will run based on the player's current location.

 

As for

Actor akActor = playerCell.getNthRef(j, 43) as Actor
        if akActor.IsPlayerTeammate()
            Follower = akActor

Is follower a variable? If it is, then you're just overwriting that variable in each iteration of the loop. I'm not familiar with Skyrim's scripting, but is there anyway you can make a variable Follower(k), where the "k" here is actually the current numerical value of k, and only increments when a follower is found (so you get variables like follower(1), follower(2), etc, out of it)?

Actor akActor = playerCell.getNthRef(j, 43) as Actor
        if akActor.IsPlayerTeammate()
            k = k + 1
            Follower(k) = akActor

^-Don't actually use this block of code unless someone else approves/fixes it, or if you know how to fix it, because I'm sure it doesn't work like this-^

Follower(1) would then be assigned the first reference found, etc (If you used the variable "j" here, the numbers would be somewhat random, as the first follower could be the 9th actor found in the cell. This is why I suggest a new variable that only increments when an actual follower is found).

 

This kind of list of IDs for follower would be useful in that you could use the list to dismiss all of them, or take the first 3 and apply custom capturing script so they get captured with you, and then for any with a value greater than that, only the rest get dismissed. I want to stress that "follower(1)" is probably NOT a proper way to label them, but there should be a method of giving them (specifically, their reference IDs) variable names that the script is capable of creating multiples of.

 

As stated before, I'm NO EXPERT when it comes to coding for skyrim specifically, so if anyone has more experience doing so, please either translate this into skyrim code or ignore it and tell Kazyn how to fix his problem (it's possible I may be way off the mark here, but I know that at least the theory behind my idea is sound).

 

 

I said at the end of my post that both "victim" and "follower" were both defined elsewhere in the script. (The text might suggest I said this in a harsh tone, don't take it that way, I'm really being polite >_> and thoroughly appreciate everyone's help)

 

I used victim.getparentcell() because the victim was already assigned to the player earlier in the script as well. I suppose I could just have it getPlayerRef but I don't see why what I did wouldn't work.

 

As for overwriting the follower variable in that While Loop, I did realize that the Follower variable would be overwritten, but since I only had one follower to worry about I left it as is for the time being for testing to see if the function was indeed working correctly.

Link to comment

sorry if this is a bit off topic by now, but I just got curious: so if you get caught by a spider anywhere in Skyrim you'll automatically teleport to the lair you made right? and upon escaping and making you way out of the said lair/cave you'll just be at the entrance of it, and if you need to get back to where you were caught you'll have to hoof it one way or another? (or just use fast travel)

Link to comment

I said at the end of my post that both "victim" and "follower" were both defined elsewhere in the script. (The text might suggest I said this in a harsh tone, don't take it that way, I'm really being polite >_> and thoroughly appreciate everyone's help)

 

I used victim.getparentcell() because the victim was already assigned to the player earlier in the script as well. I suppose I could just have it getPlayerRef but I don't see why what I did wouldn't work.

 

As for overwriting the follower variable in that While Loop, I did realize that the Follower variable would be overwritten, but since I only had one follower to worry about I left it as is for the time being for testing to see if the function was indeed working correctly.

Follower and victim are both defined at the beginning of the script.

No offense taken, besides, it was my bad, it seems as though I missed a few things here and there, which ultimately means I wasn't all that helpful.

 

And I know you're not worrying about followers past the first until you can get it to work for one, but I figure if anyone is capable of making that script capable of getting a list of follower references rather than a single one, the sooner you have it to work with the better. While you're putting it on the back-burner, maybe someone else can write it with the proper syntax.

 

I'm reading up on the mechanics in Skyrim, but I probably won't soon reach the level of someone who should actually be giving further advice, so I'll bow out on that for now. Still very much looking forward to what happens from here on, and I'm making a list of ideas to drop on you at a later date if you decide to follow through with "Perilous Defeat" (many of which should hopefully be relatively simple to script after this).

Link to comment

You want to use player.GetParentCell() because you want to be sure you are checking the cell where the player is at. All the active followers for the player will be in the same cell as a result of their follow package.

 

Best use of this would be in a function to build a list of followers and perform this just once at the start of a battle.

 

Actually considering how you are planning to handle followers this would only need to be run when you decide the player has been defeated.

How I have it set up is, when the player is defeated (supposed to black out and wake up in a cave somewhere), the script that was handling the initial entanglement sequence ends up setting an Escape Quest I'm using to stage 10.

 

Stage 10 has a fragment that calls a function (WrapVictim()) in the main quest script at which point the main quest script takes over. This single function is responsible for moving the player to the cave, playing the hanging animation, and calling the function to start the escape process (struggling to get free etc). Where your code comes in is in the same quest script (FindFollower()). It is called within the WrapVictim() function which was inserted just before the player was moved to the cave.

 

For the code below, all variables are pre-defined earlier.

Function WrapVictim() ;all variables are defined earlier
    Victim = Game.GetPlayer()
    FindFollowers()
    Follower.MoveTo(FollowerCaptiveMarker)
    Victim.Moveto(CaptiveMarker)
    Victim.Unequipall()    
    Utility.wait(1.0)
    Victim.EquipItem(Cocoon, true, true)
    Game.DisablePlayerControls(abMovement = true, abFighting = true, abMenu = true)
    Debug.SendAnimationEvent(Victim, "ZaZAPC229")
    VictimWrapped = true
    WrapFollower()
    StartEscapeProcess()
EndFunction

The above is the function called when the EscapeQuest is set to stage 10 (which happens when the player is captured)

Function FindFollowers()
    Cell playerCell = victim.getParentCell()
    int i = playerCell.getNumRefs(43)    ; Not zero based, is actual count
    int j = 0
    while (j < i)
        j = j + 1
        Actor akActor = playerCell.getNthRef(j, 43) as Actor
        if akActor.IsPlayerTeammate()
            Follower = akActor
        EndIf
    endWhile
EndFunction

The above is my version of the code for FindFollower(). The script is currently hanging somewhere at the While Loop. (VM Freezing, VM Frozen in papyrus log). Since there's only one follower, I'm not worried about follower being overwritten by more than one NPC right now.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use