Update, If anyone wants to help, feel free to write up any one of these not listed in green and send it to me, or even better, post it here.
See this post here:
http://www.bethsoft.com/bgsforums/index.ph...t&p=9996919

Firstly, I have got permission from GhanBuriGhan to do this.

Morrowind Scripting for Dummies 8 is great. It includes all the scripting functions etc. The one problem with it is that it doesn't include all the quirks that have been discovered since is was written. For example, it doesn't include anything on why you shouldn't use the AddToLevCreature related functions. The problem with ForceGreeting in if-elseif blocks etc.
It also has the odd error in it, e.g. it says that you cannot use activate on loaddoors, infact you can, but you have to use it with OnActivate.

Here is a quick list of things that need adding/changing (Off the top of my head, so it isn't anywhere near complete)
Messagebox - Multiple messageboxs (Including journal updates) in the same frame can cause a CTD
Activate - Works with Loaddoor
ForceGreeting - If you use it in a If/Esleif/Else block, it will execute the following elseif/else rather than skiping them
AddToLevCreature - How it breaks other mods that use leveled lists
Targeted Scripts - Needs info on using OnActivate with targeted scripts
GetCurrentTime - V.8 Has no info on it
Doubling - Very old info on doubling needs an update
GetWindSpeed - Info on how to detect interiors acting like exteriors using this
CellChanged - Doesn't work for scripted teleporting etc
SetStat - Why you shouldn't use it
GetTarget - Fixed erronious info
PlayBink - Added info on conveting files to .bik etc
Clarifying the difference between a local and global script

Startscript - Problem with startscript re-running scripts
Indenting - Add Manausers Morrowind Script Indenter
GetPos, Y - When the value is converted to a long, the vaule will change if you have moves on the Y axis as well (unconfirmed)
Math - Sort out reference to Soralis' Math Mod (It doesn't exist on PES) - I have the math mod, so it can be reuploaded.



"Actor_ID" -> Equip, "p_restore_health_q" p 36 is wrong potions are not drunken by NPC's when equip ....
Maximum of 255 instructions (not lines)
Advise that (in general) reducing the number of scripts running improves efficiency more than reducing the complexity of individual scripts.
34th variable bug

math - loads of maths stuff
Remote communication between Global / Targeted Scripts
Pos FPS hogs and tips to avoid them


Chargen State Bug
GetWeaponDrawn Problem
http://www.bethsoft.com/bgsforums/index.ph...t&p=8001859

Updating local variable from script/object. More details
http://www.bethsoft.com/bgsforums/index.ph...t&p=8053380

Dialog notes:
http://www.bethsoft.com/bgsforums/index.ph...t&p=8183967
Note: May just need copy paste.

RemoveSpellEffects
http://www.bethsoft.com/bgsforums/index.ph...t&p=8384287

Fall
http://www.bethsoft.com/bgsforums/index.ph...t&p=8384287

Info on using Curse:
http://www.bethsoft.com/bgsforums/index.ph...t&p=8942914

Load of info on stuff:
http://www.bethsoft.com/bgsforums/index.ph...t&p=9611691

Gamesettings:
http://www.bethsoft.com/bgsforums/index.ph...t&p=9675763

GetWeaponType bug:
http://www.bethsoft.com/bgsforums/index.ph...t&p=9995291

Targeted Script Problems:
http://www.bethsoft.com/bgsforums/index.ph...t&p=9996919


Basically, anything that you think needs changing/adding/removing feel free to say.

Many thanks,
~Yacoby
Great News !!! good one foodndrink.gif
Need to get back later with a list but :

Remote communication between Global / Targeted Scripts

Pos FPS hogs and tips to avoid them

"Actor_ID" -> Equip, "p_restore_health_q" p 36 is wrong potions are not drunken by NPC's when equip ....

Get/Mod/SetSwimSpeed p 113 broken ....

more to follow
This is an awesome idea!

Ditto that, I'll come up with more later, I haven't got much right now.

I was gonna mention the potions one but I guess it's been said. You could mention ways around it?

And there are a couple of typos I noticed in there ...
QUOTE(Yacoby @ Sep 5 2006, 12:08 PM) *

Firstly, I have got permission from GhanBuriGhan to do this.

Morrowind Scripting for Dummies 8 is great. It includeds all the scripting functions etc. The one problem with it is that it doesn't include all the quirks that have been descovered since is was written.


First: yes, you have my blessings and godspeed smile.gif

I'll try to dig up my changelog stuff, couple things people have sent in over the years, and either post it here or send it to Yacoby directly.

Ghan

Good to see. Feel free to use my modstat/setstat info (I PMed).

Other thoughts:
It'd be nice to include some more info on scripting limits, e.g.

Maximum of 255 instructions (not lines) within an IF...ENDIF block or WHILE...ENDWHILE block.
Blanks / comments don't count, but some lines become two instructions, for example I think this is two:
Set anotherScript.someVariable to ( actorID->GetStrength )

Nesting While loops does not work [EDIT: NOT CORRECT - there must have been something else wrong]


Advise that (in general) reducing the number of scripts running improves efficiency more than reducing the complexity of individual scripts.
So, for example, if two short global scripts will always run at the same time, it makes sense to combine them.

Or if you've got a few global scripts which only need to run based on some check, it makes sense to place the checks in one "parent" script, and startscript the others from there when they need to run (remembering to ensure to run them once per game session if they need to conserve variable values).

