Git Product home page Git Product logo

Comments (10)

llde avatar llde commented on August 11, 2024

Note that the reported issue does not occur with Japanese patches prior to v016.beta3 (like v0.15c) and xOBSE 22.2 or later. It also does not occur with v016.beta3 and xOBSE 22.1 or earlier.

At this point I have to ask, what do this new beta provide that the older version didn't?
The fact they choose to not provide the source code is so goddammit horrible.
It's unfortunate that the original license didn't state that plugins must publish the source.

I will still try to fix, however if they replace the input function I'm not sure it will be possible unless extreme hackery.

from xobse.

kuroko137 avatar kuroko137 commented on August 11, 2024

Sorry, I should have written it as you suggested. The changelog (in ReadMe.txt) for version 0.16 is as follows:

  • Added "UI" and "Blur" settings to the settings dialog.
  • Modified to work as an OBSE plugin.
  • Integrated obja.dll for the UI MOD and made it selectable from the settings dialog.
  • Changed the "Density" setting value in the settings dialog to allow negative numbers to be selected.
  • Fixed a bug where some characters may not be displayed correctly depending on the font.
  • Fixed a bug where fonts with internal reddings may be displayed smaller.
  • Fixed a bug where the subtitle background display sometimes does not disappear when DarNified UI is installed.
  • Fixed a bug where, when DarNified UI is installed and the fonts attached to DarNified UI are not installed, character Y-coordinates were shifted.

(The changelog for subsequent beta versions does not exist.)

As you can see, there is no mention of any input-related changes, but the fact that it says "Modified to work as an OBSE plugin." suggests that this may be a major rewrite compared to v0.15c and earlier versions, which were distributed as patch files directly replacing Oblivion.exe itself.
Unfortunately, I could not find any other information that might be useful in searching past forums.

"I will still try to fix, however if they replace the input function I'm not sure it will be possible unless extreme hackery."

Thank you for letting me know. It was helpful to know that it may be difficult to fix.
If it's too much work, you can leave it as it is, since fortunately we still have the option of using xOBSE22.1.
I appreciate your quick reply.

from xobse.

llde avatar llde commented on August 11, 2024

This is a mess. First of all the address of the fix isn't 00003B91 but 10004791 (1000000 being the base). it's not using baseful addresses for it's hooks, the hooks themselves are a mess.

from xobse.

llde avatar llde commented on August 11, 2024

The reason of the crash is bewcouse there is a null pointer access, after
.text:1000479D lea ecx, [eax+20h]
.text:100047A0 mov edx, [ecx]
caused by accessing an member of an invalid non -null object.

The call to this object is masked by an indirect call (vtable access)

Also it seems to be partially incompatble with MenuQue, crashing intermittently inside obja (calls started from MenuQue modules)

from xobse.

llde avatar llde commented on August 11, 2024

Obja hook inside the function just before xOBSE hook:
.text:00404835 jmp sub_3DA1040 //Obja
.text:0040483A ; ---------------------------------------------------------------------------
.text:0040483A jmp near ptr unk_1000CBB0 //OBSE

Now the question is what do OBJA do with the input hook? Do you have any idea on what feature it's used for?
@kuroko137

I imagine that I can either stub the hooks, or save and replay the instruction later. I however don't know wethever the replacer is doing something important

from xobse.

llde avatar llde commented on August 11, 2024

Ok the function in obja, basically reimplement the input handling for the mouse, in addition it do some processing

If the key related to DX scancode 0x91 (DIK_AT) then set 0x21 (DIK_GRAVE), if 0x7D (DIK_YEN) put a variable to 0 and call a function, if 0x90 (DIK_CIRCUMFLEX) call another function and store it's result.

maybe it's realted to these you wrote in the readme for the fix

Press the "\" key in the game to open the input screen for Japanese strings.
Press the "^" key in the game to open the settings screen, but it seems to crash the game if the OS locale is not Japanese.

Also for the way this hook is made it doesn't work if there is no mouse detected

from xobse.

kuroko137 avatar kuroko137 commented on August 11, 2024

Thank you very much for going over all the details. I'm really glad!

This is a mess. First of all the address of the fix isn't 00003B91 but 10004791 (1000000 being the base). it's not using baseful addresses for it's hooks, the hooks themselves are a mess.

I'm not entirely sure about my understanding, but I believe that 00003B91 refers to the address that needs to be edited when opening obja_12416.dll in the binary editor to fix the bug, and not the address for the obja_12416.dll hooks. I apologize if I'm mistaken.

Also it seems to be partially incompatble with MenuQue, crashing intermittently inside obja (calls started from MenuQue modules)

In my case, MenuQue itself does not cause crashes, but when I add mods that use their own fonts (such as HUD Status Bars), it crashes. I have been able to work around it by modifying the mod to not use those fonts.

Ok the function in obja, basically reimplement the input handling for the mouse, in addition it do some processing

If the key related to DX scancode 0x91 (DIK_AT) then set 0x21 (DIK_GRAVE), if 0x7D (DIK_YEN) put a variable to 0 and call a function, if 0x90 (DIK_CIRCUMFLEX) call another function and store it's result.

The mouse input process may be used on a Japanese input screen that can be opened with the key of DIK_CIRCUMFLEX. On this screen, you can click and drag to select characters with the mouse cursor.
jp_input

One thing I forgot to mention is that obja_12416.dll uses the "@/`" key, which is a unique key on the Japanese keyboard ("[/{" key on the English keyboard), to open the console. In TES4JaPatch, 0x91 (DIK_AT, JP = "@/`" : EN = "[/{") is the console open key, 0x90 (DIK_CIRCUMFLEX, JP = "^/~" : EN = "=/+") is the configuration screen open key, and 0x7D (DIK_YEN, JP = "/|" : EN = None) is used as the Japanese input screen open key.

The set to 0x21 (DIK_GRAVE, JP = E/J : EN = "`/~") is probably a measure to open the console with a Japanese keyboard. On Japanese keyboards, the "`/~" key is replaced by a special key called the E/J key (a language input key, also called halfwidth/fullwidth or 半角/全角 key), so the "`/~" key is not available. Without TES4JaPatch on a Japanese keyboard, the console cannot be opened in-game.

I think that the only keys used in TES4JaPatch are the three that you mentioned. If necessary, it would not be a major inconvenience to disable these overrides that TES4JaPatch016_beta3 does.
The configuration screen is available from outside the game by running obja_config.exe, and there is a workaround to temporarily uninstall xOBSE it is not a frequently used feature. Japanese input is provided for naming the player character, magic items, and potions in Japanese, but it is not a major inconvenience if it is not available. The problem of not being able to open the console can be solved by installing the Change Console Key mod.

from xobse.

llde avatar llde commented on August 11, 2024

@kuroko137 Can you try with this artifact: https://github.com/llde/xOBSE/actions/runs/4237735184
(Wait for the build if it still isn't ready)

Test for the functionality added by OBJA and check if it works

from xobse.

kuroko137 avatar kuroko137 commented on August 11, 2024

I just tried your fix and the problem is solved! All inputs are now detected not only in the test ESP I provided, but in other mods.
And of course all OBJA features continue to work. You are my savior!

Now, I want others to try this, so I have asked users to try it on the Japanese forum where the fix method (00003B91: 75 to EB) was found. If they find any problems, I will report them here.
Thank you for the great work! @llde

There aren't as many people playing Oblivion in Japan as there used to be, so the number of people who will benefit from this fix may be small, but at least for me, your fix has been a lifesaver.

from xobse.

llde avatar llde commented on August 11, 2024

Glad it's working

from xobse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.