[RELz] Oblivion Script Extender (OBSE) 0020

Post » Wed Mar 30, 2011 4:57 am

** Script Error: Script 47003fe3 in file "Duke Patricks - TEST.esp" **
Too few args for format specifier


However I only have 2 functions :


set TotalScale to call aadpGetTotalScale TmpActorRef

scriptname aadpGetTotalScalefloat TotalScaleshort FemaleFlagref TmpActorReffloat tmpfloatref RefRaceBegin Function { TmpActorRef }if TmpActorRef.iscreature == 0 && TmpActorRef.isactor == 1 set FemaleFlag to TmpActorRef.IsFemale  let RefRace := TmpActorRef.getrace   set TmpFloat to getracescale RefRace FemaleFlag   else   set TmpFloat to 1endifset TotalScale to TmpActorRef.getscaleset TotalScale to ( TotalScale * TmpFloat )SetFunctionValue TotalScaleend



And this one:


SetEventHandler "OnHit" aadpOnHitTrigger ref::ME

scn aadpOnHitTrigger ref target ref Attacker          begin Function { target, attacker }set aadpWeaponCorrectionQ.HitterRef to attackerset aadpWeaponCorrectionQ.TargetRef to targetend


From the docs it said (I thought) that I could do "SetEventHandler "OnHit" aadpOnHitTrigger ref::ME" to assign it to one actor to be hit by any attacker...right?

I only started getting this error after upgrading to out of beta 20, but that could be a coincidence I guess.
User avatar
Greg Cavaliere
 
Posts: 3514
Joined: Thu Nov 01, 2007 6:31 am

Post » Wed Mar 30, 2011 11:02 am

Spooky: that error refers to a situation like
printc "my name is %n"

Where the %n specifier expects a ref var and doesn't find one.
The error message includes the formID of the script; take a look and see if there's a problem like the one I described. If not, post the code.
User avatar
XPidgex Jefferson
 
Posts: 3398
Joined: Fri Sep 08, 2006 4:39 pm

Post » Wed Mar 30, 2011 8:37 am

You hit that right on the nose, THANK YOU!

messageboxex"%n miss their block"

I did not have "me" in that. Needs to be messageboxex"%n miss thier block"me

So is there a place I can read about the error messages "meanings" so I would not have post a dumb question like this here? :blush:

Also, the script's form id did not match up.

My scripts form id is 01003fe3 not 47003fe3 (or should I be ignoring the 4700 part of the number?)
User avatar
Angelina Mayo
 
Posts: 3427
Joined: Wed Jan 24, 2007 4:58 am

Post » Wed Mar 30, 2011 3:25 am

You hit that right on the nose, THANK YOU!

messageboxex"%n miss their block"

I did not have "me" in that. Needs to be messageboxex"%n miss thier block"me

So is there a place I can read about the error messages "meanings" so I would not have post a dumb question like this here? :blush:

Also, the script's form id did not match up.

My scripts form id is 01003fe3 not 47003fe3 (or should I be ignoring the 4700 part of the number?)


No, you should be ignoring the 01 part of the number. Or to be more precise, load all your mods in TES4Edit and it will display the first two digits correctly. The 01 in the CS is simply a place-holder. Those digits are changed to reflect the exact position of the mod in your load order. You can figure it out yourself by counting up the number of mods that load before the mod in question, but the numbers are in Hex, so it's easier to simply load everything up in TES4Edit and let it tell you the proper form ID. By changing the first two digits of the form ID to reflect the load order is how Oblvion ensures that form ID's are unique. This is also the reason that it isn't safe to use form ID's in scripts though - you can't rely on what they are going to be.
User avatar
Alexxxxxx
 
Posts: 3417
Joined: Mon Jul 31, 2006 10:55 am

Post » Wed Mar 30, 2011 9:32 am

Spooky: that error refers to a situation like
printc "my name is %n"

