How would one make classes?
BritishAmerican
12 Apr 2013, 21:47Hello, everyone! I've ran myself into a problem...
I'm currently working on my first Text Adventure and I wanted to give the player a choice of classes plus dialogue that would come from NPC's due to their classes and gender, for example: I have this class called a technomancer (basically Wizard) and what I was hoping to do is that when someone chooses this they have a set health, mana and inventory and say they went up to an NPC the NPC will act accordingly to the class they chose (I was also wanting to do this with gender), so the player can get fully immersed into the game. Yet I have no idea where to start
I'm a complete noob when it comes to coding but up to now the only complicated looking code I've used was an intro that uses the name the player put
So what I'm asking is if anyone knows any good guides on the subject or know themselves how to do it and are willing to bestow the knowledge, I've looked through this forum already and found nothing or accidently looked over what I was exactly looking for.
Any help would be great and if you need anything to help understand, I'll try my best
I'm currently working on my first Text Adventure and I wanted to give the player a choice of classes plus dialogue that would come from NPC's due to their classes and gender, for example: I have this class called a technomancer (basically Wizard) and what I was hoping to do is that when someone chooses this they have a set health, mana and inventory and say they went up to an NPC the NPC will act accordingly to the class they chose (I was also wanting to do this with gender), so the player can get fully immersed into the game. Yet I have no idea where to start

So what I'm asking is if anyone knows any good guides on the subject or know themselves how to do it and are willing to bestow the knowledge, I've looked through this forum already and found nothing or accidently looked over what I was exactly looking for.
Any help would be great and if you need anything to help understand, I'll try my best

