Problem with Maigrets Companions

Download and read about WAC Beta v0.1
Post Reply
milotek
Unsteady Sworduser
Posts: 7
Joined: February 14th, 2014
Gender: Male

First of all, I love the simplicity of you mods. But I have a small problem. When I put a companion in 'sneak' mode they always stay in sneak mode. I looked at the code and found the reason why. I thought I would share it with you. I do use OBSE and Construction Set Extender.

Here is you code:

Code: Select all

scn AASherJaScript

ref rEnemy
short doOnce
ref GetSelf


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

begin OnActivate

   if IsActionRef player
      SetIgnoreFriendlyHits 1
      if doOnce == 0
         Player.addspell AASherJaSpell
      set doOnce to 1
      endif
   if (GetSelf.GetForceSneak == 0) && (player.IsSneaking == 1)
         GetSelf.SetForceSneak 1
        elseif (GetSelf.GetForceSneak == 1) && (player.IsSneaking == 0)
         GetSelf.SetForceSneak 0
      endif
      if LionFollow == 1
         set LionFollow to 0
         Message "'Sher Ja, wait for me.'"
      elseif  LionFollow == 0
         set LionFollow to 1
         Message "'Sher Ja, come with me.'"
      endif
      EvaluatePackage
      playGroup Idle 1
            else
      activate
           endif
end
First thing I saw was a reference variable by the name of GetSelf. That is a name of a function in the game. Construction Set Extender won't even compile that line. I'm guessing that the regular Construction Set will. This causes the line 'GetSelf.GetForceSneak' to always to evaluate to '0'. So in the above code, the only part of the sneak code that can ever fire is the one where the 'SetForceSneak' is set to '1' putting the companion is sneak mode.

Again I use OBSE so maybe thats why it has become an issue.

Good news is that it is an easy fix. Just delete the line 'ref GetSelf' and the four 'Getself' in the sneak part of the code.
The 'GetForceSneak' and 'SetForceSneak' don't need qualifiers in this case. The new code looks like this:

Code: Select all

scn AASherJaScript

ref rEnemy
short doOnce


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

begin OnActivate

   if IsActionRef player
      SetIgnoreFriendlyHits 1
      if doOnce == 0
         Player.addspell AASherJaSpell
      set doOnce to 1
      endif
   if (GetForceSneak == 0) && (player.IsSneaking == 1)
         SetForceSneak 1
        elseif (GetForceSneak == 1) && (player.IsSneaking == 0)
         SetForceSneak 0
      endif
      if LionFollow == 1
         set LionFollow to 0
         Message "'Sher Ja, wait for me.'"
      elseif  LionFollow == 0
         set LionFollow to 1
         Message "'Sher Ja, come with me.'"
      endif
      EvaluatePackage
      playGroup Idle 1
            else
      activate
           endif
end
I haven't looked at all your companions yet. I have only have looked at Rosie, Rocky & Spike, and Sable.

One other thing that I noticed in the Rosie mod, is the Global Variable 'DogFollow' is very generic and could cause issues if other modders use the same name. In the other mods of yours I looked at, you prefix your Global Variables with 'MA' which is good.

BTW, Rosie has saved my sorry butt many times.
User avatar
Maigrets
Admin
Posts: 1557
Joined: October 2nd, 2008
Gender: Female
Born in: 1954
Location: Australia
Contact:

Hi Milotek and welcome to the forum. :hello:

Yes, simplicity is what I was going for...lol, particularly with creature companions at least. Besides that, when menus are used I hate the way they lose their idles when not in combat or in Stay mode and stand around like statues. I find this way to be more immersive to see them move around and act naturally.

I did mess around a few times with the unused animations in the CS for dogs but failed miserably. They work if I use the console in game, but working out how to chain them, for want of a better word, is something i couldn't grasp.

I've never used OBSE or the CS Extender for scripts, however the original scripts (without the sneak part) were compiled using OBSE and based on the Fenrir the Wolf mod and were written by Jumonji. Since I didn't want to use OBSE (for scripting) since it's above my knowledge level, I devised a way to make it work without it, mainly for the healing function which I replaced with an Ability.

Yeah, I remember the Global for Rosie. I forgot to add the Prefix and didn't really notice until I'd finished the mod. Glad you like her by the way. :)
First thing I saw was a reference variable by the name of GetSelf. That is a name of a function in the game. Construction Set Extender won't even compile that line. I'm guessing that the regular Construction Set will. This causes the line 'GetSelf.GetForceSneak' to always to evaluate to '0'. So in the above code, the only part of the sneak code that can ever fire is the one where the 'SetForceSneak' is set to '1' putting the companion is sneak mode.

Again I use OBSE so maybe thats why it has become an issue.

Good news is that it is an easy fix. Just delete the line 'ref GetSelf' and the four 'Getself' in the sneak part of the code.
The 'GetForceSneak' and 'SetForceSneak' don't need qualifiers in this case. The new code looks like this:
Thanks for that info. It's much appreciated. :) I had to work it all out myself as getting help for creature companions was non-existent back then, (other than Jumonji who was very kind and helpful), as people don't seem to be as interested in them as much as NPC's or odd things that don't appeal to me. I only asked a few times and got no replies, so I did it myself. Another reason for the simplicity.

The sneak portion always seemed to work for me and yes, it does compile in the basic CS. For example..I know that if I was sneaking they wouldn't be detected or initiate combat unless I broke sneak or was detected myself.

I assume then that the new script doesn't need to be compiled with OBSE? It's been a long time (years)since I played around with scripting and I use the same basic system for all my companions.

I tried giving them a Faction as well since making the new companion because I noticed that he (Gnoll Archer) and particularly my panther would fight each other if hit too many times. Normally it's not an issue so much but he uses ranged combat and of course other companions will be hit by arrows. My Pixies fight each other sometimes as well as they use spells and obviously the others will do the same if used with a ranged companion.

I posted a request for info on the CS forums and received a good response, but I'm not sure I did it properly. I've only added it to my Gnoll Archer and Sable the panther so far and haven't looked at it again. It does seem to work though.

After all this time I'm not sure if I want to go back and redo all of them, however, I did make a new companion not so long ago and was thinking of more at some point (Ferrets) so it may happen. Probably not soon though as no-one else has mentioned anything. It depends on the mood and which game I'm currently playing.

Once again, thank you for bringing it to my attention.
Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it sayingEnd Of The World Switch PLEASE DO NOT TOUCHthe paint wouldn't even have time to dry. Terry Pratchett
milotek
Unsteady Sworduser
Posts: 7
Joined: February 14th, 2014
Gender: Male

No it doesn't need to be complied with OBSE. I just mentioned it to let you know what I was running it with. I haven't been able to try the mods without OBSE as my game is heavily modded requiring OBSE. But I don't see how OBSE would change things in this case. If you want to test if it really is working for you, put messages in the code where sneak is being activated and de-activeated.

When I first installed Rosie I put her in sneak mode to see how it worked, everything seemed fine. I took her out of sneak mode and again everything seemed fine. I noticed that Rosie was stuck in sneak when I was working my way through a dungeon. At first I didn't notice anything, but when combat started she would creep very slowly towards the enemy. From companion mods I have made for myself, I immediately knew what the problem was. Usually when companions start combat when not sneaking, they run around attacking everything in sight alerting the whole dungeon of our presence.

So I decided to look at the code to see what was up. I was shocked on how little code there was. As soon as I saw the ref variable 'GetSelf' I knew that wasn't right. I hit compile and got this error "The identifier 'GetSelf' is reserved for a script command". So I commented out the line:

Code: Select all

ref Getself
and compiled again and got this error "Unknown referenced objedt 'GetSelf'" on the line:

