1 ;;----------------------------------------------------------------------------
2 ;; The very first line of any session file should be (load "naz.scm"). This
3 ;; bootstraps some procedures that we need to continue. This is the only place
4 ;; you should use 'load'. Every other place you want to load a file you should
5 ;; user 'kern-load'. 'kern-load' ensures that a saved session will be able to
7 ;;----------------------------------------------------------------------------
9 (kern-script-version "0.7.1")
11 ;; Setup progress bar for loading. I arrived at the number by printing the
12 ;; current number of steps in src/foogod.c:foogod_progress_bar_finish().
13 (kern-progress-bar-start "Æɤ߹þ¤ßÃæ" 205)
15 ;; Wrap the original definition of (load ...) with one that advances the
17 (define original-load load)
19 (kern-progress-bar-advance 1)
23 ;;----------------------------------------------------------------------------
24 ;; Load the read-only game data. See the note on 'kern-load' vs 'load' above.
25 ;;----------------------------------------------------------------------------
26 (kern-load "game.scm")
27 (kern-load "quests-mech.scm")
28 (kern-load "camping-map.scm")
30 (kern-load "quests-data-static.scm")
31 (kern-load "zones.scm")
32 (kern-load "runes.scm")
33 (kern-load "prices.scm")
34 (kern-load "special.scm")
35 (kern-load "town-entry.scm")
36 (kern-load "pseudorandom-map.scm")
37 (kern-load "endless-deeps-mech.scm")
38 (kern-load "lost-halls-mech.scm")
39 (kern-load "voidgap-mech.scm")
40 (kern-load "player.scm")
42 ;;----------------------------------------------------------------------------
43 ;; Time -- this needs to be set before loading any dungeon rooms
44 ;;----------------------------------------------------------------------------
47 (define time-in-minutes (+ (* hour 60) minutes))
48 (define game-start-time (time-mk 1611 0 0 0 hour minutes))
59 ;; NPC's who inhabit multiple places
60 (kern-load "gregor.scm")
61 (kern-load "kalcifax.scm")
63 ;;----------------------------------------------------------------------------
65 ;;----------------------------------------------------------------------------
66 (load "gregors-hut.scm")
67 (load "moongate-clearing.scm")
68 (load "abandoned-farm.scm")
69 (load "abandoned-cellar.scm")
70 (load "slimy-cavern.scm")
72 (load "lost-halls.scm")
73 (load "enchanters-tower.scm")
74 (load "green-tower.scm")
75 (load "green-tower-lower.scm")
76 (load "mushroom-cave.scm")
77 (load "goblin-kingdoms.scm")
86 (load "thiefs_den.scm")
89 (load "old-absalot.scm")
90 (load "engineers-hut.scm")
91 (load "mans-hideout.scm")
92 (load "necromancers-lair.scm")
94 (load "void-temple.scm")
95 (load "merciful-death.scm")
96 (load "angriss-lair.scm")
97 (load "poor-house.scm")
99 (load "ankh-shrine.scm")
100 (load "kraken-lakes.scm")
101 (load "endless-deeps.scm")
102 (load "forsaken-prison.scm")
103 (load "old-mine.scm")
104 (load "lich-tomb.scm")
105 (load "altar-room.scm")
106 (load "dank-cave.scm")
107 (load "eastpass.scm")
108 (load "westpass.scm")
110 (load "ancient-derelict.scm")
111 (load "road_to_absalot.scm")
113 (load "gamestart.scm")
114 (load "bandit-hideout.scm")
115 (load "brundegardt.scm")
116 (load "voidgap-passage.scm")
118 ;;----------------------------------------------------------------------------
120 ;;----------------------------------------------------------------------------
127 faction-player ; starting alignment
133 max-health 0 max-health 0 1 ; hp/xp/mp/AP_per_turn/lvl
146 ; 'ch_thorald_greybeard ; tag
147 ; "Thorald Greybeard" ; name
150 ; s_companion_wizard ; sprite
151 ; faction-player ; starting alignment
152 ; 0 10 2 ; str/int/dex
155 ; 240 0 8 speed-human-med-armor 8 ; hp/xp/mp/AP_per_turn/lvl
161 ; ;;(list t_doom_staff) ; readied
165 ;;----------------------------------------------------------------------------
167 ;;----------------------------------------------------------------------------
172 "Walk" ; movement description
173 sound-walking ; movement sound
176 (* 60 60 5) ; turns to next meal (5 hours)
178 m_campsite ; campsite map
179 nil ; campsite formation
182 (kern-mk-inventory nil)
183 nil ;; party members (should be nil for initial load file)
187 ;;----------------------------------------------------------------------------
189 ;;----------------------------------------------------------------------------
190 (kern-party-add-member player ch_wanderer)
191 ;;(kern-party-add-member player ch_thorald_greybeard)
194 ;;----------------------------------------------------------------------------
196 ;;----------------------------------------------------------------------------
199 ;;----------------------------------------------------------------------------
201 ;;----------------------------------------------------------------------------
204 "¥Õ¥£¥¢(ÂÀÍÛ)" ; name
205 1 ; relative astronomical distance
206 1 ; minutes per phase (n/a for sun)
207 (/ (* 24 60) 360) ; minutes per degree
210 '() ; script interface
213 (list s_sun 255 "full")
217 ;;----------------------------------------------------------------------------
218 ;; Lumis is the source gate, which means it opens the source moongates on its
219 ;; phases. We designate this by using the source-moon-ifc as its ifc.
221 ;; Note: the arc and phase are calculated to give the moon the right orientation
222 ;; with respect to phase vs sun position
223 ;;----------------------------------------------------------------------------
224 (mk-moon 'lumis ; tag
227 60 ; hours per revolution
230 'source-moon-ifc ; ifc
231 ;; gates (moons are fixed at 8 phases in mk-moon):
232 (list 'mg-1 'mg-2 'mg-3 'mg-4
233 'mg-5 'mg-6 'mg-7 'mg-8
237 ;;----------------------------------------------------------------------------
238 ;; Ord is the destination gate, which means its phase decides the destination
239 ;; when the player steps through a moongate. We designate this by giving it a
240 ;; nil ifc. Note that its gates do not need to be listed in the same order as
241 ;; Lumis. In fact, they don't even need to be the same set of gates.
243 ;; Note: the arc and phase are calculated to give the moon the right orientation
244 ;; with respect to phase vs sun position
245 ;;----------------------------------------------------------------------------
249 36 ; hours per revolution
253 ;; gates (moons are fixed at 8 phases in mk-moon):
254 (list 'mg-1 'mg-2 'mg-3 'mg-4
255 'mg-5 'mg-6 'mg-7 'mg-8
259 ;; ----------------------------------------------------------------------------
260 ;; The diplomacy table. Each entry defines the attitude of the row to the
261 ;; column. Note that attitudes are not necessarily symmetric. Negative values
262 ;; are hostile, positive are friendly.
264 ;; Note: factions should always be allied with themselves in order for
265 ;; summoning AI to work properly.
267 ;; Formatted for spreadsheet
268 ;; ----------------------------------------------------------------------------
270 ;; non pla men cgb acc mon tro spd out gnt dem fgb prs gla
271 (list 2 0 0 0 -1 -2 -2 -2 0 -2 -2 0 0 0 ) ;; none
272 (list 0 2 2 -2 -2 -2 -2 -2 -2 -2 -2 -2 2 2 ) ;; player
273 (list -1 2 2 -1 -2 -2 -2 -2 -2 -2 -2 -2 2 2 ) ;; men
274 (list -1 -2 -2 2 -1 -2 0 -2 -2 -1 -2 -2 0 -2 ) ;; cave goblin
275 (list -1 -2 -1 -1 2 -2 -1 -1 -2 -1 -2 -2 0 -2 ) ;; accursed
276 (list -2 -2 -2 -2 -2 2 -2 0 -2 0 -2 0 0 -2 ) ;; monsters
277 (list -2 -2 -2 0 -1 -2 2 -2 -2 -1 -2 -1 0 -2 ) ;; hill trolls
278 (list -2 -2 -2 -2 -1 0 -2 2 -2 -1 -2 0 0 -2 ) ;; wood spiders
279 (list 0 -2 -2 -2 -2 -2 -2 -2 2 -2 -2 -1 0 -2 ) ;; outlaws
280 (list -2 -2 -2 -1 -1 0 -1 -1 -2 2 -2 -1 0 -2 ) ;; gint
281 (list -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 2 -2 0 -2 ) ;; demon
282 (list 0 -2 -2 -2 -2 0 -2 0 -1 -1 -2 2 0 -2 ) ;; forest goblin
283 (list 0 2 2 0 0 0 0 0 0 0 0 0 2 2 ) ;; prisoners
284 (list -1 2 2 -1 -2 -2 -2 -2 -2 -2 -2 -2 2 2 ) ;; glasdrin
288 ;;----------------------------------------------------------------------------
289 ;; Startup - this is a one-time only script that runs when the player starts
290 ;; the game for the first time (or whenever he starts over from scratch,
291 ;; loading the game from this file). It sets up the story a bit.
293 ;; The camera should center on the moongate clearing. Then, a gate should rise
294 ;; from the ground, pause, then sink back down, leaving the player's sleep
295 ;; sprite on the ground. Another pause, and then the player should wake up.
296 ;;----------------------------------------------------------------------------
297 (define (start-scene kplayer)
299 (kern-log-msg "°Å¤¤Ì礬²¿¤â¤Ê¤¤½ê¤«¤éÉ⤫¤Ó¾å¤¬¤ê¡Ä")
300 (moongate-animate black-gate blackgate-stages)
304 (kern-char-set-sleep ch_wanderer #t)
305 (kern-obj-put-at kplayer (list p_moongate_clearing 11 12))
308 (kern-log-msg "¤½¤·¤ÆÀ×·Á¤â¤Ê¤¯¾Ã¤¨µî¤Ã¤¿¡Ä")
309 (moongate-animate black-gate (reverse blackgate-stages))
312 (kern-log-msg "¤·¤Ð¤é¤¯¤Î´Ö¡¢Ê̤οÍÀ¸¤ÎÌ´¤ò¸«¤Æ¤¤¤¿¤è¤¦¤À¡Ä")
316 (kern-char-set-sleep ch_wanderer #f)
317 (kern-player-set-follow-mode)
319 (kern-log-msg "¡ÄÌܳФá¤ë¤È¤½¤³¤Ï´ñ̯¤Ê¿·¤·¤¤À¤³¦¤À¤Ã¤¿¡£")
320 (kern-log-msg "ÆîÀ¾¤Ëƶ·¢¤¬¸«¤¨¤ë¡£")
323 (define (simple-start kplayer)
324 (kern-obj-put-at kplayer (list p_shard 76 114)))
326 (define (create-char kplayer)
327 (kern-obj-put-at kplayer (list p_char_setup 10 17)
330 ;;----------------------------------------------------------------------------
331 ;; To skip the extended start scene comment out this next line and uncomment
332 ;; the line after it.
333 ;;----------------------------------------------------------------------------
334 ;;(kern-set-start-proc start-scene)
335 ;;(kern-set-start-proc simple-start)
336 (kern-add-hook 'new_game_start_hook 'create-char)
337 (load "quests-data.scm")
338 (quest-assign (quest-data-get 'questentry-charcreate))
340 (kern-progress-bar-finish)
344 ;;quickstart stuff for playtesting
371 ( 9 t_vas_mani_scroll)
372 ( 9 t_in_ex_por_scroll)
373 ( 9 t_sanct_lor_scroll)
374 ( 9 t_wis_quas_scroll)
375 ( 9 t_xen_corp_scroll)
376 ( 9 t_an_xen_ex_scroll)
377 ( 9 t_vas_rel_por_scroll)
408 ( 1 t_morning_star_2)
411 ( 1 t_eldritch_blade)
416 ( 1 t_scratched_shield)
427 ( 1 t_armor_leather_4)
456 (list p_char_setup 16 17))
459 (mk-ladder-down 'p_moongate_clearing 18 18)
460 (list p_char_setup 17 17))
463 (mk-ladder-down 'p_trigrave 16 16)
464 (list p_char_setup 17 16))
467 (mk-ladder-down 'p_fire_sea 4 4)
468 (list p_char_setup 17 15))
471 (mk-ladder-down 'p_oparine 1 1)
472 (list p_trigrave 17 16))
475 (mk-ladder-down 'p_lost_garrison 22 22)
476 (list p_oparine 1 1))