[v1.7.0+] The Black Bikini

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Zizzo
Sher'Tul Godslayer
Posts: 2467
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

[v1.7.0+] The Black Bikini

#1 Post by Zizzo »

Okay, this one is a complete lark. :mrgreen: :mrgreen: :mrgreen: It has two inspirations:
  • Shotray's Powerful Bikini addon, which gives your starting bikini/mankini the stats of Black Robe. That struck me as overpowered in a silly way, but it got me thinking: what about an actual artifact bikini with Black Robe stats?
  • And speaking of Black Robe, it always seemed to me that it should be one of the Obsidian Treasures like the Black Wall or the Black Crown, and I'm always vaguely disappointed when I rediscover that it isn't.
So I put those two ideas together and made a new addon, The Black Bikini, which does exactly what it sounds like. :wink: The Black Bikini should drop like a normal artifact, I think around where Black Robe would start dropping (I'm definitely not going to have Rak'shor wearing it :shock: ), and it will automatically change itself on creation to The Black Mankini if found or worn by male characters. And if you have Ashes enabled, both Black Robe and the Black Bikini will gain +5 Shadow Power and defense proportional to your total Shadow Power.

(And no, obviously this one isn't going into ZOmnibus. :twisted: )

[Implementation notes:]

Code: Select all

Hooks:
  Entity:loadList [to load our Black Bikini definition]
  ToME:‍PlayerDumpJSON [to clean up charsheet on the way out]
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2467
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.7.0+] The Black Bikini

#2 Post by Zizzo »

Frequently Asked Questions:

Do you get an achievement for winning the game while wearing this bikini?

…no? :? Obviously you didn't start the game wearing this artifact, and it's significantly more powerful than a normal bikini or mankini, which kind of defeats the "challenge" aspect of the achievement.

Why can't I put the Black Bikini in the items vault?

The Black Bikini/Mankini object itself requires a bit of support from the addon, such as the character doll image and special handling for the online character sheet (about which more below). Using the items vault to move the Black Bikini/Mankini to another character that doesn't have this addon enabled would probably break badly, so we block it from the items vault to avoid the problem.

Hey! The Black Bikini isn't showing up right on my character sheet!

That's unavoidable, unfortunately. The characters vault on te4.org obviously doesn't know about our custom images for the Black Bikini/Mankini, and in their absence the character doll image on your online character sheet would probably end up naked. While we suppose that might appeal to some, :| we prevent it by modifying the character sheet for export to the server, replacing our custom bikini/mankini graphics with the corresponding default graphics. We Apologize for the Inconvenience.™
"Blessed are the yeeks, for they shall inherit Arda..."

astralInferno
Uruivellas
Posts: 829
Joined: Mon Jan 27, 2014 10:40 am

Re: [v1.7.0+] The Black Bikini

#3 Post by astralInferno »

...I wonder what happens with this item if the player character changes gender... xD

Zizzo
Sher'Tul Godslayer
Posts: 2467
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.7.0+] The Black Bikini

#4 Post by Zizzo »

astralInferno wrote: Tue Jun 04, 2024 6:40 pm ...I wonder what happens with this item if the player character changes gender... xD
:shock: :shock: Wait, can that actually happen? Can it be detected?
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2467
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.7.0+] The Black Bikini

#5 Post by Zizzo »

Small improvement in v1a: we hook into Sandworm Cavern SONAR's new chat dialog hook to arrange for suitable snarky commentary from our plot item provider if the player is wearing The Black Bikini or The Black Mankini. :mrgreen:
"Blessed are the yeeks, for they shall inherit Arda..."

astralInferno
Uruivellas
Posts: 829
Joined: Mon Jan 27, 2014 10:40 am

Re: [v1.7.0+] The Black Bikini

#6 Post by astralInferno »

Zizzo wrote: Thu Jun 13, 2024 4:17 pm
astralInferno wrote: Tue Jun 04, 2024 6:40 pm ...I wonder what happens with this item if the player character changes gender... xD
:shock: :shock: Wait, can that actually happen? Can it be detected?
It can't happen without mods, but it's actually really easy to do, codewise. Because the tile is created automagically based on race_gender, if you change the listed gender and then call updateModdableTile, the tile will change accordingly.

...I was gonna say there'd be no way to detect it but actually maybe you could detect it in updateModdableTile?

I'm not sure how worth it this is, I'm only aware of one mod that can cause it to occur (...unsurprisingly, it's mine. It's a game option for the werewolf race), and it's a niche thing there, too.

Zizzo
Sher'Tul Godslayer
Posts: 2467
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.7.0+] The Black Bikini

#7 Post by Zizzo »

astralInferno wrote: Sun Sep 29, 2024 2:18 am It can't happen without mods, but it's actually really easy to do, codewise. Because the tile is created automagically based on race_gender, if you change the listed gender and then call updateModdableTile, the tile will change accordingly.

...I was gonna say there'd be no way to detect it but actually maybe you could detect it in updateModdableTile?

I'm not sure how worth it this is, I'm only aware of one mod that can cause it to occur (...unsurprisingly, it's mine. It's a game option for the werewolf race), and it's a niche thing there, too.
[sound F/X: searching] I assume you're referring to the Lunar race from your Inferno Race Pack. [sound F/X: sound F/X: source diving] Ah, the Moonlit Dance effect. Well, right off the bat, I see what looks like a bug: the method's .activate() and .deactivate() methods are setting the player's sex descriptor to the (apparently undefined) variables male and female, rather than the strings "Male" and "Female", leaving the player with an effectively nil sex descriptor; in that state, I think The Black Bikini will always show in bikini mode. :? Fortunately, you're using the 'ogre_#sex#' moddable tile set for lupine mode, and the ogre_male set for The Black Bikini has both bikini and mankini images (the former amounting to basically a bikini bottom).

But with a temporary fix in place for that, it turns out to be easy enough to hook into Actor:updateModdableTile() and transform The Black Bikini into The Black Mankini and vice versa if we detect a sex change. I can push out that update once you've fixed the above bug. (Looks like Thorn Bikini and Spider Bikini will need similar modifications.)
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply