KVonGit / quest-compiler

Archive only - no longer developed
MIT License
1 stars 0 forks source link

CSS #9

Closed KVonGit closed 2 months ago

KVonGit commented 3 months ago

The style doesn't match the style in the Quest player.

The background color, a couple of the panes color (meaning the text color), and other stuff with link colors sometimes.

The panes are off, like the tables don't line up, and the second object in the place and objects pane has text you can't see and it's over to the right of the first object.

Probably need to check all the elements' class and id names against whatever the functions are thinking their names are. I feel that's the issue with most of this, but that's pure conjecture.

KVonGit commented 3 months ago

Thanks to Raist, quite a few missing CSS sheets have now been added to the unofficial release.

Things look much better, but there are still a few wrinkles to iron out.

KVonGit commented 3 months ago

Found one issue in style.css concerning the panes.

.ui-accordion-header {
    background:black !important;
    border: 1px solid gray !important;
    padding: 3px !important;
}

That's what sets the compass label and places and objects label's stuff.

I added a line to style.css in my test game folder to make the text white, just to get things where you can see them with default settings.

.ui-accordion-header {
    background:black !important;
    color:white !important;
    border: 1px solid gray !important;
    padding: 3px !important;
}

image

KVonGit commented 3 months ago

I hate to stop while finding fixes, but I have quite the itinerary today.


Note that the CSS sheets that are loaded are just the beginning. There are literally at least 100 instances in the game's code where it uses JS to change style settings on all sorts of stuff.

Also note that it sucks trying to use the dev tools to mess with the style in the game panes because the games panes are hidden whenever the display width of the game gets too narrow. (Maybe I should move my dev tools from the side to the bottom. Doh!)

tass23 commented 3 months ago

I hate to stop while finding fixes, but I have quite the itinerary today.

Note that the CSS sheets that are loaded are just the beginning. There are literally at least 100 instances in the game's code where it uses JS to change style settings on all sorts of stuff.

Also note that it sucks trying to use the dev tools to mess with the style in the game panes because the games panes are hidden whenever the display width of the game gets too narrow. (Maybe I should move my dev tools from the side to the bottom. Doh!)

Another annoying thing happens if you try to use dev tools to look at code for an Object in the GamePane. You can hover over it for a few seconds and it's active, then it jumps back to the main Inventory tag. Not a huge deal and it's not causing any trouble that I can see.

tass23 commented 3 months ago

Ewwww.... No scrollbar, can't scroll to the rest of the gamepane. I'll have to update the CSS for the compiler for this tag after you get the next compiler updated and I'll see how it goes before posting it back for a push.

html_1

Removing the check from the Game ->Interface "Show custom pane" box removes the blue bar at the top, so that saves some space. html_2

Also, Dev Tools said this: invoke is blindly sending 'parameters': What does that mean? Is this why Amber is broken?

EDIT: Yep, that's why Amber is broken. When you hire Martika, everything is fine. As soon as you hire Amber, "invoke is blindly sending parameters", and Amber 's stats never update, (in spite of them showing as having changed in the Debugger anyway, and the changeScripts have all been added).

KVonGit commented 3 months ago

Another annoying thing happens if you try to use dev tools to look at code for an Object in the GamePane. You can hover over it for a few seconds and it's active, then it jumps back to the main Inventory tag. Not a huge deal and it's not causing any trouble that I can see.

I think this is because something in the pane updates every time an attribute changes in your game. So it is like putting a whole new status pane on screen every few seconds (or something?).

That would explain the behaviour you describe.


Removing the check from the Game ->Interface "Show custom pane" box removes the blue bar at the top, so that saves some space.

Yeah, I was gonna say it looks like you immediately move that DIV out of that status pane when you create it anyway.


Also, Dev Tools said this: invoke is blindly sending 'parameters': What does that mean? Is this why Amber is broken?

Well... That is what this whole thing is about: https://github.com/KVonGit/quest-compiler/issues/4

And sometimes that pops up and it doesn't matter. Like, depending on 100 things, sometimes it can blindly send parameters and everything works fine. In fact, there is usually a game-crashing error that pops up directly after that when things don't work fine.

There's no telling, though. I bet a nickel it's a text processor thing that is slightly different in her code. Not an error on your behalf, probably. It's just that the text processor is what uses invoke more than anything else.

Anyway, I believe I might have found a good invoke function whilst digging through the textadventures/quest repo today. More on this as it comes in....


No scrollbar, can't scroll to the rest of the gamepane. I'll have to update the CSS for the compiler for this tag after you get the next compiler updated and I'll see how it goes before posting it back for a push.

I'm not planning on messing with any CSS files any time soon. Plus, I just updated files with a new release. NOTE: Make sure to get the zip of any new release when available. If I upload a new zip, that means I changed something in the hard-coded parts of the converter. Just updating your game.js won't do the trick when I upload new zips of unofficial releases. (Not accusing you, just pointing that out as I haven't before I don't think.)


I might test this new invoke() function I found before bed, if I can stay awake, haha.

I will either be back shortly or in the morning.

KVonGit commented 3 months ago

I might test this new invoke() function I found

It didn't work with the text processor functions, of course.

image


No errors in the dev tools console, either.

So, undoing that change out of the test game.

That makes it the 1,245th time that invoke() and the text processor stuff have defeated me in battle. Have I complained about invoke() and the text processor stuff yet? Because I don't like either one of them. They pick on me.

