Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - NilG

Pages: [1] 2
1
I've uploaded the demo version for The Sect of Achturan for approval.  I'd actually done a silent upload a month ago and then promptly found a few minor issues that bugged the hell out of me, but this version's pretty solid; the older one can be discarded.

Left in the debugger code for fun.  Any and all feedback/criticism welcome for sure!

2
SCI Syntax Help / Menu Bar Issues
« on: June 21, 2019, 11:02:04 AM »
Hi again, a couple of lingering questions I have (and quite possibly the last I'll have, at least for a while).

I'm encountering two problems/unexpected behaviors with my menu bar options:

1)  As the attached image shows, the text for "Inventory" is screwed up.  I've tried changing this text to Inv and a couple of other things, but for reasons I can't figure out, this particular string is consistently getting mangled regardless of what's in it, while the others seem fine.

2)  When I hit Esc throughout play, my Hints On/Off box pops up.  This should be triggered by Ctrl-H, and I don't see any reason that Esc would also trigger.

My best guess for these issues, of course, is coder error, haha.  This is the init for my MenuBar script, where I assume the problems are:

Code: [Select]
(class TheMenuBar of MenuBar
(properties
state 0
)

(method (init)
(AddMenu { Game_} {About Game`^b:Help`#1:Toggle Hints`^h})
(AddMenu
{ File_}
{Restart Game`#9:Save Game`#5:Restore Game`#7:--! :Quit`^q}
)
(AddMenu
{ Action_}
{Pause Game`^p:Inventory`^i:--!:Retype`#3:Look At`^l:Read`^r:Recall`^e:Ask About`^a:Tell About`^t:--! :Colors`^c}
)
(AddMenu
{ Speed_}
{Change...`^s:--!:Faster`+:Normal`=:Slower`-}
)
(if (DoSound sndSET_SOUND)
(AddMenu { Sound_} {Volume...`^v:Turn Off`#2=1})
else
(AddMenu { Sound_} {Volume...`^v:Turn On`#2=1})
)
(if (< (Graph grGET_COLOURS) 9)
(SetMenu MENU_COLOURS 32 0)
else
(SetMenu MENU_COLOURS smMENU_SAID '/color')
)
(SetMenu MENU_SAVE smMENU_SAID 'save[/game]')
(SetMenu MENU_RESTORE smMENU_SAID 'restore[/game]')
(SetMenu MENU_RESTART smMENU_SAID 'restart[/game]')
(SetMenu MENU_READ smMENU_SAID 'read[/book]')
(SetMenu MENU_HINTS smMENU_SAID 'hint')
(SetMenu MENU_QUIT smMENU_SAID 'done[/game]')
(SetMenu MENU_PAUSE smMENU_SAID 'delay[/game]')
(SetMenu MENU_INVENTORY smMENU_SAID 'all')
)

Does anything look off here that could account for either of these issues?  I've got to be missing something.

3
SCI Syntax Help / Loading External Scripts on the Fly?
« on: June 09, 2019, 09:48:07 PM »
This may be a stupid question, but I've got a couple of rooms that are on the edge in terms of heap space, and it's causing some issues already (like can't open Inventory at times).  The rooms are basically done, but the game itself will probably have more quite a few more global variables and things that will end up pushing them over.  I'm looking into tightening things up, but I was wondering if there is any way to load an external script on the fly?

What I'd really like to do is have, say, one script that deals with 'ask' responses and one that deals with 'look' responses for this room.  I'm trying to account for as much user input as I can, and if I could take even just these two subsets of user inputs and set it in some way that an external script is called when the user 'asks' something then disposed immediately after, for example, I feel like it could go a long way to alleviating heap issues.  It's hacky, but it would get the memory where it needs to be if just the handling of these two inputs could be offloaded and put into memory only on-demand.

I may be grossly misunderstanding things here, but just checking on the possibilities.  I'm looking for ways to legit tighten up and rein in the script as well.  I'm hoping not to have to cut things, though that will probably be the only alternative for at least one of the rooms at this point, if I can't figure something else out, so figured I'd ask at least.

4
SCI Syntax Help / Dialog Box Edges Hiding Objects Behind
« on: June 01, 2019, 12:51:54 PM »
Just going to go for broke and ask this one, slight as it is, since I notice it every time I play through and forays into the two windows scripts haven't made me any smarter.

I've noticed when dialog windows open, they seem to hide objects a few pixels to either side of them.  The attached is an example.

I'm a shitty artist and trying to work around this by creating most background objects as separate views placed onto the scene.  It ain't pretty, but it's prettier than my attempts at vector-based art.

This really isn't a big deal and doesn't affect play at all, I just notice that background objects like the bookcase in the attached get hidden around the left/right sides of each dialog window (showing the yellow wall instead in this case) and was wondering if there's a modification that can be made to prevent this while maintaining pretty much everything else as is about the dialog box?

5
SCI Syntax Help / Music/Playing Note Sticks When Leaving a Room
« on: May 29, 2019, 06:34:22 PM »
I'm finally for real wrapping up the last few things for a demo, and things are working pretty much as expected.  Music's one of those last things, and I've put some in a number of the rooms.  For the most part, all's well, rooms without music shut up, rooms playing different music switch as expected, all that goodness.  I'm finding when I leave one room in particular, though, if there's a particular flute sound playing, the flute note sticks and doesn't unstick until I've reentered the room and the music progresses to that point again.  Even entering different rooms with different music just piles the noise on top, rather than silencing the stuck note.

This "effect" kinda seems like a blast from the past in the Adlib or MIDI synth with some of the older games (this setup here specifically is just using GM), but since this appears to be happening consistently for this room and this one instrument, I was wondering if anyone had any thoughts on how to force it to shut up when the user leaves the room?

6
SCI Syntax Help / Saying Anything But
« on: April 27, 2019, 06:44:35 PM »
Me again,

Another stupid syntax question that I haven't been able to sort through.  I am trying to do something like the following:

(if (and (Said '[/*') (not (Said '/bulb[<green,red]'))) (= takeOrTouch 0) (self handsOff:))

Basically, I would like '/bulb[<green,red]' to get passed up to the locale script, but I still want to specify a response for anything else that is said.  This and various other things I've attempted have given me a bad spec error; I managed to get it almost working with a convoluted use of local variables, but when I do that, I get a "responseless" statement on top of the expected behavior for any other items I have specified in the room prior to the *.  I have a couple of ideas that might sort this latter method out involving pEvent claimed, but again, it already seems convoluted, and I assume there's probably just a straightforward way of doing this.

Besides, this is over time coming to happen in multiple statements across multiple rooms, so I'd rather not dirty up the code all over the place with hacky workarounds when I'm pretty sure I'm just missing some element of the syntax.  I've got enough crappy hacks in my illiterate code.   ::)

Thanks again in advance.

7
SCI Syntax Help / Printing Variable Contents
« on: April 22, 2019, 01:21:24 PM »
Hey all,

Probably a ridiculous beginner question, but I've taken a look a couple of times and just don't know how to print out the contents of a variable, just so I can check what a local or global is set to.  Not looking for anything magic, I just haven't been able to sort the syntax to a Print statement that allows it to print the contents rather than the variable name itself.

So yeah, I think pretty basic, but could be useful in some debugging while wrapping up, and just in better understanding some of the behind-the-scenes behavior.

8
SCI Syntax Help / Parsing Noun/Qualifying Adjective Words
« on: April 04, 2019, 05:07:45 PM »
I encountered something that seemed interesting to me while testing out some of the responses I get to certain inputs, and while I sort of see the reason behind the response, I'm not sure what the reason behind the reason for the response is.   :)

So among multiple look statements, there's one that pretty straightforward:

Code: [Select]
(if (Said '/car,shuttle')
car works fine.  shuttle, however, just prints the basic room response.  After looking a bit, I see this is because "shuttle" is both a noun and a qualifying adjective.  If I remove the "adjective" attribute, it works.

I'd set it as an adjective because you can look at the shuttle door, for example, to differentiate it from looking at a different door.  From what I can tell, things are still working in that regard with shuttle just set to "noun," so all good (I think!).

But now I'm wondering, as I have a few other nouns I've also made qualifying adjectives for similar reasons, could that be problematic down the line?  Do nouns function as qualifying adjectives when used in that way within the said statement?  Is there a reason, in the above example, that 'shuttle' would be taken to be an adjective instead of a noun when there's nothing following it?  'look AT shuttle' works like I'd expect, but 'look shuttle' doesn't.

I've reviewed a few of the pages around here and may have missed it, but haven't seen anything specific to this.  I feel like the word type associations can be fickle, and have had to play around with them in a few places to get things to work for similar reasons.  It always seems to be ultimately manageable, I was just wondering if anyone know why it interprets things in these ways, treating a word like an adjective when it's also a noun and there's nothing else for it to qualify in the input?

9
Hi again,

This may not quite be a syntax question, but I'm encountering a problem with the white control line in one of my rooms.  Previously, I'd had just a very rough mock up of the rooms, and all control lines seemed to work fine.

The past couple of weeks, I've buckled down and started working on actual backgrounds.  All's been great here until working on one outside scene today.  After coming up with an improved-but-still-rough start where I could place the entries (player can go west, south, or in a building on the screen), I went ahead and created control lines to cage the ego in and open passage where desired.

Testing it out, I've found that the south white control line only seems to apply when the player is coming from the south room; that is, if I come from the east or out of the building, the user can skip right over the white line and end up in the south room through any point on the lower end of the screen.  If, on the other hand, the player has just come from the south room, the white line applies and properly keeps the user confined to the room unless the entry area is used.  All of the other lines in this room seem to work as expected regardless of the entry point; it's just this one wall that fails anytime the user comes from one of the other two rooms.

The entry code is identical for all entry points other than positions and loops:

Code: [Select]
(switch gPreviousRoomNumber
            (north
  (gEgo posn: 230 142 loop: 2)
  )
            (west
  (gEgo posn: 25 148 loop: 0)
  )
            (south
  (gEgo posn: 198 185 loop: 3)
 
(else
(gEgo posn: 150 130 loop: 1)
)
)

and the exit code is similarly plain:

Code: [Select]
(method (doit)
(super doit:)
(if (& ctlCYAN (gEgo onControl:))
(gRoom newRoom: 7)
)
(if (& ctlFUCHSIA (gEgo onControl:))
(gRoom newRoom: 5)
)
(if (& ctlYELLOW (gEgo onControl:))
(gRoom newRoom: 6)
)
)


I'm pretty puzzled what the issue could be.  I've redrawn the control lines a few times in a few different positions, but I'm finding the same behavior regardless.  Any ideas what I could be doing wrong here?

10
SCI Syntax Help / Customized Dialogue Windows
« on: February 15, 2019, 10:56:08 AM »
Hi again.  Most of the code for the demo is done (act 1 of a 3 act game).  Still a ton to do, replace edited Sierra backgrounds with original ones, add and pretty up some views, clean up some code (aside from a bit of scripting and the C++ courses I took in high school 20 years ago, I'm not a programmer), and waaaaay too many "responseless" possibilities.  Still, there are two complete positive paths through the end of the section I have, it's been amazingly rewarding, and thank you so much for the help with my absolute beginner's questions.

One thing that isn't necessary, but I'd love to include, and I realize it may require a ton of rewrites or additions, is customized dialogue boxes for conversation, similar to QfG2.  Basically just background and text colors customized depending on who's speaking.  Snail Trek (love it and looking forward to Cascadia Quest) also has something very similar; I don't know that speech bubbles would fit stylistically here, but it is basically that idea.

I've looked at the code and guess what's there can be used to implement this, but as a non-coder, my method for doing so would probably be super convoluted.  Is there any kind of built-in method for the customization of dialogue boxes, or a sample of code that doesn't suck for doing so?  I can certainly add sucky code, but I know many of you have been here for a long time doing these things, so figured I'd ask before tromping ahead recklessly.  :D  Thanks!

11
SCI Syntax Help / Instance Priorities
« on: February 02, 2019, 07:00:00 PM »
I've got another question for you fine folks here about instance priorities.  Basically, I'm not sure how they work to layer instances in a desired manner.

For example, in one of my rooms, the player can open a dresser, which brings up an instance of the openDresser visually on the screen.  No problem there.  Now say the player moves or looks under the clothes.  I switch to a new loop where the clothes are shifted to show the bottom of the drawer, and there's supposed to be a book sitting there.  Functionally, in fact, there is!  But visually, I cannot get the book to appear overtop the dresser instance.  It's initialized but hidden by default; when the clothing is moved, I call show: on it, but no book.

If the drawer's closed and the openDresser instance isn't there, the book shows without issue if I call for it.

I know that instances have Priority properties, and I've imagined this should take control of the layering, but it doesn't seem to matter what I put here; whether the book is a higher priority that the openDresser or a lower, it's just not showing up.

I've seen some similar behavior in other rooms where a couple of instances are stacked on each other; it seems they just appear in some mix of the order they're initialized and displayed in.

Am I off in thinking the instance Priority can be used to direct instance placement relative to one another?  Is this property only applicable to background/Pic priorities?  Is there some other way to prioritizing instances to direct where they show relative to each other?

I know in the above instance I could just add another loop with the book, so it's not like there aren't workarounds, but I'd really like to know if my expectation is off or I'm bungling it up somehow, just so I get it.  Thanks again in advance.

12
SCI Syntax Help / Unlocking Locales and Regions
« on: January 29, 2019, 07:21:45 PM »
Hi again!

As the title suggests, I'm trying to incorporate locales and/or regions in some of my scripts, but I seem to be running into an error; it compiles and the game runs up until the room is loaded, as which point I get the "Oops!" error and a crash.  I've read over the tutorial at http://mtnphil.com/Games/Tutorial/chapter2.html and things look right to me, but I must be missing something.

I've placed the script alias in game.sh:

Code: [Select]
(define LIEVENLOCALE_SCRIPT 750)
and have set up a basic test script:

Code: [Select]
;;; Sierra Script 1.0 - (do not remove this comment)
;
; SCI Template Game
; By Brian Provinciano
; ******************************************************************************
; lieven.sc
; Lieven Locale Script

(script# LIEVENLOCALE_SCRIPT)
(include "sci.sh")
(include "game.sh")
(use "controls")
(use "game")
(use "main")
(use "obj")
 
(instance Lieven of Locale
    (properties)
 
    (method (handleEvent pEvent)
        (super handleEvent: pEvent)
(if (Said 'smell/hands') (Print 1 7))
    )
)

Finally, I've set it in the room:

Code: [Select]
(instance rm001 of Rm
(properties
picture scriptNumber
north 0
east 0
south 0
west 0
)

(method (init)
(super init:)
(self setLocales: LIEVENLOCALE_SCRIPT)
(gEgo posn: 150 147 loop: 1 cel: 0)
(SetUpEgo 1 6)
                etc etc

But no luck yet.  I also tried setting everything as a region with the same result.  Can someone help me see what I'm missing with this?  Thanks in advance.

13
Another question for the SCI gurus, I'm using a switch state to move along an automated scene (perhaps there's a better way to do this, I'm all ears for sure).

Currently, I have the following set up within it.

(2
   (theMessenger posn: 155 160)
               (= seconds 1)
)
(3
   (theMessenger setCycle: Walk setMotion: MoveTo 155 157)
   (= cycles 1)
)
(4
   (theMessenger loop: 0 setMotion: MoveTo 205 143)
   (= seconds 2)
)
(5
   (theMessenger loop: 1 cel: 0)
   (= seconds 2)
)

This works okay, but I'd like to cut out the waiting periods between the states, if possible.  Two issues I'm seeing with this:
    • Setting cycles or seconds to 0 just seems to stop everything entirely, rather than skipping over the waiting period.
    • If I set #4 to something low like 1 cycle, the loop updates even though the movement is still going on, I'm guessing because MoveTo waits for an ok call while loop doesn't.

    So it works, but I have awkward halts between movements and am sure there must be a better way to do this then figuring out the animation cycles required to wait before travel is complete to change loops.

    Is there some alternative to seconds and cycles that waits for the commands to fully be carried out in each state and all called methods to get the ok when necessary, then immediately moves on to the next state?  Or is there another way to do this?  Is a switch state not even the best option?

    Also, while I'm asking, if I'm working an SCI0 parser, it looks like there's no Path Motion method; is the best way to make multiple MoveTo calls like above, or is there some other way to direct a multi-step path?

    Thanks in advance!  Trying to figure things out on my own the best I can, but occasionally getting caught up between the two different scripts, various versions of SCI, and limited documentation.[/list]

    14
    The SCI Companion doc notes that:

    "Both languages can be mixed and matched in the same project (but not the same file), though it is not recommended you do so (but this might be the case if you are converting an old project to the Sierra Script syntax file-by-file)."

    This makes sense, and ultimately I'm shifting everything I'm gathering to Sierra Script, which is my project's overall pref/setting (been working on this with some scripts already, and even just translating from one script to the other is tightening up my grip on the syntax substantially), but it made me curious whether there are specific known risks in mixing/matching the two script types within a single project?  Do certain elements fail to work across them very well?  Or is this not recommended mainly because it just results in more muddled code than we'd want?

    15
    SCI Syntax Help / Printing from Text Resources
    « on: January 15, 2019, 12:24:05 PM »
    Hi All, I have another newbie question.  The forums here, the tutorials, and the SCI Documentation links have all been great, and I've been learning a lot, but it seems like I keep turning around and getting caught up on the simplest of things   :-\

    If I want to Print from a text resource, I believe that I just need to Print (a b) where a is the text resource number and b is the entry.  However, when I try this in my script like so:

          (if (Said 'look>')
             (if (Said '/bed') (Print "5 2"))
             (if (Said '/dresser') (Print "5 4"))
             (if (Said '/floor') (Print (5 7)))
             (if (Said '/rug') (Print (5 9)))

    "bed" and "dresser" correctly display the numbers (I was just making sure the rest of the syntax was alright), but if I try to compile while floor and rug aren't commented out, I receive an "Expected an expression" error.  As the attached shows, I do have a text resource for 005, and it's got 15 entries so far to cover any of the attempted calls.  I tried putting 005 in lieu of 5, though I don't think it should matter, but no luck.

    Do I need to call or reference text resources somewhere before I can use them in the script?  Or am I just doing something all sorts of wrong?  Thanks!

    Pages: [1] 2

    SMF 2.0.14 | SMF © 2017, Simple Machines
    Simple Audio Video Embedder

    Page created in 0.132 seconds with 19 queries.