Code: Select all

if (GetSelf.GetForceSneak == 0) && (player.IsSneaking == 1)'
So I removed all the 'GetSelf 'qualifiers in the script and it compiled fine. Since the function 'GetForceSneak' was being run on the owner of the script, qualifiers aren't needed.

One thing I noticed was the readme wasn't really clear how to put her in sneak mode. I was under the impression that she would what I would do. If I was in sneak so would she, and when I wasn't in sneak neither was she. But when I looked at the code, I saw that she would be put in whatever mode I was in when I activated her. I like it this way. I could put her in sneak and then I could go in and out of sneak without affecting her. When in dungeons, I go in and out of sneak all the time but having her in sneak mode kept her under control.

So anyway I love these mods. I have a companion mod I created that is so complicated with menus and doing all sort of things that aren't really needed that I spend more time working on it than playing with it. They also suffered from the standing around bug you mentioned. I may take your script and add some of the things I was working on. I would like to issue a few more commands, but of course, without menus. With OBSE I can capture key-presses and use that to add more commands. One thing I would like to be able to toggle is whether companions should chase fleeing enemies. Sometimes it is a good thing and other times it is a really bad thing for the player. Rosie sometimes likes to take off chasing a wolf while I get the tar beat out of me by a bunch of goblins!!! I have the code to stop the chasing so that isn't a problem.
User avatar
Maigrets
Admin
Posts: 1557
Joined: October 2nd, 2008
Gender: Female
Born in: 1954
Location: Australia
Contact:

So I decided to look at the code to see what was up. I was shocked on how little code there was. As soon as I saw the ref variable 'GetSelf' I knew that wasn't right. I hit compile and got this error "The identifier 'GetSelf' is reserved for a script command". So I commented out the line:
Really? :-o It's a simple mod so the script is small, however there are packages that handle everything else like follow and wait.

I use a lot of OBSE mods. I just don't script with it and I just use the basic CS. The problem on your end seems to be OBSE and the Extender which I don't need or use for modding.
When I first installed Rosie I put her in sneak mode to see how it worked, everything seemed fine. I took her out of sneak mode and again everything seemed fine. I noticed that Rosie was stuck in sneak when I was working my way through a dungeon. At first I didn't notice anything, but when combat started she would creep very slowly towards the enemy. From companion mods I have made for myself, I immediately knew what the problem was. Usually when companions start combat when not sneaking, they run around attacking everything in sight alerting the whole dungeon of our presence.
I don't see how that's possible. The sneak function relies on the player's sneak skill or so the research I did at the time indicated and it works for me and lots of others. If I sneak around enemies undetected she doesn't react and enter combat. BUT, as soon as I am detected or when I go out of sneak on purpose she attacks anything that moves as she should. I've tested this over and over and it works so I don't know what's happening for you.
One thing I noticed was the readme wasn't really clear how to put her in sneak mode. I was under the impression that she would what I would do. If I was in sneak so would she, and when I wasn't in sneak neither was she. But when I looked at the code, I saw that she would be put in whatever mode I was in when I activated her. I like it this way. I could put her in sneak and then I could go in and out of sneak without affecting her. When in dungeons, I go in and out of sneak all the time but having her in sneak mode kept her under control.
That's exactly what happens for me. I sneak, she sneaks. I enter combat, so does she. If I'm just out walking and haven't seen an enemy but she does she will go after it, unless of course I was sneaking to begin with. I personally don't mind that she chases because I use WAC and Maskar's Overhaul and I don't like surprises...lol.
I usually have a couple of my companions with me at all times for that reason.

