Jump to content

Hex'ing Mods


GBHis

Recommended Posts

Heya fellow modder!

I'm currently in a phase of (almost) randomly changing values in my own mods to achieve new functionality. Today I've tried to add an extra magic effect ID (as people will know, there's a fixed amount of these in-game). During load of the mod in the CS, it gave this error message when I tried to clone the fire damage effect (FIDG):

---------------------------
Warning
---------------------------
SetFormID bashing entry in form ID map at 00001872.

Form basher: type MGEF_ID

Bashed form: MGEF Form 'FIDG' (00001872)





Continue Playing?

"Yes to all" will disable all Warnings this session.
---------------------------
Yes   No   Cancel   
---------------------------

 

Does anyone know anything about the SetFormID function it mentions?

Link to comment
Share on other sites

Not sure on the solution, but I don't think you'll be able to do what you're wanting to do. Magic effects aren't simply the listings in the CS, they have hard coded scripting related to them that is likely linked to the Four Letter ID. Keep in mind, the things which load with the CS, before you load and .esm are things which are the hard coded things, and exist within the program, not the .esm. Just like with soul gems, you can't make new ones and still have them work, but you can alter the ones which are already defined.

 

Now, I'm not an expert on what is possible through hexing, and don't know what you are hexing. But I'd imagine that anything along the lines of playing with those hard coded things would require a change to the actual .exe, and thus, is outside what we can legally share.

Link to comment
Share on other sites

Not sure on the solution, but I don't think you'll be able to do what you're wanting to do. Magic effects aren't simply the listings in the CS, they have hard coded scripting related to them that is likely linked to the Four Letter ID. Keep in mind, the things which load with the CS, before you load and .esm are things which are the hard coded things, and exist within the program, not the .esm. Just like with soul gems, you can't make new ones and still have them work, but you can alter the ones which are already defined.

 

Now, I'm not an expert on what is possible through hexing, and don't know what you are hexing. But I'd imagine that anything along the lines of playing with those hard coded things would require a change to the actual .exe, and thus, is outside what we can legally share.

Until now, I've only been hex'ing the actual four-byte IDs, but I've discovered the effects have a numbering system as well (that's how it recognized my attempt to change the four letter code).

I think there's only allocated 256 (0x00-0xff) different effects, but the effects seem to be stored with an extra null-byte beside it which might indicate that there are actually 0x0000-0xffff possibilities (which would open up for 0xffff minus 0x00ff new effects).

I'll have to do some testing, though.

 

On a sidenote, have anyone mapped the class-numbers (ie the 161236-like numbers in the CS) to a binary map? I'm pretty confident it's a binary number calculated from which basic abs, etc it has?

Link to comment
Share on other sites

Might want to talk to some of the people who worked on OBSE, I think some of their work involved hex editing, Wyre might also be someone to ask, although it might be hard getting a hold of him.

 

All I've personally tried is getting access to some of the stuff which is normally restricted. Turns out that there aren't any hidden weapon types, and enchantments are pretty much fixed as they are, and will either revert in game, or create an error.

 

My main point in what I said above was that even if you manage to get access to some additional spell effect, the game probably won't know what to do with it, or may not even recognize it. Just like how you can change the letter designation of spell effects, they are still linked to something within the basegame coding to make them still work. Or if I'm mistaken, they won't work, because the link is severed. It's like if you have 5 seperate keys that fit into 5 seperate locks, changing the profile of one key may make it so that it can no longer open the lock, adding another key, won't add another lock.

Link to comment
Share on other sites

The lag prevented me to read yours latests messages while I was writing the former one.

Since seems to me what you want is creating several hardcoded magic effects, what I said is yet valid. You can allocate the "instruction" codes that trigger then (deal with the OBSE people for a range that would not conflict with then) and do your code as a plugin. This seems the better way and doesn't infringes any rules.

 

Edit: Indeed you need just one or a few. and place tables the length you wish in the codding, to be accessed as parameters.

Just remember this is not just hexing... is codding a bunch of things in C (or whatever high level language compliant with the calling procedures) or even assembly.

Link to comment
Share on other sites

Oh, I think you've got me all wrong. I'm not modifying oblivion.exe, I'm modifying GBHis_testmod.esp.

I'm not sure whether the data contained in the .esp files (for modifying the hardcoded magic effects) is applied to existing hardcoded stuff or if it creates entirely new entries using the data for creating a new magic effect (that's what I hope). I believe my mistake was to miss a serial number / checksum somewhere. I'll keep you posted.

Link to comment
Share on other sites

Oh, I think you've got me all wrong. I'm not modifying oblivion.exe, I'm modifying GBHis_testmod.esp.

I'm not sure whether the data contained in the .esp files (for modifying the hardcoded magic effects) is applied to existing hardcoded stuff or if it creates entirely new entries using the data for creating a new magic effect (that's what I hope). I believe my mistake was to miss a serial number / checksum somewhere. I'll keep you posted.

This is the point. when you use a hardcoded magical effect you are 'referencing' code in the exe. You can indeed create your own hardcoded effects, but you can do this only outside the executable itself. I don't need even know the way this is done to see if is a table, so each entry points to a code chunk. Trying using this table modifying the entry point to something outside the exe is in itself modifying the exe. The reasons Bethesda don't allows messing with the original stuff are Obvious. They doesn't allows one messing even with the BSAs. You can mod anything outside then. Beth even provided a way the /data structure 'overriding' the BSA structure.

 

But one that goes messing even with the BSA is going the wrong way and will be shunned for this, you can be sure about this.

 

Bethesda used a range of possible hex numbers to be used by the engine as "instructions", reserved another block and liberated all the remaining to be freely used. Is where we mentioned OBSE, it does exactly this. It uses that free range. these codes are very alike the instructions codes in assembler. Each of those instructions codes are "Entry points" to every function of OBSE. And the Free range is extense... much bigger the one Beth uses and reserved. Indeed the number of functions provided by OBSE is bigger the original scripting capacity(and they just scratched that range). Shivering Isles used just a few the ones Beth reserved for then selves.

 

Even OBSE have a politics of "centralizing" that free range. I don't know for sure if they can enforce those ranges, but no sane modder would goes the wrong way by using ones that conflicts so summarily with OBSE. Oblivion would crash in the very start.

Seems clear the best way of "hardcoding" stuff is plugin OBSE (or even getting in the team and expand it) BUT, be what can be, the better is really respecting that centralizing. So each one that have reasons to hardcode something receives a known range no other will overlap.

 

Maybe you can create your own Script Extender, maybe don't have legal reasons that prevent this being done, yet "good sense" is ever and ever the better thing.

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...