Gamebook- Back to previous page

Is there a simple way you guys know of to go back to previously used page using Gamebook?


Simple answer: just make a manual link to the last page you were on. :)

But if you want something more complex, like you want pages that can be visited from multiple pages throughout the story, but will always go back to the last page you were on, HegemonKing (sp?) wrote it out for me a year or two ago, and it helped immensely.

For me, I use this so the player can check a character sheet (and any other number of things) from any page I give them the option, and then go back to the previously visited page with no hiccups.

Here you go (Step 1):

On the "game" page, in the "script" tab, put this into the GUI code view (not the overarching code view, but just the code view for the page):

player.previous_page = player.current_page
player.current_page = player.parent
if (player.current_page = Character Sheet) {
  player.parent.options = NewStringDictionary()
  dictionary add (player.parent.options, player.previous_page.name, "CONTINUE")
}

Notice in the code above the words Character Sheet and "CONTINUE" (in quotes). Those can be whatever you want. For me, I have a page named Character Sheet, and whenever I give the option to visit that page and the player goes there, at the bottom of that page it says CONTINUE, and when you press it, it automatically goes back to whatever page you were last on. You can use this for anything, really.

Then, (Step 2):

On the Character Sheet page (again, name it whatever you want) just put this code in somewhere in codeview:

player.current_page = player.parent

And that's literally it. That code interacts with the code on the "game" page and tells it to do all the magical code things.
Ask me if you have more questions if you're not familiar with the GUI and I can give you step by step instructions.


Thanks a lot, I'll try that = )
In a similar way, is there a simple way to have it reset/refresh the page?
I tried a link to the same page you're on, but apparently it doesn't like that..


That's actually a question I have! The Gamebook mode doesn't like you just "refreshing" a page it seems. So I've been making alternate versions of pages that just bounce back and forth to each other (if it's like combat or a gambling game or what have you, and you are changing counters and flags and shit).


Nice to know that someone else is trying to figure this out xD
Hey that code worked great for a sort of Pause Menu.
Are you primarily making a game using Gamebook?
It seems like most people on here prefer the Text Adventures because of the coding
(edit: never mind answering here, I sent a message instead)


I never thought about it as a pause menu, that's a genius idea!

I tried to open your message but the forums aren't letting me right now, it's returning an error.

I've been trying to make an open world RPG game book for awhile now (you have stats and go everywhere and come back places and meet a bunch of people and have random encounters, but it's all Gamebooky, like, you're just clicking links and shit). And while I know I should just learn the text adventure version and make it "look" like a gamebook, there's something about the UI that just feels more sane to me. I sort of like working out against the boundaries, as opposed to feeling like I have limitless options and not know how to use any of them. I recommend Gamebook for that reason for anyone working from the ground up and interested in learning how this crap works from a REALLY simple framework.

I also responded to your "if result add pagelink" thread, check it out. You're right, it doesn't work. But MovePlayer works!


Oh okay, that's weird about the message thingy.
If you want you can email [email protected]
or brenden_winger to type on skype
I actually have the exact same mindset about building the game on here.
I figured out a way where I can essentially allow changes in game based on the HasSeenPage mabob
If I can just sort out a couple other little things I should be able to to do nearly everything I want with an adventure/ puzzle story


Yes! Turning on/off flags makes it even more easy, along with HasSeenPage/HasNotSeenPage, and all kinds of shit with Counters. You can make a SUPER robust game world in Gamebook mode, but it doesn't come without its pitfalls, of course.

Let's stay in contact! I'm [email protected].


Hmm...I haven't gotten into Flag World yet. Maybe that'll solve some o' my issues.

(Cool beans---I sent an email and a message request on skype)


as Major Powers already said/helped in his posts:

the trick is to have two Attributes (in addition to using a 3rd Attribute: the built-in 'player.parent' Attribute), one for storing the 'old location(s)' and one to store the current location, as you got to 'music chairs' update your old location Attribute with the room you were currently in, when you move to a new room, for example of the logic (only storing the single and directly previous location for this example):

// initial states:
player.parent = room
player.old_room = room
player.current_room = room

upon(after) moving to a new room (room to room2):

player.parent = room2
player.old_room = player.current_room // player.old_room = player.current_room = room
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room2

upon(after) moving to a new room (room2 to room3):

player.parent = room3
player.old_room = player.current_room // player.old_room = player.current_room = room2
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room3

upon(after) moving to a new room (room3 to room4):

player.parent = room4
player.old_room = player.current_room // player.old_room = player.current_room = room3
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room4

upon(after) moving to a new room (room4 to room5):

player.parent = room5
player.old_room = player.current_room // player.old_room = player.current_room = room4
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room5

// going backwards now to 'room' from 'room5':

// initial states:
player.parent = room5
player.old_room = room4
player.current_room = room5

upon(after) moving to a new room (room5 to room4):

player.parent = room4
player.old_room = player.current_room // player.old_room = player.current_room = room5
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room4

upon(after) moving to a new room (room4 to room3):

player.parent = room3
player.old_room = player.current_room // player.old_room = player.current_room = room4
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room3

upon(after) moving to a new room (room3 to room2):

player.parent = room2
player.old_room = player.current_room // player.old_room = player.current_room = room3
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room2

upon(after) moving to a new room (room2 to room):

player.parent = room
player.old_room = player.current_room // player.old_room = player.current_room = room2
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room

// jumping/moving all over the place:

// initial states:
player.parent = room
player.old_room = room
player.current_room = room

upon(after) moving to a new room (room to room5):