Sora574
12 Apr 2013, 22:40Okay, so this is all off the top of my head -- there may be a few bugs... Also, sorry if it seems too advanced. I've been figuring out Quest's secrets lately -- but I'll try not to include anything too difficult
First thing, though:
[list=1][*]Go to 'game' and click the 'Attributes' tab.[/*:m]
[*]Under 'Attributes', click 'Add', and name it 'technomancer'[/*:m]
[*]On the bottom of the screen, click the dropdown box and set it to 'String dictionary'[/*:m]
[*]Add to the dictionary. The names should be the same names as any status attributes you're going to create, and the values should be the starting numbers of those attributes for the 'technomancer' class. (For example, 'hp', with a value of '125', and 'mana' with a value of '80')[/*:m]
[*]Go back to the game 'Attributes' and click 'add', name it 'technomancer_inv'[/*:m]
[*]Change it to a 'String list' and add the names of whatever objects the player will start out with if you are a 'technomancer'[/*:m]
[*]Repeat steps 1-6 for any classes you want[/*:m]
[*]Make another 'String list' and name it 'classes'. Add all of the names of the classes to it[/*:m]
[*]Add this to your 'start' script:
Then, later, for NPCs or whatever else, you can call the 'player.class' attribute and then make them say/do whatever you want according to class.
Hope that helps.
EDIT: Oops, forgot about the inventory. Added to the code. (Sorry about that) Also, forgot to mention that you can also make 'changedhp' and 'changedmana' scripts so they don't go above or below set numbers. If you want more info on this, just ask
First thing, though:
[list=1][*]Go to 'game' and click the 'Attributes' tab.[/*:m]
[*]Under 'Attributes', click 'Add', and name it 'technomancer'[/*:m]
[*]On the bottom of the screen, click the dropdown box and set it to 'String dictionary'[/*:m]
[*]Add to the dictionary. The names should be the same names as any status attributes you're going to create, and the values should be the starting numbers of those attributes for the 'technomancer' class. (For example, 'hp', with a value of '125', and 'mana' with a value of '80')[/*:m]
[*]Go back to the game 'Attributes' and click 'add', name it 'technomancer_inv'[/*:m]
[*]Change it to a 'String list' and add the names of whatever objects the player will start out with if you are a 'technomancer'[/*:m]
[*]Repeat steps 1-6 for any classes you want[/*:m]
[*]Make another 'String list' and name it 'classes'. Add all of the names of the classes to it[/*:m]
[*]Add this to your 'start' script:
show menu ("Select a class.", game.classes, false) {
player.class = result
if (player.statusattributes = null) {
player.statusattributes = NewStringDictionary()
}
dictionary add (player.statusattributes, "hp", "HP: !")
dictionary add (player.statusattributes, "mana", "")
if (player.class = "technomancer") {
player.hp = ToInt(game.technomancer["hp"])
player.mana = ToInt(game.technomancer["mana"])
foreach (name, game.technomancer_inv) {
obj = GetObject(name)
AddToInventory(obj)
}
}
//Code for other classes goes here, in the same format
}
[/*:m][/list:o]Then, later, for NPCs or whatever else, you can call the 'player.class' attribute and then make them say/do whatever you want according to class.
Hope that helps.
EDIT: Oops, forgot about the inventory. Added to the code. (Sorry about that) Also, forgot to mention that you can also make 'changedhp' and 'changedmana' scripts so they don't go above or below set numbers. If you want more info on this, just ask
HegemonKhan
13 Apr 2013, 07:03I've done this a few times, though my posts are probably lost in threads that are now some forum pages deep, but you can look for threads that are for noobs, if I remember where I've posted in, lol. but, here I go again...
NOTE 1: this is for v5.3, so if you're using v5.4, this then, may not help you...
NOTE 2: I did this "on the fly", so there's probably mistakes, so let me know if you need any help at all with this, and~or if this isn't working correctly too.
CHARACTER CREATION (and their initial~starting stats~attributes based upon their gender, race, and class)
Object (left pane, the "tree of stuff") -> Game (left pane, the "tree of stuff", click on it to highlight it) -> Script (Tab, right pane) -> Start Script (right pane) -> (see below the: VVVVVVVV)
~OR~
Object (left pane, the "tree of stuff") -> Game (left pane, the "tree of stuff", click on it to highlight it) -> Script (Tab, right pane) -> Start Script (right pane) -> Add a script (right pane) -> Scripts -> Call function ->
Call function character_creation_function with parameters -> add (box) -> (leave blank, don't add any parameters)
Function (left pane, the "tree of stuff") -> Function (right pane) -> Add ->
Name: character_creation_function
Return Type: [None]
Parameters: (leave blank, don't add any parameters)
Script -> (see below the: VVVVVVVV)
VVVVVVVVVV
Add new script -> Output -> Print a message -> Print [EXPRESSION] "What is your name?"
Add new script -> Output -> Get input -> Get input, then run script ->
-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.alias = [EXPRESSION] result
-> Add new script -> Output -> Print a message -> Print [EXPRESSION] " - " + game.pov.alias
-> Add new script -> Output -> Show a menu ->
-> Show menu with [text] "What is your gender?"
-> Options from list/dictionary split ("male;female",";")
-> Allow player to cancel [yes/no ~ your choice]
-> After choosing, run script ->
->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.gender = [EXPRESSION] result
->-> Add new script -> Output -> Show a menu ->
->-> Show menu with [text] "What is your race?"
->-> Options from list/dictionary split ("human;dwarf;elf;orc",";")
->-> Allow player to cancel [yes/no ~ your choice]
->-> After choosing, run script ->
->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.race = [EXPRESSION] result
->->-> Add new script -> Output -> Show a menu ->
->->-> Show menu with [text] "What is your class?"
->->-> Options from list/dictionary split ("technomancer ~ your wizard;warrior;cleric;thief",";")
->->-> Allow player to cancel [yes/no ~ your choice]
->->-> After choosing, run script ->
->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.class = [EXPRESSION] result
->->->-> Add new script -> Output -> Print a message -> Print [EXPRESSION] game.pov.alias + " is a " + game.pov.gender + " " + game.pov.race + " " + game.pov.class +"."
->->->-> Add new script -> Scripts -> Switch... ->
->->->-> Switch: game.pov.gender
->->->->-> Cases: Add -> Add (do again as needed) ->
->->->->->-> Case Expression: "male"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.endurance = [EXPRESSION] game.pov.endurance + 1
->->->->->-> Case Expression: "female"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.agility = [EXPRESSION] game.pov.agility + 1
->->->-> Switch: game.pov.race
->->->->-> Cases: Add -> Add (do again as needed) ->
->->->->->-> Case Expression: "human"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.endurance = [EXPRESSION] game.pov.endurance + 1
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.agility = [EXPRESSION] game.pov.agility + 1
->->->->->-> Case Expression: "dwarf"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.strength = [EXPRESSION] game.pov.strength + 1
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.endurance = [EXPRESSION] game.pov.endurance + 1
->->->-> Switch: game.pov.class
->->->->-> Cases: Add -> Add (do again as needed) ->
->->->->->-> Case Expression: "technomancer"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.intelligence = [EXPRESSION] game.pov.intelligence + 2
->->->->->-> Case Expression: "cleric"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.spirituality = [EXPRESSION] game.pov.spirituality + 2
->->->-> Add new script -> output -> Wait for key press -> Wait for key press, then run script ->
->->->->-> Output -> Clear the screen
here's an example of how the character creation script block looks in code (it's missing the "switch" script stuff though):
CREATE THE "CHARACTER" OBJECT TYPE ("TYPE") AND THEN ADD ITS ATTRIBUTES (HP and MP):
Advanced (left pane, the "tree of stuff", click on the "+" to see its subcategories) -> Object Types (left pane, the tree of stuff", click on it to highlight it) -> Object Types (right pane) -> Add ->
Name: character_type
Advanced (left pane) -> Object Types (left pane) -> character_type (left pane) -> Type (tab, right pane) -> Attributes (box at bottom) -> Add (do again for "max_hp", "cur_mp", "max_mp", "strength", "endurance", "dexterity", "agility", "speed", "intelligence", "spirituality", "mentality", and "luck") ->
Name: cur_hp
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: max_hp
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: cur_mp
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: max_mp
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: strength
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: endurance
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: dexterity
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: agility
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: speed
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: intelligence
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: spirituality
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: mentality
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: luck
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
ADD THE INHERITED TYPE (OBJECT TYPE, ALSO KNOWN AS JUST "TYPE" TOO) "CHARACTER_TYPE" FOR EACH OF YOUR PLAYER OBJECTS (such as the default player object, "player"):
"player" (do this for each of your player objects) -> Attributes (tab) -> Inherited Types (box in the middle) -> Add -> (scroll down to the bottom) -> character_type
ADD THE ATTRIBUTES (TURNS, HP, MP, and etc) FOR YOUR GAME OBJECT:
Game -> Attribute (tab) -> Attributes (box at bottom) -> Add (do again for "hp", "mp", "strength", "endurance", "dexterity", "agility", "speed", "intelligence", "spirituality", "mentality", and "luck") ->
Name: turns
Type: [INTEGER]
Value: 0
Name: hp
Type (the small dropdown box that now appears): [STRING]
Value (it appears now too): 0 / 0
Name: mp
Type (the small dropdown box that now appears): [STRING]
Value (it appears now too): 0 / 0
Name: strength
Type: [INTEGER]
Value: 0
Name: endurance
Type: [INTEGER]
Value: 0
Name: dexterity
Type: [INTEGER]
Value: 0
Name: agility
Type: [INTEGER]
Value: 0
Name: speed
Type: [INTEGER]
Value: 0
Name: intelligence
Type: [INTEGER]
Value: 0
Name: spirituality
Type: [INTEGER]
Value: 0
Name: mentality
Type: [INTEGER]
Value: 0
Name: luck
Type: [INTEGER]
Value: 0
ADD THE STATUS ATTRIBUTES (what will be displayed to the game player in the status pane on the right side, for example, hp: 999 / 999, mp: 999 / 999, turns: 0, strength, and etc) FOR YOUR GAME OBJECT:
Game -> Attributes (tab) -> Status Attributes (box at top) -> Add (do again for "hp", "mp", "Strength", and etc etc etc) ->
Name~Key: turns
Format String~Value: (leave blank)
Name~Key: hp
Format String~Value: (leave blank)
Name~Key: mp
Format String~Value: (leave blank)
Name~Key: strength
Format String~Value: (leave blank)
etc etc etc
CREATE THE TURNSCRIPT FOR THE COMPLETION OF STUFF AND ALSO HE REST OF THE NEEDED STUFF:
Object (left pane, the "tree of stuff", click on it so it is highlighted) -> click on "Add" (at the very top: File ~ Edit ~ Add ~ Tools ~ Help) -> choose: turn script ->
Object (left pane) -> Turn Script (left pane) -> Turn Script (tab) -> it should look like this (add in the things shown below):
Turn script
Turn Script (tab)
Name: omni_turn_turnscript
[X] Enable when the game begins
Script: (small script tool bar) ->
Add new script -> Variables -> Set a variable or attribute -> Set variable game.hp = [EXPRESSION] game.pov.cur_hp + " / " + game.pov.max_hp
Add new script -> Variables -> Set a variable or attribute -> Set variable game.mp = [EXPRESSION] game.pov.cur_mp + " / " + game.pov.max_mp
Add new script -> Variables -> Set a variable or attribute -> Set variable game.strength = [EXPRESSION] game.pov.strength
(etc etc etc)
Add new script -> Variables -> Set a variable or attribute -> Set variable game.turns = [EXPRESSION] game.turns + 1
FOR EACH OF YOUR CREATED "NPC" OBJECTS, TO GIVE THEM DIALOGUE CHOICES BASED UPON YOUR GENDER, RACE, AND CLASS, CREATE (ADD) THE "talk" VERB FOR EACH NPC OBJECT (AND~OR USE COMMANDS, BUT YOU'D NEED INSTRUCTION):
"NPC" Object -> Verb (tab) -> Add ->
Name: "talk (or whatever you want)"
Type: [RUN A SCRIPT] ->
Add new script -> Output -> Show menu with [text] "What do you want to talk about?"
-> Options from list/dictionary split ("orc;princess;sword",";")
-> Allow player to cancel [yes/no ~ your choice]
-> After choosing, run script ->
Add new script -> Scripts -> Switch... -> (see "switches" script in the CHARACTER CREATION section near top of this post, you should be able to figure out how to do what you want here, hopefully, lol)
(Use "Switch" for the topics, and then within=indented="nested"="my use of the: -> " each topic case, you can add another (and another and on and on) "switch" script, for simple (using incorrect format~syntax) example:
show menu
-> switch (result)
->-> case
->->-> "orc"
->->->-> switch (game.pov.race)
->->->->-> case
->->->->->-> "human"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("1")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("2")
->->->->->-> "dwarf"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("3")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("4")
->->-> "princess"
->->->-> switch (game.pov.race)
->->->->-> case
->->->->->-> "human"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("5")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("6")
->->->->->-> "dwarf"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("7")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("8")
->->-> "sword"
->->->-> switch (game.pov.race)
->->->->-> case
->->->->->-> "human"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("9")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("10")
->->->->->-> "dwarf"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("11")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("12")
Level Up System (thus enabling you to increase your stats~attributes, based upon your "gender", "race", "class", etc, as well as to do other stuff too):
I'm tired right now, so ask me about this, if you're interested, and I'll work on helping you with this.
(you got everything you need to create a level up system from this post... I think, so if you want a challenge, try to create a level up system on your own, using this post. Exception: you need to think up the game mechanic equation~formula of how to implement the level up itself: level <-> exp and etc, hehe. Coming up with game mechanic equations can be harder than trying to do the coding, lol)
NOTE 1: this is for v5.3, so if you're using v5.4, this then, may not help you...
NOTE 2: I did this "on the fly", so there's probably mistakes, so let me know if you need any help at all with this, and~or if this isn't working correctly too.
CHARACTER CREATION (and their initial~starting stats~attributes based upon their gender, race, and class)
Object (left pane, the "tree of stuff") -> Game (left pane, the "tree of stuff", click on it to highlight it) -> Script (Tab, right pane) -> Start Script (right pane) -> (see below the: VVVVVVVV)
~OR~
Object (left pane, the "tree of stuff") -> Game (left pane, the "tree of stuff", click on it to highlight it) -> Script (Tab, right pane) -> Start Script (right pane) -> Add a script (right pane) -> Scripts -> Call function ->
Call function character_creation_function with parameters -> add (box) -> (leave blank, don't add any parameters)
Function (left pane, the "tree of stuff") -> Function (right pane) -> Add ->
Name: character_creation_function
Return Type: [None]
Parameters: (leave blank, don't add any parameters)
Script -> (see below the: VVVVVVVV)
VVVVVVVVVV
Add new script -> Output -> Print a message -> Print [EXPRESSION] "What is your name?"
Add new script -> Output -> Get input -> Get input, then run script ->
-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.alias = [EXPRESSION] result
-> Add new script -> Output -> Print a message -> Print [EXPRESSION] " - " + game.pov.alias
-> Add new script -> Output -> Show a menu ->
-> Show menu with [text] "What is your gender?"
-> Options from list/dictionary split ("male;female",";")
-> Allow player to cancel [yes/no ~ your choice]
-> After choosing, run script ->
->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.gender = [EXPRESSION] result
->-> Add new script -> Output -> Show a menu ->
->-> Show menu with [text] "What is your race?"
->-> Options from list/dictionary split ("human;dwarf;elf;orc",";")
->-> Allow player to cancel [yes/no ~ your choice]
->-> After choosing, run script ->
->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.race = [EXPRESSION] result
->->-> Add new script -> Output -> Show a menu ->
->->-> Show menu with [text] "What is your class?"
->->-> Options from list/dictionary split ("technomancer ~ your wizard;warrior;cleric;thief",";")
->->-> Allow player to cancel [yes/no ~ your choice]
->->-> After choosing, run script ->
->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.class = [EXPRESSION] result
->->->-> Add new script -> Output -> Print a message -> Print [EXPRESSION] game.pov.alias + " is a " + game.pov.gender + " " + game.pov.race + " " + game.pov.class +"."
->->->-> Add new script -> Scripts -> Switch... ->
->->->-> Switch: game.pov.gender
->->->->-> Cases: Add -> Add (do again as needed) ->
->->->->->-> Case Expression: "male"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.endurance = [EXPRESSION] game.pov.endurance + 1
->->->->->-> Case Expression: "female"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.agility = [EXPRESSION] game.pov.agility + 1
->->->-> Switch: game.pov.race
->->->->-> Cases: Add -> Add (do again as needed) ->
->->->->->-> Case Expression: "human"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.endurance = [EXPRESSION] game.pov.endurance + 1
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.agility = [EXPRESSION] game.pov.agility + 1
->->->->->-> Case Expression: "dwarf"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.strength = [EXPRESSION] game.pov.strength + 1
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.endurance = [EXPRESSION] game.pov.endurance + 1
->->->-> Switch: game.pov.class
->->->->-> Cases: Add -> Add (do again as needed) ->
->->->->->-> Case Expression: "technomancer"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.intelligence = [EXPRESSION] game.pov.intelligence + 2
->->->->->-> Case Expression: "cleric"
->->->->->-> Add new script -> Variables -> Set a variable or attribute -> Set variable game.pov.spirituality = [EXPRESSION] game.pov.spirituality + 2
->->->-> Add new script -> output -> Wait for key press -> Wait for key press, then run script ->
->->->->-> Output -> Clear the screen
here's an example of how the character creation script block looks in code (it's missing the "switch" script stuff though):
msg ("What is your name?")
get input {
game.pov.alias = result
msg (" - " + player.alias)
show menu ("What is your gender?", split ("male;female" , ";"), false) {
game.pov.gender = result
show menu ("what is your race?", split ("human;elf;dwarf;orc" , ";"), false) {
game.pov.race = result
show menu ("What is your class?", split ("warrior;cleric;wizard;thief" , ";"), false) {
game.pov.class = result
msg ("")
msg (game.pov.alias + " is a " + " " + game.pov.gender + " " + game.pov.race + " " + game.pov.class +".")
wait {
ClearScreen
}
}
}
}
}
CREATE THE "CHARACTER" OBJECT TYPE ("TYPE") AND THEN ADD ITS ATTRIBUTES (HP and MP):
Advanced (left pane, the "tree of stuff", click on the "+" to see its subcategories) -> Object Types (left pane, the tree of stuff", click on it to highlight it) -> Object Types (right pane) -> Add ->
Name: character_type
Advanced (left pane) -> Object Types (left pane) -> character_type (left pane) -> Type (tab, right pane) -> Attributes (box at bottom) -> Add (do again for "max_hp", "cur_mp", "max_mp", "strength", "endurance", "dexterity", "agility", "speed", "intelligence", "spirituality", "mentality", and "luck") ->
Name: cur_hp
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: max_hp
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: cur_mp
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: max_mp
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: strength
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: endurance
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: dexterity
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: agility
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: speed
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: intelligence
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: spirituality
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: mentality
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
Name: luck
Type (the small dropdown box that now appears): [INTEGER]
Value (it appears now too): 0
ADD THE INHERITED TYPE (OBJECT TYPE, ALSO KNOWN AS JUST "TYPE" TOO) "CHARACTER_TYPE" FOR EACH OF YOUR PLAYER OBJECTS (such as the default player object, "player"):
"player" (do this for each of your player objects) -> Attributes (tab) -> Inherited Types (box in the middle) -> Add -> (scroll down to the bottom) -> character_type
ADD THE ATTRIBUTES (TURNS, HP, MP, and etc) FOR YOUR GAME OBJECT:
Game -> Attribute (tab) -> Attributes (box at bottom) -> Add (do again for "hp", "mp", "strength", "endurance", "dexterity", "agility", "speed", "intelligence", "spirituality", "mentality", and "luck") ->
Name: turns
Type: [INTEGER]
Value: 0
Name: hp
Type (the small dropdown box that now appears): [STRING]
Value (it appears now too): 0 / 0
Name: mp
Type (the small dropdown box that now appears): [STRING]
Value (it appears now too): 0 / 0
Name: strength
Type: [INTEGER]
Value: 0
Name: endurance
Type: [INTEGER]
Value: 0
Name: dexterity
Type: [INTEGER]
Value: 0
Name: agility
Type: [INTEGER]
Value: 0
Name: speed
Type: [INTEGER]
Value: 0
Name: intelligence
Type: [INTEGER]
Value: 0
Name: spirituality
Type: [INTEGER]
Value: 0
Name: mentality
Type: [INTEGER]
Value: 0
Name: luck
Type: [INTEGER]
Value: 0
ADD THE STATUS ATTRIBUTES (what will be displayed to the game player in the status pane on the right side, for example, hp: 999 / 999, mp: 999 / 999, turns: 0, strength, and etc) FOR YOUR GAME OBJECT:
Game -> Attributes (tab) -> Status Attributes (box at top) -> Add (do again for "hp", "mp", "Strength", and etc etc etc) ->
Name~Key: turns
Format String~Value: (leave blank)
Name~Key: hp
Format String~Value: (leave blank)
Name~Key: mp
Format String~Value: (leave blank)
Name~Key: strength
Format String~Value: (leave blank)
etc etc etc
CREATE THE TURNSCRIPT FOR THE COMPLETION OF STUFF AND ALSO HE REST OF THE NEEDED STUFF:
Object (left pane, the "tree of stuff", click on it so it is highlighted) -> click on "Add" (at the very top: File ~ Edit ~ Add ~ Tools ~ Help) -> choose: turn script ->
Object (left pane) -> Turn Script (left pane) -> Turn Script (tab) -> it should look like this (add in the things shown below):
Turn script
Turn Script (tab)
Name: omni_turn_turnscript
[X] Enable when the game begins
Script: (small script tool bar) ->
Add new script -> Variables -> Set a variable or attribute -> Set variable game.hp = [EXPRESSION] game.pov.cur_hp + " / " + game.pov.max_hp
Add new script -> Variables -> Set a variable or attribute -> Set variable game.mp = [EXPRESSION] game.pov.cur_mp + " / " + game.pov.max_mp
Add new script -> Variables -> Set a variable or attribute -> Set variable game.strength = [EXPRESSION] game.pov.strength
(etc etc etc)
Add new script -> Variables -> Set a variable or attribute -> Set variable game.turns = [EXPRESSION] game.turns + 1
FOR EACH OF YOUR CREATED "NPC" OBJECTS, TO GIVE THEM DIALOGUE CHOICES BASED UPON YOUR GENDER, RACE, AND CLASS, CREATE (ADD) THE "talk" VERB FOR EACH NPC OBJECT (AND~OR USE COMMANDS, BUT YOU'D NEED INSTRUCTION):
"NPC" Object -> Verb (tab) -> Add ->
Name: "talk (or whatever you want)"
Type: [RUN A SCRIPT] ->
Add new script -> Output -> Show menu with [text] "What do you want to talk about?"
-> Options from list/dictionary split ("orc;princess;sword",";")
-> Allow player to cancel [yes/no ~ your choice]
-> After choosing, run script ->
Add new script -> Scripts -> Switch... -> (see "switches" script in the CHARACTER CREATION section near top of this post, you should be able to figure out how to do what you want here, hopefully, lol)
(Use "Switch" for the topics, and then within=indented="nested"="my use of the: -> " each topic case, you can add another (and another and on and on) "switch" script, for simple (using incorrect format~syntax) example:
show menu
-> switch (result)
->-> case
->->-> "orc"
->->->-> switch (game.pov.race)
->->->->-> case
->->->->->-> "human"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("1")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("2")
->->->->->-> "dwarf"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("3")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("4")
->->-> "princess"
->->->-> switch (game.pov.race)
->->->->-> case
->->->->->-> "human"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("5")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("6")
->->->->->-> "dwarf"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("7")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("8")
->->-> "sword"
->->->-> switch (game.pov.race)
->->->->-> case
->->->->->-> "human"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("9")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("10")
->->->->->-> "dwarf"
->->->->->->-> switch (game.pov.gender)
->->->->->->->-> case
->->->->->->->->-> "male"
->->->->->->->->->-> msg ("11")
->->->->->->->->-> "female"
->->->->->->->->->-> msg ("12")
Level Up System (thus enabling you to increase your stats~attributes, based upon your "gender", "race", "class", etc, as well as to do other stuff too):
I'm tired right now, so ask me about this, if you're interested, and I'll work on helping you with this.
(you got everything you need to create a level up system from this post... I think, so if you want a challenge, try to create a level up system on your own, using this post. Exception: you need to think up the game mechanic equation~formula of how to implement the level up itself: level <-> exp and etc, hehe. Coming up with game mechanic equations can be harder than trying to do the coding, lol)
Sora574
13 Apr 2013, 15:58...I feel like I just got pushed into a corner
I'd go with what HK said. I completely forgot about switches...

I'd go with what HK said. I completely forgot about switches...
HegemonKhan
13 Apr 2013, 20:43dictionaries are better, but it'd take even more work trying to display~explain it's steps on a post, which you can see is already massive, and I'm dead tired after it, lol. Switch scripts are easier to show, but they still take a long time to write out, working with code is so much more convenient when trying to show people what to do, but, like me when I started with quest, we can't deal with the code yet, so I try my best to show how to do it step by step as I can, through using the GUI-Editor.. fun.. laughs.
(actually, it does help me, helps my brain think better on this stuff, for both coding and~or using the GUI~Editor, it's training for my brain for this type of stuff. Trains my brain in better thought processing logic of this coding stuff that TA games take)
Also, he~she is a noob, dictionaries I think are more confusing (along with the extra or less direct~intuitive stuff needed for them to work) than using switches (as I think switches are a bit more easy to understand, and you don't need to make scripts elsewhere, as you need to do with dictionaries, switches are far less confusing than trying to set up dictionaries, but they're much more powerful~useful than switch scripts, and also save more time too in the long run, as switch scripts are local, where dicionaries are more universal, once you get them set up, they save you tons of time, over the long run of game creation).
(actually, it does help me, helps my brain think better on this stuff, for both coding and~or using the GUI~Editor, it's training for my brain for this type of stuff. Trains my brain in better thought processing logic of this coding stuff that TA games take)
Also, he~she is a noob, dictionaries I think are more confusing (along with the extra or less direct~intuitive stuff needed for them to work) than using switches (as I think switches are a bit more easy to understand, and you don't need to make scripts elsewhere, as you need to do with dictionaries, switches are far less confusing than trying to set up dictionaries, but they're much more powerful~useful than switch scripts, and also save more time too in the long run, as switch scripts are local, where dicionaries are more universal, once you get them set up, they save you tons of time, over the long run of game creation).
BritishAmerican
14 Apr 2013, 19:32Thank you to the both of you! I decided to go with HegemonKhan's way and it seems to work fine except with one detail, when playing the game, it would turn up fine with just "what is your name?" question, but once answered, when the gender question pops up, so does the room description. You can keep answering the questions but they appear underneath the room description and then the clear screen kicks in and you're left with a blank screen. I was wondering if you got any ideas on how to fix this?
Sora574
14 Apr 2013, 20:28Could you attach your game file? It makes finding problems a lot easier.
HegemonKhan
14 Apr 2013, 23:24I'm not sure if this is your problem, but did you indent ("nest") correctly? Make sure you hit the correct "add new script" buttons to keep correctly indenting the script lines, your GUI~Editor windows should get smaller and smaller, crammed up against the right side, lol.
msg ("what is your name?")
get input
-> game.pov.alias = result
-> msg ("-" + game.pov.alias)
-> show menu
->-> game.pov.gender = result
->-> show menu
->->-> game.pov.race = result
->->-> show menu
->->->-> game.pov.class = result
->->->-> msg ("HK is a male human warrior")
->->->-> switch
->->->->-> case
.... ("yada yada yada") ....
->->->-> wait
->->->->-> clear screen
your description of:
"...it would turn up fine with just "what is your name?" question, but once answered, when the gender question pops up, so does the room description (britishamerican)..."
suggests that your character creation script block probably looks like this (which would be causing the problem you describe, if this is indeed the case you've got with your character creation script block):
msg ("what is your name?")
get input
-> game.pov.alias = result
-> msg ("-" + game.pov.alias)
show menu (for example, or it could be any of the below lines, that aren't indented, like me showing with this line)
-> game.pov.gender = result
-> show menu
->-> game.pov.race = result
->-> show menu
->->-> game.pov.class = result
->->-> msg ("HK is a male human warrior")
->->-> switch
->->->-> case
.... ("yada yada yada") ....
->->-> wait
->->->-> clear screen
do you see the difference?
HK Edit: I haven't yet figured out exactly what you (or I) did wrong. I haven't yet reproduced the problem-effect that you have described. The above SPECIFIC (of the non-indented specific "show menu") example, doesn't produce the problem-effect of the room description displaying in the middle of the character creation script block process in the actual game play.
--------------
P.S.
don't freak out, this is 99.9999999% a simple mistake in the script block, either by you or by me, lol. we just need to find it, change~fix it, and it'll be working fine for you.
if you could post an attachment of your game file or copy and paste your game code here, we'd be able to quickly find the simple mistake and get it working for you.
btw, to post code:
either, in the GUI~Editor, at the top of the screen is a bar, click on the notepad like button, it's between the "play" and "? (help)" buttons, this notepad like button is a toggle between the GUI-Editor Mode and the Code View mode, then just highlight all of your game code, copy it, and then paste it here, or you can just directly open up your game file with~by using notepad, wordpad, or notepad++, to get to the game code too.
to post the code here, do this:
[nocode](your pasted game code)[/nocode]
( but remove the "no" from the two [ code ] 's )
it will look like this:
for example:
(this is an old version code, lol)
msg ("what is your name?")
get input
-> game.pov.alias = result
-> msg ("-" + game.pov.alias)
-> show menu
->-> game.pov.gender = result
->-> show menu
->->-> game.pov.race = result
->->-> show menu
->->->-> game.pov.class = result
->->->-> msg ("HK is a male human warrior")
->->->-> switch
->->->->-> case
.... ("yada yada yada") ....
->->->-> wait
->->->->-> clear screen
your description of:
"...it would turn up fine with just "what is your name?" question, but once answered, when the gender question pops up, so does the room description (britishamerican)..."
suggests that your character creation script block probably looks like this (which would be causing the problem you describe, if this is indeed the case you've got with your character creation script block):
msg ("what is your name?")
get input
-> game.pov.alias = result
-> msg ("-" + game.pov.alias)
show menu (for example, or it could be any of the below lines, that aren't indented, like me showing with this line)
-> game.pov.gender = result
-> show menu
->-> game.pov.race = result
->-> show menu
->->-> game.pov.class = result
->->-> msg ("HK is a male human warrior")
->->-> switch
->->->-> case
.... ("yada yada yada") ....
->->-> wait
->->->-> clear screen
do you see the difference?
HK Edit: I haven't yet figured out exactly what you (or I) did wrong. I haven't yet reproduced the problem-effect that you have described. The above SPECIFIC (of the non-indented specific "show menu") example, doesn't produce the problem-effect of the room description displaying in the middle of the character creation script block process in the actual game play.
--------------
P.S.
don't freak out, this is 99.9999999% a simple mistake in the script block, either by you or by me, lol. we just need to find it, change~fix it, and it'll be working fine for you.
if you could post an attachment of your game file or copy and paste your game code here, we'd be able to quickly find the simple mistake and get it working for you.
btw, to post code:
either, in the GUI~Editor, at the top of the screen is a bar, click on the notepad like button, it's between the "play" and "? (help)" buttons, this notepad like button is a toggle between the GUI-Editor Mode and the Code View mode, then just highlight all of your game code, copy it, and then paste it here, or you can just directly open up your game file with~by using notepad, wordpad, or notepad++, to get to the game code too.
to post the code here, do this:
[nocode](your pasted game code)[/nocode]
( but remove the "no" from the two [ code ] 's )
it will look like this:
(your code)
for example:
(this is an old version code, lol)
<!--Saved by Quest 5.2.4515.34846-->
<asl version="520">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>cd102f9d-370a-4bda-b6ea-ca42288f619c</gameid>
<version>1.0</version>
<start type="script">
character_creation_function
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
<turns type="int">0</turns>
<statusattributes type="stringdictionary">turns = </statusattributes>
</object>
</object>
<turnscript name="turns turn script">
<enabled />
<script>
player.turns = player.turns + 1
</script>
</turnscript>
<function name="character_creation_function">
msg ("What is your name?")
get input {
player.alias = result
msg (" - " + player.alias)
show menu ("What is your gender?", split ("male;female" , ";"), false) {
player.gender = result
show menu ("what is your race?", split ("human;elf;dwarf;orc" , ";"), false) {
player.race = result
show menu ("What is your class?", split ("warrior;cleric;wizard;thief" , ";"), false) {
player.class = result
msg ("")
msg (player.alias + " is a " + " " + player.gender + " " + player.race + " " + player.class + ".")
wait {
ClearScreen
}
}
}
}
}
</function>
</asl>
HegemonKhan
15 Apr 2013, 00:32here's a working character creation game code (but it's for v5.3):
(this is much more simplified as merely an example of it working. My above massive post, is set up differently from how this simple example is set up of a character creation system)
(you can just copy this, by pressing the "select all" button, and then the copy command, ctrl+c, and then just paste, ctrl+v (thanks sora for this correction), it into a new game file, delete or paste over the original~initial~starting code of the new game file, to see it in action)
and via the code, you can alter it to what you want, such as replacing "wizard" to your "technomancer", change the attributes, like "strength" to "(whatever)", and etc etc etc. Working with the code isn't too hard, and it's much easier and quicker, once you understand it, than working with the GUI~Editor, lol.
(this is much more simplified as merely an example of it working. My above massive post, is set up differently from how this simple example is set up of a character creation system)
(you can just copy this, by pressing the "select all" button, and then the copy command, ctrl+c, and then just paste, ctrl+v (thanks sora for this correction), it into a new game file, delete or paste over the original~initial~starting code of the new game file, to see it in action)
<asl version="530">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>cd102f9d-370a-4bda-b6ea-ca42288f619c</gameid>
<version>1.0</version>
<turns type="int">0</turns>
<statusattributes type="stringdictionary">turns = </statusattributes>
<start type="script">
character_creation_function
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
<strength type="int">0</strength>
<intelligence type="int">0</intelligence>
<agility type="int">0</agility>
<statusattributes type="stringdictionary">strength = ;intelligence = ;agility = </statusattributes>
</object>
</object>
<turnscript name="turns_turnscript">
<enabled />
<script>
game.turns = game.turns + 1
</script>
</turnscript>
<function name="character_creation_function">
msg ("What is your name?")
get input {
game.pov.alias = result
msg (" - " + game.pov.alias)
show menu ("What is your gender?", split ("male;female" , ";"), false) {
game.pov.gender = result
show menu ("what is your race?", split ("human;elf;dwarf;orc" , ";"), false) {
game.pov.race = result
show menu ("What is your class?", split ("warrior;cleric;wizard;thief" , ";"), false) {
game.pov.class = result
msg ("")
msg (game.pov.alias + " is a " + " " + game.pov.gender + " " + game.pov.race + " " + game.pov.class + ".")
switch (game.pov.gender) {
case ("male") {
game.pov.strength = game.pov.strength + 1
}
case ("female") {
game.pov.agility = game.pov.agility + 1
}
}
switch (game.pov.race) {
case ("dwarf") {
game.pov.strength = game.pov.strength + 2
}
case ("elf") {
game.pov.agility = game.pov.intelligence + 2
}
case ("human") {
game.pov.strength = game.pov.strength + 1
game.pov.agility = game.pov.agility + 1
}
}
switch (game.pov.class) {
case ("warrior") {
game.pov.strength = game.pov.strength + 2
}
case ("cleric") {
game.pov.intelligence = game.pov.intelligence + 1
game.pov.agility = game.pov.agility + 1
}
case ("mage") {
game.pov.intelligence = game.pov.intelligence + 2
}
case ("thief") {
game.pov.strength = game.pov.strength + 1
game.pov.agility = game.pov.agility + 1
}
}
wait {
ClearScreen
}
}
}
}
}
</function>
</asl>
and via the code, you can alter it to what you want, such as replacing "wizard" to your "technomancer", change the attributes, like "strength" to "(whatever)", and etc etc etc. Working with the code isn't too hard, and it's much easier and quicker, once you understand it, than working with the GUI~Editor, lol.
Sora574
15 Apr 2013, 22:19HegemonKhan wrote: ... you can just copy this, by pressing the "select all" button, and then the copy command, ctrl+c, and then just paste, ctrl+p ...
I'm sorry, I just have to point this out.
CTRL+P will normally lead you to a printing screen. CTRL+V, however, pastes things on most Windows computers. (There may be some that it doesn't, but I don't think so...)
Sorry, I just couldn't leave it there without saying something

HegemonKhan
16 Apr 2013, 03:20oops, my bad. yes, it's v, my mind was on the p in paste, and not thinking, obviously, lol.