* Set an alias
* Set them to the type "topic" or "startingtopic", the latter will be visible from the start.
* Give it a script called talk; this is run when the character is asked about the topic.
* The topic will automatically disappear once the player has seen it. Set hideafter to false to
stop this happening automatically (call the "hide" script to do it yourself).
* The count attribute notes how many times the character has been asked about this topic previously
(so is zero the first time).
* If you want new topics to be available after reading this one, put the names of the new topics in
the shownow list.
Neonayon wrote:I'm using some of your libraries (yes, you are credited in game, don't worry) in my game but I have NO idea how do go about customizing things in your libraries, nor can I follow your instructions at all. Maybe I'm just too dumb to comprehend your explanations but some clarity would be greatly appreciated. Just talk to me like I'm a two year old so I understand. This has to do particularly with your "ConvLib" and "CombatLib". I've looked at both pretty extensively in the Notepad++ which HK suggested I get some time ago when I was first trying to understand code.
My first question is in regards to your "ConvLib" comes from this...
I would like a character to have "topics" to discuss/ask after the player initially "Speak to" them. So naturally I was very confused about how to do that in your library.
So anyway, I checked out the ConvLib in Notepad++ because in another post you explained to someone that everything is there and I looked and saw...
[quote] * Set an alias
* Set them to the type "topic" or "startingtopic", the latter will be visible from the start.
* Give it a script called talk; this is run when the character is asked about the topic.
* The topic will automatically disappear once the player has seen it. Set hideafter to false to
stop this happening automatically (call the "hide" script to do it yourself).
* The count attribute notes how many times the character has been asked about this topic previously
(so is zero the first time).
* If you want new topics to be available after reading this one, put the names of the new topics in
the shownow list.
There are three topics as follows...
Conversation Tab
None
Character
Conversation Topic
Starting Conversation Topic
Now initially I thought, oh I set up the character first, so I clicked it. All I see are..."Run this greeting script" ....which I didn't need really because I couldn't get it to work.
BUT I looked at your directions "Set an alias". I assumed I do that in that "Run this greeting script" box. So I typed{specificcharacter.alias} for example in "Print" assuming it would understand that it was coming from that character. That didn't work. Okay, what did I do wrong? So I continue to try, and look at your directions again. Set them to the type "topic or starting topic".....What? I have no idea what this means. There is no script that I know named "talk". Do I type this in "Print"? I don't know how to do this step at all.
Anyway, so I moved onto the next one. I understand that topics will disappear after they are chosen. Which is fine with me. Count attribute I understand. I clicked "Conversation topic" next. Automatically hide after showing. Got it and understand. Topics will disappear. Then I read this... "Show these after showing for the first time (must be the name, not the alias)" which I think I understand...so I create a topic with the "Add", then I look below at "Run this script" but again, I have NO idea how to tie that in with each of the conversation topics. I'm at a loss now and I no idea how/why this is so complicated for me to understand. So next I move to the "Starting Conversation Topic" and again, same thing as above. No idea how to get the player and the character to talk. The Ask/Tell thing is extremely limited to 'yes' and 'no' topics as well, which doesn't help.
Would you mind explaining this to me step by step? Maybe using both code and the GUI or just the code if you don't have time or patience to do both?
The next problem I had is with the "CombatLibrary"
I read your 'notepad' on how everything works and it's semi-straight forward and well-described....until I reach the customization part of it. Very confusing.
So I understand the gold, maxpoints, nameprompt, pointsprompt and understand when those things happen in the game, but the kicker is when you say "search for Boris" I figured, he/she must mean type "Boris" in the Notepad++ search box. Nothing came up. So I try it in the game itself in the code-view. Nothing came up. I try it again in the Filter, ShowLibraryMenu, nothing. I don't know if Boris is code for something...but I don't understand it.
Also, is there a way to add onto the character customization attribute...like picking a race, gender (I'd like to remove the outer prompt for gender selection and just have it be something you can select if possible), body type, haircolor, eyecolor ---- etc?
I'd also like to change Hit Points to "Health"
dictionary add (game.pov.statusattributes, "hitpointstatus", "!")
dictionary add (game.pov.statusattributes, "hitpointstatus", "Health: !")
....and figure out a way to make "Scripted" events drain it --- not just in combat, if that's possible. Also, is it possible for enemies not to "kill" you with a gameover, but defeat you and disappear like stealing stuff from you etc, or just leaving you there with 1 Health?
The Pixie wrote:Again, look at the page linked above. If it still does not make sense, get back to me.
Print ("You drink the healing potion, and suddenly you feel fine.")
game.pov.hitpoints = CalcFullHits ()
destroy (this.name)
The Pixie wrote:
If she types TALK TO BORIS again, she will get a menu again. This time her previous choice will not be there (unless ticked otherwise), but any topic listed in the "Show this after..." box for that topic will be there. I would guess you still need to list the new topics there to get yours to work properly.
The Pixie wrote:
With regards to healing potions, they heal back to full hits. To change that, look in CombatTypes.xml for this, and change the second line:Print ("You drink the healing potion, and suddenly you feel fine.")
game.pov.hitpoints = CalcFullHits ()
destroy (this.name)
The Pixie wrote:To have pootions that heal a little, set them to be potions, not healing potions. You will then get a "Script to run when potion is taken" area on the tab, and there you can get the potion to do anything you want.
TinFoilMkIV wrote:What it means is that at some point 'item.worn' is being used as an object reference instead of just holding the value true/false. The error is complaining that item.worn=<shirt> when its trying to look for true/false or something of the sort.
Can't really say how or where its being set to this but as I implied in my example I suspect that the 'item.worn' is being set to an actual worn item object instead of just true/false at some point
<object name="player">
<attr name="current_carry_limit" type="int">0</attr>
<attr name="maximum_carry_limit> type="int">100</attr>
</object>
// as scripting: player.current_carry_limit // this has to ignore the backpack's current_carry_limit
// as scripting: player.maximum_carry_limit
<object name="backpack">
<attr name="current_carry_limit" type="int">0</attr>
<attr name="maximum_carry_limit" type="int">50</attr>
</object>
// as scripting: backpack.maximum_carry_limit
// as scripting: backpack.current_carry_limit
// scripting, example:
if (backpack.current_carry_limit > player.maximum_carry_limit - player.current_carry_limit) {
msg ("The backpack is too heavy, you must remove some items from it, or some other items from your inventory.")
}
// or to make it really easy: just have the player and backpack carry limits totally separate: just don't have my ' // scripting example: ...scripting... '
HegemonKhan wrote:this is just a general example of how it can be done, but I've no idea how Pixie's Library has been set up.<object name="player">
<attr name="current_carry_limit" type="int">0</attr>
<attr name="maximum_carry_limit> type="int">100</attr>
</object>
// as scripting: player.current_carry_limit // this has to ignore the backpack's current_carry_limit
// as scripting: player.maximum_carry_limit
<object name="backpack">
<attr name="current_carry_limit" type="int">0</attr>
<attr name="maximum_carry_limit" type="int">50</attr>
</object>
// as scripting: backpack.maximum_carry_limit
// as scripting: backpack.current_carry_limit
// scripting, example:
if (backpack.current_carry_limit > player.maximum_carry_limit - player.current_carry_limit) {
msg ("The backpack is too heavy, you must remove some items from it, or some other items from your inventory.")
}
// or to make it really easy: just have the player and backpack carry limits totally separate: just don't have my ' // scripting example: ...scripting... '
The Pixie wrote:Do this:player.equiped = null
HegemonKhan wrote:doing alright, hopefully I'll get into some programming classes in the fall registration. still slowly trying to get through JS right now (it's so boring re-doing the basics again, due to having to learn the syntax for each new language, sighs), and working on learning to code more stuff in with quest's code and inching towards a game in quest, laughs.
good to see you again too, being back. We missed you. Quest doesn't have many people posting, sighs.
HegemonKhan wrote:this is just a general example of how it can be done, but I've no idea how Pixie's Library has been set up.<object name="player">
<attr name="current_carry_limit" type="int">0</attr>
<attr name="maximum_carry_limit> type="int">100</attr>
</object>
// as scripting: player.current_carry_limit // this has to ignore the backpack's current_carry_limit
// as scripting: player.maximum_carry_limit
<object name="backpack">
<attr name="current_carry_limit" type="int">0</attr>
<attr name="maximum_carry_limit" type="int">50</attr>
</object>
// as scripting: backpack.maximum_carry_limit
// as scripting: backpack.current_carry_limit
// scripting, example:
if (backpack.current_carry_limit > player.maximum_carry_limit - player.current_carry_limit) {
msg ("The backpack is too heavy, you must remove some items from it, or some other items from your inventory.")
}
// or to make it really easy: just have the player and backpack carry limits totally separate: just don't have my ' // scripting example: ...scripting... '
<object name="player">
<attr name="current_carry_weight" type="int">0</attr>
<attr name="maximum_carry_weight" type="int">100</attr>
</object>
<object name="backpack">
<attr name="current_carry_weight" type="int">0</attr>
<attr name="maximum_carry_weight" type="int">100</attr>
</object>
<object name="loaf_of_bread">
<alias>loaf of bread</alias>
<attr name="weight" type="int">1</attr>
</object>
<object name="loaf_of_bread">
<alias>loaf of bread</alias>
<take type="script">
</take>
</object>
neonayon wrote:Also ^ ... this is under player attributes, which I got... but is that a "string" and in the string blank box, do I type "int">0< and that's it?
neonayon wrote:And what does "as scripting" mean?
neonayon wrote:Basically the aim is...that the character can only carry two small things in there pockets, and the rest has to be stored in the backpack, but right now the backpack is sharing the players carry limit.
player.equiped = null
player.equipped = fist
UpdateWeapon
Error running script: Error compiling expression 'item.worn = true': CompareElement: Operation 'Equal' is not defined for types 'Object' and 'Boolean'
neonayon wrote:does that mean ^--------- that I change current_carry_weight to current_carry_volume? Because that messes with the game's volume.
neonayon wrote:The player can carry a very small amount of items on themselves so after they grab something the player will be encouraged to place it in their backpack. The backpack itself has no weight/volume, and can carry up to like...20 in volume. The size of the objects doesn't matter too much, just the volume.
The Pixie wrote:I was wrong about the equipped thing, it should be this:player.equipped = fist
UpdateWeapon
The call to UpdateWeapon changes the status attribute.
With regards to this:Error running script: Error compiling expression 'item.worn = true': CompareElement: Operation 'Equal' is not defined for types 'Object' and 'Boolean'
This is probably because you have no attribute "worn" for the item, so item.worn is null. Quest is the trying to compare null, an object, with true, a Boolean.
I am not sure where this comes from. My CombatLib does not use that system at all (similar to weapons, it uses player.armourobject to hold the current armour).
With regards to your chainmail trousers,how did you set the armour rating? It should be set by adusting the Protection value on the Combat tab. Alternatively, set the "level" attribute.
Neonayon wrote:Oh, I'm using the "wearables" library from Quest. I didn't change any of the values for the clothing though, it just doesn't seem to work sometimes in the starting area. Some clothes can be worn other times it comes up with that error, which is a relatively new thing.
As for the player.equipped thing, where should I put that exactly? Does that go on the player tab, or right after the script that takes the weapon away? I'm also not sure what "UpdateWeapon" is. That goes in the player tab though under status attributes? And if so, is that the attribute name UpdateWeapon?
As for the Combat Tab, I marked the jeans as "Armor" and selected the Protection (0-5) to 1, and the cost at 0. On the inventory panel however, where it says "Armor Rating" it says 0.
The Pixie wrote:"Neonayon"
Oh, I'm using the "wearables" library from Quest. I didn't change any of the values for the clothing though, it just doesn't seem to work sometimes in the starting area. Some clothes can be worn other times it comes up with that error, which is a relatively new thing.
I am not familiar with that library. How do you tell Quest that an item is wearable? Try going to the attributes tab, and seeing if there is a "worn" attribute for the glitching item. If not create one, and set it to be a Boolean set to false, and see if the fixes it - without breaking anything else.As for the player.equipped thing, where should I put that exactly? Does that go on the player tab, or right after the script that takes the weapon away? I'm also not sure what "UpdateWeapon" is. That goes in the player tab though under status attributes? And if so, is that the attribute name UpdateWeapon?
UpdateWeapon is a function that you need to call to get the text is the status pane to update. When you take the weapon away, you need to add the two lines of code just after.As for the Combat Tab, I marked the jeans as "Armor" and selected the Protection (0-5) to 1, and the cost at 0. On the inventory panel however, where it says "Armor Rating" it says 0.
I would guess this is because the armour is using the WEAR from the wearables library, not CombatLib. Whatever you do for the Wearables libary to tell it an item is worn, try NOT doing it for the armour, and then see if that fixes it. That may only be a temporary fix, but will help work out the problem.
Thinking about it, you are proably better off redesigning the armour system, so each item worn contributes to the armour rating. Not trivial, but doable.
HegemonKhan wrote:@Neonayon and Pixie:
Sorry about the other Library (Chase's Wearables Library) being used by neonayon, as if she wants to use it too, I'll have to check for if there's any conflicts (between Chase's Wearables Library and Pixie's Combat+Equipment+etc Libraries) and explain how to use Chase's Wearables Library for~in her game.
I just mentioned it as an alternative equipment library coding to look at, forgetting to mention though that she should jsut choose one library to use, to keep it simple, and without any possible conflicts.
<object name="player">
<attr name="right_hand" type="object">sword</attr>
<attr name="left_hand" type="object">shield</attr>
<attr name="head" type="object">helmet</attr>
<attr name="face" type="object">visor</attr>
<attr name="chest" type="object">mail</attr>
// etc etc etc
</object>
<object name="sword">
</object>
<object name="shield">
</object>
// etc etc etc Objects
HegemonKhan wrote:there's many different designs for doing equipment, and also it depends upon how simple or complex you want to go with it as well.
one of the more simple but limited setups is to use Object Attributes (Attribute Type: object) for your 'body part ~ equipment slots' :
'player' Player Object -> 'Attributes' Tab -> Attributes -> Add (see below, repeat as needed)
example:
(Object Name: player)
Attribute Name: right_hand
Attribute Type: object
Attribute Value: sword<object name="player">
<attr name="right_hand" type="object">sword</attr>
<attr name="left_hand" type="object">shield</attr>
<attr name="head" type="object">helmet</attr>
<attr name="face" type="object">visor</attr>
<attr name="chest" type="object">mail</attr>
// etc etc etc
</object>
<object name="sword">
</object>
<object name="shield">
</object>
// etc etc etc Objects
-----------------------------------
run as script -> add a~new script -> variables -> 'set a variable or attribute' Script -> [expression] -> (see below)
Equipment example:
player.right_hand = sword
player.left_hand = shield
player.head = helmet
player.face = visor
player.chest = mail
player.shoulders = pauldrons
player.waist = tassets
player.back = cape
player.legs = greaves
player.feet = boots
player.arms = vambraces
player.hands = gauntlets
player.ears = earrings
player.neck = necklace
player.fingers = rings
player.right_hand = sword
// then to change ( 're-equip' ) it:
player.right_hand = axe
// 'sword' and 'axe' must be actual Objects in the game.
Clothing example:
player.head = hat
player.face = glasses
player.chest = shirt
player.back = backpack
player.waist = shorts
player.legs = socks
player.feet = shoes
player.arms = bracelets
player.neck = necklace
player.ears = studs
player.fingers = rings
player.hands = gloves
----------------
there is a lot more that is needed, but it's a start for you, if you want to get into trying to learn to work with equipment (it's not easy, I just barely understand it myself). Pixie, Pertex, and Chase (in their libraries) all go into much more fancy usage~design of equipment systems, far beyond my ability.
<object name="room">
</object>
<object name="player">
<parent type="object">room</attr>
<attr name="equipment_right_hand" type="object">unarmed_right_hand</attr>
</object>
<object name="unarmed_right_hand">
<alias>unarmed</alias>
<drop type="boolean">false</attr>
<parent type="object">player</parent>
<attr name="damage" type="int">1</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=unarmed_right_hand) {
player.equipment_right_hand=unarmed_right_hand
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<object name="sword">
<take />
<parent type="object">room</attr>
<attr name="damage" type="int">50</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=sword) {
player.equipment_right_hand=sword
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<object name="axe">
<take />
<parent type="object">room</attr>
<attr name="damage" type="int">100</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=axe) {
player.equipment_right_hand=axe
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<verb>
<property>equip</property>
<pattern>equip</pattern>
<defaultexpression>"You can't equip that."</defaultexpression>
</verb>
<object name="orc">
<parent type="object">room</attr>
<attr name="life" type="int">500</attr>
<attack type="script">
orc.life = orc.life - player.Equipment_Right_Hand.damage
</attack>
</object>
<object name="room">
</object>
<object name="player">
<parent type="object">room</attr>
<attr name="equipment_right_hand" type="object">unarmed_right_hand</attr>
</object>
<object name="unarmed_right_hand">
<alias>unarmed</alias>
<drop type="boolean">false</attr>
<parent type="object">player</parent>
<attr name="damage" type="int">1</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=unarmed_right_hand) {
player.equipment_right_hand=unarmed_right_hand
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<object name="sword">
<parent type="object">room</attr>
<take />
<attr name="damage" type="int">50</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=sword) {
player.equipment_right_hand=sword
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<object name="axe">
<take />
<parent type="object">room</attr>
<attr name="damage" type="int">100</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=axe) {
player.equipment_right_hand=axe
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<verb>
<property>equip</property>
<pattern>equip</pattern>
<defaultexpression>"You can't equip that."</defaultexpression>
</verb>
<object name="player">
<parent type="object">room</attr>
<attr name="equipment_right_hand" type="object">unarmed_right_hand</attr>
<attr name="equipment_left_hand" type="object">unarmed_left_hand</attr>
<statusattributes type="simplestringdictionary">equipment_right_hand = Equipment Right Hand: !; equipment_left_hand = Equipment Left Hand: !</statusattributes>
</object>
<command name="character_equipment_screen">
<pattern>equipment</pattern>
<script>
ClearScreen
msg ("Character Equipment Screen")
msg ("")
msg ("Right Hand: " + player.equipment_right_hand)
msg ("Left Hand: " + player.equipment_left_hand)
wait {
ClearScreen
}
</script>
</command>
HegemonKhan wrote:(if my posts are confusing you more, then just, IGNORE THEM, lol)
------------------
well, in this simple system~design we're not using 'worn~equipped', nor the displayment of 'Object_alias (worn)' (I'd have to look this up again on one of Pixie's Libraries to see how it's done as it's been awhile and is a bit advanced, lol), and nor etc more complex stuff (so if you do want this stuff, then ignore this post!), in that by just having:
Weapon_Object_name.parent=player
~and~
player.equipment_right_hand=Weapon_Object_name
we're conceptually 'equipped' with the 'sword~axe~unarmed_right_hand' in our right hand<object name="room">
</object>
<object name="player">
<parent type="object">room</attr>
<attr name="equipment_right_hand" type="object">unarmed_right_hand</attr>
</object>
<object name="unarmed_right_hand">
<alias>unarmed</alias>
<drop type="boolean">false</attr>
<parent type="object">player</parent>
<attr name="damage" type="int">1</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=unarmed_right_hand) {
player.equipment_right_hand=unarmed_right_hand
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<object name="sword">
<take />
<parent type="object">room</attr>
<attr name="damage" type="int">50</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=sword) {
player.equipment_right_hand=sword
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<object name="axe">
<take />
<parent type="object">room</attr>
<attr name="damage" type="int">100</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=axe) {
player.equipment_right_hand=axe
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<verb>
<property>equip</property>
<pattern>equip</pattern>
<defaultexpression>"You can't equip that."</defaultexpression>
</verb>
we can do this:<object name="orc">
<parent type="object">room</attr>
<attr name="life" type="int">500</attr>
<attack type="script">
orc.life = orc.life - player.Equipment_Right_Hand.damage
</attack>
</object>
<object name="room">
</object>
<object name="player">
<parent type="object">room</attr>
<attr name="equipment_right_hand" type="object">unarmed_right_hand</attr>
</object>
<object name="unarmed_right_hand">
<alias>unarmed</alias>
<drop type="boolean">false</attr>
<parent type="object">player</parent>
<attr name="damage" type="int">1</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=unarmed_right_hand) {
player.equipment_right_hand=unarmed_right_hand
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<object name="sword">
<parent type="object">room</attr>
<take />
<attr name="damage" type="int">50</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=sword) {
player.equipment_right_hand=sword
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<object name="axe">
<take />
<parent type="object">room</attr>
<attr name="damage" type="int">100</attr>
<equip type="script">
if (this.parent = player) {
if (not player.equipment_right_hand=axe) {
player.equipment_right_hand=axe
} else {
msg ("You're already equipped with it.")
}
}
</equip>
</object>
<verb>
<property>equip</property>
<pattern>equip</pattern>
<defaultexpression>"You can't equip that."</defaultexpression>
</verb>
----------
oh, if you want to see this stuff during game play:
in the status pane:<object name="player">
<parent type="object">room</attr>
<attr name="equipment_right_hand" type="object">unarmed_right_hand</attr>
<attr name="equipment_left_hand" type="object">unarmed_left_hand</attr>
<statusattributes type="simplestringdictionary">equipment_right_hand = Equipment Right Hand: !; equipment_left_hand = Equipment Left Hand: !</statusattributes>
</object>
and~or, as a typed-in input of 'equipment' by the person during game (via usage of a Command):<command name="character_equipment_screen">
<pattern>equipment</pattern>
<script>
ClearScreen
msg ("Character Equipment Screen")
msg ("")
msg ("Right Hand: " + player.equipment_right_hand)
msg ("Left Hand: " + player.equipment_left_hand)
wait {
ClearScreen
}
</script>
</command>
damage = damage + GetRandomInt (1, weapon.damagedicesides) - foe.armour
damage = damage + GetRandomInt (1, weapon.damagedicesides) - GetArmour(foe)
dictionary add (game.pov.statusattributes, "armour", "Armour rating: !")
The Pixie wrote:I think HK is suggesting a system where the player wears a piece of armour on a certain location - chainmail gauntlets on the hands, or a leather cuirass on the chest (like the Elder Scrolls games for example).
If you want to use wearables, I would suggest removing my armour system from the libraries. A basic plan is to back everythng up, then
Step 1: Delete the entire armour type in CombatTypes.xml.
In CombatStuff there is a line like this:damage = damage + GetRandomInt (1, weapon.damagedicesides) - foe.armour
Change todamage = damage + GetRandomInt (1, weapon.damagedicesides) - GetArmour(foe)
Comment out this line (put // at the start):dictionary add (game.pov.statusattributes, "armour", "Armour rating: !")
Then create a new function, GetArmour, of type int, with a single parameter. Make it just return 0.
Check the game will play. Very likely there will be other bits you need to change, so good luck!
Step 2: Add the wearables library. Add your armour items (at least enough to test with).
Check the game will play.
Step 3: Modify your GetArmour function. If the foe is the player, get a value for the amour, based on what the player is wearing. Otherwise return foe.armour.
Step 4: Bear in mind that the system assumes armour ranges from 0 to 4, which is not much of range for what you want to do - with only five different values, there is not much scope for variety. You may need to tweak the combat mechanics to make the system meaningful. Is there actually any difference between going barefoot and wearing steel boots? This is part of the reason I choice not to go this route, the other reason being I did not want to have to implement literally hundreds of bits of armour for my game.
if (player.waist1.layer > boxers.waist.layer) {
msg ("Sorry, you got to remove your pants first, before you can wear your boxers.")
} else {
player.waist = boxers
msg ("You wear your boxers, and go to bed.")
}
neonayon wrote:The problems I have now is a way for items such as the starting shirt "Plain black shirt" and the starting "backpack", "pants" and "shoes" and whatnot to display "worn" in the inventory pane, and to make it so that the clothing....let's say the player finds another shirt, for example can't be overlapped. Of course, it would be wonderful too if each item could be applied to the correct slot too, for example "Clothing_Feet" would fit the shoe/boot.
Does that make sense?
<library>
<!--
Chase's Wearables Library v2.3
Based on: Pixie's Clothing Library (originally)
You may edit this library however you please.
I decided to include a UI, since not having a UI kinda bugged me.
v1.01
-Fixed a typo
v1.02
+Added Event Handlers
+Fixed drop bug
v1.03
+Added configurable wear/remove messages
-Removed redundant events
v1.04
=Fixed an issue with wearing multiple blank items
=Fixed the issue with wearing items without aliases
v2.0
=Rewritten to better support base systems, may have broken older usages
+Added wear layer support
v2.1
=Fixed an issue of an error being thrown when trying to wear something that is not wearable.
v2.2
=Fixed an issue where the custom remove message doesn't play if the item cannot be removed.
v2.3
=Fixed a significant bug where you could not wear something if a non-wearable item was in your inventory.
Chase
chasesan@gmail.com
-->
<dynamictemplate name="WearSuccessful">"You put " + object.article + " on."</dynamictemplate>
<dynamictemplate name="WearUnsuccessful">"You can't wear " + object.article + "."</dynamictemplate>
<dynamictemplate name="AlreadyWearing">"You are already wearing " + object.article + "."</dynamictemplate>
<dynamictemplate name="CannotWearOver">"You cannot wear that over " + object.display + "."</dynamictemplate>
<dynamictemplate name="CannotWearWith">"You cannot wear that while wearing " + object.display + "."</dynamictemplate>
<dynamictemplate name="RemoveSuccessful">"You take " + object.article + " off."</dynamictemplate>
<dynamictemplate name="RemoveUnsuccessful">"You can't remove " + object.article + "."</dynamictemplate>
<dynamictemplate name="RemoveFirst">"You can't remove that while wearing "+object.display+"."</dynamictemplate>
<template name="Wear">Wear</template>
<verbtemplate name="wear">wear</verbtemplate>
<verbtemplate name="wear">put on</verbtemplate>
<template name="Remove">Remove</template>
<verbtemplate name="remove">remove</verbtemplate>
<verbtemplate name="remove">take off</verbtemplate>
<command name="wear" template="wear">
<multiple>
return (ScopeInventory())
</multiple>
<script>
foreach (obj, object) {
DoWear(obj)
}
</script>
</command>
<command name="remove" template="remove">
<multiple>
return (ScopeInventory())
</multiple>
<script>
foreach (obj, object) {
DoRemove(obj)
}
</script>
</command>
<function name="DoWear" parameters="object"><![CDATA[
if(not HasAttribute(object,"worn")) {
msg (DynamicTemplate("WearUnsuccessful", object))
} else if (object.parent = player and object.worn = true) {
msg (DynamicTemplate("AlreadyWearing", object))
} else if (not ListContains(ScopeInventory(), object)) {
msg (DynamicTemplate("WearUnsuccessful", object))
} else {
isLayerProblem = false
conflictedItem = null
if(HasAttribute(object,"wear_slots")) {
foreach(item, ScopeReachableInventory()) {
if(HasAttribute(item,"wear_slots")) {
if(item.worn = true) {
foreach(itemSlot,item.wear_slots) {
if(ListContains(object.wear_slots,itemSlot)) {
if(object.wear_layer < item.wear_layer) {
conflictedItem = item
isLayerProblem = true
} else if(object.wear_layer = item.wear_layer) {
conflictedItem = item
}
}
}
}
}
}
}
if(conflictedItem = null) {
object.worn = True
object.original_drop = object.drop
object.original_alias = object.alias
object.drop = false
object.display = GetDisplayName(object)
object.alias = GetDisplayAlias(object) + " (worn)"
if(object.wearmsg = null) {
msg (DynamicTemplate("WearSuccessful",object))
} else {
msg(object.wearmsg)
}
//do after
if (HasScript(object, "onafterwear")) {
do(object, "onafterwear")
} else if(HasString(object, "onafterwear")) {
msg(object.onafterwear)
}
} else if(isLayerProblem = true) {
msg(DynamicTemplate("CannotWearOver",conflictedItem))
} else {
msg(DynamicTemplate("CannotWearWith",conflictedItem))
}
}
]]></function>
<function name="DoRemove" parameters="object"><![CDATA[
if (not object.parent = player or not object.worn or not object.removeable) {
if(object.removemsg = null) {
msg (DynamicTemplate("RemoveUnsuccessful",object))
} else {
msg (object.removemsg)
}
} else {
conflictedItem = null
//check if we are wearing anything over it
if(HasAttribute(object,"wear_slots")) {
foreach(item, ScopeReachableInventory()) {
if(HasAttribute(item,"wear_slots")) {
if(item.worn = true) {
foreach(itemSlot,item.wear_slots) {
if(ListContains(object.wear_slots,itemSlot)) {
if(object.wear_layer < item.wear_layer) {
conflictedItem = item
}
}
}
}
}
}
}
if(conflictedItem = null) {
if(object.removemsg = null) {
msg (DynamicTemplate("RemoveSuccessful",object))
} else {
msg(object.removemsg)
}
object.worn = false
object.drop = object.original_drop
object.alias = object.original_alias
object.original_drop = null
object.original_alias = null
object.display = null
//do after
if (HasScript(object, "onafterremove")) {
do(object, "onafterremove")
} else if(HasString(object, "onafterremove")) {
msg(object.onafterremove)
}
} else {
msg (DynamicTemplate("RemoveFirst", conflictedItem))
}
}
]]></function>
<type name="wearable">
<worn type="boolean">false</worn>
<removeable type="boolean">true</removeable>
<wear_layer type="int">2</wear_layer>
<inventoryverbs type="listextend">[Wear];[Remove]</inventoryverbs>
</type>
<!-- Interface -->
<tab>
<parent>_ObjectEditor</parent>
<caption>Wearable</caption>
<mustnotinherit>editor_room; defaultplayer</mustnotinherit>
<control>
<controltype>title</controltype>
<caption>Wearable</caption>
</control>
<control>
<controltype>dropdowntypes</controltype>
<caption>Can be worn?</caption>
<types>*=Cannot be worn; wearable=Can be worn</types>
<width>150</width>
</control>
<control>
<mustinherit>wearable</mustinherit>
<controltype>checkbox</controltype>
<attribute>removeable</attribute>
<caption>Removeable?</caption>
</control>
<control>
<mustinherit>wearable</mustinherit>
<controltype>number</controltype>
<caption>Wear Layer</caption>
<attribute>wear_layer</attribute>
</control>
<control>
<mustinherit>wearable</mustinherit>
<caption>Wear Slot</caption>
<controltype>list</controltype>
<attribute>wear_slots</attribute>
<editprompt>Please enter the name for the wear location</editprompt>
</control>
<control>
<mustinherit>wearable</mustinherit>
<controltype>label</controltype>
<caption>If two objects have the same wear location, they will not be able to be worn at a same time. Any number items without wear locations can be worn.</caption>
<advanced/>
</control>
<!-- snip -->
<control>
<mustinherit>wearable</mustinherit>
<controltype>textbox</controltype>
<attribute>wearmsg</attribute>
<caption>Message to print when wearing (leave blank for default)</caption>
<nullable/>
</control>
<control>
<mustinherit>wearable</mustinherit>
<controltype>textbox</controltype>
<attribute>removemsg</attribute>
<caption>Message to print when removing or trying to remove (leave blank for default)</caption>
<nullable/>
</control>
<!-- Event Handlers from here down none/text/scripts -->
<control>
<mustinherit>wearable</mustinherit>
<controltype>title</controltype>
<caption>After Wearing</caption>
</control>
<control>
<mustinherit>wearable</mustinherit>
<selfcaption>After wearing the object</selfcaption>
<controltype>multi</controltype>
<attribute>onafterwear</attribute>
<types>null=None; string=Text; script=Run script</types>
<editors>string=textbox</editors>
<expand/>
</control>
<control>
<mustinherit>wearable</mustinherit>
<controltype>title</controltype>
<caption>After Removing</caption>
</control>
<control>
<mustinherit>wearable</mustinherit>
<selfcaption>After removing the object</selfcaption>
<controltype>multi</controltype>
<attribute>onafterremove</attribute>
<types>null=None; string=Text; script=Run script</types>
<editors>string=textbox</editors>
<expand/>
</control>
</tab>
</library>
<object name="shirt_1">
<alias>shirt</alias>
</object>
'wear' Verb~Command:
(you want to wear your boxers, so you can to go to bed, but you still got your pants on, so we don't want you to be able to wear your boxers!)
// from: player.waist = pants
pants.layer = 1
// to: player.waist = boxers
boxers.layer = 0if (player.waist1.layer > boxers.waist.layer) {
msg ("Sorry, you got to remove your pants first, before you can wear your boxers.")
} else {
player.waist = boxers
msg ("You wear your boxers, and go to bed.")
}
off-topic
laughs, as a male, we think in terms of violence~fighting~combat~war~etc (males are specialized for outward~outside threats: if another organism, be it a human or non-human, is threatening to steal~eat~kill your baby, get a male to help), and so I use 'equipment' as it is familiar to me (and other males), whereas, females are more interested~familiar with~in 'clothing' (females are specialized for inward~inside threats: if a bacteria or virus is threatening someone, get a female to help), so my apologizes for using the less familiar 'equipment', than 'clothing' for you, neonayon. (if interested further in the science of sexual specialization, I can give a very long lecture, laughs. I'm a huge science nerd, loving all fields of science, such as this one, laughs).
neonayon wrote:With that being said, I don't mind if people can remove boxers before pants (for now) seeing as that is just semantics, but I would like to prevent people from wearing pants and a skirt at the same time, or two pairs of pants, or two shirts.
<object name="underwear_1">
<attr name="layer" type="int">0</attr>
</object>
<object name="underwear_2">
<attr name="layer" type="int">0</attr>
</object>
currently wearing: player.waist = underwear_1
if (underwear_2.layer = player.waist.layer) {
msg ("No no no, you really do not want to put on a second underwear over the underwear you're already wearing!")
} else {
player.waist = underwear_2
msg ("You wear the underwear_2.")
}
neonayon wrote:As for this..."hk"
object.alias = GetDisplayAlias (example, see below: shirt_1) + " (worn)"
I follow that so far...
Type: Object
Name: plain_black_shirt
Alias: Plain Black Shirt
<object name="shirt_1">
<alias>shirt</alias>
</object>
^--- which is that.
So for the 'GetDisplayAlias()' Function....I'm not sure how to access that. Do I view Filter, Show Library Elements and find it there, or is it found in the object attributes? once I find it, I can follow this more clearly.
HegemonKhan wrote:oh, if you're unfamiliar with the concept of equipment~clothing~bodypart slots, here's an example (using Diablo 2 game):
http://classic.battle.net/images/battle ... ling01.jpg
now, we're trying to do the same thing with Quest, via Attributes (as quest is a text adventure game, not a 3d world movement graphical game, lol).
notice how in Diablo 2, you can only have one Object per slot.
You said want to be able to have multiple Objects (which we'll be via a 'layer' Integer Attribute) per slot (example of chest slot): naked<undershirt<shirt<jacket. This is quite more complex, but hey, why not, jump into it, hehe (if you want to learn to swim, jump into the deep end of the swimming pool! swim or drown~die, muwahaha!)
Neonayon wrote:(Object Name: player)
Attribute Name: Fingers_Slot
Attribute Type: objectlist
Attribute Value (add object): Naked_Fingers
^--- just curious
Attribute Type: objectlist
^---- did you mean "object" between stringlist and command pattern? And do I make the object "player"?
I'm still working on everything else you wrote. I also added both you and Pixie in the "thanks" page of my game too!
Pixie wrote:Don't show them that! They'll want a status pane like that next.
The Pixie wrote:"HegemonKhan"
oh, if you're unfamiliar with the concept of equipment~clothing~bodypart slots, here's an example (using Diablo 2 game):
http://classic.battle.net/images/battle ... ling01.jpg
now, we're trying to do the same thing with Quest, via Attributes (as quest is a text adventure game, not a 3d world movement graphical game, lol).
notice how in Diablo 2, you can only have one Object per slot.
You said want to be able to have multiple Objects (which we'll be via a 'layer' Integer Attribute) per slot (example of chest slot): naked<undershirt<shirt<jacket. This is quite more complex, but hey, why not, jump into it, hehe (if you want to learn to swim, jump into the deep end of the swimming pool! swim or drown~die, muwahaha!)
Don't show them that! They'll want a status pane like that next.
HegemonKhan wrote:I'm not quite sure what you're asking about... but...
HegemonKhan wrote:(Object Name: player)
Attribute Name: Fingers_Slot
Attribute Type: objectlist <------- so I'm wondering, which of those types objectlist it is.
Attribute Value (add object): Naked_Fingers
HegemonKhan wrote:My posts are very unclear and haphazard, as it's hard to do a guide as posts for me. It might be better if I make a sample game for you, as that would be easier for me to do, than trying to do it as coherant posts, which I fail miserably at. And then with that sample game, I can help you create the same system for your own game. I think this strategy would work better for me, to help you. As I'm really bad with using posts to help, unlike Pixie and Jay.
HegemonKhan wrote:Just been looking at how to do an 'Objectlist' Attribute in the GUI~Editor...
choosing 'stringlist' for your Attribute Type, doesn't work.
as far as I can tell, you can't 'add' an Objectlist Attribute in the GUI~Editor... (no idea why, argh)
so, either:
you got to set up your Objectlist Attributes via through scripting (using the GUI~Editor): run as script -> 'add a~new script' circle buttons
or, you got to just directly code in your Objectlist Attributes (not using the GUI~Editor: using code view ~ in-code)
HegemonKhan wrote:actually (sorry, as I mislead you with not explaining what I said in that previous post), you need to just delete those Attributes entirely, don't change them to Attrbute Type: scripts. DELETE them, delete these Attributes.
what I should have explained:
to create the 'slot' Objectlist Attributes for the 'player' Player Object, we'll have to use the 'start' Script in the 'game' Game Object, and it's a bit complex, so we're not going to set it up right now.
or, if you're confortable with writing in code, into your game code, then we can do it that way too (which will be much easier~simplier actually, lol).
----
I'm working on a sample game for you, it'll take a bit of time, as this is about at the limit of my ability, lol. I have to really think about it, and test it to get everything working.
-----
in the meantime... you can actually just literally use Chase's Wearables Library, setting up your clothing in the GUI~Editor, using the new 'Wearables' Tab (from Chase's Library) with your clothing Objects. Ask if you need help with implementing Chase's Library into your game, and~or with any part of Chase's Library's setup options~etc. (though if you also got Pixie's Library in your game... we'll need to deal with any conflicts)
(my sample game is really just a simplier but inferior re-creation in my own limited ability of Chase's Wearables Library, lol. So, I'm kinda re-inventing the wheel, in hopes that my way, my clothing system, is more simple to understand than Chase's, lol)
<object name="player">
<attr name="chest" type="objectlist">undershirt;shirt;jacket</attr>
<attr name="waist" type="objectlist">boxers;pants;belt</attr>
<attr name="feet" type="objectlist">socks;shoes</attr>
<attr name="face" type="objectlist">glasses</attr>
<attr name="pets" type="objectlist">dog;cat;bunny;bird;snake;tarantula;lizard;hamster;mouse</attr>
</object>
<attr name="pets" type="stringlist">
<value>dog</value>
<value>cat</value>
<value>bunny</value>
// etc Values
</attr>
"HegemonKhan"]creating an Objectlist Attribute in code is very easy (right click on your game file and open your game file with notepad, wordpad, notepad++, text editor, etc, to ensure you're seeing your full~entire game code)
for example, giving an Objectlist Attribute to the 'player' Player Object:
<Element_name name="Attribute_name" type="Attribute_Type_name">object_1_name; object_2_name;etc</Element_name>
<attr name="xxx" type="objectlist">xxx1;xxx2;xxx3;etc</attr>
example:
<attr name="family" type="objectist">mom;dad;sister;brother;son;daughter</attr>
-----
'attr' is used, like 'int', as Alex didn't want us having to write out 'attribute', nor 'integer', lol.
-----<object name="player">
<attr name="chest" type="objectlist">undershirt;shirt;jacket</attr>
<attr name="waist" type="objectlist">boxers;pants;belt</attr>
<attr name="feet" type="objectlist">socks;shoes</attr>
<attr name="face" type="objectlist">glasses</attr>
<attr name="pets" type="objectlist">dog;cat;bunny;bird;snake;tarantula;lizard;hamster;mouse</attr>
</object>
Neonayon wrote:This is where coding becomes difficult because I already have a bunch of files and codes in my game since I'm not starting completely over. So the question I would have is...where do I put this line of code in my game?
If I could figure out where to place stuff, I wouldn't be nearly as scared to edit in code, but if I get something wrong, the game will crash and Quest wouldn't open it anymore, and I'd have to seek it out in the editor of where it went wrong, how to fix it, or remove it to restore all that work back to working order.
<object name="player">
neonayon wrote:This is where coding becomes difficult because I already have a bunch of files and codes in my game since I'm not starting completely over. So the question I would have is...where do I put this line of code in my game?
If I could figure out where to place stuff, I wouldn't be nearly as scared to edit in code, but if I get something wrong, the game will crash and Quest wouldn't open it anymore, and I'd have to seek it out in the editor of where it went wrong, how to fix it, or remove it to restore all that work back to working order.
<asl version="550"><include ref="English.aslx" /><include ref="Core.aslx" /><game name="xxx"><gameid>xxx</gameid><version>1.0</version><firstpublished>2015</firstpublished></game><object name="room"><inherit name="editor_room"><object name="player"><inherit name="editor_object" /><inherit name="editor_player" /></object></object></asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<xxx xxx="xxx">
xxx
</xxx>
<xxx>xxx</xxx>
<xxx xxx="xxx">xxx</xxx>
<xxx xxx="xxx" />
~OR, a bit more descriptively for you ~
<xxx xxx="xxx">
content
</xxx>
<xxx>content</xxx>
// this is also a shortened form of specifically~only: String Attributes
<xxx xxx="xxx">content</xxx>
// this is the full form (aka the normal) syntax
<xxx xxx="xxx" />
// this is understood content (and thus has this unique shortened form seen above): its a Boolean Attribute with the Value of true
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<asl version="550">
xxx
</asl>
<game name="xxx">
xxx
</game>
<object name="room">
xxx
</object>
<object name="player">
xxx
</object>
<include ref="English.aslx" />
<include ref="Core.aslx" />
<gameid>xxx</gameid>
<version>1.0</version
<firstpublishd>2015</firstpublished>
<inherit name="editor_room" />
<inherit name="editor_object" />
<inherit name="editor_player" />
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<asl version="555"> // beginning~top code line of the 'asl' block
xxx
</asl> // ending~bottom code line of the 'asl' block
<asl version="550"
// your mass of game code
</asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<object name="orc">
</object>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<object name="orc">
</object>
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="orc">
</object>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
<object name="orc">
</object>
</object>
</asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
<object name="orc">
</object>
</asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="orc">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</object>
</asl>
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<object name="orc">
</object>
</object>
</object>
</asl>
<start type="script">
msg ("I'm learning to read and write code! HK is so awesome!")
</start>
<pov_look type="script">
msg ("Neonayon is a very pretty and nice~sweet girl, who loves nekos, and she probably has 20 pet cats living with her, yikes!")
</pov>
[code]<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<function name="name_function">
msg ("What is your name?")
get input {
name_variable = ToString (result)
msg ("Your name is {name_variable}.")
show menu ("Is this indeed your name?, split ("yes;no", ";"), false) {
if (result = "yes") {
player.alias = name_variable
msg ("Ah, so {player.alias} is your name. Now I got another question for you...")
} else if (result ="no") {
msg ("No, hmm, then let me ask you again...")
name_function
}
}
}
</function>
<function name="name_function">
</function>
msg ("What is your name?")
get input {
name_variable = ToString (result)
msg ("Your name is {name_variable}.")
show menu ("Is this indeed your name?, split ("yes;no", ";"), false) {
if (result = "yes") {
player.alias = name_variable
msg ("Ah, so {player.alias} is your name. Now I got another question for you...")
} else if (result ="no") {
msg ("No, hmm, then let me ask you again...")
name_function
}
}
}
3.<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="orc">
</object>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
6.<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room">
<object name="orc">
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</object>
</asl>
The Pixie wrote:
If you are editing stuff in libraries, of course, you do not get the choice.
Have said all that, the GUI does not support object lists... So you will have to go in code. This bit will already be there somewhere, so do a search for "player":
Code: Select all
<object name="player">
You can insert the next five lines directly after that. Do not include the last line, the object end tag, as that will already be there too.
I. <asl version="550">
A. <include ref="English.aslx" />
B. <include ref="Core.aslx" />
C. <game name="xxx">
1. <gameid>xxx</gameid>
2. <version>1.0</version>
3. <firstpublished>2015</firstpublished>
C. </game>
D. <object name="room">
1. <inherit name="editor_room">
2. <object name="orc">
3. <object name="player">
a. <inherit name="editor_object" />
b. <inherit name="editor_player" />
3. </object>
2. </object>
D. </object>
I. </asl>
HegemonKhan wrote:I'm still having trouble making an equipment system sample game for you, speaking of 'argh', laughs. I bit off a bit more than I can chew, I decided to ditch my first attempt at it, trying to start over from scratch. You might want to try to get help from others, as I'm struggling with this equipment stuff.
I'm trying, but equipment is still seemingly beyond my ability. I can do individual and simple parts of equipment coding... but I really have trouble trying to put together a system. This is where I'm really stuck in my code learning progression, sighs. Ya I get how the individual gears work and how to use them and etc, but when I try to make a clock, it takes more knowledge than just that basic individual gears knowledge, sighs. A clock truly is more than its parts, as it's a big complex system, whereas the gears are not, laughs.
RemoveObject (rickety_machete)
player.equipped = "fist"
UpdateWeapon
ClearScreen
I think... just remove the double quotes from your Attribute's Value:
change from:
player.equipped = "fist"
change to:
player.equipped = fist