Jump to content
The Dark Mod Forums

AngelLoader TDM Support (now released!)


FenPhoenix

Recommended Posts

  • nbohr1more featured and pinned this topic
22 minutes ago, Araneidae said:

Looks nice.  Is there any prospect of running it on Linux?

You can try with Wine (some have had success, though there may be visual issues or other imperfections). Oops, I guess you can't use Wine because TDM on Linux will be an actual native version, which AL presumably would not be able to interact with. Other than that, sorry, I'm pretty tied to Windows for AL as a whole. A separate app for TDM only would be much easier to port to Linux, no need for the Windows-only RichTextBox and no need to interact with Wine from the Linux side programmatically either. One could use the Avalonia UI framework for that, I would think. Maybe I'll give it a shot sometime, but for now I'll polish up TDM support on current AL.

Edited by FenPhoenix
Link to comment
Share on other sites

Not to be a nag, but I was thinking about the columns problem.

If you go to the view source tab in the wiki article:

https://wiki.thedarkmod.com/index.php?title=Fan_Missions_for_The_Dark_Mod&action=edit

The raw table data is accessible directly:

|-
!align=left|{{TDM-FM|written|Written in Stone}}
|Bikerdude, Amadeus, Dragofer
|{{Forumlink|https://forums.thedarkmod.com/index.php?/topic/21265-written-in-stone-beta-210-only-20220128/}}
|2022-01-28
|338
|Yes
|Yes
|CCC 22, Elixir
|City Missions
|Undead, Horror Themes
|-

Each pipe character represents one of the columns.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

But I mean you want me to take a dependency on parsing the edit page of a wiki article though? And trusting it to stay there, stay updated, and the format not change? Heck, the page even changes depending on if you have edit permission or not, and I have no way to know about updates either without just constantly re-downloading it.

  • Like 3
Link to comment
Share on other sites

Many thanks for supporting The Dark Mod, @FenPhoenix !

Web searches narrow results by site ttlg.com, you could make an exception for TDM FMs...

EDIT - Ouch, my bad: it can be configured in the settings. Regardless, perhaps this is the time to have per-game search results settings with some defaults.

Edited by snatcher
User error

TDM Modpack

Link to comment
Share on other sites

6 hours ago, snatcher said:

Many thanks for supporting The Dark Mod, @FenPhoenix !

Web searches narrow results by site ttlg.com, you could make an exception for TDM FMs...

EDIT - Ouch, my bad: it can be configured in the settings. Regardless, perhaps this is the time to have per-game search results settings with some defaults.

I noticed that too. I'm definitely wanting to add a second URL field at a minimum, or per-game as you say. It'd be cool to be able to just go straight to the forum thread too, which I could do if I got it from that wiki page. I'm just nervous about getting stuff programmatically from the edit section of a wiki page, that just seems like it could change and the url is like some &action=edit which isn't an explicit filename (it's a command to generate a page maybe?) so maybe that could change too? If the text in the source code box were accessible by itself in some explicit file I guess I'd feel less apprehensive. Then again I'm totally inexperienced when it comes to web stuff.

For example, http://missions.thedarkmod.com/available_missions.xml is where TDM itself gets the available FMs list from, though that list doesn't have any forum links or much extra info. Although incidentally I could use it to populate the FM titles, authors and dates instead of a local scan, maybe get a bit more accuracy.

  • Like 3
Link to comment
Share on other sites

3 hours ago, FenPhoenix said:

Added per-game web search urls and defaulted TDM to site:thedarkmod.com.

I'm working on downloading/parsing FM information and seeing what I can do with it. I really think an in-app downloader would make things a lot more convenient.

The description of missions on server is located here:

Every mission has "id" field, you can put it into template to see details:

And from this XML you can put screenshot path into yet another URL to download screenshot:


These are cvars in engine:

idCVar cv_tdm_mission_list_urls("tdm_mission_list_urls",	"http://missions.thedarkmod.com/get_available_missions.php;http://missions.thedarkmod.com/available_missions.xml", CVAR_GAME, "The URLs to check for the mission list XML." );
idCVar cv_tdm_mission_details_url("tdm_mission_details_url", "http://missions.thedarkmod.com/get_mission_details.php?id=%d", CVAR_GAME, "The URLs to check for the mission details XML." );
idCVar cv_tdm_mission_screenshot_url("tdm_mission_screenshot_url", "http://missions.thedarkmod.com/%s", CVAR_GAME, "The URL template to download the mission screenshots." );

This interface for missions database has not changed in ages.


Everything else is kinda additional/unofficial information.
Maybe we'll add it to "details" XML in future, maybe not.

Parsing wiki page is a bad idea for a normal application.
But I think someone else did it in order to create a website with the list of missions.

Link to comment
Share on other sites

On 10/13/2023 at 12:03 AM, FenPhoenix said:

Deleting FMs:

Deleting TDM FMs is not supported yet. I notice TDM itself doesn't allow you to delete FMs either; it has been noted that people have accidentally lost their data and so the option was removed. AngelLoader puts files into the recycle bin when it deletes them, and I could add the option, but figured it was okay to leave it out initially since the game doesn't let you do it either.

Note, though, that you can still delete TDM FMs from AngelLoader's database if you've manually deleted the actual FM from disk first. To do this, first click the "Show only unavailable FMs" button (red X page icon on the top bar).

There was an in-game button to delete a mission.

It was removed because mappers sometimes accidentally clicked it for their WIP missions, which resulted in removing months of their work.
Since the feature itself is not much needed anyway, we removed it.

In principle, you can simply delete the fms/qwerty directory manually.
One possible issue is that a record in missions.tdminfo will remain. Maybe it will be deleted on next TDM start (there is some kind of cleanup), maybe not --- then it will retain some info when you reinstall the mission back.

Link to comment
Share on other sites

1 hour ago, stgatilov said:

The description of missions on server is located here:

Every mission has "id" field, you can put it into template to see details:

And from this XML you can put screenshot path into yet another URL to download screenshot:


These are cvars in engine:

idCVar cv_tdm_mission_list_urls("tdm_mission_list_urls",	"http://missions.thedarkmod.com/get_available_missions.php;http://missions.thedarkmod.com/available_missions.xml", CVAR_GAME, "The URLs to check for the mission list XML." );
idCVar cv_tdm_mission_details_url("tdm_mission_details_url", "http://missions.thedarkmod.com/get_mission_details.php?id=%d", CVAR_GAME, "The URLs to check for the mission details XML." );
idCVar cv_tdm_mission_screenshot_url("tdm_mission_screenshot_url", "http://missions.thedarkmod.com/%s", CVAR_GAME, "The URL template to download the mission screenshots." );

This interface for missions database has not changed in ages.

Actually I'd already figured that part out from the source code and a bit of trial-and-error, but thanks nonetheless! 🙂

I do have one question. The tdm_mission_list_urls cvar has two urls:

http://missions.thedarkmod.com/get_available_missions.php
http://missions.thedarkmod.com/available_missions.xml

They both appear to lead to the exact same xml file, except the first one has an xml header and the second one doesn't. From looking at the code it seems like it tries them in order. Should I be doing this too? Are they just mirrors and one might be down? Since they're both on the same domain it seems odd they'd be mirrors, surely if one was down the other would be too, but I dunno.

Edited by FenPhoenix
  • Like 2
Link to comment
Share on other sites

1 hour ago, FenPhoenix said:

I do have one question. The tdm_mission_list_urls cvar has two urls:

http://missions.thedarkmod.com/get_available_missions.php
http://missions.thedarkmod.com/available_missions.xml

They both appear to lead to the exact same xml file, except the first one has an xml header and the second one doesn't. From looking at the code it seems like it tries them in order. Should I be doing this too?

I think php links are for the "mission database" on TDM website.
You can go there and browse released missions without downloading TDM.

If not, then php is just some remnant of the past 😀

I would say: better use XML links.

  • Like 1
Link to comment
Share on other sites

On 10/13/2023 at 12:11 PM, FenPhoenix said:

You can try with Wine (some have had success, though there may be visual issues or other imperfections). Oops, I guess you can't use Wine because TDM on Linux will be an actual native version, which AL presumably would not be able to interact with. Other than that, sorry, I'm pretty tied to Windows for AL as a whole. A separate app for TDM only would be much easier to port to Linux, no need for the Windows-only RichTextBox and no need to interact with Wine from the Linux side programmatically either. One could use the Avalonia UI framework for that, I would think. Maybe I'll give it a shot sometime, but for now I'll polish up TDM support on current AL.

Someone referred me to this: https://wiki.winehq.org/FAQ#How_do_I_launch_native_applications_from_a_Windows_application.3F

Dunno how that would help on a Windows app, but just so you know.

Link to comment
Share on other sites

Beta 7

  • TDM FM Scanner now uses a hybrid of local and server data for more accuracy. Titles, authors, and release dates improve.
  • AngelLoader will auto-refresh its FMs list when new pk4 FMs are added manually.
  • Localization packs (*_l10n.pk4) in the fms directory are now ignored: the game moves these to their appropriate folders on next start.

I reckon this is now pretty usable. I'm working on an in-app downloader, but until that's done, you can use the game to download FMs and AngelLoader to launch them and manage their metadata.

  • Like 3
Link to comment
Share on other sites

On 10/14/2023 at 9:44 PM, Taffingtaffer said:

Someone referred me to this: https://wiki.winehq.org/FAQ#How_do_I_launch_native_applications_from_a_Windows_application.3F

Dunno how that would help on a Windows app, but just so you know.

Possibly related?

https://wiki.winehq.org/Winelib_User's_Guide

Quote

What you gain by recompiling your application with Winelib is the ability to make calls to Unix APIs, directly from your Windows source code.
This allows for a better integration with the Unix environment than is allowed by running an unmodified Windows application running in Wine.

 

Edited by datiswous
Link to comment
Share on other sites

Quote

Thanks to the above, Winelib supports most C and C++ source code

No mention of anything else, and

Quote

The main difference is that the compiler becomes much more important. It is highly recommended that you use gcc, g++, and the GNU binutils.

Those are C++ compilers. No mention of .NET anywhere on the page either.

  • Like 1
Link to comment
Share on other sites

Anyway, Linux is backburner until I get TDM support release-ready and an AL public release is out. AL on Linux would be awkwardly in between worlds, supporting 4 games that must run on Wine, and one game that's native. That sounds like a headache any way you look at it.

I know some people have been able to run AL on Wine, but from screenshots I've seen it doesn't even look right, some of the GDI drawn stuff looks janky without the high quality scaled filter it's supposed to have, and dark mode doesn't fully work either afaik, etc. So I don't think AL on Wine is that great a solution in the first place, even if it could interface with native TDM.

Now, AL as it stands is stuck on Windows - and WinForms at that - because of the need for the RichTextBox (WinForms has the only acceptably performing one). Making a native Linux version would need a cross-platform UI, so Avalonia or something else as long as it does theming and a virtualizable datagrid I guess. And then I would have to remove rtf support for that version, and then interface with Wine for Thief but native for TDM. Like I said, sounds like a huge headache.

However, a separate Linux app that only supports TDM but otherwise has all of AL's functionality would be MUCH simpler to make. AL's code is already modern-.NET-ready except for the UI, so I would "just" have to learn Avalonia or whatever, and then simply copy AL's code wholesale and rip out anything not TDM-related (which is a large portion of it). That would lessen the "one-stop shop" factor, but would still be way more feature-rich than the in-game mission manager. But that's for the future if I feel like taking it on. For now, I'm just going to get TDM working at a public release level for AngelLoader and offer my sincere apologies to Linux users. 🙁

  • Like 1
Link to comment
Share on other sites

LOL! Don't apologize for volunteer work...

( There are already enough entitled belligerents yelling at TDM devs for not adding features. )

Thank you for your efforts! :)

  • Like 3

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Beta 8

Some fixes...

  • Selected TDM FM was not updated on refresh from disk.
  • Selected TDM FM was not updated if the FM was deselected in-game.
  • An optimization was broken which caused a refresh from disk even when unnecessary.
  • We no longer pass the FM as an argument to the game, but rather simply write it out to currentfm.txt. This avoids an issue where if you pass an FM as an argument to the game (+set fs_currentfm some_fm), then you deselect the FM or select another one, upon game restart it will re-select the FM you initially passed, thus effectively preventing any change of selection unless you quit and start again manually.
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • The Black Arrow

      I was playing Skyrim, got bored fast. Got back to The Dark Mod just for one mission, played "Somewhere above the City" which is not really a great mission but still good, as in above-average.
      My biggest regret is living in this country, where there's a heat wave, I am sweating at 20c and I really wish for temperatures below 5c.
      · 10 replies
    • Skaruts

      Is there something wrong with the forums lately, or is it my browser? I've been having trouble formatting posts, and just now I couldn't format anything at all.
      I'm using Vivaldi.
      Usually I have to: select text, click bold, nothing happens, select again, click bold, then it works. 
      Same for other stuff, like creating spoilers, bullet points, links. Nothing works the first time. 
      · 1 reply
    • STiFU

      Back from a spontaneous 1-week trip to Lanzarote with wife and son. I hope beta testing has been going well...
      · 1 reply
    • datiswous

      Whenever I eat fried chicken these days I think of this scene in The Black Mage..

      · 1 reply
    • Mortem Desino

      Even though I've been absent a long while, I still find myself dreamily wishing for the free time to do TDM mission development. When working on new research projects I'll find myself involuntarily thinking, "hee hee this could be a fun texture or readable or bit of map architecture." Or I find myself absentmindedly responding out loud to odd noises with a drunkguard-like "must've been rats!"
      · 3 replies
×
×
  • Create New...