Coder Social home page Coder Social logo

sadx-mod-loader's Introduction

Sonic Adventure DX PC Mod Loader

Version 3.7

If you need any help, check the SADX Modding wiki.

System Requirements

To use SADX Mod Loader, you must have:

  • Sonic Adventure DX PC, 2004 version (US release)
  • Windows 7 or later
  • .NET Desktop Runtime 7.0

License

DISCLAIMER: Any and all content presented in this repository is presented for informational and educational purposes only. Commercial usage is expressly prohibited. X-Hax claims no ownership of any code in these repositories. You assume any and all responsibility for using this content responsibly. X-Hax claims no responsibility or warranty.

Trademarks

SEGA, Sonic, Sonic the Hedgehog, and Sonic Adventure DX are either trademarks or registered trademarks of SEGA of America, Inc.

sadx-mod-loader's People

Contributors

actualmandm avatar bor-real avatar dankrank avatar donutstopgaming avatar end-user-person avatar fragag avatar gerbilsoft avatar itseasyactually avatar jesus-pk avatar kellsnc avatar mainmemory avatar michael-fadely avatar pikeyar avatar siryodajedi avatar skewbmaster avatar sora-yx avatar speepshighway avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sadx-mod-loader's Issues

Manually configuring a mod?

This is more of a question than an issue. The menu works almost perfectly running under Wine with Mono except that the config menu for mods only displays a blank screen. Is it possible to manually write a config.ini?

Global config option to start the game in Japanese

At the moment the game defaults to English until a save with Japanese language settings is loaded. Adding an option to specify the game's default language setting would be cool for mods because:

  1. It will allow to get rid of the "Sega/Sonic Team voice language" setting in SADXFE and Dreamcast DLCs. The game doesn't know which language to play the voices in so we had to add this option, which doesn't respect the game's language setting. Having it consistent with the global setting would be nice.
  2. It will allow to use several things that previously were unused, such as the Japanese "Press Enter" prompt on the title screen. I would also use it in the DC mod to load the Japanese title screen on startup, which at the moment shows up only when the file with Japanese text settings is loaded.

Menu display issues

The game has a few problems displaying the menus properly when the Mod Loader is enabled. Immediately after starting the game the following issues are visible:

  1. File select screen: the bottom of the last rectange (with emblem count) is cut off
    image
  2. Sound test: the selected song's name doesn't display
    image
  3. Trial emblem results screen: sometimes a small background square is missing
    image

The above issues go away if you go to the character select screen and return to the menus, but doing that also changes the alpha blending mode on the main menu's shadow, giving it rough edges:
image

I assume it has something to do with njTextureShadingMode and/or the ZBuffer enhancements, it might be feasible to force njTextureShadingMode(1) on the main menu's shadow but keep it at 0 for the rest of the menus. Ideally njTextureShadingMode(1) for all shadows and njTextureShadingMode(0) (or whatever the default is) for everything else.

One-click install support for GitHub and self-hosted mods

The one-click install functionality is a great concept, and it could be expanded further for GitHub and self-hosted mods. That would allow to have clickable lists of mods (hosted anywhere) on a web page, which could function as a substitute for a mod database.

The name of the author/mod could be embedded into the URL itself.

Cheat code to disable “Auto-hints”

In Sonic Adventure DX, when the player restarts the level, the hint will automatically shows up. Also, there are 2 bosses have the “auto-hints” during the battle, Egg Viper and Chaos 6 (Big). The first one is when you defeat it and Eggman is about to do his final attack, and the second one is when the battle starts. It’s too annoying and intrusive for some players. When I played it, I thought it’s too unnecessary for me. I know the sequel called Sonic Adventure 2’s Omochao hints are annoying, but SA1/DX’s “auto-hints” are annoying too!

Model imports crashes randomly

It appears on the latest version of the mod loader, some models import work, and some crash and I have not the slightest clue about this.