Here's a million dollar question: if you open your game file to edit it in your version of Quest rather than the real Quest 5.8, then publish a game from your Quest, then convert it using the most recent unofficial release of the converter, does everything work better?

You research that, if you get bored and have the free time. I gotta go rest my eyes and my logic circuits.

tass23 commented 3 months ago

So, I downloaded the latest compiler master, ran VS to build a new release, there's no exe in the Debug folder. I should point out that I have never used VS to build anything. Am I missing a file or something? Note: I am on .dotNet 4.8.

I changed the Output Type to Windows Application, but I see this error though: program does not contain a static 'Main' method suitable for an entry point

Application_1

EDIT: I tested your idea using the QuestCompiler.exe inside the Compiler folder instead, and we have a MID problem:

Uncaught TypeError: text is undefined
    Mid file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:2618
    ProcessTextCommand_Object file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:25679
    object: file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:4012
    invoke file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:2086
    ProcessTextCommand file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:25348
    ProcessTextSection file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:25333
    ProcessText file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:25297
    OutputText file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:25200
    ShowRoomDescription file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:24655
    _temp_assignfn file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js line 3293 > eval:7
    invoke file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:2088
    _temp_assignfn file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js line 3293 > eval:11
    invoke file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:2088
    ShowMenuResponse file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:23296
    ASLEvent file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/game.js:1169
    onclick file:///C:/Users/Adam/Desktop/TE-To Kill A Mongbat (NPC)/Compiled/index.html:1

The line in question:

function Mid(text, start, count) {
    return text.substr(start - 1, count);
}

This happens after you click Yes/No to start the game and the "second" page loads to actually start playing (where you see Susan and can speak to her).

EDIT 2: If I try to Speak to Susan, I can and I can hire Martika, her stats update, and Amber's do not.

KVonGit commented 3 months ago

You shouldn't need to build it.

Look in QuestCompiler/bin/UnofficialReleases

On phone now. Will semd link soon.

Also, I don't build the Debug. I switch that dropdown to Release to build it.

I'll make a short video tutorial today.

On Thu, Aug 15, 2024, 6:37 AM Raist @.***> wrote:

So, I downloaded the latest compiler master, ran VS to build a new release, there's no exe in the Debug folder. I should point out that I have never used VS to build anything. Am I missing a file or something? Note: I am on .dotNet 4.8.

I changed the Output Type to Windows Application, but I see this error though: program does not contain a static 'Main' method suitable for an entry point Application_1.jpg (view on web) https://github.com/user-attachments/assets/b4b4e4eb-8a1a-4bde-bddf-e94e5856f27e

— Reply to this email directly, view it on GitHub https://github.com/KVonGit/quest-compiler/issues/9#issuecomment-2291117296, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJ4OVKG7CSJSA5ESDDOJHLZRSHJLAVCNFSM6AAAAABMPSZDYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJRGEYTOMRZGY . You are receiving this because you authored the thread.Message ID: @.***>

tass23 commented 3 months ago

Okay, I used that version of the Compiler and it says invoke is blindly sending 'parameters': again. (I added the fix to that version of playercore.js too) So only you have the working version of Amber's code.

KVonGit commented 3 months ago

CSS

This seems to work with no problems in a converted game:

function setBackground(col) {
    $("#gameBorder").css("background-color", col);
    $("#gamePanel").css("background-color", col);
    $("#gridPanel").css("background-color", col);
}

A converted game doesn't need colourNameToHex() or hexToRgb.

KVonGit commented 3 months ago

Okay, I used that version of the Compiler and it says invoke is blindly sending 'parameters': again. (I added the fix to that version of playercore.js too) So only you have the working version of Amber's code.

Continuing this bit of the discussion here: https://github.com/KVonGit/quest-compiler/issues/10

(No worries. Just trying to keep the different issues separated. That way, we can use the issues here for reference in the future.)

KVonGit commented 3 months ago

I tested your idea using the QuestCompiler.exe inside the Compiler folder instead, and we have a MID problem:

That one doesn't work.

This is where to always get the up-to-date compiler: https://github.com/KVonGit/quest-compiler/tree/master/QuestCompiler/bin/Unofficial%20Release

Right now, the current unofficial release is this: https://github.com/KVonGit/quest-compiler/raw/master/QuestCompiler/bin/Unofficial%20Release/Quest%20Compiler%20Unofficial%20Release.6.5.8992.36624.zip

KVonGit commented 3 months ago

I changed the Output Type to Windows Application

Goo googly goo! Don't do that, or it won't work. hehehe


I should point out that I have never used VS to build anything.

Haha, yeah.. This and Quest are the only two I've ever messed with in VS.

TIP: Never ever change anything from within Visual Studio when working with this (or Quest itself), ever, unless you either know exactly what you are doing and everything that it will effect OR if you simply don't care if things break because you like to learn by trial and error.

I'll make a short video showing how to build this in VS sometime today, just for future reference.

KVonGit commented 3 months ago

simply don't care if things break because you like to learn by trial and error

This is my usual method, by the way. Bwahahahaha!

KVonGit commented 3 months ago

Here is a link to the wiki page I just made which has a video concerning building this project in Visual Studio:

https://github.com/KVonGit/quest-compiler-6_5-help/wiki/Building-Quest-6.5-in-VS-Community-2022