Jump to content

WeiDU doesn't like me


Icendoan

Recommended Posts

Ok, I am trying to write a small bugfix for EasyTuTu. it fixes the erroneous use of Bandit Scalps in quickslots although a useless ability.

What you want to remove that ability. Sure it is useless, but I'm looking at using the quick item slots as a place to put the scalps so they cannot be pick-pocketed prior to the cre being killed.

 

I've got code were I remove some other useless abilities from files. It's somewhere in my fixpack stuff in the bg1 fixpack work room. If you're interested, I can look it up and post it here. Shoot it shouldn't be that hard to modify for the scalp file, I could do that too... Of course, this is a rather late post to the topic so you may have solved your issues....

Link to comment

They are all already in the gloves slots in TuTu, checking normal BG1....

 

Hah, they are already there in my game! You could definately fix this by assigning this to the gloves slot.

 

How would WeiDU do that?

 

Icen

Link to comment
I'm looking at using the quick item slots as a place to put the scalps so they cannot be pick-pocketed prior to the cre being killed.
Pretty sure you can pickpocket from the quick items. See here for the slots you can't pickpocket from (I guess gloves will work).

 

It takes some messy WeiDU to move an item from one slot to another, unless there's a clean DELETE_CRE_ITEM now, in which case you just need a line for that and another line for an ADD/REPLACE_CRE_ITEM in the new slot. If it's not in WeiDU, then it's in Gort's macros.

Link to comment

I shall check the documentation. Thanks.

Well, there is just the option of making it unstealable, which if I have it right, should look something like this

 

BACKUP ~ScalpFix/Backup~
AUTHOR ~This Thread~

BEGIN ~Scalp Patch~

ACTION_IF FILE_EXISTS_IN_GAME ~fw0125.are~ /*TuTu area only*/ THEN BEGIN
OUTER_SPRINT ~tsu~ ~_~ 
END ELSE BEGIN
OUTER_SPRINT ~tsu~ ~~
END


COPY_EXISTING ~%tsu%misc86.itm~ ~override~ //Bandit Scalp
PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN
 READ_LONG 0x64 xf //Ext. Header offset
 READ_SHORT 0x68 xc //ext. header count
 PATCH_IF xc = 1 BEGIN //xc = 1 must mean the header is actually there... So, if it is, it will start
  DELETE_BYTES xf 0x38 //deletes it. What xf and 0x38 means is beyond me atm
  WRITE_SHORT 0x68 0 //this updates the header count, which must be a 2da
  WRITE_LONG 0x6a xf //updates the feature offset, must be aother 2da
 END
END

COPY_EXISTING ~%tsu%banditcy.cre~ ~override/%tsu%banditcy.cre~
 ADD_CRE_ITEM ~%tsu%misc86~ #0 #0 #0 ~IDENTIFIED~ ~UNSTEALABLE~ ~GLOVES~
 END
END

BUT_ONLY_IF_IT_CHANGES

Link to comment
I shall check the documentation. Thanks.

Well, there is just the option of making it unstealable, which if I have it right, should look something like this

Well, my original fix did make the bandit scalps unstealable, but CamDawg informed me that that would cause certain other issues. Not sure what, but when Cam speaks it's best to listen...

 

I read that thread that Miloch linked to and now, I'm confused....

 

Someone tell me what to do with these things.

 

1) Move the scalps to something like the belt slot

OR

2) flag it as "unstealable"/"unpickpocketable" or whatever that flag is called. (like I've always done before).

 

If we do option #2, I'll include the removal of quick item slot use within the fixpack.

 

So when ya get something nailed down let me know which way to go and I'll do it.

 

@Original Poster: Could you post a copy of your working code that removes the quick item slot use? I'll need access to it for the fixpack if they decide that option 2 is the best route to go....

Link to comment

I want access to the fixpack :)

 

anyhow, here it is.

 

BACKUP ~ScalpFix/Backup~
AUTHOR ~Mystykyl@hotmail.co.uk~

