Problem with form IDs being one number off

Post » Tue May 17, 2011 1:21 pm

I have made a mod that has a quest that requires a goblin shield in order to work.

The dialogue is set up to give a reward to the player for 20 of these shields but there is a form ID problem.
Some of the shields have one form ID and the others have another the only differences is the last number/letter.
The goblin shields drop from goblins which means they are spawned.

How do I make it so that the shields only drop with the same form ID?
User avatar
loste juliana
 
Posts: 3417
Joined: Sun Mar 18, 2007 7:37 pm

Post » Tue May 17, 2011 9:23 am

if eval (player.getItemCount GoblinShieldID01 >= 1 ) || (player.GetItemCount GoblinShieldID02 >= 1 )

player.AddItem GoblinShieldID01 20

endif

Try that?
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am

Post » Tue May 17, 2011 9:01 am

if eval (player.getItemCount GoblinShieldID01 >= 1 ) || (player.GetItemCount GoblinShieldID02 >= 1 )

player.AddItem GoblinShieldID01 20

endif

Try that?



Do I put this in the result script of the dialogue?

I'm using dialogue not scripting to detect how many shields.
User avatar
Holli Dillon
 
Posts: 3397
Joined: Wed Jun 21, 2006 4:54 am

Post » Tue May 17, 2011 11:45 am

Do I put this in the result script of the dialogue?

I'm using dialogue not scripting to detect how many shields.


You could also just check how many of each of the 2 items the player had and then add them together to do the test on how many they have !
User avatar
Cheryl Rice
 
Posts: 3412
Joined: Sat Aug 11, 2007 7:44 am

Post » Tue May 17, 2011 8:43 am

You could also just check how many of each of the 2 items the player had and then add them together to do the test on how many they have !



I don't understand.
User avatar
neen
 
Posts: 3517
Joined: Sun Nov 26, 2006 1:19 pm

Post » Tue May 17, 2011 4:05 pm

I don't understand what a "goblin shield" is in this context. The goblins in the vanilla game use the same shields as everyone else - either steel or elven - and you can't tell whether you got one from a goblin or any other way.
User avatar
jasminĪµ
 
Posts: 3511
Joined: Mon Jan 29, 2007 4:12 am

Post » Tue May 17, 2011 8:18 am

I don't understand what a "goblin shield" is in this context. The goblins in the vanilla game use the same shields as everyone else - either steel or elven - and you can't tell whether you got one from a goblin or any other way.


From what I've read I believe he is trying to set the goblin shield up similar to the Black Bows -- but where you take 20 units back to someone in return for a quest reward but wants it to be a combination of 20 shields of either type and is having problems getting it working since there are the 2 ids and he doesn't know how to write the script to check for a combination of the 2 and remove the combined 20 units for the reward properly . (at least that is what I think he wants )

ie. if the player has 6 of the one type and 14 of the other type at one point and then say 18 of the first type and 2 of the second type on another visit to redeem them- he needs to script it so that the script recognizes that the player does indeed have 20 shields and will take all of them properly and not force the player to have 20 of just the 1 type !
User avatar
Timara White
 
Posts: 3464
Joined: Mon Aug 27, 2007 7:39 am

Post » Tue May 17, 2011 1:31 am

The black bow quest works because only those bandit have them. At certain levels every bandit or maruder will have the same shields as the goblins, and you'd be able to do it without going near a single goblin.

But one step at a time is good. Let's get the count working first and then figure the rest out later.
User avatar
jadie kell
 
Posts: 3497
Joined: Sat Jul 29, 2006 3:54 pm

Post » Tue May 17, 2011 3:34 am

The black bow quest works because only those bandit have them. At certain levels every bandit or maruder will have the same shields as the goblins, and you'd be able to do it without going near a single goblin.

But one step at a time is good. Let's get the count working first and then figure the rest out later.


Just reread your earlier post and you are correct the goblins use any number of shields -- http://i212.photobucket.com/albums/cc189/JDFanning_bucket/pic1-1.jpg

As you can see they can have either Fur, Iron, Leather, Steel, Dwarven, Chainmail, Mithril or Elven shields in the Vanilla game !! So in order to do this you would first need to create new levelled lists changing the shields they are given to a new goblin specific version of each and then work out the scripting to handle the check for a combination of any 20 of them !!
User avatar
Craig Martin
 
Posts: 3395
Joined: Wed Jun 06, 2007 4:25 pm

Post » Tue May 17, 2011 1:55 pm

I should have explained the situation better than this.

I am using the goblin shields in Martigen's Monster Mod. In that mod there are 7 shields for all of the 7 goblin tribes. The shield that is giving me problems in for the White Skin Goblin tribe. For some reason when my character gathers those particular shields they stack into 2 different sets with similar form id except that they spawn with the every letter/number being exact except the very last on...

The problem is that because they are spawning 2 different sets that means that only one set can be the right one at a time. For example my character has less than twenty of both types say for instance 11 of 1 set and 9 of the other set instead of the game counting both sets as 20 shields to complete the quest it is counting it as two different things suggesting that I have to get exactly 20 of either set of shields.

Oddly enough this was not a problem until I started to use FCOM. And the irony is that is mod is intended along with a bunch other quests I made to be for FCOM.


The only shield I am talking about is the White Skin shield provided by MMM not any vanilla shields. This quest worked before without FCOM so it should be working now with it there shouldn't be 2 different form id there should just be one or the game should count the different form id as 1 thus making the quest work as is.

Thanks for all of your replies.
User avatar
Nick Jase Mason
 
Posts: 3432
Joined: Sun Jul 29, 2007 1:23 am

Post » Tue May 17, 2011 7:03 am

