Jump to content

NVSE plugin -- What do we need?


prideslayer

Recommended Posts

Posted

It's only annoying because C/C++ lack so much of the RTTI (introspection and reflection) I've gotten used to in other languages. Can't even tell what class something is without modifying all the classes to support it.. talk about living in the stone age! ;)

 

Aren't you asking for GetObjectClassName in utilies.h ?

Works for any object with RTTI info built in.

Posted

It's only annoying because C/C++ lack so much of the RTTI (introspection and reflection) I've gotten used to in other languages. Can't even tell what class something is without modifying all the classes to support it.. talk about living in the stone age! ;)

 

Aren't you asking for GetObjectClassName in utilies.h ?

Works for any object with RTTI info built in.

 

Well that's certainly handy, I had no idea that as in there.. thanks! :D

Posted

So I was all like.. hey.. I'm gonna see if I can find some of these missing flags, they have to be somewhere. Player is a good object to start investigating for flags like TFIK... UFO cam active.. etc.

 

Then I ran into the real life version of "How Little we Know"

 

class PlayerCharacter : public Character
{
 UInt32 unk0B4[(0x190-0x0b4) >> 2];
 UInt32 unk194[(0x5E4-0x194) >> 2];
 UInt32 unk574;
 UInt32 unk5F8[(0x64C - 0x5F8) >> 2];
 UInt8  unk64D[3];  
 UInt32 unk650[(0x694 - 0x650) >> 2];
 UInt32 unk698[(0x6A8-0x698) >> 2];
 UInt32 unk6AC[3];
 UInt32 unk6C4[(0x9BC - 0x6C4) >> 2];

 

Oh shitballs...

 

unk194 is 276 32bit values of unknown purpose. My "print the junk to the screen, toggle something, then print again" strategy is not going to work here. Time to make the code do it!

Posted
So I was all like.. hey.. I'm gonna see if I can find some of these missing flags' date=' they have to be somewhere. Player is a good object to start investigating for flags like TFIK... UFO cam active.. etc.

 

Then I ran into the real life version of "How Little we Know"

 

class PlayerCharacter : public Character
{
 UInt32 unk0B4[(0x190-0x0b4) >> 2];
 UInt32 unk194[(0x5E4-0x194) >> 2];
 UInt32 unk574;
 UInt32 unk5F8[(0x64C - 0x5F8) >> 2];
 UInt8  unk64D[3];  
 UInt32 unk650[(0x694 - 0x650) >> 2];
 UInt32 unk698[(0x6A8-0x698) >> 2];
 UInt32 unk6AC[3];
 UInt32 unk6C4[(0x9BC - 0x6C4) >> 2];

 

Oh shitballs...

 

unk194 is 276 32bit values of unknown purpose. My "print the junk to the screen, toggle something, then print again" strategy is not going to work here. Time to make the code do it![/quote']

Wow while you're in there keep an eye out for a "Turn this Game into the Awesomest MMO" flag :)

Posted

Well, I eliminated all of those as possibilities for holding the UFO camera flag, and all but 53 of the bits as potential flags for any other togglable thing (like foot IK).

 

This type of stuff was so much easier back in the days of DOS programs and SoftICE. ;)

Posted

v4

Planning Cl(ea)r functions for EVs.

 

ref.NX_ClrEVFl -- will clear all entries.

ref.NX_ClrEVFl "some key" -- will delete the "some key" entry.

ref.NX_ClrEVFl "some key" 1 -- will clear all entries matching "some key" as a prefix.

 

(Same for EVFo.)

 

My thought here is for each mod to use its own prefix on the vars it sets, and thus be able to clear them out as needed.

 

For example, assume the following float values are set on player by different mods:

 "sexout:myvar 1" = 1.0
 "sexout:myvar 2" = 2.0
 "sexout:myvar 3" = 5.0
 "mymod:myvar 1" = 2.2
 "mymod:myvar 2" = 3.2
 "mymod:myvar 3" = 2.3

 

The command

 player.NX_ClrEVFl "mymod:" 1

Will remove the last three, but leave those prefixed with "sexout:" alone.

 

Of course the colon is just part of the name and in fact you could use any prefix you want in your mod, and use more than one. For example:

 "sexout:myvar 1" = 1.0
 "sexout:myvar 2" = 2.0
 "sexout:myvar 3" = 5.0
 "mymod:temp myvar 1" = 2.2
 "mymod:temp myvar 2" = 3.2
 "mymod:temp myvar 3" = 2.3
 "mymod:myvar 1" = 2.2
 "mymod:myvar 2" = 3.2
 "mymod:myvar 3" = 2.3

 

Doing

 player.NX_ClrEVFl "mymod:" 1

would clear all six of your vars, but

 

 player.NX_ClrEVFl "mymod:temp" 1

 

Would only clear the three of them matching that string.

 

Thoughts? Better solution?

Posted

All those unknowns might be the reason http://cs.elderscrolls.com/index.php/SetFemaleBipedPath was never implemented for NVSE.

 

And... I am thinking that your crash on breakpoint hit sounds like some threads are not stopping when you hit the breakpoint, but since that is too obvious, perhaps it's not threads in the game itself, but threads in steam? If you first stall all the steam processes, does that get you anywhere (or does that also make the game crash or freeze? probably... bah...)

 

I will go back to being quiet now.

Posted

I'm a bit late to the party and code isn't exactly my forte so I apologize if this is way off... :blush:

 

What about a new player death handling function similar to what was done in COBL for Oblivion?

 

I've been toying around with various ways to stop the player from -total- death. SetEssential doesn't work (camera and movement problems) and resurrect doesn't work. The only way out I can see is setting a health threshold which of course can fail. (Imagine getting smacked by a behemoth at low health.) The other way is what Arwen did with tokens, markers, and reloading saves. (Arwen's way produces serious instability on my end though. Almost a crash every few minutes. Le sigh. :s)

 

Anyway, the idea was to have death not require a reload and have consequences. Looted equipment, damage, etc. (This could be factored into Sexout of course.) Without an NV version of COBL however it's a bit of an issue. (For me anyway! ;))

Posted

Interesting idea Nessa.. I don't think I have any way to do that right now though, other than the NVSE registration setup, there are zero callback hooks available to NVSE plugins right now, nothing to call me on player death or anything like that.

 

However I think you could implement the idea in a normal script?

 

You'd have to basically watch player health and then adjust it up every time they are hit so it always stays at 100%. Internally you would track their "real" health, and perhaps make a HUD mod to display it instead of the vanilla health. This way when your fake counter reached zero the character wouldn't die in the eyes of the game engine, but you could still fade to black, move them somewhere, or do whatever you need to do.

 

This wouldn't save them from insta-death situations like jumping off a cliff, but you could cover everything else by boosting their (real, but hidden) health by some absurd value so nothing normal could actually kill them in one hit.

 

To compensate for stimpacks, food, water etc, instead of modifying those scripts I'd set the characters max health to like 1 million, and set their actual health to 500k.

 

Whenever they applied a stimpack, ate, whatever, it would increase their real health (vanilla effect). If you saw their real health go from 500000 to 500100, you could adjust their "fake" health up by 100, and reset their real health back down to 500k.

 

Did that make sense?

 

Posted

All those unknowns might be the reason http://cs.elderscrolls.com/index.php/SetFemaleBipedPath was never implemented for NVSE.

 

And... I am thinking that your crash on breakpoint hit sounds like some threads are not stopping when you hit the breakpoint' date='

[/quote']

 

Breakpoints that dump you into a debugger automatically suspend all running threads in the process, that's just how it works.

 

If the DLL were running in its own thread, then the calling process would simply hang (but not crash) until the thread resumed.

 

It's not a threading issue. I don't know what it is, but it's probably related to how NVSE patches the game in memory and loads the plugin dlls. In any case, I'm managing fine (if slowly) by resorting to oldschool methods: Dump crap to a log file and inspect it afterwards.

Posted

Interesting idea Nessa.. I don't think I have any way to do that right now though' date=' other than the NVSE registration setup, there are zero callback hooks available to NVSE plugins right now, nothing to call me on player death or anything like that.

 

However I think you could implement the idea in a normal script?

 

You'd have to basically watch player health and then adjust it up every time they are hit so it always stays at 100%. Internally you would track their "real" health, and perhaps make a HUD mod to display it instead of the vanilla health. This way when your fake counter reached zero the character wouldn't die in the eyes of the game engine, but you could still fade to black, move them somewhere, or do whatever you need to do.

 

This wouldn't save them from insta-death situations like jumping off a cliff, but you could cover everything else by boosting their (real, but hidden) health by some absurd value so nothing normal could actually kill them in one hit.

 

To compensate for stimpacks, food, water etc, instead of modifying those scripts I'd set the characters max health to like 1 million, and set their actual health to 500k.

 

Whenever they applied a stimpack, ate, whatever, it would increase their real health (vanilla effect). If you saw their real health go from 500000 to 500100, you could adjust their "fake" health up by 100, and reset their real health back down to 500k.

 

Did that make sense?

 

[/quote']

 

That made a lot of -good- sense actually. There seem to be a bunch of HUD options so it might not be too hard to make the fake health be normal viewable health so to the player nothing seems to change. Certainly worth playing with as I really love the concept but don't like the associated stability issues.

 

Posted

I'm not sure how well it would work, but I was trying to avoid having having to modify all the food, water, stimpacks, etc.. only to still have it not be entirely reliable vs. strong enemies like deathclaws. Have to be careful that health doesn't get 'stuck' at the astronomical value if the mod is disabled.

Posted

There is the issue of hit points via the PipBoy too. Might be a way around it. Worth a try anyway! :D (Now if they'd only allowed us to resurrect the player without wonky complications, none of this would be necessary.)

Posted

Today, I tried opening up SexoutClothingEval.esp in geck, it was my active file and I was going to think about adding some missing elements into it.

 

When I did this, Geck's powerup told me that my Sexout.esm did not match the network copy and did I want to update my local copy. I thought, sure, let's see how this works, and said yes. Then it said the same thing about SexoutCommonResources.esm, and I said yes again. And then I started getting a flood of warnings I had never seen before about problems with form None...

 

Anyways, it looks like Sexout.esm and SexoutCommonResources.esm are now both zero length files. And, I am wondering if I have the wrong version of your nvse plugin, somehow?

Posted

That "update local copy" business is all on you; the GECK, NVSE, and NVSE Extender have nothing to do with it. Download them over again, make sure they are stored locally and not on some network drive, and don't have the files open in more than one editor at a time.

 

Edit: Also, this is not a troubleshooting or bug reporting post, it's a wishlist. Please take this to the tech support form, or to the NVSE download thread -- where I will have the same response as above. ;)

Posted

I don't know if this is already available but maybe something like ConScribe for OBSE would be handy for the devs. It can log all console output to a file and also has per mod logging.

 

As an aside, the amount and range of OBSE plugins is crazy :o

Posted

That "update local copy" business is all on you; the GECK' date=' NVSE, and NVSE Extender have nothing to do with it. Download them over again, make sure they are stored locally and not on some network drive, and don't have the files open in more than one editor at a time.

 

Edit: Also, this is not a troubleshooting or bug reporting post, it's a wishlist. Please take this to the tech support form, or to the NVSE download thread -- where I will have the same response as above. ;)

[/quote']

 

I just reactivated their packages in FOMM -- which you rather sternly talked me into using, if you remember... :)

 

So, anyways, next time I have something like this, I'll try to find a better thread.

 

And, just to keep this from being an entirely useless thread: perhaps we could get support for having formlists of quests? And, some way for iterating over those quests and setting quest stages on them? (This could turn into a simple method for implementing callbacks or events.) Or, if the lack of generality does not bother you: FormListWhichHoldsQuests.setStage 20

 

  • 2 months later...
Posted

If you are still open to suggestions, I think a function like:

 

(Bool) reference.IsQuestObject item:InventoryObject

 

as a compliment to the SetQuestObject function would by handy.

 

Or maybe I am just missing the obvious on how to determine if an item has this flag set.

Posted

Mostly what I was trying to accomplish was removing items from a player without removing hotkeyed or equipped items. However, the only way I could figure out how to do it was by setting the Quest flag on those items. However, when I then remove the quest flag, I don't want to affect the few items that actually might have had the quest flag set previously.

 

Probably the more efficient way would be to just add the equipment to a formlist and then use that form list as an exception list when I take the items from the player initially.

  • 1 month later...
Posted

You an already do that from the console. scof "filename.txt" will create "filename.txt" and everything that prints to the console from then on gets written to the file as well. Can't call it from within a script, but you don't really need to either I don't think?

  • 2 weeks later...
Posted

Is possible to add a function like this(its on OBSE ) ?

OnHealthDamage damage:float attacker:ref Invoked on the actor taking damage (i.e. GetSelf will return the damaged actor) whenever damage is taken. "Attacker" may be zero e.g. when taking damage from falling. The handler is invoked just before the damage is applied, so it can be nullified by commands like ModActorValue. Use the object filter to specify the damaged actor to which your event handler should be attached, if any.

Archived

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

  • Recently Browsing   0 members

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