BEGIN ~Bandit Scalp Fix <Icendoan>~
ACTION_IF FILE_EXISTS_IN_GAME ~fw0125.are~ /*TuTu area only*/ THEN BEGIN
OUTER_SPRINT ~tsu~ ~_~ 
END ELSE BEGIN
OUTER_SPRINT ~tsu~ ~~
END


COPY_EXISTING ~%tsu%misc86.itm~ ~override~ //Bandit Scalp
PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN
 READ_LONG 0x64 xf //Ext. Header offset
 READ_SHORT 0x68 xc //ext. header count
 PATCH_IF xc = 1 BEGIN //xc = 1 must mean the header is actually there... So, if it is, it will start
  DELETE_BYTES xf 0x38 //deletes it. What xf and 0x38 means is beyond me atm
  WRITE_SHORT 0x68 0 //this updates the header count, which must be a 2da
  WRITE_LONG 0x6a xf //updates the feature offset, must be aother 2da
 END
END
BUT_ONLY_IF_IT_CHANGES

 

Icen

Link to comment
I want access to the fixpack :)
Cam gave you access if you've not gotten the memo yet... :D

 

I gave your code a whirl. I must say, I don't like what it does.

Yes it removes the ability to put the scalps in the quick slots, but it also removes or gives the appearance of removing the stackablity of the scalps. IESDP does state that there needs to be at least one ability in order for items to stack.

 

My recommendation on this is to change the item type from 0x0 misc/book to 0x3b fur/pelt I've already tried it on my bg1 no-totsc and had no problems. I'm going to code it that way in the fixpack too.

 

As a side note to anyone who cares:

I've done some testing (I think avenger did something similiar as well). Within the item references of the CRE structure there is a flag whose value 2 is equated to be "Can't Steal" by DLCTEP and "unstealable" by IESDP. When that flag is set an item can not be stolen from the cre (i.e. pickpocketed). The item itself is not flagged in any way and so can be sold to stores or stacked as much as allowed.

It is my recommendation that DLTCEP and IESDP adjust their descriptions or make notes in the readme or whatever that this value in question should be called "Can't Pick Pocket"

