ChianasGeek Posted April 3, 2014 Posted April 3, 2014 Just saw this and wondered if anyone else has. It looks useful! Lutana NVSE Plugin
prideslayer Posted April 3, 2014 Posted April 3, 2014 The array/formlist thing looks pretty neat. Loogie mentioned this mod to me and the fileexists function as well, but I haven't tried any of it yet.
Halstrom Posted April 3, 2014 Posted April 3, 2014 "Does it clash with the NX Extender?" is probably the important question many of us are probably thinking or possibly not thinking
Guest luthienanarion Posted April 3, 2014 Posted April 3, 2014 The array/formlist thing looks pretty neat. Loogie mentioned this mod to me and the fileexists function as well, but I haven't tried any of it yet. ListToArray was at Gribble's request. He much prefers working with arrays over form lists, and converting one to an array is much faster in C++ than using the game's scripting engine. I was scratching my head over how to return an array until I examined your NX source. "Does it clash with the NX Extender?" is probably the important question many of us are probably thinking or possibly not thinking No, it won't conflict with any of the existing published NVSE plugins.
prideslayer Posted April 3, 2014 Posted April 3, 2014 You can thank jaam for the array stuff in NX, he did that up for me while I was away. He also put all that stuff in NVSE (from OBSE) initially.
Guest Posted April 4, 2014 Posted April 4, 2014 Looking this plugin, and the whole NVSE and its functions... oh and I can't forget about the first person camera, of course! that's one of these! well, this all really makes me wonder. If people can introduce new unbelievable things, new functions, why can't people change something else about the engine itself? I mean, is there a big difference? To explain better... The game didn't give me the possibility to GetKeyPressed. Then someone did it, and to my eyes this seems a miracle. NVSE seems really a miracle to me. So for example wouldn't be possible for these people to make other miracles like that, change something else in the engine... you know all those little annoying things... like... just to make a RANDOM example... ... adding custom paths for animgroups... ?
prideslayer Posted April 4, 2014 Posted April 4, 2014 Probably possible. Not trivial by any means. NVSE development is reverse engineering the game EXE to find the function entry points, decode the data structures, and so on. Every new feature that gets added to NVSE is basically a 'crack' of the EXE implemented nearly from scratch. NX (and other plugin) functionality is far simpler, but can only use engine functions and data structures already exposed by NVSE. NVSE and SKSE progress so rapidly because the engine is basically the same since oblivion, so most of the data structures and code from OBSE work with little modification -- it's "just" the entry points and other locations in the EXE that need to be found.
Guest luthienanarion Posted April 6, 2014 Posted April 6, 2014 Jazz tasked me with creating a function that returns an actor's current combat style: essentially a port of OBSE's GetCombatStyle. bool Cmd_CCCGetCombatStyle_Execute(COMMAND_ARGS) { *result = 0; UInt32 *refResult = (UInt32*)result; if(!thisObj) return true; if(thisObj->baseForm->typeID == kFormType_Creature) { TESCreature* creature = DYNAMIC_CAST(thisObj->baseForm, TESForm, TESCreature); if(creature) *refResult = creature->combatStyle->refID; } else if(thisObj->baseForm->typeID == kFormType_NPC) { TESNPC* npc = DYNAMIC_CAST(thisObj->baseForm, TESForm, TESNPC); if(npc) *refResult = npc->unk1D4->refID; } return true; } This works for finding the combat style set for an actor's base form, but I can't seem to get it working for an actor's reference, which can have its combat style changed via SetCombatStyle. I've tried using "TESCreature* creature = DYNAMIC_CAST(thisObj, TESObjectREFR, TESCreature)" but that seems to fail the "if(creature)" condition afterward. The same goes for NPCs. Any ideas?
jaam Posted April 6, 2014 Posted April 6, 2014 TESCreature is a base form (like TESNPC). The reference is Creature (like Character).
Guest luthienanarion Posted April 6, 2014 Posted April 6, 2014 The Creature class doesn't seem to exist. Unfortunately, the Character, Actor, MobileObject, and TESObjectREFR classes either don't contain the info I'm looking for or it's not decoded. I only found unk1D4 in the TESNPC class because it's declared as a TECCombatStyle. Ah, well. I'll put that function on hold.
jaam Posted April 8, 2014 Posted April 8, 2014 So it seems Creature never been required yet CombatStyle for actors are stored as ExtraData type 0x69 ExtraCombatStyle. It should be implemented as : class ExtraCombatStyle : public BSExtraData { public: ExtraCombatStyle(); virtual ~ExtraCombatStyle(); TESCombatStyle combatStyle; // 00C };
Guest luthienanarion Posted April 8, 2014 Posted April 8, 2014 I see. Thanks, jaam. Edit: You missed a dereference operator: class ExtraCombatStyle : public BSExtraData { public: ExtraCombatStyle(); virtual ~ExtraCombatStyle(); TESCombatStyle* combatStyle; // 00C }; I have the function working the way I want it to now. Thanks again.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.