Where the %n specifier expects a ref var and doesn't find one.
The error message includes the formID of the script; take a look and see if there's a problem like the one I described. If not, post the code.
That reminds me - Minor request: Convert the pre-17 runtime error reporting code to match the one used by OBSE now. To keep things consistent.
User avatar
priscillaaa
 
Posts: 3309
Joined: Sat Dec 30, 2006 8:22 pm

Post » Tue Mar 29, 2011 11:20 pm

Sorry to bug y'all but I've been trying to figure out what's going wrong and I still can't get it. This started shortly after I started using OBSE. I started with version 18 but upgrading to 20 didn't help. Basically, the game crashes to desktop when I try to save. It does this every three or four saves. Going back to a save before the crash only resets the counter - it'll crash again another 3 or 4 saves after starting over from the previous save. As one of the many things I tried to figure out what was going on, I launched Oblivion through the game launcher, rather than using OBSE. I was able to save more than ten times in a row without crashing, which leads me to believe that this is an obse problem. Of course, a good number of my mods require obse, so I'd really like to figure a way to keep using it. I am running the Game of the Year edition on Windows 7. Any help would be much appreciated.
User avatar
Lawrence Armijo
 
Posts: 3446
Joined: Thu Sep 27, 2007 7:12 pm

Post » Wed Mar 30, 2011 3:33 am

Edit
Never mind
User avatar
Sara Johanna Scenariste
 
Posts: 3381
Joined: Tue Mar 13, 2007 8:24 pm

Post » Wed Mar 30, 2011 11:16 am

:obliviongate:
User avatar
RaeAnne
 
Posts: 3427
Joined: Sat Jun 24, 2006 6:40 pm

Post » Wed Mar 30, 2011 3:11 am

This sounds more like a bad mod or a bad OBSE plugin than anything. Usually when I get crashes as such, I use OBMM (or Wyre Bash, whichever you want to use is fine) and export the mod list into a text file, then I manually go through and find any of the newest items I've added and uncheck them in OBMM and try running it, then if you say 4 saves causes it, save the game 4 or 5 times and when it stops crashing, typically the last mod you unchecked was the one that was having an issue.

What would be a good idea, is to post a list of your current mods and your current plugins for OBSE.

GuruSR.



Thanks for the suggestion. Looks like I found it - it was the keychain mod. As soon as I disabled that one, I was able to save even with OBSE.

Gwyn
User avatar
Silencio
 
Posts: 3442
Joined: Sun Mar 18, 2007 11:30 pm

Post » Wed Mar 30, 2011 1:42 am

:obliviongate:
User avatar
Ludivine Dupuy
 
Posts: 3418
Joined: Tue Mar 27, 2007 6:51 pm

Post » Wed Mar 30, 2011 4:14 am

Hi,

Thank you for the last upload.

http://www.gamesas.com/index.php?/topic/1170916-beta-oblivion-script-extender-obse-0020/page__view__findpost__p__17300138 is always on the agenda?
User avatar
carla
 
Posts: 3345
Joined: Wed Aug 23, 2006 8:36 am

Post » Tue Mar 29, 2011 11:50 pm

Thank you, guys for all your hard work!
Great job as usual and I still regret the unfinished Thieves Arsenal!
User avatar
Ria dell
 
Posts: 3430
Joined: Sun Jun 25, 2006 4:03 pm

Post » Wed Mar 30, 2011 2:33 am

:obliviongate:
User avatar
suniti
 
Posts: 3176
Joined: Mon Sep 25, 2006 4:22 pm

Post » Wed Mar 30, 2011 1:28 am

Get/SetCombatTarget, from what I've seen, are only base object only and not individual spawn refs.

GetCombatTarget returns a reference, not a base object. I don't know of any SetCombatTarget command.
Any plans to include a SetCreatureType command? Unless I missed one that already exists.

Maybe. It will probably not be as straightforward as simply changing the field that indicates the creature's type, though. Can you describe what you'd want to use it for?
SetFactionReactionPattern FactionID, "Accept Pattern;!Omit Pattern", modValue

