I'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):
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 scriptTurn 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)