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 - Kawa

Pages: 1 2 [3]
31
The Games and other Sierra Adventure stuff / Fonts
« on: July 03, 2015, 06:30:16 AM »
Am I the only one who thinks phrases like "that one typewriter font you get with Windows" are too vague to be much good? This may sound like a stupid question, but you know people exist that can't call Courier by name... or did I mean Courier New? Imagine talking about SCI font resources. You'd think "0.fon" is always the thick one, but it's not; Conquests of the Longbow, Quest for Glory 1 VGA, and Space Quest 4 have a thin squarish font, Police Quest 3 has the smaller common font (usually 3 or 4) as its 0, and Space Quest 1 has a stylish thin serif. So you can't just refer to 0.fon and always be understood as meaning the thick one. (Did you know that the 0.fon in LSL3 is the same as always, but with an LSL3 logo added?)

But if you say "Times New Roman", you know the type.

I'd like to humbly suggest giving these various SCI fonts proper family names for discussion in the community. For example, the five most common fonts could be Sierra System, Serif, Sans, Small, and Debug. Fonts that appear mostly if not exclusively in Space Quest could be Wilco -- SQ4 60 and 61 could be Wilco Serif and Wilco Serif Outline.

Thus, most SCI games have Sierra System, but some replace it with Sierra Square, or even Sierra Small.

32
Long, long ago, long enough for me to have irretrievably lost it all, I implemented a few things in SCI0; a questionnaire ala Larry, and a battle system like in Quest for Glory -- albeit somewhat simplified. Also an even more simplified Mega Man Battle Network system. I did these first two without looking at any code, for I could and can not read SCI machine code and had no decompiler. Thus, the only straight copy (IIRC) was the question format. I might've expanded those battle systems if things hadn't happened.

I do so enjoy a little challenge, so here's the deal: you suggest something like the things above, things like battle systems or minigames, and I'll try to implement it in SCI11, assuming it seems reasonable, then release it with adequate documentation and probably placeholder art.

The challenges:
  • Scored question list
  • Simple QfG battle system
  • Health meter

The downloads:
http://helmet.kafuka.org/sci/

33
SCI Syntax Help / SCI1.1: Talkers. They're weird.
« on: June 29, 2015, 09:04:04 AM »
So here's a thing regarding talkers.

With each talker in their own script, like in most Sierra games (SQ5 Droole and Flo being script 1885 and 1886 respectively), it seems the template game doesn't use them the way one might think:

Script 1001, chelsie.cs
Code: [Select]
(instance public Chelsie of CDTalker //listed as #1 in the exports table. A CDTalker has back 21, font 4, x 53, y 70.
(properties
view 1001
font 53 //override CDTalker's 4
)

(method (init)
DebugPrint("Chelsie:init()")
(super:init(tBust tEyes tMouth))
)
)

Script #0, main.sc
Code: [Select]
(instance public Ilira of CDTalker
(properties
view 1002
font 53 //again, override CDTalker's 4
)

(method (init)
DebugPrint("Ilira:init()")
(super:init(tBust tEyes tMouth))
)
)

And then, also in main.sc:
Code: [Select]
(instance testMessager of Messager
(properties)

(method (findTalker talkerNumber)
(var temp0)
DebugPrint("testMessager:findTalker(%d)" talkerNumber)
= gCurrentTalkerNumber talkerNumber
= temp0
(switch (talkerNumber)
(case NARRATOR
gSQ5Narrator
)
(case CHELSIE
DebugPrint("Chelsie, you're up!")
ScriptID(1001 1)
)
(case ILIRA
DebugPrint("Ilira, express yoself!")
Ilira //mind you, this is in the same script!
)
// Add more cases here for different narrators
// (case 8
//ScriptID(109 7)
//)
)
(if (temp0)
return temp0
)(else
return (super:findTalker(talkerNumber))
)
)
)

I've set up the two "touching yourself" messages accordingly. With tracing DebugPrint calls, this yields the following:
Code: [Select]
testMessager:findTalker(3)
Ilira, express yoself!
Ilira:init() //<-- this happens.
CDTalker:init()
CDTalker: positions set, calling super:init()...
Talker:init()
testMessager:findTalker(2)
Chelsie, you're up!
//Something is missing here.
Talker:init()
Net result: Chelsie's portrait appears in the top-left corner, her dialog is in font 0 (despite having changed Talker's font to 4 in my tests?), on a light gray (7) background. Meanwhile, Ilira has none of these issues, with a nice tan dialog (as CDTalker specifies) and a funky chunky font.

So yeah. What's missing here that causes Chelsie to not init?

34
Now that we can make SCI1.1 games, and considering the state of this site's views gallery, I'd like to make a nice set of starting views drawn in such a way that one might easily add things like shirts or jackets and such, maybe different hairdos, by simply pasting them onto the bare doll in one's favorite bitmap editor, and maybe have a couple preset combinations in .v56 format that you can stick in SCI Companion's sample folder and then recolor as needed okay let's face it you get the picture.

