EDIT: And I just finally figured out my mistake... I didn't use quotes around the name of the race in the expression -_-
So, I've JUST gotten Quest as of 48 hours ago. I've been working at learning through a Youtube video that showed me how to set up Classes. BUT, I want Races in my game, which the example didn't have. Specifically, Race choices block out access to some of the Class choices.
Problem is, the IF statement seems to not like me, as it's not working right :/
I'm probably doing something wrong somewhere, but I CAN output text that refers to the Race, so the Race setup works, but when I try to reference that in the IF to build the Class List, it's not working. Can anyone help me figure this out? Using the Desktop version btw.
Can you post the code you already have? It will be easier for us to see what the problem is.
EDIT: Found the code. You don't mean the whole code, but just the part that I'm working with, right? (not that I really have any other code at this point....)
<function name="characterselect"><![CDATA[
charactermenu = NewStringList()
if (game.pov.race = "Dwarf") {
charactermenu = NewStringList()
list add (charactermenu, "Soldier")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
else if (player.race = Elf) {
list add (charactermenu, "Mage")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
else if (race = Halfling) {
list add (charactermenu, "Soldier")
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
else if (race = Orc) {
list add (charactermenu, "Soldier")
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Priest")
list add (charactermenu, "Bard")
}
else if (race = Goblin) {
list add (charactermenu, "Soldier")
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
}
else if (player.Race = Human) {
list add (charactermenu, "Soldier")
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
ShowMenu ("Select Class", charactermenu, false) {
char = result
msg ("You chose " +char+".")
if (char<>null) {
if (char = "Soldier") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
ChangePOV (Soldier)
ClearScreen
MoveObject (game.pov, Character_Setup)
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
namecharacter
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Mage") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
ChangePOV (Mage)
ClearScreen
MoveObject (game.pov, Character_Setup)
game.pov.HP = ""+game.pov.Health+ " / "+game.pov.MaxHealth+ ""
namecharacter
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Thief") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
ChangePOV (Thief)
ClearScreen
MoveObject (game.pov, Character_Setup)
game.pov.HP = ""+game.pov.Health+ " / "+game.pov.MaxHealth+ ""
namecharacter
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Priest") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
ChangePOV (Priest)
ClearScreen
MoveObject (game.pov, Character_Setup)
game.pov.HP = ""+game.pov.Health+ " / "+game.pov.MaxHealth+ ""
namecharacter
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Hunter") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
ChangePOV (Hunter)
ClearScreen
MoveObject (game.pov, Character_Setup)
game.pov.HP = ""+game.pov.Health+ " / "+game.pov.MaxHealth+ ""
namecharacter
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Bard") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
ChangePOV (Bard)
ClearScreen
MoveObject (game.pov, Character_Setup)
game.pov.HP = ""+game.pov.Health+ " / "+game.pov.MaxHealth+ ""
namecharacter
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Paladin") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
ChangePOV (Paladin)
ClearScreen
MoveObject (game.pov, Character_Setup)
game.pov.HP = ""+game.pov.Health+ " / "+game.pov.MaxHealth+ ""
namecharacter
}
else if (result = False) {
characterselect
}
}
}
}
else {
msg ("You chose to cancel.")
}
msg ("Race Check 2 " +game.pov.Race)
}
]]></function>
<function name="namecharacter">
msg ("What is your name?")
get input {
game.pov.alias = result
Ask ("So your name is " +result+"?") {
if (result = True) {
msg ("Hello " +game.pov.alias+", nice to meet you.")
choosegender
}
else if (result = False) {
namecharacter
}
}
}
</function>
<function name="choosegender">
gendermenu = NewStringList()
list add (gendermenu, "Male")
list add (gendermenu, "Female")
ShowMenu ("Choose a gender.", gendermenu, false) {
msg ("You're " +result+", huh?")
game.pov.gender = result
Ask ("Are you sure you want to be " +result+"?") {
if (result = True) {
}
}
}
</function>
<function name="assignpoints">
</function>
<function name="raceselect">
racemenu = NewStringList()
list add (racemenu, "Human")
list add (racemenu, "Dwarf")
list add (racemenu, "Elf")
list add (racemenu, "Halfling")
list add (racemenu, "Orc")
list add (racemenu, "Goblin")
ShowMenu ("Select Race", racemenu, false) {
msg ("You are a " +result+".")
set (player, "race", result)
if (result = Human) {
msg ("As a Human, you're adaptable, but you're not really great at anything.")
}
else if (result = Dwarf) {
msg ("Dwarves are a hardy people! You're great at working with stone, and are at home in any cave or stonework.")
}
else if (result = Elf) {
msg ("Elves are an ancient and wise people, whose natural gifts for Magic make them natural spellcasters. However, their fragile bodies often work against them in battle.")
}
else if (result = Halfling) {
msg ("The tiny halfling is deceptively clever. Their size gives them a natural advantage, allowing them to go places most others can't.")
}
else if (result = Orc) {
msg ("The powerful Orcs are brutes of raw strength. Never very bright, they are among the strongest of all races.")
}
else if (result = Goblin) {
msg ("Vicious and unforgiving, the Goblins are a truly intimidating race.")
}
Ask ("Are you sure this is what you want?") {
if (result = True) {
ClearScreen
MoveObject (game.pov, Class_Select)
characterselect
}
else if (result = False) {
raceselect
}
}
}
And I'm still in the process of adding the quotes around the races to finish fixing my mistake from earlier right now. Is there a way to make it so it alters the stats based on the race?
to see/get-at your entire game code:
if on desktop, you can always just right click on the game file itself and choose to open it with whatever text editor software (notepad, wordpad, Apple: text editor, notepad++, etc), which will be your entire game code
within the GUI/Editor, at the top of the screen, in the horizontal menu bar, between the 'play' and 'help/?' buttons/choices, is a notepaper-like button/choice, which is a toggle between the GUi/Editor mode view and the Code View mode, so click on it, as the 'Code View mode' is your entire game code. (for the 'add new script' controls, there's also a notepaper-like button, which will take you into the scripting just for that 'add new script', which is just merely a small part of code of your entire game code, it's not your entire game code. Again, to see the entire game code, is via the notepaper-like button/choice at the top of the screen, in the horizontal menu bar, between the 'play' and 'help/?' buttons/choices.
if your game is online (published on quest site), you'll need to download your own game onto your computer, so you can open up your game file, to see your entire game code.
if you want to learn to code in general and with quest:
http://textadventures.co.uk/forum/quest/topic/mu7itzjqv0yxrkdwgsbmzg/how-to-make-npc-confront-you-with-chioces#46cdb25b-4767-40a6-8bf4-3cd84e805781
ask if you want/need any help, I'd be happy to help you with learning to code with quest (or in general or a little bit with only a few specific languages)
here's some code that you can take a look at:
http://textadventures.co.uk/forum/samples/topic/4988/character-creation-crude-code-and-sample-game
it's probably a bit advanced for you, but I think you can still get some ideas from it... (it's a lot of redundent code, as I went brain dead when I was trying to do this, as I could have a single Function that handles my tons of redundant Functions, lol, in hindsight)
take a look at this, if you haven't already:
http://docs.textadventures.co.uk/quest/guides/character_creation.html
and if you want, you can see my own struggles with trying to learn code (starting with a part of the tutorial that is really too advanced for the tutorial, lol - it stumps everyone trying to do it, and then onto the 'character creation' -- scroll down some posts and/or it may be on the next page, meh), when I first found quest:
https://textadventures.co.uk/forum/quest/topic/3348/noobie-hks-help-me-thread
ask if you need any help with anything
P.S.
unfortunately, code is very inter-connected, so the coding error/mistake may not be where you think it is (or not where the error message says it is),
so it's best to post your entire game code (or pm it to someone trustful who can help trouble shoot it, if you don't want to show it publically), as that allows us to find and fix the issues/errors/mistakes in your code for you.
Okay, I can post the entire game code then. There's literally no game yet, so it's not like there's anything I don't want to show XD
EDIT: Fair warning, I'm mostly learning by copying from a youtube video to get the basics for what I need, then expanding on that.
I think I fixed the errors at this point for the most part, but I would like to make it so I can choose (for example) Dwarf, then increase his Survival by 5, and reduce his Charm by 5, with similar effects on every race but Human. I'm just not sure how to do that.
here's some starter links/guides/etc for helping with using/learning quest and its coding (and/or within/via the GUI/Editor):
http://textadventures.co.uk/forum/general/topic/ljjm32av4e2t9ot49k478g/help#710be61e-eae1-4af1-8363-520cc718ba1c
ask if you need help with anything
"... I would like to make it so I can choose (for example) Dwarf, then increase his Survival by 5, and reduce his Charm by 5, with similar effects on every race but Human. I'm just not sure how to do that (adran06)"
here's examples:
(you can create a new text adventure game, save it, go into its entire game code, delete all of it, and paste in my code below, save it, and then open it up in the GUI/Editor to study it, and also you can "play" it too... lol... not much to play though)
using 'switch-case' Script/Function:
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="example_game">
<gameid>bfba3aa9-0e0f-434a-8dac-107072b7b4b4</gameid>
<version>1.0</version>
<firstpublished>2018</firstpublished>
<attr name="race_stringlist_attribute" type="stringlist">
<value>human</value>
<value>dwarf</value>
<value>elf</value>
</attr>
<attr name="start" type="script">
show menu ("Race?", game.race_stringlist_attribute, false) {
player.race_string_attribute = result
switch (player.race_string_attribute) {
case ("human") {
player.strength_integer_attribute = 5
player.intelligence_integer_attribute = 5
player.luck_integer_attribute = 5
}
case ("dwarf") {
player.strength_integer_attribute = 10
player.luck_integer_attribute = 5
}
case ("elf") {
player.intelligence_integer_attribute = 10
player.luck_integer_attribute = 5
}
}
msg ("Race: " + player.race_string_attribute)
msg ("Strength: " + player.strength_integer_attribute)
msg ("Intelligence: " + player.intelligence_integer_attribute)
msg ("Luck: " + player.luck_integer_attribute)
}
</attr>
</game>
<object name="room">
<inherit name="editor_room" />
</object>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<attr name="parent" type="object">room</attr>
<attr name="race_string_attribute" type="string">unknown</attr>
<attr name="strength_integer_attribute" type="int">0</attr>
<attr name="intelligence_integer_attribute" type="int">0</attr>
<attr name="luck_integer_attribute" type="int">0</attr>
<statusattributes type="stringdictionary">
<item>
<key>race_string_attribute</key>
<value>Race: !</value>
</item>
<item>
<key>strength_integer_attribute</key>
<value>Strength: !</value>
</item>
<item>
<key>intelligence_integer_attribute</key>
<value>Intelligence: !</value>
</item>
<item>
<key>luck_integer_attribute</key>
<value>Luck: !</value>
</item>
</statusattributes>
</object>
</asl>
or (using 'if' Function/Script):
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="example_game">
<gameid>bfba3aa9-0e0f-434a-8dac-107072b7b4b4</gameid>
<version>1.0</version>
<firstpublished>2018</firstpublished>
<attr name="race_stringlist_attribute" type="stringlist">
<value>human</value>
<value>dwarf</value>
<value>elf</value>
</attr>
<attr name="start" type="script">
show menu ("Race?", game.race_stringlist_attribute, false) {
player.race_string_attribute = result
if (player.race_string_attribute = "human") {
player.strength_integer_attribute = 5
player.intelligence_integer_attribute = 5
player.luck_integer_attribute = 5
}
else if (player.race_string_attribute = "dwarf") {
player.strength_integer_attribute = 10
player.luck_integer_attribute = 5
}
else if (player.race_string_attribute = "elf") {
player.intelligence_integer_attribute = 10
player.luck_integer_attribute = 5
}
msg ("Race: " + player.race_string_attribute)
msg ("Strength: " + player.strength_integer_attribute)
msg ("Intelligence: " + player.intelligence_integer_attribute)
msg ("Luck: " + player.luck_integer_attribute)
}
</attr>
</game>
<object name="room">
<inherit name="editor_room" />
</object>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<attr name="parent" type="object">room</attr>
<attr name="race_string_attribute" type="string">unknown</attr>
<attr name="strength_integer_attribute" type="int">0</attr>
<attr name="intelligence_integer_attribute" type="int">0</attr>
<attr name="luck_integer_attribute" type="int">0</attr>
<statusattributes type="stringdictionary">
<item>
<key>race_string_attribute</key>
<value>Race: !</value>
</item>
<item>
<key>strength_integer_attribute</key>
<value>Strength: !</value>
</item>
<item>
<key>intelligence_integer_attribute</key>
<value>Intelligence: !</value>
</item>
<item>
<key>luck_integer_attribute</key>
<value>Luck: !</value>
</item>
</statusattributes>
</object>
</asl>
The problem is the stats are mostly defined by the Class, but modified by Race. Right now, my game is setting it from the Class, but I don't know how to modify it by Race as well. Race has to be set first, since it locks out some of the Class options. That's what's giving me trouble.
"The problem is the stats are mostly defined by the Class, but modified by Race. Right now, my game is setting it from the Class, but I don't know how to modify it by Race as well. Race has to be set first, since it locks out some of the Class options. That's what's giving me trouble (adran06)"
an example:
(there's much better designs, but they're more complicated/advanced)
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="example_game">
<gameid>bfba3aa9-0e0f-434a-8dac-107072b7b4b4</gameid>
<version>1.0</version>
<firstpublished>2018</firstpublished>
<attr name="race_stringlist_attribute" type="stringlist">
<value>human</value>
<value>dwarf</value>
<value>elf</value>
</attr>
<attr name="class_stringlist_attribute" type="stringlist">
<value>warrior</value>
<value>thief</value>
<value>mage</value>
</attr>
<attr name="start" type="script">
msg ("Race: " + player.race_string_attribute)
msg ("Class: " + player.class_string_attribute)
msg ("Strength: " + player.strength_integer_attribute)
msg ("Intelligence: " + player.intelligence_integer_attribute)
msg ("Luck: " + player.luck_integer_attribute)
show menu ("Race?", game.race_stringlist_attribute, false) {
player.race_string_attribute = result
switch (player.race_string_attribute) {
case ("human") {
player.strength_integer_attribute = 5
player.intelligence_integer_attribute = 5
player.luck_integer_attribute = 5
}
case ("dwarf") {
player.strength_integer_attribute = 10
player.luck_integer_attribute = 5
}
case ("elf") {
player.intelligence_integer_attribute = 10
player.luck_integer_attribute = 5
}
}
msg ("Race: " + player.race_string_attribute)
msg ("Class: " + player.class_string_attribute)
msg ("Strength: " + player.strength_integer_attribute)
msg ("Intelligence: " + player.intelligence_integer_attribute)
msg ("Luck: " + player.luck_integer_attribute)
show menu ("Class?", game.class_stringlist_attribute, false) {
player.class_string_attribute = result
switch (player.class_string_attribute) {
case ("thief") {
player.strength_integer_attribute = player.strength_integer_attribute + 50
player.intelligence_integer_attribute = player.intelligence_integer_attribute + 50
player.luck_integer_attribute = player.luck_integer_attribute + 50
}
case ("warrior") {
player.strength_integer_attribute = player.strength_integer_attribute + 100
player.luck_integer_attribute = player.luck_integer_attribute + 50
}
case ("mage") {
player.intelligence_integer_attribute = player.intelligence_integer_attribute + 100
player.luck_integer_attribute = player.luck_integer_attribute + 50
}
}
msg ("Race: " + player.race_string_attribute)
msg ("Class: " + player.class_string_attribute)
msg ("Strength: " + player.strength_integer_attribute)
msg ("Intelligence: " + player.intelligence_integer_attribute)
msg ("Luck: " + player.luck_integer_attribute)
}
}
</attr>
</game>
<object name="room">
<inherit name="editor_room" />
</object>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<attr name="parent" type="object">room</attr>
<attr name="race_string_attribute" type="string">unknown</attr>
<attr name="class_string_attribute" type="string">unknown</attr>
<attr name="strength_integer_attribute" type="int">0</attr>
<attr name="intelligence_integer_attribute" type="int">0</attr>
<attr name="luck_integer_attribute" type="int">0</attr>
<statusattributes type="stringdictionary">
<item>
<key>race_string_attribute</key>
<value>Race: !</value>
</item>
<item>
<key>class_string_attribute</key>
<value>Class: !</value>
</item>
<item>
<key>strength_integer_attribute</key>
<value>Strength: !</value>
</item>
<item>
<key>intelligence_integer_attribute</key>
<value>Intelligence: !</value>
</item>
<item>
<key>luck_integer_attribute</key>
<value>Luck: !</value>
</item>
</statusattributes>
</object>
</asl>
arithmetic operation examples:
Addition:
player.strength = player.strength + 5
// or:
player.strength = player.strength + player.endurance
Subtraction:
player.strength = player.strength - 8
// or:
player.strength = player.strength - player.endurance
Multiplication:
player.strength = player.strength * 2
// or:
player.strength = player.strength * player.endurance
Division:
player.strength = player.strength / 4
// or:
player.strength = player.strength / player.endurance
a more complex expression example:
player.damage = player.weapon.damage + player.weapon.damage * player.strength / 100
// katana.damage = 50
// player.weapon = katana
// player.strength = 100
// player.damage = [50] + ( [50] * ( [100] / 100) ) = 100
// katana.damage = 50
// player.weapon = katana
// player.strength = 0
// player.damage = [50] + ( [50] * ( [0] / 100) ) = 50
// katana.damage = 50
// player.weapon = katana
// player.strength = 75
// player.damage = [50] + ( [50] * ( [75] / 100) ) = [50] + (37 or 38) = (87 or 88)
// katana.damage = 50
// player.weapon = katana
// player.strength = 25
// player.damage = [50] + ( [50] * ( [25] / 100) ) = [50] + (12 or 13) = (62 or 63)
to do them in the GUI/Editor, an example:
run as script -> add new script -> 'variables' section/category -> 'set a variable or attribute' Script -> (see below)
set variable player.strength = [EXPRESSION] player.strength + 5
ask if you need help with anything
So, I copied that into a new game to test it, but it doesn't seem to do anything.
it should work... (I did edit my post a bit, so try the code I have there now, and see if that works)
let me know if it doesn't work
Okay, even though I couldn't get it to work, reading your examples I think I got it. Filling in the info for one of my class/race combos, then I will test it.
err... I had a mistake... hopefully my code now works...
let me know if it doesn't... (I'm lazy... I should test my code and get it working... but I'm lazy, lol)
P.S.
forgot to explain the arithmetic operations... whoops
using addition for my example:
// initial/starting value:
player.strength = 0
// old value: player.strength = 0
player.strength = player.strength + 5
// player.strength (new) = player.strength (old: 0) + 5 = 5
// player.strength (new) = 5
// new value: player.strength = 5
// old value: player.strength = 5
player.strength = player.strength + 5
// player.strength (new) = player.strength (old: 5) + 5 = 10
// player.strength (new) = 10
// new value: player.strength = 10
// old value: player.strength = 10
player.strength = player.strength + 5
// player.strength (new) = player.strength (old: 10) + 5 = 15
// player.strength (new) = 15
// new value: player.strength = 15
// old value: player.strength = 15
player.strength = player.strength + 5
// player.strength (new) = player.strength (old: 15) + 5 = 20
// player.strength (new) = 20
// new value: player.strength = 20
... you get the concept of how it works now...
I do get the idea of using math. Does it require the attribute to be set ahead of time? Also, your codes still don't work. Also, now I'm getting an error:
Error running script: Error compiling expression 'game.pov.Intimidation + 15': ArithmeticElement: Operation 'Add' is not defined for types 'Object' and 'Int32'
you need to have/create/set the Attribute (and it's value) before you can use it within an arithmetic operation
and make sure your 'Intimidation' is an Integer (int) Attribute on/within your 'game.pov'
also, the 'game.pov' may not work if you've not set it up...
to be sure, you can just replace 'game.pov' with whatever you named your default 'player' Player Object as: 'WHATEVER' Player Object:
set variable WHATEVER.Intimidation = [EXPRESSION] WHATEVER.Intimidation + 15
you can create an Attribute, either with:
set variable player.Intimidation = [EXPRESSION] 0 // or whatever you want the initial/starting value to be, I just usually use '0'
'player' Player Object -> 'Attributes' Tab -> Attributes (make sure it's the 'Attributes' box --- at the bottom I think, and not the 'inherited attributes' box and not the 'statusattributes' box) -> (see below)
(Object name: player)
Attribute Name: Intimidation
Attribute Type: int (integer)
Attribute Value: 0 // or whatever the initial/starting value you want
<object name="player">
<attr name="Intimidation" type="int">0</attr>
</object>
<game name="example_game">
<attr name="start" type="script">
player.Intimidation = 0
</attr>
</game>
once you've done this stuff (and it has to happen before you), then can do your arithmetic operations (as now you got an Attribute for the arithmetic operation to use)
if you don't have the Attribute that an arithmetic operation uses, then you got an ERROR, lol, as it can't use what doesn't exist, lol.
I make all the Attributes with a characterclass Object Type, which is already assigned to all the races and classes, and they're all integers there. game.pov has worked so far on other things. It can correctly get the Race data (returning as Dwarf like it's suppose to). I can't see any differences between Combat and Intimidation either :/
Repasting the code as it is now in case someone can find out wtf is wrong now :/
so far I've found these mistakes (missing the double quotes on your values):
<function name="raceselect">
racemenu = NewStringList()
list add (racemenu, "Human")
list add (racemenu, "Dwarf")
list add (racemenu, "Elf")
list add (racemenu, "Halfling")
list add (racemenu, "Orc")
list add (racemenu, "Goblin")
ShowMenu ("Select Race", racemenu, false) {
msg ("You are a " +result+".")
set (player, "race", result)
// ----------------------------------------------------------------------------------------------------------
// missing the double quotes on the values:
if (result = Human) {
msg ("As a Human, you're adaptable, but you're not really great at anything.")
}
else if (result = Dwarf) {
msg ("Dwarves are a hardy people! You're great at working with stone, and are at home in any cave or stonework.")
}
else if (result = Elf) {
msg ("Elves are an ancient and wise people, whose natural gifts for Magic make them natural spellcasters. However, their fragile bodies often work against them in battle.")
}
else if (result = Halfling) {
msg ("The tiny halfling is deceptively clever. Their size gives them a natural advantage, allowing them to go places most others can't.")
}
else if (result = Orc) {
msg ("The powerful Orcs are brutes of raw strength. Never very bright, they are among the strongest of all races.")
}
else if (result = Goblin) {
msg ("Vicious and unforgiving, the Goblins are a truly intimidating race.")
}
// ----------------------------------------------------------------------------------------------------------
Ask ("Are you sure this is what you want?") {
if (result = True) {
if (game.pov.race = "Dwarf") {
game.pov.Charm = -5
game.pov.Survival = 5
wait {
}
}
ClearScreen
MoveObject (game.pov, Class_Select)
characterselect
}
else if (result = False) {
raceselect
}
}
}
</function>
here's the fixed up code:
(you can remove the three comment code lines, '// blah blah blah blah', from it)
<function name="raceselect">
racemenu = NewStringList()
list add (racemenu, "Human")
list add (racemenu, "Dwarf")
list add (racemenu, "Elf")
list add (racemenu, "Halfling")
list add (racemenu, "Orc")
list add (racemenu, "Goblin")
ShowMenu ("Select Race", racemenu, false) {
msg ("You are a " +result+".")
set (player, "race", result)
// ----------------------------------------------------------------------------------------------------------
// fixed it up:
if (result = "Human") {
msg ("As a Human, you're adaptable, but you're not really great at anything.")
}
else if (result = "Dwarf") {
msg ("Dwarves are a hardy people! You're great at working with stone, and are at home in any cave or stonework.")
}
else if (result = "Elf") {
msg ("Elves are an ancient and wise people, whose natural gifts for Magic make them natural spellcasters. However, their fragile bodies often work against them in battle.")
}
else if (result = "Halfling") {
msg ("The tiny halfling is deceptively clever. Their size gives them a natural advantage, allowing them to go places most others can't.")
}
else if (result = "Orc") {
msg ("The powerful Orcs are brutes of raw strength. Never very bright, they are among the strongest of all races.")
}
else if (result = "Goblin") {
msg ("Vicious and unforgiving, the Goblins are a truly intimidating race.")
}
// ----------------------------------------------------------------------------------------------------------
Ask ("Are you sure this is what you want?") {
if (result = True) {
if (game.pov.race = "Dwarf") {
game.pov.Charm = -5
game.pov.Survival = 5
wait {
}
}
ClearScreen
MoveObject (game.pov, Class_Select)
characterselect
}
else if (result = False) {
raceselect
}
}
}
</function>
.... Intimidate =/= Intimidation XD
Okay, problem fixed, no more error. However, it's not adding the values like it's suppose to. This may be because it switches objects to Soldier when I set the Class. Need to come up with a fix for that.
okay.... looked at more of your code (you're already doing/using more advanced stuff, hehe)...
you got a problem of data type mis-matching
Strings vs Objects
for example, you got a 'Dwarf' Object (with it's set Attributes and also the inherited Attributes from your 'characterclass' Object Type. The inherited attributes will be over-ridden/over-written, via/if having same name, by the Attributes set in your 'dwarf' Object), but you're in your 'raceselect' Function at the very bottom, you're using a String List (its items are Strings which need the double quotes in the 'if/switch' checking Scripts/Functions), whereas if you wanted to use your set up 'Dwarf' Object (along with its set up Attributes), you need to either instead, use an Object List (and the items would be Objects, so NO double quotes in the 'if/switch' checking Scripts/Functions), or you need to use the 'GetObject (XXX)' Script/Function to convert the String item from a String List into an Object, which you can then use it (and its set Attributes).
if you want, I can try to change your code up so it'll work... but I'd not know how you'd want it changed up... and you may not know either... hmm... not sure what to do... lol
ah... you also got your races and classes as Player Objects... which would require you to use the 'ChangePov (RACE/CLASS)', to switch over to them... hmm....
doh... another stupid small typo/spelling issue... haha... doncha love trouble-shooting? ... laughs...
not adding what values? (so far the code seems good... let me keep looking in the meantime)
As long the following happens, I don't much care HOW it happens XD
Any help getting me to the point I can actually work on the (hopefully) simpler stuff is appreciated. I learned everything I'm using from watching a youtube video. It helps that I'm at least SLIGHTLY familiar with coding from using mIRC like 7-10 years ago, so I at least have an understanding of If/Then/Else statements, Variables, and similar functions, but the format is unfamiliar to me, and I don't really know any other coding. If you can help me get this set up, I'd really appreciate it.
EDIT: Since I just saw your messages you typed while I was typing this, I'll respond to them now. Most of the problem is I'm using advanced techniques copied from a youtube tutorial with only moderate understanding of the details as to how they work. Said Tutorial was also done with a very dumbed down version of what I'm doing here, so I kind of had to fill in the gaps (it didn't bother with Race, and Race is kind of important for my story...)
EDIT 2: Also, just looked over your post about Strings vs Objects. Had a bit of a time wrapping my head around wtf it was saying, but then it clicked. I can just call the Objects instead of making a new list, since all the Races are objects anyway. The way I did it is how the guy in the video I watched did it.
found another mistake:
<function name="raceselect">
racemenu = NewStringList()
list add (racemenu, "Human")
list add (racemenu, "Dwarf")
list add (racemenu, "Elf")
list add (racemenu, "Halfling")
list add (racemenu, "Orc")
list add (racemenu, "Goblin")
ShowMenu ("Select Race", racemenu, false) {
msg ("You are a " +result+".")
// -------------------------------------------------------------------
// here (an accidental: 'and'result, lol):
set (player, "race", andresult)
// fix (remove the 'and', lol):
set (player, "race", result)
// -----------------------------------------------------------
// previous fix (adding in the missing double quotes):
if (result = "Human") {
msg ("As a Human, you're adaptable, but you're not really great at anything.")
}
else if (result = "Dwarf") {
msg ("Dwarves are a hardy people! You're great at working with stone, and are at home in any cave or stonework.")
}
else if (result = "Elf") {
msg ("Elves are an ancient and wise people, whose natural gifts for Magic make them natural spellcasters. However, their fragile bodies often work against them in battle.")
}
else if (result = "Halfling") {
msg ("The tiny halfling is deceptively clever. Their size gives them a natural advantage, allowing them to go places most others can't.")
}
else if (result = "Orc") {
msg ("The powerful Orcs are brutes of raw strength. Never very bright, they are among the strongest of all races.")
}
else if (result = "Goblin") {
msg ("Vicious and unforgiving, the Goblins are a truly intimidating race.")
}
Ask ("Are you sure this is what you want?") {
if (result = True) {
if (game.pov.race = "Dwarf") {
game.pov.Charm = -5
game.pov.Survival = 5
wait {
}
}
ClearScreen
MoveObject (game.pov, Class_Select)
characterselect
}
else if (result = False) {
raceselect
}
}
}
</function>
tomarrow, I'll actually test/trouble-shoot/debug out your game code, and get it fixed up for you, if you can't get it fixed up by then, but it's late here and I need to sleep first, lol. So, tomarrow... like at least 12 hrs... lol
It's probably a good idea to take a break anyway. Been at this for a few hours XD
can you post what's not working with it? (as specific as you can, for example: what values, and where in your code, aren't working/showing/changing), as I can't tell otherwise until I actually plug in your code and test it out tomarrow.
are the values not working? are you talking about the values in the 'characterselect' Function, for example:
// 'characterselect' Function
// blah blah scripting
ShowMenu ("Select Class", charactermenu, false) {
char = result
msg ("You chose " +char+".")
if (char<>null) {
if (char = "Soldier") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
ChangePOV (Soldier)
game.pov.Combat = game.pov.Combat + 15
game.pov.Intimidation = game.pov.Intimidation + 15
game.pov.Knowledge = game.pov.Knowledge + 5
game.pov.Stealth = game.pov.Stealth + 5
game.pov.Magic = 0
game.pov.Healing = 0
game.pov.Charm = game.pov.Charm + 10
game.pov.Survival = game.pov.Survival + 10
game.pov.Awareness = game.pov.Awareness + 10
ClearScreen
MoveObject (game.pov, Character_Setup)
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
namecharacter
}
else if (result = False) {
characterselect
}
}
}
or, are they just not displaying on the right side in the status pane during game play (issue with your 'statusattributes') ???
your code seems fine... my guess is that maybe the 'statusattributes' are just not displaying/updating your Attributes...
sure way, an example:
(the '!' will/ensures display/ing the current/updated values)
<statusattributes type="stringdictionary">
<item>
<key>Combat</key>
<value>Combat: !</value>
</item>
<item>
<key>Knowledge</key>
<value>Knowledge: !</value>
</item>
<item>
<key>Intimidation</key>
<value>Intimidation: !</value>
</item>
<item>
<key>Charm</key>
<value>Charm: !</value>
</item>
<item>
<key>Stealth</key>
<value>Stealth: !</value>
</item>
<item>
<key>Survival</key>
<value>Survival: !</value>
</item>
<item>
<key>Awareness</key>
<value>Awareness: !</value>
</item>
<item>
<key>Healing</key>
<value>Healing: !</value>
</item>
<item>
<key>Magic</key>
<value>Magic: !</value>
</item>
<item>
<key>race</key>
<value>Race: !</value>
</item>
</statusattributes>
So, I just got it working XD
But only for Dwarf Soldiers, which is what I've been messing with this whole time anyway to get just ONE of the damn things working. Now I just gotta repeat it on everything else. Here's the new version with my changes I've made.
Most of the problem stemmed from the shoddy attempt to force in the Race system I wanted when the scripting I copied wasn't designed with it in mind. Ultimately, I moved from using the Class Object to using the Race Object for the player, but I didn't set up the Attributes properly for it. Now it works.
awesome, well done! sorry I wasn't that helpful (I have a hard time getting my bearings with others code and then in trouble-shooting the issues, as I'm lazy and try to do it by eye-sight and free-hand writing, instead of actually testing and debugging that way)
others could have helped you a lot better/quicker than I... I'm not the best at helping others....
When I was playing around with a character creation system (based on one that Anonynn posted, I think), this was exactly the kind of situation I wanted to make easier.
I like the system you're using; now you've got me wondering if I could combine that with the approach I was using.
well... in my limited experience in game making/designing... the 'character creation' is the hardest/longest part of making a game (if doing an extensive/complex skyrim-RPG design of 'character creation' and game/game-design), as it literally sets everything for what and how you're doing everything in your game, and at least for me, it seems like I have to do it first, before I can really work on anything/everything else for my game... sighs.
trying to code in an advanced character creation is not easy...
I myself am still working on character creation for my estimated 'year 94839048329043920489032849032840932840932482904 AD' completed ambitious rpg, I'm working on... lol
The sad thing is I technically did this once already, albeit in a simpler form. For a preview of what this should be like, behold my CYOA version that I started on a website that made it EASY to do, and which I would have preferred using, but said website is apparently abandoned and will be killed in a year.... Not something I want to put a bunch of work on only to later lose it.
http://writer.inklestudios.com/stories/qm55
As for this, I'm currently part way through converting all the characters to the versions that WORK, and when I get that done, I'm probably gonna post it here to get some feedback on what I did, since I've basically dived head-first into trying to use the advanced systems from the start, so I'm sure I'm doing things the hard way XD
Also, to give an idea of what all I have to do to convert these characters, here's an "old" style and a "new" style for the characters (two different ones mind you, but I have to do all the same work for both of them anyway...)
The new one is first btw.
else if (char = "Mage") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = 0
game.pov.Intimidation = 0
game.pov.Magic = game.pov.Magic + 15
game.pov.Knowledge = game.pov.Knowledge + 15
game.pov.Stealth = game.pov.Healing + 10
game.pov.Survival = game.pov.Survival + 10
game.pov.Awareness = game.pov.Awareness + 5
game.pov.Stealth = game.pov.Stealth + 5
game.pov.Charm = game.pov.Charm + 5
game.pov.Deceive = game.pov.Deceive + 10
game.pov.Class = "Mage"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 1
game.pov.Mana = game.pov.Mana * 3
game.pov.MaxHealth = game.pov.Health
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
game.pov.HP = ""+game.pov.Health+ " / "+game.pov.MaxHealth+ ""
namecharacter
}
else if (result = False) {
characterselect
}
}
}
And here's the old style.
else if (char = "Thief") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
ChangePOV (Thief)
ClearScreen
MoveObject (game.pov, Character_Setup)
game.pov.HP = ""+game.pov.Health+ " / "+game.pov.MaxHealth+ ""
namecharacter
}
else if (result = False) {
characterselect
}
}
}
just getting something that works is a huge success, you can always go back later and make the code design better/more-efficient/concise/less/etc (re-factor/stream-line), as you get more experience and/or learn more things that can be done with the coding. Also, once you got some code design done/working, it's easier, to see how you can make it better (remove/combine/handle redundant and/or un-needed and/or poor/inefficient coding).
unfortunately.... this is difficult for perfectionists... we spend our entire time trying to make our code better, and thus never actually get any code done and working... let alone a game, lol.
So, for the curious, I've got the core character creation stuff done. Feedback is appreciated. I'm sure the balance is wacky right now XD
So, important question: Should my combat system use a hit/miss system based on dice rolls and modifiers? Or should hits be automatic? Also, any tips where I can learn about how to design a combat system? I was going to use a library, but I realized early on that I would never be happy with the way any library will do it over the way I want to do it.
I think your "old" style is neater than your "new" style. Putting all the attributes into an object means it's easier to find the bit you want if you want to edit them later (like if you found one class is a bit overpowered when you need to test it).
One thing I would comment on is the start of your characterselect function. You have a large block of 'if' statements, and lots of list add
statements.
If you gave each race an attribute which contains a list of valid classes (for example, set Dwarf.permittedclasses to "Soldier;Priest;Hunter;Bard;Paladin") then all of this:
<function name="characterselect"><![CDATA[
charactermenu = NewStringList()
if (game.pov = Dwarf) {
charactermenu = NewStringList()
list add (charactermenu, "Soldier")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
else if (game.pov = Elf) {
list add (charactermenu, "Mage")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
...
...
...
}
ShowMenu ("Select Class", charactermenu, false) {
could be reduced to:
<function name="characterselect"><![CDATA[
charactermenu = Split(game.pov.permittedclasses, ";")
ShowMenu ("Select Class", charactermenu, false) {
Similarly, it's not such a big deal, but you have a section:
if (game.pov.race = "Dwarf") {
ChangePOV (Dwarf)
}
else if (game.pov.race = "Elf") {
ChangePOV (Elf)
}
...
...
that could be more efficiently written as:
ChangePOV(GetObject(game.pov.race))
I'm not writing it in code, I'm using the GUI, so I have no idea how to do that without directly editing the code (which I'm trying to avoid).
If you want to go back to something more like your 'old' system for the classes, you could use something like:
<function name="characterselect"><![CDATA[
charactermenu = Split(game.pov.permittedclasses, ";")
ShowMenu ("Select Class", charactermenu, false) {ShowMenu ("Select Class", charactermenu, false) {
char = GetObject(result)
msg ("You chose " +result+".")
Ask ("Are you sure you want to be the " +result+"?") {
if (result) {
foreach (attr, GetAttributeNames(char, true)) {
if (not HasAttribute(game.pov, attr)) {
set (game.pov, attr, GetAttribute(char, attr))
}
else if (HasInt (char, attr)) {
set (game.pov, attr, GetInt(game.pov, attr) + GetInt(char, attr))
}
}
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.changedHealth => {
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
}
game.pov.changedMana => {
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
}
game.pov.MaxHealth = game.pov.Health * 3
game.pov.MaxMana = game.pov.Mana * 2
game.pov.Health = game.pov.Health * 3
game.pov.Mana = game.pov.Mana * 2
ClearScreen
MoveObject (game.pov, Character_Setup)
}
else {
characterselect()
}
}
}
]]></function>
(That's assuming you have an object named 'Soldier', or 'Paladin', or similar. If the Class object has an attribute that the Race object doesn't (like the Class
attribute) it is copied over; if they both have an attribute (like Knowledge
), the two values are added together)
And, in case it saves you some typing in future, you could have replaced:
racemenu = NewStringList()
list add (racemenu, "Human")
list add (racemenu, "Dwarf")
list add (racemenu, "Elf")
list add (racemenu, "Halfling")
list add (racemenu, "Orc")
list add (racemenu, "Goblin")
with
racemenu = FilterByType (AllObjects(), "characterclass")
which gets a list of all objects that have the "characterclass" type (looks like that type is used for Races in your example)
If you were using the same type for Races and Classes, you'd have to specify them manually, but you could shorten it to:
racemenu = Split("Human;Dwarf;Elf;Halfling;Orc;Goblin", ";")
I've got it working right now, but I appreciate the help. I just finished (like an hour ago) setting up all the Classes with their stats. Eventually I may convert it to this more effective version if I need to do a major change, just because then I don't have to redo who knows how much stuff (even if most of the work was just c/ping a lot).
your code can be be made better later (as we'd have to explain new code things we'd be using to do it to/for you and/or helping you with doing them right and understanding them), getting everything working as you want is what is important right now, later we can help/show you ways of designing your code better, but let's first get your own code done with everything you want and with it working.
also, I just posted this in a new thread, and you may already understand this stuff now, but just in case, here it is, if you want to look at it (and/or if you still don't understand this stuff):
http://textadventures.co.uk/forum/quest/topic/2kw6ql-5ukcgzikzt6mwmq/need-some-coding-help-with-character-creation#0d3a823b-5ff3-454c-a440-3cd2bb1d281d
I'd recommend studying other people's combat coding, so you got some tools to use, and then creating your own combat coding, based on what you can do and know/understand.
check out pixie's 'deeper' (or whatever it's called) game and/or his 'combat 3.0' (I think) library
there's also my old combat coding (using Pertex' combat code, and his help) you can take a look at (it's a doc download of my combat code, just open it up in a text editor software: notepad, wordpad, Apple: text editor, or better yet: download, install, and open it up with notepad++, a really good/advanced/useful text editor software/program: https://notepad-plus-plus.org ):
(if you download and install the 'notepad++' software/program, once you open it up, at the top, under 'languages', select the 'xml' language, to color code your code for you, making it easier to read, edit, and trouble-shoot, as quest's 'aslx' is similar to 'xml', and there's no differences/problems I've noticed in using 'xml' for its color coding)
https://textadventures.co.uk/forum/quest/topic/3348/noobie-hks-help-me-thread#22485 (this is Pertex refactoring/cleaning-up/better'ing/fixed-errors-within, my code, so you can understand it better, than looking at my bad code in my posts)
and here's my legend/key for it (I've learned since to NEVER EVER use abrevs anymore, lol):
01. cc = character creation function
02. sa = status attributes (mainly for implementing/displaying of ' cur / max ' stats) function
03. char = character object type ("pcs", "npcs", "monsters", etc., so, not a room, item, equipment, spell, etc)
04. pc = playable character object type ("player" characters / game.povs)
05. npc = non-playable character ("people", "monsters", and etc, so not a "player" character / not a game.pov, I'm going to have a hostility system, so any npc can be friendly or hostile, instead of having an actual "monster/enemy" type set aside)
06. hp = hit points (life) stat attribute
07. mp = mana points (magic) stat attribute
08. str = strength (physical damage, carry weight / equipment requirement, etc) stat attribute
09. end = endurance (physical defense, and etc) stat attribute
10. dex = dexterity (weapon~attack skill, think of this as "if your attack connects or not, do you 'whiff' or not", so not to gete confused with hc, and etc) stat attribute
11. agi = agility (dodging/evading, and etc) stat attribute
12. spd = speed (who goes first in battle, extra battle turns, escaping from battle, and etc) stat attribute
13. hc = hit chance (think of this more as piercing their armor or not, so not to get confused with dex, and etc) stat attribute
14. pd = physical damage stat attribute
15. fp = fire damage stat attribute
16. wp = water damage stat attribute
17. ap = air damage stat attribute
18. ed = earth damage stat attribute
19. ld = light damage stat attribute
20. dd = dark damage stat attribute
21. pr = physical resistance stat attribute
22. fr = fire resistance stat attribute
23. wr = water resistance stat attribute
24. ar = air resistance stat attribute
25. er = earth resistance stat attribute
26. lr = light resistance stat attribute
27. dr = dark resistance stat attribute
28. defending = boolean (reduces damage done for that character and increases the damage done by that character, if they chosoe to attack on the next turn)
29. escaped = boolean, run from battle (not completed/implemented yet)
30. hostile = boolean, any npc can be friendly or a(n) "monster/enemy", based upon a hostility scale (0-100), but not completed
31. dead = boolean
32. crit_hit = critical hit (bonus damage based upon luck)
33. luck = luck stat attribute
34. lvl = level stat attribute
35. exp = experience stat attribute
36. cash = cash stat attribute (currency)
37. lvlup = level up function
and there's some other combat guides/links, but you'll have to try to find them... or I can try to find them for you too... it's been awhile (and most of them are Pixie's... which have all been consolidated and improved within his 'deeper' game and/or his 'combat 3.0' library)
and we'll help you along too with whatever as well, of course.
it depends on what combat you want in your game (simple '(not true) combat' or complex rpg damage and modifer and etc combat), and what you're capable of doing.
One of my major goals with this game is to reward players choosing what they want, by allowing them to tackle situations however they want. Each option should feel equally engaging and viable (though some may be better/easier in a particular situation).
There are 3 main methods of tackling problems: Stealth, Conversation, and Fighting.
Stealth is self-explanatory, and something I'm going to have to think more on how to make engaging, as I haven't gotten to that point yet.
Conversation is broken down into Charm, Intimidate, and Deceive, each giving you various options that can appear during dialogs.
I've already been looking at the CombatLib from Deeper, but I'm stumped as to how to get it working. I loaded it up, and have followed the instructions so far, but just keep getting errors that make me more inclined to do my own thing. I originally thought it came with items too, but it didn't (don't know why I expected it to).
Even if I could just use CombatLib, I'd have to figure out how to change it to use my own stats, since I don't want to use Strength, Agility, Stamina, and Intelligence as my stats.
If you can figure out what the errors mean, I'd appreciate help fixing this.
Error running script: Error compiling expression 'game.pov.turncount + 1': ArithmeticElement: Operation 'Add' is not defined for types 'Object' and 'Int32' (happens any time I do ANYTHING)
And this happens when I try to attack something.
Error running script: Error evaluating expression 'not HasInt(game.pov.equipped, "ammo")': HasInt function expected object parameter but was passed 'null'
Error running script: Error compiling expression 'game.pov.sneaklevel - by': ArithmeticElement: Operation 'Subtract' is not defined for types 'Object' and 'Int32'
Error running script: Error compiling expression '(game.pov.agility + game.pov.strength) / 2 + game.pov.ob_bonus + game.pov.attackbonus': ArithmeticElement: Operation 'Add' is not defined for types 'Object' and 'Object'
Error running script: Error compiling expression 'GetDamage (game.pov.equipped, game.pov.strength / 2 + this.temp_damage + game.pov.damagebonus, this)': ArithmeticElement: Operation 'Divide' is not defined for types 'Object' and 'Int32'
Error running script: Error compiling expression 'game.pov.turncount + 1': ArithmeticElement: Operation 'Add' is not defined for types 'Object' and 'Int32'```
ah, yes... combat vs stealth vs diplomacy (Fallout games... lol, well at least 1+2, as I've not played 3+4. Also, Fallout isn't exactly the only game to use these different types of approaches/choices in completing a quest/task... but whatever, lol)
and ranged combat... I'm guessing you're trying to make a Fallout like game.. lol :D (probably am totally wrong, meh... lol)
"Error running script: Error compiling expression 'game.pov.turncount + 1': ArithmeticElement: Operation 'Add' is not defined for types 'Object' and 'Int32' (adran08)"
I think... you have no 'game.pov.turncount' Integer Attribute, create a 'turncount' Integer Attribute on your 'player' Player Object and give/set it's (initial) Value as '0', hence the error 'is not defined = doesn't exist ... or some kind of problem/issue/conflict'
Unfortunately, whenever see 'object' in an Error message... this is the most ambigious, as it can indeed mean 'object', but it can also mean ANY type of error as well... which makes it very un-helpful (amibiguous), lol.
"Error running script: Error evaluating expression 'not HasInt(game.pov.equipped, "ammo")': HasInt function expected object parameter but was passed 'null' (adran08)"
again there's no 'game.pov.equipped' Object Attribute created on your 'player' Player Object:
create a 'equipped' Object Attribute on your 'player' Player Object
an 'Object' Attribute stores an Object (reference/pointer to that Object, not the actual Object itself):
// example (using scripting):
create ("katana") // creating a 'katana' Object
katana.damage = 50 // creating/setting the katana's damage
player.weapon = katana // storing the 'katana' (reference/pointer to that) Object // this is creating and setting-up the needed 'Object' Attribute
// example of using it:
create ("orc")
orc.life = 100
orc.life = orc.life - player.weapon.damage
// orc.life = [100] - [50] = 50
// and if we change our weapon:
create ("dagger")
dagger.damage = 10
player.weapon = dagger
orc.life = orc.life - player.weapon.damage
// orc.life = [100] - [10] = 90
and then, all of your projectile weapon Objects, which you can equip using as the Value for the 'player.equipped' Object Attribute, those Objects need to have an 'ammo' Integer Attribute, but your melee weapons don't, as the 'HasInt (game.pov.equipped, "ammo")' returns 'false', if there's no 'ammo' Integer Attribute on that Object. But, you're getting the error message because you don't have the 'equipped' Object Attribute created on your 'player' Player Object (and it needs a NAME_OF_OBJECT set as it's Value)
the equipment stuff is from pixie's equipment library (which pixie used some of chase's 'wearables (equipment)' library stuff)
I think probably most of these issues have to do with using libraries and not creating what you need to create in your game code, for the libraries' scripting usage.
"Error running script: Error compiling expression 'game.pov.sneaklevel - by': ArithmeticElement: Operation 'Subtract' is not defined for types 'Object' and 'Int32' (adran08)"
again, there is no 'game.pov.sneaklevel' (presumably an) Integer Attribute, so create one (and set it's initial value to '0' or whatever integer number) on your 'player' Player Object
the rest of the errors seem to be the same... just make sure you got those Attributes created/existing for your Player Objects (as you change over to your race/class Player Objects, make sure they have these Attributes... and hopefully then your code won't have these errors anymore... hopefully... if not... let us know... and we'll keep working on it until it's working... this is 90% of programming... even for professional programmers... tracking down often very simple small stupid mistakes in the code, lol)
For the record, here's my Stat/Skill setup
HP = Survival + RaceDurability * ClassModifier (0-5)
MP = Knowledge + Magic + RaceMagic * ClasssModifier (0-3)
Armor = From Items Only; Reduces damage taken
Combat = To Hit
Charm = Social Skill
Intimidate = Social Skill
Deceive = Social Skill
Knowledge = To gain further information; For Magic
Stealth = To avoid detection; Possible Damage avoidance aka Evasion if I don't just make ANOTHER skill for that too
Survival = Effects some situations in wilderness; Health
Awareness = Detection vs Stealth; Turn order in Combat
Healing = Ability to heal or heal others
Magic = For Magic; To Hit with Magic
Also, that didn't fix it. Even with that added to Player, it still failed.
Okay, putting that on the characterclass thing that all the race objects gain fixed the first error, but the second (larger) error still happens.
I think the error is related to the stats, since I don't know how to convert the stat system to use MY system. Can anyone help me with that?
ah, sorry, ya, I saw you didn't have the 'characterclass' Object Type / Inherited Attribute on your 'player' Player Object, which might have been causing errors, but haven't gotten around to posting that yet... I was just finishing up your second error issue... still getting to the other ones... now.. lol
P.S.
I'm still editing my previous post, as I work on your error messages, so check back on that post periodically...
The player object isn't used beyond the first like... 3 seconds of the game XD player starts as it then becomes one of the Races.
ya, but if any Attributes are needed from your 'characterclass' Object Type, for while still in control of your 'player' Player Object (game.pov = player), you'll have errors as your 'player' Player Object (probably) won't have those Attributes... just a precaution by me due to still not being that familiar with all of your code and its design yet... but if it's not needed, then indeed you don't ahve to add the 'characterclass' Object Type as an Inherited Attribute to your 'player' Player Object.
doh... never played Fallout... wow... I thought Fallout 4 was popular game... that everyone's bought/played... lol
well if interested... you can take a look at Fallout 2 for some good ideas for your own game:
ht.tps://fallout.gamepedia.com/The_Nearly_Ultimate_Fallout_2_Guide
(remove the dot/period in 'ht.tps' for the above to work in the url)
The real problem is the instructions are VERY unclear to me on what I need to set up, and I expected libraries to simply be something that worked when you used them.
unfortunately... that's not possible... as people don't know what other people are doing in their games... lol
the libraries provide a lot of or extra functionality, but they can't know and include (nor would they want to, lol) everything that everyone wants for their own game, lol.
libraries provide functionality, but you still got to set up stuff on your own part, for being able to use the libraries functionalities
ya, if libraries don't have good documentation (or if you jsut can't understand/follow it)... it's definately frustrating...
fortunately, most libraries are pixie's, and he'll be glad to help you with them... just get his attention... hehe.
yep... got to be rich... I got PS1... and then my jaw dropped like when PS3 (I think) was for like $600 ... I'm like... who's that rich? NOT ME! I'd just buy a computer instead anyways... though modern consoles are practically computers now... but meh... I'm getting old... sighs....
my comment was jsut that Fallout 4, Halo, CoD, WOW, overwatch, etc... are all the popular games, that seemingly all millenials have and play... wasn't about you specifically and never meant to be insulting/personal... just a comment of mine about what's popular gaming with millenials now.
(I'm extremely poor too... and even if I wasn't... I don't ahve the time to play games hardly at all anymore, and as I'm getting older, games are becoming more boring too, anyways, sighs)
Okay, so I'm back from my break, and ready to go through and add all these variables.... Might need help afterward trying to convert the CombatLib to use MY stats when I've got it at least working though.
OKAY! I think I've fixed MOST of the errors, and finally finished the Assign Points function. Now, I seriously need help, because as far as I can tell, the only remaining problem stems from the fact I'm not using his character creation system. So, I need help figuring out what I need to do to convert the existing system to use MY stats, rather than what it was built with.
I'm not familiar with Pixie's combat nor character-creation libraries ... you'll need pixie's help or someone else who's familiar with pixie's combat and/or character creation libraries
you can pm him... if he doesn't respond to this thread...
to pm, just find a post by him, and click on his blue name, then in the upper left, is a black-white post card like button, click on that to create a pm, and send it to him.
OKAY! I think I've fixed MOST of the errors, and finally finished the Assign Points function. Now, I seriously need help, because as far as I can tell, the only remaining problem stems from the fact I'm not using his character creation system. So, I need help figuring out what I need to do to convert the existing system to use MY stats, rather than what it was built with.
I would think it would be much less work to change your code rather than all the scripts which deal with these attributes in the libraries.
Error running script: Error compiling expression '(game.pov.agility + game.pov.strength) / 2 + game.pov.ob_bonus + game.pov.attackbonus': ArithmeticElement: Operation 'Add' is not defined for types 'Object' and 'Object'
Error running script: Error compiling expression 'GetDamage (game.pov.equipped, game.pov.strength / 2 + this.temp_damage + game.pov.damagebonus, this)': ArithmeticElement: Operation 'Divide' is not defined for types 'Object' and 'Int32'
Goblin swings at goblin and hits, doing 3 points of damage.
Error running script: Error compiling expression '0 >= game.pov.hitpoints': CompareElement: Operation 'GreaterThanOrEqual' is not defined for types 'Int32' and 'Object'
The first thing I would do is change the raceselect script to this (which keeps the game.pov set to player, hence ALL attributes will be on game.pov when play begins).
You'll need to put your attributes on the player, then see what messes up and fix it.
I may be wrong. It may be easier to modify all the scripts in the libraries. I doubt this is the case, though.
I'm attempting to modify your code right now. I'll be back shortly.
The problem with using his setup is he has 4 character attributes while I have 10. I kind of want that greater depth. His system also lacks classes or races, so it has to be adapted to that either way. If my stats can generate his stats, that could be used as a patch I guess.
1. Save a backup copy of your game file. (Very important!!!)
2. Switch to full code view in your game.
3. Press CTRL+A (to select ALL the text), then delete it. Leaving nothing.
4. Paste this in, then see if everything works. (I believe it will.)
Click "Details" for the code:
REVISION 3
<!--Saved by Quest 5.7.6404.15496-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<include ref="StackLib.aslx" />
<include ref="ConvLib.aslx" />
<include ref="ShopLib.aslx" />
<include ref="CombatLib.aslx" />
<include ref="ClothingLib.aslx" />
<game name="Quest for the magic Ring">
<gameid>a2d49300-46cb-48a8-8e22-8ddd04eb6545</gameid>
<version>1.0</version>
<firstpublished>2018</firstpublished>
<showhealth type="boolean">false</showhealth>
<showmoney />
<feature_limitinventory />
<feature_lightdark />
<feature_asktell />
<feature_annotations />
<attr name="feature_advancedwearables" type="boolean">false</attr>
<appendobjectdescription />
<allowlookdirections />
<category>RPG</category>
<feature_advancedscripts />
<showscore type="boolean">false</showscore>
<clearscreenonroomenter />
<attr name="autodescription_youarein_newline" type="boolean">false</attr>
<attr name="autodescription_youcansee_newline" type="boolean">false</attr>
<attr name="autodescription_youcango_newline" type="boolean">false</attr>
<attr name="autodescription_description_newline" type="boolean">false</attr>
<showreactions />
<start type="script">
CombatInitialise
raceselect
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<enter type="script">
</enter>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<inherit name="raceclass_type" />
<money type="int">50</money>
<statusattributes type="stringdictionary">
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Intimidation</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
<item>
<key>race</key>
<value></value>
</item>
</statusattributes>
<volume type="int">100</volume>
<containerfullmessage>You can't carry any more! It's too heavy!</containerfullmessage>
<turncount type="int">0</turncount>
</object>
</object>
<object name="characters">
<inherit name="editor_room" />
<object name="Soldier">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Soldier</Class>
<MaxHealth type="int">40</MaxHealth>
<statusattributes type="stringdictionary">
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
</statusattributes>
</object>
<object name="Mage">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Soldier</Class>
<MaxHealth type="int">38</MaxHealth>
<statusattributes type="stringdictionary">
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
<item>
<key>Equipment</key>
<value></value>
</item>
</statusattributes>
</object>
<object name="Thief">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Soldier</Class>
<MaxHealth type="int">40</MaxHealth>
<statusattributes type="stringdictionary">
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
<item>
<key>Equipment</key>
<value></value>
</item>
</statusattributes>
</object>
<object name="Priest">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Soldier</Class>
<MaxHealth type="int">40</MaxHealth>
<statusattributes type="stringdictionary">
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
<item>
<key>Equipment</key>
<value></value>
</item>
</statusattributes>
<Health type="int">20</Health>
</object>
<object name="Hunter">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Soldier</Class>
<MaxHealth type="int">40</MaxHealth>
<statusattributes type="stringdictionary">
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
<item>
<key>Equipment</key>
<value></value>
</item>
</statusattributes>
</object>
<object name="Bard">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Soldier</Class>
<MaxHealth type="int">40</MaxHealth>
<statusattributes type="stringdictionary">
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
<item>
<key>Equipment</key>
<value></value>
</item>
</statusattributes>
</object>
<object name="Paladin">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Soldier</Class>
<MaxHealth type="int">40</MaxHealth>
<statusattributes type="stringdictionary">
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
<item>
<key>Equipment</key>
<value></value>
</item>
</statusattributes>
</object>
</object>
<object name="weapons">
<inherit name="editor_room" />
<object name="Long Sword">
<inherit name="editor_object" />
<inherit name="weapontype" />
<inherit name="wearable" />
<inherit name="weapon" />
<feature_wearable />
<attr name="wear_layer" type="int">3</attr>
<wear_slots type="stringlist">
<value>Weapon</value>
</wear_slots>
<bonusatts>Combat+5</bonusatts>
<volume type="int">3</volume>
<multistate />
<advanced />
<damagedicenumber type="int">2</damagedicenumber>
<damagedicesides type="int">4</damagedicesides>
<damagebonus type="int">2</damagebonus>
<take type="script">
msg (DynamicTemplate("TakeSuccessful", this))
this.parent = game.pov
SetVerbs
if (game.pov.Class = "Soldier") {
msg (DynamicTemplate("TakeSuccessful", this))
this.parent = game.pov
SetVerbs
}
</take>
</object>
</object>
<object name="basic_items">
<inherit name="editor_room" />
<object name="Pouch of Potions">
<inherit name="editor_object" />
<inherit name="container_limited" />
<inherit name="wearable" />
<feature_container />
<look>This is a pouch for potions.</look>
<inroomdescription>This is a pouch.</inroomdescription>
<listalias>Pouch</listalias>
<alt type="stringlist">
<value>Potions Pouch</value>
</alt>
<volume type="int">20</volume>
<feature_wearable />
<attr name="wear_layer" type="int">3</attr>
<wear_slots type="stringlist">
<value>Pouch</value>
</wear_slots>
</object>
</object>
<object name="health_items">
<inherit name="editor_room" />
<object name="Small_Potion">
<inherit name="editor_object" />
<inherit name="healthitem" />
<inherit name="childstack_object" />
<stackparent type="object">Small Potion Stack</stackparent>
</object>
<object name="Basic_Potion">
<inherit name="editor_object" />
<inherit name="healthitem" />
<attr name="feature_usegive" type="boolean">false</attr>
<use type="boolean">false</use>
</object>
<object name="Super_Potion">
<inherit name="editor_object" />
<inherit name="healthitem" />
</object>
</object>
<object name="armor">
<inherit name="editor_room" />
<object name="Cloth">
<inherit name="editor_object" />
<inherit name="armortype" />
</object>
<object name="Leather">
<inherit name="editor_object" />
<inherit name="armortype" />
</object>
<object name="Chainmail">
<inherit name="editor_object" />
<inherit name="armortype" />
</object>
</object>
<object name="start">
<inherit name="editor_room" />
</object>
<object name="race">
<inherit name="editor_object" />
<object name="Human">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">60</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<statusattributes type="stringdictionary">
<item>
<key>gender</key>
<value></value>
</item>
<item>
<key>Class</key>
<value></value>
</item>
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Deceive</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
</statusattributes>
<RaceHealth type="int">0</RaceHealth>
<RaceMagic type="int">0</RaceMagic>
</object>
<object name="Dwarf">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">-5</Charm>
<Survival type="int">5</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<statusattributes type="stringdictionary">
<item>
<key>gender</key>
<value></value>
</item>
<item>
<key>Class</key>
<value></value>
</item>
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Deceive</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
</statusattributes>
<RaceHealth type="int">10</RaceHealth>
<RaceMagic type="int">5</RaceMagic>
</object>
<object name="Elf">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">-5</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">5</Magic>
<statusattributes type="stringdictionary">
<item>
<key>gender</key>
<value></value>
</item>
<item>
<key>Class</key>
<value></value>
</item>
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Deceive</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
</statusattributes>
<RaceHealth type="int">-5</RaceHealth>
<RaceMagic type="int">15</RaceMagic>
</object>
<object name="Halfling">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">-5</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">5</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<statusattributes type="stringdictionary">
<item>
<key>gender</key>
<value></value>
</item>
<item>
<key>Class</key>
<value></value>
</item>
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Deceive</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
</statusattributes>
<RaceHealth type="int">-10</RaceHealth>
<MP type="string"></MP>
<RaceMagic type="int">-5</RaceMagic>
</object>
<object name="Orc">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">5</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">-5</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<statusattributes type="stringdictionary">
<item>
<key>gender</key>
<value></value>
</item>
<item>
<key>Class</key>
<value></value>
</item>
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Deceive</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
</statusattributes>
<RaceHealth type="int">20</RaceHealth>
<RaceMagic type="int">0</RaceMagic>
</object>
<object name="Goblin">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">-5</Healing>
<Magic type="int">0</Magic>
<statusattributes type="stringdictionary">
<item>
<key>gender</key>
<value></value>
</item>
<item>
<key>Class</key>
<value></value>
</item>
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Deceive</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
</statusattributes>
<RaceHealth type="int">5</RaceHealth>
<RaceMagic type="int">10</RaceMagic>
<Deceive type="int">5</Deceive>
</object>
</object>
<object name="Character_Setup">
<inherit name="editor_room" />
<object name="Common Long Sword">
<inherit name="editor_object" />
<inherit name="weapontype" />
<inherit name="wearable" />
<inherit name="weapon" />
<attr name="feature_wearable" type="boolean">false</attr>
<attr name="wear_layer" type="int">4</attr>
<wear_slots type="stringlist">
<value>Weapon</value>
</wear_slots>
<bonusatts>Combat+5</bonusatts>
<volume type="int">3</volume>
<multistate type="boolean">false</multistate>
<advanced />
<damagedicenumber type="int">2</damagedicenumber>
<damagedicesides type="int">6</damagedicesides>
<damagebonus type="int">2</damagebonus>
<take type="script">
msg (DynamicTemplate("TakeSuccessful", this))
this.parent = game.pov
SetVerbs
if (game.pov.Class = "Soldier") {
msg (DynamicTemplate("TakeSuccessful", this))
this.parent = game.pov
SetVerbs
}
</take>
</object>
<object name="Shield">
<inherit name="editor_object" />
<inherit name="wearable" />
<inherit name="shield" />
<attr name="wear_layer" type="int">3</attr>
<wear_slots type="stringlist">
<value>Shield</value>
</wear_slots>
<advanced />
<removeable />
</object>
<object name="Goblin1">
<inherit name="editor_object" />
<inherit name="monster" />
<alias>Goblin</alias>
<level type="int">1</level>
<attackbonus type="int">0</attackbonus>
<reflectsmagic type="boolean">false</reflectsmagic>
<monstertype>Goblinoid</monstertype>
</object>
</object>
<object name="Class_Select">
<inherit name="editor_room" />
</object>
<object name="spellbook">
<inherit name="editor_room" />
<object name="Fireball">
<inherit name="editor_object" />
</object>
<object name="Mystic Light">
<inherit name="editor_object" />
</object>
</object>
<object name="Stack Room">
<inherit name="editor_room" />
<object name="Small Potion Stack">
<inherit name="editor_object" />
<inherit name="healthitem" />
<inherit name="homo_stack_container" />
</object>
</object>
<object name="Cave of Alignment">
<inherit name="editor_room" />
<dark type="boolean">false</dark>
<description><![CDATA[This is a reminder for myself. Combine Tutorial with Moral Test. Determine Lawful/Chaotic and Good/Evil values. 0-100 values, each choice adds or removes from the values. <br/><br/>Start True Neutral for most. <br/><br/>Paladin = 75 Lawful 75 Good<br/>Goblin = 25 Chaotic 25 Evil<br/>Priest = 50 Neutral 75 Good<br/>Thief = 25 Chaotic 50 Neutral<br/><br/>0 Chaotic - Lawful 100<br/>0 Evil - Good 100]]></description>
</object>
<object name="South Warren Dj Inn">
<inherit name="editor_room" />
<alias>South Warren - Dj Inn</alias>
<description>The inn is lively, with lots of people, and even a small group of Bards playing in the background. The decorations are mostly warm-colored, with well-kept furniture spread through-out. Opposite the door, front and center, is the Innkeeper.</description>
<enter type="script">
play sound ("23_The_Slaughtered_Ox.mp3", false, true)
</enter>
<onexit type="script">
stop sound
</onexit>
<beforeenter type="script"><![CDATA[
if (game.pov.Charm <= 14) {
HideTopic (mary dr black)
}
else if (game.pov.Charm >= 15) {
ShowTopic (mary dr black)
}
]]></beforeenter>
<exit alias="up" to="South Warren Dj Inn Upstairs Hall 1">
<inherit name="updirection" />
<message>South Warren - Dj Inn - Upstairs Hall 1</message>
</exit>
<object name="Innkeeper">
<inherit name="editor_object" />
<inherit name="talkingchar" />
<activeconversations />
<greet type="script">
</greet>
</object>
<object name="Marie">
<inherit name="editor_object" />
<inherit name="talkingchar" />
<inherit name="namedfemale" />
<reactions><![CDATA[@<br/>greeting<br/>true<br/>'Hi!' says Mary<br/><br/>@<br/>plain hat<br/># ghhjhj<br/>plain_hat.worn<br/>'Oh, you are wearing a hat,' says Mary.<br/>& this testscript<br/><br/>@<br/>fancy hat<br/>fancy_hat.worn<br/>'Wow, what a fancy hat,' says Mary.<br/>~ plain hat<br/><br/>@<br/>trophy<br/>player.won_competition and trophy.parent = player<br/>'Cool trophy,' says Mary.<br/><br/>@<br/>trophy<br/>player.won_competition<br/>'Hey I heard you won the completion,' says Mary.<br/>= this alias "Happy Mary"<br/>+ Mary happiness 5<br/><br/>Each reaction is described by four or more lines, composed thus:<br/><br/>The first line must be a @ on a line on its own; this indicates the start of the reaction.<br/><br/>The second line is the name of the reaction. You can give a set of reactions the same name; only one will ever be used.<br/><br/>Third is the condition. The condition should be standard Quest code that will evaluate to true or false (you can use "this" as normal to refer to the character).<br/><br/>The four and all subsequent lines are "what will happen". You can use these to change the game world (to a limited extent) and to display text. These lines can be of various types, depending on the first character, however, most text (anything beginning with a letter or number) will be printed directly to screen.]]></reactions>
<object name="mary alibi">
<inherit name="editor_object" />
<inherit name="startingtopic" />
<alias>"Where were you last night?"</alias>
<exchange>I was playing pool with Clive.</exchange>
<nowshow type="stringlist">
<value>mary playing pool</value>
</nowshow>
</object>
<object name="mary dr black">
<inherit name="editor_object" />
<inherit name="startingtopic" />
<exchange>I didn't know him that well. The only time we spent together was when we were having wild crazy sex.</exchange>
<alias>"How well did you know Dr. Black?"</alias>
</object>
<object name="mary playing pool">
<inherit name="editor_object" />
<inherit name="topic" />
<alias>"What time exactly were you playing pool?"</alias>
<exchange>"Right after I finished having sex with Beckie, and right before I had sex with Clive."</exchange>
<expires type="boolean">false</expires>
</object>
</object>
</object>
<object name="South Warren Dj Inn Upstairs Hall 1">
<inherit name="editor_room" />
<exit alias="down" to="South Warren Dj Inn">
<inherit name="downdirection" />
</exit>
</object>
<command name="Assign Points">
<pattern>points;pts;pt;stats;levelup;assign;lvl;lvlup</pattern>
<script>
assignpoints
</script>
</command>
<command name="Start Game">
<pattern>Start_Game</pattern>
<script>
if (game.pov.firststart = False) {
Ask ("You can only do this once! Once you leave this room, you will never return! Are you sure?") {
MoveObject (game.pov, South Warren Dj Inn)
game.pov.firststart = True
game.pov.volume = 100
}
}
else {
msg ("The game has already started!")
}
</script>
</command>
<type name="raceclass_type">
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<Class type="string"></Class>
<money type="int">60</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<statusattributes type="stringdictionary">
<item>
<key>gender</key>
<value></value>
</item>
<item>
<key>Class</key>
<value></value>
</item>
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Armor</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Deceive</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
</statusattributes>
<RaceHealth type="int">0</RaceHealth>
<RaceMagic type="int">0</RaceMagic>
</type>
<type name="characterclass">
<HP type="string"></HP>
<MP type="string"></MP>
<Combat type="int">0</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Charm type="int">0</Charm>
<Stealth type="int">0</Stealth>
<Survival type="int">0</Survival>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<MaxHealth type="int">40</MaxHealth>
<Class type="string"></Class>
<CP type="int">5</CP>
<Armor type="int">0</Armor>
<Health type="int">30</Health>
<Mana type="int">0</Mana>
<MaxMana type="int">0</MaxMana>
<Deceive type="int">0</Deceive>
<RaceMagic type="int">0</RaceMagic>
<firststart type="boolean">false</firststart>
<turncount type="int">0</turncount>
<sneaklevel type="int">0</sneaklevel>
<equipped type="object">fists</equipped>
<changedHealth type="script">
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
</changedHealth>
<changedMana type="script">
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
</changedMana>
</type>
<type name="weapontype" />
<type name="healthitem" />
<type name="armortype" />
<type name="itemdata" />
<function name="namecharacter">
msg ("What is your name?")
get input {
game.pov.alias = result
Ask ("So your name is " +result+"?") {
if (result = True) {
msg ("Hello " +game.pov.alias+", nice to meet you.")
characterselect
}
else if (result = False) {
characterselect
}
}
}
</function>
<function name="choosegender">
gendermenu = NewStringList()
list add (gendermenu, "Male")
list add (gendermenu, "Female")
ShowMenu ("Choose a gender.", gendermenu, false) {
msg ("You're " +result+", huh?")
game.pov.gender = result
Ask ("Are you sure you want to be " +result+"?") {
if (result = True) {
if (game.pov.gender = "Male") {
game.pov.Combat = game.pov.Combat + 3
game.pov.Intimidate = game.pov.Intimidate + 3
game.pov.Survival = game.pov.Survival + 3
ClearScreen
namecharacter
}
else if (game.pov.gender = "Female") {
game.pov.Knowledge = game.pov.Knowledge + 3
game.pov.Healing = game.pov.Healing + 3
game.pov.Awareness = game.pov.Awareness + 3
ClearScreen
namecharacter
}
}
else if (result = False) {
choosegender
}
}
}
</function>
<function name="assignpoints"><![CDATA[
pointmenu = NewStringList()
list add (pointmenu, "Combat")
list add (pointmenu, "Charm")
list add (pointmenu, "Intimidate")
list add (pointmenu, "Deceive")
list add (pointmenu, "Survival")
list add (pointmenu, "Stealth")
list add (pointmenu, "Knowledge")
list add (pointmenu, "Awareness")
list add (pointmenu, "Healing")
list add (pointmenu, "Magic")
ShowMenu ("Select a Skill to increase. You have " +game.pov.CP+ " available.", pointmenu, true) {
if (result = "Combat") {
msg ("How many points would you like to assign to Combat? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Combat = game.pov.Combat + i
game.pov.CP = game.pov.CP - i
msg ("Your Combat is now " +game.pov.Combat+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Charm") {
msg ("How many points would you like to assign to Charm? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Charm = game.pov.Charm + i
game.pov.CP = game.pov.CP - i
msg ("Your Charm is now " +game.pov.Charm+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Intimidate") {
msg ("How many points would you like to assign to Intimidate? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Intimidate = game.pov.Intimidate + i
game.pov.CP = game.pov.CP - i
msg ("Your Intimidate is now " +game.pov.Intimidate+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Deceive") {
msg ("How many points would you like to assign to Deceive? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Deceive = game.pov.Deceive + i
game.pov.CP = game.pov.CP - i
msg ("Your Deceive is now " +game.pov.Deceive+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Survival") {
msg ("How many points would you like to assign to Survival? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Survival = game.pov.Survival + i
game.pov.MaxHealth = game.pov.MaxHealth + i * game.pov.HealthModifier
game.pov.Health = game.pov.Health + i * game.pov.HealthModifier
game.pov.CP = game.pov.CP - i
msg ("Your Survival is now " +game.pov.Survival+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Stealth") {
msg ("How many points would you like to assign to Stealth? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Stealth = game.pov.Stealth + i
game.pov.CP = game.pov.CP - i
msg ("Your Stealth is now " +game.pov.Stealth+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Knowledge") {
msg ("How many points would you like to assign to Knowledge? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Knowledge = game.pov.Knowledge + i
game.pov.MaxMana = game.pov.MaxMana + i * game.pov.ManaModifier
game.pov.Mana = game.pov.Mana + i * game.pov.ManaModifier
game.pov.CP = game.pov.CP - i
msg ("Your Knowledge is now " +game.pov.Knowledge+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Awareness") {
msg ("How many points would you like to assign to Awareness? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Awareness = game.pov.Awareness + i
game.pov.CP = game.pov.CP - i
msg ("Your Awareness is now " +game.pov.Awareness+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Healing") {
msg ("How many points would you like to assign to Healing? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Healing = game.pov.Healing + i
game.pov.CP = game.pov.CP - i
msg ("Your Healing is now " +game.pov.Healing+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Magic") {
msg ("How many points would you like to assign to Magic? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Magic = game.pov.Magic + i
game.pov.MaxMana = game.pov.MaxMana + i * game.pov.ManaModifier
game.pov.Mana = game.pov.Mana + i * game.pov.ManaModifier
game.pov.CP = game.pov.CP - i
msg ("Your Magic is now " +game.pov.Magic+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
}
]]></function>
<function name="raceselect">
racemenu = NewStringList()
list add (racemenu, "Human")
list add (racemenu, "Dwarf")
list add (racemenu, "Elf")
list add (racemenu, "Halfling")
list add (racemenu, "Orc")
list add (racemenu, "Goblin")
ShowMenu ("Select Race", racemenu, false) {
msg ("You are a " +result+".")
set (player, "race", result)
// ----------------------------------------------------------------------------------------------------------
// fixed it up:
if (result = "Human") {
msg ("As a Human, you're adaptable, but you're not really great at anything.")
}
else if (result = "Dwarf") {
msg ("Dwarves are a hardy people! You're great at working with stone, and are at home in any cave or stonework.")
}
else if (result = "Elf") {
msg ("Elves are an ancient and wise people, whose natural gifts for Magic make them natural spellcasters. However, their fragile bodies often work against them in battle.")
}
else if (result = "Halfling") {
msg ("The tiny halfling is deceptively clever. Their size gives them a natural advantage, allowing them to go places most others can't.")
}
else if (result = "Orc") {
msg ("The powerful Orcs are brutes of raw strength. Never very bright, they are among the strongest of all races.")
}
else if (result = "Goblin") {
msg ("Vicious and cunning, the Goblins are surprisingly deceptive race, hiding powerful strength in their small bodies.")
}
// ----------------------------------------------------------------------------------------------------------
Ask ("Are you sure this is what you want?") {
if (result = True) {
game.pov.look = "You are "+game.pov.race+"."
obj = GetObject(game.pov.race)
atts = Split("Charm;Survival;Class;money;HP;Combat;Intimidate;Knowledge;Stealth;Awareness;Healing;Magic;RaceHealth;RaceMagic",";")
foreach (att, atts) {
att_value = GetAttribute(obj, att)
set (game.pov, att, att_value)
Log ("Setting "+game.pov+"."+att+" to "+att_value)
}
ClearScreen
MoveObject (game.pov, Class_Select)
choosegender
}
else if (result = False) {
raceselect
}
}
}
</function>
<function name="characterselect"><![CDATA[
charactermenu = NewStringList()
if (game.pov.race = "Dwarf") {
charactermenu = NewStringList()
list add (charactermenu, "Soldier")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
else if (game.pov.race = "Elf") {
list add (charactermenu, "Mage")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
else if (game.pov.race = "Halfling") {
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
else if (game.pov.race = "Orc") {
list add (charactermenu, "Soldier")
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
}
else if (game.pov.race = "Goblin") {
list add (charactermenu, "Soldier")
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
}
else if (game.pov.race = "Human") {
list add (charactermenu, "Soldier")
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
ShowMenu ("Select Class", charactermenu, false) {
char = result
msg ("You chose " +result+".")
if (result<>null) {
if (result = "Soldier") {
Ask ("Are you sure you want to be the " +result+"?") {
if (result = True) {
game.pov.Combat = game.pov.Combat + 15
game.pov.Intimidate = game.pov.Intimidate + 15
game.pov.Knowledge = game.pov.Knowledge + 5
game.pov.Stealth = game.pov.Stealth + 5
game.pov.Deceive = game.pov.Deceive + 5
game.pov.Magic = 0
game.pov.Healing = 0
game.pov.Charm = game.pov.Charm + 10
game.pov.Survival = game.pov.Survival + 10
game.pov.Awareness = game.pov.Awareness + 10
game.pov.Class = "Soldier"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 5
game.pov.Mana = game.pov.Mana * 0
game.pov.HealthModifier = 5
game.pov.ManaModifier = 0
game.pov.MaxHealth = game.pov.Health
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Mage") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = 0
game.pov.Intimidate = 0
game.pov.Magic = game.pov.Magic + 15
game.pov.Knowledge = game.pov.Knowledge + 15
game.pov.Healing = game.pov.Healing + 10
game.pov.Survival = game.pov.Survival + 10
game.pov.Awareness = game.pov.Awareness + 5
game.pov.Stealth = game.pov.Stealth + 5
game.pov.Charm = game.pov.Charm + 5
game.pov.Deceive = game.pov.Deceive + 10
game.pov.Class = "Mage"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 1
game.pov.Mana = game.pov.Mana * 3
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 1
game.pov.ManaModifier = 3
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Thief") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = game.pov.Combat + 5
game.pov.Intimidate = game.pov.Intimidate + 10
game.pov.Magic = 0
game.pov.Knowledge = game.pov.Knowledge + 5
game.pov.Healing = 0
game.pov.Survival = game.pov.Survival + 5
game.pov.Awareness = game.pov.Awareness + 10
game.pov.Stealth = game.pov.Stealth + 15
game.pov.Charm = game.pov.Charm + 15
game.pov.Deceive = game.pov.Deceive + 10
game.pov.Class = "Thief"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 2
game.pov.Mana = game.pov.Mana * 0
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 2
game.pov.ManaModifier = 0
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Priest") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = 0
game.pov.Intimidate = game.pov.Intimidate + 5
game.pov.Magic = game.pov.Magic + 10
game.pov.Knowledge = game.pov.Knowledge + 10
game.pov.Healing = game.pov.Healing + 15
game.pov.Survival = game.pov.Survival + 5
game.pov.Awareness = game.pov.Awareness + 10
game.pov.Stealth = game.pov.Stealth + 5
game.pov.Charm = game.pov.Charm + 15
game.pov.Deceive = 0
game.pov.Class = "Priest"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 3
game.pov.Mana = game.pov.Mana * 2
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 3
game.pov.ManaModifier = 2
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Hunter") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = game.pov.Combat + 10
game.pov.Intimidate = game.pov.Intimidate + 10
game.pov.Magic = 0
game.pov.Knowledge = game.pov.Knowledge + 5
game.pov.Healing = 0
game.pov.Survival = game.pov.Survival + 15
game.pov.Awareness = game.pov.Awareness + 15
game.pov.Stealth = game.pov.Stealth + 10
game.pov.Charm = game.pov.Charm + 5
game.pov.Deceive = game.pov.Deceive + 5
game.pov.Class = "Hunter"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 4
game.pov.Mana = game.pov.Mana * 0
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 4
game.pov.ManaModifier = 0
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Bard") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = 0
game.pov.Intimidate = game.pov.Intimidate + 10
game.pov.Magic = game.pov.Magic + 5
game.pov.Knowledge = game.pov.Knowledge + 10
game.pov.Healing = game.pov.Healing + 5
game.pov.Survival = game.pov.Survival + 5
game.pov.Awareness = game.pov.Awareness + 10
game.pov.Stealth = 0
game.pov.Charm = game.pov.Charm + 15
game.pov.Deceive = game.pov.Deceive + 15
game.pov.Class = "Bard"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 1
game.pov.Mana = game.pov.Mana * 1
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 1
game.pov.ManaModifier = 1
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Paladin") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = game.pov.Combat + 10
game.pov.Intimidate = game.pov.Intimidate + 5
game.pov.Magic = game.pov.Magic + 10
game.pov.Knowledge = game.pov.Knowledge + 5
game.pov.Healing = game.pov.Healing + 10
game.pov.Survival = game.pov.Survival + 15
game.pov.Awareness = game.pov.Awareness + 5
game.pov.Stealth = 0
game.pov.Charm = game.pov.Charm + 15
game.pov.Deceive = 0
game.pov.Class = "Paladin"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 3
game.pov.Mana = game.pov.Mana * 2
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 3
game.pov.ManaModifier = 2
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
}
else {
msg ("You chose to cancel.")
}
}
]]></function>
</asl>
PS
If you go with my fix and you decide to add any attributes, add everything to the player object.
I added this to your raceselect script, taking out the bit where it switched the game.pov to whatever object (Human, Orc, or whatever).
atts = Split("Charm;Survival;Class;money;HP;Combat;Intimidate;Knowledge;Stealth;Awareness;Healing;Magic;RaceHealth;RaceMagic",";")
foreach (att, atts) {
att_value = GetAttribute(obj, att)
set (game.pov, att, att_value)
Log ("Setting "+game.pov+"."+att+" to "+att_value)
}
That should get the value of the following attributes on whichever race object was selected, then set it on the player object:
Charm;
Survival;
Class;
money;
HP;
Combat;
Intimidate;
Knowledge;
Stealth;
Awareness;
Healing;
Magic;
RaceHealth;
RaceMagic
If any attributes are added to any one of those race objects, this script will not know to add those to the player. This is why it's important to add all attributes to the player from here on out.
...and leave the race objects alone. Only fool around with stuff on the player object. Pretend those race objects no longer exist.
It looks like you used game.pov
in all of your scripts, so, as long as all race objects have the same attributes, everything should be fine.
I also added a type and set it on the player object. (I just copied the "Human" object and made that into "raceclass_type".)
(You don't really need to know this, but it's a change I made, so there you have it.)
PPS
You get this error because plain_hat is not an object, but you have a script which checks to see if a plain_hat object is worn:
Error running script: Error evaluating expression 'Eval(test)': Error compiling expression 'plain_hat.worn': Unknown object or variable 'plain_hat'
from Marie's reaction script:
@
greeting
true
'Hi!' says Mary
@
plain hat
# ghhjhj
plain_hat.worn
'Oh, you are wearing a hat,' says Mary.
& this testscript
I literally copied most of her from another thing so I'd have examples of how the Conversation stuff worked.
Well, I'm going to have to c/p my conversation stuff over to the new script, but that shouldn't interfere with anything, and should be easy enough to isolate. That said, your changes to the script seem to have removed the Health/Max Health and Mana/Max Mana status attribute.
Added it back to the Player object.
and it works wonderfully, though i'm not sure exactly how. how did you set it up to make the 4 attributes the library used work with my 10 attributes?
your changes to the script seem to have removed the Health/Max Health and Mana/Max Mana status attribute.
Argh! I missed that! (Sorry about that.)
how did you set it up to make the 4 attributes the library used work with my 10 attributes?
I stopped the POV from switching to anything.
I copied the entire Human object's code, then changed that copied object into a type named "raceclass_type". I then added that type to the player object, making it inherit all the stuff set up on the Human object.
Then, I added this to raceselect script (it sets each attribute in the first line from the race object to the player object; I left those two attributes you mentioned off this list, I guess -- so they got left out during setup):
atts = Split("Charm;Survival;Class;money;HP;Combat;Intimidate;Knowledge;Stealth;Awareness;Healing;Magic;RaceHealth;RaceMagic",";")
foreach (att, atts) {
att_value = GetAttribute(obj, att)
set (game.pov, att, att_value)
// This next line is for debugging. You should probably comment it out once things are operational.
Log ("Setting "+game.pov+"."+att+" to "+att_value)
}
I'm not entirely sure how that makes it work. I thought the script required the Strength, Agility, Intelligence, and Stamina attributes that were part of the combat system. Nothing seems to be setting the values the library's scripts refer to. I know in the library the accuracy and damage are determined by Strength and Agility, but my game didn't have a direct equivilant unless you set one up.
I can't even figure out what the damage is being done to, since it's not reducing my Health.
I believe the hitpoints attribute is the equivalent to health.
You can open the debugger to check all that stuff at any time.
(Note the changedhitpoints script. It kills you if game.pov.hitpoints is not >= 0.)
I didn't set anything up. All I did was set the attributes from the race object selected to the player object & stop the game's POV from changing from the player object.
CombatLib is very intricate, and that's all I really know about it.
If I were to use it, I'd set my game up like CombatLib wants it set up.
Any attributes not included in CombatLib will need to be set up and scripted as you add them.
Pixie has put a lot of work into his wiki, and I bet all the information you seek can be found there.
https://github.com/ThePix/quest/wiki/CombatLib
I've looked on his wiki, and the info was useless for what I needed. I guess I'll just have to look closer to figure out what's going on.
it really might be better for you to learn this stuff first, so you're not bumbling around with trying to get the code right for stuff you don't really understand yet and thus don't know how to use/code it properly.
I'd put a combat system on hold and learn the basics, part by part, that you're trying to do within your combat code.
start simple, try to make simple damage combat on your own, learn Attributes, learn Status Attributes, if you can learn lists/dictionaries and iteration with them (they really help with reducing coding), learn about Object Types (well, you seem to understand these already: as KV showed, you can have your Object Type contain your status attributes, that way each of your Player Objects just need to be given that Object Type / Inherited Attribute, instead of each of them having redundent status attribute coding), then try adding in more Attributes (more complex combat / combat mechanics) and scripting for your combat. start small, and step by step try to do more advanced stuff or more stuff or new stuff.
as otherwise, you're just going to be stuck forever trying to get your code working, as you're using code/features that you don't understand yet, and thus forever be stuck on trying to get the code correct.
I personally like to do my own code instead of trying to learn someone else's code, start small, and slowly build up your own combat and character creation... learning as you go and as you need to, I really think that's better than trying to learn someone else's code. Now, if you get stuck and need help, then you definitely go use someone else's code and study/understand/learn it, and then test yourself by trying to apply it for your own code and your own coding design/system/game.
As far as your Health attribute goes, you could modify your changehitpoints script to keep the Health the same as the hitpoints by adding:
game.pov.Health = game.pov.hitpoints
If you have scripts that change the value of Health, you'd probably want to add this to your start script, too:
game.pov.changedHealth => {
game.pov.hitpoints = game.pov.Health
}
So, replace your entire start script with this to sync up Health with hitpoints:
CombatInitialise
raceselect
game.pov.hitpoints = game.pov.Health
game.pov.changedHealth => {
game.pov.hitpoints = game.pov.Health
}
game.pov.changedhitpoints => {
set (game.pov, "Health", game.pov.hitpoints)
if (0 >= game.pov.hitpoints) {
msg ("You are dead!")
finish
}
else {
UpdateStatus
}
}
As HK says, when you use Pixie's libraries, you're using Pixie's code.
Including a library is just adding all the code from the library to your code.
The two codes must match.
You either need to keep your code (including your attributes) in line with the library, or change almost everything in the library, which would negate the purpose of using the library and would mean a lot of coding to do in the case of CombatLib.
I have no ability to make my own combat code at this point. If I don't know what my game will be capable of, I can't really make the rest of the game, so I'm basically unable to progress at this point. I can't really use Pixie's code because I can't understand it, and I can't make my own code because I don't understand the code for the game. That doesn't leave me with any options. I'm gonna go take a break for a few hours. Come back at this with a fresh mind.
Well, your Goblin behaved appropriately when I attacked it, if that's any consolation.
I'm pretty sure you only need to keep the same attributes Pixie uses in his library, and it'll be smooth sailing.
It looks like you've put quite a bit of work into this game, and you didn't do a bad job at all!
CombatLib is just complex. Of course, so are RPGs in general...
trying to do character creation and combat are some of the most complex aspects of a game and of its coding...
we'll be happy to help, if you're willing to learn and take one thing at time (works better for you and us)
we can start with character creation or combat, whichever you prefer, and learn the basics, piece by piece, slowly learning and creating/building up our combat or character creation system/design/coding/game.
The problem with combat libraries is that most of the work in building one is deciding which stats determine your chance to hit, which stats determine damage, and so on. I don't think there's a way to build a library that doesn't include the programmer's ideas about what the stats should be.
I'd say that if you're using CombatLib but you don't want to use the stats it's designed with, then you'll have a lot of changes to make, but it shouldn't be that hard. You will have to change quite a lot of it.
You don't want to used "strength", "agility", etc ... so open the CombatLib file, search for each of those words. For example, if you find a line that determines a monster's chance of hitting you based on your agility. Decide which of your stats you want to use there. Just go through the whole file doing that. And when you get to the lines that set the player's initial strength/acility/etc, just remove them - because you already have a character creation system.
I'm not so good at explaining; I think better in code than in English. I might be able to do some of this for you, if that's easier. Might take a while, though (I'm panicking trying to get a book ready for release on the 1st, so game-making activities won't be a priority unless you're paying me)
Okay, I'm back and calmer than earlier. Is there an easy way to patch the library and my stats together? Make my stats replace the values that the Library is searching for or something?
The real problem I'm coming up to is that I don't know the scale or values it's balanced around, which may be VERY different from what MY stats are balanced around.
This is a list of every attribute on your player after completing the character creation process (excluding about 30 inherited, default attributes):
name
elementtype
type
parent
money
statusattributes
volume
containerfullmessage
turncount
external_gender
external_article
pov_alt
pov_used
alias
alt
look
gender
article
changedhitpoints
changedmoney
changedequipped
changedshield
armour
armour10
stamina
xp
ob_bonus
next_round_ob_bonus
db_bonus
defence
magiccurse
magiccountdown
attackbonus
defencebonus
armourbonus
magicbonus
damagebonus
strength
agility
intelligence
pointsleft
hitpoints
status
immunities
equipped
dead
changedHealth
generatedverbslist
race
Charm
Survival
Class
HP
Combat
Intimidate
Knowledge
Stealth
Awareness
Healing
Magic
RaceHealth
RaceMagic
hasbeenmoved
Deceive
Health
Mana
MP
HealthModifier
ManaModifier
MaxHealth
MaxMana
CP
sneaklevel
Armor
I assume yours are the ones with capital letters.
...and I see a few of yours that should be the same thing as a few of Pixie's, in essence.
They'd need change scripts on each to keep them synchronized, just like I did here:
http://textadventures.co.uk/forum/design/topic/mruttyouxewcq6gsfoqzeq/help-with-race-class-selection#c9043bb1-ee88-44a6-8581-82197c01ca39
your script for Health/Hitpoints doesn't trigger my changedHealth script, so it's not updating the HP status. Help?
I missed the HP. (And I created a changedHealth which overrode yours.)
Put this for the start script:
CombatInitialise
raceselect
game.pov.hitpoints = game.pov.Health
game.pov.changedHealth => {
game.pov.hitpoints = game.pov.Health
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
}
game.pov.changedhitpoints => {
set (game.pov, "Health", game.pov.hitpoints)
if (0 >= game.pov.hitpoints) {
msg ("You are dead!")
finish
}
else {
UpdateStatus
}
}
Sorry about that.
... XD well, this somehow created a new bug. Thank god I found it by sheer chance. So, Male Halfling Thief instantly dies XD
You should probably have the function to check for 0 health also check the max hitpoints. If a player's max hitpoints hasn't been set yet, don't kill them.
So, I tried to figure out how to do that.... Didn't work like I expected it to. Help?
I think it may be wise to put all the attributes on the player object in the code, rather than using my dirty fix.
Would you like me to do that for you? (If so, I advise against you doing any editing before I send the revision to you. Otherwise, one of us would be adding things which were destined to be overwritten.)
I can tell you that the Halfling Thief starts out with Health set at -10.
<object name="Halfling">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">-5</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">5</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<RaceHealth type="int">-10</RaceHealth>
<MP type="string"></MP>
<RaceMagic type="int">-5</RaceMagic>
</object>
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
Survival + RaceHealth
0 + (-10)
Here's what happens:
1/27/2018 1:12:58 PM Setting Object: player.Charm to 0
1/27/2018 1:12:58 PM Setting Object: player.Survival to 0
1/27/2018 1:12:58 PM Setting Object: player.Class to
1/27/2018 1:12:58 PM Setting Object: player.money to 50
1/27/2018 1:12:58 PM Setting Object: player.HP to
1/27/2018 1:12:58 PM Setting Object: player.Combat to 0
1/27/2018 1:12:58 PM Setting Object: player.Intimidate to -5
1/27/2018 1:12:58 PM Setting Object: player.Knowledge to 0
1/27/2018 1:12:58 PM Setting Object: player.Stealth to 5
1/27/2018 1:12:58 PM Setting Object: player.Awareness to 0
1/27/2018 1:12:58 PM Setting Object: player.Healing to 0
1/27/2018 1:12:58 PM Setting Object: player.Magic to 0
1/27/2018 1:12:58 PM Setting Object: player.RaceHealth to -10
1/27/2018 1:12:58 PM Setting Object: player.RaceMagic to -5
1/27/2018 1:13:04 PM hitpoints now: -2
1/27/2018 1:13:04 PM hitpoints now: 5
1/27/2018 1:13:04 PM hitpoints now: 10
I selected "Yes" when asked if I'm sure I want to be a thief at 1:13:04 PM.
Yep... a race+class combination that results in less than zero is raised to 5 (and then doubled); but by then the changedhitpoints script has already triggered a game over.
I would have done that in my own game; but I figured that it's probably simpler to have the script set up to check whether the game has started.
Or, to have the character creation script set up MaxHealth, and then have the last line be "game.pov.Health = game.pov.MaxHealth" after the calculations are done, rather than vice versa.
I think the 'instant death/game-over' has happened to all of us trying to code in our own character creation and a 'life' Integer and/or 'dead' Boolean stat/Attribute, hehe. I've certainly experienced it myself... whoopsy... lol. There's an infinite amount of ways to fix it, but it good practice with coding and logic, to have this issue happen to you and in thinking on how to fix it. Learning the code syntax and etc is one thing... but the logic required is the real challenge with coding... especially when you get to design/structural thinking... and logic gate logic... working with '0s and 1's logic (half-adders, full-adders, flip-flops, multi-plexors, encoders, decoders, etc etc etc computer circuitry components), lol.
hmm.... So basically I just have to move the script around so Hitpoints is set after character creation is done messing with HP?
... Forget the "basically" in my previous post, there's nothing simple about this :/
So, I moved the set variable for changedhitpoints and changed health out of Start and into characterselect... Still dies. Moved it to assignpoints.... Still dies. :/This tells me it's being set somewhere else, and now I have to hunt through EVERYTHING to find it.
EDIT: Well, 1 down, still not fixed :/
I'll post the current code just to be safe anyway. https://pastebin.com/V1L07jk4
I'm 99% sure the problem is simply multiple pieces of code also trying to set hitpoints, so it's set before I want it :/
Test this out:
<!--Saved by Quest 5.7.6404.15496-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<include ref="StackLib.aslx" />
<include ref="ConvLib.aslx" />
<include ref="ShopLib.aslx" />
<include ref="CombatLib.aslx" />
<include ref="ClothingLib.aslx" />
<include ref="ClockLib.aslx" />
<game name="Quest for the magic Ring">
<gameid>a2d49300-46cb-48a8-8e22-8ddd04eb6545</gameid>
<version>1.0</version>
<firstpublished>2018</firstpublished>
<showhealth />
<showmoney />
<feature_limitinventory />
<feature_lightdark />
<feature_asktell />
<feature_annotations />
<attr name="feature_advancedwearables" type="boolean">false</attr>
<appendobjectdescription />
<allowlookdirections />
<category>RPG</category>
<feature_advancedscripts />
<showscore type="boolean">false</showscore>
<clearscreenonroomenter />
<attr name="autodescription_youarein_newline" type="boolean">false</attr>
<attr name="autodescription_youcansee_newline" type="boolean">false</attr>
<attr name="autodescription_youcango_newline" type="boolean">false</attr>
<attr name="autodescription_description_newline" type="boolean">false</attr>
<showreactions />
<notarealturn type="boolean">false</notarealturn>
<statusattributes type="stringdictionary">
<item>
<key>clock</key>
<value>Time: !</value>
</item>
</statusattributes>
<start type="script">
raceselect
SetTime ("01:14:35")
</start>
<unresolvedcommandhandler type="script">
game.notarealturn = True
msg (Template("UnrecognisedCommand"))
</unresolvedcommandhandler>
</game>
<object name="room">
<inherit name="editor_room" />
<enter type="script">
</enter>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<inherit name="raceclass_type" />
<money type="int">50</money>
<statusattributes type="stringdictionary">
<item>
<key>alias</key>
<value></value>
</item>
<item>
<key>race</key>
<value></value>
</item>
<item>
<key>gender</key>
<value></value>
</item>
<item>
<key>Class</key>
<value></value>
</item>
<item>
<key>HP</key>
<value></value>
</item>
<item>
<key>MP</key>
<value></value>
</item>
<item>
<key>Combat</key>
<value></value>
</item>
<item>
<key>Knowledge</key>
<value></value>
</item>
<item>
<key>Charm</key>
<value></value>
</item>
<item>
<key>Intimidate</key>
<value></value>
</item>
<item>
<key>Deceive</key>
<value></value>
</item>
<item>
<key>Stealth</key>
<value></value>
</item>
<item>
<key>Survival</key>
<value></value>
</item>
<item>
<key>Awareness</key>
<value></value>
</item>
<item>
<key>Healing</key>
<value></value>
</item>
<item>
<key>Magic</key>
<value></value>
</item>
</statusattributes>
<volume type="int">100</volume>
<containerfullmessage>You can't carry any more! It's too heavy!</containerfullmessage>
<turncount type="int">0</turncount>
</object>
</object>
<object name="characters">
<inherit name="editor_room" />
<object name="Soldier">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Soldier</Class>
<MaxHealth type="int">40</MaxHealth>
</object>
<object name="Mage">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Mage</Class>
</object>
<object name="Thief">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Thief</Class>
</object>
<object name="Priest">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Priest</Class>
<Health type="int">20</Health>
</object>
<object name="Hunter">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Hunter</Class>
</object>
<object name="Bard">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Bard</Class>
</object>
<object name="Paladin">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="characterclass" />
<feature_player />
<Class>Paladin</Class>
</object>
</object>
<object name="weapons">
<inherit name="editor_room" />
<object name="Long Sword">
<inherit name="editor_object" />
<inherit name="weapontype" />
<inherit name="wearable" />
<inherit name="weapon" />
<feature_wearable />
<attr name="wear_layer" type="int">3</attr>
<wear_slots type="stringlist">
<value>Weapon</value>
</wear_slots>
<bonusatts>Combat+5</bonusatts>
<volume type="int">3</volume>
<multistate />
<advanced />
<damagedicenumber type="int">2</damagedicenumber>
<damagedicesides type="int">4</damagedicesides>
<damagebonus type="int">2</damagebonus>
<take type="script">
msg (DynamicTemplate("TakeSuccessful", this))
this.parent = game.pov
SetVerbs
if (game.pov.Class = "Soldier") {
msg (DynamicTemplate("TakeSuccessful", this))
this.parent = game.pov
SetVerbs
}
</take>
</object>
</object>
<object name="basic_items">
<inherit name="editor_room" />
<object name="Pouch of Potions">
<inherit name="editor_object" />
<inherit name="container_limited" />
<inherit name="wearable" />
<feature_container />
<look>This is a pouch for potions.</look>
<inroomdescription>This is a pouch.</inroomdescription>
<listalias>Pouch</listalias>
<alt type="stringlist">
<value>Potions Pouch</value>
</alt>
<volume type="int">20</volume>
<feature_wearable />
<attr name="wear_layer" type="int">3</attr>
<wear_slots type="stringlist">
<value>Pouch</value>
</wear_slots>
</object>
</object>
<object name="health_items">
<inherit name="editor_room" />
<object name="Small_Potion">
<inherit name="editor_object" />
<inherit name="healthitem" />
<inherit name="childstack_object" />
<stackparent type="object">Small Potion Stack</stackparent>
</object>
<object name="Basic_Potion">
<inherit name="editor_object" />
<inherit name="healthitem" />
<attr name="feature_usegive" type="boolean">false</attr>
<use type="boolean">false</use>
</object>
<object name="Super_Potion">
<inherit name="editor_object" />
<inherit name="healthitem" />
</object>
</object>
<object name="armor">
<inherit name="editor_room" />
<object name="Cloth">
<inherit name="editor_object" />
<inherit name="armortype" />
</object>
<object name="Leather">
<inherit name="editor_object" />
<inherit name="armortype" />
</object>
<object name="Chainmail">
<inherit name="editor_object" />
<inherit name="armortype" />
</object>
</object>
<object name="start">
<inherit name="editor_room" />
</object>
<object name="race">
<inherit name="editor_object" />
<object name="Human">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">60</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<RaceHealth type="int">0</RaceHealth>
<RaceMagic type="int">0</RaceMagic>
<Size type="int">2</Size>
</object>
<object name="Dwarf">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">-5</Charm>
<Survival type="int">5</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<RaceHealth type="int">10</RaceHealth>
<RaceMagic type="int">5</RaceMagic>
<Size type="int">2</Size>
</object>
<object name="Elf">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">-5</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">5</Magic>
<RaceHealth type="int">-5</RaceHealth>
<RaceMagic type="int">15</RaceMagic>
<Size type="int">2</Size>
</object>
<object name="Halfling">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">-5</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">5</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<RaceHealth type="int">-10</RaceHealth>
<MP type="string"></MP>
<RaceMagic type="int">-5</RaceMagic>
<Size type="int">1</Size>
</object>
<object name="Orc">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">5</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">-5</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<RaceHealth type="int">20</RaceHealth>
<RaceMagic type="int">0</RaceMagic>
<Size type="int">3</Size>
</object>
<object name="Goblin">
<inherit name="editor_object" />
<inherit name="characterclass" />
<inherit name="editor_player" />
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<feature_player />
<Class type="string"></Class>
<money type="int">50</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">-5</Healing>
<Magic type="int">0</Magic>
<RaceHealth type="int">5</RaceHealth>
<RaceMagic type="int">10</RaceMagic>
<Deceive type="int">5</Deceive>
<Size type="int">1</Size>
</object>
</object>
<object name="Character_Setup">
<inherit name="editor_room" />
<object name="Common Long Sword">
<inherit name="editor_object" />
<inherit name="weapontype" />
<inherit name="wearable" />
<inherit name="weapon" />
<attr name="feature_wearable" type="boolean">false</attr>
<attr name="wear_layer" type="int">4</attr>
<wear_slots type="stringlist">
<value>Weapon</value>
</wear_slots>
<bonusatts>Combat+5</bonusatts>
<volume type="int">3</volume>
<multistate type="boolean">false</multistate>
<advanced />
<damagedicenumber type="int">2</damagedicenumber>
<damagedicesides type="int">6</damagedicesides>
<damagebonus type="int">2</damagebonus>
<take type="script"><![CDATA[
if (game.pov.Combat >= 10) {
msg (DynamicTemplate("TakeSuccessful", this))
this.parent = game.pov
SetVerbs
}
]]></take>
</object>
<object name="Small Shield">
<inherit name="editor_object" />
<inherit name="wearable" />
<inherit name="shield" />
<attr name="wear_layer" type="int">3</attr>
<wear_slots type="stringlist">
<value>Shield</value>
</wear_slots>
<advanced />
<removeable />
<level type="int">1</level>
<take type="script"><![CDATA[
if (game.pov.Combat >= 0) {
msg (DynamicTemplate("TakeSuccessful", this))
this.parent = game.pov
SetVerbs
if (game.pov.Size <= 2) {
}
}
]]></take>
</object>
<object name="Goblin1">
<inherit name="editor_object" />
<inherit name="monster" />
<alias>Goblin</alias>
<level type="int">4</level>
<attackbonus type="int">0</attackbonus>
<reflectsmagic type="boolean">false</reflectsmagic>
<monstertype>Goblinoid</monstertype>
<hitpoints type="int">1</hitpoints>
<defence type="int">0</defence>
<xp type="int">20</xp>
<object name="Dagger">
<inherit name="editor_object" />
<inherit name="weapon" />
<damagedicesides type="int">12</damagedicesides>
<take type="script"><![CDATA[
if (game.pov.Combat >= 5) {
msg (DynamicTemplate("TakeSuccessful", this))
this.parent = game.pov
SetVerbs
if (game.pov.Size <= 2) {
}
}
]]></take>
</object>
</object>
</object>
<object name="Class_Select">
<inherit name="editor_room" />
</object>
<object name="spellbook">
<inherit name="editor_room" />
<object name="Fireball">
<inherit name="editor_object" />
<singleuse type="boolean">false</singleuse>
<element type="object">fire</element>
</object>
<object name="Mystic Light">
<inherit name="editor_object" />
</object>
</object>
<object name="Stack Room">
<inherit name="editor_room" />
<object name="Small Potion Stack">
<inherit name="editor_object" />
<inherit name="healthitem" />
<inherit name="homo_stack_container" />
</object>
</object>
<object name="Cave of Alignment">
<inherit name="editor_room" />
<dark type="boolean">false</dark>
<description><![CDATA[This is a reminder for myself. Combine Tutorial with Moral Test. Determine Lawful/Chaotic and Good/Evil values. 0-100 values, each choice adds or removes from the values. <br/><br/>Start True Neutral for most. <br/><br/>Paladin = 75 Lawful 75 Good<br/>Goblin = 25 Chaotic 25 Evil<br/>Priest = 50 Neutral 75 Good<br/>Thief = 25 Chaotic 50 Neutral<br/><br/>0 Chaotic - Lawful 100<br/>0 Evil - Good 100]]></description>
</object>
<object name="South Warren Dj Inn">
<inherit name="editor_room" />
<alias>South Warren - Dj Inn: Main Room</alias>
<description>The inn is lively, with lots of people, and even a small group of Bards playing in the background. The decorations are mostly warm-colored, with well-kept furniture spread through-out. Opposite the door, front and center, is the Innkeeper.</description>
<enter type="script">
play sound ("23_The_Slaughtered_Ox.mp3", false, true)
</enter>
<onexit type="script">
stop sound
</onexit>
<beforeenter type="script">
ClearScreen
</beforeenter>
<exit alias="up" to="South Warren Dj Inn Upstairs Hall 1">
<inherit name="updirection" />
<message>South Warren - Dj Inn - Upstairs Hall 1</message>
</exit>
<object name="Innkeeper">
<inherit name="editor_object" />
<inherit name="talkingchar" />
<inherit name="namedmale" />
<activeconversations />
<exchange>"Welcome to Dj Inn!" The Innkeeper smiles at you. "Will you be staying the night?"</exchange>
<scenery type="boolean">false</scenery>
<alias>Innkeeper</alias>
<inroomdescription type="string"></inroomdescription>
<look>The Innkeeper is a Human, standing about 6' tall. He's wearing fine clothing. His hair is red and his eyes are brown.</look>
<reactions><![CDATA[@<br/>greeting<br/>true<br/>"Welcome to Dj Inn!" The Innkeeper smiles at you. "Will you be staying the night?"]]></reactions>
<greet type="script">
</greet>
<object name="Innkeeper Old Man Where">
<inherit name="editor_object" />
<inherit name="startingtopic" />
<alias>"I'm here about the Ring. Can you tell me where the Old Man is?"</alias>
<exchange><![CDATA["I'm here about the Ring. Can you tell me where the Old Man is?" You ask.<br/>"Ah, another one, huh?" He shakes his head. "Yeah, if you're willing to throw your life away like the rest. He's up the stairs, room 25."]]></exchange>
<nowshow type="stringlist">
<value>Innkeeper Room</value>
<value>Innkeeper Old Man Who</value>
<value>Innkeeper Doubt</value>
<value>Innkeeper Ring</value>
<value>Innkeeper Thanks</value>
<value>Innkeeper The Rest</value>
</nowshow>
</object>
<object name="Innkeeper The Rest">
<inherit name="editor_object" />
<inherit name="topic" />
<alias>"The rest?"</alias>
<exchange><![CDATA["The rest?"<br/>He nods his head. "Yeah. I've seen 6 other people go up there today. None of them have come back down. People are starting to wonder."]]></exchange>
</object>
<object name="Innkeeper Old Man Who">
<inherit name="topic" />
<inherit name="editor_object" />
<alias>(Charm) "Just who is this old man? No one seems to know."</alias>
<exchange><![CDATA[(Charm) "Just who is this old man? No one seems to know."<br/>The Innkeeper looks at you for a moment before responding.]]></exchange>
<talk type="script"><![CDATA[
if (game.pov.Charm >= 15) {
msg ("\"Yeah, I heard his name is Alphos Sadel.\"")
if (game.pov.Magic >= 10) {
ShowTopic (Innkeeper Alphos Sadel)
}
}
else {
msg ("\"Sorry, I haven't heard his name either.\"")
}
]]></talk>
</object>
<object name="Innkeeper Alphos Sadel">
<inherit name="editor_object" />
<inherit name="topic" />
<alias>"Alphos Sadel, as in Grand Magus Alphos Sadel?"</alias>
<nowshow type="stringlist">
<value>Innkeeper Alphos 2</value>
</nowshow>
<exchange><![CDATA[You pause for a moment. "Alphos Sadel, as in Grand Magus Alphos Sadel?"<br/>The Innkeeper's smile grows larger. "The very same!"]]></exchange>
<talk type="script">
HideTopic (Innkeeper Doubt)
</talk>
</object>
<object name="Innkeeper Alphos 2">
<inherit name="editor_object" />
<inherit name="topic" />
<alias>"Why is one of the most powerful Mages asking for help finding a ring? Can't he do it himself?"</alias>
<exchange><![CDATA["Why is one of the most powerful Mages asking for help finding a ring? Can't he do it himself?"<br/>The Innkeeper shrugs. "Apparently this particular ring is special, and the one who stole it is somehow able to hide it's exact location. Going in to find it by force would of course be overkill. You don't send a Grand Magus for something like that. So, he's willing to pay handsomely to get an adventurer to do it for him."]]></exchange>
<talk type="script">
msg ("For asking about Grand Magus Alphos Sadel, you've earned 1 CP!")
game.pov.CP = game.pov.CP + 1
msg ("Your CP is now " +game.pov.CP+"!")
</talk>
</object>
<object name="Innkeeper Doubt">
<inherit name="editor_object" />
<inherit name="topic" />
<exchange><![CDATA["Can he really pay what he claims?"<br/>The Innkeeper nods emphatically. "Most definitely. He's very rich, and has a lot of power, both from his friends and from himself."]]></exchange>
<alias>"Can he really pay what he claims?"</alias>
</object>
<object name="Innkeeper Ring">
<inherit name="editor_object" />
<inherit name="topic" />
<alias>"Do you know anything about this ring he's looking for?"</alias>
<exchange><![CDATA["Do you know anything about this ring he's looking for?"<br/>The Innkeeper shakes his head. "Not much. I just know it's really old, and really powerful. Sorry I can't be more help than that."]]></exchange>
</object>
<object name="Innkeeper Room">
<inherit name="editor_object" />
<inherit name="topic" />
<nowshow type="stringlist">
<value>Innkeeper Gold</value>
<value>Innkeeper No Gold</value>
<value>Innkeeper Gold Cheap</value>
</nowshow>
<exchange><![CDATA["How much for a Room?<br/>"That'll be 10 gold." The Innkeeper says, holding out his hand.]]></exchange>
<hideafter type="boolean">false</hideafter>
<alias>"How much for a Room?</alias>
</object>
<object name="Innkeeper Gold">
<inherit name="editor_object" />
<inherit name="topic" />
<exchange type="string"></exchange>
<alias>"Sure, here you go."</alias>
<talk type="script"><![CDATA[
if (game.pov.money >= 10) {
game.pov.money = game.pov.money - 10
MakeObjectVisible (Key to Room 10)
msg ("\"Sure, here you go.\"")
msg ("You give the Innkeeper 10 Gold and the Innkeeper puts the " +ObjectLink (Key to Room 10)+ " on the counter.")
}
HideTopic (Innkeeper Gold Cheap)
HideTopic (Innkeeper No Gold)
]]></talk>
</object>
<object name="Innkeeper No Gold">
<inherit name="editor_object" />
<inherit name="topic" />
<hideafter />
<exchange><![CDATA[You hestitate for a moment. "I'd rather not pay 10 gold for a room. Thanks though."<br/>"Oh well, plenty of other guests I suppose."]]></exchange>
<alias>"I'd rather not pay 10 gold for a room. Thanks though."</alias>
<talk type="script">
HideTopic (Innkeeper Gold)
HideTopic (Innkeeper Gold Cheap)
</talk>
</object>
<object name="Innkeeper Gold Cheap">
<inherit name="editor_object" />
<inherit name="topic" />
<exchange>(Charm) "Couldn't you give me a discount? I'm a hero after all."</exchange>
<alias>(Charm) "Couldn't you give me a discount? I'm a hero after all."</alias>
<talk type="script"><![CDATA[
if (game.pov.Charm <= 19) {
msg ("\"No deals. I gotta business to run.\"")
}
else if (game.pov.Charm >= 20) {
msg ("\"Fine, I guess I can make an exception for ya. 5 Gold then.\"")
if (game.pov.money >= 5) {
Ask ("Pay 5 Gold for the Key?") {
if (result = True) {
game.pov.money = game.pov.money - 5
MakeObjectVisible (Key to Room 10)
msg ("You give the Innkeeper 5 Gold and the Innkeeper puts the " +ObjectLink (Key to Room 10)+ " on the counter.")
}
else if (result = False) {
msg ("\"Suit yourself then. That's the cheapest I'll go.\"")
}
}
}
else if (game.pov.money <= 4) {
msg ("\"You don't even have THAT much? Get out of here, you cheapskate!\"")
}
}
HideTopic (Innkeeper Gold)
HideTopic (Innkeeper No Gold)
]]></talk>
</object>
<object name="Innkeeper Thanks">
<inherit name="editor_object" />
<inherit name="topic" />
<terminal />
<exchange>"Not a problem. Good luck. You'll need it." The Innkeeper goes to talk to another customer.</exchange>
<expires type="boolean">false</expires>
<alias>"Thanks. Goodbye."</alias>
<hideafter type="boolean">false</hideafter>
</object>
</object>
<object name="Key to Room 10">
<inherit name="editor_object" />
<inherit name="merchandise" />
<visible type="boolean">false</visible>
<destroyonsale />
<notindescription />
</object>
</object>
<object name="Trash">
<inherit name="editor_room" />
<object name="Marie">
<inherit name="editor_object" />
<inherit name="talkingchar" />
<inherit name="namedfemale" />
<reactions><![CDATA[@<br/>greeting<br/>true<br/>'Hi!' says Mary<br/><br/>@<br/>plain hat<br/># ghhjhj<br/>plain_hat.worn<br/>'Oh, you are wearing a hat,' says Mary.<br/>& this testscript<br/><br/>@<br/>fancy hat<br/>fancy_hat.worn<br/>'Wow, what a fancy hat,' says Mary.<br/>~ plain hat<br/><br/>@<br/>trophy<br/>player.won_competition and trophy.parent = player<br/>'Cool trophy,' says Mary.<br/><br/>@<br/>trophy<br/>player.won_competition<br/>'Hey I heard you won the completion,' says Mary.<br/>= this alias "Happy Mary"<br/>+ Mary happiness 5<br/><br/>Each reaction is described by four or more lines, composed thus:<br/><br/>The first line must be a @ on a line on its own; this indicates the start of the reaction.<br/><br/>The second line is the name of the reaction. You can give a set of reactions the same name; only one will ever be used.<br/><br/>Third is the condition. The condition should be standard Quest code that will evaluate to true or false (you can use "this" as normal to refer to the character).<br/><br/>The four and all subsequent lines are "what will happen". You can use these to change the game world (to a limited extent) and to display text. These lines can be of various types, depending on the first character, however, most text (anything beginning with a letter or number) will be printed directly to screen.]]></reactions>
<object name="mary alibi">
<inherit name="editor_object" />
<inherit name="startingtopic" />
<alias>"Where were you last night?"</alias>
<exchange>I was playing pool with Clive.</exchange>
<nowshow type="stringlist">
<value>mary playing pool</value>
</nowshow>
</object>
<object name="mary dr black">
<inherit name="editor_object" />
<inherit name="startingtopic" />
<exchange>I didn't know him that well. The only time we spent together was when we were having wild crazy sex.</exchange>
<alias>"How well did you know Dr. Black?"</alias>
</object>
<object name="mary playing pool">
<inherit name="editor_object" />
<inherit name="topic" />
<alias>"What time exactly were you playing pool?"</alias>
<exchange>"Right after I finished having sex with Beckie, and right before I had sex with Clive."</exchange>
<expires type="boolean">false</expires>
</object>
</object>
</object>
<object name="South Warren Dj Inn Upstairs Hall 1">
<inherit name="editor_room" />
<alias>South Warren -- Dj Inn: Upstairs Hall Split</alias>
<description>This hall goes to the left and right, with Rooms 16-18 to the left, and 28-30 to your right.</description>
<exit alias="down" to="South Warren Dj Inn">
<inherit name="downdirection" />
</exit>
<exit alias="east" to="South Warren Dj Inn Upstairs Hall 2">
<inherit name="eastdirection" />
</exit>
</object>
<command name="Assign Points">
<pattern>points;pts;pt;stats;levelup;assign;lvl;lvlup</pattern>
<script>
assignpoints
</script>
</command>
<command name="Start Game">
<pattern>Start_Game</pattern>
<script>
if (game.pov.firststart = False) {
Ask ("You can only do this once! Once you leave this room, you will never return! Are you sure?") {
MoveObject (game.pov, South Warren Dj Inn)
game.pov.firststart = True
game.pov.volume = 100
}
}
else {
msg ("The game has already started!")
}
</script>
</command>
<object name="South Warren Dj Inn Upstairs Hall 2">
<inherit name="editor_room" />
<description>This hall ends in a corner, and has rooms 28-30 in it.</description>
<alias>South Warren -- Dj Inn: Upstairs Hall Rooms 28-30</alias>
<exit alias="west" to="South Warren Dj Inn Upstairs Hall 1">
<inherit name="westdirection" />
</exit>
<exit alias="north" to="South Warren Dj Inn Upstairs Hall 3">
<inherit name="northdirection" />
</exit>
</object>
<object name="South Warren Dj Inn Upstairs Hall 3">
<inherit name="editor_room" />
<alias>South Warren -- Dj Inn: Upstairs Hall Rooms 25-27</alias>
<exit alias="south" to="South Warren Dj Inn Upstairs Hall 2">
<inherit name="southdirection" />
</exit>
<exit name="Room 25" alias="west" to="South Warren Dj Inn Upstairs Hall Room 25">
<inherit name="westdirection" />
<locked type="boolean">false</locked>
<look>This is a test.</look>
</exit>
</object>
<object name="South Warren Dj Inn Upstairs Hall 4">
<inherit name="editor_room" />
</object>
<object name="South Warren Dj Inn Upstairs Hall Room 25">
<inherit name="editor_room" />
<exit alias="east" to="South Warren Dj Inn Upstairs Hall 3">
<inherit name="eastdirection" />
</exit>
</object>
<type name="raceclass_type">
<Charm type="int">0</Charm>
<Survival type="int">0</Survival>
<Class type="string"></Class>
<money type="int">60</money>
<HP type="string"></HP>
<Combat type="int">0</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Stealth type="int">0</Stealth>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<RaceHealth type="int">0</RaceHealth>
<RaceMagic type="int">0</RaceMagic>
</type>
<type name="characterclass">
<HP type="string"></HP>
<MP type="string"></MP>
<Combat type="int">0</Combat>
<Intimidate type="int">0</Intimidate>
<Knowledge type="int">0</Knowledge>
<Charm type="int">0</Charm>
<Stealth type="int">0</Stealth>
<Survival type="int">0</Survival>
<Awareness type="int">0</Awareness>
<Healing type="int">0</Healing>
<Magic type="int">0</Magic>
<MaxHealth type="int">40</MaxHealth>
<Class type="string"></Class>
<CP type="int">5</CP>
<Armor type="int">0</Armor>
<Health type="int">30</Health>
<Mana type="int">0</Mana>
<MaxMana type="int">0</MaxMana>
<Deceive type="int">0</Deceive>
<RaceMagic type="int">0</RaceMagic>
<firststart type="boolean">false</firststart>
<turncount type="int">0</turncount>
<sneaklevel type="int">0</sneaklevel>
<equipped type="object">fists</equipped>
<changedHealth type="script">
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
</changedHealth>
<changedMana type="script">
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
</changedMana>
</type>
<type name="weapontype" />
<type name="healthitem" />
<type name="armortype" />
<type name="itemdata" />
<function name="namecharacter">
msg ("What is your name?")
get input {
game.pov.alias = result
Ask ("So your name is " +result+"?") {
if (result = True) {
msg ("Hello " +game.pov.alias+", nice to meet you.")
characterselect
}
else if (result = False) {
characterselect
}
}
}
</function>
<function name="choosegender">
gendermenu = NewStringList()
list add (gendermenu, "Male")
list add (gendermenu, "Female")
ShowMenu ("Choose a gender.", gendermenu, false) {
msg ("You're " +result+", huh?")
game.pov.gender = result
Ask ("Are you sure you want to be " +result+"?") {
if (result = True) {
if (game.pov.gender = "Male") {
game.pov.Combat = game.pov.Combat + 3
game.pov.Intimidate = game.pov.Intimidate + 3
game.pov.Survival = game.pov.Survival + 3
ClearScreen
namecharacter
}
else if (game.pov.gender = "Female") {
game.pov.Knowledge = game.pov.Knowledge + 3
game.pov.Healing = game.pov.Healing + 3
game.pov.Awareness = game.pov.Awareness + 3
ClearScreen
namecharacter
}
}
else if (result = False) {
choosegender
}
}
}
</function>
<function name="assignpoints"><![CDATA[
pointmenu = NewStringList()
list add (pointmenu, "Combat")
list add (pointmenu, "Charm")
list add (pointmenu, "Intimidate")
list add (pointmenu, "Deceive")
list add (pointmenu, "Survival")
list add (pointmenu, "Stealth")
list add (pointmenu, "Knowledge")
list add (pointmenu, "Awareness")
list add (pointmenu, "Healing")
list add (pointmenu, "Magic")
ShowMenu ("Select a Skill to increase. You have " +game.pov.CP+ " available.", pointmenu, true) {
if (result = "Combat") {
msg ("How many points would you like to assign to Combat? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Combat = game.pov.Combat + i
game.pov.CP = game.pov.CP - i
msg ("Your Combat is now " +game.pov.Combat+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Charm") {
msg ("How many points would you like to assign to Charm? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Charm = game.pov.Charm + i
game.pov.CP = game.pov.CP - i
msg ("Your Charm is now " +game.pov.Charm+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Intimidate") {
msg ("How many points would you like to assign to Intimidate? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Intimidate = game.pov.Intimidate + i
game.pov.CP = game.pov.CP - i
msg ("Your Intimidate is now " +game.pov.Intimidate+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Deceive") {
msg ("How many points would you like to assign to Deceive? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Deceive = game.pov.Deceive + i
game.pov.CP = game.pov.CP - i
msg ("Your Deceive is now " +game.pov.Deceive+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Survival") {
msg ("How many points would you like to assign to Survival? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Survival = game.pov.Survival + i
game.pov.MaxHealth = game.pov.MaxHealth + i * game.pov.HealthModifier
game.pov.Health = game.pov.Health + i * game.pov.HealthModifier
game.pov.CP = game.pov.CP - i
msg ("Your Survival is now " +game.pov.Survival+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Stealth") {
msg ("How many points would you like to assign to Stealth? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Stealth = game.pov.Stealth + i
game.pov.CP = game.pov.CP - i
msg ("Your Stealth is now " +game.pov.Stealth+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Knowledge") {
msg ("How many points would you like to assign to Knowledge? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Knowledge = game.pov.Knowledge + i
game.pov.MaxMana = game.pov.MaxMana + i * game.pov.ManaModifier
game.pov.Mana = game.pov.Mana + i * game.pov.ManaModifier
game.pov.CP = game.pov.CP - i
msg ("Your Knowledge is now " +game.pov.Knowledge+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Awareness") {
msg ("How many points would you like to assign to Awareness? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Awareness = game.pov.Awareness + i
game.pov.CP = game.pov.CP - i
msg ("Your Awareness is now " +game.pov.Awareness+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Healing") {
msg ("How many points would you like to assign to Healing? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Healing = game.pov.Healing + i
game.pov.CP = game.pov.CP - i
msg ("Your Healing is now " +game.pov.Healing+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
if (result = "Magic") {
msg ("How many points would you like to assign to Magic? [For example: type 0, 3, or 5]")
get input {
i = ToInt(result)
if (game.pov.CP >= i) {
game.pov.Magic = game.pov.Magic + i
game.pov.MaxMana = game.pov.MaxMana + i * game.pov.ManaModifier
game.pov.Mana = game.pov.Mana + i * game.pov.ManaModifier
game.pov.CP = game.pov.CP - i
msg ("Your Magic is now " +game.pov.Magic+ ".")
Ask ("Would you like to assign more points? " +game.pov.CP+ " points remain!") {
if (result = True) {
assignpoints
}
else {
msg ("Very well. You can always assign points by typing points;pts;pt;stats;levelup;assign;lvl;lvlup")
wait {
if (game.pov.parent = Character_Setup) {
msg ("You may now choose your Starting Gear from the items in this room! You won't be able to carry nearly as much as you will outside of this room, so choose carefully what you want to start, but know you will be able to carry a lot more later. <br/><br/>When you are done, type Start_Game.")
game.pov.volume = 20
}
}
}
}
}
else {
msg ("You don't have enough points for that result!")
assignpoints
}
}
}
}
LastStartScript
]]></function>
<function name="raceselect">
racemenu = NewStringList()
list add (racemenu, "Human")
list add (racemenu, "Dwarf")
list add (racemenu, "Elf")
list add (racemenu, "Halfling")
list add (racemenu, "Orc")
list add (racemenu, "Goblin")
ShowMenu ("Select Race", racemenu, false) {
msg ("You are a " +result+".")
set (player, "race", result)
// ----------------------------------------------------------------------------------------------------------
// fixed it up:
if (result = "Human") {
msg ("As a Human, you're adaptable, but you're not really great at anything.")
}
else if (result = "Dwarf") {
msg ("Dwarves are a hardy people! You're great at working with stone, and are at home in any cave or stonework.")
}
else if (result = "Elf") {
msg ("Elves are an ancient and wise people, whose natural gifts for Magic make them natural spellcasters. However, their fragile bodies often work against them in battle.")
}
else if (result = "Halfling") {
msg ("The tiny halfling is deceptively clever. Their size gives them a natural advantage, allowing them to go places most others can't.")
}
else if (result = "Orc") {
msg ("The powerful Orcs are brutes of raw strength. Never very bright, they are among the strongest of all races.")
}
else if (result = "Goblin") {
msg ("Vicious and cunning, the Goblins are surprisingly deceptive race, hiding powerful strength in their small bodies.")
}
// ----------------------------------------------------------------------------------------------------------
Ask ("Are you sure this is what you want?") {
if (result = True) {
game.pov.look = "You are "+game.pov.race+"."
obj = GetObject(game.pov.race)
atts = Split("Charm;Survival;Class;money;HP;Combat;Intimidate;Knowledge;Stealth;Awareness;Healing;Magic;RaceHealth;RaceMagic;Size",";")
foreach (att, atts) {
att_value = GetAttribute(obj, att)
set (game.pov, att, att_value)
Log ("Setting "+game.pov+"."+att+" to "+att_value)
}
ClearScreen
MoveObject (game.pov, Class_Select)
choosegender
}
else if (result = False) {
raceselect
}
}
}
</function>
<function name="characterselect"><![CDATA[
charactermenu = NewStringList()
if (game.pov.race = "Dwarf") {
charactermenu = NewStringList()
list add (charactermenu, "Soldier")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
else if (game.pov.race = "Elf") {
list add (charactermenu, "Mage")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
else if (game.pov.race = "Halfling") {
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
else if (game.pov.race = "Orc") {
list add (charactermenu, "Soldier")
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
}
else if (game.pov.race = "Goblin") {
list add (charactermenu, "Soldier")
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
}
else if (game.pov.race = "Human") {
list add (charactermenu, "Soldier")
list add (charactermenu, "Mage")
list add (charactermenu, "Thief")
list add (charactermenu, "Priest")
list add (charactermenu, "Hunter")
list add (charactermenu, "Bard")
list add (charactermenu, "Paladin")
}
ShowMenu ("Select Class", charactermenu, false) {
char = result
msg ("You chose " +result+".")
if (result<>null) {
if (result = "Soldier") {
Ask ("Are you sure you want to be the " +result+"?") {
if (result = True) {
game.pov.Combat = game.pov.Combat + 15
game.pov.Intimidate = game.pov.Intimidate + 15
game.pov.Knowledge = game.pov.Knowledge + 5
game.pov.Stealth = game.pov.Stealth + 5
game.pov.Deceive = game.pov.Deceive + 5
game.pov.Magic = 0
game.pov.Healing = 0
game.pov.Charm = game.pov.Charm + 10
game.pov.Survival = game.pov.Survival + 10
game.pov.Awareness = game.pov.Awareness + 10
game.pov.Class = "Soldier"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 5
game.pov.Mana = game.pov.Mana * 0
game.pov.HealthModifier = 5
game.pov.ManaModifier = 0
game.pov.MaxHealth = game.pov.Health
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Mage") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = 0
game.pov.Intimidate = 0
game.pov.Magic = game.pov.Magic + 15
game.pov.Knowledge = game.pov.Knowledge + 15
game.pov.Healing = game.pov.Healing + 10
game.pov.Survival = game.pov.Survival + 10
game.pov.Awareness = game.pov.Awareness + 5
game.pov.Stealth = game.pov.Stealth + 5
game.pov.Charm = game.pov.Charm + 5
game.pov.Deceive = game.pov.Deceive + 10
game.pov.Class = "Mage"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 1
game.pov.Mana = game.pov.Mana * 3
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 1
game.pov.ManaModifier = 3
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Thief") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = game.pov.Combat + 5
game.pov.Intimidate = game.pov.Intimidate + 10
game.pov.Magic = 0
game.pov.Knowledge = game.pov.Knowledge + 5
game.pov.Healing = 0
game.pov.Survival = game.pov.Survival + 5
game.pov.Awareness = game.pov.Awareness + 10
game.pov.Stealth = game.pov.Stealth + 15
game.pov.Charm = game.pov.Charm + 15
game.pov.Deceive = game.pov.Deceive + 10
game.pov.Class = "Thief"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 2
game.pov.Mana = game.pov.Mana * 0
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 2
game.pov.ManaModifier = 0
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Priest") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = 0
game.pov.Intimidate = game.pov.Intimidate + 5
game.pov.Magic = game.pov.Magic + 10
game.pov.Knowledge = game.pov.Knowledge + 10
game.pov.Healing = game.pov.Healing + 15
game.pov.Survival = game.pov.Survival + 5
game.pov.Awareness = game.pov.Awareness + 10
game.pov.Stealth = game.pov.Stealth + 5
game.pov.Charm = game.pov.Charm + 15
game.pov.Deceive = 0
game.pov.Class = "Priest"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 3
game.pov.Mana = game.pov.Mana * 2
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 3
game.pov.ManaModifier = 2
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Hunter") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = game.pov.Combat + 10
game.pov.Intimidate = game.pov.Intimidate + 10
game.pov.Magic = 0
game.pov.Knowledge = game.pov.Knowledge + 5
game.pov.Healing = 0
game.pov.Survival = game.pov.Survival + 15
game.pov.Awareness = game.pov.Awareness + 15
game.pov.Stealth = game.pov.Stealth + 10
game.pov.Charm = game.pov.Charm + 5
game.pov.Deceive = game.pov.Deceive + 5
game.pov.Class = "Hunter"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 4
game.pov.Mana = game.pov.Mana * 0
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 4
game.pov.ManaModifier = 0
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Bard") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = 0
game.pov.Intimidate = game.pov.Intimidate + 10
game.pov.Magic = game.pov.Magic + 5
game.pov.Knowledge = game.pov.Knowledge + 10
game.pov.Healing = game.pov.Healing + 5
game.pov.Survival = game.pov.Survival + 5
game.pov.Awareness = game.pov.Awareness + 10
game.pov.Stealth = 0
game.pov.Charm = game.pov.Charm + 15
game.pov.Deceive = game.pov.Deceive + 15
game.pov.Class = "Bard"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 1
game.pov.Mana = game.pov.Mana * 1
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 1
game.pov.ManaModifier = 1
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
else if (char = "Paladin") {
Ask ("Are you sure you want to be the " +char+"?") {
if (result = True) {
game.pov.Combat = game.pov.Combat + 10
game.pov.Intimidate = game.pov.Intimidate + 5
game.pov.Magic = game.pov.Magic + 10
game.pov.Knowledge = game.pov.Knowledge + 5
game.pov.Healing = game.pov.Healing + 10
game.pov.Survival = game.pov.Survival + 15
game.pov.Awareness = game.pov.Awareness + 5
game.pov.Stealth = 0
game.pov.Charm = game.pov.Charm + 15
game.pov.Deceive = 0
game.pov.Class = "Paladin"
game.pov.Health = game.pov.Survival + game.pov.RaceHealth
game.pov.Mana = game.pov.Knowledge + game.pov.Magic + game.pov.RaceMagic
if (game.pov.Health < 5) {
game.pov.Health = 5
}
if (game.pov.Mana < 5) {
game.pov.Mana = 5
}
game.pov.Health = game.pov.Health * 3
game.pov.Mana = game.pov.Mana * 2
game.pov.MaxHealth = game.pov.Health
game.pov.HealthModifier = 3
game.pov.ManaModifier = 2
game.pov.MaxMana = game.pov.Mana
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
game.pov.MP = ""+game.pov.Mana+ " / " +game.pov.MaxMana+ ""
ClearScreen
MoveObject (game.pov, Character_Setup)
assignpoints
}
else if (result = False) {
characterselect
}
}
}
}
else {
msg ("You chose to cancel.")
}
game.pov.hitpoints = game.pov.Health
}
]]></function>
<function name="LastStartScript"><![CDATA[
Log ("Running LastStartScript")
game.pov.changedHealth => {
game.pov.hitpoints = game.pov.Health
game.pov.HP = ""+game.pov.Health+ " / " +game.pov.MaxHealth+ ""
}
CombatInitialise
game.pov.changedhitpoints => {
Log ("Running new changedhitpoints")
set (game.pov, "Health", game.pov.hitpoints)
if (0 >= game.pov.hitpoints) {
if (game.pov.MaxHealth >= 1) {
msg ("You are dead!")
finish
}
}
else {
UpdateStatus
}
}
]]></function>
<walkthrough name="kv">
<steps type="simplestringlist">
4
1
1
1
fds
1
2
1
</steps>
</walkthrough>
</asl>
the issue is:
having 0 (or less than 0) (or becoming/changing-to: 0 or less than 0) 'life/hp' (or a 'dead' Boolean's Value as 'true') while having a 'changed' Script Attribute and/or a Turnscript running/existing (which has the 'death/game-over' scripting check in it), hence the 'death/game-over'. Which often happens with character creation.
(it's good practice though for them to think of how to code, change their code, so this is not happening... though they got to be decently knowledgeable in coding of course, but it's a good logic exercise for their brains, in training it in coding logic, that they need regardless of if they code directly or use the GUI/Editor)
P.S.
for the topic of reducing code
the 'statusattributes' can be contained within an Object Type (and they work well for this)
(adran08 may not be able to do this if/as-long-as his code still has conflicts with it)
an example:
<game name="example_game">
<attr name="team_objectlist_attribute" type="objectlist">
<value>player_1_object</value>
</attr>
<attr name="start" type="script">
<![CDATA[
msg ("Life? (1 to 999)")
get input {
if (IsInt (result)) {
input_integer_variable = ToInt (result)
if (input_integer_variable > 0 and input_integer_variable < 1000) {
player_1_object.maximum_life_integer_attribute = input_integer_variable // (this has to be done first: see logic in the 'changed' Scripts in the code far below, as to why)
player_1_object.current_life_integer_attribute = input_integer_variable // (this has to done after: see logic in the 'changed' Scripts in the code far below, as to why)
EnableTurnscript (global_turnscript) // now, my current life isn't 0, so now I can enable the global turnscript, without having an instant death at the start of this game // actually with how my example is set up, I could have this Turnscript enabled already, as while I'd have '0' life, I'm using a 'changed' Script, so my condition won't be changed to 'dead', and thus no instant game over is possible (as the game over occurs when all my team members are dead, and not by having '0' life)... but that's only because of exactly how this example is set up as it is right now
}
else {
do (game, "start")
}
}
else {
do (game, "start")
}
}
]]>
</attr>
</game>
<object name="player_1_object">
<inherit name="playable_character_type" />
</object>
<object name="npc_1_object">
<inherit name="non_playable_character_type" />
</object>
<object name="monster_1_object">
<inherit name="monster_type" />
</object>
<type name="playable_character_type">
<inherit name="character_type" />
<statusattributes type="stringdictionary">
<item>
<key>life_string_attribute</key>
<value>!</value>
</item>
<item>
<key>strength_integer_attribute</key>
<value>Strength: !</value>
</item>
</statusattributes>
</type>
<type name="non_playable_character_type">
<inherit name="character_type" />
</type>
<type name="monster_type">
<inherit name="character_type" />
</type>
<type name="character_type">
<attr name="life_string_attribute" type="string">unknown</attr>
<attr name="current_life_integer_attribute" type="int">0</attr>
<attr name="changedcurrent_life_integer_attribute" type="script">
<![CDATA[
if (this.current_life_integer_attribute > this.maximum_life_integer_attribute) {
this.current_life_integer_attribute = this.maximum_life_integer_attribute
}
else if (this.current_life_integer_attribute < 0) {
this.current_life_integer_attribute = 0
}
if (this.current_life_integer_attribute = 0) {
if (ListContains (this.condition_stringlist_attribute, "alive")) {
list remove (this.condition_stringlist_attribute, "alive")
}
if (not ListContains (this.condition_stringlist_attribute, "dead")) {
list add (this.condition_stringlist_attribute, "dead")
}
}
else {
if (ListContains (this.condition_stringlist_attribute, "dead")) {
list remove (this.condition_stringlist_attribute, "dead")
}
if (not ListContains (this.condition_stringlist_attribute, "alive")) {
list add (this.condition_stringlist_attribute, "alive")
}
}
this.life_string_attribute = "Life: " + this.current_life_integer_attribute + "/" + this.maximum_life_integer_attribute
]]>
</attr>
<attr name="maximum_life_integer_attribute" type="int">0</attr>
<attr name="changedmaximum_life_integer_attribute" type="script">
<![CDATA[
if (this.current_life_integer_attribute > this.maximum_life_integer_attribute) {
this.current_life_integer_attribute = this.maximum_life_integer_attribute
}
this.life_string_attribute = "Life: " + this.current_life_integer_attribute + "/" + this.maximum_life_integer_attribute
]]>
</attr>
<attr name="strength_integer_attribute" type="int">0</attr>
<attr name="condition_stringlist_attribute" type="stringlist">
<value>alive</value>
<value>normal</value>
</attr>
</type>
<turnscript name="global_turnscript">
<attr name="enabled" type="boolean">false</attr>
<script>
game_over_boolean_variable = true
foreach (team_member_object_variable, game.team_objectlist_attribute) {
if (ListContains (team_member_object_variable.condition_stringlist_attribute, "alive")) {
game_over_boolean_variable = false
}
}
on ready { // hopefully this works/recognizes the 'foreach' (someone explained when/for-what 'on ready' works and doesn't work... but I didn't understand it, sighs), as I'm not sure if the 'foreach' causes a halt from running this code/scripting below (at the same time it jumps/branches to run the 'foreach' scripting)
if (game_over_boolean_variable) {
msg ("GAME OVER")
finish
}
}
</script
</turnscript>
Does anyone know how the sneak script in CombatLib works? I dunno if I need to add more to make it functional, or if it works as is, much less how to use it in game.
Also, should I make a "Social Combat" system? That is, when engaging in Social Combat, the "enemy" would have a Social Value assigned to them for the 3 Social Skills, and "Social Endurance", which goes up or down based on the success of your actions in a conversation. At the end of the Conversation, if it's not below a certain threshold, you "lose" that fight, and possible negative consequences happen.
Social combat would be interesting, I'd certainly like to see that.
In Exalted (tabletop RPG), a lot of things can be treated like combat, including conversations. I vaguely remember one of my friends getting a set of social martial arts out of one of the books and totally breaking the system (including convincing an interrogator that he didn't speak the language he was interrogating them in). You probably don't want to go that far, but I would like to see something like that again.
Yeah, I'm going for it. Might (Will) need help though. This doesn't have to be nearly as complicated as the CombatLib though. If it's successful though... maybe I'll make it into a library and share it (assuming I can figure out how).
First, I gotta ask, how do you guys keep making those lines in your posts? Clearly it's not just an autocombine feature like I thought at first, since mine don't do that (unless it's doing that on your side but not mine, which would be weird).
Second, does anyone know the scale the CombatLib is MEANT to work with? I've never played a game with it. Is it built with small numbers in mind? Big ones? Any size? If my character's stats end up in the hundreds, will that break the system? Since I don't know how it's working in the background, I can't guess if I need to adjust my plans.
Third, I need help making an XP system. Since CombatLib supports it, but doesn't have one for itself included, I gotta design one. Dunno how I want to go about it though, so suggestions are appreciated.
do you mean the post's 'code boxes' ???
do this:
m```
(mass of code)
m```
but without the m's in front
and those 3 weird characters is the key above the left 'TAB' key and to the left of the '1' key, also if you hold shift, it does the tilde '~' symbol/character
producing this:
(mass of code)
what's nice about the code box, is that it preserves the formatting
also, some characters/symbols are used for other post/forum code stuff... so they won't show up in your post, but it you put them in the code box, they'll show up
for example:
as you can see, this is not shown:
but this is what I wrote into the above line:
as you can see, this is not shown: <xxxx>
I need to learn more of this stuff myself (KV's an expert in this stuff, lol):
http://docs.textadventures.co.uk/forum/
and the forum uses the, 'markdown' and 'html', web languages:
https://daringfireball.net/projects/markdown/syntax (markdown)
https://www.w3schools.com (html: Hyper-Text Markup Language, CSS: Cascading Style Sheet, JS: JavaScript, XML: eXtendible Markup Language, etc etc etc)
ask if you need help with anything
I like this experience leveling mechanic/equation/formula, I think it scales well:
(example will have it as a Function, and use a Turnscript)
(left out skill points, you can modify it however you want)
<function name="leveling_function">
<![CDATA[
xp = player.level * 100 + 100 // xp needed for level up
if (player.experience >= xp) {
player.experience = player.experience - xp
player.level = player.level + 1
leveling_function
}
]]>
</function>
<turnscript name="global_turnscript">
<enabled />
<script>
leveling_function
</script>
</turnscript>
level 0: 100 exp for level up
-100 exp
level 1: 200 exp for level up
-200 exp
level 2: 300 exp for level up
-300 exp
level 3: 400 exp for level up
-400 exp
...you get the idea...
Don't mean the code box, I mean there's a gray line crossing the middle of the posts.
oh...
just do a bunch of dashes (the key to the right of the '0' key and to the left of the '+/=' key. If you use shift, you do the underscore '_' character/symbol instead of a dash '-' character/symbol), and it makes a line across post:
------------------
(the above is what I did/typed-in into/for the above line, also you might only need to do 3 or so dashes... don't need to do this many dashes, lol)
That.... is something I should have guessed -_- Not like that's not used in a lot of programs now :/
Oh well. I had to flip the XP thing you made around, but it works now. "Experience" had to be "XP", since that's the attribute assigned by the CombatLib. Added 1 CP (Character Point) for each level, and we have a working system. Dunno if I want it to affect any other stats as you level up though. Thoughts?
Also, anyone know how to "override" something? Cause the Clock Lib apparently needs me to override EachTurn.
Also for consideration, what do you guys think of giving the player a "natural healing" where every 5 minutes (5 turns), the player heals 1 HP and recovers 1 MP? Or maybe equal to their level, so it actually scales up as the game goes on, if I add HP and MP increasing with level as well.
to over-ride/over-write, just create/set/re-set something using the same name
examples:
player.strength = 100
player.strength = 50 // we 'over-wrote/over-ridden' the 'player.strength' and gave it a new Value
set (player, "strength", 100)
set (player, "strength", 50) // we 'over-wrote/over-ridden' the 'player.strength' and gave it a new Value
<object name="player_1">
<inherit name="character_type" />
<attr name="strength" type="int">100</attr> <!-- This over-rides/over-writes the 'strength = 0'Inherited Attribute from the 'character_type' Object Type -->
</object>
<object name="player_2">
<inherit name="character_type" />
</object>
<type name="character_type">
<attr name="strength" type="int">0</attr>
</type>
// results:
player_1.strength = 100
player_2.strength = 0
<object name="player_1">
<inherit name="character_1_type" />
</object>
<object name="player_2">
<inherit name="character_2_type" />
</object>
<object name="player_3">
<inherit name="character_3_type" />
</object>
<type name="character_3_type">
<inherit name="character_2_type" />
<attr name="strength" type="int">100</attr>
</type>
<type name="character_2_type">
<inherit name="character_1_type" />
<attr name="strength" type="int">50</attr>
<attr name="endurance" type="int">50</attr>
</type>
<type name="character_1_type">
<attr name="strength" type="int">0</attr>
<attr name="endurance" type="int">0</attr>
<attr name="dexterity" type="int">0</attr>
</type>
// results:
player_1.strength = 0
player_1.endurance = 0
player_1.dexterity = 0
player_2.strength = 50
player_2.endurance = 50
player_2.dexterity = 0
player_3.strength = 100
player_3.endurance = 50
player_3.dexterity = 0
So to override EachTurn means to make a new function called EachTurn? Okay, I can understand that.
yep, whatever it is: Attribute, Verb, Function, Command, Turnscript, etc Elements
just create/set/re-set another of that Element with the same name
and those 3 weird characters is the key above the left 'TAB' key and to the left of the '1' key, also if you hold shift, it does the tilde '~' symbol/character
Be careful with advice like that; not everybody's keyboards are arranged the same way. For example, on a British keyboard, shift+` gives you ¬, and the tilde is on shift+#.
Sorry, I didn't see that. I quite like the idea of natural healing, but I think you'd have to be careful to make sure it can't be abused. If you heal 1HP every turn, would it be feasible for someone to just keep looking around the room until they were healed?
If it's so much per minute, then presumably you'd have to include something (wandering monsters? timed missions?) to dissuade the player from just waiting until healed after every battle.
it'd be every 5 minutes, not per minute. Also, the game will have events continue with or without you, so if you spend all your time... well... wasting time, then things might progress to the point that you are in a real bind. Also, I'm going to try and make things like Look not progress time (looking at something takes literally no time after all. I don't spend a minute staring at a door to know what a door looks like after all). If you're spending excessive amounts of time waiting just to heal, then you'll definitely regret it when anything time-sensitive passes you by.
Also, I really do need help with setting up the conversion from CombatLib to my attributes after all. I need opinions on a few things, then advice on how to do at least a few things, since I can't figure out how the Library is doing things :/
Based on what it does, Combat will DEFINITELY be Strength (I could probably just change Combat into Strength outright and be done wit hit). Agility is... much harder, and I'm not sure how to deal with that one aside from making it a new stat.... Intelligence is basically Knowledge, so that could be another straight conversion. Stamina.... is basically not needed, since as far as I can tell it only affects HP, and I have my own HP system in place. So, I guess I need advice on the Agility problem, and should I just turn Combat and Knowledge into Strength and Intelligence? Should I keep the same names, but use a script to make Combat/Strength and Knowledge/Intelligence equal?
Also also, how the heck does Protection work? Cause so far, it seems to do nothing, even with CombatLib which says in the documentation something about how it works :/
game design is up to you and what type of game you want to make and what you want in it, so why I'm not commenting about it. I'll be glad to help with whatever design you want to do though of course!
you could limit the amount of natural healing per day/time... many various mechanics of doing it... for an example... maybe only able to naturally heal 10% of your current life per day or whatever...
I'm mostly asking to get feedback from other players who have an idea of what might be fun or acceptable. It would not be the first time I had an idea that I thought was cool, but that everyone else thought sucked XD
I guess at this point I just need to get thoughts and ideas for one thing, and I should be able to convert my system to work well with CombatLib. How should I handle Agility?
if the combat library handles 'agility' type of functionality, then you already got a library for it, lol. otherwise, you'll have to create your own agility type of functionality. Also, what functionality do you want with/from 'agility' ???
you got to provide some info on what you want to do in your game... as there's a lot of RPG functionality and also different ways of going about it too...
we need some guide lines on what you want your game to be and be like, what you want in it and how you want it done and etc.
I don't mean it like that, I mean MY stats don't include Agility, but the Library NEEDS Agility for it to work.