That's the reason there's no other mention in the Readme. It's all automatic with no need to command her to do anything except follow and wait. I have never seen her or any of the others continue to sneak around when I'm in combat. I have had comments from people about my panther in particular who uses the same scripts, where the player is very happy with how it works. This is where the player is role playing a character from a book that has a panther companion. I can't remember the name of it at the moment....it's 5AM...been up all night playing Dark Souls.
Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it sayingEnd Of The World Switch PLEASE DO NOT TOUCHthe paint wouldn't even have time to dry. Terry Pratchett
User avatar
MasterAub
The Second
Posts: 377
Joined: July 3rd, 2009
Gender: Male
Born in: 1970
Location: Paris

Hi Milotek,

Personnally I've used Maigrets companion for years (no we're note getting younger on this one lol) and the mod works perfectly fine. Moreover I've used gazillion times Maigrets tutorial to build my own WAC companions and everything worked fine.
It's a terrific and simple tutorial. The beauty of Maigrets companion is that in game the behavior of the companion is terrific and "on target" and all of this is achieved through the simplest way. In other word this is my definition of a "perfect mod". Not much scripting and maximum impact in game.
All this to say that I thing the problems might be on your end. You should look into mod conflict.

Let us know...
un ami qui cesse de l'être ne la jamais été
User avatar
Maigrets
Admin
Posts: 1557
Joined: October 2nd, 2008
Gender: Female
Born in: 1954
Location: Australia
Contact:

MasterAub wrote:Hi Milotek,

Personnally I've used Maigrets companion for years (no we're note getting younger on this one lol) and the mod works perfectly fine. Moreover I've used gazillion times Maigrets tutorial to build my own WAC companions and everything worked fine.
It's a terrific and simple tutorial. The beauty of Maigrets companion is that in game the behavior of the companion is terrific and "on target" and all of this is achieved through the simplest way. In other word this is my definition of a "perfect mod". Not much scripting and maximum impact in game.
All this to say that I thing the problems might be in your end. You should look into mod conflict.

Let us know...
Thankyou. :)

I knew I wasn't imagining things. All the other people who have used my companions over the years say the same so as you say MasterAub, it's not a problem on my end and I'm not going to fix what's not broken.
Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it sayingEnd Of The World Switch PLEASE DO NOT TOUCHthe paint wouldn't even have time to dry. Terry Pratchett
milotek
Unsteady Sworduser
Posts: 7
Joined: February 14th, 2014
Gender: Male

I don't see how that's possible. The sneak function relies on the player's sneak skill or so the research I did at the time indicated and it works for me and lots of others. If I sneak around enemies undetected she doesn't react and enter combat. BUT, as soon as I am detected or when I go out of sneak on purpose she attacks anything that moves as she should. I've tested this over and over and it works so I don't know what's happening for you.
No you misunderstood me here. If I am in sneak mode and so is Rosie, she doesn't enter combat until I am detected. That works just fine. I am not sure how her sneak and the player's sneak work together but that isn't the issue, so I am fine with that also.

The problem I have is when the player is detected and I go out of sneak, she stays in sneak. She does attack but instead of running up to the enemy she moves very slowly(sneaks) to the enemy. Again this really isn't a problem for me as I like her staying in the mode I select for her and not the mode I am in.
That's exactly what happens for me. I sneak, she sneaks.
This is where I disagree with what what you say. If you look at the code, the only way you can change her from sneaking to not sneaking is when she is activated. If that part of the code doesn't control her sneaking why is it there? What does it do? This is the section in question:

Code: Select all

   if (GetSelf.GetForceSneak == 0) && (player.IsSneaking == 1)
         GetSelf.SetForceSneak 1
        elseif (GetSelf.GetForceSneak == 1) && (player.IsSneaking == 0)
         GetSelf.SetForceSneak 0
      endif
This is in an ACTIVATE block so it only fires when activated right? In my opinion, if yo wanted it to work the way you say it should, you would have to put that section of code in a GAMEMODE block. That way it will continually check for what mode you are in and set her accordingly. Make sense right?

But the issue isn't what your intension are with the mod. I was just curious on how you wanted it to work.

