SOLVED: Suggestions Appreciated! ((Text Processor+Wearables Library)) Question!

Anonynn
Okay! So I recently discovered how to insert clothing descriptions (text processor style) into the player descriptions ((as a Script)), but I'm a little confused at the syntax I need to put when the player is NOT wearing clothing there. This is from the "Wearables Library" by Chase.

Anyway, in the player description...I have something like..

You have a flat, muscular chest, which is covered by {if plain_black_shirt.worn:a plain black shirt}{if long_black_shirt.worn:a long black shirt}

The player can only wear one of those at a time.

The syntax for not wearing is this... {if not plain_black_shirt.worn:}

So, the big dilemma is how do I say {if not plain_black_shirt.worn:nothing at all}{if not long_black_shirt.worn:nothing at all} without it looking like this...

You have a flat, muscular chest, which is covered by "nothing at allnothing at all" etc for all the variables of clothing I have.

Any suggestions?

HegemonKhan
This setup~design isn't the best to start with, as this is going to be really annoying if you have lots of clothing items to code for individually...

-----------

Unfortunately, I think you're much more limited with the text processor commands, I don't think this would work, but you could try these various things:

msg ("You're wearing a {if shirt.worn: shirt} {if blouse.worn: blouse} {if not (shirt.worn and blouse.worn): nothing} .")
~ OR ~
msg ("You're wearing a {if shirt.worn: shirt} {if blouse.worn: blouse} {if ({not shirt.worn} or {not blouse.worn}): nothing} .")
~ OR ~
some fancy concatenation... not sure how it would look though, see Pixie's (with Jay's help) "level lib" library file~code

--------------

Using your design... you might want to use the [script] option for your player description, and use the 'if' scripts instead of the text processing commands:

msg_NoTextBreak_thingy ("You are wearing a ")
if (shirt.worn) {
msg ("shirt.")
} else if (blouse.worn) {
msg ("blouse.")
} else {
msg ("nothing")
}


-----------

another trick that you may not be aware of, is using string concatenation:

the basic concept of how concatenation works:

(using a Variable 'my_string' as an example, you may want to use an Attribute instead, such as for this example: 'game.my_string', not 'my_string')

my_string = "The "
// my_string = "The "

my_string = my_string + "cat, "
// my_string = "The cat, "

my_string = my_string + "named "
// my_string = "The cat, named "

my_string = my_string + "Garfield, "
// my_string = "The cat, named Garfield, "

my_string = my_string + "is "
// my_string = "The cat, named Garfield, is "

my_string = my_string + "fat."
// my_string = "The cat, named Garfield, is fat."

but you can take this concept and apply it for some really cool uses, for example (not one of the cool uses... I'm still a bit of a noob with concatention myelf, something more neat that Jay, Pixie, Pertex, and etc good coders can do with concatenation would be a cool use, lol):

game.my_string = "You are wearing a "
if (shirt.worn) {
game.my_string = game.my_string + "shirt."
} else if (blouse.worn) {
game.my_string = game.my_string + "blouse."
} else {
game.my_string = game.my_string + "nothing."
}
msg (game.my_string)


----------

a better setup~design, would involve using lists and dictionaries, and etc other advanced stuff.

Anonynn
What you said is way above my paygrade. I don't get any of that xD I already have the player description as a "Script" though.

I actually almost had it with this...

{If plain_bra.worn:You are covered with a plain bra}{If plain_black_shirt.worn:{if plain_bra.worn:and }{If not bra.worn:You are covering them with} a pink apron.}

But the {If not bra.worn:You are covering them with} was appearing all of the time.

UPDATE
SOLVED IT!!!

{if player.gender=male:{random:pecks:man-bewbs}}.{if plain_bra.worn: You are wearing a plain bra.}{if pink_apron.worn:..and you're covering them with a pink apron.}

Now I don't have to account for the "not" ---- Appreciate the help, HK!

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

Support

Forums