Importing something like a cube or a triangle face work, but importing Sonic Generations's Super Sonic head crash. Importing SA2 Super Sonic head on the other hand seem to work, but importing a piece of the Generation Super head containing less polys than the SA2 head still crash, so it's not related to the high poly count.

Sky deck (sonic) cannon tracking glitch

The SADX speedrunning community has noticed a glitch for a while that only happens on mod loader versions past 171 (circa 2018). The cannon in sonic's sky deck will not immediately lock on to his position, and as a result the rocket that's supposed to explode it can miss. This is probably a nuisance for speedrunners more than casual players, but I'd like to at least know if this is a wontfix or if it has a solution besides "don't update the manager".

TestSpawn: Position support

At the moment it looks like the -p argument doesn't work with the Mod Loader's implementation of Test Spawn. With the standalone version of the mod it works, but only outside the Adventure Fields.

Unified Mod Config Editor

This would require mods to store their configuration data in a common location (config.ini) and provide some sort of schema to indicate the available fields, default values, and acceptable value ranges. The editor itself would likely take the form of a button or context menu item that opens a dialog box with a PropertyGrid.

Unhandled Exception Error in Resolutions Dropdown

In the event where a user's native resolution is low enough, switching the resolution drop down menu to "1/2 native" the mod manager will throw an exception error due to the halved value being lower than the minimum value for the field.

