Coding Additions

From Flexible Survival
Jump to: navigation, search

This page still needs to be created. It will contain general information on how to create your own content for the game, setting up Inform 7 and GIT, etc... For now, here are some links and general tips that will probably be broken down into sub-pages as this section is built up.

UPDATE - Jan 30/13 I have been adding and will continue to add explanations and guides for coding specific aspects into the game. The content here is still a good primer on the basics of player infection and monster data before you move on to these other documents. The forum thread containing those, which starts with a link set to the various posts and to other threads dealing with such data can be found HERE

Setting up Inform7 and Git: Check out my outline on the Dev board here: Inform7 and Git GUI Putting Inform7 and Git on your computer aren't necessary for simple projects, but you'll want to be able to beta-test your own creations if they're elaborate in any way.

Please Note: If you don't feel capable of coding the additions you want to make, but are able to write the content for the scenes/creatures, these can be forwarded to NukuV or the game developers and put into the game. More complex creations are harder to do this way, as there is more variations and content to write and parts may get missed and have to be filled in by the developer, making it more difficult.

Getting started:

  • Begin with some basic ideas. I recommend a simple creature to start. Use the template that has been made as a basis. It contains some examples of how to use if statements with for different results to account for player gender, libido and so on. Shuffle them around as needed.
  • Look at a couple of other creatures which use a similar mechanic to what you want to create. With over 100 creatures in the game, there is a lot of variations you can look over and draw techniques from.
  • If a creature does something unusual, play out a few variations with it in the game to see what happens. Then take a look at its code to see what may be prompting those to occur. I recommend playing with the creatures first so you don't ruin the surprise of experiencing it first hand.
  • Putting out partially completed content is acceptable, but should be done when there is a good portion of gameplay available. If that event or character has some gameplay ready to go and a hint of more to come, then it adds to the game. As some content can be quite large, it is reasonable to put it out in this manner so it can be enjoyed while the next section is being prepared. Notes mentioning where content is forthcoming are appreciated as it cuts down on a player's frustration with trying to accomplish a goal or bed an NPC which doesn't have that part ready yet.
  • Learn the basic player and monster properties and what they mean and how they can be utilized. The template is a good starting guide for this, but here is some more information:
    • The player's body parts are controlled by these main attributes. The names of the sections are saved as 'facename', 'bodyname', 'skinname', 'tailname' and 'cockname' of player. The appearance of these parts are 'face', 'body', 'skin', 'tail' and 'cock' of player. They must always be referred to as 'facename of player' and 'tail of player' when using them in the code, to specify that you are referring to the player character.
    • The player's gameplay stats such as 'libido', 'morale', 'hunger', 'thirst', etc... can also be read/manipulated. These must also be referred to as 'libido of player' in the code when used. These can be checked using if statements to make branching results. They can also be adjusted by the events occurring in a scene. When adjusting these, make sure to keep the adjustments reasonable to level of effects in the game while still achieving your desired effect. Add a statement like ' if libido of player > 100, now libido of player is 100; ' or ' if libido of player < 0, now libido of player is 0; ' when making these manipulations to keep the results within the normal limits. Check what adjustment other similar or equivalent effects have on the player to help you scale your effects accordingly.
    • For monsters, they are all listed as part of a table, known as the 'table of random critters'. Some creatures, events and effects specifically call up the table to select a random or specific creature from it. This is what the fights and infection sources do, by calling up a random or specific creature and then running operations based on the various table entries.
    • Some entries of note are the 'name entry' which gives the creatures name and is the main way to call it up from the table if needed. It is also what is copied into the player's various body part name variables when infection occurs. The 'face entry', 'body entry', 'skin entry', 'tail entry' and 'cock entry' contain the description of that strain's infection on that specific body part. It is what a player will see in their description when they look at themselves. Those entries are formatted to mesh into existing sentences, so take care with the formatting specifics of each one. The 'face change entry', etc... are the descriptions of how that body part is changing when an infection occurs. Again, these are attached to pre-existing phrases and so formatting them to match is important to get a properly looking transformation.
    • The various stat entries (str entry, dex entry, etc...) represent these stat values upon the creature. Most are not currently used, but are still necessary for several reason. They are beginning to be used in the alternate combat system. For these values, please keep in mind that 10-11 is meant to be human average and a player's specialized starting stat will be 17. A player's stats will also be moved towards these if they use the 'Mighty Mutation/Bestial Power' feats or gains the Shifting ability.
    • The hp entry, lev entry and wdam represent the monster's starting hit points, it's level and average damage (80% to 120% of this number at random each hit). If possible when adding a new monster to an area, look to find a level suitable for your creature which will also fit well with the levels/genders of the other creatures around it. Having a even variety of levels makes the game more balanced than having the creatures clustered at a few power levels or having large gaps between them. Mixing the gender/levels allows for strong/weak creatures of the various genders to be found more evenly and ensures those playing with a gender blocked to still find a fairly good spread of monsters to encounter.
    • The sexual transformation related variables can be used in several combinations. The basic value, the 'sex entry' represents the gender the monster is trying to make the player through infection ("Male", "Female or "Both" - with that formatting). This does not have any relation to the gender of the creature itself, which is simply represented by the various descriptive text entries. If the 'sex entry' is "Male", then only the cock-related entries are used. Similarly, if "Female" is used, then the breast and cunt specific entries are used. If "Both", then the cock, cunt and breast entries are all utilized. Where this knowledge comes in useful is below in the 'Advanced Techniques' section.
    • The 'cocks entry' and 'cunts entry' represent the number of these organs which the creature will try to give the player. They need to be at least 1 if pushing the player towards that gender. The width and length entries are representative of inches in size, so keep that in mind when selecting their values. The 'cock width' is a special value, as its was re-purposed into being the size the player's balls will grow towards (and cum output thereof for some scenes). A value of 3-5 is considered average in the game, with 6-11 being lemon-sized, 12-15 being orange/baseball-sized, 16-19 is grapefruit-sized and larger than that is cantaloupe-sized. The breast sizes count up in cup size from 1 for an A-cup, 2 for a B-cup and so on, maxing out at 26 for an impossibly huge Z-cup.
    • The libido entry is the minimum level of lust a player will move towards from infection by a creature. If their libido is below this value, their libido will go up by roughly a third of the difference between the two values. If they are over this number, they remain above it.
    • The loot entry and lootchance entry affect monster drop items. If the creature has no drop item, leave the loot entry as ""; (blank) and the lootchance at 0.
    • A new set of table entries were created to the table of random critters, expanding the scope of creature content. Here is a quick summary of them, though much greater detail can be found in the BFandI file in the code repository.
      • The 'scale entry' gives a loose value for the player's body size when they possess this infection, ranging from 1=tiny to 5=huge, with 3 as the default average. This is mainly a function of height, though fat, hypermuscled or tauric forms may be boosted up one value (still maxing out at 5). It gets saved on the player as 'scalevalue of player', but can also be outputted as a size adjective using 'body size of player'. While it can also be used to measure the creature's size, in cases where the infect player's size and the creature's size differ, this value is most properly the player's scale. A loose breakdown of the sizes is as follows:
Value rough size adjective
1 ~3 ft or less tiny
2 4-5 ft in height small
3 5-7 ft in height average
4 8-12 ft in height large
5 12+ ft in height huge
      • The 'body descriptor' is a one-word adjective meant to describe an infected player's body. It gets saved on the player as 'bodydesc of player' and can be used in scenes to better showcase the player's altered form. It deals with the overall build of the character and non-species related factors. Examples include: fat, muscled, fit, burly, chubby, hump-backed, pot-bellied, slender, bony, twisted, deformed, winged, etc... As stated, this should be a one-word adjective so it can consistently be placed into scenes, though manipulations such as [one of]fat[or]chubby[or]plump[at random] is perfectly acceptable to increase the variety. Doing this will make one of those three words appear each time 'bodydesc of player' is used. If-conditions are trickier, as they'll work fine for the player during scenes, but won't be transferred properly onto an NPC if such an event occurs. Again, as with the 'scale entry', this value could be used to describe the creature in a few cases, but it is more specifically represents an infected player's form and if the two are different, this value should be coded with the player's form in mind.
      • The 'type entry' is a one-word adjective also meant to describe an infected player's body, saved as 'bodytype of player'. This value deals with the type of creature a character has become. Examples include: human, human-like, feline, canine, vulpine, lupine, robotic, cyborg, human, humanoid, demi-human, dwarven, simian, etc... Again, this should be just one word, adjective entries, but use of [one of]equine[or]horse-like[at random] to create greater diversity is fine. If-conditions are trickier, as they'll work fine for the player, but won't if transfered onto an NPC.
      • The 'magic entry' is a truth state (saved as true or false) to describe whether this creature is a magical-type creature or not. There are no immediate plans for its use, but it may be of use later. An unset creature is treated as non-magical.
      • The 'resbypass entry' is a truth state (saved as true or false) to designate whether this infection is capable of bypassing a researcher's infection protection. This should be ultra-rare and should have a good reason for occurring, such as non-nanite based infected.
      • The 'non-infectious entry' is a truth state (saved as true or false) to designate whether this creature cannot cause infection. It can eventually be used for non-infectious creatures such as soldier enemies, military robots, etc... and a few critters. It is also useful for blocking a creature (permanently or temporarily) from being a source of random infection and from being copied using the Shifting ability.
      • The 'nocturnal entry' is a truth state (saved as true, false or blanked out) to designate whether this creature is nocturnal (true) or diurnal (false). Nocturnal creatures will only be available for encounters during the night. Diurnal creatures will only be available for encounters during the night. An unset creature is treated as the normal case, able to be found both during the day and the night. As such, this variable will most often remain blank.
      • The 'altcombat entry' is an entry used to detect whether the creature has any special behaviour during combat. See the Alt Combat document for the updated combat system. An unset creature is treated as using the 'default' combat system. More on this may later appear in the Super-Advanced Techniques section.

Advanced Techniques: (hopefully to come later)

Super-Advanced Techniques: (hopefully to come later)

  • NPC creation
  • Location creation
  • Linked/series event creation (quests)
  • Alt-Combat