PSOBB Addon Plugin (Lua UI addons)

This question has probably been answered before, so if it has - sorry. But what is the trigger that runs the update on the lua plugins? I am writing a tool to assist with quest development, and I was thinking tracking the PC to determine what functions were run would be helpful. I guess my question is whether or not this will update fast enough to gather that information.
The plugin that hosts the addons hooks to the IDirect3DDevice8::present() function to update the Lua addons. Here's the line of code with the function call that updates the Lua addons.
https://github.com/HybridEidolon/psobbaddonplugin/blob/master/bbmod/src/imgui_d3d8_dev.cpp#L93
 
I've had these addons installed for quite a while, but suddenly I can't seem to get the custom themes to work! I think I remember their used to be a "use custom theme" checkbox but that was a while ago. Am I missing something obvious?
 
Do you have issues adjusting the font size (in the addons that offer the option)?
 
no, i can make it bigger. it just looks terrible.

i forgot to mention in the original post, i'm making my own addon. adjusting the font size is trivial, but i want it to look nicer at larger sizes.
pixelated-addon-text.jpg

i guess it's not that bad, but i'd like to fix it if i can.
 
Last edited:
I guess it would be up to eidolon to make the DLL load a custom font (it already can, but hardcoded only?)
Originally the idea was to get a JP monospace font but the ones available are too big to bundle, not that is an issue? but not desirable.
 
I released an "updated" dll forked from Eidolon's repo that has hacked together support for CJK range characters with a free font (see here). It was really just a quick hack so that the addons could display CJK characters instead of "?".

I meant to implement a number of other things for improvements before submitting a proper pull request, but haven't had the time/desire to continue. Main improvement I wanted to get working was replacing the default font as well, but it seems like imgui refuses to work when I try to replace the default font and have each addon push/pop the font. Not sure what's wrong and I spent too much time debugging it already. I know this version of imgui is outdated and there were a number of font fixes I found in the imgui issues since this release.

It would be really nice to get that working because then the font wouldn't look so strange when scaled or retextured for different resolutions. For example, play in windowed fullscreen 1280x720 while your monitor is in 1920x1080 and the default font bitmaps are atrocious.
 
For example, play in windowed fullscreen 1280x720 while your monitor is in 1920x1080 and the default font bitmaps are atrocious.
Was such thing fixed, that has always been an issue when you resize the window (which is what windowed fullscreen, basically maximized borderless window, does)

Eidolon merged some changes I was doing as well as the theme editor stuff but said he was not gonna release a new version just yet, not sure if this would be big enough (seems to me that it is) to require a version upgrade.
Should probably let him know.

Also, you can use the constant MAX_PATH rather than defining your own.
 
Added a Timer addon to my addons repo.
This addon provides a countdown function as well as an stopwatch.
Both can be paused and reset, the stopwatch also has a "split".

Due to limitation with Lua, the addon depends on GetTickCount, which is not available to Lua, so a new DLL had to be made
You can find it here https://github.com/Solybum/psobbaddonplugin/releases/latest

@Ender You should probably look into PR'ing that JP stuff.
Translating addons probably should be left to each author (I mean, implementing a file with the different language strings)
But I'd assume language option should be set globally so addons can know which language the game is in.
 
Was such thing fixed, that has always been an issue when you resize the window (which is what windowed fullscreen, basically maximized borderless window, does)

Eidolon merged some changes I was doing as well as the theme editor stuff but said he was not gonna release a new version just yet, not sure if this would be big enough (seems to me that it is) to require a version upgrade.
Should probably let him know.

Also, you can use the constant MAX_PATH rather than defining your own.
Added a Timer addon to my addons repo.
This addon provides a countdown function as well as an stopwatch.
Both can be paused and reset, the stopwatch also has a "split".

Due to limitation with Lua, the addon depends on GetTickCount, which is not available to Lua, so a new DLL had to be made
You can find it here https://github.com/Solybum/psobbaddonplugin/releases/latest

@Ender You should probably look into PR'ing that JP stuff.
Translating addons probably should be left to each author (I mean, implementing a file with the different language strings)
But I'd assume language option should be set globally so addons can know which language the game is in.
I submitted the PR without making any additional changes. I haven't bothered to look into the extra enhancements for some time. The main things I wanted to get working before submitting this were
  • Option to replace the default font in ASCII range (never got this working).
  • Globalized language setting (set it through an addon provided with the base plugin and export it through the "pso" table).
  • Plugin looking for a localization dictionary in each addon's directory to translate string literals. If an addon called Imgui.Text() and provided the literal "Save to File", the plugin would replace that using the literal specified in the dictionary in the addon's directory. If the dictionary doesn't exist or the literal isn't there, no replacement. Although this might be best left to the addon developer to do on their own.
  • Support for chaining dinput8.dll. Instead of calling the one in Sysdir directly, call some other DLL specified in cfg file and call Initialize() on it, deferring loading of System dinput8.dll to that other dll. This way people could use addons with external dinput wrappers (making triggers usable on X360 controller for PSOBB, for example).
Maybe I'll revisit when I feel like doing programming outside of work again ¯\_(ツ)_/¯
 
Last edited:
Couldn't you just not load whatever font imgui uses by default?
I think I toyed with that sometime but was a while ago...

I do agree a language setting should be global, I guess I could look into this as well...

For translation, I'd prefer if this were left up to each addon, I will look into this for my own addons (just as a test, I guess).

The dinput chaining is obviously out of the scope for the font/translation stuff, and Eidolon already had an issue about that.
I'll see if I can get him to merge your PR so I can use it as well (without having to do much stuff in git).
 
It was months ago when I tried and I don't really remember what imgui was complaining about. It was probably user error but I thought I was following the documentation correctly for loading the fonts and pushing/popping.

Do you remember what the issue was with the DLL chaining? It worked fine for me when I tested but I didn't really featurize it or test it enough.
 
I installed the the program the add menu appears but the mouse pad point where I can control the menu of pso disappeared from the screen as well the add on does not read nothing its just a menu any tips so I can configure all this please
Thank you
 
I don't think there was any issue with chaining DLLs... I meant issue as in github issues.

@vri no idea what issue you are experiencing, for my addons, all windows are enabled by default I think, as long as you installed from my github repo.
Check the log to see if there is any issues with the addons.

No idea what you meant about the mouse pad point
 
hi, i downloaded and put the files into my directory and the item reader doesnt show up but i have the addon menu though.
 
I got the custom fonts working. Dug through the imgui source code for loading and using fonts and found my mistake (was merging the font with the default font, among some other smaller mistakes). Examples below using two different M+ fonts (both at size 20, default font was size 13).

imgui_customfont.png

So now we could replace all of the font with just one font used for both EN/JP. I should probably clear up the properties in that config file (change "jpfontname" and "jpfontsize" to "fontname" and "fontsize", respectively).
 
Back
Top