Skip to content

linux compatibility#26

Draft
astrale-sharp wants to merge 5 commits into
Grimrukh:mainfrom
astrale-sharp:master
Draft

linux compatibility#26
astrale-sharp wants to merge 5 commits into
Grimrukh:mainfrom
astrale-sharp:master

Conversation

@astrale-sharp

@astrale-sharp astrale-sharp commented Mar 1, 2024

Copy link
Copy Markdown

Howdy!

This should be enough to make it posix compatible! this should also work for your blender port if you used soulstruct directly in it.

kernel32 = c.WinDLL("kernel32", use_last_error=True)

The real problem is this line

  • WinDLL doesn't exist on linux but kernel32 is essential to soulstruct
  • wenv (using wine) is not capable of installing tkinter for some reason

@astrale-sharp astrale-sharp marked this pull request as draft March 1, 2024 18:01
@astrale-sharp

Copy link
Copy Markdown
Author

I'm getting much farther by replacing ctypes by zugbruecke.ctypes

However it crashes because it can't find
image
which is indeed not on my computer? 🤔 i also just checked my files and unpacked for modding dark souls so that shouldn't be the problem

@astrale-sharp

Copy link
Copy Markdown
Author

Using the last version of UnpackDarkSouls for modding seems to have fixed that, I'm running a few test before updating this PR but I'm optimistic

@astrale-sharp

Copy link
Copy Markdown
Author

wine9.0 fails on the latest UnpackDarkSoulsForModding.exe version for me: here's what I did

clone https://github.com/HotPocketRemix/UnpackDarkSoulsForModding
put the .py files in my DATA directory (PTDE)
install pip2
pip2 install colorama numpy
run python -m unpack_dark_souls_for_modding

@astrale-sharp

Copy link
Copy Markdown
Author

Now after a hopefully correct unpacking, starting the gui I get this error
image

With a full log

ERROR :: soulstruct-gui/soulstruct_gui/base/window.py ::  271 :: Fatal internal error encountered. Aborting startup.
Traceback (most recent call last):
  File "soulstruct-gui/soulstruct_gui/base/window.py", line 258, in __init__
    self.project = self.PROJECT_CLASS(project_path, with_window=self, game_root=game_root)
  File "soulstruct-gui/soulstruct_gui/base/core.py", line 131, in __init__
    success = self.create_new_project(with_window=with_window, game_root=game_root)
  File "soulstruct-gui/soulstruct_gui/base/core.py", line 943, in create_new_project
    save_func()
  File "soulstruct-gui/soulstruct_gui/base/core.py", line 498, in save_Params
    params.write_json_directory(
  File "soulstruct-gui/soulstruct/base/params/gameparambnd.py", line 248, in write_json_directory
    json_stem = self.PARAM_NICKNAMES[param_stem]
KeyError: 'N:\\FRPG\\data\\INTERROOT_win32\\param\\GameParam\\EquipParamWeapon'

so.. time to investigate!

@astrale-sharp

Copy link
Copy Markdown
Author

printing self.PARAM_NICKNAMES in this context yield a dictionary like structure containing something that resembles our problematic key

{
   # ...
    'EquipParamWeapon': 'Weapons',
   # ...
}

My first guess would be that os splitting of paths is confusing python because it's receiving windows path separators but the splitting function used on linux system doesn't strip them correctly

@astrale-sharp

Copy link
Copy Markdown
Author

I hacked above using .split("\")[-1]

Now it crashes on
soulstruct.utilities.binary.BinaryFieldValueError: Field '_signature' read value b'EVD\x00' is not an asserted value: (b'EVD',)

starting to feel in over my head

@astrale-sharp

Copy link
Copy Markdown
Author

Before that here are the warnings I'm getting


WARNING :: base/events/emevd/core.py ::  365 :: m13_02_00_00: Missing 'Object | Character | Region' entity ID: 1322600
*
WARNING :: base/game_types/game_enums_manager.py ::  249 :: Ignoring game enum type `Boxes` in module '/home/astrale/Bureau/moddingDS/enums/m11_00_00_00_enums.py`, as its type does not match any of the `VALID_GAME_TYPES` specified for this `GameEnumsManager`.
*
WARNING :: base/events/emevd/core.py ::  365 :: m11_00_00_00: Missing 'Any' entity ID: 1101703
*
WARNING :: base/events/emevd/core.py ::  365 :: m11_00_00_00: Missing 'Object | Character | Region' entity ID: 1102080
*
  ERROR :: soulstruct_gui/__main__.py ::  260 :: Error occurred in soulstruct.__main__: 'LightBank'

the * means they are repeated a lot with other values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant