Condom - Function, Variables and Values
netuttki a editat această pagină 2 ani în urmă

Functions, variables and values


Values

Condom Types

Condom Type Description
safe The default condom, no holes poked into it, wasn't left on the sun for a week, etc. Prime condition, fresh from the package.
defective Looks just like a safe condom, but for some reason - manufacturing error, too old, stored incorrectly, etc. - it is more prone to tear, burst, slip during use. However, if it doesn't get damaged, it still provides normal protection. Whenever Sveta buys condom there is (small) a chance that one of the condoms will be defective.
sabotaged_known A condom that Sveta carefully perforated, so it provides no protection against either pregnancy or STDs.
sabotaged_unknown A condom that someone perforated, basically the same as sabotaged_known the only difference is that Sveta thinks it's safe and will use as such.
none No condom - this one is only used to make mark when Sveta doesn't wear a condom during a scene. This will enable us to set up the condom use before everything else, and then all the "Does the guy wear a condom?" questions can be decided by used ! 'none' "

Condom Preferences

Condom Preference Description
safe Sveta will use only condom that she thinks is safe (i.e. type of safe, defective or sabotaged_unknown
sabotaged Sveta will use sabotaged condoms if possible. If not then she will use a normal one as it would be strange if she demanded the use of condom then went without one because "I can't find the right type"
none Sveta will avoid the use of condom whenever possible.

Variables

Condom specific

Variable Values Value Type Description
condom['safe'] 0+ integer The number of safe condoms Sveta has
condom['defective'] 0+ integer The number of defective condoms Sveta has
condom['sabotaged_unknown'] 0+ integer The number of sabotaged_unknown condoms Sveta has
condom['sabotaged_known'] 0+ integer The number of sabotaged_known condoms Sveta has
condom['total_count'] 0+ integer The total number of condoms Sveta has: condom['safe'] + condom['defective'] + condom['sabotaged_unknown'] + condom['sabotaged_known']
condom['total_safe_count'] 0+ integer The total number of condoms Sveta considers safe: condom['safe'] + condom['defective'] + condom['sabotaged_unknown']
$condom['preference']
  • safe
  • sabotaged
  • none
string Which type of condom Sveta will use first if possible
condom['blocked']
  • 1
  • 0
integer Whether the use of condoms (i.e. the ones owned by Sveta) as blocked or not
condom['breakchance'] 0+ integer The modifier of the defective type condom that increases the chance that the condom breaks, bursts or slips off
$condom['used']
  • safe
  • defective
  • sabotaged_known
  • sabotaged_unknown
string The type of condom being used in the scene

Variables set by the use condom functions, used by cum_call, cum_manage

Variable Values Value Type Description
noprotect
  • 1
  • 0
integer If the value is 1 there is no condom protection, if it's 0 there is.
protect
  • 1
  • 0
integer if the value is 1 there is condom protection, if it's 0 there is none.
sexcontra
  • 3
  • 6
  • 7
integer Concaptretion type and status used.
  • 3 - Condom. Condoms can still fail via the code. (break, burst, slip off), i.e. safe, defective
  • 6 - the condom was Sabotaged but Sveta doesn''t know that, i.e. sabotaged_unknown
  • 7 - the Condom was Sabotaged by the main character., i.e. sabotaged_known

noprotect and protect are the exact opposites of each other in value, but they mean the exact same thing otherwise. However some code checks for noprotect and some code checks for protect. In the long run, this should be corrected and we should pick and use only one of them.


Functions

Buying, adding, removing and counting condoms

buy_condom

Buys the specified number of condoms. Also use it if someone gives condoms to Sveta as 'gift' - basically simulating the NPCs purchase.

Arguments Description Type Accepted Values
$ARGS[1] The risk level of the seller. This will define the likelihood of receiving a defective condom with the purchase. string
  • low: pharmacy
  • medium: dispenser at the gas station where prostitutes work, marketplace
  • high: dispenser that is not emptied too frequently, like trainstation, or a dodgy seller.
$ARGS[2] The number of condoms bought integer 0+

Use this whenever Sveta buys or receives condoms from someone else like Aunt Luna or Mum. Don't use it if you want to pass sabotaged condoms to Sveta. There is a chance that the batch will contain a defective condom.

Risk Level Chance
low 1:1,000 (0.1%) multiplied by the number of condoms in the batch
medium 5:1,000 (0.5%) multiplied by the number of condoms in the batch
high 10:1,100 (1.0%) multiplied by the number of condoms in the batch

Although these numbers are not fixed yet, the concept is the same even with different percentages.

add_condom

Adds the specified number of condoms of the specified type.

Arguments Description Type Accepted Values
$ARGS[1] The type of the condom string
  • safe
  • defective
  • sabotaged_known
  • sabotaged_unknown
$ARGS[2] The number of condoms added integer 0+

Use when a specific type of condom has to be given to Sveta because the scene or story requires it. For example this is how an NPC can give Sveta pack of sabotaged condoms - sabotaged_unknown .

Don't use when Sveta buys condoms or someone without any hidden motives gives her a pack of purchased condoms. Unless you want to ensure that the condoms are all safe - for example, they just came out of some magical quality control.

remove_condom

Removes the specified number of condoms of the specified type.

Arguments Description Type Accepted Values
$ARGS[1] The type of the condom string
  • safe
  • defective
  • sabotaged_known
  • sabotaged_unknown
$ARGS[2] The number of condoms removed integer

Use when a specific type of condom needs to be removed without being used. For example Sveta reviewed her extensive condom collection she built as a Durex Mascot of 2017, inspecting the condoms and their packaging for damage, and removes all the sabotaged condoms, whether she poked the wholes or someone else.

empty_condoms

Clears out the condoms, every condom type is set to 0 along with the totals.

Use it when Sveta loses all her condoms for some reason. Currently it's a simple killvar but placed it inside a function for two reasons:

  1. To motivate people to not try to implement all kinds of logic to set the total condom inventory to zero
  2. To motivate peoplt to not use killvar with the condom variables
  3. To enable the implementation of any additional of special logic that may come up while not forcing any changes to the codes that just use the condom funcionalities.

condom_count

Returns the total number of codoms availabe for Sveta while taking every relevant factor into consideration. Currently it checks for condom preference, and if the preference is sabotaged then it returns the total that includes every condom type while for safe it returns the total that excludes the number of sabotaged_known type condoms. Call it as a function and the result will hold the appropriate condom count.

func('shortsg', 'condom_count')`

update_condom_totals

An internally used function that recalculated the totals for the safe (as far as Sveta is concerned) condoms and the total that includes the sabotaged_known type condoms too. It is called every time the condom inventory is updated.

Calling this doesn't cause any issues, but it is really pointless at the same time.

block_condom - marked for deletion

Sets a flag that can be used to prevent the use of condoms.

Arguments Description Type Accepted Values
$ARGS[1] Turning the block ON or OFF integer
  • 1 - turns the block ON
  • 0 - turns the block OFF

There can be scenes where Sveta for some reason should have access to her treasured condom collection for some reason. One example that comes to mind is the gas station abduction, where currently all the condoms are saved into a temporary variable, then when Sveta escapes or is sold, the content of the temporary variables are copied back to the original variables. A much simpler solution is to just set blocked to 1 (true) while the situation persists, and then set it back to 0 (false). However, I don't really see it as extremely useful as the condom use is driven by the scenes and whoever wants Sveta lose access to their condoms can simply just write scenes in a way that there is no way for Sveta (or the player) to use condoms. I will probably delete this.

Using and manipulating condoms

use_a_condom

This will provide all the necessary information that are needed by other functions to properly sense that a condom is used during the scene and what are the relevant prooerties of the condom.

Arguments Description Type Accepted Values
$ARGS[1] Enables or overrides the effect of the no condom preference string
  • ''
  • 'forced_condom' - overrides the none condom preference and forces Sveta to use a condom
$ARGS[2] The person providing the condom in the scene string
  • '' - Sveta provides the condom
  • 'pc' - Sveta provides the condom
  • 'npc' - the NPC provides the condom
$ARGS[3] The personality of the NPC. This defines a chance that the NPC is an asshole and uses a sabotaged condom just for fun string
  • '' - a nice NPC, never sabotages a condom
  • 'nice' - a nice NPC, never sabotages a condom
  • 'malicious' - a minor asshole (10% chance),
  • 'saboteur' - Deliberately tricking girls with sabotaged condom (100% chance)

This is the preferred method to use a condom. It picks the right type of condom based on Sveta's preferences, available condoms, or in the case of NPCs based on the personality of the NPC.

After then function is execued the following will have been set up:

noprotect and protect values defining whether Sveta is protected during the scene sexcontra value defining the level of contraception provided by the condom used breakchance value for the defective condom that will increase the chance of the condom breaking, bursting or slipping off. used value to make the exact type of the condom available for the duration of the scene (so Sveta can realise the condom was sabotaged, for example). Adjusted the number of condoms for the correct type.

In addition, this is where all the variables that depend on the use of a condom should get their values. The goal is that when writing a scene, all the write will have to do is call gs 'shortgs', 'use_a_condom' and nothing else, no decreasing condom stock levels, defining contraception level and type, nothing. Everything is done by this function (and the other functions it may call).

condom_preference

Sets the preference for the type of condom used.

Arguments Description Type Accepted Values
$ARGS[1] The condom type as preference. string
  • sabotaged - the deceitful little nymph
  • safe - sane, safe, and aves tons on doctor
  • 'none' - Sveta prefers the raw experience

While this function just covers a variable, I have no idea what logic we may link to this in the future, and then the only place that will need to be changed is this function.

sabotage_condom

Turning condoms into rubber sieves with the use of a pin. Creates sabotaged_known type condoms.

Arguments Description Type Accepted Values
ARGS[1] The number of condoms that will be sabotaged integer

Will create the specified number sabotaged condoms, using the "assumed safe" condom types, i.e. safe, defective and sabotaged_unknown randomly.

More specific, low level condom use functions

These functions should be used only in specific events, when the story requires that some specific outcome happens.

use_a_safe_condom

The effect is the same as the [[Condom - Main functions and their logic#use_a_condom |use_a_condom]] function but it limits the selection to the following types: safe, defective, sabotaged_unknown

Arguments Description Type Accepted Values
$ARGS[1] Defines who provides the condom string
  • '' - Sveta
  • 'pc' - Sveta
  • 'npc' - the NPC in the scene

It avoid any check the that [[Condom - Main functions and their logic#use_a_condom |use_a_condom]] function uses (like Sveta's preferences) so occasionally can be useful.

use_a_sabotaged_condom

The effect is the same as the [[Condom - Main functions and their logic#use_a_condom |use_a_condom]] function but it uses only sabotaged_known type condoms. For this reasons it's important to check if Sveta has any of that type before calling this function.

Arguments Description Type Accepted Values
$ARGS[1] Defines who provides the condom string
  • '' - Sveta
  • 'pc' - Sveta
  • 'npc' - the NPC in the scene
Similarly to the *[[Condom - Main functions and their logic#use_a_safe_condom use_a_safe_condom]]* function it skips any checks and picks straight from the sabotaged condoms.

Depending on the value of $ARGS[1] the returned sexcontra value will be different, the condom provided by NPC counts as a sabotagedd_unknown while the one provided by Sveta counts sabotaged_known type. The former is a surprise, the latter isn't.

use_a_specific_condom_type

This function an extended version of the above ones, as it uses a specific type defined by an argument.

Arguments Description Type Accepted Values
$ARGS[1] Defines who provides the condom string
  • '' - Sveta
  • 'pc' - Sveta
  • 'npc' - the NPC in the scene
$ARGS[2] Defines the type of condome used string
  • 'safe'
  • 'defective'
  • 'sabotaged_unknown'
  • 'sabotaged_known'

This function is really should be used in very certain situations - for example, Sveta is sent to entertain a group and she has to use the condoms that are provided by the host, and all of them are sabotaged condoms. Or Sveta is hypnotised to always pick her sabotaged condoms even if her preference is safe. Specific, required by the story scenarios, this function should be used rarely, but at times it can be necessary.

use_no_condom

Just for consistency, by implementing this we can set all the required variables same way as if a condom was used and we have everything in one place regarding the use of condom (no condom is one of the way to use them)

When calling [[Condom - Main functions and their logic#use_a_condom]] and Sveta's prefernce for condoms is none, this is the code that is executed. Unless the forced_condom argument is used.