Again the fixpack will reflect this and use the flag to keep certain items from being pickpocketed. (I've always wondered why someone would try to pickpocket a scalp from bandits who are already hostile...)

Link to comment
I gave your code a whirl. I must say, I don't like what it does.
Well it was my code, the original patching version anyway. If you found something that works better, great - I never claimed my code was sacred or anything (and after all, I was just changing Icendoan's overwriting to patching).
My recommendation on this is to change the item type from 0x0 misc/book to 0x3b fur/pelt I've already tried it on my bg1 no-totsc and had no problems. I'm going to code it that way in the fixpack too.
Fair enough. Does it prevent someone from being able to "use" it as a quick slot item (even though it has no real uses)? For that matter, should we also code the winter wolf pelt (misc01) that way, since it's currently a misc/book? Maybe it doesn't matter, since they're not stackable by default (though maybe they should be, but that's probably not something for a fixpack to decide).
Again the fixpack will reflect this and use the flag to keep certain items from being pickpocketed. (I've always wondered why someone would try to pickpocket a scalp from bandits who are already hostile...)
How much have you tested this? Have you tried stacking items with this flag with those (of the same item) that don't have it? If it doesn't hinder stacking, then that's cool.
Link to comment
I gave your code a whirl. I must say, I don't like what it does.
Well it was my code, the original patching version anyway. If you found something that works better, great - I never claimed my code was sacred or anything (and after all, I was just changing Icendoan's overwriting to patching).
My recommendation on this is to change the item type from 0x0 misc/book to 0x3b fur/pelt I've already tried it on my bg1 no-totsc and had no problems. I'm going to code it that way in the fixpack too.
Fair enough. Does it prevent someone from being able to "use" it as a quick slot item (even though it has no real uses)?
Yes!
For that matter, should we also code the winter wolf pelt (misc01) that way, since it's currently a misc/book? Maybe it doesn't matter, since they're not stackable by default (though maybe they should be, but that's probably not something for a fixpack to decide).
Not necessary, because there is no ability header it can't stack and the game won't let it go into the quick slots.
Again the fixpack will reflect this and use the flag to keep certain items from being pickpocketed. (I've always wondered why someone would try to pickpocket a scalp from bandits who are already hostile...)
How much have you tested this?
Enough to see how things behave. Something like 5 - 10 minutes.
Have you tried stacking items with this flag with those (of the same item) that don't have it? If it doesn't hinder stacking, then that's cool.
You're talking items and the flag is on the cre. Once the item gets off the cre via death or dialog, its the same as if it had been found in a container. The only time stacking might become an issue is if there are at least 2 stores that will purchase the same item and the player steals from one to resell to the other. The stolen items will then have a store/hardcoded set stolen flag and won't stack with non-stolen items. But that is not in the scope of this fix.

 

To recap:

We will set item refs in the cre structure to "Can't Steal" (a value of 2)

-- this prevents pick pocketing from the specific creature

We will change item type to 0x3b furs/pelts

-- this prevents quick slot usage as that is hard coded for certain item types

-- 0x0 misc/books needs quick slot usage for the various tomes that increase abilities.

Link to comment

For those still reading here and not in the fixpack workroom:

Here is the code that will be initially used in the fixpack.

BEGIN ~Remove Quick Slot Usage from Bandit Scalps~
COPY_EXISTING ~misc86.itm~ ~override~ //Bandit Scalp
PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN
 WRITE_SHORT 0x1c 0x003b //Fur/pelt and now bandit scalp
END
BUT_ONLY_IF_IT_CHANGES

//Officer Vai's store needs to purchase this new item type
//we will add it
COPY_EXISTING_REGEXP ~stovai.sto~ ~override~
PATCH_IF (%SOURCE_SIZE% > 156) BEGIN
 READ_LONG 0x2c itmpuroff
 READ_LONG 0x30 itmpurnum
 SET change=0
 FOR (x=0;x<%itmpurnum%;x+=1) BEGIN
  READ_LONG (%itmpuroff% + (%x% * 4)) itmtype
  PATCH_IF (%itmtype% = 0x3b) BEGIN
SET change=1
  END
 END
 PATCH_IF (%change% !=1) BEGIN
  INSERT_BYTES (%itmpuroff% + (%itmpurnum% * 4)) 4
  WRITE_LONG (%itmpuroff% + (%itmpurnum% * 4)) 0x3b //furs/pets
  WRITE_LONG 0x30 (%itmpurnum% + 1)
  READ_LONG 0x34 itmsaleoff
  READ_LONG 0x4c drinksoff
  READ_LONG 0x70 curesoff
  PATCH_IF (%itmsaleoff% > %itmpuroff%) BEGIN
WRITE_LONG 0x34 (%itmsaleoff% + 4)
  END
  PATCH_IF (%drinksoff% > %itmpuroff%) BEGIN
WRITE_LONG 0x4c (%drinksoff% + 4)
  END
  PATCH_IF (%curesoff% > %itmpuroff%) BEGIN
WRITE_LONG 0x70 (%curesoff% + 4)
  END
 END
END
BUT_ONLY_IF_IT_CHANGES

Please note that I only modified officer Vai's store as that is the only store I know of that is intended to purchase the items. I can however, have all stores that purchase misc/book item types purchase the furs/pelts item types...

Link to comment
Please note that I only modified officer Vai's store as that is the only store I know of that is intended to purchase the items. I can however, have all stores that purchase misc/book item types purchase the furs/pelts item types...
I think Vai is the only one who's supposed to be able to buy scalps in the default game.
Link to comment
Please note that I only modified officer Vai's store as that is the only store I know of that is intended to purchase the items. I can however, have all stores that purchase misc/book item types purchase the furs/pelts item types...
I think Vai is the only one who's supposed to be able to buy scalps in the default game.

Maybe the only one that is supposed to but not the only one that does because the scalps were in the books/misc item type. Any store that would purchase items in that item type would buy scalps. An example would be Feldpost's Inn. Perhaps we should at least modify Feldpost's for a secondary place to get rid of scalps that were picked up after Officer Vai has left the building. The player has to keep at least one scalp for Officer Vai to remain and purchase more later. That's the reason I used the quick slot which this component removes. We can always make this component an optional fix since some people may not want to loose the quick slot usage...
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...