player.parent = room5
player.old_room = player.current_room // player.old_room = player.current_room = room
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room5

upon(after) moving to a new room (room5 to room2):

player.parent = room2
player.old_room = player.current_room // player.old_room = player.current_room = room5
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room2

upon(after) moving to a new room (room2 to room4):

player.parent = room4
player.old_room = player.current_room // player.old_room = player.current_room = room2
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room4

upon(after) moving to a new room (room4 to room):

player.parent = room
player.old_room = player.current_room // player.old_room = player.current_room = room4
// then we update the 'current_room' to the new current room we're now in:
player.current_room = player.parent // player.current_room = player.parent = room


do you see how the 'musical chairs' of transfering/passing-along of updating between using the 'old_room' and 'current_room' Attributes are working?

no matter where you move from where-ever to where-ever, the logic works, by having two Attributes ('old_room' and 'current_room') and a 3rd Attribute (the built-in 'player.parent' Attribute), and by first storing the 'current_room' Attribute's Value into the 'old_room' Attribute, and then you store the current room Value (via using 'player.parent') into the 'current_room' Attribute.


to refresh a page...

if the Game Book has it, you can use the built-in 'ClearScreen' Function, and then re-run your page's scripts... though I'd have to look up what controls the activation/running/executing of a page's various scripts (such as the 'onenter' and 'onexit' Scripts, as well as the scripts you add to a page), maybe there's a single Function that does all of a page's scripts, otherwise, you got to re-run/re-call each of the various Functions or whatever that controls each of the types of scripts individually for a page (ie, 'onenter', 'onexit', and your own added scripts)


hegemonkhan! I said HegemonKing, sorry.

GameBook has ClearScreen. (but it just clears the text off the page and nothing else, as far a I can tell)

This is why I make alternating pages when counters/flags/etc. are changing. You can't refresh a page if it reintroduces the conditions you already set. If you keep refreshing a page that adds a gold to your coin purse, you just keep getting gold. Alternating pages fixes that.

Is there a "IfYouJustReloadedThePage" script? :)


Boolean Attributes ('flags', but I don't like the use of 'flags' for Booleans, as all Attributes are 'flags/indicators' of Values/Data, as that's what Attributes are, they store Values/Data. The reason is because 'flags' are used for Booleans, is because Booleans/Binary are dualistic, 2 state Data Types, which are used as toggle:on/off controls in networking packets, with assembly language, and circuitry/digital-logic design. Dualism = 2 states = opposite states = Booleans: true/false. Binary: 1/0, electrical charges: +:pos/-:neg, conceptually: on/off, true = 1 = on = +:pos, false = 0 = off = -:neg, etc etc etc various 2 states / dualism: in/out, up/down, left/right, ugly/sexy, tall/short, fat/skinny, weak/string, good/evil, lazy/active, mean/nice, etc etc etc) are simple and thus nice to use, and can manage multiple states, but they can be quite cumbersome (and managing multiple states is a bit cumbersome too)... for example:

the usage of (common) 'status effects' in RPGs:

player.poisoned = false
player.petrified = false
player.paralyzed = false
player.asleep = false
player.dead = false
player.unconscious = false
player.stunned = false
player.confused = false
player.silenced = false
player.blinded = false
etc etc etc
(yuck! too many Attributes!)

