Realm667 / WolfenDoom

"WolfenDoom - Blade of Agony" | Important: This is only meant for development and testing purposes. You are NOT ALLOWED to use material from this repository for your own projects. Important: This repository is for development and testing purposes, you are NOT ALLOWED to use the copyrighted material for your own projects without our permission!
http://boa.realm667.com
253 stars 27 forks source link

[3.2] [Launcher] Multiplayer compatibility for v3.2 #550

Closed Gadgetdan closed 3 years ago

Gadgetdan commented 3 years ago

The Launcher didn't had Polish as alternative language.

Ozymandias81 commented 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.

madame-rachelle commented 3 years ago

This won't be available until the launcher rewrite. I lost the ability to recompile the launcher as is.

Ozymandias81 commented 3 years ago

Ah that's true... well, we'll figure it out somehow.

mgrinzPlayer commented 3 years ago

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

Tormentor667 commented 3 years ago

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.

mgrinzPlayer commented 3 years ago

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?

madame-rachelle commented 3 years ago

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.

mgrinzPlayer commented 3 years ago

@madame-rachelle As little dependency as possible? What do you think about Free Pascal and Lazarus IDE?

Tormentor667 commented 3 years ago

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.

mgrinzPlayer commented 3 years ago

@Tormentor667 It should detect and analyse additional pk3 (user-addons) files?

madame-rachelle commented 3 years ago

We have decided to use the extension .boa for those.

Tormentor667 commented 3 years ago

@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.

addon_disable_hints.zip

mgrinzPlayer commented 3 years ago

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: obraz

Ozymandias81 commented 3 years ago

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).

mgrinzPlayer commented 3 years ago

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.

mgrinzPlayer commented 3 years ago

Have a question. Is the boa.ipk3 file intentionally a 7zip archive (compression: store) instead of zip archive (compression: store)?

Ozymandias81 commented 3 years ago

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.

mgrinzPlayer commented 3 years ago

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).

Ozymandias81 commented 3 years ago

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.

mgrinzPlayer commented 3 years ago

obraz

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.

madame-rachelle commented 3 years ago

I'll work on replacing the archive builder then.

Tormentor667 commented 3 years ago

@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

mgrinzPlayer commented 3 years ago

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.

Tormentor667 commented 3 years ago

@mgrinzPlayer thanks for the hint, I will just try that.

Regarding the suggestions: I am all for it, sounds like a really good plan!

Tormentor667 commented 3 years ago

Just in case you want to play around with it, I prepared a little zip with all current addons, explanations and screenshots.

#addons.zip

mgrinzPlayer commented 3 years ago

@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?):

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.

Username-N00b-is-not-available commented 3 years ago

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.

mgrinzPlayer commented 3 years ago

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.

mgrinzPlayer commented 3 years ago

I'm starting to write an addon detection procedures. obraz

Tormentor667 commented 3 years ago

This is awesome! Thanks so much for taking care of that and supporting us :)

mgrinzPlayer commented 3 years ago

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

obraz

obraz

If you do not add addoninfo.txt, it will just look like this: obraz

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.      

Username-N00b-is-not-available commented 3 years ago

@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?

Tormentor667 commented 3 years ago

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 ;)) 2021-05-03_125601

DoomJedi commented 3 years ago

Very much support the proposed change.

mgrinzPlayer commented 3 years ago

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:

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) obraz

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. obraz

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.

madame-rachelle commented 3 years ago

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.

AFADoomer commented 3 years ago

@madame-rachelle - I'll cover at least initial cost if that's the way we need to go.

madame-rachelle commented 3 years ago

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 commented 3 years ago

@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!

mgrinzPlayer commented 3 years ago

@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: obraz 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 obraz

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

Tormentor667 commented 3 years ago

@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

madame-rachelle commented 3 years ago

I'll do it - since I can use it to sign GZDoom executables anyhow.

Tormentor667 commented 3 years ago

Can you share your PayPal email then?

madame-rachelle commented 3 years ago

Sent it to you on the ZDoom forum in private message

mgrinzPlayer commented 3 years ago

obraz 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.

Tormentor667 commented 3 years ago

@mgrinzPlayer loving it already, really great work so far, works like a charm. I have a few suggestions though:

grafik

Username-N00b-is-not-available commented 3 years ago

@mgrinzPlayer Is it possible to make the window resizable? Also, is the background image necessary @Tormentor667?

madame-rachelle commented 3 years ago

@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.

image

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).

mgrinzPlayer commented 3 years ago

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.

madame-rachelle commented 3 years ago

@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)