Author Topic: [Preview] Knossos 0.5.3  (Read 23092 times)

0 Members and 1 Guest are viewing this topic.

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: [Preview] Knossos 0.5.3
Excellent! I don't have much more to add regarding the process over what Axem has already discussed.

I love the idea that we can essentially start mod creation right from Knossos. That's absolutely brilliant and makes modding even a little more accessible. :yes: :yes:

From a UI perspective, feel free to not fuss too much about getting things to look exactly like my mock up. Get the functionality in and I can spend time tweaking the UI to get it Just Right (tm). The idea, at least, is to free you up to work on functionality. :)
« Last Edit: June 28, 2017, 01:12:04 pm by chief1983 »
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Preview] Knossos 0.5.3
@Axem: Being able to change things immediateley before the upload sounds like a good idea.

I think I undestand your structure. You basically have a folder per .vp file and during development FSO loads files directly from that folder (which is why it's listed in secondarylist) and after release the contents will be part of a .vp file which means the directory isn't listed in the release version.
If Knossos allowed you to select a folder for each package, then you could do the same there.

@Cyborg17: Something like this? It should be less cluttered though... I'll think of something.

@mjn: Glad to hear! :)
One of the things I haven't fixed, yet, is that the PLAY/DETAILS/FRED buttons only show on hover because that element is essentially the same thing you see in the other lists.
I've recently restructured the HTML part and split it into multiple files because that single index.html was becoming hard to read through. Most of the HTML code is now in html/templates.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: [Preview] Knossos 0.5.3
Hmm, Knossos is stuck on Loading... when I try to run the latest from github. Do I need to clear a cache somewhere?
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Preview] Knossos 0.5.3
Sorry, there was an issue with Windows paths in the template loading code. If you update your checkout, it should work again.

  

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: [Preview] Knossos 0.5.3
Aha, there we go. Also.. So glad the HTML has been split up! I was thinking the same thing as you were.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: [Preview] Knossos 0.5.3
Would different lighting presets like on wxLauncher be a good idea?  It'd be nice to have a way for mods to include their own recommended settings, and have the option to use those, as well (might already have that, not sure :shrug: )


 
Re: [Preview] Knossos 0.5.3
i get this errror

and fso wont show up

while there's fso


[attachment stolen by Russian hackers]

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Preview] Knossos 0.5.3
@jr2: I've got something like that in mind but I need to make sure that Knossos can actually launch mods first.

You've found two bugs which will be fixed by the next release. FSO doesn't show up because you (probably) didn't use Knossos to install it.
Knossos unfortunately can't use your existing FS2 directory because it needs a specific folder structure. You should select an empty base directory and install the FSO package. If FSO still doesn't show up afterwards, you've found a bug.

 
Re: [Preview] Knossos 0.5.3
Fso runs fred everythime if i trying to run and if i say launch game it will run fred2 not the game
Thats bugg becouse if i set to gameexecuteble it runs fso fredding not actuel game

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: [Preview] Knossos 0.5.3
Fso runs fred everythime if i trying to run and if i say launch game it will run fred2 not the game
Thats bugg becouse if i set to gameexecuteble it runs fso fredding not actuel game

You mean that FSO runs FRED everytime you tried to run. If you say launch game, it runs only FRED2, not the game. It's a bug because if you set FSO game executable, it runs FRED not the actual game itself.

Do you guys know what's the cause?
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 
Re: [Preview] Knossos 0.5.3
Yes you correct
Thats why i to tell

 

Offline Hellzed

  • 28
Re: [Preview] Knossos 0.5.3
I've just taken some time to understand how the JS API in Knossos works.
If I haven't missed anything, I suspect it's currently lacking a bunch of elements before the web-based UI can be completed.


I haven't been doing anything focused or especially useful, but I've experimented with a few things that might come in handy.
The first was injecting more than one object through the QtWebChannel in web.py, like this:
Code: [Select]
objects = {'fs2mod': self, 'Knossos': knossos}
channel.registerObjects(objects)

