DevTools - Easy availableWeapons generator

Wouldn't Django be a good option in this case?
django would be a overkill for this small program after all django is for making complex dynamic websites with tons of webpages like php while i am just making a simple webpage application also it would kill my simple application portability as if someone wanted to use it locally he would need to have python installed as downloading the html,css,jss files would not be enough and he probably would need a webserver to interact with python and the website because django is a webserver backend language.
 
Last edited:
Made a command line version for users with no desktop environment in pure python currently learning vb net and c# to remake it and lol still trying to figure out how to align the checkbuttons in css. bootstrap did not really help so i will try to come up with diff solution.

complied with pyinstaller

Download:
windows = DevTools_CLI.exe
linux = DevTools_CLI

python source script: DevTools_CLI.py
 

Attachments

  • DevTools_CLI.py
    4 KB · Views: 512
Nice!
A web version would probably be even more accessible, as Janno pointed out using bootstrap is pretty simple, don't hesitate to ask for help!

As for the code, it serves its purpose, however, I would consider thinking ahead and making it easy to work with when incorporated in other projects, in the future you might want to add this as a feature (like what Janno did with the maps project) and maybe add Pictures of each weapon etc... for example, your availableWeapons list, is just a string, putting a single element inside of a list as a string serves no real purpose in this case, in a list you could map each weapon name to a corresponding "state" for example:
Python:
availableWeapons = ''
state = (0, 1, 2)
weaponSet = [
    ["Knife", state[0]],
    ["M1911A1", state[2]],
    ["USSOCOM", state[2]],
    ["M590", state[1]] # etc...
]

for v in weaponSet:
    availableWeapons += str(v[1])
   
print(availableWeapons)

and the output:
0221

With something like this you could in the future, map an image URL, setting presets for game types or anything you want really. If you are working on GUIfying the whole config, always think how to make things easier to work with on the back-end as well.
In general though good job man! converting this to JS/CSS/HTML shouldn't be too difficult, Good luck!
 
Last edited:
Back
Top