The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

> Ovewrite/patching
Andyr
post Dec 13 2005, 06:46 PM
Post #1


A fool and a knave


Forum Member
Posts: 153
Joined: 21-July 04
From: Oxford, UK




Are the changes made in this mod file direct copy overwrites, or are they done by patching?


--------------------
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods.

<jcompton> Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"
Go to the top of the page
 
Quote Post
 
Start new topic
Replies
NiGHTMARE
post Dec 22 2005, 11:44 PM
Post #2





Forum Member
Posts: 70
Joined: 7-September 04
From: Hampshire, UK




In certain circumstances, coding is a heck of a lot faster than using an editor; the most obvious time this applies is if you want to make the same change to a large number of files. For example, if you wanted to let cleric/thieves use any item a single class thief can use, you would have to either manually edit >90% of the .itm files, or simply use this code:

CODE
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
READ_BYTE  0x1f "useoneb"
READ_BYTE  0x20 "useonec"
PATCH_IF ("%useonec%" BAND 0b01000000) = 0x01000000) BEGIN // if usable by thieves
  WRITE_BYTE 0x1f ("%useoneb%" BAND 0b11111101) // make usable by cleric/thieves
END
BUT_ONLY_IF_IT_CHANGES


This post has been edited by NiGHTMARE: Dec 22 2005, 11:49 PM
Go to the top of the page
 
Quote Post

Posts in this topic
Andyr   Ovewrite/patching   Dec 13 2005, 06:46 PM
aigleborgne   Changes are made by overwritting. I have difficul...   Dec 13 2005, 10:21 PM
NiGHTMARE   You should probably include a warning about the .c...   Dec 21 2005, 12:11 PM
Salk   NiGHTMARE, thanks for the tip! We won't ...   Dec 21 2005, 01:31 PM
aigleborgne   Patching cre is not easy. You probably think this...   Dec 21 2005, 04:51 PM
Salk   aigleborgne, there won't be any problem becau...   Dec 21 2005, 05:10 PM
NiGHTMARE   It's easy once you've left the learning s...   Dec 21 2005, 05:45 PM
aigleborgne   Assuming I would do this with a script and because...   Dec 21 2005, 06:39 PM
NiGHTMARE   True, but then again at the moment it requires ab...   Dec 21 2005, 07:03 PM
Baronius   Advice (to all modders): compatibility is importan...   Dec 21 2005, 08:06 PM
CamDawg   I couldn't disagree more. Start learning new a...   Dec 21 2005, 09:03 PM
NiGHTMARE   Are you suggesting there are things you can do wi...   Dec 21 2005, 09:12 PM
Andyr   If your modification does something bad like crash...   Dec 21 2005, 09:21 PM
aigleborgne   Ok, I will try to make to mod a cre with patching ...   Dec 21 2005, 10:16 PM
NiGHTMARE   The number one resource for such things is IESDP, ...   Dec 21 2005, 11:54 PM
Ascension64   PM'ed aigleborgne. Since everyone else seems ...   Dec 22 2005, 12:17 AM
Andyr   Near Infinity is really good for offsets. And reme...   Dec 22 2005, 12:19 AM
Salk   I thank you all guys for your help (especially Asc...   Dec 22 2005, 09:50 AM
aigleborgne   If both mod change the same parameter, the last in...   Dec 22 2005, 10:23 AM
Ascension64   Well, hopefully the 'source parameter' and...   Dec 22 2005, 10:36 AM
aigleborgne   I didn't understand your example. I know it ...   Dec 22 2005, 02:07 PM
The Bigg   Meta-code like ADD_CRE_ITEM makes sure to do all n...   Dec 22 2005, 02:26 PM
cujo   Maybe this is easier to understand: Two people wa...   Dec 22 2005, 02:54 PM
Baronius   To sum up my opinion: ensure compatibility if po...   Dec 22 2005, 10:45 PM
NiGHTMARE   In certain circumstances, coding is a heck of a lo...   Dec 22 2005, 11:44 PM
Baronius   These are not the only two possibilities obviousl...   Dec 23 2005, 12:09 AM
CamDawg   I understood. I disagreed.   Dec 23 2005, 03:31 AM
Baronius   In that case, you say that even an important part ...   Dec 23 2005, 03:33 AM
Ascension64   I just hope that, speaking generally and slightly ...   Dec 23 2005, 09:08 AM
CamDawg   That's not what I'm saying at all. Overwr...   Dec 23 2005, 11:42 AM


Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 11th April 2025 - 04:49 AM