The extra overhead of starting and stopping the child scripts is insignificant compared to the saving through putting all the checks in one script. (although startscripting can cause other scripts to run more than once in a frame, that should be less of an issue when the script doing the startscripting has been running for a long time - so is likely near the start of the script queue. This is because only scripts earlier in the queue than the calling script will be run twice. [at least I think this makes sense ??? - correct me if I'm wrong]).


34th variable bug
The 34th variable of a given type (e.g. float) in a script can be confused with a double-quote character by the compiler (under some circumstances). This can lead to a load of weird issues (and adding messageboxes to detect the problem can fix/change the problem - until you remove them, of course banghead.gif).

Declaring the 34th variable of a given type as e.g.:
float UNUSED

should avoid trouble (clearly you don't use it smile.gif).

Personally I've found that using many more than 34 shorts is fine, while floats cause trouble. Others have reported trouble with shorts too.


A script to check (NOT always correctly) for scripts being run multiple times in one frame:
(Taken from the "soon"-to-be-released new version of GCD)
Clearly it'd be best to put this sort of script in a utility mod of some sort which every user should use. That way other mods can simply include and check the e.g. UTIL_FrameNotChanged variable, rather than putting in another copy of the same script.

This could go for various other commonly required checks too, e.g. finding the current, maximum, and ratio of health/magicka/fatigue where there aren't direct functions to calculate these. The checks could be performed once per frame in one fairly large script which updates some globals. Any mod then wanting e.g. the ratio of current fatigue to maximum fatigue, could simply use a getFatigueRatio global, rather than do the calculations.

This sort of thing could (theoretically) be simpler and more efficient than the current every-modder-for-himself approach. However, it would have been most important a few years ago (unless anyone fancies rewriting half the mods in existence).

It's a thought in any case smile.gif.
CODE
Begin Gals_NewFrameCheck

;this script sets the Gals_FrameNotChanged global variable to 1 if the
;frame is *probably* the same. So where startscript commands would
;cause scripts to run many times in one frame, they can return if Gals_FrameNotChanged == 1.

float oldGameHour
float oldSecondsPassed
short constantFrameRateTimeout

;by default, assume this is a new frame
Set Gals_FrameNotChanged to 0

;when not in menu, check GameHour - if it's not increasing (it's a float), we're in the same frame.
;(if some nutter has stopped time, use the GetSecondsPassed check below instead.)
if ( menumode == 0 )
    if ( TimeScale != 0 )    
        if ( oldGameHour == GameHour )
            Set Gals_FrameNotChanged to 1
        else
            Set oldGameHour to GameHour
        endif
        return
    endif
endif


;When in menu, assume we're in the same frame if GetSecondsPassed returns the same as last time.
;This only usually works - sometimes GetSecondsPassed will happen to be the same two frames in a row.
;It's possible that constant framerates might lead to GetSecondsPassed returning the same value repeatedly.
;[this could happen for very low framerates, (GSP never returns > 0.2), or high capped framerates].
;For this reason, if the same value is returned 20 times in a row, the frame is assumed to have changed.
;So, when in menu, the Gals_FrameNotChanged variable is a good indicator, but can be wrong in both directions.

if ( GetSecondsPassed == oldSecondsPassed )
    Set constantFrameRateTimeout to ( constantFrameRateTimeout + 1 )
    if ( constantFrameRateTimeout == 20 )
        Set constantFrameRateTimeout to 0
    else
        Set Gals_FrameNotChanged to 1
    endif
else
    Set oldSecondsPassed to GetSecondsPassed
    Set constantFrameRateTimeout to 0
endif

End Gals_NewFrameCheck

Then this can be added to any script which shouldn't be run more than once in a frame:
CODE
;-------------------------------------------------------------
;Don't run twice in the same frame
;-------------------------------------------------------------
if ( Gals_FrameNotChanged == 1 )
    return
endif
;-------------------------------------------------------------


That's all I can think of at the moment.
QUOTE(Galsiah @ Sep 6 2006, 03:38 AM) *

A script to check (NOT always correctly) for scripts being run multiple times in one frame:
(Taken from the "soon"-to-be-released new version of GCD)
Clearly it'd be best to put this sort of script in a utility mod of some sort which every user should use. That way other mods can simply include and check the e.g. UTIL_FrameNotChanged variable, rather than putting in another copy of the same script.

I don't know if this occurs, but couldn't it happen that this script runs twice before another script has run once. That would keep that script from running that frame. that might be an issue, not sure.

For a long time I've wanted an update on MSFD, so I'm looking forward to this!
So happy to hear about this! I want to read it NOW!! biggrin.gif

Definitely include the 34th variable bug - that caused me so much grief before someone tipped me off about it. It definitely happens with the 34th short as well as floats.

And I'm interested to know the circumstances in which activate works on loaddoors - I tried it recently, with a GetDistance check to try to make a move from an exterior to an interior feel like an exterior-to-exterior "cellchange", but it wasn't having it.

K.
Hello,

This is a very good news. smile.gif
An useful thread about get/mod/set stat:
http://www.elderscrolls.com/forums/index.p...&hl=modstat
It should probably be added to the new MSFD
Edit: About levelled lists:
http://www.elderscrolls.com/forums/index.p...amp;hl=levelled

Bjam
QUOTE(Björn @ Sep 6 2006, 09:41 AM) *
I don't know if this occurs, but couldn't it happen that this script runs twice before another script has run once. That would keep that script from running that frame. that might be an issue, not sure.
Damnit. You're right.

In that case, the only reliable method might be to put a gamehour check (and perhaps the rest for scripts that run in menumode) at the top of every script which mustn't run more than once. That's rather annoying.

However, the script as it stands still might be useful. E.g. if it is not important that your script runs every frame, but is important that it doesn't run multiple times.

I can't think of a way to put it right - perhaps there isn't one. It does work quite well as it stands for startscripts in newly started scripts. Such scripts will be at/near the end of the queue, so all/most other scripts will have already run by the time the startscript occurs. This will help in the worst case, where you have a chain of scripts starting one after the other.

I'll try to think of a way to get things working more accurately.
Thanks for the thought.
QUOTE(exclusiveor77 @ Sep 5 2006, 05:10 PM) *

Great News !!! good one foodndrink.gif
Need to get back later with a list but :

Remote communication between Global / Targeted Scripts

Pos FPS hogs and tips to avoid them

"Actor_ID" -> Equip, "p_restore_health_q" p 36 is wrong potions are not drunken by NPC's when equip ....

Get/Mod/SetSwimSpeed p 113 broken ....

more to follow

Cool Thanks smile.gif


QUOTE(Danjb @ Sep 5 2006, 05:54 PM) *


I was gonna mention the potions one but I guess it's been said. You could mention ways around it?


Yup

QUOTE(GhanBuriGhan @ Sep 5 2006, 09:54 PM) *

First: yes, you have my blessings and godspeed smile.gif

I'll try to dig up my changelog stuff, couple things people have sent in over the years, and either post it here or send it to Yacoby directly.

Ghan

smile.gif

QUOTE(Galsiah @ Sep 6 2006, 02:38 AM) *


<SNIP>


Wow, thanks smile.gif


QUOTE(Kateri @ Sep 6 2006, 10:45 AM) *

And I'm interested to know the circumstances in which activate works on loaddoors - I tried it recently, with a GetDistance check to try to make a move from an exterior to an interior feel like an exterior-to-exterior "cellchange", but it wasn't having it.

I think you have to have activated the door (Which would have got caught by the OnActivate) and then you can use activate. I think. I may need to look into it


QUOTE(bjam @ Sep 6 2006, 11:51 AM) *

Hello,

This is a very good news. smile.gif
An useful thread about get/mod/set stat:
http://www.elderscrolls.com/forums/index.p...&hl=modstat
It should probably be added to the new MSFD
Edit: About levelled lists:
http://www.elderscrolls.com/forums/index.p...amp;hl=levelled

Bjam

Thanks for the links

QUOTE

For a long time I've wanted an update on MSFD, so I'm looking forward to this!

I hope I can live up to your expectations

QUOTE(Björn @ Sep 6 2006, 09:41 AM) *

I don't know if this occurs, but couldn't it happen that this script runs twice before another script has run once. That would keep that script from running that frame. that might be an issue, not sure.



QUOTE(Galsiah @ Sep 6 2006, 04:01 PM) *

I can't think of a way to put it right - perhaps there isn't one.

My logic may be totaly flawed on this, but don't you just need to keep Gals_NewFrameCheck below all of your scripts?

So when you start a script (from GCD), you would need to send Gals_NewFrameCheck to the bottom of the script que. I am assuming you could do this by using stopscript and then a startscript shrug.gif
QUOTE(Yacoby @ Sep 5 2006, 06:08 PM) *

Firstly, I have got permission from GhanBuriGhan to do this.

Morrowind Scripting for Dummies 8 is great. It includeds all the scripting functions etc. The one problem with it is that it doesn't include all the quirks that have been descovered since is was written. For example, it doesn't include anything on why you shouldn't use the AddToLevCreature related functions. The problem with ForceGreeting in if-elseif blocks etc.
It also has the odd error in it, e.g. it says that you cannot use activate on loaddoors, infact you can, but you have to use it with OnActivate.

Here is a quick list of things that need adding/changing (Off the top of my head, so it isn't anywhere near complete)
Messagebox - Multiple messageboxs (Including journal updates) in the same frame can cause a CTD
Activate - Works with Loaddoor
SetStat - Why you shouldn't use it
ForceGreeting - If you use it in a If/Esleif/Else block, it will execute the following elseif/else rather than skiping them
AddToLevCreature - How it breaks other mods that use leveled lists
Math - Sort out refrance to Soralis' Math Mod (It doesn't exist on PES)
CellChanged - Doesn't work for scripted teleporting etc
Targeted Scripts - Needs info on using OnActivate with targeted scripts
GetPos, X - When the value is converted to a long, the vaule will change if you have moves on the Y axis aswell (unconfirmed)
GetCurrentTime - V.8 Has no info on it
Doubling - Very old info on doubling needs an update
Startscript - Problem with startscript re-running scripts
Indenting - Add Manausers Morrowind Script Indenter
GetWindSpeed - Info on how to detect interiors acting like exteriors using this

Others
"Actor_ID" -> Equip, "p_restore_health_q" p 36 is wrong potions are not drunken by NPC's when equip ....

As that is just the list I have compiled quickly, I know that some of the other scripters arround here have spotted more problems/bugs/issues.

Basicly, anything that you think needs changing/adding/removing feel free to say.

Many thanks,
~Yacoby

Great idea! I'm eagerly awaiting for version 9!

Some suggestions: I'd love to have included most used/recent math scripts (similar to the TES4 wiki)
and possibly web links to mods using the different techniques described for reference.
I.E., Galsiah's pool mod/MadMax's flying/sailing items for sin/cos calculation examples, and so on...


QUOTE(abot @ Sep 6 2006, 05:09 PM) *

Some suggestions:
I'd love to have included most used/recent math scripts (similar to the TES4 wiki)

I can port some of the TES4 wiki stuff over if I need it/it looks better. The UESP Wiki also has a load of maths scripts.
QUOTE(Yacoby @ Sep 6 2006, 04:25 PM) *
My logic may be totaly flawed on this, but don't you just need to keep Gals_NewFrameCheck below all of your scripts?
So when you start a script (from GCD), you would need to send Gals_NewFrameCheck to the bottom of the script que. I am assuming you could do this by using stopscript and then a startscript shrug.gif
That wouldn't quite work - starting + stopping Gals_NewFrameCheck would send it to the bottom of the queue, but that would put scripts from other mods between my other scripts and Gals_NewFrameCheck.

This would lead to the reverse issue - if one of those in between scripts uses a startscript, my other scripts would run twice before Gals_NewFrameCheck ran at all. Equally, if one of my scripts used a startscript, the ones before it would run twice before Gals_NewFrameCheck had a chance to run.

In any case, to guarantee Gals_NewFrameCheck staying at the end, I'd be forever starting and stopping it - i.e. using the commands which cause the trouble in the first place.

Keeping it at the beginning is more of a reasonable prospect, since that just means starting it early and keeping it running. However, as Björn pointed out, that would end up possibly skipping scripts further down the queue.

It's probably doable to use somthing like this within one mod (though I'll need to be careful to avoid problems, and won't be able to solve the issue completely). I had thought it'd be possible to create a general solution for any mod to access using a global. That's just not going to work.

The best that could be done is to place gamehour checks in scripts where running twice would be a problem, and perhaps set a global called something like NewScriptStarted whenever the checking script (at the beginning of the queue) were run twice. Another mod could then check this variable, and possibly decide not to run certain scripts.

All in all, I guess an attempted centralized solution is more trouble than it's worth: best just to leave it to individual scripts to check gamehour (or GetSecondsPassed).

The main priority is to make clear in MSFD9 what happens when a startscript is used.
QUOTE(Galsiah @ Sep 6 2006, 09:19 PM) *

That wouldn't quite work - starting + stopping Gals_NewFrameCheck would send it to the bottom of the queue, but that would put scripts from other mods between my other scripts and Gals_NewFrameCheck.

I knew my logic flawed somewhere banghead.gif

QUOTE

The main priority is to make clear in MSFD9 what happens when a startscript is used.

932.gif
Good to hear about this. If my brain ever starts working again and I come up with anything to add, I most certainly will. biggrin.gif
Remote communication between Global / Targeted Scripts - Isn't this already covered (around pg 25)

well yes but it is a bit 'lite'

http://www.uesp.net/wiki/Tes3Mod:Scripting...ss_of_Variables ; here has a few tips and

well I just meant making the section more clearer

e.g. if your object starts with a numeric eg an NPC 11NPC01 you need quotes

"11NPC01".RemoteVar <- Good
"11NPC01.Remote" <-BAD

actually naming withOUT numbers is much better wink.gif

Also why bother - well we all know that the Number of Vars / Global Vars has an effect on FPS so this keeps the Var number lower - but if your Global/Tagetted script is not running ... etc etc - I am happy to help ...

Using variables in functions - may be a list of which do and which don't - that is also in but its a bit confusing to nooby's - don't forget we all are farmiliar with scripting - I was hoping for a more "make it clear for dummy's" type approach wink.gif

StopScript Delay
Don't count on stopScript stopping execution immediately. StopScript signals Morrowind not to run the global script again. But it does not stop the current execution of the script.

When calling stopScript from the script being stopped, either make sure that the remaining script is okay to be executed, or use a return statement to force the script to stop executing immediately.

a lot of this whole section could be incorporated :
http://www.uesp.net/wiki/Tes3Mod:Scripting_Pitfalls


QUOTE
If ( CellChanged == 1 ) P54

CellChanged returns 1 for one frame when player changes cells. If the script calling this function is local, this function will trigger when the player enters the cell where the script is active – leaving the cell will not trigger the function, because the script terminates before the cell change registers (Thanks to Klinn for this correction). There seems to be a slight bug: teleporting out of a cell reportedly does not trigger this function (unconfirmed) - think it is now confirmed also teleporting out .


I think this is a bit confusing - IMHE (in my humble experience) I have found in global scripts it does accept a fix (at least it compiles) and well it gets set to 1 when you enter - but I always have problems when you "leave" when I get the time I will play a round with it (this weekend) but if someone already has a definite answer ....


Magic

well here I would explain diferences between 'Abilities' (once set cannot remove) Curses (can be +ve and removable) and spells


Weather p 121 typo

is => ChangeWeather, "West Gash", 4
should be => ChangeWeather, "West Gash Region", 4

more later ....

[EDIT] : IDEAS

1) an Appendix on MWSE .... ???
2) Dave's MWEDIT ???? ....

