Mantriel's thread

Post » Sat May 28, 2011 11:43 pm

I created a script which works if I use only 3-4 if's (3-4 quest items) but does not work if I use the whole code (46x2 if's). I really dont know where I messed it up.
I read the MSfD for any clues, and I got the suspicion that the game can't handle such a long list of if's. Could someone take a view?

Begin MH_q_001_sshort MH_q_001_var  ; this is a counter, if the player has all 45 books this should be == 45, making this script to workshort doonceshort var_01; basicly these are doonce for the various if'sshort var_02short var_03short var_04short var_05short var_06short var_07short var_08short var_09short var_10short var_11short var_12short var_13short var_14short var_15short var_16short var_17short var_18short var_19short var_20short var_21short var_22short var_23short var_24short var_25short var_26short var_27short var_28short var_29short var_30short var_31short var_32short var_33short var_34short var_35short var_36short var_37short var_38short var_39short var_40short var_41short var_42short var_43short var_44short var_45If ( var_01 == 0) ; this is the doonceIf ( player->GetItemCount, "bk_ABCs" >= 1 ) set MH_q_001_var to MH_q_001_var +1 ; if the player has the book, set the var. to +1	set var_01 to 1 ; end of doonceendifendifIf ( var_02 == 0)If ( player->GetItemCount, "bk_AedraAndDaedra" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_02 to 1endifendifif ( var_03 == 0)If ( player->GetItemCount, "bk_AnnotatedAnuad" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_03 to 1endifendifif ( var_04 == 0)If ( player->GetItemCount, "bk_ChildrensAnuad" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_04 to 1endifendifif ( var_05 == 0)If ( player->GetItemCount, "bk_Anticipations" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_05 to 1endifendifif ( var_06 == 0)If ( player->GetItemCount, "bk_ArcturianHeresy" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_06 to 1endifendifif ( var_07 == 0)If ( player->GetItemCount, "bk_BiographyBarenziah1" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_07 to 1endifendifif ( var_08 == 0)If ( player->GetItemCount, "bk_BiographyBarenziah2" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_08 to 1endifendifif ( var_09 == 0)If ( player->GetItemCount, "bk_BiographyBarenziah3" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_09 to 1endifendifif ( var_10 == 0)If ( player->GetItemCount, "bk_BriefHistoryEmpire1" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_10 to 1endifendifif ( var_11 == 0)If ( player->GetItemCount, "bk_BriefHistoryEmpire2" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_11 to 1endifendifif ( var_12 == 0)If ( player->GetItemCount, "bk_BriefHistoryEmpire3" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_12 to 1endifendifif ( var_13 == 0)If ( player->GetItemCount, "bk_BriefHistoryEmpire4" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_13 to 1endifendifif ( var_14 == 0)If ( player->GetItemCount, "bk_BrothersOfDarkness" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_14 to 1endifendifif ( var_15 == 0)If ( player->GetItemCount, "bk_ChangedOnes" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_15 to 1endifendifif ( var_16 == 0)If ( player->GetItemCount, "bk_ChildrenOfTheSky" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_16 to 1endifendifif ( var_17 == 0)If ( player->GetItemCount, "bk_ChroniclesNchuleft" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_17 to 1endifendifif ( var_18 == 0)If ( player->GetItemCount, "bk_frontierconquestaccommodat" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_18 to 1endifendifif ( var_19 == 0)If ( player->GetItemCount, "bk_galerionthemystic" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_19 to 1endifendifif ( var_20 == 0)If ( player->GetItemCount, "bk_InvocationOfAzura" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_20 to 1endifendifif ( var_21 == 0)If ( player->GetItemCount, "bk_LivesOfTheSaints" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_21 to 1endifendifif ( var_22 == 0)If ( player->GetItemCount, "bk_MixedUnitTactics" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_22 to 1endifendifif ( var_23 == 0)If ( player->GetItemCount, "bk_MysteriousAkavir" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_23 to 1endifendifif ( var_24 == 0)If ( player->GetItemCount, "bk_Mysticism" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_24 to 1endifendifif ( var_25 == 0)If ( player->GetItemCount, "bk_nchunaksfireandfaith" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_25 to 1endifendifif ( var_26 == 0)If ( player->GetItemCount, "bk_oldways" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_26 to 1endifendifif ( var_27 == 0)If ( player->GetItemCount, "bk_onoblivion" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_27 to 1endifendifif ( var_28 == 0)If ( player->GetItemCount, "bk_OriginOfTheMagesGuild" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_28 to 1endifendifif ( var_29 == 0)If ( player->GetItemCount, "bk_OverviewOfGodsAndWorship" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_29 to 1endifendifif ( var_30 == 0)If ( player->GetItemCount, "bk_PigChildren" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_30 to 1endifendifif ( var_31 == 0)If ( player->GetItemCount, "bk_PilgrimsPath" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_31 to 1endifendifif ( var_32 == 0)If ( player->GetItemCount, "bk_RealBarenziah1" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_32 to 1endifendifif ( var_33 == 0)If ( player->GetItemCount, "bk_RealBarenziah2" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_33 to 1endifendifif ( var_34 == 0)If ( player->GetItemCount, "bk_RealBarenziah3" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_34 to 1endifendifif ( var_35 == 0)If ( player->GetItemCount, "bk_RealBarenziah4" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_35 to 1endifendifif ( var_36 == 0)If ( player->GetItemCount, "bk_RealBarenziah5" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_36 to 1endifendifif ( var_37 == 0)If ( player->GetItemCount, "bk_reflectionsoncultworship..." >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_37 to 1endifendifif ( var_38 == 0)If ( player->GetItemCount, "bk_tamrielicreligions" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_38 to 1endifendifif ( var_39 == 0)If ( player->GetItemCount, "bk_SaryonisSermons" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_39 to 1endifendifif ( var_40 == 0)If ( player->GetItemCount, "bk_specialfloraoftamriel" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_40 to 1endifendifif ( var_41 == 0)If ( player->GetItemCount, "bk_truenatureoforcs" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_41 to 1endifendifif ( var_42 == 0)If ( player->GetItemCount, "bk_vampiresofvvardenfell1" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_42 to 1endifendifif ( var_43 == 0)If ( player->GetItemCount, "bk_vivecandmephala" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_43 to 1endifendifif ( var_44 == 0)If ( player->GetItemCount, "bk_wildelves" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_44 to 1endifendifif ( var_45 == 0)If ( player->GetItemCount, "bk_yellowbookofriddles" >= 1 )set MH_q_001_var to MH_q_001_var +1	set var_45 to 1endifendifif ( doonce == 0) ; this is the second part, when I modify the first part slightly this works sometimes, so I didnt really touch itif ( MH_q_001_var == 45) ; this is the "main" counterplayer->removeitem "bk_ABCs" 1player->removeitem "bk_AedraAndDaedra" 1player->removeitem "bk_AnnotatedAnuad" 1player->removeitem "bk_ChildrensAnuad" 1player->removeitem "bk_Anticipations" 1player->removeitem "bk_ArcturianHeresy" 1player->removeitem "bk_BiographyBarenziah1" 1player->removeitem "bk_BiographyBarenziah2" 1player->removeitem "bk_BiographyBarenziah3" 1player->removeitem "bk_BriefHistoryEmpire1" 1player->removeitem "bk_BriefHistoryEmpire2" 1player->removeitem "bk_BriefHistoryEmpire3" 1player->removeitem "bk_BriefHistoryEmpire4" 1player->removeitem "bk_BrothersOfDarkness" 1player->removeitem "bk_ChangedOnes" 1player->removeitem "bk_ChildrenOfTheSky" 1player->removeitem "bk_ChroniclesNchuleft" 1player->removeitem "bk_frontierconquestaccommodat" 1player->removeitem "bk_galerionthemystic" 1player->removeitem "bk_InvocationOfAzura" 1player->removeitem "bk_LivesOfTheSaints" 1player->removeitem "bk_MixedUnitTactics" 1player->removeitem "bk_MysteriousAkavir" 1player->removeitem "bk_Mysticism" 1player->removeitem "bk_nchunaksfireandfaith" 1player->removeitem "bk_oldways" 1player->removeitem "bk_onoblivion" 1player->removeitem "bk_OriginOfTheMagesGuild" 1player->removeitem "bk_OverviewOfGodsAndWorship" 1player->removeitem "bk_PigChildren" 1player->removeitem "bk_PilgrimsPath" 1player->removeitem "bk_RealBarenziah1" 1player->removeitem "bk_RealBarenziah2" 1player->removeitem "bk_RealBarenziah3" 1player->removeitem "bk_RealBarenziah4" 1player->removeitem "bk_RealBarenziah5" 1player->removeitem "bk_reflectionsoncultworship..." 1player->removeitem "bk_tamrielicreligions" 1player->removeitem "bk_SaryonisSermons" 1player->removeitem "bk_specialfloraoftamriel" 1player->removeitem "bk_truenatureoforcs" 1player->removeitem "bk_vampiresofvvardenfell1" 1player->removeitem "bk_vivecandmephala" 1player->removeitem "bk_wildelves" 1player->removeitem "bk_yellowbookofriddles" 1player->additem "MH_q_002" 1 ; this isn't essentialjournal MH_J_Booklist 15MessageBox, "Here is some text"set doonce to 1endifendifend

