mjw Posted May 8, 2008 Share Posted May 8, 2008 Hi! I'm relatively unexperienced with that modding thing so I hope I'm not asking something stupid. Feel free to give me a RTFM if so (and tell me where I must go). Ok, here's my problem: Mod A introduces global var X which need to be accessed from script S in Mod B. Both A and B are loaded into the CS (first A, than B) with B being the active file. Whenever S is changed to read or write X, the entire script S does not work anymore in the game (although the CS shows no errors). In detail: You may or may not know the (cool) Demon Race Mod by Chingari and Ismelda. In short, it provides a new race of demon that have wing and can even fly with them (using OBSE). I suggested that it would be cool if it were to work with Actors In Charge. If you use AIC to change the idle animation of your character, the wings of your demon don't flap anymore. I wanted to take a cool or sexy pose *and* fly around with moving wings. I was told by Ismelda that it is too much work to add wing data to all possible animations. Therefore, I suggested a scripting solution. When the character starts flying, store the current idle animation and then reset to default. You don't see the idle animation while being in the air anyway. Then, when the character lands, restore the animation. Ismelda told me she could not do this. So I figured I'd give it a try. I took a look a the stuff in the CS. It appears that the global short trfAICnum introduced by "Actors in Charge" stores the animation to play. There are other things to take care about (i.e. spells put on player) but for a start, I just concentrated on that global. Thing is, whenever I alter DemonFlightScript in the Demon Race ESP to access that variable (be it read or write access) the entire script does not work at all anymore. Example: I simply insertmessage "Current trfAICnum is %.0f", trfAICnum, 10 after the if-Statement that checks if the start flight key was pressed. Then I save, launch Oblivion, hit the flight key and nothing happens. No message, no flight. I go back into the CS and change the message to "Hello World". And next time I start Oblivion and hit '.', a "Hello World" is displayed and the character goes into flight mode. I read the docs about globals and find no explanation for this. It says a global is accessible from any script. I thought that's why they call it "global". Can anyone enlighten me on this? :confused: Link to comment Share on other sites More sharing options...
Vagrant0 Posted May 8, 2008 Share Posted May 8, 2008 Essentially, you can't. Globals within one esp cannot be read by another esp. The only way a global can be used by a mod other than itself is if it is defined within a .esm. If the global exists within a masterfile, technically it would be possible to have one mod (parented to that .esm) change that global, and another mod (parented to the .esm) read that global. Since I would assume that the global exists within the demon race mod, you would need to get permission to convert that race mod to a .esm (probably breaking it in the process), then parent the AIC mod to it. It should be noted that since neither of these mods belong to you, and you would have to make significant changes to AIC, you wouldn't be able to distribute such a mod (even if you got permission, due to technical issues involving your version of the .esm verses someone else's version). That aside, what you are trying to do, from an animation standpoint probably isn't possible. Idle animations are a bit limited, each animation is loaded into one or more areas of the NPC which tells it what is being animated. Left Arm, Left Hand, Lower Body, Right arm, Special Idle, Upper body, whole body. This is how some animations like talking to someone while seated can work when you have one animation for talking, and one animation for being seated. This is important because the wing animations may be affecting the same group as whatever pose you have... Meaning that one will just override the other. If one doesn't override the other, what you are likely to end up with is some sort of bugged animation where it is doing parts of one, and parts of the other, without either one looking right. The wing flapping animation may have other elements to it which could interfere. Trying to rig it all in a way that any of it works is also a significant issue. Long story short, what you want to do probably can't be done, and if it could, you wouldn't be able to share your changes with anyone. Link to comment Share on other sites More sharing options...
mjw Posted May 8, 2008 Author Share Posted May 8, 2008 Ok, thanks for the answer anyway. I thought it would be enough to alter the DemonFlightScript (which states in its comments that everyone may make any change in it) and then propose the changes to the original author. But this ESP-to-ESM is too complicated for me anyway so I don't even need to think about getting permissions from anyone. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.