QUOTE(Yacoby @ Sep 6 2006, 04:25 PM) *

I think you have to have activated the door (Which would have got caught by the OnActivate) and then you can use activate. I think. I may need to look into it


Well, yeah, this was my experience... you can Activate it if you've Activated it! wink.gif (no, I do get your point, and yes, those kinds of scripts work, although I have found them to be a bit odd-behaving at times) ...but am I right in thinking that there's no way to teleport the player via "Activating" a loaddoor via script, when the player has not clicked on the door?

K.
QUOTE(exclusiveor77 @ Sep 7 2006, 07:23 AM) *


a lot of this whole section could be incorporated :
http://www.uesp.net/wiki/Tes3Mod:Scripting_Pitfalls

Yup, most of it now is

QUOTE

I think this is a bit confusing - IMHE (in my humble experience) I have found in global scripts it does accept a fix (at least it compiles) and well it gets set to 1 when you enter - but I always have problems when you "leave" when I get the time I will play a round with it (this weekend) but if someone already has a definite answer ....
Magic


CellChange returns 1 when you change cells
it will not return 1 in any of these cases: Magic Teleporting, Scripted Teleporting

It returns one in the cell that the player has just entered. (So after the "loading area" bar)

QUOTE(Kateri @ Sep 7 2006, 10:02 AM) *

