Python Forum
Extracting Graphics From A Dos Game Job
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extracting Graphics From A Dos Game Job
#1
Hi there,

I have a Coding Job I need doing, I would like to extract, External WWII Aircraft Graphics, from a DOS game called
Secret Weapons Of The Luftwaffe. The File extension is .PAC. Initially I would like to have the Graphics, extracted and able to be viewed.

Another Job a later stage, is that would like a simple GUI made, so that the Graphics could be edited, and have the Graphics able to be saved in the compressed format they are, and added back to the game.

Here is a Forum Post, which says what I have tried to do, to establish the compression Format, being used by the Files, which I have not been able to so far and more details about methods etc.

https://zenhax.com/viewtopic.php?f=9&t=1...4350b8c4d8

If anyone is interested, in doing this Coding Job for me preferably in Python, and or want more details about what I wan't doing, could they PM me, or send me an email, to :- [email protected]

I was hoping the Job could be done for 40 Pounds, but please let me know the figure wanted for the Job, if that is too low a price. I would really
appreciate, someone doing this Job for me.

Best Regards

Eddie Winch
Reply
#2
Hello mate,

Could you provide an example of the image you are after?

Further to this, how in depth does your editor need to be?

PAC files are generally little bits of JavaScript code, look up Proxy Auto Configuration on google. It would be better to have a raster file type(Such as JPEG) if its just old 2d pixel art. However that is up to you. let me know regarding the above.

Cheers,
Jamie

Further to this, I believe you would have a much easier time just taking screenshots of the game and then running it through an editor program. Having done some looking into this, it is going to be a lot of work otherwise.
while dad_has_cigs == True:
    happiness = True
    if dad_has_cigs == False:
    print("Dad come home!")
    happiness = not happiness
    break
Reply
#3
Hi jamesaarr,

Many thanks for your useful replies to my Thread, I can't find an example of, the type of image,
I wan't, from the internet. I think the .PAC extension, might be an Hi res Image Atari Graphics format though.

Here are Website Posts, about Quickbms, how to do a scan of Files etc :-

http://aluigi.altervista.org/quickbms.htm

https://zenhax.com/viewtopic.php?t=23

https://zenhax.com/viewtopic.php?t=11534

To start with, I would like to be able, to extract the .PAC Graphics from the game, and be able to view them.

Another Job at a later stage, is that I would like a simple GUI made, so that the Graphics could be edited, and have the Graphics able to be saved in the compressed format they are, and added back to the game.

I have seen Utilities, which can take Screenshots out of games very quickly, so images can be edited out of them, like animget.

But was hoping this way, would work.

Best Regards

Eddie Winch
Reply
#4
Hello Eddie,

I understand what you're after, however I don't think I can offer a fix. Might be an idea to re-post this in the general coding part of the forum.

I think, and I must emphasise this is from the little reading I've done regarding this, it might be better to just save screen captures and then cut out the images you want via photoshop (Or equivalent).

Once you've got the images saved, you could have a set list of possible design options and use the Pillow library to change the colours. However I'd have to do some more research to provide the exact coding.


For example:
#This would set up a basic GUI using the PySimpleGUI Library

import PySimpleGUI as sg #Import the Library
def main(): # Define function start
    sg.theme('DarkAmber') #Choose a theme for the GUI - more options are online just google PySimpleGui

#The block below gives the GUI window a layout, the sg.T refers to text and the button, well, thats a button.
    layout = [[sg.T(" ")],
              [sg.T("Welcome to the  App")],
              [sg.T(" ")],
              [sg.Button("Change Image"),sg.Button("Quit")]]

#This loads up a window and calls the layout defined previously as well as the size of said window. The part below just means that the window can change values of variables and can make events. I normally have this inside a while loop as it means the window stays open!
    while True:
        window = sg.Window("Colour Changer", layout, size =(500,400))
        event,values = window.read()
#This part below just tells the program to stop if the window is closed or if the quit button is pressed.
        if event == sg.WIN_CLOSED:
            break
        elif event == "Quit":
            window.close()
            break
Now what you can do is you can run functions or classes within events which are created by the GUI (For example the quit event mentioned before). You could use a listbox to show the colour options:
[sg.Listbox(values=['Listbox 1', 'Listbox 2', 'Listbox 3'], size=(30, 6))]
or even a slider:
layout = [[sg.Slider(range=(1,500),
         default_value=222,
         size=(20,15),
         orientation='horizontal',
         font=('Helvetica', 12))]]
You can save inputs from the gui to a variable with the below, this is an example from a label maker program I created for work.

  #Opening window layout, this gives us a set of two dropdown menus (combo lists) and saves the chosen options to two keys (sending and receiving)
    layout = [
              [sg.T("")],
              [sg.T("Sending Address")],
              [sg.Combo(['First Address', 'Second Address', 'Third Address'], size=(30,6), key = 'sending')],
              [sg.T(" ")],
              [sg.T("Receiving Address")],
              [sg.Combo(['Fourth Address', 'Fifth Address','Option 3', 'Option 4'],size=(30,6), key = 'receiving')],
              [sg.T(' ')],
              [sg.T(" ")],
              [sg.Button("OK")]]


    window = sg.Window("Label Maker", layout, size=(300,475))
    event, values = window.read()

    while True:
        event, values = window.read()
        if event == sg.WIN_CLOSED:
            break
        elif event == "OK":

#Previously in my program I had a selection of addresses saved to dictionaries, the code would save the key (Explained above) as a variable and then compare that through if statements. 

            sender = values['sending']
            receiver = values['receiving']

            if sender == ("First Address"):
                send_line1 = Pydic.get("line1")
                send_line2 = Pydic.get("line2")
                send_city = Pydic.get("city")
                send_post = Pydic.get("postcode")
So you could have your GUI spit out these Keys and run code blocks to take the image and change it depending on the options chosen. So if they wanted green, they could choose green on the gui, and then it would run the Pillow function to make it green. I'm looking into the Pillow library at the moment, so tell me if this is helping or not :')

Cheers,
Jamie
while dad_has_cigs == True:
    happiness = True
    if dad_has_cigs == False:
    print("Dad come home!")
    happiness = not happiness
    break
Reply
#5
Hi jamesaarr,

Yes your help is very much appreciated, Yes the ideas you have put forward, have been very helpful and useful.

Yes cutting out images, and opening in photoshop etc, is an good idea.

But I don't think via that method, the graphics could be saved once edited, in the correct same .PAC File format, then used
in the game, I may be wrong though ?

Many thanks for all your efforts so far.

Regards

Eddie Winch
Reply
#6
Hello,

There are converter tools out there, but looking into this a bit more, I don't think you can re-insert the picture using Python.

But keep looking, you might find a way
while dad_has_cigs == True:
    happiness = True
    if dad_has_cigs == False:
    print("Dad come home!")
    happiness = not happiness
    break
Reply
#7
(Aug-13-2021, 01:28 PM)jamesaarr Wrote: Hello,

There are converter tools out there, but looking into this a bit more, I don't think you can re-insert the picture using Python.

But keep looking, you might find a way

Yes many thanks for your help with this jamesaarr, I appreciate the help you have given me, very much.

I will let you know, if I make any progress, with what I wan't to achieve.

Best Regards

Eddie Winch
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020