Is the pattern meant to be based on the faction's editor ID, or on its name?
http://www.gamesas.com/index.php?/topic/1170916-beta-oblivion-script-extender-obse-0020/page__view__findpost__p__17300138 is always on the agenda?

Yep.
Sth. wrong here?
Always assumed string is the same as literal string.

You got it.
When the docs talk about a "literal string" it means a string enclosed in quotation marks.
A question, SetFemale 0/1 doesn't seem to affect the head. The CS shows it instantly, an Update3d (any number of times) fails to show what the CS shows.

You're right, it produces some pretty ghastly results. I'm not sure that the head should be expected to change, though, since it's designed in the CS for a specific gender. I'll look into it.
User avatar
Beulah Bell
 
Posts: 3372
Joined: Thu Nov 23, 2006 7:08 pm

Post » Wed Mar 30, 2011 10:38 am

:obliviongate:
User avatar
Catherine N
 
Posts: 3407
Joined: Sat Jan 27, 2007 9:58 pm

Post » Wed Mar 30, 2011 2:27 am

You're going to laugh, Get/SetCombatStyle (not Target, wrote that remotely connected to the pc, so I could relax for a while in front of the 'tube).

Ok, that's expected. The combat style is defined on the base object, not the reference, so it can only be modified on the base object, unless we were to install a hook or two to make a particular reference use a style other than that defined for its base object.
It would be the editor's ID, because the name would make it harder. Most people refer to them by their editor id's. The wiki has them as FactionID.

I agree, editor IDs would be more useful scripting-wise, but editor IDs don't exist for factions at run-time. We can force the game to load them, but that has implications for memory usage - I'd generally want to avoid doing so unless a fair percentage of the IDs could actually be expected to be used.
And in the CS if you check female on/off while on the Face tab, you'll see it change, but it doesn't in the game with SetFemale 0/1. Also a vampire mod, was trying to use it to change the face to show the fangs on npcs and that didn't work either.

I seem to recall testing Update3D following SetEyes/SetHair and seeing the changes take effect. I didn't test with vampirism. I believe the game does maintain two heads for each NPC - one for each gender. However the game code loads the head separately from the rest of the body; it may just be a matter of making Update3D queue the head for update as well. Like I said, I will take a look.
User avatar
maya papps
 
Posts: 3468
Joined: Mon Aug 07, 2006 3:44 pm

Post » Wed Mar 30, 2011 7:39 am

:obliviongate:
User avatar
Adriana Lenzo
 
Posts: 3446
Joined: Tue Apr 03, 2007 1:32 am

Post » Tue Mar 29, 2011 10:38 pm

I presume the SetCombatStyle with a style ref of null (0) is supposed to force a return? I was wondering why the script wasn't continuing past it.

No. When a script halts unexpectedly it almost always means the handler for one of the commands returned false. The vanilla commands tend to do that if you pass invalid arguments to them; we generally avoid doing so for OBSE cmds because it just makes it harder for scripters to figure out what went wrong. I don't have the code in front of me right now, but I'm guessing the combat style cmds are returning false when you pass them a null argument. If so it's an easy fix.
User avatar
vanuza
 
Posts: 3522
Joined: Fri Sep 22, 2006 11:14 pm

Post » Wed Mar 30, 2011 6:06 am

Are we talking about the commands I wrote? Pretty sure those always return true no matter what. I suspect it's some vanilla command he's using that's returning false.


(A note to anyone other than Scruggs reading this: I do not mean the value that the function returns to the script, but rather the handler function's return value)
User avatar
sexy zara
 
Posts: 3268
Joined: Wed Nov 01, 2006 7:53 am

Post » Wed Mar 30, 2011 2:29 am

Are we talking about the commands I wrote? Pretty sure those always return true no matter what. I suspect it's some vanilla command he's using that's returning false.
I don't http://cs.elderscrolls.com/constwiki/index.php/SetCombatStyle.

@Guru, the most you can do in your situation is create a default combat style record in the CS and use that to reset your actor's.
User avatar
neen
 
Posts: 3517
Joined: Sun Nov 26, 2006 1:19 pm

Post » Wed Mar 30, 2011 1:49 am

Looking to find the number of diseases the player has, by using GetNthPlayerSpell and checking type.

The docs for GetNthPlayerSpell says:

GetNthPlayerSpell - returns the nth player spell. whichSpell is an index that starts at 0 for the first spell in the list. Note that the CS compiler doesn't expect spells to be returned as a ref. If you are calling this function multiple times to set the same ref variable you need to assign that variable to some other type (say a weapon) in between your calls to this function. Otherwise the ref will continue to keep the value from the first call.


Is the text in bold still true (I think I read somewhere that you don't need to do this anymore, but that may have been for some other function).


While I'm at it, I've never done anything about spells before, so a novice there - but do any/many mods use spells on the player of the disease type for other purposes than real diseases? E.g. If I have a hud icon whenever the player has at least one spell of disease type, can I be fairly sure it is really a disease, and not some other hidden effect?
User avatar
Charleigh Anderson
 
Posts: 3398
Joined: Fri Feb 02, 2007 5:17 am

Post » Wed Mar 30, 2011 9:51 am

While I'm at it, I've never done anything about spells before, so a novice there - but do any/many mods use spells on the player of the disease type for other purposes than real diseases? E.g. If I have a hud icon whenever the player has at least one spell of disease type, can I be fairly sure it is really a disease, and not some other hidden effect?
Yes, I do believe there is a fair bunch that do. That's why I resorted to use a filter system when implementing Vector's code. Off the top of my head, 'The Mighty Umbra' uses diseases to add and remove perks to the player character depending on the equipped status of the sword.
User avatar
Luna Lovegood
 
Posts: 3325
Joined: Thu Sep 14, 2006 6:45 pm

Post » Wed Mar 30, 2011 7:18 am

OH yes..... PLEASE do that! That would solve so many issue with actors in combat!

For example I am man handling the actors in my mods to move forward and backward depending on their weapon range. This could be defined in the combat styles but the dev did not link this aspect to the range of the weapon that is being used by the actor. So all actors with that style try to stay at the SAME range per thier combat style regardless of what melee weapon they use.

Thus I need to call playgroup forward and play group backward every so often after doing a truck load of checks to insure smooth usage of the forced animations. Now if instead I could assign a combat style to the actor ref that was a clone of the ref's normal combat style and THEN alter that style with my scripts....

WOW that would just be so much more efficient and professional (much less Hack Hacky McHackish!)


unless we were to install a hook or two to make a particular reference use a style other than that defined for its base object.

User avatar
Robert Bindley
 
Posts: 3474
Joined: Fri Aug 03, 2007 5:31 pm

Post » Tue Mar 29, 2011 11:54 pm

Yes, I do believe there is a fair bunch that do. That's why I resorted to use a filter system when implementing Vector's code. Off the top of my head, 'The Mighty Umbra' uses diseases to add and remove perks to the player character depending on the equipped status of the sword.

What kind of filter? Just checking whether the spell belongs to Oblivion.esm (which filter out all mod-added disease spells), or something more advanced. What I'm doing, is simply to have a count for number of diseases available in HUD Status Bars, making it easy to have a bar or icon indicating when you have a disease.
User avatar
Donatus Uwasomba
 
Posts: 3361
Joined: Sun May 27, 2007 7:22 pm

Post » Wed Mar 30, 2011 1:43 am

I wonder if the DEV did that to prevent the actors (that are not the player) from being effected/included as actors do not suffer from diseases (Is that right Shade Me? About actors not suffering from the Diseases? I believe that is correct as I use diseases for that reason myself once in a while in my mods.)

'The Mighty Umbra' uses diseases to add and remove perks to the player character depending on the equipped status of the sword.

User avatar
Racheal Robertson
 
Posts: 3370
Joined: Thu Aug 16, 2007 6:03 pm

PreviousNext

Return to IV - Oblivion