while this is simple to implement, if (player.poisoned) { msg ("you are poisoned") } else { msg ("You're NOT poisoned"), and easy to have multiple states at the same time (just change the desired Boolean Attributes from false to true and/or from true to false), it's quite cumbersome (you got a lot of Attributes to handle/manage/adjust)!


using String Attributes:

player.condition = "normal" // or: "poisoned", "petrified", "paralyzed", etc etc etc

(much better, much less Attributes!)

if (player.condition = "poisoned") {
  msg ("you're poisoned!")
} else if (player.condition = "petrified") {
  msg ("you're petrified!")
}
// etc etc etc

now, we only got a single Attribute to handle/manage/adjust, (and thus is very NOT cumbersome!), though we're stuck to having only a single state at a time (per String Attribute, anyways), when using String Attributes. And, using String Attributes (and thus having to use these string comparison operations is a bit more challenging to understand for those completely new to coding) is a bit more difficult than Boolean Attributes.


List Attributes:

player.condition_list = split ("poisoned; petrified; paralyzed", ";") // we can have however many and which-ever conditions, this example is howing you with having 3 conditions: poisoned, petrified, and paralyzed

list add (LIST, ITEM)
list remove (LIST, ITEM)

and many more functions: ListContains (LIST, ITEM), ListCount (LIST), combining/joining, splitting/separating, excluding, including, sorting, etc

Lists has the same characteristics as String Attributes, but you can have multiple states at a time (per List Attribute), however, this is the most complex to use, as you got to add/remove items from the list, and etc code work for doing various things and for their handling/management. But, if you know how to use Lists well, for large and/or complex games, they can save you a ton of work and be the most efficient/fast too. But, for very small and/or simple games, then they're more work than they're worth, and are less efficient and more slow than using Strings or Booleans.


Ok fuck this, I've been hiding it out of shame, but I'm about to code dump on you and ask you how to do it way better. Pretend that the Counters for the Player, Mulligan the Mischievous and Broth the Barbarian are already set in this case; they have certain amounts of Silver. I hand-coded this using my limited understanding of this bullshit. Now remember, there is an "Ante" page that changes a counter, and an alternate page that looks identical to this page below with the page links reversed (beither of which I'm pasting below), and I made a fully-working, VERY simple 33%-chance dice game.

How would you code this that would work in Gamebook mode, and make it WAY simpler? Remember, has to work in Gamebook mode. I'll paypal you 20 U.S. dollars if you do (by the way, there's some errant </b>s in there that makes like the last half of it all bolded and I'm not fixing that right now, but I have a working dice game of chance in one of my Inns right now, and I'm almost certain I can make this in 1,000 LESS lines of code but have no idea how:

SetFlagOff ("PlayerHeart")
SetFlagOff ("PlayerSword")
SetFlagOff ("PlayerShield")
SetFlagOff ("MulliganHeart")
SetFlagOff ("MulliganSword")
SetFlagOff ("MulliganShield")
SetFlagOff ("BrothHeart")
SetFlagOff ("BrothSword")
SetFlagOff ("BrothShield")
if (GetBoolean(game, "DiceStart")) {
ChangeCounter ("Silver", -1)
ChangeCounter ("MulliganSilver", -1)
ChangeCounter ("BrothSilver", -1)
}
// PLAYER ROLL
msg ("
You rolled:
")
if (RandomChance(33)) {
picture ("heart.jpg")
SetFlagOn ("PlayerHeart")
}
else {
if (RandomChance(50)) {
picture ("sword.jpg")
SetFlagOn ("PlayerSword")
}
else {
picture ("shield.jpg")
SetFlagOn ("PlayerShield")
}
}
// MULLIGAN ROLL
msg ("
Mulligan The Mischievous rolled:
")
if (RandomChance(33)) {
picture ("heart.jpg")
SetFlagOn ("MulliganHeart")
}
else {
if (RandomChance(50)) {
picture ("sword.jpg")
SetFlagOn ("MulliganSword")
}
else {
picture ("shield.jpg")
SetFlagOn ("MulliganShield")
}
}
// BROTH ROLL
msg ("
Broth The Barbarian rolled:
")
if (RandomChance(33)) {
picture ("heart.jpg")
SetFlagOn ("BrothHeart")
}
else {
if (RandomChance(50)) {
picture ("sword.jpg")
SetFlagOn ("BrothSword")
}
else {
picture ("shield.jpg")
SetFlagOn ("BrothShield")
}
}
// PLAYER WINS
if (GetBoolean (game, "PlayerHeart") and (GetBoolean (game, "MulliganSword") or GetBoolean (game, "MulliganShield")) and (GetBoolean (game, "BrothSword") or GetBoolean (game, "BrothShield"))) {
msg ("

YOU WIN {counter:DicePot} SILVER!")
msg ("Mulligan: {random:"Ya scurvy dog!":"Lucky roll.":"Nice one, kid.":"Let's roll again, shall we?":"You lout!":"I rolled my die wrong that time.":"Well played.":"Yer not done yet, are ya?":"I like this kid.":"Curse Pelor!":"May toads nibble yer toes.":"Seems yer the chosen one, this time."}")
SetCounter ("Silver", game.Silver + game.DicePot)
msg ("You now have {counter:Silver} silver.")
if (GetInt(game, "MulliganSilver") < 1) {
msg ("
MULLIGAN IS OUT OF SILVER!
Mulligan: "Evil conspiring strumpets! I am but a beggar now, out of coin and out of tricks. I'll take my leave. G'day to you both, toadies."
Broth: "Good game, Mulligan."
Mulligan: "No, it wasn't!"

At that, Mulligan the Mischievous pushes his chair back from the table and limps out of the Old Soul. It's only now that you notice his peg leg as the heavy oak door slams behind him.

THE GAME IS OVER FOR NOW.
You can return at a later time to see if other players join the table.")
AddPageLink (OldSoulDiceRoll, OldSoulReload, ""Thank you for the game." [Stand up from the table]")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceReroll)
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
SetFlagOn ("MulliganInTheWild")
}
else if (GetInt(game, "BrothSilver") < 1) {
msg ("
BROTH IS OUT OF SILVER!
Broth: "Broth lose all silver. Broth leave. Broth sleep."
Mulligan: "Go find some more silver, you pack mule!"
Broth: "Mulligan not nice."
Mulligan: "Broth not smart!"

At that, the hulking barbarian strides out of the Old Soul.

THE GAME IS OVER FOR NOW.
You can return at a later time to see if other players join the table.")
AddPageLink (OldSoulDiceRoll, OldSoulReload, ""Thank you for the game." [Stand up from the table]")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceReroll)
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
SetFlagOn ("BrothInTheWild")
}
else {
AddPageLink (OldSoulDiceRoll, OldSoulDiceAnte, "ANTE UP. [-1 Silver]")
AddPageLink (OldSoulDiceRoll, OldSoulReload, ""Thank you, gentlemen." [Stand up from the table]")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceReroll)
}
}
// MULLIGAN WINS
if (GetBoolean (game, "MulliganHeart") and (GetBoolean (game, "PlayerSword") or GetBoolean (game, "PlayerShield")) and (GetBoolean (game, "BrothSword") or GetBoolean (game, "BrothShield"))) {
msg ("

MULLIGAN WINS {counter:DicePot} SILVER.")
msg ("Mulligan: {random:"Ha! I'll take that silver!":"I'm the humblest of winners.":"Ante up again, ya squirrels! Wanna play some more?":"My piles o' silver grow!":"Silver wise, gold foolish I am.":"I've been known to win."}")
SetCounter ("MulliganSilver", game.MulliganSilver + game.DicePot)
msg ("Mulligan now has {counter:MulliganSilver} silver.")
if (GetInt(game, "Silver") < 1) {
msg ("
YOU ARE OUT OF SILVER.
Mulligan: "Come back and give us some more silver anytime! Har har!"
Broth: "Well fought battle. See you again."")
AddPageLink (OldSoulDiceRoll, OldSoulReload, ""Thank you for the game." [Stand up from the table]")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceReroll)
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
}
else if (GetInt(game, "BrothSilver") < 1) {
msg ("
BROTH IS OUT OF SILVER!
Broth: "Broth lose all silver. Broth leave. Broth sleep."
Mulligan: "Go find some more silver, you pack mule!"
Broth: "Mulligan not nice."
Mulligan: "Broth not smart!"

At that, the hulking barbarian strides out of the Old Soul.

THE GAME IS OVER FOR NOW.
You can return at a later time to see if other players join the table.")
AddPageLink (OldSoulDiceRoll, OldSoulReload, ""Thank you for the game." [Stand up from the table]")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceReroll)
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
SetFlagOn ("BrothInTheWild")
}
else {
msg ("You now have {counter:Silver} silver.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceAnte, "ANTE UP. [-1 Silver]")
AddPageLink (OldSoulDiceRoll, OldSoulReload, ""Thank you, gentlemen." [Stand up from the table]")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceReroll)
}
}
// BROTH WINS
if (GetBoolean (game, "BrothHeart") and (GetBoolean (game, "MulliganSword") or GetBoolean (game, "MulliganShield")) and (GetBoolean (game, "PlayerSword") or GetBoolean (game, "PlayerShield"))) {
SetCounter ("BrothSilver", game.BrothSilver + game.DicePot)
msg ("

BROTH WINS {counter:DicePot} SILVER.")
msg ("Broth: {random:"Broth like silver.":"Good day for dice.":"Broth roll dice like warrior swing sword.":"More silver for ale.":"They say this game of chance, I think this game of Broth."}")
msg ("Broth now has {counter:BrothSilver} silver.")
if (GetInt(game, "Silver") < 1) {
msg ("
YOU ARE OUT OF SILVER.
Mulligan: "Come back and give us some more silver anytime! Har har!"
Broth: "Well fought battle. See you again."")
AddPageLink (OldSoulDiceRoll, OldSoulReload, ""Thank you for the game." [Stand up from the table]")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceReroll)
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
}
else if (GetInt(game, "MulliganSilver") < 1) {
msg ("
MULLIGAN IS OUT OF SILVER!
Mulligan: "Evil conspiring strumpets! I am but a beggar now, out of coin and out of tricks. I'll take my leave. G'day to you both, toadies."
Broth: "Good game, Mulligan."
Mulligan: "No, it wasn't!"

At that, Mulligan the Mischievous pushes his chair back from the table and limps out of the Old Soul. It's only now that you notice his peg leg as the heavy oak door slams behind him.

THE GAME IS OVER FOR NOW.
You can return at a later time to see if other players join the table.")
AddPageLink (OldSoulDiceRoll, OldSoulReload, ""Thank you for the game." [Stand up from the table]")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceReroll)
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
SetFlagOn ("MulliganInTheWild")
}
else {
msg ("You now have {counter:Silver} silver.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceAnte, "ANTE UP. [-1 Silver]")
AddPageLink (OldSoulDiceRoll, OldSoulReload, ""Thank you, gentlemen." [Stand up from the table]")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceReroll)
}
}
// THREE SWORDS
if (GetBoolean(game, "PlayerSword")) {
if (GetBoolean(game, "MulliganSword")) {
if (GetBoolean(game, "BrothSword")) {
msg ("

THREE SWORDS!")
if (GetInt(game, "Silver") < game.DicePot) {
msg ("Mulligan: Uh oh, looks like little squirrel can't match the pot!")
msg ("You indeed lack the silver to complete the bet.")
msg ("No one antes.")
msg ("
THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else if (GetInt(game, "BrothSilver") < game.DicePot) {
msg ("Mulligan: Ar! Looks like our pal Brothy can't match the pot!")
msg ("Broth indeed lacks the silver to complete the bet.")
msg ("No one antes.")
msg ("
THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else if (GetInt(game, "MulliganSilver") < game.DicePot) {
msg ("Broth: Mulligan almost out of silver. Heh.
Mulligan: Piss off, sword-sitter!")
msg ("Mulligan indeed lacks the silver to complete the bet.")
msg ("No one antes.")
msg ("
THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
msg ("Broth: {random:"Broth like swords.":"Swords good, means more silver in pot."}")
msg ("Mulligan: {random:"Ar, we're gettin' stab-happy, match the pot!":"Match the pot, ye toads!"}")
SetCounter ("Silver", game.Silver - game.DicePot)
SetCounter ("MulliganSilver", game.MulliganSilver - game.DicePot)
SetCounter ("BrothSilver", game.BrothSilver - game.DicePot)
msg ("Everyone matches the pot. [-{counter:DicePot} Silver]")
msg ("You now have {counter:Silver} silver.")
msg ("Mulligan now has {counter:MulliganSilver} silver.")
msg ("Broth now has {counter:BrothSilver} silver.")
SetCounter ("DicePot", game.DicePot + game.DicePot + game.DicePot + game.DicePot)
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
// THREE SHIELDS
if (GetBoolean(game, "PlayerShield")) {
if (GetBoolean(game, "MulliganShield")) {
if (GetBoolean(game, "BrothShield")) {
msg ("

THREE SHIELDS!")
if (GetInt(game, "Silver") < 1) {
SetCounter ("Silver", 0)
msg ("Mulligan: Uh oh, looks like our little beaver is out of silver!")
msg ("You indeed lack the silver to complete the bet.")
msg ("No one antes.")
msg ("
THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else if (GetInt(game, "MulliganSilver") < 1) {
SetCounter ("MulliganSilver", 0)
msg ("Broth: Mulligan too broke to bet. Ha.
Mulligan: Not for long!")
msg ("Mulligan indeed lacks the silver to complete the bet.")
msg ("No one antes.")
msg ("
THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else if (GetInt(game, "BrothSilver") < 1) {
SetCounter ("BrothSilver", 0)
msg ("Mulligan: What's this? The dumb barbarian is almost broke?")
msg ("Broth indeed lacks the silver to complete the bet.")
msg ("No one antes.")
msg ("
THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
msg ("Broth: {random:"Broth like shields.":"Shields good."}")
msg ("Mulligan: {random:"Now it's gettin' a bit more interestin'.":"E'rryone ante up, ya squirrels!"}")
ChangeCounter ("Silver", -1)
ChangeCounter ("MulliganSilver", -1)
ChangeCounter ("BrothSilver", -1)
msg ("Everyone antes another silver. [-1 Silver]")
msg ("You now have {counter:Silver} silver.")
msg ("Mulligan now has {counter:MulliganSilver} silver.")
msg ("Broth now has {counter:BrothSilver} silver.")
ChangeCounter ("DicePot", 3)
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
// MULLIGAN LOSES
if (GetBoolean(game, "PlayerHeart")) {
if (GetBoolean(game, "BrothHeart")) {
if (GetBoolean(game, "MulliganSword")) {
msg ("

TWO HEARTS BEAT MULLIGAN'S SWORD!")
msg ("Mulligan: "Son of a-"
Broth: "Ante up, Mulligan."")
if (GetInt(game, "MulliganSilver") < 1) {
SetCounter ("MulliganSilver", 0)
msg ("Mulligan is out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("MulliganSilver", -1)
msg ("Mulligan antes another silver.")
msg ("Mulligan now has {counter:MulliganSilver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
if (GetBoolean(game, "PlayerHeart")) {
if (GetBoolean(game, "BrothHeart")) {
if (GetBoolean(game, "MulliganShield")) {
msg ("

TWO HEARTS BEAT MULLIGAN'S SHIELD!")
msg ("Mulligan: "Yer gangin' up on me."
Broth: "More silver, Mulligan."")
if (GetInt(game, "MulliganSilver") < 1) {
SetCounter ("MulliganSilver", 0)
msg ("Mulligan is out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("MulliganSilver", -1)
msg ("Mulligan antes another silver.")
msg ("Mulligan now has {counter:MulliganSilver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
if (GetBoolean(game, "PlayerSword")) {
if (GetBoolean(game, "BrothSword")) {
if (GetBoolean(game, "MulliganShield")) {
msg ("

TWO SWORDS BEAT MULLIGAN'S SHIELD!")
msg ("Mulligan: "Treachery!"
Broth: "Two swords beat one shield, Mulligan."")
if (GetInt(game, "MulliganSilver") < 1) {
SetCounter ("MulliganSilver", 0)
msg ("Mulligan is out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("MulliganSilver", -1)
msg ("Mulligan antes another silver.")
msg ("Mulligan now has {counter:MulliganSilver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
if (GetBoolean(game, "PlayerShield")) {
if (GetBoolean(game, "BrothShield")) {
if (GetBoolean(game, "MulliganSword")) {
msg ("

TWO SHIELDS BEAT MULLIGAN'S SWORD!")
msg ("Mulligan: "Unfair!"
Broth: "You stab with one sword, we block with two shield. Ante, Mulligan."")
if (GetInt(game, "MulliganSilver") < 1) {
SetCounter ("MulliganSilver", 0)
msg ("Mulligan is out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("MulliganSilver", -1)
msg ("Mulligan antes another silver.")
msg ("Mulligan now has {counter:MulliganSilver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
// PLAYER LOSES
if (GetBoolean(game, "MulliganHeart")) {
if (GetBoolean(game, "BrothHeart")) {
if (GetBoolean(game, "PlayerSword")) {
msg ("

TWO HEARTS BEAT YOUR SWORD.")
msg ("Mulligan: {random:"Ante up, ye scurvy dog!":"Another silver piece, boot-licker!":"Sorry kid, ante up.":"Put another silver in the pot, toad!":"I like playin' with you, you like to lose."}")
if (GetInt(game, "Silver") < 1) {
SetCounter ("Silver", 0)
msg ("You are out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("Silver", -1)
msg ("You ante another silver. [-1 Silver]")
msg ("You now have {counter:Silver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
if (GetBoolean(game, "MulliganHeart")) {
if (GetBoolean(game, "BrothHeart")) {
if (GetBoolean(game, "PlayerShield")) {
msg ("

TWO HEARTS BEAT YOUR SHIELD.")
msg ("Mulligan: {random:"Ante up, ye scurvy dog!":"Another silver piece, boot-licker!":"Sorry kid, ante up.":"Put another silver in the pot, toad!":"I like playin' with you, you like to lose."}")
if (GetInt(game, "Silver") < 1) {
SetCounter ("Silver", 0)
msg ("You are out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("Silver", -1)
msg ("You ante another silver. [-1 Silver]")
msg ("You now have {counter:Silver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
if (GetBoolean(game, "PlayerSword")) {
if (GetBoolean(game, "BrothShield")) {
if (GetBoolean(game, "MulliganShield")) {
msg ("

TWO SHIELDS BEAT YOUR SWORD.")
msg ("Mulligan: {random:"Ante up, ye scurvy dog!":"Another silver piece, boot-licker!":"Sorry kid, ante up.":"Put another silver in the pot, toad!":"I like playin' with you, you like to lose."}")
if (GetInt(game, "Silver") < 1) {
SetCounter ("Silver", 0)
msg ("You are out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("Silver", -1)
msg ("You ante another silver. [-1 Silver]")
msg ("You now have {counter:Silver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
if (GetBoolean(game, "PlayerShield")) {
if (GetBoolean(game, "BrothSword")) {
if (GetBoolean(game, "MulliganSword")) {
msg ("

TWO SWORDS BEAT YOUR SHIELD.")
msg ("Broth: {random:"Our swords break your shield.":"So many sword, so few shield.":"We stab twice, you block once.":"You lose.":"Broth don't like Mulligan, but Broth like beating you."}")
if (GetInt(game, "Silver") < 1) {
SetCounter ("Silver", 0)
msg ("You are out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("Silver", -1)
msg ("You ante another silver. [-1 Silver]")
msg ("You now have {counter:Silver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
// BROTH LOSES
if (GetBoolean(game, "PlayerHeart")) {
if (GetBoolean(game, "MulliganHeart")) {
if (GetBoolean(game, "BrothSword")) {
msg ("

TWO HEARTS BEAT BROTH'S SWORD!")
msg ("Broth: "Love conquers my sword. Broth sad."
Mulligan: "Well I love your silver! Ante, ya half-wit sell-sword!"")
if (GetInt(game, "BrothSilver") < 1) {
SetCounter ("BrothSilver", 0)
msg ("Broth is out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("BrothSilver", -1)
msg ("Broth antes another silver.")
msg ("Broth now has {counter:BrothSilver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
if (GetBoolean(game, "PlayerHeart")) {
if (GetBoolean(game, "MulliganHeart")) {
if (GetBoolean(game, "BrothShield")) {
msg ("

TWO HEARTS BEAT BROTH'S SHIELD.")
msg ("Broth: "Too many hearts for Broth's shield."
Mulligan: "I have a heart for your silver, though! Ante, you dumb barbarian!"")
if (GetInt(game, "BrothSilver") < 1) {
SetCounter ("BrothSilver", 0)
msg ("Broth is out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("BrothSilver", -1)
msg ("Broth antes another silver.")
msg ("Broth now has {counter:BrothSilver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
if (GetBoolean(game, "PlayerSword")) {
if (GetBoolean(game, "MulliganSword")) {
if (GetBoolean(game, "BrothShield")) {
msg ("

TWO SWORDS BEAT BROTH'S SHIELD!")
msg ("Broth: "Too many sword to block."
Mulligan: "Get yer silver in there."")
if (GetInt(game, "BrothSilver") < 1) {
SetCounter ("BrothSilver", 0)
msg ("Broth is out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("BrothSilver", -1)
msg ("Broth antes another silver.")
msg ("Broth now has {counter:BrothSilver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
if (GetBoolean(game, "PlayerShield")) {
if (GetBoolean(game, "MulliganShield")) {
if (GetBoolean(game, "BrothSword")) {
msg ("

TWO SHIELDS BEAT BROTH'S SWORD!")
msg ("Broth: "I can't beat two shield with one sword."
Mulligan: "I thought you could kill two men with one blow! Grease the pot, ya mercenary."")
if (GetInt(game, "BrothSilver") < 1) {
SetCounter ("BrothSilver", 0)
msg ("Broth is out of silver pieces! No one antes. Roll the dice.")
msg ("THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
ChangeCounter ("DicePot", 1)
ChangeCounter ("BrothSilver", -1)
msg ("Broth antes another silver.")
msg ("Broth now has {counter:BrothSilver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}
// LOVE TRIANGLE
if (GetBoolean(game, "PlayerHeart")) {
if (GetBoolean(game, "MulliganHeart")) {
if (GetBoolean(game, "BrothHeart")) {
msg ("

LOVE TRIANGLE!")
if (GetInt(game, "Silver") < game.DicePot + game.DicePot) {
msg ("Mulligan: Uh oh, looks like little squirrel can't double the pot!")
msg ("You indeed lack the silver to complete the bet.")
msg ("No one antes.")
msg ("
THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else if (GetInt(game, "BrothSilver") < game.DicePot + game.DicePot) {
msg ("Mulligan: Ar! Looks like our pal Brothy can't double the pot!")
msg ("Broth indeed lacks the silver to complete the bet.")
msg ("No one antes.")
msg ("
THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else if (GetInt(game, "MulliganSilver") < game.DicePot + game.DicePot) {
msg ("Broth: Mulligan almost out of silver. Heh.
Mulligan: Piss off, sword-sitter!")
msg ("Mulligan indeed lacks the silver to complete the bet.")
msg ("No one antes.")
msg ("
THE POT REMAINS {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
else {
msg ("Mulligan: "Ho-HO! This is what I play for! E'rryone double the pot! Good luck, ya toads!"")
msg ("Broth: "Big silver in pot now, Broth like."")
SetCounter ("DicePotDouble", game.DicePot + game.DicePot)
msg ("Everyone loudly shoves {counter:DicePotDouble} silver into the middle of the table.")
SetCounter ("BrothSilver", game.BrothSilver - game.DicePot - game.DicePot)
SetCounter ("Silver", game.Silver - game.DicePot - game.DicePot)
SetCounter ("MulliganSilver", game.MulliganSilver - game.DicePot - game.DicePot)
SetCounter ("DicePot", game.DicePot + game.DicePot + game.DicePot + game.DicePot + game.DicePot + game.DicePot + game.DicePot)
msg ("You now have {counter:Silver} silver.")
msg ("THE POT IS NOW {counter:DicePot} SILVER.")
AddPageLink (OldSoulDiceRoll, OldSoulDiceReroll, "ROLL THE DICE.")
RemovePageLink (OldSoulDiceRoll, OldSoulDiceAnte)
RemovePageLink (OldSoulDiceRoll, OldSoulReload)
}
}
}
}


Khan is asian (mongolian) and arabic word for leader
King is a(n) (european, egyptian) word for leader

they're the same thing... but Khan is much more cool, hehe :D

(Egyptian leaders are kings and queens - just like in europe, and NOT pharoahs. Pharoah means 'great house', but europeans have wrongly used 'pharaohs' for the names/titles of egyptian leaders, and now it's become popular, even though it's incorrect)

Greek:
hegemon = warlord
hegemony = rule by warlord (rule by 'force' as you'll see in stupid dictionaries)
hegemonic (adjective: of/like a warlord or of/like qualities of a warlord)

(these are actual words, only heard in U.S. by politicians talking about political stuff: the hegemonic U.S., the hegemony of the U.S., etc etc etc)

(so, no, 'hegemon', is not a type of pokemon/digimon, lol ... sighs)

HegemonKhan = leader of the warlords :D

(I like history, and I love the mongols, the greatest force of humanity of all time, though the Vikings can be reasonably-arguably tied with mongols, as the two greatest forces of humanity of all time, and too bad they never clashed/fought against each other, sighs. As, as much as I also love the vikings, who're very awesome too, the mongols would still pwn the vikings, hehe)

(genghis khan: genghis = great, khan = leader, genghis khan = great leader, thus genghis khan is a title, not a name. His actual name was Chinghis or Tetujan.. --- can't spell and too lazy to look up at the moment, lol)


I certainly don't care what you call me, lol

though I'd recommend not typing out hegemonkhan... too long!

HK, hk, hege, heg, hegemon, khan, kahn, mon, (and some people forget that hegemon has two E's): hag , hage, hagekhan, etc... or... pokemon/digimon (I'll know you're refering to me)... lol

whichever is used, I don't care, I'll know it's me, lol.


the 'ClearScreen' Function is just for clearing the screen

you'd certainly need to actually refresh the page too (re-do/re-call all of the page's scripts so whatever that needs to be done gets done and whatever needs to be displayed get displayed, effectively "refreshing" the page), of course.


also, when you want to post code (or walls of text... mainly my problem/issue/usage/doing, lol), you do this (as it preserves all of the formatting: indenting and etc):

m```
(paste your code, or walls of text lol, here)
m```

but without the m's in front, which will produce this:

(paste your code, or walls of text lol, here)

those weird characters/symbols is the keyboard key above the left TAB key and to the left of the '1' key (of the horizontal row of numbers at the top of your keyboard).


"This is why I make alternating pages when counters/flags/etc. are changing. You can't refresh a page if it reintroduces the conditions you already set. If you keep refreshing a page that adds a gold to your coin purse, you just keep getting gold. Alternating pages fixes that. (Major Powers)"

that's certainly true, you'd NOT want to re-run/re-do these Scripts for your effect of "refreshing" the page!


I'm too lazy at the moment to try to look up how to refresh a Page...

but I think you can probably move the player to the same page to "refresh" the page, as it'll do all the page's scripts again, as it does when you move to any page, as this is built into quest (which I'm too lazy to look up and see how it does the page's scripts upon going to a new page, meh):

player.parent = NAME_OF_SAME_PAGE_YOUR_CURRENTLY_WITHIN
// or (maybe the above wouldn't work in scripting for re-activing, "refreshing", the Page's scripts):
MoveObject (player, NAME_OF_SAME_PAGE_YOUR_CURRENTLY_WITHIN) // or is it: MovePlayer (NAME_OF_SAME_PAGE_YOUR_CURRENTLY_WITHIN), meh (whatever is the name of this moving-helper Function in Game Book)

// also, you'd still have the issue of your (well pointed out issue of any) added scripts that you don't want to be re-done upon "refreshing" the page.

// does the Game Book have the 'firsttime/otherwise' Script/Function ???
// you can use this if it has it, though this would make the nested scripts be a one-time only occurence

// otherwise, you can create your own control for it yourself, for example:

'NAME_OF_YOUR_STARTING_PAGE' Page -> 'Page' Tab -> Page Type: [script] or [text+script]

game.state = 0 // GUI/Editor: add new script -> 'variables' section/category -> 'set a variable or attribute' Script -> set variable game.state = [EXPRESSION] 0

your various 'NAME_OF_WHATEVER_PAGE' Pages -> 'Page' Tab -> Page Type: [script] or [text+script]

if (game.state = 99) {
  player.currency = player.currency + 50

} else if (game.state = 50) {
  player.currency = player.currency - 200
} else if (game.state = 0) {
  do (this, "full_page_description")
} else if (game.state = 1) {
  do (this, "quick_page_description")
}
// probably you want to return the 'game.state' to some default value for before when you go to move again:
// game.state = 0

// and of course, within your various Pages, you'll have to control/manage/adjust/change (via scripting) what 'game.state' you're in (game.state = ?) as you want/need such to be in (or not in) such 'game.state' Values/states

Yeah, I know what Khans are and I love them. Now check out my code dump above. Look at what I did to myself. I made all that bullshit for a 3 player, three-sided dice game. I wrote that whole thing out by hand using gamebook bullshit and not knowing how to code. There has to be a way to write that in like 1/3rd of the code.


as for 'refactoring' (stream-lining, making better: more concise/effcient) your code:

unfortunately, it's more of an art (takes a lot of experience), as we're talking about design...
(this is the next stuff you start to learn after you learn the basics of scripting and using the language in actual programming course)

which, I don't have much experience with myself.

you got to try to think in a 'top-down (top to down)' approach...

with the upper stuff doing very little, and the bottom-most stuff doing all the heavy duty actual stuff.

my 'python language' book from/for my class required material, has a walkthrough on making a somewhat similar game (I think it's a volleyball sim), explaining each step and the thought process of it, but that'd be too much for me to try to write/post here...

in general it's something like this:

the highest level handles whether you want to do another game or not:quit, and displays your score (games/matches won, games/matches lost, games/matches tied -- whatever is the correct volleyball terminology lol)

the next level handles your game/match (the rounds, management of all the process/stuff that happens in a round like who's serving and etc - but still not the actual bulk work of equations/mechanics/calculations/attribute-stat-adjustments of the stuff you do in a round, until you win, lose, or tie the game/match - repeating rounds until done)

lowest level handles all the actual action/stuff of the volleyball game (for example your action-choices and the coding for them as well as the A.I./random controls for its actions and the coding for them) ... like 90% of everything is done here.


you can change these from Boolean Attributes to String Attributes, which will/should reduce some of your code:

SetFlagOff ("PlayerHeart")
SetFlagOff ("PlayerSword")
SetFlagOff ("PlayerShield")
to
player.card = "unknown" // or: null // null = (blank) // and when you roll, you set it to the card you rolled: player.card = "heart" // or: player.card = "sword" // or: player.card = "shield"
(and adjust the rest of your mass of code... for it)

SetFlagOff ("MulliganHeart")
SetFlagOff ("MulliganSword")
SetFlagOff ("MulliganShield")
to
game.mulligan_card = "unknown"

SetFlagOff ("BrothHeart")
SetFlagOff ("BrothSword")
SetFlagOff ("BrothShield")
to
game.broth_card = "unknown"


also, look for any redundencies of actions/events of your game's/round's parts/designs and/or code parts:

for example, instead of coding for each of them winning/losing/tying, instead, code for what happens when you: win, lose, or tie, and have the scripting of each of these handles who (of broth and/or mulligan) wins, losses, and ties, aka, do whatever you want based upon that


this most likely won't be of any help to you:

http://textadventures.co.uk/forum/games/topic/4094/rock-paper-scissors-game-by-hk

I made this back when i was learning to code, and it's far more simple than your game, and probably there's a way to make it more efficient... maybe I can figure out how now or maybe not, lol.

I still struggle with re-factoring and good/efficient designs myself... I'm still a coding and programming noob, sighs.


I love that. You're using switches. But I still have to track if someone gets to 0 money in the game --- that's the big kicker, I need every condition of the game to account for how much money everyone has. If any one of the possible rolls are rolled where someone runs out of money, the game has to end. And I can't find a universal way to write it. I'm writing it in for every "condition." That's really what makes the code so long... Ouch. I don't care, honestly, it works and I've moved on, I'm just ashamed because I know someone could look at that and go, "wow you all you have to do is x, y, and z!"


try to look for redundency in your conditions and try come up with ways to reduce your (redundant) conditions to fewer (or best: 1) condition(s). Try to think more in terms of macro (top to down / top-down) design, try to completely re-think/re-design your entire code structure/design, completely new/different from the way you went about it and have it currently as, try to think of how to do all of your coding based upon something like this:

upper-most (top-most level/layer/function(s)/etc)
1. handling continuing/quiting and/or displayment of score (wins, losses, ties of all of the card players or just of you)
2. handling the game/round/hand sequence/process, and/or earnings/losses (of each of the card players and the game pile)
3. handling the actions/mechanics of the various processes/sequence of the game/round
lower-most (bottom-most level/layer/function(s)/etc)

as, this can greatly reduce all that redundency and mass of code you got... if you (or I too lol) can figure it out.... or maybe one of the good programmers can help us figure out how to do such a design... lol


you could also do something like this:

game.winner = "unknown"
game.loser = "unknown"
game.tie_list = split ("unknown", ";")

// playing the game/round/hand, you determine who wins, losses, and/or ties (#2 or #3 in the top-down design), and set the Attributes accordingly

// in #2 of the top-down design:
// for each of your conditions: you'd just call this function as one of your scripts:
<function name="currency_function">
  if (game.winner = "player") {
    player.currency = player.currency + game.currency_pile
    game.mulligan_currency = game.mulligan_currency - game.currency_pile
    game.broth_currency = game.broth_currency - game.currency_pile
  } else if (game.winner = "mulligan") {
    game.mulligan_currency = game.mulligan_currency + game.currency_pile
    player.currency = player.currency - game.currency_pile
    game.broth_currency = game.broth_currency - game.currency_pile
  } else if (game.winner = "broth") {
    game.broth_currency = game.broth_currency + game.currency_pile
    player.currency = player.currency - game.currency_pile
    game.mulligan_currency = game.mulligan_currency - game.currency_pile
  }
  // then this is done (doing this comment to show that this is a separate 'if' block from the one above):
  if (player.currency < 0) {
    // blah
    // finish (as the game is over, unless you got a way to get more currency to keep playing)
  } else if (game.broth_currency < 0) {
    // blah
  } else if (game.broth_currency < 0) {
    // blah
  }
</function>

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums