It is currently Fri Aug 18, 2017 10:34 am

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Global variables
PostPosted: Fri Oct 26, 2012 6:15 pm 
Site Admin

Joined: Sat Feb 11, 2012 9:02 am
Posts: 46
# last updated: 16.09.2013

So, I got myself a documentation folder so I can keep track of the source code, because it is getting huge. Especially global variables keep to become more and so I will keep track of them here. Let's go!

  • Prota/prota, Misty/misty, Sapphire/sapphire etc. - Here we have two variables per character: First one is for displaying text spoken by the respective character, the other one holds almost all values associated to that character. prota and all girls are – who would have guessed it? – DSC-objects (DSC is short for Dating Sim Character).
  • Girllist/girllist/Charlist/charlist - The list with all girls/characters, either the Big Ones or the small ones. Allows to abstract the use of the girls (or characters) and shortens the code A LOT. (The latter one may be a little bit subjective.) The character lists usually start the girls in the girl lists in the same order.
  • linesTalking, linesAsking, etc. - The arrays with what the Girls say on a normal encounter. For what that might be, have a look at this.
  • IA/SIA - IA is the Interaction-object of the game. The interaction class was mostly necessary to separate characters themselves from character interaction. SIA is a short cut for interaction between anyone and the protagonist.
  • pokeball, flowers etc. - The Item-objects, everything got one. They don't store their amazing abilities but their properties as items and how many of them any character has (and has stored).
  • inventory - Like the girl/character lists, saves all items to handle them more efficient. This is extreme important for the inventory screen.
  • invMode - Tells what way the inventory is to used right now, checked like "if invMode == invToUse:".
  • invToUse, invToGift, invToStore, invToTake - Self explaining constants to describe the inventory use.
  • day - A very important variable literally saving the day, since after a couple of days the game will be over. For the intro day is set to zero, but for normal gameplay it is supposed to be greater zero. Please always use nextDay() to increase the day since with the new day some daily events are triggered.
  • location/festLocation/floor - Saves where the protagonist is (as a number). location usually counts in multiples of 10, for it may be possible for a location to have sublocations, as the town has the hotel and the Pokémon center. Sublocations which could become numerous in the future, like girl rooms or mazes, have an own number for that, though. The floor variable may be used to indicate the floor of any building. At the moment it is only used for the hotel. festLocation is the same with location at festivals
  • min/maxHotelFloor - Tells exactly this.
  • shop0 - An array containing the indices of the items that can be bought at the specified shop. As the 0 indicates, there is place for more shops.
  • girl - Indicates which girl the protagonist is talking to. If none, set to -1.
  • GIQ - Girl In Question. Short term for girllist[girl] and thus makes everything easier to oversee. If none, set to None.
  • RIQ - Relation In Question. Short term for SIA.getRel(girl) and thus makes everything easier to oversee. If none, set to None.
  • roomOfGirl - Indicates in which girl's room the protagonist is by the girl's index. If none, set to -1.
  • cheeredForToday - Tells for which fighter prota cheered for today. It holds the corresponding girl number, -1 if the player cheered for somebody else and -2 if not (yet).
  • item - The item selected from the inventory, for using/taking/storing/gifting it.
  • girlGiftEffect - Tells what a girl thinks of an item as a gift, so girlGiftEffect[girlnumber][giftnumber] is a value between 0 and 3.
  • dateLocationData - Stores the properties of every location: dLD[0][girlnumber] has the start mood for a girl if brought there for a date, dLD[1] to [3] tell the minimum HP needed to go, the number of days which will be used (including the current one), and the money needed to go.
  • tournamentDays - stores the days any girl is not available, e.g. tournamentDays[iCharMisty] is a list with all days Misty isn't available.
  • hotelGirlsApartments - Tells which girl lives on which floor in the hotel, e.g. hotelGirlsApartments[2] is a list with the indices of all girls living on the second floor.
  • isSleeping - Tells if the protagonist is sleeping, used to hide the stats screen.
  • mLocation, mBGIndex etc. - The prefix m indicates variables for the maze (in the forest). mLocation is an array with two entries indicating the x and y coordinate of the player in the maze.
  • noIntro - Tells if the intro is to be skipped. That means the moment the program enters the intro it jumps to the end to (to increase the days).
  • introRunning - Tells if the intro is currently running, mainly to hide the status screen.
  • endingRunning - Same as introRunning, just with the ending.
  • creditsRunning - Same with credtis.
  • creditTime - Tells how long credits will be displayed, in seconds.
  • event variables:
    • eAtCeremony - If the player is currently at a festival/a ceremony.
    • eAtOpeningCeremony - If the player was at the opening ceremony.
    • eRecognizedLostKey - It is annoying to have the prota blabbering about his/her lost key every time you visit the hotel a day, so this flag will take care of the notice.
    • eSecretBeachDiscovered - Tells if the player discovered the secret beach yet.
    • eJoyTimesHelped - Counts how often the player helped Joy out.
    • eJoyTimesNeeded - Tells how often the player needs to help Joy before she becomes accessable. Should be so high that the player would most likely one recognize it when helping (to raise his skills) for no reason (because skill is maxed already). I set to 8 except Joy shouldn't be accessable at this point of development, so it is 1000. Reaching this number would need 2000 days unless endlessHP is activated.
    • eJoyAccessable - Tells if Joy is accessable already.
    • eJennyAccessable - Tells if Jenny is accessable already.
    • eLostInForest - Tells if the player is lost in the forest.
    • eLIFWanderAround - (LIF = Lost in Forest) Counts how often the player wandered around for no reason.
  • cheat/debug variables:
    • endlessHP - A cheat flag for not loosing HP anymore.
    • persistent.doubleStats - A cheat to double the stats cap.
  • technical variables (normally not cleared after use):
    • resultVal - Another help variable, very often used and not cleared afterwards.
    • [...]ChoiceSelection - Used to build up menus. The return value of the menu call is often stored in resultVal.
    • rnd - A help variable for random numbers. Not used right now.
    • keyIndex - The index of the key of the girl's room the player wants to access.
    • mouseOverItem - Needed for the inventory screen, the (mouseOverItem)th inventory-item will be displayed first when inventory screen is opened.
    • s[...] - Variables with the prefix s are temporary needed strings.
    • imgCharPath, imgBgPath, imgItemPath, soundPath - The paths to the designated folders.
    • config.developer - If true, developer tools will be accessable, such as the cheat menu.
    • config.version - Tells the version of the game. Important for updates.

If you find mistakes in my English, feel free to correct me.

Pokémon Dating Sim Version 1.0 Alpha

Last edited by Author on Mon Sep 16, 2013 1:53 pm, edited 2 times in total.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group