Well, yeah, this was my experience... you can Activate it if you've Activated it! wink.gif (no, I do get your point, and yes, those kinds of scripts work, although I have found them to be a bit odd-behaving at times) ...but am I right in thinking that there's no way to teleport the player via "Activating" a loaddoor via script, when the player has not clicked on the door?

K.

Ok, this was just from a quick test

if you have a script on a door
CODE

begin DoorScript

if ( OnActivate )
     Activate
endif

end


When the door has been opened by the player, you can activate it whenever you want

You can also activate a door like this:

CODE
begin Door_Script
    
     float timer
    
    
     if ( OnActivate )
         set timer to 1
     endif
    
     if ( timer >= 1 )
         set timer to ( Timer + Getsecondspassed )
         if ( timer > 5 );4 secs
             activate
             set timer to 0
         endif
     endif
    
end


You cannot activate a door like this
CODE
begin Door_Script
    
     if ( GetDistance, Player < 256 )
         activate
     endif
    
end
QUOTE(Yacoby @ Sep 7 2006, 07:26 AM) *


if you have a script on a door
CODE

begin DoorScript

if ( OnActivate )
     Activate
endif

end


...snip...


This reminds me quite a bit of the problem with activating a container remotely. I find that the container requires the "if (onActivate) Activate" sillyness, just like the door, and it only works *after* the container has been activated normally. After a reload, the container needs to be reactivated normally again for the script to continue working. Very annoying and perplexing.

Probably worth mentioning.

Has anyone else had trouble with detecting the sRestoreFatigue effect? I find that it just doesn't work, but the other effects are detected just fine. I don't recall seeing anyting on this in MSFD 8. Maybe I just missed it.

QUOTE(Yacoby @ Sep 7 2006, 12:26 PM) *


You cannot activate a door like this
CODE
begin Door_Script
    
     if ( GetDistance, Player < 256 )
         activate
     endif
    
end



As I thought. Dang. Thought someone might have found a way. Thanks for the info! smile.gif

K.
I know i've run accross stuff thats not in MSFD but I can't think of any of it right now, I'll probably remember long after all this is done LOL.
Here's what I can think of right now:

CharGenState bug
This bug is probably completely unknown except for me. Whenever a command such as EnableStatsMenu or EnableInventoryMenu is used while CharGenState is other than -1, you will never be able to turn off the menus again with CharGenState. The EnableInventoryMenu command only seems to have this effect in the CharGen process, while EnableStatsMenu has this effect all the time. If the menus were supposed to be turned off in a mod, it won't work. You still can't save or use quick keys. But what really is annoying about this is that this applies for the whole game session! You actually need to exit the game and restart it. And there's no way for a mod to check if this has happened, so you can never rely on that menus will be turned off. I think this is worth mentioning in the CharGenState section, and maybe alternative ways to disable menu access using MenuTest and ToggleMenus.

GetWeaponDrawn
This may or may not be useful information, but I noticed a thing with this function. When a weapon (or lockpick/probe) is broken (or removed with script?(not tested)), you will "equip" hand to hand like we all know. However GetWeaponDrawn will return 0 a few frames inbetween. That could mess things up (it did in my Advanced Lockpicking mod yesterday 'til I figured this out). But maybe it could be useful too, to figure out when something has been used up. Or in combination with DisablePlayerFighting it might be a way to bring down your hands for some reason.

Like everybody else: I'll come up with more.
QUOTE(exclusiveor77 @ Sep 5 2006, 05:10 PM) *

Get/Mod/SetSwimSpeed p 113 broken ....

I gave this some testing, and it seems to work fine.

Did you use player as the infix?
CODE

player->setswimspeed 100


@Bjorn
Thanks smile.gif
I'm pretty sure Get/Set Chameleon doesn't work, but maybe I'm wrong.
QUOTE(Yacoby @ Sep 10 2006, 04:13 PM) *

I gave this some testing, and it seems to work fine.

Did you use player as the infix?
CODE

player->setswimspeed 100


@Bjorn
Thanks smile.gif



Dumstruck - I have a whole thread here and I never got it working plse post script so I can fix mine too

player->setswimspeed 100 - no I went swimming and had a partner was useing Player->GetSwimspeed == 1
messagebox " blah blah"

and an activator

hang on I'll find the thread => 2 Questions : Swimming & Script limit


so plse plse give me yr test script 'cos I still need it - the getsoundplaying is so long winded
QUOTE(Danjb @ Sep 10 2006, 03:42 PM) *

I'm pretty sure Get/Set Chameleon doesn't work, but maybe I'm wrong.

It works, you just don't get anything graphically

QUOTE(exclusiveor77 @ Sep 10 2006, 04:06 PM) *

Dumstruck - I have a whole thread here and I never got it working plse post script so I can fix mine too

player->setswimspeed 100 - no I went swimming and had a partner was useing Player->GetSwimspeed == 1
messagebox " blah blah"

and an activator

hang on I'll find the thread => 2 Questions : Swimming & Script limit
so plse plse give me yr test script 'cos I still need it - the getsoundplaying is so long winded

You can't do what you want with GetSwimSpeed. It seems to be a mult for setting the swimming speed of a (N)PC

So if you
CODE

player->setswimspeed 1000

The player would swim very very fast
QUOTE(exclusiveor77 @ Sep 10 2006, 05:06 PM) *

Dumstruck - I have a whole thread here and I never got it working plse post script so I can fix mine too

player->setswimspeed 100 - no I went swimming and had a partner was useing Player->GetSwimspeed == 1
messagebox " blah blah"

and an activator

hang on I'll find the thread => 2 Questions : Swimming & Script limit
so plse plse give me yr test script 'cos I still need it - the getsoundplaying is so long winded

You can't use GetSwimSpeed to detect swimming. Abot had a script to detect it, but I can't find it now. I think it should be in his waterlife mod, but you could PM him if you want it. Yacoby had another method to detect swimming which is in his swimming realism mod. You could try that too, i don't know which is the most reliable, but since I know pretty much how Yacoby's works (it uses my method of detecting th player's height), I think it should be completely reliable.
Oh OK set SwimSpeed works but not GetSwimSpeed ... shoot

@Björn - thanks - I'll try those - At the moment Im using sound (from Theotherfelix) it works but it windy - it detects the sound of walter walking as you walk in and then some other stuff ...

wink.gif
QUOTE
It works, you just don't get anything graphically


Interesting ... That explains a lot biggrin.gif
Could be useful to me then ...

Maybe could write something about this in v9?

How exactly does it work then? Say you set Chameleon 100, would NPCs not be able to see you, despite the fact that you don't actually look transparent?
QUOTE(Björn @ Sep 10 2006, 04:58 PM) *

You can't use GetSwimSpeed to detect swimming. Abot had a script to detect it, but I can't find it now. I think it should be in his waterlife mod, but you could PM him if you want it. Yacoby had another method to detect swimming which is in his swimming realism mod. You could try that too, i don't know which is the most reliable, but since I know pretty much how Yacoby's works (it uses my method of detecting the player's height), I think it should be completely reliable.

My version is based on abots, but it uses your Height checking script to make it more accurate. I think all swimming detection scripts are fairly similar, and follow the same basic format.

Which reminds me of some stuff to add in about water level. smile.gif

QUOTE


How exactly does it work then? Say you set Chameleon 100, would NPCs not be able to see you, despite the fact that you don't actually look transparent?

Yup, You don't look transparent, but when you greet them, all they say is "Who's there?" etc

QUOTE

Maybe could write something about this in v9?

932.gif
QUOTE(Yacoby @ Sep 10 2006, 06:18 PM) *

My version is based on abots, but it uses your Height checking script to make it more accurate. I think all swimming detection scripts are fairly similar, and follow the same basic format.

Which reminds me of some stuff to add in about water level. smile.gif
Yup, You don't look transparent, but when you greet them, all they say is "Who's there?" etc
932.gif


Im using

CODE
    If ( watercell == 0 )                ; check for swimming
        If ( GetSoundPlaying "FootWaterLeft" == 1 )
            Set watercell To 1
        ElseIf ( GetSoundPlaying "FootWaterRight" == 1 )
            Set watercell To 1
        ElseIf ( GetSoundPlaying "DefaultLandWater" == 1 )
            Set watercell To 1
        EndIf
    EndIf

==== SNIP ===
            set surfaceheight To ( GetWaterLevel - 113.7094 )
            If ElseIf ( watercell == 1 )
            Set ( myz <= surfaceheight )
                Set minsubheight To ( surfaceheight - 25.1806 )
                Set surfaceheight To ( surfaceheight - 5 )
                If ( pcz <= minsubheight )
                    Set matchpcz To 1
                ElseIf ( myz <= surfaceheight )
                    Set matchpcz To 1
                EndIf
            EndIf
        EndIf




thanks to Grumpy + TheOtherFelix

but for swimming
well I just tried ActivateAI

CODE
AddItem "potion_local_liquor_01" 1
set timer to 4
AiActivate "potion_local_liquor_01"


no success

CODE
AddItem "p_restore_health_q" 1
set timer to 4
AiActivate "p_restore_health_q"


either ...P68 S4Dv8 ....*sad* someonelse wanna try ?
Hello,
QUOTE(exclusiveor77 @ Sep 12 2006, 03:09 PM) *

well I just tried ActivateAI

CODE
AddItem "potion_local_liquor_01" 1
set timer to 4
AiActivate "potion_local_liquor_01"


no success

CODE
AddItem "p_restore_health_q" 1
set timer to 4
AiActivate "p_restore_health_q"


either ...P68 S4Dv8 ....*sad* someonelse wanna try ?

Have you try to use AIActivate with a potion just in front of the NPC instead of putting it in his inventory?

Bjam
QUOTE(bjam @ Sep 12 2006, 07:49 PM) *

Hello,

Have you try to use AIActivate with a potion just in front of the NPC instead of putting it in his inventory?

Bjam



ok - will try that wink.gif
Nesting While loops definitely works (at least for simple ones).
Please ignore my earlier lies.
Updating a local variable from dialog or another script using set “ObjectID”.localVariable to x will not work if the cell containing the target object/(script) has not previously loaded.
how's this coming along
I've got some notes on AI, pathgridding and positioncell functions, as well as a good way of explaining how to make a pseudo-load door.. maybe that can be put in.
QUOTE(exclusiveor77 @ Sep 15 2006, 08:16 PM) *

Thanks smile.gif


QUOTE(exclusiveor77 @ Sep 24 2006, 09:16 PM) *

how's this coming along

It is at present going very slowly, as I have got board of the Morrowind Scripting Engine (Don't worry, this has happend before), so I am at present learing PHP, XHTML and CSS. I should be back going with Morrowind stuff in a week or so.

QUOTE(Casey Tucker @ Sep 24 2006, 11:39 PM) *

I've got some notes on AI, pathgridding and positioncell functions, as well as a good way of explaining how to make a pseudo-load door.. maybe that can be put in.

Yup, sounds good
Some Notes: (Don't know if I should post them here.. I will organize all this later, anyways, for a more.. short and user friendly way. Also, most people probably know this stuff.. but for a newbie wanting to have an NPC use a door or some pathgridding, this might come of use)

QUOTE
These are a few notes on Morrowind's AI system, as much for myself as for anyone wishing to look them over. The most I noticed the AI is incredibly stubborn. There are quite a few unpredictable script functions that deal with AI. I find that the AIFollow is actually the most stable of them.
When working on "The Triumvirate" quest/war mod, if the player went to Dragonhold Castle to join the Legion, I had to have the player's Imperial Centurion, (A centurion was the leader of a Roman "century," a unit of around 80 to 100 men in a legion) Sensius Tanarii, show the player where his barracks room is.
Initially I had Sensius follow the player until you wandered around long enough to find your barracks room. Sensius would confirm the location and disappear, once Proximus Taiatius, (your legionary roommate) noticed you. (GetTarget Player == 1 Usually works - For the desired effect, GetDistance is more accurate.)
So, that was sort of the opposite of I wanted. I wanted Sensius to take the player to their room. When I first actually thought of this, I tried thinking of several ways to get an NPC to "AiEscort" through several cells to the given coordinates. Let me tell you of my findings on AIEscort. It's either broken, works only in exterior cells, or I was doing something wrong. Regardless, I noticed that the NPC did not budge at all from their location, though they WERE set to guard the player. Upon further research, I saw that during the CharGen process, when the prison ship guard appears to be escorting you to the door, Bethesda actually used AIWander, making checks to see if the player was following or not.
From this I drew the conclusion that AITravel would be so much more convinient and stable. I only use AIEscort to get a stationary actor to guard the player if they came under attack. Useful for battle scenes when you want it to appear that two forces are fighting eachother, without having an entire side follow the player. About mass battles... I will lead into that later.
First, I must explain how to get an NPC to escort a player, from point A: an interior cell, through several interior and exterior cells, to point B: also an interior cell. First things first.. we don't want the NPC to get stuck. You'll need some pathgrids. A few notes about pathgrids: the NPC doesn't seem to care about the gridpoints' Z coordinate. That's a very good thing. Pathgrids are like magnetic roads. The NPC is seemingly "magnetically attracted" to that pathgrid, and their AIWandering, AITraveling, and AIFollowing will follow along those grids. To see how these grids work, go in-game, to Ebonheart or another semi-crowded city, and type in the console: 'TPG'. That will show the pathgrids - you'll see the NPC's walking between the two yellow "rails" that are drawn out, as if they were trains. An NPC will reluctantly pull away from a pathgrid if led so by the player, need to walk around something blocking their way, chasing someone/thing, and such scenarios.
Now that I got pathgridding done, I noticed another thing. AITravel is not "unstable" per se, but not very reliable. Two factors come into play here, that dictate if the NPC will blatantly ignore it's orders or do as told. The first, I noticed, was the AI distance setting, changable by FPS optimizer or in-game menu. Makes sense. However, the next one is rather annoying. The NPC cannot get distracted or their travel will stop. This means you'll have to set their "Hello" distance to 0 during their little stroll, otherwise they will stop and greet the player instead.
Now we come to the point where the NPC reaches a load door through cells. The game will CTD if the NPC activates it. Here is a snippet of an "escort" script I wrote, that gets the NPC through a load door.
-------------------------------------------------------------------------------------
Begin Sensius_Escort_Script
Short EscortOnce
Float Timer
;In my theory, a load door is simply a PositionCell function referencing to the PlayerSaveGame once the door is
;activated. (By the player.) For an NPC to activate a load door would, as this "door script" seems hard-coded
;strictly to the player, would call an error that would cause a CTD. This script creates an artificial load door, by
;replacing the "Player" function references to the NPC in question. As this is concerning a REAL load door, I cannot
;have the NPC activate it. Rather, the NPC teleports when they are close enough to the door for activation, and
;a certain variable is set, accompanied by a 3D sound to finalize the effect. NPC load doors are possible. The only
;problem is that the NPC disappears rather than shows an animation of entering the door - but it's not much worse
;than in Oblivion, when the NPC just fades.

If ( MenuMode == 1 )
Return
Endif

If ( EscortOnce == 0 )
"Sensius Tanarii"->AiTravel 4990.000 5200.000 15456.000
Set EscortOnce to 1
Endif

If ( EscortOnce == 1 )
If ( "Sensius Tanarii"->GetPos, X <= 5060 ) ;I am "boxing in" the coordinates. When he stands in this area, the door is activated.
If ( "Sensius Tanarii"->GetPos, X >= 4930 )
If ( "Sensius Tanarii"->GetPos, Y <= 5360 )
If ( "Sensius Tanarii"->GetPos, Y >= 5177 )
"Sensius Tanarii"->PlaySound3D "Door Latched Two Open" ;
"Sensius Tanarii"->PositionCell 3186 5191 15050 0 "Dragonhold Keep - Main Entry Hall"
Set EscortOnce to 2
Endif
Endif
Endif
Endif
Endif
.............................................
-------------------------------------------------------------------------------------

That should explain how it would work. Coordinates are often more reliable than a "GetAIPackageDone" function, mainly because that function is easily broken by several factors.

I'll be sure to read it wink.gif How's it going?
i found a werid bug in the editor today so i though i'd share it here so it can be noted.(it might have already been addressed, i did a quick look in the MWSFD but didn't see it)

your scripts' name should never go over 31 charaters in length. it , if you have 32 charaters in the script namethere will be a box on the end of the script and when there is 33 charaters the 33rd charater goes funny, the 34th charater seemed to be fine. i'll get screenies if you need it. but anyway it seems to have to do something 33rd charater if the 33rd charater you use is an 'a' the editor will use a c
for example i had for mt script

begin tac_dam_soulgemremove_creaturepack

but the editor saw it as tac_dam_soulgemremove_creaturepaek

it tried

tac_dam_soulgemremove_creaturepak

but the editor saw it as

tac_dam_soulgemremove_creaturepam

so yeah werid bug
One more minor thing about msfd8, the function FALL, is on page 74, but it's not listed in the index.
Which brings up my next idea, a HTML format version would be nice, with links from the table of contents and index to the page/s refered to, and links to apendix's refered to throughout the document, would be alot of work to impliment, but handy. I have recently found that in acrobat you can type the page number in at the bottom, no more scrolling for me. blush.gif

I've also noticed the function, RemoveSpellEffects, is not documanted in there. I must have read that in a forum somewhere or just made it up, but it compiles and works,
I'm not sure if it's vanilla, or an expansion or patch, but works with GOTY.

especially handy for scripted spell effects.

CODE
if ( player->getspelleffects, "Uber Spell" == 1
;trigger scripted uber spell effect
  player->removespelleffects, "uber spell"
endif


I'll post more nitpicks as they come to me.
QUOTE(Trey Leavens @ Oct 20 2006, 04:26 PM) *

One more minor thing about msfd8, the function FALL, is on page 74, but it's not listed in the index.
Which brings up my next idea, a HTML format version would be nice, with links from the table of contents and index to the page/s refered to, and links to apendix's refered to throughout the document, would be alot of work to impliment, but handy. I have recently found that in acrobat you can type the page number in at the bottom, no more scrolling for me. blush.gif

I've also noticed the function, RemoveSpellEffects, is not documanted in there. I must have read that in a forum somewhere or just made it up, but it compiles and works,
I'm not sure if it's vanilla, or an expansion or patch, but works with GOTY.

especially handy for scripted spell effects.

CODE
if ( player->getspelleffects, "Uber Spell" == 1
;trigger scripted uber spell effect
  player->removespelleffects, "uber spell"
endif


I'll post more nitpicks as they come to me.


I never noticed that before ...

there is a RemoveEffects [p112] ....

HTML - see my sig Script Cmds ...
Thanks for the notes, Casey.

I plan to do a lot more complex scheduling in future mods, and your approach was exactly how I planned to do it - so by showing me that it works you have saved a lot of time and headaches smile.gif

One thing for the update:

MSFD mentions cutscenes theoretically but doesn't give any practical advice. To the best of my knowledge, no mod has ever included a working cutscene - those that appear to be are usually scripted events. Please could you either make it clear that cutscenes are actually impossible, or give an example/instructions on how to create .bik files with FRAPS?

Ditto sound files - the game is "picky" about the format of .wav files for voices - the details of frequency etc would be handy for those trying to include new voiced dialogue.

Finally, including further details about scripted real-time travel would be helpful. For example, when I was making the silt strider ride, I didn't know about the need to disable/delete/recreate the ride as you cross cells - otherwise you just slam into an invisible wall! The way I got around it was simply to move the ride so it was all within a single cell, but anyone wanting to create a cross-Morrowind silt strider system would have to know about that little eccentricity.
QUOTE(Raveren @ Oct 12 2006, 11:09 PM) *

I'll be sure to read it wink.gif How's it going?

Uh. I have got abit distracted, but I am still managing to do bits here and there.

QUOTE(exclusiveor77 @ Oct 13 2006, 07:14 AM) *

Thanks smile.gif


QUOTE(TunaandCheese @ Oct 20 2006, 01:50 PM) *

i found a werid bug in the editor today so i though i'd share it here so it can be noted.(it might have already been addressed, i did a quick look in the MWSFD but didn't see it)

your scripts' name should never go over 31 charaters in length. it , if you have 32 charaters in the script namethere will be a box on the end of the script and when there is 33 charaters the 33rd charater goes funny, the 34th charater seemed to be fine. i'll get screenies if you need it. but anyway it seems to have to do something 33rd charater if the 33rd charater you use is an 'a' the editor will use a c
for example i had for mt script

begin tac_dam_soulgemremove_creaturepack

but the editor saw it as tac_dam_soulgemremove_creaturepaek

it tried

tac_dam_soulgemremove_creaturepak

but the editor saw it as

tac_dam_soulgemremove_creaturepam

so yeah werid bug

The length (32 chars) would make sense. Thanks


QUOTE(Trey Leavens @ Oct 20 2006, 03:26 PM) *

One more minor thing about msfd8, the function FALL, is on page 74, but it's not listed in the index.

I will add that in

QUOTE

I've also noticed the function, RemoveSpellEffects, is not documanted in there. I must have read that in a forum somewhere or just made it up, but it compiles and works,
I'm not sure if it's vanilla, or an expansion or patch, but works with GOTY.

Intresting. I think I have also used it in mods, but never noticeted that it wasn't in MWSFD

QUOTE

I'll post more nitpicks as they come to me.

fing34.gif


QUOTE(exclusiveor77 @ Oct 20 2006, 08:23 PM) *

I never noticed that before ...

there is a RemoveEffects [p112] ....



QUOTE(princess_stomper @ Oct 20 2006, 11:07 PM) *

One thing for the update:

MSFD mentions cutscenes theoretically but doesn't give any practical advice. To the best of my knowledge, no mod has ever included a working cutscene - those that appear to be are usually scripted events. Please could you either make it clear that cutscenes are actually impossible, or give an example/instructions on how to create .bik files with FRAPS?

I heard the Goblin Lab may have a cut scene(s?). I will try and make one.

QUOTE

Ditto sound files - the game is "picky" about the format of .wav files for voices - the details of frequency etc would be handy for those trying to include new voiced dialogue.

IIRC MWFSD already has some sound info. Does the format for voices differ from this at all?

QUOTE

Finally, including further details about scripted real-time travel would be helpful. For example, when I was making the silt strider ride, I didn't know about the need to disable/delete/recreate the ride as you cross cells - otherwise you just slam into an invisible wall! The way I got around it was simply to move the ride so it was all within a single cell, but anyone wanting to create a cross-Morrowind silt strider system would have to know about that little eccentricity.

smile.gif


More stuff tomorow on HTML formats and every other point I have missed when I am more awake.
Bik Videos
I sucsesfully converted a uncompressed avi (though it can convert other formats) to a bik (using Rad Video Tools) and replaced the Morrowind logo with the said avi. As that is the same bik player that is used when playing cutscences, I don't see how playing cutscenes would present any problem.

Also, The Goblin Lab includes two valid bik files, so I assume that mod uses them as cut scenes

Sound
@princess_stomper
This information is already included in MWSFD
QUOTE(MWSFD8)

Sound file formats
Note: Not all sound files seem to play correctly in the game (although all play in the editor). To be safe, use the formats used by Bethesda (thanks to random name) :

"Cr" and the "Fx" folder
Windows PCM (.wav)
22050 kHz, 16-bit, Mono

Lower qualities work as well, e.g. 8,000 kHz; 8 Bit; Mono. Used e.g. in my "The Regulars" mod for Tavern music.

"Vo" folder format
MPEG Layer-3, 64 Kbps
44100 kHz, 16-bit, Mono


HTML
I will see if I can make a html version when I have finished the .doc version smile.gif
Still working on this? I might be able to get a lot of good dialogue stuff for you all too, if that counts as "scripting."

If this wasn't already covered, I might offer: For a "sneak around the guards" quest, the best approach is use AI travel or wander for the guards, with high "hello" stats. The "GetTarget" function will return 1 even out of combat. The function is not entirely reliable; it goes off about 80% of the time. (I don't know how true this is in combat.) Thus, there is a slight chance you can get off lucky if the guard "sees" you. Perhaps he/she is distracted? I just figured people might use GetLOS or something, but anyways...

I have some more little tidbits of information I might dig up.
/nudge

Heya Yacoby, you still working on this? I'm waiting eagerly to get my hands on it... *prays you are*. Can't contribute much but my praise so I'm a worthless n'wah but I hope you didn't abandon this.

Then again, life gets in the way of everything... so it wouldn't surprise me. wink.gif

Hey Yacoby ... much saught after smile.gif
This isn't going anywhere near as fast as I was hoping. I keep getting distracted sad.gif. I would finish it, but how long it would take is anyone's guess.

Anyway. Instead of one person doing it, it gets passed around, a bit like some of the mods that are being worked on. Like the chain letter mod. That way, if someone wants to write in one thing, they can, or if they want to add in 20 pages they can. It would probably get done a lot faster. We would need to keep a change log though.

Anyone interested?
Not sure if you'd like to include this, but I just discovered a nifty little tidbit.

If you make a curse that is set for anything other than cast on self (not possible with the CS or MWEdit, I used MWE to do it ingame) and use AddSpell to give it to the Player, it will be automatically cast as a normal targeted spell. Quite useful IMHO.

I'm currently looking through all of the editing utilities I can find to see if there any that will let you make a curse on target.
QUOTE(Yacoby @ Dec 24 2006, 09:42 PM) *

This isn't going anywhere near as fast as I was hoping. I keep getting distracted sad.gif. I would finish it, but how long it would take is anyone's guess.

Anyway. Instead of one person doing it, it gets passed around, a bit like some of the mods that are being worked on. Like the chain letter mod. That way, if someone wants to write in one thing, they can, or if they want to add in 20 pages they can. It would probably get done a lot faster. We would need to keep a change log though.

Anyone interested?


Been offline for 4 months - back now Id be willing to 'oil the wheels' a bit I don't have constant time but get a few days inbetween projects smile.gif

I would hate to see this fade smile.gif
QUOTE(Yacoby @ Dec 25 2006, 04:42 AM) *
This isn't going anywhere near as fast as I was hoping. I keep getting distracted sad.gif. I would finish it, but how long it would take is anyone's guess.

Anyway. Instead of one person doing it, it gets passed around, a bit like some of the mods that are being worked on. Like the chain letter mod. That way, if someone wants to write in one thing, they can, or if they want to add in 20 pages they can. It would probably get done a lot faster. We would need to keep a change log though.

Anyone interested?


Putting this on a restricted Wiki would probably be an ideal way of doing it - you can see who has done what, what has changed, etc. etc.

Now, if someone would update the Morrowind Mod Maker's Manual (eg. separate all the Tribunal/Bloodmoon specifics, fix the spelling errors, turn it into a PDF) I would be really happy... smile.gif
Bumpy - Yacoby is this over ?

smile.gif

Even if the project is dead,