User avatar
Sylvia Luciani
 
Posts: 3380
Joined: Sun Feb 11, 2007 2:31 am

Post » Sun May 29, 2011 2:45 am

At least part of the problem is from the "34th Variable". This is listed in MSFD, but hard to find without knowing it exists. The problem is that for some reason the 34th variable of a type will be ignored/broken. The fix is easy; make the 34th variable something you don't use:
short var_31short donotuseshort var_32
(since there were 2 short variables before you started the list of numbered variables, 34th variable is currently var_32)
User avatar
Carys
 
Posts: 3369
Joined: Wed Aug 23, 2006 11:15 pm

Post » Sat May 28, 2011 1:21 pm

At least part of the problem is from the "34th Variable". This is listed in MSFD, but hard to find without knowing it exists. The problem is that for some reason the 34th variable of a type will be ignored/broken. The fix is easy; make the 34th variable something you don't use:
short var_31short donotuseshort var_32
(since there were 2 short variables before you started the list of numbered variables, 34th variable is currently var_32)

Thank you.
I just wanted to create a nice, easy and simple mod, but that seems to be an oximoron with TESCS involved. :P
It looks like I will have to read MSfD from cover-to-cover and learn this language (well learn coding alltogether) to finish this "project".
User avatar
Dan Endacott
 
