unconventional obse plugin

Post » Sat Feb 19, 2011 8:07 am

i am knowledgeable of adding script/console functions to a plugin, but i am interested in modifying the way oblivion works without adding oblivion functions, similiar to weocp and fastexit2. at the moment, i specifically want to hook menu mode code to allow key actions, similiar to how fallout 3 allows default 'a' to loot all container contents. i'm pretty sure i'll be able to code the actions i want the keys to execute, but i'm not sure how to go about checking the keys. thanks!
User avatar
Céline Rémy
 
Posts: 3443
Joined: Sat Apr 07, 2007 12:45 am

Post » Sat Feb 19, 2011 3:42 am

i am knowledgeable of adding script/console functions to a plugin, but i am interested in modifying the way oblivion works without adding oblivion functions, similiar to weocp and fastexit2. at the moment, i specifically want to hook menu mode code to allow key actions, similiar to how fallout 3 allows default 'a' to loot all container contents. i'm pretty sure i'll be able to code the actions i want the keys to execute, but i'm not sure how to go about checking the keys. thanks!


I don't know the scope of your intentions, but if all you want to do is listen for keypresses during menu mode, you don't need an OBSE plugin. Just a regular plugin with some OBSE functions.

http://cs.elderscrolls.com/constwiki/index.php/MenuMode

http://cs.elderscrolls.com/constwiki/index.php/IsKeyPressed3
User avatar
Sammygirl500
 
Posts: 3511
Joined: Wed Jun 14, 2006 4:46 pm

Post » Sat Feb 19, 2011 6:26 am

I don't know the scope of your intentions, but if all you want to do is listen for keypresses during menu mode, you don't need an OBSE plugin. Just a regular plugin with some OBSE functions.

http://cs.elderscrolls.com/constwiki/index.php/MenuMode

http://cs.elderscrolls.com/constwiki/index.php/IsKeyPressed3

i've already got a script that performs some basic function using iskeypressed2, but some of the functions of the mod i intend to make will definitely be more optimized using c++ instead of oblivion script
User avatar
Sanctum
 
Posts: 3524
Joined: Sun Aug 20, 2006 8:29 am

Post » Sat Feb 19, 2011 5:21 am

Welp, I will leave you to the grown-up coders, then. :lmao:
User avatar
Kate Murrell
 
Posts: 3537
Joined: Mon Oct 16, 2006 4:02 am

Post » Fri Feb 18, 2011 9:51 pm

i've already got a script that performs some basic function using iskeypressed2, but some of the functions of the mod i intend to make will definitely be more optimized using c++ instead of oblivion script
What sort of functions do you intend to implement ?

You can detect key strokes without hooking into the game code. Simply create a worker thread at plugin load and have it query GetAsyncKeyState for your required key. When you get a hit, use the InterfaceManager singleton to check if the game is in menumode.
User avatar
evelina c
 
Posts: 3377
Joined: Tue Dec 19, 2006 4:28 pm

Post » Sat Feb 19, 2011 6:20 am

What sort of functions do you intend to implement ?

You can detect key strokes without hooking into the game code. Simply create a worker thread at plugin load and have it query GetAsyncKeyState for your required key. When you get a hit, use the InterfaceManager singleton to check if the game is in menumode.

i was intending to have my current function execute during menumode.. maybe it would be better on the cpu processing time if i just made an oblivion script to execute dll functions.. thanks for the help!
User avatar
Jade
 
Posts: 3520
Joined: Mon Jul 10, 2006 6:42 am

Post » Fri Feb 18, 2011 6:52 pm

i was intending to have my current function execute during menumode.. maybe it would be better on the cpu processing time if i just made an oblivion script to execute dll functions.. thanks for the help!

I can fully relate to you wanting to achieve this, but if all you want is to detect when keys are pressed and then apply various actions while in Menumode, the standard OBSE functions (especially OnKeyDown) is more than good enough - especially since CPU processing time only is an issue in gamemode and not at all in menumode.
User avatar
Trish
 
Posts: 3332
Joined: Fri Feb 23, 2007 9:00 am

Post » Sat Feb 19, 2011 2:30 am

well, i am still worried that more of my desired features of this modification will eventually create serious performance issues during gamemode, that will not be rectified unless a dll is used. i've already implemented my first function, the dll function is called during menumode in a script.
User avatar
Natalie Harvey
 
Posts: 3433
Joined: Fri Aug 18, 2006 12:15 pm

Post » Sat Feb 19, 2011 9:59 am

okay, at the moment i am trying to figure out how to differentiate between books and scrolls.. they are both menu mode 1026, but one uses book_background, while the other uses book_background_scroll.. right now i'm just calling a check, and accessing both backgrounds if 1026 is active, but i know there must be a better way. anyone?
User avatar
suniti
 
Posts: 3176
Joined: Mon Sep 25, 2006 4:22 pm

Post » Sat Feb 19, 2011 6:22 am

OBSE Docs or CS Wiki - http://cs.elderscrolls.com/constwiki/index.php/GetBookIsScroll
User avatar
Jessica Colville
 
Posts: 3349
Joined: Wed Oct 18, 2006 6:53 pm


Return to IV - Oblivion