And how are you currently calculating how many shields the player has? Are you conditioning the dialog?
And are you positive both shields are from MMM? Perhaps its not working now because FCOM added its own shield.

You can script the dialog to remove one form ID and add the number of them removed to the other form ID.

short myCset myC to player.getitemcount goblinshield1message "  "message "  "player.removeitem goblinshield1 myCplayer.additem goblinshield2 myC


You then count goblinshield2 in the dialog conditions.
User avatar
Unstoppable Judge
 
Posts: 3337
Joined: Sat Jul 29, 2006 11:22 pm

Post » Tue May 17, 2011 3:46 pm

And how are you currently calculating how many shields the player has? Are you conditioning the dialog?
And are you positive both shields are from MMM? Perhaps its not working now because FCOM added its own shield.

You can script the dialog to remove one form ID and add the number of them removed to the other form ID.

short myCset myC to player.getitemcount goblinshield1message "  "message "  "player.removeitem goblinshield1 myCplayer.additem goblinshield2 myC


You then count goblinshield2 in the dialog conditions.



Thanks Will, you make some good mods...


What if I look up the IDs for both shields then post them can you tell me which one should go where in that code?

Another thing is that its been hard to narrow down the other set of shields too but I going to look but when I find them I will post them.
User avatar
Rachel Hall
 
Posts: 3396
Joined: Thu Jun 22, 2006 3:41 pm

Post » Tue May 17, 2011 2:34 pm

Using the form ID finder; http://tesnexus.com/downloads/file.php?id=16704, I have found the offending mod.
Its OOO version 1.33

The ID for the OOO shields is similar to the MMM shields:

MMM=Goblinshield4

OOO = Goblinshield4ooo


Its seems like the simplest decision is to just change the name of the OOO shields to something else so that the player knows which ones to bring to the quest giver. Or I can attempt to delete the shields for OOO somehow.

Any suggestions?


For some reason when I try to change the names (not the editor id or form id) of the OOO shields the CS will not let me save I keep getting error messages.

It says:
AssertionAssert at, 1629516914


With a choice to Abort, retry or ignore and I can't activate any plugins from error because it says its has a corrupt editor no matter how I name it.

One thing I want to say that I HATE when the construction set does things like this I have done things like this many times before but now I can't simply rename a few shields without an unnecessary error message!
User avatar
Spencey!
 
Posts: 3221
Joined: Thu Aug 17, 2006 12:18 am

Post » Tue May 17, 2011 2:55 am

You cannot mod another ESP inside your own ESP. You can only mod master files. Is OOO a master file? I dont use OOO, MMM or FCOM so I don't know. (I prefer the vanilla game)

If thats not the problem, then I don't know cause I don't use those mods.
User avatar
Marcin Tomkow
 
Posts: 3399
Joined: Sun Aug 05, 2007 12:31 pm

Post » Tue May 17, 2011 5:17 am

You cannot mod another ESP inside your own ESP. You can only mod master files. Is OOO a master file? I dont use OOO, MMM or FCOM so I don't know. (I prefer the vanilla game)

If thats not the problem, then I don't know cause I don't use those mods.



I think I finally figured out I successfully renamed the OOO shields and I have a compatibility patch. I did by just loading the OOO masterfile without the OOO plugin and I made a new plugin that changes the name of the shields.

So in order to use my quest mod a person has to use this patch if they are using OOO and they have to make sure that wrye bash does change the names of armor which might overwrite the name change.

I need to test this more.
User avatar
Lucie H
 
Posts: 3276
Joined: Tue Mar 13, 2007 11:46 pm

Post » Tue May 17, 2011 4:30 am

If there are two different types of shields, why don't just check if the sum is larger than 20? Why start to complicate things with patches or replacing inventory?
set count to (Player.GetItemCount goblinshield1) +  (Player.GetItemCount goblinshield2)if count >= 20  ...endif

User avatar
Prohibited
 
Posts: 3293
Joined: Tue Jun 12, 2007 6:13 am

Post » Tue May 17, 2011 8:22 am

If there are two different types of shields, why don't just check if the sum is larger than 20? Why start to complicate things with patches or replacing inventory?
set count to (Player.GetItemCount goblinshield1) +  (Player.GetItemCount goblinshield2)if count >= 20  ...endif




How do I apply this scripting?

Do I place it in the result script or what?
User avatar
Markie Mark
 
Posts: 3420
Joined: Tue Dec 04, 2007 7:24 am

Post » Tue May 17, 2011 4:23 pm

How do I apply this scripting?

Do I place it in the result script or what?

Ah, so you don't have any quest script? If so, I would suggest adding the following quest script and attach it to your quest:

ScriptName myScript   ;change to something more meaningfulshort shieldCountBegin GameMode  set shieldCount to (Player.GetItemCount goblinshield1) +  (Player.GetItemCount goblinshield2)End
This will run every 5 seconds while in gamemode, which should be more than good enough.

Then test that the quest variable is 20 or more in the dialogue condition.

And maybe have "set myQuest.shieldCount to myQuest.shieldCount - 20" in the dialogue result script if you give away the 20 shields, to ensure that shieldCount is immediately updated when giving away the shields.
User avatar
Danel
 
Posts: 3417
Joined: Tue Feb 27, 2007 8:35 pm

Post » Tue May 17, 2011 3:00 am

Sorry I didn't reply sooner I got captivated by Fallout: New Vegas and real life but I am going to experiment with this.

I'm not accustomed to short scripts but I think did something like this before I'll be sure to post results.

I don't have a quest script...

Thanks TheNiceOne.
User avatar
Verity Hurding
 
Posts: 3455
Joined: Sat Jul 22, 2006 1:29 pm


Return to IV - Oblivion