OurJud wrote:I want to go for the classic look - like the text adventures of old that I used to play in my bedroom as a teenager - so am doing away with all the bumpf on the right of the screen. That means no compass, no inventory, etc etc.
First off, I'm irritated by the default prefixes. I don't want a 'You are in...' because I write that in my description.
Nor do I want the list of objects to be auto displayed, as I will include them in my description too.
Nothing in my description is a link, and the player would simply type commands such as 'enter bedroom', 'get notebook', 'enter bathroom' to progress.
s = " <b>> </b><input type=\"text\" id=\"txtCommand\" onkeydown=\"return commandKey(event);\" style=\"width: 50%; height: 24pt; font-size: 10pt; font-weight: light; outline: none; background: transparent; border: none;\" autofocus><a id=\"endWaitLink\" onclick=\"endWait();\" class=\"cmdlink\" style=\"display: none\">Now press a key</a>"
JS.eval ("$('#txtCommandDiv').html('" + s + "')")
<script>document.getElementById('txtCommandDiv').innerHTML = ' <b>> </b><input type="text" x-webkit-speech="" id="txtCommand" onkeydown="return commandKey(event);" style="width: 50%; height: 14pt; font-size: 10pt; font-weight: light; outline: none; background: transparent; border: none;" autofocus><a id="endWaitLink" onclick="endWait();" class="cmdlink" style="display: none"> press a key</a>';</script>
<style type = "text/css">
a.cmdlink {
color: brown;
}
</style>
request (Hide, "Location")
JS.eval ("$('#gameBorder').click(function() { if ($('#txtCommand').css('display') != 'none') { $('#txtCommand').focus(); }});")
msg ("{CSS.custom}")
#txtCommand { border-left: 1px solid #ccc; border-top:0; border-right:0; border-bottom:0; }
OurJud wrote:I'm just grateful to be getting attention on this
I'm my own worst enemy and refuse to 'get on' with other things until I've got inconsequential issues sorted out first. I could be building the damn game, instead of worrying about the way it looks - the look can come later, but try telling my brain that.
<!--Saved by Quest 5.5.5328.26617-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="retro">
<gameid>cc5e4324-4bc5-41af-b9d6-c763439aae53</gameid>
<version>1.0</version>
<firstpublished>2014</firstpublished>
<css>
<![CDATA[
<style type="text/css">
div#txtCommandDiv {
border:none;
font-size:12pt;
font-family:Georgia, serif;
}
input#txtCommand {
outline:none;
border:none;
font-size:16px;
margin:0;
padding:0;
}
</style>
]]>
</css>
<start type="script">
</start>
</game>
<function name="InitUserInterface">
<![CDATA[
JS.eval("$('#txtCommandDiv').prepend('> ')");
request(SetInterfaceString, "TypeHereLabel=")
OutputTextNoBr(game.css)
]]>
</function>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
Silver wrote:Tea? English and perhaps Northern then?
<style type="text/css">div#txtCommandDiv {border:none; font-size:12pt; font-family:Georgia, serif; } input#txtCommand { outline:none; border:none; font-size:16px; margin:0; padding:0; }</style>
JS.eval ("$('#txtCommandDiv').prepend('> ')")
request (SetInterfaceString, "TypeHereLabel=")
OutputTextNoBr (game.css)
OurJud wrote:Now THAT'S what I need. That the level of hand-holding I'm talking about.
However, the CSS box will not expand and when I try to paste the CSS in there, all I get is<style type="text/css">
The Pixie wrote:1. Create an attribute containing the CSS
Go to game, Attributes tab, Attributes section (lower half) click on add, type "css" (no quotes). Copy-and-paste this text into the text box at the bottom, under where it says string (the box should expand to fit it).<style type="text/css">
div#txtCommandDiv {
border:none;
font-size:12pt;
font-family:Georgia, serif;
}
input#txtCommand {
outline:none;
border:none;
font-size:16px;
margin:0;
padding:0;
}
</style>
2. Create a function
Right click in the left pane, and select add function. Give it the name "InitUserInteface" (same capititalisation, no quotes or spaces, note two capitical 'i'). Bottom of the stuff on the left is Script. Click on the seventh icon (Code view). You should now get a text box below. Copy-and-paste this in:JS.eval ("$('#txtCommandDiv').prepend('> ')")
request (SetInterfaceString, "TypeHereLabel=")
OutputTextNoBr (game.css)
Hopefully that will do it.
max-width: 1000px;
Silver wrote:Cool. I'm none the wiser.
<!--Saved by Quest 5.5.5328.26617-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="retro">
<gameid>cc5e4324-4bc5-41af-b9d6-c763439aae53</gameid>
<version>1.0</version>
<firstpublished>2014</firstpublished>
<css>
<![CDATA[
<style type="text/css">
div#txtCommandDiv {
border:none;
font-size:12pt;
font-family:Georgia, serif;
}
input#txtCommand {
outline:none;
border:none;
font-size:16px;
margin:0;
padding:0;
}
</style>
]]>
</css>
<start type="script">
</start>
</game>
<function name="InitUserInterface">
<![CDATA[
JS.eval("$('#txtCommandDiv').prepend('> ')");
request(SetInterfaceString, "TypeHereLabel=")
OutputTextNoBr(game.css)
]]>
</function>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="retro">
<gameid>cc5e4324-4bc5-41af-b9d6-c763439aae53</gameid>
<version>1.0</version>
<firstpublished>2014</firstpublished>
<css><![CDATA[
<style type="text/css">
div#txtCommandDiv {
border:none;
font-size:12pt;
font-family:Georgia, serif;
}
input#txtCommand {
outline:none;
border:none;
font-size:16px;
margin:0;
padding:0;
}
</style>
]]></css>
<start type="script">
</start>
</game>
<function name="InitUserInterface">
<![CDATA[
JS.eval("$('#txtCommandDiv').prepend('> ')");
request(SetInterfaceString, "TypeHereLabel=")
OutputTextNoBr(game.css)
]]>
</function>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<asl>
(your entire mass of game code)
</asl>
<library>
(your entire mass of library~'patch'~'expansion pack' code)
</library>
<asl>
<include ref="English.aslx" />
<include ref="Core.aslx" />
(your entire mass of game code)
</asl>
<asl>
<include ref="English.aslx" />
<include ref="Core.aslx" />
<include ref="Pixie's Simple Combat.aslx" />
(your entire mass of game code)
</asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
(your entire mass of game code)
</asl>
<game name="blah">
(Attribute code lines)
</game>
<game name="blah">
<gameid>an_algorithm_generated_unique_string</gameid>
<version>1.0</version>
<firstpublished>2014</firstpublished>
</game>
<game name="blah">
<gameid>an_algorithm_generated_unique_string</game>
<version>1.0</version>
<firstpublished>2014</firstpublished>
<author>HegemonKhan</author>
<description>the 'blah' game</description>
<subtitle>blah blah</subtitle>
<difficulty>easy</difficulty>
<cruelty>easy</cruelty>
<pov type="object">player</pov>
<start type="script">
character_creation_function
</start>
</game>
<game name="blah">
<gameid>an_algorithm_generated_unique_string</game>
<version>1.0</version>
<firstpublished>2014</firstpublished>
<author>HegemonKhan</author>
<description>the 'blah' game</description>
<subtitle>blah blah</subtitle>
<difficulty>easy</difficulty>
<cruelty>easy</cruelty>
<pov type="object">player</pov>
<start type="script">
character_creation_function
</start>
<css><![CDATA[
<style type="text/css">
div#txtCommandDiv {
border:none;
font-size:12pt;
font-family:Georgia, serif;
}
input#txtCommand {
outline:none;
border:none;
font-size:16px;
margin:0;
padding:0;
}
</style>
]]></css>
</game>
<game name="blah">
<gameid>an_algorithm_generated_unique_string</game>
<version>1.0</version>
<firstpublished>2014</firstpublished>
<author>HegemonKhan</author>
<description>the 'blah' game</description>
<subtitle>blah blah</subtitle>
<css><![CDATA[
<style type="text/css">
div#txtCommandDiv {
border:none;
font-size:12pt;
font-family:Georgia, serif;
}
input#txtCommand {
outline:none;
border:none;
font-size:16px;
margin:0;
padding:0;
}
</style>
]]></css>
<difficulty>easy</difficulty>
<cruelty>easy</cruelty>
<pov type="object">player</pov>
<start type="script">
character_creation_function
</start>
</game>
<function name="InitUserInterface"><![CDATA[
JS.eval("$('#txtCommandDiv').prepend('> ')");
request(SetInterfaceString, "TypeHereLabel=")
OutputTextNoBr(game.css)
]]></function>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="blah">
<gameid>blah</gameid>
<gameid>an_algorithm_generated_unique_string</game>
<version>1.0</version>
<firstpublished>2014</firstpublished>
<author>HegemonKhan</author>
<description>the 'blah' game</description>
<subtitle>blah blah</subtitle>
<difficulty>blah</difficulty>
<cruelty>blah</cruelty>
<pov type="object">player</pov>
<start type="script">
character_creation_function
</start>
<css><![CDATA[
<style type="text/css">
div#txtCommandDiv {
border:none;
font-size:12pt;
font-family:Georgia, serif;
}
input#txtCommand {
outline:none;
border:none;
font-size:16px;
margin:0;
padding:0;
}
</style>
]]></css>
</game>
<verb>
<property>blah</property>
<pattern>blah</pattern>
<defaultexpression>blah</defaultexpression>
</verb>
<function name="character_creation_function">
// script lines
</function>
<command name="blah">
<pattern>blah</pattern>
<script>
// script lines
</script>
</command>
<object name="orc">
<inherit name="editor_object" />
</object>
<function name="InitUserInterface"><![CDATA[
JS.eval("$('#txtCommandDiv').prepend('> ')");
request(SetInterfaceString, "TypeHereLabel=")
OutputTextNoBr(game.css)
]]></function>
<function name="blah">
// script lines
</function>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_object" />
</object>
</object>
</asl>
Silver wrote:Erm, if I did that I'd delete my entire game lol. You also don't have a unique game id anymore...
OurJud wrote:"Silver"
Erm, if I did that I'd delete my entire game lol. You also don't have a unique game id anymore...
Which is why I said make sure you do it with a test game
So what's the ID thing, then? Is it important I have a unique one? Do I need to do something before I get too far into the build of my game?
Silver wrote:"OurJud"
[quote="Silver"]Erm, if I did that I'd delete my entire game lol. You also don't have a unique game id anymore...
Which is why I said make sure you do it with a test game
So what's the ID thing, then? Is it important I have a unique one? Do I need to do something before I get too far into the build of my game?
jaynabonne wrote:"Silver"
Surely there's just some code I need to replace, not bloody well all of it?
Just the two parts I mentioned: the InitUserInterface function and the css attribute on the game object.
OurJud wrote:I just hit the 'generate' button along side the ID. I hope that will have achieved the same affect.
jaynabonne wrote:Hmm. That is a problem. Ok, plan B.
Attached is a library. Add it to your game, and it will set the style for you.
To do that, copy the library to your game folder. Then go to Add -> Advanced -> Library.
Click the drop down list and and find "retrostyle.aslx". Select that, and it will be added,
Save and reload your game.
That's it!
OurJud wrote:Have you tried inserting the whole block right into the CSS file as I did it? I mean with a test game, just to see if it works that way. It did for me.
Silver wrote:
Okay, it doesn't work for me. I've yet to get round to disabling the parser whilst I have the click to continue stuff going on which has worked in my favour here I think because I didn't see the parser appear at first like I normally would with that bug, and then I did. So I'm guessing the reason it doesn't work is because my 'clear screen' clears the css like you suggested might happen elsewhere?
jaynabonne wrote:"Silver"
Okay, it doesn't work for me. I've yet to get round to disabling the parser whilst I have the click to continue stuff going on which has worked in my favour here I think because I didn't see the parser appear at first like I normally would with that bug, and then I did. So I'm guessing the reason it doesn't work is because my 'clear screen' clears the css like you suggested might happen elsewhere?
Try this library instead. It has an override for ClearScreen as well that resends the css.