Then I provided not only functions, but also object properties, through the JS API:
(and if we don't want the JS code to update values in our Python code, we can set pyqtProperty with constant=True, or even make the WebChannel ignore updates from the client script)
Code: [Select]
class MoreStuff(QtCore.QObject):
    onMyPropChange = QtCore.pyqtSignal(str)

    def __init__(self):
        super(Kn, self).__init__()
        self.__myProp = "My Value"

    @QtCore.pyqtProperty(str, notify=onMyPropChange)
    def myProp(self):
        return self.__myProp

    @myProp.setter
    def myProp(self, value):
        logging.debug('Setting myProp to: %s', value)
        self.__myProp = value
        self.onMyPropChange.emit(self.__myProp)

    @myProp.getter
    def myProp(self):
        logging.debug('Getting myProp as: %s', self.__myProp)
        return self.__myProp
       

Now I feel like trying to wrap UI interactions into Promises, and tasks such as downloads and unpacking into ProgressEvent, then see what comes out of it
(I'm thinking about validation of the user input, error handling directly in the web UI if something fails, nicer JS code, and progress bars integrated with the rest of UI...)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent

EDIT: @ngld: If I understand correctly, "self.onMyPropChange.emit(self.__myProp)" houldn't be necessary, but somehow notify=onMyPropChange gets ignored. Any idea ?
« Last Edit: July 03, 2017, 01:36:26 am by Hellzed »

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Preview] Knossos 0.5.3
Do you guys know what's the cause?

The logic for detecting whether an .exe file is FRED or not failed. I'll look into it once I'm done with mod creation since that's more or less a requirement for launch testing.

If I haven't missed anything, I suspect it's currently lacking a bunch of elements before the web-based UI can be completed.
I usually add the required functions/methods whenever I need them. For example, I added the settings related functions when I did the settings screen and I will add more functions while working on the development tab.

It's nice that you're interested in Knossos' JS API but I'm not sure if the things you've been experimenting with are going to be useful.

The first was injecting more than one object through the QtWebChannel in web.py.
I don't think we need more than one object unless it makes sense to seperate the API methods into different namespaces. Renaming fs2mod to knossos makes sense.

Then I provided not only functions, but also object properties, through the JS API:
I'm not sure how that would be useful and I don't think it works with QtWebKit.

Now I feel like trying to wrap UI interactions into Promises, and tasks such as downloads and unpacking into ProgressEvent, then see what comes out of it
(I'm thinking about validation of the user input, error handling directly in the web UI if something fails, nicer JS code, and progress bars integrated with the rest of UI...)
The existing JS interaction is already callback based; you could use Promises by rewriting the call() function in html/js/modlist.js but that would just add more code (unless I misunderstood you).
Error handling rarely happens directly in the JS code since most errors happen in Python code and then are displayed either using a message box or once again in the web UI.
Progress bars for downloading and unpacking are already implemented and the ProgressEvent is completely unrelated to that.

EDIT: @ngld: If I understand correctly, "self.onMyPropChange.emit(self.__myProp)" houldn't be necessary, but somehow notify=onMyPropChange gets ignored. Any idea ?
I don't know since I haven't used PyQt properties before. You have two getters in your example, maybe correcting that helps?

I'm trying to keep the JS API as simple as reasonable since it reduces the chance that (hard to debug) errors related to it occur. Those errors can be especially annoying when QtWebKit is used because it tends to segfault whenever something unexpected happens.

 

Offline Hellzed

  • 28
Re: [Preview] Knossos 0.5.3
If I haven't missed anything, I suspect it's currently lacking a bunch of elements before the web-based UI can be completed.
I usually add the required functions/methods whenever I need them. For example, I added the settings related functions when I did the settings screen and I will add more functions while working on the development tab.

It's nice that you're interested in Knossos' JS API but I'm not sure if the things you've been experimenting with are going to be useful.
No usefulness guaranteed here, it's all out of curiosity !

The first was injecting more than one object through the QtWebChannel in web.py.
I don't think we need more than one object unless it makes sense to seperate the API methods into different namespaces. Renaming fs2mod to knossos makes sense.
No real need for two separate objects indeed, but it was convenient for me in order to have one I can experiment with while not breaking fs2mod.

Then I provided not only functions, but also object properties, through the JS API:
I'm not sure how that would be useful and I don't think it works with QtWebKit.
I haven't tried yet, but according to the doc it's supposed to be exactly the same:
http://doc.qt.io/archives/qt-5.5/qwebframe.html#addToJavaScriptWindowObject

Now I feel like trying to wrap UI interactions into Promises, and tasks such as downloads and unpacking into ProgressEvent, then see what comes out of it
(I'm thinking about validation of the user input, error handling directly in the web UI if something fails, nicer JS code, and progress bars integrated with the rest of UI...)
The existing JS interaction is already callback based; you could use Promises by rewriting the call() function in html/js/modlist.js but that would just add more code (unless I misunderstood you).
Error handling rarely happens directly in the JS code since most errors happen in Python code and then are displayed either using a message box or once again in the web UI.
Progress bars for downloading and unpacking are already implemented and the ProgressEvent is completely unrelated to that.
That's true, that would be a bit more code probably, and a lot of what's doable with Promises is already doable with the callback based API, but there might still be some advantages (I have looked more into the Python side of things for now, a bit les the JS side).

EDIT: @ngld: If I understand correctly, "self.onMyPropChange.emit(self.__myProp)" houldn't be necessary, but somehow notify=onMyPropChange gets ignored. Any idea ?
I don't know since I haven't used PyQt properties before. You have two getters in your example, maybe correcting that helps?

I'm trying to keep the JS API as simple as reasonable since it reduces the chance that (hard to debug) errors related to it occur. Those errors can be especially annoying when QtWebKit is used because it tends to segfault whenever something unexpected happens.
Fixed. I originally added the getter to the snippet as an example and forgot about it.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Preview] Knossos 0.5.3
I've made some progress with the mod creation dialog but now I'm wondering about mod versions.
Originally I inteded to use Semantic Versioning but now I'm not so sure because the instructions don't make too much sense in the context of mods...
I need to enforce some versioning scheme since Knossos needs to be able to compare version numbers. Otherwise detecting updates will be impossible.

Any thoughts or suggestions on that?
I'm considering going with a simple a.b scheme where a is increased for every new release and b is increased for every bugfix release. Of course, whenever a is increased, b is reset to 0. (i.e. 1.0 would be the initial release, 1.2 would be the second bugfix release and 2.0 would be the next major release).


No usefulness guaranteed here, it's all out of curiosity !
Ah, now I understand. Have fun experimenting then.  :D

Fixed. I originally added the getter to the snippet as an example and forgot about it.
Did that fix the problem with the notify signal?

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: [Preview] Knossos 0.5.3
Not so sure it doesn't make sense.  Mods themselves could have a concept of asset compatibility, kind of like ABI/API compatibility.  Other mods dependent on them should be able to rely on minor version changes not breaking anything, but more significant version number changes could involve major asset overhauls and break compatibility with mods depending on their assets.  So, you'd end up needing to have multiple versions of the mod on hand to ensure compatibility of older mods until they can be updated.

A cleanup system capable of keeping track of things only installed as dependencies, and removing them as warranted might also be useful.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Preview] Knossos 0.5.3
I'm not yet sure how I'm going to deal with multiple versions. The last iteration of Knossos did support that but it became an overcomplicated nightmare which is why the current version doesn't support it.
I have a concept in mind which could solve the problem while still being simple enough to maintain. I'm not sure if I'm going to implement it though. I guess it depends on how important multiple versions are going to be.

The cleanup system isn't just useful, it's necessary for updates.

The development tab is slowly taking shape.


It's not exactly pretty and it might be a bit confusing but it's functional. The simple input fields work. You can already create new mods (and uninstall them). You can also add and delete packages. Saving and some of the more complicated input widgets (file selection, flag editor, images, dependencies) are still missing.

 
Re: [Preview] Knossos 0.5.3
My question is why if i runs youer knosses?
and if i tryien to run fso it opens fred instead fso?
Game it self.
How to fix that tell me why is that?

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Preview] Knossos 0.5.3
The logic for detecting whether an .exe file is FRED or not failed. I'll look into it once I'm done with mod creation since that's more or less a requirement for launch testing.

The only way to fix this would be to fix the relevant code which I won't do until the development tab is done because then I'll have to rewrite that part anyway.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: [Preview] Knossos 0.5.3
I've been traveling. I'll pretty up the dev tab when I get home! Looking good
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.