You stated you use OBSE for other mods, so having it installed probably isn't the issue. CS Extender doesn't change how function works at all. It does catch compile errors that regular CS lets slide. So that probably isn't the issue either. That fact that regular CS compiles this part of the code doesn't mean it should work.

To me the problem is the way 'GefSelf' is being used. You cannot use a function to call a function whether using OBSE or not or regular CS or CS Extender. 'GetSelf.SetForceSneak' should never work from what I understand. 'GetSelf' and 'SetForceSneak' are both function so they cannot be strung together. The WIKI page agrees with me here.

From the WIKI page:
... 'GetSelf' must be recorded to a script variable before it can be used.
Meaing you would need to use this code to get it to work:

Code: Select all

ref rRosie
set rRosie to GetSelf
   if (rRosie.GetForceSneak == 0) && (player.IsSneaking == 1)
         rRosie.SetForceSneak 1
   elseif (rRosie.GetForceSneak == 1) && (player.IsSneaking == 0)
         rRosie.SetForceSneak 0
   endif
But as I stated in my last post, since the script is attached to Rosie no qualifiers are need so this code will work just the same:

Code: Select all

ref rRosie
   if (GetForceSneak == 0) && (player.IsSneaking == 1)
         SetForceSneak 1
   elseif (GetForceSneak == 1) && (player.IsSneaking == 0)
         SetForceSneak 0
   endif
It isn't easy to tell that she gets stuck in sneak mode. She will still run to catch up with you when following, walk normally when not in combat. The easiest way to see if she is stuck in sneak mode is how she reacts when combat starts. If she runs to the enemy she is not in sneak but if she slowly walks to the enemy then she is in sneak mode. Another way to test is to open up the console click on Rosie and type issneaking. You will get a message about what mode she is in. Try it when the player is standing and sneaking and see what you get.

I hope I am not offending anyone with these posts. I am just trying to learn what can. All TES scripting is to say the least awkward. I have been coding for computers since the mid 1980s and find TES scripting frustrating. I sometimes wonder what the coders of the game were thinking!!!!
I knew I wasn't imagining things. All the other people who have used my companions over the years say the same so as you say MasterAub, it's not a problem on my end and I'm not going to fix what's not broken.
I'm not asking you to fix anything. If it works for the masses then that fine with me. I just wanted you to be aware of what might be going on.
User avatar
Maigrets
Admin
Posts: 1557
Joined: October 2nd, 2008
Gender: Female
Born in: 1954
Location: Australia
Contact:

If you think scripting engine is hard you should try Skyrim's. It's abysmal. It's slow in game and the cause of many big problems.

Anyway, that's beside the point. I'm not offended. I just don't see why something does not work for you and it does for me and all the people who downloaded and commented on my mods.

It's not only comments on the mod pages. To this day I get emails thanking me for my companions, the simplicity of them and that they do what they are supposed to do.

What is happening to you has never happened to me. You can't "put" her into and out of sneak mode except by performing the action yourself and having her follow your lead.
I'm not asking you to fix anything. If it works for the masses then that fine with me. I just wanted you to be aware of what might be going on.
That's my point though. It works for everyone else, or at least all the people who've told me so, so why is it a problem? I get why you are telling me but really I can't see any point in changing it.

Of course if you want to adapt the script for your own use, go ahead. It's free to use and available for anyone in my tutorial, which I have also had many people comment favourably on. Some recent creature companions have also been made where people have credited me for the tutorial which I created because there was almost no information on how to go about making creature companions.
Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it sayingEnd Of The World Switch PLEASE DO NOT TOUCHthe paint wouldn't even have time to dry. Terry Pratchett
milotek
Unsteady Sworduser
Posts: 7
Joined: February 14th, 2014
Gender: Male

I am sorry I brought this up. If your own curiosity doesn't make it so you don't want to investigate it more for your own knowledge thats fine. I am not angry but a little confused. I can guarantee that the code that controls the sneak activation in the ACTIVATE block only runs when she is clicked on. That's what the ACTIVATE block is all about. But again that isn't my issue.

