Flexibly edit entity data in dialogue
… including way better ^_^ dialogue :D face! \o/ editing!
This commit is contained in:
parent
1a44f2bcac
commit
90223f4a4c
|
@ -52,9 +52,21 @@ If not, have some tea on me: I’m paying. =w="
|
||||||
dialogue-tree))
|
dialogue-tree))
|
||||||
|
|
||||||
|
|
||||||
(defun face (speaker face)
|
(defun face (speaker face &optional (talking-face nil))
|
||||||
|
(if talking-face
|
||||||
(list
|
(list
|
||||||
(list :speaker speaker :face face)))
|
(list :speaker speaker
|
||||||
|
:face face
|
||||||
|
:set :normal-face
|
||||||
|
:to face)
|
||||||
|
(list :speaker speaker
|
||||||
|
:set :talking-face
|
||||||
|
:to talking-face))
|
||||||
|
(list
|
||||||
|
(list :speaker speaker
|
||||||
|
:face face
|
||||||
|
:set :normal-face
|
||||||
|
:to face))))
|
||||||
|
|
||||||
|
|
||||||
(defun say (speaker &rest keys)
|
(defun say (speaker &rest keys)
|
||||||
|
@ -62,7 +74,7 @@ If not, have some tea on me: I’m paying. =w="
|
||||||
(list :speaker speaker :progress 0
|
(list :speaker speaker :progress 0
|
||||||
:face (or (getf keys :face) 'talking-face)
|
:face (or (getf keys :face) 'talking-face)
|
||||||
:text (…:getf-lang keys))
|
:text (…:getf-lang keys))
|
||||||
(car (face speaker 'normal-face))))
|
(list :speaker speaker :face 'normal-face)))
|
||||||
|
|
||||||
|
|
||||||
(defun mumble (speaker &rest keys)
|
(defun mumble (speaker &rest keys)
|
||||||
|
@ -119,6 +131,18 @@ talking-face or the face given by the DIALOGUE."
|
||||||
(setf (🌍:getf-entity-data map speaker :face) new-face))))
|
(setf (🌍:getf-entity-data map speaker :face) new-face))))
|
||||||
|
|
||||||
|
|
||||||
|
(defun update-entity-data (map dialogue)
|
||||||
|
"Given a plist of DIALOGUE, update an arbitrary bit of data in the speaker's
|
||||||
|
data, using :SET and :TO of the DIALOGUE."
|
||||||
|
(let* ((speaker (intern (string-upcase (getf dialogue :speaker))))
|
||||||
|
(key (getf dialogue :set))
|
||||||
|
(data (getf dialogue :to)))
|
||||||
|
(when (and key data)
|
||||||
|
(format *error-output* "[~A] ~A → ~A???~%" dialogue key data)
|
||||||
|
(setf (🌍:getf-entity-data map speaker key) data)
|
||||||
|
(format *error-output* "~A!!!!~%" (🌍:getf-entity-data map speaker :normal-face)))))
|
||||||
|
|
||||||
|
|
||||||
(defun progress-line-delivery (dialogue)
|
(defun progress-line-delivery (dialogue)
|
||||||
"Progress the delivery of a line (plist) of DIALOGUE. That is, increment the
|
"Progress the delivery of a line (plist) of DIALOGUE. That is, increment the
|
||||||
“said character-count” :PROGRESS, which dictates the portion of the message that
|
“said character-count” :PROGRESS, which dictates the portion of the message that
|
||||||
|
@ -162,6 +186,7 @@ coordinates listed in the DIALOGUE’s :COORDS property. … If applicable, ofc.
|
||||||
Progress through the lines of dialogue when the user hits ENTER, etc.
|
Progress through the lines of dialogue when the user hits ENTER, etc.
|
||||||
Returns the state for use with STATE-LOOP, pay attention!"
|
Returns the state for use with STATE-LOOP, pay attention!"
|
||||||
(update-speaking-face map (car dialogue-list))
|
(update-speaking-face map (car dialogue-list))
|
||||||
|
(update-entity-data map (car dialogue-list))
|
||||||
(progress-line-delivery (car dialogue-list))
|
(progress-line-delivery (car dialogue-list))
|
||||||
;; Progress to the next line of dialogue as appropriate.
|
;; Progress to the next line of dialogue as appropriate.
|
||||||
(let* ((dialogue (car dialogue-list))
|
(let* ((dialogue (car dialogue-list))
|
||||||
|
|
|
@ -63,31 +63,30 @@
|
||||||
(💬:mumble sasha :en "...")
|
(💬:mumble sasha :en "...")
|
||||||
(💬:say "player" :eo "Kielas apud la mar'?"
|
(💬:say "player" :eo "Kielas apud la mar'?"
|
||||||
:en "How's the view?")
|
:en "How's the view?")
|
||||||
(💬:face "player" "<.<")
|
(💬:face "player" "<.<" "<o<")
|
||||||
(💬:say sasha :eo "Kielas apud la ruinoj de via viv'?"
|
(💬:say sasha :eo "Kielas apud la ruinoj de via viv'?"
|
||||||
:en "How's your trainwreck of a life?")
|
:en "How's your trainwreck of a life?")))
|
||||||
(💬:face "player" '💬:normal-face)))
|
|
||||||
(1
|
(1
|
||||||
(start-dialogue
|
(start-dialogue
|
||||||
(mumble "player" :en "...")
|
(mumble "player" :en "...")
|
||||||
(face "player" "<w<")
|
(face "player" "<w<")
|
||||||
(say sasha :eo "Kial vi restas? Ĉu tiom solecas ke nur ideas ĝeni min?"
|
(say sasha :eo "Kial vi restas? Ĉu tiom solecas ke nur ideas ĝeni min?"
|
||||||
:en "Why are you still here? Are you so lonely you've only got me to bother?")
|
:en "Why are you still here? Are you so lonely you've only got me to bother?")
|
||||||
|
(face "player" ":w:" ":u:")
|
||||||
(mumble "player" :eo "(Ŝi parolas pri si mem, ĉu ne?)"
|
(mumble "player" :eo "(Ŝi parolas pri si mem, ĉu ne?)"
|
||||||
:en "(She's projecting, isn't she?)"
|
:en "(She's projecting, isn't she?)")))
|
||||||
:face ":w:")))
|
|
||||||
(2
|
(2
|
||||||
(start-dialogue
|
(start-dialogue
|
||||||
|
(face "player" ":w:" ":o:")
|
||||||
(say "player" :eo "Nu... Vi staris tie ĉi senmove dum la pastintaj tri tagoj..."
|
(say "player" :eo "Nu... Vi staris tie ĉi senmove dum la pastintaj tri tagoj..."
|
||||||
:en "So... You've stood around here for three days already, you've hardly moved..."
|
:en "So... You've stood around here for three days already, you've hardly moved...")
|
||||||
:face ":o:")
|
|
||||||
(face "player" ":w:")
|
|
||||||
(say sasha :eo "Pŝ! Do?! Mi simple havas multajn pripensindaĵojn! Mi tiom multe okupiĝas!"
|
(say sasha :eo "Pŝ! Do?! Mi simple havas multajn pripensindaĵojn! Mi tiom multe okupiĝas!"
|
||||||
:en "Pff! So what?! My mind's just busy! I've got a lot going on right now!"
|
:en "Pff! So what?! My mind's just busy! I've got a lot going on right now!"
|
||||||
:face "vov")
|
:face "vov")
|
||||||
(say sasha :eo "Ne ŝajnigu vin supera al mi, dum vi mem senespere sencelas!!"
|
(say sasha :eo "Ne ŝajnigu vin supera al mi, dum vi mem senespere sencelas!!"
|
||||||
:en "Don't act all haughty when you're such an aimless loser yourself!!"
|
:en "Don't act all haughty when you're such an aimless loser yourself!!"
|
||||||
:face ">o<")
|
:face ">o<")
|
||||||
|
(face "player" "=w=" "=u=")
|
||||||
(mumble "player" :eo "Eee.. pardonu."
|
(mumble "player" :eo "Eee.. pardonu."
|
||||||
:en "Well... sorry.")))
|
:en "Well... sorry.")))
|
||||||
(3
|
(3
|
||||||
|
@ -146,7 +145,7 @@
|
||||||
(:eo "Lasu panjon instrui vin *hik* boooone"
|
(:eo "Lasu panjon instrui vin *hik* boooone"
|
||||||
:en "Let momma show you a good *hic* timeee")
|
:en "Let momma show you a good *hic* timeee")
|
||||||
(:eo "kaj mi diris RIKAŜIKA! DIN-DON!"
|
(:eo "kaj mi diris RIKAŜIKA! DIN-DON!"
|
||||||
:en "and then I said BAZINGA! CA-CHOW!"))))
|
:en "and I said BAZINGA! CA-CHOW!"))))
|
||||||
(start-dialogue
|
(start-dialogue
|
||||||
(apply #'say (append '("boozy-lady")
|
(apply #'say (append '("boozy-lady")
|
||||||
(nth (random (length messages)) messages))))))
|
(nth (random (length messages)) messages))))))
|
||||||
|
@ -185,16 +184,18 @@
|
||||||
:face "xDD")
|
:face "xDD")
|
||||||
(say gambler :en "Hahahaha! Hahahahaha!"
|
(say gambler :en "Hahahaha! Hahahahaha!"
|
||||||
:face "x'D")
|
:face "x'D")
|
||||||
(face gambler ">V<")
|
(face 'player "^^'")
|
||||||
|
(face gambler ">V<" ">O<")
|
||||||
(say gambler :eo "Tiom amuze! Bona ŝerco!"
|
(say gambler :eo "Tiom amuze! Bona ŝerco!"
|
||||||
:en "Shit that's funny!"
|
:en "Shit that's funny!"
|
||||||
:face ">V<")
|
:face ">V<")
|
||||||
|
(face 'player "^^\"")
|
||||||
(say gambler :eo "Mi tute ruinigis mian vivon! MDR!"
|
(say gambler :eo "Mi tute ruinigis mian vivon! MDR!"
|
||||||
:en "I totally fucked my life! LMAO!"
|
:en "I totally fucked my life! LMAO!"
|
||||||
:face ">V<")
|
:face ">V<")
|
||||||
(say gambler :en "HAHAHAHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHAHAHA"
|
(face 'player "o-o" "ouo")
|
||||||
:face ">O<")
|
(say gambler :en "HAHAHAHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHAHAHA")
|
||||||
(face gambler "=w=")
|
(face gambler "=w=" "=w=")
|
||||||
(mumble gambler :en "...")
|
(mumble gambler :en "...")
|
||||||
(mumble gambler :eo "Fek'."
|
(mumble gambler :eo "Fek'."
|
||||||
:en "Fuck.")))
|
:en "Fuck.")))
|
||||||
|
@ -217,7 +218,8 @@
|
||||||
(say gambler :eo "... danke al kiu mia filino povas edukiĝi bone."
|
(say gambler :eo "... danke al kiu mia filino povas edukiĝi bone."
|
||||||
:en "... thanks to which my daughter can receive a good education.")
|
:en "... thanks to which my daughter can receive a good education.")
|
||||||
(say gambler :eo "Kial mi vetis la monprunton tie ĉi?! Fek!!"
|
(say gambler :eo "Kial mi vetis la monprunton tie ĉi?! Fek!!"
|
||||||
:en "Why'd I bet the payment here?! FUCK!!")))
|
:en "Why'd I bet the payment here?! FUCK!!"
|
||||||
|
:face ">O<")))
|
||||||
(2
|
(2
|
||||||
(start-dialogue
|
(start-dialogue
|
||||||
(say gambler :eo "Nu, ĉio enordas! Ni simple perdos la domon, jen ĉio."
|
(say gambler :eo "Nu, ĉio enordas! Ni simple perdos la domon, jen ĉio."
|
||||||
|
@ -234,12 +236,14 @@
|
||||||
:en "No life!")))
|
:en "No life!")))
|
||||||
(3
|
(3
|
||||||
(start-dialogue
|
(start-dialogue
|
||||||
(say gambler :eo "Mi cedu al la mallumo! Tro malfruas al mi!"
|
(say gambler :eo "Mi cedu al la vakuo. Tre komfortas ĉe la fundo, kamarado."
|
||||||
:en "I'm giving into the void! It's too late for me!")
|
:en "I'm giving into the void. It's quite peaceful down here, pal.")
|
||||||
(say gambler :eo "Mi memmortigu, ĉu ne, kara amiko? Ĉu neeee?"
|
(say gambler :eo "Mi lasu min falu entute, ĉu ne, kara amiko? Ĉu neee?"
|
||||||
:en "I should let go, right, pal? Righttt?")
|
:en "I should let go, right, pal? Righttt?")
|
||||||
(say 'player :eo "Ja ne! Je la dioj! Sinjoro, restas al vi fuĝvojo, sendube!"
|
(face 'player ";w;" ";o;")
|
||||||
:en "Of course not! Jesus! Guy, there's still hope for you, somewhere!")
|
(say 'player :eo "Ne tro senesperu -- sinjoro, restas al vi fuĝvojo, sendube!"
|
||||||
|
:en "Guy, there's still hope for you, somewhere!")
|
||||||
|
(face gambler "=v=" "=v=")
|
||||||
(say gambler :eo "Mi ideas IAN fuĝvojon..."
|
(say gambler :eo "Mi ideas IAN fuĝvojon..."
|
||||||
:en "Five feet under, maybe..."))))))
|
:en "Five feet under, maybe..."))))))
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue