Closed Gadgetdan closed 3 years ago
I think @madame-rachelle could be able to add it on the list, everything else seems present on both launcher and in game menues.
This won't be available until the launcher rewrite. I lost the ability to recompile the launcher as is.
Ah that's true... well, we'll figure it out somehow.
Suggestion,
I think the launcher should check menudef.txt file from boa.ipk3 archive to update language combobox control; parse entries from OptionString "BoALanguageOptions".
If you are planning adding other languages as small PWAD pk3 archive, e.g. boaLangUpdate.pk3, it should detect boaLangUpdate.pk3 file, parse menudef.txt file from this archive, last launch argument would be: -file boaLangUpdate.pk3
We actually have big plans for a new launcher but that means a) @madame-rachelle volunteering to rewrite everythng or b) finding a programmer who can do that.
What are the other big plans? It has to be MS Visual Studio project? What language - it can be C# or C++? Or it doesn't matter until it works fine?
Right now I have something in process that uses CEF. I really would prefer to keep the dependencies on external libraries as low as possible; CEF is already a big one.
If you have something in mind, please let me know.
@madame-rachelle As little dependency as possible? What do you think about Free Pascal and Lazarus IDE?
What are the other big plans?
We have prepared a set of addons and want to make it possible to load user-addons directly from the launcher.
@Tormentor667 It should detect and analyse additional pk3 (user-addons) files?
We have decided to use the extension .boa for those.
@Tormentor667 It should detect and analyse additional pk3 (user-addons) files?
Kind of. Here is an example addon that needs to be extracted into the BoA root folder. It uses a .boa file that the launcher needs to parse. On top of that we need some kind of feature that adds a text string to the launcher that also explains what the addon is doing.
I see. I think I should be able to write this in FreePascal/Lazarus.
Usually, simple programs compiled with Lazarus under Windows would use only those ten libraries:
What's important also is that the final executable won't trigger any phalse positive with antiviruses, we summoned Rachael for help exactly for this reason during Chapter 3 development. And it must be 64bit if it is possible too (I am not an expert).
I think launcher doesn't have to be 64bit. Launcher 32bit can successfully execute 64bit applications. About AVes, even when your program uses official API provided by Microsoft, it can land in the PUP category because of heuristics. To prevent this, to a certain degree, you can sign the executable.
Have a question. Is the boa.ipk3 file intentionally a 7zip archive (compression: store) instead of zip archive (compression: store)?
Boa is an ipk3 so gzdoom sees it as an iwad, it is a non-compressed (minimal) file done with 7zip. You can also see the remnants of the tools we used for it, check tools folder inside it. Afaik it should be a zip file, not 7z but I didn't do that ipk3, Torm is responsible for.
I already replicated rachelle application plus I added reading from zip files (ZIP container, not 7Z container). now it reads supported languages from menudef.txt. Then, I tried it on official release, dang, false-positive corrupted file warning because my tool treats boa.ipk3 as ZIP.
Edit: I see boa.ipk3 as 7zip archive (store method) is slightly smaller than boa.ipk3 as zip archive (store method).
I think it is not a problem at all, we can live with the zip format which also it should be the target one too.
repo: https://github.com/mgrinzPlayer/BoaLauncher
utilizes: launcher-resource and boa-launcher.ini
binary: https://github.com/mgrinzPlayer/BoaLauncher/releases/download/demo/Blade.of.Agony.Launcher.7z
I will be back later. (approx. 8h)
It gives false-positive error message about "corrupt boa.ipk3" - languages not detected. Works good on boa.ipk3 as ZIP - detects languages.
I'll work on replacing the archive builder then.
@mgrinzPlayer very impressive, this was quick and looks very solid if you ask me - thanks a lot for your support! Do you think the implementation of the "addon" concept might work somehow? And how could we add explanations for each addon? Maybe with a simple text tile that we add into the "addon zip" and that gets parsed by the launcher?
@madame-rachelle - What do I need to change here to make it work as ZIP and not as 7ZIP?
7z.exe u boa.ipk3 G:\DoomDev\Projects\Wolfendoom\Wolfendoom* -xr!.git -xr!.psd -xr!.backup1 -xr!.backup2 -xr!.dbs -xr!.db -xr!.backup3 -xr!*.dbprefab -mx0
work as ZIP and not as 7ZIP
-t{Type} : Set type of archive
, that would be -tzip
7z.exe u boa.ipk3 G:\DoomDev\Projects\Wolfendoom\Wolfendoom* -xr!.git -xr!.psd -xr!.backup1 -xr!.backup2 -xr!.dbs -xr!.db -xr!.backup3 -xr!*.dbprefab -tzip -mx0
implementation of the "addon" concept might work somehow
We can use addoninfo.txt inside .boa with all needed information how to launch specific addon. I think it would be possible to add even small images/previews (preview folder inside .boa) and entry inside addoninfo.txt about image/previews files count.
@mgrinzPlayer thanks for the hint, I will just try that.
Regarding the suggestions: I am all for it, sounds like a really good plan!
Just in case you want to play around with it, I prepared a little zip with all current addons, explanations and screenshots.
@Guardsoul , sorry about hijacking your thread...
@Tormentor667 @Ozymandias81
How to properly launch those addons? Like this?
boa.exe -iwad boa.ipk3 -file addon_grenades_only.boa -file boa_dt.pk3
Just tried and loaded the save, I do not have the unlimited grenades. When I start fresh campaign, this mod works.
So, "how to use" for this addon would be "start new campaign" right?
My thoughts (what do you think?):
first change I suggest is to copy content of credits.txt (from pk3) to the .boa file. Or maybe do not use file credits.txt and just keep all essential infos, credits, how to use, ..., inside addoninfo.txt file inside .boa.
preview images would have simple name, for example 1.jpg, 2.jpg, ...., inside preview folder inside .boa
mod description would be also inside addoninfo.txt. Can you provide the description of each mod as text?
final. For now, each mod is two files: .boa and .pk3 Is it possible to just use one file, just .boa inside addons folder?
Edit:
About that final thought. I experiment on that grenade mod. Just moved gameinfo.txt from .boa to the pk3 file inside addons folder, I removed LOAD line (I think it is not needed now), then I removed orig .boa and renamed .pk3 to .boa.
I launched it with boa.exe -iwad boa.ipk3 -file addons\addon_grenades_only.boa -file boa_dt.pk3
and it looks it works.
Hello, @mgrinzPlayer! I am the creator of these addons (all except score.pk3
done by AFADoomer).
So, "how to use" for this addon would be "start new campaign" right?
Yes, while loading a savegame which was made without an additional archive GZDoom will just discard the .boa file. The addons could only be effective in a new campaign (don't forget that you can warp to individual levels for testing, though it can slightly break some maps for now, you would sometimes have to cheat).
The mutators are small modifications made by the Blade of Agony team, but not included into the base game. These not only offer alternative ways to play Blade of Agony, but also give references to some features which can help future modders to know where they could start their work.
behaviour Adds some advanced behaviour patterns to regular enemies, such as leaping for melee mutants, picking up weapons, sleeping, and throwing grenades at close range as an extreme measure after being wounded.
disable_hints Removes all exclamation marks and secret hint sheets from the game, and disables the compass. This is for people who do not like in-game hints and think that Blade of Agony has a bit too much of them.
efficiency Prevents ammo and health items from being wasted by preventing you from picking them up automatically if they do not fit fully in your inventory. If you still want to do it, press use on the item, and it will be picked up.
grenades_only Removes all weapons except grenades. The good news is that you can throw them further... and that you have an infinite supply of them. Don't get too careless in close quarters!
instagib All damage from enemies to player and vice versa is multiplied by 1000. Terrain-based damage (e. g. from falling/drowning), as well as damage from critters, are excluded for the game to become playable.
m2hb Replaces the Fliegerfaust mounted on the truck from C2M4 with a Browning .50 caliber M2HB heavy machine gun, loaded with high-explosive cartridges. It can easily destroy both enemy infantry and vehicles.
melee Removes all guns, and replaces them with melee weapons. Your melee weapons deal more damage than usual, and you can now throw your knives (you can carry multiple ones). After a silent kill, you can also drag the dead body away to hide it from patrols.
more_weapons Adds three new weapons to the game. Kampfpistole is used by (and dropped from) some of the officers, StG 44 is a weapon of elite Waffen SS units, and FG 42 is sometimes used by paratroopers.
score Upon killing an enemy, the player gains a few score points, just like in Wolfenstein 3-D. Tougher and rarer enemies grant more points, and for every 40000 points, you receive some bonus goodies.
vampire You are a vampire who quenches his thirst by killing Nazis and their accomplices. You've become so addicted to blood that you cannot survive for even one minute without taking another life.
I see, there can be way more pk3 files inside addons folder, than .boa files. I get it. One .boa file and one (or more) pk3 files inside addons folder... kinda confusing at first.
We cannot have a universal identifier for each mode: non-BoA developers will make mods too.
I see it like this:
Launcher after opening "addons" tab will iterate only all .boa files, it will read addoninfo.txt and check existence of "preview\1.jpg" file (and the rest if more)
The list will build up, can take few seconds. Each entry will have extrainfo button, it will print credits (if file credits.txt exists) info from of all pk3 files the addon is using.
I'm starting to write an addon detection procedures.
This is awesome! Thanks so much for taking care of that and supporting us :)
OK. You can test this.
addoninfo.txt inside addon_grenades_only.boa will look like this:
title = Grenades Only
description = Removes all weapons except grenades. The good news is that you can throw them further... and that you have an infinite supply of them. Don't get too careless in close quarters!
requirements = You must start the new campaign.
previewImages = 1
If you do not add addoninfo.txt, it will just look like this:
Here in this package there are modified .boa and original .pk3 files plus my launcher: https://github.com/mgrinzPlayer/BoaLauncher/releases/tag/demo2 (small fix) https://github.com/mgrinzPlayer/BoaLauncher/releases/tag/demo3
Preview images and other informations... I will add later tomorrow.
@mgrinzPlayer Looks really fine, thank you very much for this effort! Could you please write a small description of how to build the executable from your repository (for example, which compilers and command-line options are used), so we would not have to disturb you in the future for changing some small details?
By the way: This can be removed. Texture filtering should be always off (otherwise it generates strange outlines on explosions and @DoomJedi isn't happy with filtered sprites anyway ;))
Very much support the proposed change.
Could you please write a small description of how to build the executable from your repository (for example, which compilers and command-line options are used), so we would not have to disturb you in the future for changing some small details?
Of course. It is always better to compile it yourself. Every executable you add to your releases should be compiled by you.
Just to let you know:
freshly compiled Launcher, size about 2MB, compiled from source 3700494 - last commit, compiled with Lazarus 2.0.10, and then uploaded to virustotal.com will yield this: https://www.virustotal.com/gui/file/62de0f10fc5f59ce86e1a47e23c094dac509897227312f6ef97497418d88612c/detection
the same exe, compressed with clean tool like this one UPX 3.96, size about 800KB, virustotal.com will yield this: https://www.virustotal.com/gui/file/3d6a77588d0cf21182da7c522d2d81a641c76687c3e66304c948aafb52082ebf/detection
The first one because it is compiled with less popular compiler (compared to Intel, Microsoft, MinGW/GCC) and there is one line anti-viruses do not like: ShellExecute(0, 'open', pchar(execName), pchar(commandLineParam), '', sw_show);
changing some small details
I'm already trying to make it more friendly for hexeditor modifications. See this line: https://github.com/mgrinzPlayer/BoaLauncher/blob/3700494fb036e979e342f71f66519726a684ab98/unit1.pas#L310
and here in hexeditor (I'm using HxD)
If you have changed boa.exe to something else you have plenty room for that (just use : char to separate from padding). For example you can change it to boa.cmd, create boa.cmd with this:
boa.exe %*
pause
And you can see what parameters were used to launch application.
Could you please write a small description of how to build the executable from your repository I will write it here and in my repo.
Instead of dealing with all that drama with a false positive I think we can put up the money to invest in a certificate to sign the .exe, I would much prefer that. I think I saw one for $100 USD / year, and it may be useful for signing GZDoom executables anyway. I might consider going this route instead, when I get my next payment from my job.
@madame-rachelle - I'll cover at least initial cost if that's the way we need to go.
Either way - I think we should not UPX pack the executable - and I really would prefer to go exclusively 64-bit with it. Primarily because this mod will only run on 64-bit systems, and so the launcher itself will also load faster on such systems. (For reference: when loading a 32-bit executable on 64-bit Windows, an entire subsystem has to be activated which takes up a little extra RAM and also delays execution - something that is needless and can be avoided)
@madame-rachelle - I'll cover at least initial cost if that's the way we need to go.
That will be really helpful, thank you!
@madame-rachelle open your windows task manager, details tab, rightclick on any column header and add a new one: platfrom. Sort entries by platform. How many 32bit processes on your 64bit Windows you have? If you have at least one, entire 32bit subsystem is already activated and resides in RAM, and large part of it is shareable. Only the very first launch will take more time.
Memory usage and times: Both were launched at the same time (I selected both exes and hit enter). Total time for 32bit 0.156 seconds versus 64bit 0.125 s. Within the measurement error, it is the same. The same with memory: private and working set.
Also, examining ZIP file (boa.ipk3) took pretty the same amount of time on 32 and 64bit.
start:=GetTickCount64;
zip.Examine;
if findFileInsideArchive(zip,fileName)=-1 then exit(false);
ShowMessage(inttostr(GetTickCount64-start));
Left side 32bit, right 64bit. Time in milliseconds
yeah, 64bit window will appear 0.1s faster, but, I could execute zip examination after form shows up. End user would not notice the difference
@madame-rachelle - I'll cover at least initial cost if that's the way we need to go.
We already got a few donations for Blade of Agony, so instead I'd suggest we take the 100$ from this pool and no-one has to spent his earnings. Let me know who wants to buy it and I transfer the money via PayPal
I'll do it - since I can use it to sign GZDoom executables anyhow.
Can you share your PayPal email then?
Sent it to you on the ZDoom forum in private message
https://github.com/mgrinzPlayer/BoaLauncher/releases/tag/demo4
There's 32 and 64 bit you can test.
Double click the preview image to get bigger size, press any key or click to close preview. If you don't have mouse controller, you can use the keyboard ("tab" and "space/enter" keys) to select and launch chosen mod.
@mgrinzPlayer loving it already, really great work so far, works like a charm. I have a few suggestions though:
@mgrinzPlayer Is it possible to make the window resizable? Also, is the background image necessary @Tormentor667?
@Tormentor667 I can't help but wonder if that is a DPI issue, I use 200% DPI scaling on my desktop (using 3840x2160 desktop resolution). It looks even worse for me.
I have never used FreePascal or Lazarus before so I have no idea how easy this would be to fix. But I know you can turn off DPI scaling in the manifest also (which makes it look terrible, to be quite honest, but at least it works).
For me 150% scaling and above looks terrible everywhere... not only the launcher, everything. All Lazarus projects have "DPI awareness" turned on by default, there's also "LCL scaling" thing turned on by default. I will try playing with both settings. I do not have 4K monitor - it won't be easy.
@mgrinzPlayer Are you comfortable accessing a system remotely? I can deploy a VM for you that has a super high resolution screen for you to play with, maybe in a couple hours. In general I agree that scaling does look terrible, but it is a necessary evil when accessing desktops in 4k resolution, and after a while you don't even really notice it. (Actually, if you start your login session on Windows 10 with scaling turned on, things aren't always so bad, except the blurry non-DPI-aware apps)
The Launcher didn't had Polish as alternative language.