My issue is with the broken code in the ACTIVATE block. The use of 'GetSelf' is flawed. I want to say that it is a fact but with as crazy as this scripting is I just cant say that.

Anyway this was fun.
User avatar
Maigrets
Admin
Posts: 1557
Joined: October 2nd, 2008
Gender: Female
Born in: 1954
Location: Australia
Contact:

milotek wrote:I am sorry I brought this up. If your own curiosity doesn't make it so you don't want to investigate it more for your own knowledge thats fine. I am not angry but a little confused. I can guarantee that the code that controls the sneak activation in the ACTIVATE block only runs when she is clicked on. That's what the ACTIVATE block is all about. But again that isn't my issue.

My issue is with the broken code in the ACTIVATE block. The use of 'GetSelf' is flawed. I want to say that it is a fact but with as crazy as this scripting is I just cant say that.

Anyway this was fun.
OK, now I am annoyed. ;-(( Angry? Why the heck should you be angry and by what right is a better question? :-o You've done what you obviously felt was your duty, so the fun stops when you persist in telling me something doesn't work when I know it does.
If your own curiosity doesn't make it so you don't want to investigate it more for your own knowledge thats fine.
Of course it's fine if I don't care to investigate something that works and has made a lot of people happy over the years. The sentence I quoted above could easily be taken as an insult you know. I was curious enough when I researched and created my mods, and that was a lot of work for me since I'd never done anything like it before.

I made those mods years ago and also stopped playing the game a long time ago, except for a brief return a few months ago, and I am NOT curious about changing something that I believe works. I haven't had a single complaint until now, so please just drop it.

Oblivion is old now and people have moved on. Players were barely interested in creature companions back then, so the few new players who come along in the future won't care much either. I am certainly not going to be loading all of my mods in the CS and changing their scripts for an old game.

My tutorial is at TES Alliance as well as other places. The people at TESA are extremely knowledgeable, people there have used it, so why has no-one in all this time made the observation you have?

Whatever the case I don't want to hear any more about it.
Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it sayingEnd Of The World Switch PLEASE DO NOT TOUCHthe paint wouldn't even have time to dry. Terry Pratchett
milotek
Unsteady Sworduser
Posts: 7
Joined: February 14th, 2014
Gender: Male

First of all I never intended to insult you or your work. I also didn't know you were no longer working with Oblivion. I had just downloaded your one mod a couple days ago and the readme lead me here to discuss what I had found. I figured since you were an Admin that you were still active. I had no idea that your mods worked fine for everyone but me. Thats why I came here was to find out what was what. I probably should have started this thread a little differently. I should have just asked if anyone else had these issues.

What I meant about being angry was that I hoped I didn't sound angry. I am actually quite calm as this is just a game. All I was trying to do is present what I had found. Never in my wildest dreams would I have thought that things would get this way.

I would like to be able to discuss my concerns with others but I am not sure where and how to go about it, but that is for me to figure out.

So I hope there is no hard feelings. I meant no harm.

Boy I know how to make a first impression at a forum.
User avatar
MasterAub
The Second
Posts: 377
Joined: July 3rd, 2009
Gender: Male
Born in: 1970
Location: Paris

milotek wrote:I am sorry I brought this up. If your own curiosity doesn't make it so you don't want to investigate it more for your own knowledge thats fine. I am not angry but a little confused. I can guarantee that the code that controls the sneak activation in the ACTIVATE block only runs when she is clicked on. That's what the ACTIVATE block is all about. But again that isn't my issue.

My issue is with the broken code in the ACTIVATE block. The use of 'GetSelf' is flawed. I want to say that it is a fact but with as crazy as this scripting is I just cant say that.

Anyway this was fun.
I think I understand. You have a Short DoOnce, so in fact the activation only needs to be done once. Basically if you've activated Rosie one time (at the beginning) it should be working just fine. I haven't code Oblivion for about 2 years now and never was a good but this is my two cents...
I've installed Oblivion on my computer and I'll test companion Rosie over the weekend. I will let you know on Monday.
un ami qui cesse de l'être ne la jamais été
User avatar
Maigrets
Admin
Posts: 1557
Joined: October 2nd, 2008
Gender: Female
Born in: 1954
Location: Australia
Contact:

@ milotek,
No hard feelings here either. :)

I just want you to realize it's not something I'm going to look at since it's been years and there's little point from my perspective. I was thinking about making more companions but in reality I've lost the "feel" for TES games in general, especially since the mess that is Skyrim.

Who knows, maybe in 6 months I'll have a change of heart and find the enthusiasm to do something about it, but I'll probably be playing different, less buggy games by then. As I mentioned I installed Oblivion a few months ago, got all enthused for a short time, made a new companion and planned a couple more, but that quickly wore off and I haven't booted the game since.

I still don't understand why, when I've posted this script in a number of places including the CS forums, at times asking for help about something else, no-one has mentioned this before. I got the answers I requested from well known scripters, yet none of them noticed anything wrong with that sequence.

You're more than welcome to use and adapt the script if you wish. :)

@MasterAub
The Short DoOnce is for the summon spell so it only executes once, which is correct. You don't want the spell spamming every time she's activated.
Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it sayingEnd Of The World Switch PLEASE DO NOT TOUCHthe paint wouldn't even have time to dry. Terry Pratchett
milotek
Unsteady Sworduser
Posts: 7
Joined: February 14th, 2014
Gender: Male

Thanks for understanding that I meant no harm.

Think about what you said in this statement:
@MasterAub
The Short DoOnce is for the summon spell so it only executes once, which is correct. You don't want the spell spamming every time she's activated.
The DoOnce is to keep the spell from constantly being added when activated. OK, the sneak toggle code is also in the activative block, right? So it only runs when its activated. Your own words support this. The reason others may not have said to you its and error is because its not a error in code. Other than the 'GetSelf' not being used right the actual code is legit. Again I like it working this way, so I haven't changed it in my game.

The 'GetSelf' is a different matter as it breaks the toggling of the dog sneaking. I'm going to contact some modders I know about this. I can understand why the users of the mod might not of notice the problem, but seasoned modders should. I knew before I compiled it that it was going to be a the problem.

I am going to look into it more, maybe I am wrong, It happens more than I like. But hey, the only way I learn is by questioning everything. Doesn't matter who is wrong or right, only the facts matter.

I haven't tried Skyrim and probably never will. I have heard the stories. I still play Oblivion to test out all sorts of mods to see what people are doing to improve it. Up until a couple months ago, I hadn't played in more than 4+ years.
User avatar
Maigrets
Admin
Posts: 1557
Joined: October 2nd, 2008
Gender: Female
Born in: 1954
Location: Australia
Contact:

You know what...The Official CS Wiki is and has always been useless which is why I had so much trouble finding info. ;-(( Half the pages have no info, especially if using the search function, and the ones that do aren't user friendly.

Anyway, I've just been looking around there, and a few other reference pages, to understand what you're telling me which I think I'm now seeing, so I guess I'm a bit thick. I had trouble learning to do the basic scripting that I managed for my companions so when it gets more complicated, it gives me a headache...lol. The thing that's been a stumbling block is that it appears to work in game, or at least I've never seen the behaviour you describe.

That's not a reason why I didn't use menus though...I still didn't want that for the reasons I already outlined. I prefer my companions to keep their idles and be as natural as possible.

After all this time it's a bit confusing and I'm a bit let down that after all this time no-one has seen this and that includes the gurus on the CS forum. The only person, as I said before, who really helped me was Jumonji and that was for the script before I added the sneak function and adding the spell.

If you hear back from the other people you are contacting, I'd be interested to hear. Who knows, maybe I will update some of my mods. Not all of them need the sneak function though as some are just pets set to flee on combat start.
I haven't tried Skyrim and probably never will. I have heard the stories. I still play Oblivion to test out all sorts of mods to see what people are doing to improve it. Up until a couple months ago, I hadn't played in more than 4+ years.
You're not missing much really. One vanilla playthrough was more than enough and then adding mods is like running through a minefield. I like the better combat, the world design for the most part and dragons, but the instability of the game, even vanilla after all the patches, is depressing and makes the rest of the game like a game of dice. Will my save corrupt for no apparent reason today, crash out of nowhere every 5 minutes when it was fine the day before etc, etc.

The Official patch before the last one was a lot better, but they messed something up again and then withdrew support so we're stuck with it.

BTW, when you said earlier that you thought I was still active...I am in the Skyrim section of the forum, but I've been playing Morrowind again and Fallout New Vegas, among others and they are all shoved in there since it's not very busy here. Even my latest Oblivion thread is in there.
Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it sayingEnd Of The World Switch PLEASE DO NOT TOUCHthe paint wouldn't even have time to dry. Terry Pratchett
milotek
Unsteady Sworduser
Posts: 7
Joined: February 14th, 2014
Gender: Male

Yea the wiki can be a bit annoying but I usually can find and understand the basic commands. I do wish it was better though. Luckily there are plenty of forums to help out. Actually troubleshooting and testing code is what I did daily for years. So I can take what I learn and throughly test it.

Your sneak code is correct it just isn't in the right place for what you want it to do. Put it in a GameMode block and it will do exactly what you wanted. In a companion mod I made, I use that same basic code to make the companion do what I call 'do what I do' mode. As you can see in this code, it is pretty much like your sneak code:

Code: Select all

		if (GetForceSneak == 0) && (rPlayer.IsSneaking == 1)
			SetForceSneak 1
			Let strTemp := aaaMTRcDogQUEST.msgStanceCurrent[1]
			MessageEX "%n, %z" rDog, strTemp
		elseif  (GetForceSneak == 1) && (rPlayer.IsSneaking == 0)
			SetForceSneak 0
			Let strTemp := aaaMTRcDogQUEST.msgStanceCurrent[0]
			MessageEX "%n, %z" rDog, strTemp
		endif
Actually the fact that you used no menus is why I started using your mods. They were simple and very useful, gotta love that. My mods also suffer from idle issues and I really don't like that. Plus most of my code is for the menu. The system for doing menus in this game is quite bad.

Most of the contacts on modding that I had were very long ago, I'm trying to remember who most of them were and what forums. The modding I have done lately I have only had a couple people help me out. Mainly the OBSE website and Bethesda Softworks Forums. QQuix was the name. I got a lot of help with my current companion mod. I received very helpful information. I will look into contacting, and maybe start a thread over there. I will keep your mod out of it and present it as if I just need help. It will help keep the discussion more focused on the issue and not with your mod.

I have Morrowind loaded and it is still the best. One of the reasons I reloaded Oblivion was to check out the Morroblivion project. I haven't tried it yet though.
User avatar
Maigrets
Admin
Posts: 1557
Joined: October 2nd, 2008
Gender: Female
Born in: 1954
Location: Australia
Contact:

QQuix is a genius as far as I'm concerned. I used to frequent the Bethsoft CS forum when I was modding and the things he and many of the other scripters would show was amazing, and probably still is.

I wish I had had a background in programing. It would have made things a lot easier.

Morrowind is still my favourite of the series. I'm using the Sound and Graphics Overhaul and the game is as stable as a rock. And very beautiful.
Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it sayingEnd Of The World Switch PLEASE DO NOT TOUCHthe paint wouldn't even have time to dry. Terry Pratchett
Post Reply