My only problem is that to make a base of adequate quality, I need another base, to paint over if not use a guide. So my question to the good folks of SCIprogramming.com: what games, not necessarily SCI, would you suggest be used as the foundation for this undertaking? The only requirement is that your suggestion has diagonals and standing frames.

35
Hey, Nic Cage? You want this icon bar?


To turn the Command icon into a purely decorative score counter like in Police Quest 1 and 3, open up main.sc and find the icon4 instance. Then, drop this in there instead:
Code: [Select]
(instance icon4 of IconI
(properties
view 990
loop 10
cel 1
cursor 984
type 0 ; Not sure if these three
; message V_COMMAND ; are required
signal $0043 ; to be these values.
maskView 990
maskLoop 13
maskCel 4
noun N_COMMANDICON
helpVerb 5
)

(method (show param1 &tmp [line 7] [size 4] font)
(super show: &rest param1)
(= font 1605)
(Format @line "%d" gScore)
(TextSize @size @line font 0)
(Display @line dsCOLOR 14 dsFONT font dsCOORD (+ nsLeft (/ (- 50 [size 3]) 2)) (+ nsTop 14))
)

; Prevent selecting and highlighting
(method (select param1)
(return 0)
)
(method (highlight param1)
(return 0)
)
)
That's it, I suppose. It's a bit cargo-cult but tests are positive.

And to get rid of the other counters:
1. Edit, blank out, or otherwise get rid of sq5StatusLineCode in main.sc.
2. Remove the score panel from the control panel in sq5controlitem.sc by blanking out certain lines near the bottom:
Code: [Select]
(instance public gcWin of BorderWindow
(properties)

(method (open &tmp temp51)
; &tmp temp0, temp1[25], temp26[25], temp51)
; all of the others are for the score thing.
(= temp51 -1)
;...
; (DrawCel 995 9 0 (+ 5 (CelWide 995 1 1) (+ 38 (CelHigh 995 0 1)) temp51)
(Graph grUPDATE_BOX 12 1 15 (+ 151 (CelWide 995 0 1)) 1)
; (Message msgGET 0 18 0 1 1 @temp1)
; (Format @temp26 "%d %s %d" gScore @temp1 gMaxScore)
; (Display @temp26 105 gFont 100 (+ (+ 5 (CelWide 995 1 1)) 6) (+ (+ 38 (CelHigh 995 0 1)) 15))
(SetPort 0)
)
)

36
As you know, at this moment the title screen menu for the SCI1.1 template game is very Space Quest 5-like. A bit too much in my opinion. Through a combination of decompiles, comparisons, trial and error, and deeply-buried experience with SCI0, here's how to turn this

into this


The important bit is the buttons. As lskovlun guessed, this involves changing addColoredButton to addButton, so here's the details. You find this part, at line 127 of rm100.sc:
Code: [Select]
(5
(= seconds 0)
(= gCursor 999)
(gGame setCursor: 999 1)
(Print
dialog: myDialog
font: gFont
width: 150
mode: 1
addText: N_TITLEMENU V_LOOK 0 4 0 0 0
addText: N_TITLEMENU V_LOOK 0 5 0 10 0
addColorButton: 0 N_TITLEMENU V_LOOK 0 1 0 40 0 0 15 23 5 5 5
addColorButton: 1 N_TITLEMENU V_LOOK 0 2 0 50 0 0 15 23 5 5 5
)

(= temp0 (Print
addColorButton: 2 N_TITLEMENU V_LOOK 0 3 0 70 0 0 15 23 5 5 5
init:
))

(switch (temp0)
(0
(gRoom newRoom: 110)
)
(1
(gGame restore:)
(self changeState: state)
)
(2
(= gQuitGame TRUE)
)
)
)
And basically replace that with this:
Code: [Select]
(5
(= seconds 0)
(= gCursor 999)
(gGame setCursor: 999 1)
(Print
dialog: myDialog
font: gFont
width: 150
mode: 1
addText: N_TITLEMENU V_LOOK 0 5
addButton: 0 N_TITLEMENU V_LOOK 0 1 0 24
addButton: 1 N_TITLEMENU V_LOOK 0 2 0 40
)

(= temp0 (Print
addButton: 2 N_TITLEMENU V_LOOK 0 0 56
init:
))

(switch (temp0)
(0
(gRoom newRoom: 110)
)
(1
(gGame restore:)
(self changeState: state)
)
(2
(= gQuitGame TRUE)
)
)
)
Though personally I removed the message bits for preference and folded the print and assignment in one like this:
Code: [Select]
(= temp0 (Print
dialog: myDialog
font: gFont
width: 150
mode: 1
; addTitle: {Window title anyone?}
addText: {Hi there. Please, make your selection:}
addButton: 0 {Play a New Game} 0 24
addButton: 1 {Restore an Old Game} 0 40
addButton: 2 {Quit} 0 56
init:
))

Bonus
You'll notice my window is not beveled. That's a one-line change. main.sc line 1290:
Code: [Select]
(instance sq5Win of SysWindow //BorderWindowThat's it you're done. Technically I eliminated a whole lot more BorderWindow usages but this oughta do for anything (Print)ed.

Happy hacking.

Pages: 1 2 [3]

SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.099 seconds with 18 queries.