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 - Doan Sephim

Pages: [1] 2 3 ... 5
SCI Syntax Help / SCI0 - Death Icon always set to loop indefinitely
« on: January 21, 2021, 09:42:20 PM »
I'd like to have some more flexibility with the death handler icon, if possible. It seems to be set to always cycle forward indefinitely.

Is there a way for me to just run the Cels ONCE, like you can do with setCycle: End.

The Method is here, but it's not clear to me how to allow a choice between cycling once or infinite:
Code: [Select]
(instance deadIcon of DCIcon

(method (init)
(super init:)
(if (== gRoomNumberExit 540)
(= cycler (End new:))
(cycler init: self)

SCI Syntax Help / SCI0 - Icon location in Print window
« on: January 21, 2021, 09:07:17 AM »
The default position on an icon in a window is top left. Is there an easy way to manipulate this? All I really would like to do would be able to center it in the y-axis. Keeping it on the left is fine, but it looks wrong in my death window.

SCI Syntax Help / [SOLVED] SCI0 - Death Icon at Top of Window
« on: January 11, 2021, 08:40:28 AM »
Does anyone have any ideas how I can edit the Template to display the death icon at the top of the window instead of always on the left-hand side? Ideally, I'd like to be able to switch this, but I'm having trouble finding out even where to look.

SCI Syntax Help / [SOLVED] SCI0 - Autosave
« on: December 27, 2020, 10:42:15 AM »
How difficult would it be to create an autosave function that runs whenever the player enters a new room?

Ideally, it would always replace the previous autosave file and be located at the top of the restore window with the name "autosave"

I'm looking in the Game script and found the Save method, but I'm not sure how to call this method without producing a window. I'd like this to go on "behind the scenes," as it were.

Code: [Select]
(method (save &tmp [strDescBuf 20] gameNum oldCursor hSound)
(Load rsFONT gSaveRestoreFont)
(Load rsCURSOR gLoadingCursor)
(= oldCursor (self setCursor: gNormalCursor))
(= hSound (Sound pause: 1))
(if (GetSaveDisk TRUE)
(if gPrintDlg (gPrintDlg dispose:))
(= gameNum (Save doit: @strDescBuf))
(if (!= gameNum -1)
(= oldCursor (self setCursor: gLoadingCursor 1))
(not (SaveGame objectName gameNum @strDescBuf gVersion))
{Your save game disk is full. You must either use another disk or save over an existing saved game.}
(self setCursor: oldCursor (HaveMouse))
(GetSaveDisk FALSE)
(Sound pause: hSound)

Not having a feature like this isn't a big deal and I place a low priority on implementing it, but it certainly would be nice!

I'm going to experiement with this bit of code here, but if anyone has better ideas or guiding thoughts, let me know.

Code: [Select]
(SaveGame objectName gameNum @strDescBuf gVersion))

SCI Syntax Help / [SOLVED] SCI0 - Variables that aren't reset by Restore
« on: December 12, 2020, 12:39:56 PM »
Is it possible to tweak Restore in such a way that it doesn't reset certain variables?

Code: [Select]
(method (restore &tmp gameNum oldCursor hSound)
(= gameNum  -1)
(Load rsFONT gSaveRestoreFont)
(Load rsCURSOR gNormalCursor)
(Load rsCURSOR gLoadingCursor)
(= oldCursor (self setCursor: gNormalCursor))
(= hSound (Sound pause: 1))
(if (GetSaveDisk TRUE)
(if gPrintDlg (gPrintDlg dispose:))
(= gameNum (Restore doit: &rest))
(if (!= gameNum -1)
(self setCursor: gLoadingCursor)
(if (CheckSaveGame objectName gameNum gVersion)
(gCast eachElementDo: #dispose)
(gCast eachElementDo: #delete)
;(= saved 1)
;(FormatPrint {Saved %u} saved)
        (RestoreGame objectName gameNum gVersion)

This is in the "Game" script and I have set a test global variable there "(saved =1)" and I test a print to make sure it works before the "RestoreGame" is called. I do get confirmation that the variable is set to 1 before the restore, but after the restore it is predictably set back to its original value.

I looked everywhere in vain to find where "RestoreGame" is set up. It looks like a procedure to me, but I can't find it anywhere.

SCI Syntax Help / SCI01 Game Using SCI0 Template?
« on: December 11, 2020, 08:32:07 AM »
Quick counter-intuitive question: Is it possible to make an SCI01 game using the standard SCI0 Template?

I know it's counter-intuitive and it'd make more sense just to use the SCI01 Template that Eric has provided, but not being a programmer and there being no tutorials or anything for the SCI01 template, I have found it to be too difficult for me.

That being said, the additional 9000 byte increase in heap space SCI01 offers is something that would make my life a lot easier!

So the question is, can I get that heap while also using the older SCI0 Template?

Collector put together a page for reviews on the Wiki for Betrayed Alliance.

If you could take a minute to leave a review here, I will update the wiki with your review!


SCI Syntax Help / Old SCI0 Template Save Bug
« on: July 05, 2020, 08:41:08 PM »
While patching the old project (Betrayed Alliance book 1) I've run into a Save issue that I have also found in all the old fan games I've seen. If you run out of save spots, and save over a different file, sometimes I've experienced restoring that file only to discover that the new save did not overwrite the old.

I looked at the code for this, but the problem wasn't obvious to me.
Code: [Select]
(method (save)
(var strDescBuf[20], gameNum, oldCursor, hSound)
        Load(rsFONT gSaveRestoreFont)
Load(rsCURSOR gLoadingCursor)

= oldCursor (self:setCursor(gNormalCursor))
= hSound (Sound:pause(1))
(send gPrintDlg:dispose())
= gameNum (Save:doit(@strDescBuf))
(if(<> gameNum -1)
= oldCursor (self:setCursor(gLoadingCursor 1))
(if(not SaveGame(objectName gameNum @strDescBuf gVersion))
"Your save game disk is full. You must either "+
"use another disk or save over an existing saved game."
#font 0
#button "OK" 1
(self:setCursor(oldCursor HaveMouse()))
Any thoughts?
Also, I know no one still uses the old template, and I am moving on from it myself for the next project. So these problems I'm experiencing with the old template will soon be no more!

SCI Syntax Help / Sierra Script Conversion Issues
« on: June 29, 2020, 08:27:57 AM »
A while ago I migrated my Betrayed Alliance 2 project from ye old Studio Script to the Shiny New Sierra Script. It took me a while to go through all the error messages, but it got done and everything compiled nicely!

But, I went to make a quick change to my Main Script, and when I compiled, I got A TON of errors! I've changed all the "TRUE's" to "true" and "FALSE's" to false, but there are a number of issues I don't understand. So my first question is, was there an Sierra Script update memo I missed and my other question is, HELP!?!

  [Error]: Undeclared identifier 'rsFONT' .  Line: 332, col: 8
  [Error]: Undeclared identifier 'rsCURSOR' .  Line: 334, col: 8
  [Error]: Undeclared identifier 'rsCURSOR' .  Line: 335, col: 8
  [Error]: Undeclared identifier 'rsCURSOR' .  Line: 336, col: 8
  [Error]: Undeclared identifier 'SET_CURSOR_VISIBLE' .  Line: 338, col: 35
  [Error]: Undeclared identifier 'SET_CURSOR_VISIBLE' .  Line: 341, col: 29
  [Error]: Undeclared identifier 'gtTIME_OF_DAY' .  Line: 390, col: 29
  [Error]: Undeclared identifier 'rsFONT' .  Line: 424, col: 8
  [Error]: Undeclared identifier 'rsFONT' .  Line: 425, col: 8
  [Error]: Undeclared identifier 'rsCURSOR' .  Line: 427, col: 8
  [Error]: Undeclared identifier 'rsCURSOR' .  Line: 428, col: 8
  [Error]: Undeclared identifier 'rsCURSOR' .  Line: 429, col: 8
  [Error]: Undeclared identifier 'NULL' .  Line: 440, col: 3
  [Error]: Undeclared identifier 'FALSE' .  Line: 455, col: 35
  [Error]: Undeclared identifier 'evKEYBOARD' .  Line: 480, col: 10
  [Error]: Undeclared identifier 'miFREEHEAP' .  Line: 498, col: 18
  [Error]: Undeclared identifier 'miLARGESTPTR' .  Line: 499, col: 18
  [Error]: Undeclared identifier 'miFREEHUNK' .  Line: 500, col: 22
  [Error]: Undeclared identifier 'miLARGESTHUNK' .  Line: 501, col: 18
  [Error]: Undeclared identifier 'evSAID' .  Line: 509, col: 25
  [Error]: Undeclared identifier 'grGET_COLOURS' .  Line: 762, col: 16
Compiling failed.
30 errors, 8 warnings.

Everything-Else / Covid anxiety
« on: March 30, 2020, 11:40:46 PM »
I don't know about all of you guys, but I've been watching and worried about this thing for a while. My wife was low-key upset with me when I said we should get supplies about a week before shortages, but thankfully she did so anyway. She apologized later, of course.

As a teacher at a lap-top school, I'm happy to be in a job that can work from home and get a reliable pay check. Being at home, working, and taking care of 3 small kids is a lot to do, but I do have my side projects, as many of you know here.

Yet, with all that's happening, the projects I have have never felt more hollow to me. In the limited time I have I get excited to work and brainstorm, but reality pulls me down and zaps me of motivation. Creating things has always been something that brings me a personal joy, which is why I stick to it...but I have to admit, it's been difficult lately. Writing is hard, I feel like I'm somehow getting worse at art (which alarms me!), and working on a EGA parser-based game "just because" feels weird when the world is in upheaval.

I don't have any message here. I think I just wanted to vent some frustrations, for my health. Honestly, it feels better.

Any of you dealing with this stuff?

SCI Syntax Help / Parser Syntax Problem
« on: March 30, 2020, 12:48:16 PM »
I'm trying to get the parser to accept "pry open with shovel" but can't seem to get it right.

The best I have is
Code: [Select]
(if(Said('[pry<open]/shovel'))This responds to "pry open shovel" as you might imagine, but I cannot seem to get "with" to work at all.

EDIT: apologies for studio script. BA is an old project, and I'm not interested in converting it all over to sierra script. BA2 on the other hand will not have this issue.

SCI Syntax Help / SCI Audio - how to set up a music on/off toggle
« on: February 13, 2020, 08:20:02 AM »
This is mainly a question for Gumby, since he made the SCIAudio script. I was wondering a couple things:
1. How would I set up a volume toggle for the audio. Everything in the script (including volume) is set to -111, and that baffles me.

2. Assuming the volume can be toggled easily, could I do this without having to load the SCIAudio script at all times? Since the volume would be accesed via the menubar, would it be as easy as setting up a global variable and using that in the SCIAudio script?

SCI Syntax Help / Setting a Cursor's location
« on: January 10, 2020, 11:27:37 AM »
I'm trying to put the cursor in a certain location, but am having some trouble.

I've used the following code:
Code: [Select]
(send gGame:setCursor(gNormalCursor SET_CURSOR_VISIBLE 279 31))This works in as much as it moves the cursor to the numbers specified, but the problem is that while it moves the cursor to that location, when the player moves the mouse, the cursor jumps back to where it was before I set it. So, the setting of the cursor to a location is only cosmetic and not influencing the actual variables involved.

I've looked and cannot find where the cursor variables are held. Can anyone help with this?

Edit: Sorry for the Studio syntax...I'm working on the patch of my old game, so I'm using the old syntax

This game is not done, or even nearly done; It's closer to 1% complete at this time. There is no timeline to completion or guarantee thereof.

Development Backstory:
Six years ago was the release of the first part of Betrayed Alliance. While ending on a cliffhanger, I never thought I'd work on it again. I just wanted to release something that would justify all the time I had put into it. Six months after release, I put together a walkthrough and noticed some bugs and issues and filed them away. Two years or so later, I patched the game and had more than a few people playing the game and asking if I'd work on it again. The answer was always, “No.”
But that's when I started getting ideas. Every once in a while, I'd pick it up and work on something. The bug would bite me, and not an irritating programming one, but the creative one that pushed me with motivation.
On and off, I am working on the sequel.

Some Artwork:
After seeing how excellent the artwork was in the fan-made SCI-like project "The Crimson Diamond" I spent some time looking more carefully at some of the artwork from the old SCI games to get a better grasp on how to make my artwork better. One big thing I walked away with was I almost never used the color Black but it was heavily used in a lot of the old games. I doubt I'll be able to reach the level of the old games or the excellent work seen in the Crimson Diamond, but I think I've made some progress.
The Forest are that our heroes escape to at the end of Book 1:

Aside from the forest, I have to fill in much of the lower half the game's map (Only the top half was created/utilized for the first game):

The Southern Castle (Nothing to show of this area yet)

Getting to reuse areas from the 1st game feels great as I won’t have to recreate those resources (although slight alterations will probably take place)

I'm just posting this as a place to post artwork, ideas, and milestones.

I'm open to all forms of criticism.

SCI Syntax Help / Where'd my buttons go (Sierra Script Conversion)
« on: June 11, 2019, 07:12:48 PM »
All Scripts are now converted and without error message, and yet...
See attachment
Here's the code I was using from the Controls Script:
Code: [Select]
(method (setSize &tmp [rect 4])
(TextSize @rect text font)
(= [rect rtBOTTOM] (+ [rect rtBOTTOM] 2))
(= [rect rtRIGHT] (+ [rect rtRIGHT] 2))
(= nsBottom (+ nsTop [rect rtBOTTOM]))
(= [rect rtRIGHT] (* (/ (+ [rect rtRIGHT] 15) 16) 16))
(= nsRight (+ [rect rtRIGHT] nsLeft))
(method (draw &tmp x y x2 y2 w h [rect 4])
; Calculate the areas
(= x2 (- nsRight 8))
(= y2 (- nsBottom 8))
(= w (- nsRight nsLeft))
(= h (- nsBottom nsTop))
(TextSize @rect text font)
; Draw the side borders
(for ( (= y (+ nsTop 8))) (< y y2)  ( (= y (+ y 8))) (DrawCel gWB 0 4 nsLeft y -1) (DrawCel gWB 0 6 x2 y -1))
; Draw the top and bottom borders
(for ( (= x (+ nsLeft 8))) (< x x2)  ( (= x (+ x 8))) (DrawCel gWB 0 5 x nsTop -1) (DrawCel gWB 0 7 x y2 -1))
; Draw the corners
(DrawCel gWB 0 0 nsLeft nsTop -1)
(DrawCel gWB 0 1 x2 nsTop -1)
(DrawCel gWB 0 2 nsLeft y2 -1)
(DrawCel gWB 0 3 x2 y2 -1)
; Draw the text
(+ nsLeft (>> (- w [rect rtRIGHT]) 1))
(+ (+ nsTop (>> (- h [rect rtBOTTOM]) 1)) 1 dsCOLOR)

Pages: [1] 2 3 ... 5

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

Page created in 0.111 seconds with 18 queries.