(a common example is (1366x768 or 1600x900, where 768 -> 393 and 900 -> 450, both lower than the minimum of 480)

You could simply handle the exception by setting the minimum value for the field, but that would lead to an obtuse aspect ratio and resolution being generated.

Instead, I propose just removing the minimum or lower it to a point where this can't happen anymore, since almost everything can now be scaled down below 480p anyway. If there absolutely must be a minimum, have it be 256 x 144 (144p) or something.

Drag&Drop Load Order sorting

Sorting mods via buttons takes a lot of time, especially if there are lots of mods enabled. It would be a nice feature to move a mod by just dragging and dropping it in the necessary place, similarly to how it's done in other games Mod Loaders (e.g. Wrye Bash).

Use primitive types instead of enums in variable and function definitions

It just makes things more difficult for everyone to use. PkR was trying to use the '|=' operator on the LastRenderFlags variable, but if you try that, the compiler tells you "this operation on an enumerated type requires an applicable user-defined operator function". Changing the variable to int allows it to work.
The LoadObject function is also a pain to use if you want no flags or multiple flags, you have to cast the value to the LoadObj type for it to work.

Mod Manager options concept

Here's a concept I made for SADX Mod Manager's Graphics tab that gets rid of the separate Config button:
image
A couple of notes/suggestions:

  1. Framerate settings could be more specific, i.e. 60 FPS instead of "High". There's a tooltip that helps, but I think it would be better if it said 60 FPS straight away.
  2. The framerate/fog/clip level section is called "Graphics" here, which is the same as the name of the tab, I think the tab could just be renamed to "Video".
  3. The spacing between sections isn't consistent in the above mockup, but it can still be used as a reference for general item layout.

GameBanana Mod Updates

It would be nice if mods could be updated directly from GameBanana, like mods hosted on GitHub can.

Mod Manager: Check for MSVCRT versions.

A common issue that causes SADX to crash when Mod Loader is installed is missing versions of the MSVC runtime. Since the SADX Mod Loader DLL is linked to the DLL runtime, this can't be detected at runtime, unless you wanted to make a stub DLL that was statically linked.

A better option would be to add MSVCRT scanning in the C# frontend:

  • Set the C# frontend to x86 only. (It gains no advantage as amd64.)
  • Check the System32 directory (Environment.SystemDirectory) for the following files:
    • 2010: msvcr100.dll
    • 2012: msvcr110.dll
    • 2013: msvcr120.dll
    • 2015/2017: vcruntime140.dll

Note that 2015/2017 use the same runtime.

If any are missing, provide download links:

Auto-mipmapping doesn't exclude 2D/UI textures

Due to where the code is injected, there's no easy way (as far as I can tell) to tell whether a texture is used in 2D or 3D space. The only way I can think of to do this "simply" would require going way higher in the chain of function calls, and that would introduce a lot of complexity.

Aside from the obvious efficiency problem, this lack of exclusion causes issues with some UI text. A good example is in the Mission Clear Status menu. The text describing the selected mission will begin leaving artifacts of the last selected mission text, eventually making it unreadable as you change your selection.

(request) Update Retry feature

Sometime when I use the Mod Loader, I encounter an update error and I need to retry this update, but something is missing. It’s the retry feature. Many software can retry the update when the error has encountered, but why SADX Mod Loader has missing this? I strongly recommend to add this feature as a part of more user-friendly experience.

DLL Error: The Specified Module Cannot Be Found

I recently released a mod of mine here:
https://github.com/supercoolsonic/SADXDC-SET-Layout-Fixes/issues/7
However, multiple people are reporting that the title of this issue is what greets them when they try to run it. It was compiled in Visual Studio 2013. Dude recompiled it in Visual Studio 2015, and some of the level geometry was invisible. I'm not sure what's causing this. The DLL file is in the mod folder, and the name of the DLL in the INI file is correct.

Minor Mod Manager UI layout issues

On a clean Windows 7 install the Mod Manager looks like this:
image
The "move to top" and "move to bottom" arrows don't display properly. This wasn't a problem on Windows 8.1, so I imagine it has to do with the fonts installed by default/externally.
All symbols from this page appear fine on a clean install, and it has stuff like ↥ and ↧ that you might consider as a replacement for top/bottom arrows.

Texture Packs Override PVMs

If you have a mod with a texture pack, mods loaded after it with a matching PVM should override the texture pack, but do not.

Resizable window: black models in chao areas

In all chao areas except the main gardens, most (chunk?) models turn black when the window is resized.
Leaving the area entirely restores the textures. It happens with vanilla settings.

blackmodels

Un-replace file (HelperFunctions feature request)

This would be a useful feature to have in mods that need to do dynamic file replacements. For example, someone I know is currently working on day/evening/night versions of all Action Stages, and needs to replace PVM and SET files depending on which time of day it is. Simply using ReplaceFile again doesn't work in this context because it returns the new name set by the previous ReplaceFile.

TestSpawn: Cutscene preview

A good addition to the Mod Loader's Test Spawn functionality would be an option to start the game on a specific cutscene. I have a working implementation in this fork of the original TestSpawn mod, though it might be a bit too hacky for the Mod Loader.

The basic idea is to patch event IDs used for demos that play after waiting on the title screen. The main problem with this approach is the need to set the necessary story progression flags manually for each cutscene, and some cutscenes require workarounds such as removing objects that load music or bosses, or trigger the end of the stage. Most of this is already handled in the fork so it could be repurposed if the same approach is implemented in the Mod Loader.

A better implementation would require understanding how the game's story sequences work, and how to manipulate them similar to SADX Preview's "Easy Menu", although even "Easy Menu" fails to load some cutscenes.

Custom window titles not displaying with the "Windowed Fullscreen" option enabled

Yeah I know, I'm probably the only person using this feature, but still. If the game is run in windowed mode when "Windowed Fullscreen" is enabled in the Mod Manager, the game's window title doesn't change to the title specified by mod.ini's WindowTitle setting.

If this isn't fixable, I suggest removing the feature entirely since nobody has really used it for a long time, and I ended up disabling it anyway because stuff like Fusion's Chao Editor checks the for the original SADXPC window title, so people were complaining that it isn't compatible.

Disable movies option?

There is a config option in the Codes tab to skip the game's intro, and there's another one to skip cutscenes, but can it be possible for us to skip just the pre-rendered cinematics?

Full background: SADX and the Mod Loader and most of the mods I've tested work well in WINE, however there's a significant issue with Windows Media Player and its associated libraries which are needed to play the game's pre-rendered movie files. In many setups, the game crashes every time it tries to load one of these, and I've done a lot of research and fiddling with Winetricks et al without much success. It occurs to me it would be a very simple, if not ideal, workaround to just turn playback of these movies off. The "Disable Cutscenes" might do this, but it also causes the game to skip most of the non-cinematic cutscenes, which is unnecessary overcorrection.

Some remaining material colors issues

A previous update to the mod loader fixed some issues pertaining to vertex and material colors. However, this has affected the Chao Transporter's appearance in a strange way.
sonic_2019-09-03_10-44-41
Some objects in the game like the table in Eggman's study still appear to have different colors as well when compared with GC SADX.
sonic_2019-09-03_11-17-33

Window Resize To-Do

For the window-resize branch:

  • Handle device lost (will allow minimizing, fullscreen toggle, and long-standing alt+tab crash)
  • Fullscreen toggle (only works if windowed at startup)
  • Fullscreen toggle (fullscreen at startup)
  • Make fullscreen toggle borderless window-aware
  • Correct window size on startup
  • Don't change internal resolution if custom internal resolution is set
  • Toggle for window resizing

UI Scale To-Do

To-do:

  • Fix Chaos Chao sparkles in Chao Garden menus
  • Track down the individual functions in scaleTwinkleCircuitHUD
  • Draw the primitives directly in chDrawBillboardSR rather than passing to DrawRectPoints
  • Fix chCalcWorldPosFromScreenPos (3D model placement in Chao Garden huds) at squeezed aspect ratios

Misc:

  • Better support for tall resolutions (Fixed on the window resize branch: 6c0bd6a)

Non-standard:

  • Big's Fishing Line Tension (surrounding elements are sprites)
  • Chao HUD (X/Y pick up/pet)
  • Chao Stats
  • Chao Menus (departure, black market, race)
  • Mini Game Collection

Backgrounds/Menus (menu-scale branch):

  • Title Cards
  • Subtitles
  • Recap subtitles
  • Menus (e.g main menu, character select)
  • Mission screen (from pause menu)
  • Map (from pause menu)
  • Credits
  • Game Over screen (duplicate code everywhere!)

Add a warning to the "Codes" tab

It seems to be a recurrent problem that people go to the "Codes" tab and just enable everything without being aware of the consequences.

Examples:

  1. Many people enable the Super Sonic flag because they think it is required for the Super Sonic mod to work, or attempt to use it thinking it would provide the same functionality as the Super Sonic mod.
  2. I haven't confirmed this myself, but apparently "All characters unlocked in Adventure mode" and/or "Tails can play Emerald Coast" can interfere with certain story flags, which leads to a corrupt save file, and the player is unable to complete the story (e.g. Knuckles' story before Chaos 2 fight) unless they replay the whole game on a new save without codes.

A warning message informing the user about potential consequences of using codes could be helpful. A simple warning that the feature is mainly for mod developers would also suffice.

Mod download throws an error message for GitHub-hosted mods

image
image

After one of the recent Mod Loader updates, the above error appears when attempting to repair or force update any mod that is hosted on GitHub. If the file mentioned in the error is deleted, the Mod Manager redownloads it and throws the same error.

Make some options disable others in configs

It would be a nice UI feature if some option would become disabled when you change the other one. For example, if I set 'Enable Dreamcast branding' to 'false', 'Restore the SA1 water ripple' does nothing and becomes useless, therefore can be safely disabled.

Make option menu in configs wider.

I guess it would be better to replace that little arrow in a corner with a wide column, so even pressing on text will lead to option menu, something like this:
example

Some text I typed

Wish there was a "Discussion" tab for projects, oh well.
Anyways, it has been a while since I'd played any modern Sonic game, I guess I can use this and maybe SA2B as stepping stones.

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.