Posts: 3419
Joined: Fri Jul 06, 2007 9:12 am

Post » Sat May 28, 2011 10:21 pm

So, how's the script working? If that hasn't fixed it, it's likely a minor typo.

Morrowind Scripting For Dummies seems like a long read, hope you have Caffeine. :) I'd take it slow, maybe start with the first few pages of "tips and tricks"; the 34th variable bug is about the 7th page of that section. Most important: don't try to memorize all the info, just remember how to find it easily.
User avatar
QuinDINGDONGcey
 
Posts: 3369
Joined: Mon Jul 23, 2007 4:11 pm

Post » Sat May 28, 2011 5:05 pm

Narfblat: The code did not want to work, so I scrapped the project at started again. :-/

I have a different matter now:
How can I extract meshes and textures from an .esm? I searched for it but the only thing I found is how to create .esms, but not the other way around. :-/
User avatar
Tai Scott
 
Posts: 3446
Joined: Sat Jan 20, 2007 6:58 pm

Post » Sun May 29, 2011 2:01 am

That's too bad, I hope next try is better.

You're trying to use original Morrowind meshes for a new item, right? There are 3 ways to do that:
A. Edit an item that uses the mesh and texture, and give it a new ID. Tell it to save, then say yes to create a new object.
B. Browse for the desired mesh and texture on the Construction Set cd. (the only real usefulness of that CD, since Morrowind includes the CS)
C. Use a BSA unpacker to unpack the Morrowind.BSA file, found in the data files folder, then browse that for the mesh and texture.
User avatar
Jason Rice
 
Posts: 3445
Joined: Thu Aug 16, 2007 3:42 pm

Post » Sat May 28, 2011 10:13 pm

That's too bad, I hope next try is better.

You're trying to use original Morrowind meshes for a new item, right? There are 3 ways to do that:
A. Edit an item that uses the mesh and texture, and give it a new ID. Tell it to save, then say yes to create a new object.
B. Browse for the desired mesh and texture on the Construction Set cd. (the only real usefulness of that CD, since Morrowind includes the CS)
C. Use a BSA unpacker to unpack the Morrowind.BSA file, found in the data files folder, then browse that for the mesh and texture.

Thank you. :) I want to extract the files from Tamriel Rebuilt, I'm experimenting with NIfskope and there are a few statics (and misc. items), that I would like to redesign, and experiment with :) (the "windowjabs" and the food ingredients in particular.)

About the script: my plan was to send the player to the balmora bookshop and make him buy the books there, but this had several "theoretical" problems. First the books cost around 2000 gold and the questgiver will not pay (so the player needs to have the money first, or is stuck on this stage of this quest, and will forget about it once he already has the money), and secondly all the books together are 139 lbs heavy. It just didn't make sense.

So now I'm sending him into dungeons to retrieve these books one-by-one, its more fun that way, no need for scripts, and if the player has half-a-brain he will buy the books anyway instead of dungeoneering. :P

This is a rhetorical question:
I still have problems with my main quest "idea", should it be something I will enjoy? Should it be something others might enjoy? Should it be something thats lore friendly? Should I expand the mod into a faction mod [I have several ideas for this, with buoyant armigers, and vivecian (does this word exist?) indoril guards] or keep it small and "funny".
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am

Post » Sat May 28, 2011 11:14 pm

To use those files, you're going to have to find the actual stored location, either in the data files/meshes (and textures) folder, or from a copy of the mod. The info in the esm or esp file is not a direct pointer, it tells only subfolders and filenames to look for. This is what allows pluginless graphic replacers, without making the mod user edit their BSA.

If you're planning to release those graphics in a mod, don't forget to ask permission from the mod creators. :)
User avatar
Beulah Bell
 
Posts: 3372
Joined: Thu Nov 23, 2006 7:08 pm

Post » Sat May 28, 2011 5:36 pm

My newest problem: :)

I have a creature (a wolf), that I would like to go to "sleep", I checked the instructions in the MSfD but they just confused me. :-/

01. I tried setting his health to 0, which made him lootable. :-/

02. I tried setting his fatigue to 0, which didn't do anything

03. I tried the script: "PlayGroup, Knockdown" which made him roll over and over. :-/ poor thing

04. I found out that idle 4, makes him lie down, but at the end of it he stands up again. :-/

Any advice?
User avatar
NO suckers In Here
 
Posts: 3449
Joined: Thu Jul 13, 2006 2:05 am

Post » Sat May 28, 2011 3:38 pm

Try using a script, setting his fatigue to 0 and adding (just for a frame or two) a damage fatigue spell (ability or curse, actually). For the 0-fatigue to be recognized as a knock-out by the engine, something has to damage fatigue.
User avatar
keri seymour
 
Posts: 3361
Joined: Thu Oct 19, 2006 4:09 am

Post » Sat May 28, 2011 2:30 pm

Try using a script, setting his fatigue to 0 and adding (just for a frame or two) a damage fatigue spell (ability or curse, actually). For the 0-fatigue to be recognized as a knock-out by the engine, something has to damage fatigue.

Thanks :), I'll try it.
User avatar
Captian Caveman
 
Posts: 3410
Joined: Thu Sep 20, 2007 5:36 am

Post » Sun May 29, 2011 1:08 am

I have a new question.

I'm looking for a way to make some items carried by a NPC, to not be lootable by the player. I would like to have a corpse after the player fought the NPC, and I would like to allow some items to be lootable, and some not.

Example:
There is a guy in expensive armour, I would like to allow the player to fight him, kill him, loot a quest item from him, but I don't want to allow the player to take the NPCs armour, and other items (like rings/necklaces with CE enchantments).

One way that camed to my mind is detect whether the NPC is dead or not and then remove the items I don't want to give to the player, but that is not really realistic, when it comes to armour and other visible items.
The other way would be to disable his body, and place the items I want to be lootable on the ground, where the corpse should be, but I hope there is a more elegant solution for this.

I've read somewhere that some creatures/NPCs in the original game have rings/amulets with CE enchantments on them, which the player can't loot, thats exactly what I'm looking for (well except if it is the method I described above).
User avatar
Mel E
 
Posts: 3354
Joined: Mon Apr 09, 2007 11:23 pm

Post » Sat May 28, 2011 5:25 pm

You could just set up a MessageBox like "You cannot loot this body" after the NPC is dead.
But there must be an easier way to hide items on a corpse.

If you want the NPC to have constant enchantments, just make them with Abilities instead of Items.
Yeah, there's gotta be an easier way... I'd go with Removing Item on death.

sorry. that's all I got:P
User avatar
Emily Graham
 
Posts: 3447
Joined: Sat Jul 22, 2006 11:34 am

Post » Sat May 28, 2011 2:51 pm

You could just set up a MessageBox like "You cannot loot this body" after the NPC is dead.
But there must be an easier way to hide items on a corpse.

If you want the NPC to have constant enchantments, just make them with Abilities instead of Items.
Yeah, there's gotta be an easier way... I'd go with Removing Item on death.

sorry. that's all I got:P

Thank you Pluto, the Msg box on the corpse thing is new to me. :)

I took a coffee break and got a new idea, when the NPC is at certain health (15%) he makes a forcegreeting, gives the quest item to the player in dialogue, and then I'll make the corpse unlootable. This is no solution for the question above, but it solves my problem at hand perfectly. :)
I just need to find a way to make sure the player can't kill him in one strike from 16%. :lol:
User avatar
Emily Rose
 
Posts: 3482
Joined: Sat Feb 17, 2007 5:56 pm

Post » Sat May 28, 2011 11:35 am

There isn't a way to make sure he can't be killed, but you can do some tricky scripting so that if he is killed, the old copy (dead one) is deleted, a new (live) one is put in the same(ish) place, and that one ForceGreetings the player and hands the item over. It won't look exactly right, but will help on the occasion the player does kill him in one hit.
User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am

Post » Sun May 29, 2011 2:29 am

Hi again! :)

I was wondering how could I delete parts from meshes? I haven't really done any modeling yet, what would I need for this? Nifskope? Blender...

For example, I would like to delete these 4 struts: http://www.abload.de/img/abcjqf8.jpg
User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Previous

Return to III - Morrowind