Thursday, May 21, 2015

Revision 4179 - Revision 4191

Revision 4179
(future revamp) small fix for rare tips crash

Brothel line 998
tip_income += tip[1] -> tip_income += tip[2][1]

Revision 4180
(Revamp script)
Partially fixed carpenter, menu works but upgrade timer never goes down at day end.

Revision 4181
(Revamp script)
Fixed carpenter to apply the upgrades in a proper manner.
Updated brothel loader to avoid importing nil data for room effects and room decisions.
Added end_day_upgrades method to Game_Brothels class to loop through the brothel and check if upgrades need to be made or timer needs to be lowered. (called from end_day_managing method)

Revision 4182
(All future revamp)
Consolidated the rxdata exporting functions to a single script file, and renamed the script to Rxdata Export Methods

changed the customer and brothel import code to validate customer class data contained within and store customer_class_ids instead of customer_class_names, also added debugging strings to help identify bad xml.

Changed the load order to load brothels after customer data, so that the customer class array would be built before the brothels are loaded, to facilitate xml import validation (see above), reordered the method definitions as well, to remain consistent.

Renamed the $customer_class[] global to $data_customer_class[] for consistency with other import globals (and adjusted code calls accordingly)

Added the method class_data to the class Customer to facilitate cleaner class data access for any given customer (simply returns $data_customer_class[@class_id])
Used in: add_reputation, which also added some checks to restrict reps to integer values (0..1000)

ALOT of cleaning of code in brothel and other areas

added #todo comments everywhere that I thought something looked fishy or incomplete, for others to confirm and look at, and for ease of final polish run-throughs

Corrected a few methods in brothel to facilitate the new customer_class_id storage paradigm: generate_new_cust_class

corrections to stop_working (actor/couple/party) and remove_girl(actor_id, broNum, force = false) (brothel) to fix the get/store girl at the guild member

corrected the following xml (new import validation fixes)
Court Jester.xml

All of the brothel xmls

Revision 4183
corrected a problem with re-use of available name in the brothel and customer imports.

Revision 4184
removed p command from previous update - woops...

moral of the story, don't code tired :)

Revision 4185
(Revamp script)
Removed leftover print command from add_actor method.
Merged ed's bgm loops from the current version.
Options menu doesn't get reset anymore when returning to the title or game over.

Revision 4186
Corrected a few typos in names and descriptions of the brothels.

Revision 4187
(Revamp script)
Fixed crash when trying to sell a brothel caused by the @rooms variable clearing.
Commented out uses of $game_variables[5] since they seems to be used by nothing and are updated by old systems that cause crashes.

Revision 4188
(Revamp script)
Real Estate menu now properly displays the number of beds a brothel has. (requires restart)
Real Estate menu now lists brothel names instead of locations. (location is still displayed on the right info window)
Shifted the brothel xml loaders methods to be closer together for ease of debugging.

Revision 4189
(future revamp) minor fix for hanging end caused by commenting vestigial code.

Revision 4190
(Revamp script)
Changed Real Estate and Carpenter menus info window behavior to only refresh when index has been changed instead of each frame

Revision 4191
(Revamp script)
Fixed end of day log not showing all the owned brothels.
Fixed Communal Windows script dispose methods to check if they are already disposed before disposing the content (caused a rare crash in very specific circumstances).
Fixed class_data method in the Customer class to use the right global variable.
Renamed My Addition script to Time System Moon Phases.

Tuesday, May 19, 2015

Revision 4169 - Revision 4178

Revision 4169
Removed checkpoint feature.
Added autosave during the end of day calculations.

Revision 4170
(Revamp script)
Fixed revenue and log method to handle tips correctly.

Revision 4171
(Revamp script)
Corrected stats calculations in brothel methods to return floats for more precise calculations.

Revision 4172
(All future revamp only)
Fixed maps to use new method of accessing brothel.totalRooms => brothel.rooms[room].size

For detailed list of exact changes, refer to Map_Transform_Log.txt (included)

Added the map search code to the script file, for future batch conversions and searches

Revision 4173
(Revamp script)
Fixed end of day log printing only for the brothel the player was in.
Removed some unnecessary methods, commented a few i was unsure about. (early testing seems to indicate that no crash from missing method has been introduced)

Revision 4174
Fixed crash upon entering harpy's nest upper rooms. Specifically:
changed the following 2 methods
(updated to use occupant_id)
Character / Player / Event
def change_wapp(workroom)
# Girls working in brothel:
wr_actor_id=workroom.occupant_id[$game_system.time.week_day_num()] if workroom != nil
if wr_actor_id != -1 && wr_actor_id != $game_party.actors[0] && ($game_switches[DB_BROTHEL::WORKING_HOURS_SWITCH] || $game_actors[wr_actor_id].still_working?)
@actor_id = wr_actor_id
@character_name = $game_actors[wr_actor_id].character_name
@actor_id = 0
@character_name = ""

(updated to default to today's week_num if no paramater provided)
Climate and Time System 
def week_day_num(day_name_parameter=nil)
# accepts the name of a week day and converts it into an integer:
# defaults to the current day if no parameter is provided
day_name_parameter=day_name if day_name_parameter==nil
for i in 0..(CCTS::DAYS.size-1)
if CCTS::DAYS[i]==day_name_parameter
return i
return -1

(Also as a result of the above, cleaned alot of code by changing all the calls to:
to use the new default

Revision 4175
(future revamp) fixed brothel crashes due to sprite spawning
this meant alot of changes, in alot of places, too many to detail

Revision 4176
(Revamp script)
Removed unnecessary methods form the brothel assignment menu.
Added week_day_name method to CCTS to get the day name based on the day of the week (defaults to current day if no argument is given).

Revision 4177
(Revamp script)
Fixed girl duplicating themselves when unassigning them after loading. (hopefully)

Revision 4178
(Revamp script)
Fixed the previous fix about duplicating girls.

Monday, May 18, 2015

Revision 4164 - Revision 4168

Revision 4164
Sign in should now properly heal and remove statuses form all actors in your brothels (unless it is a brothel status).
Removed alchemy recipe book from the Harpy's Nest.
Updated diary in master bedroom of the Harpy's Nest to use the proper brothel menu.

(Revamp script)
Fixed bug 20, now actors should be properly healed when signing in.

Revision 4165
(Revamp script)
Added handle_revenue method to deal with brothel profit and losses.
Updated the end of day log to get the revenue data from the correct variables.
TODO: need to check whore calculations, a single girl in a starter brothel is making an average of 1500 a day.
TODO: add maintenance cost to brothel XMLs.

Revision 4166
(Revamp script)
Fixed STATES module constants to link to valid states (was causing those states to not work at all).
Fixed attractiveness list to not delete girl who are busy (since that state gets always set at the start of the day, might need a new state to indicate an unavailable girl).
With exhaustion working the girl revenue gone down from 1500 to 200 average.

Revision 4167
(Future Revamp) fixed an issue with too few parameters for the method stop_working in module WORK (Actor/couple/party) that caused a crash when trying to add an actor to the battle party

Several calls were being made to this method with no parameters, or only a single boolean parameter.

Overloaded the method's parameter list to properly handle these cases
being handed nil for the day parameter now unassigns all 7 days
no parameters defaults to all 7 days, and forced of false
a single boolean parameter defaults to all 7 days and forced is the boolean value provided
a single non-boolean is treated as if day was provided, and forced defaults to false

Revision 4168
(Revamp script)
Fixed states code broking out (again).
Added WORKING state to indicate that a girl is assigned, BUSY now is exclusive to a girl occupied with a customer.
Added working? method to the actor class to check if the girl has the assigned state.
Added add_brothel_state and remove_brothel_state to deal with brothel states since they need special handling.
Stats changes section of the end of day log only gets printed if any stats are actually changed. 

Sunday, May 17, 2015

Revision 4157 - Revision 4163

Revision 4157
Altered eastern mountain path, altered Midgard maps.
[name change to midgard will occure soon.]
[Eastern Mountain Path will have decor and foliage added soon.]
[will begin on Eastern Mountain path 2 soon.]
[Eastern Mountain Path will have quest added in the future.]
[Extended Cinder's Lair will be added upon completion of Eastern Mountain Path.]

Revision 4158
Fixed transfer problems connecting to maps around Eastern Mountain Path.

Revision 4159
Crossroad transfer to east mountain path fixed.... for the final time

Revision 4160
Minor fixes to the transfer events of the new eastern mountain path. 

Revision 4161
collisions fixed for Eastern Mountain Path.

Revisino 4162
(Revamp script)
Added stat changes to end of day log.
Fixed crash in exhaustion calculation caused by infinite numbers

Revision 4163
Added the Enemies export script and the Data/Enemies/*.xml

No functional changes (just prep for the later combat revamp

Saturday, May 16, 2015

Revision 4149 - Revision 4156

Revision 4149
All quest architecture and story for Niji Island (formarly known as Ninja Island) has been completed! Some battle testing and routing the questline still needed, but release soon!

Revision 4150
Implemented puzzles for Niji Island quest. (Not yet accessible)

Still needs to update the second puzzle with proper audio and link the puzzle solutions to the item gains or events as appropriate.

Revision 4151
Fixed the text windows going under the status and clock windows instead of on top.
Hopefully fixed a somewhat rare FMod error, if the line about the testfix comes up let me know if anything strange happened to the audio.

Revision 4152
(Revamp script)
Fixed girls log not resetting on new days.
Added missing vigor loss reduction from whoring.
Added minimum cap to whoring vigor loss (can't go under 5 for now)
Added case in handle_health_loss for whoring.

Revision 4153
Removed some leftover debug teleports. 

Revision 4154
Debugged and released Siege of Deril and Mohawk's Last Stand quests, finally completing the Mohawk questline, sorry for the long delay.
There are some unfinished graphics, but the quests are fully functional.
Deril town is not yet open for exploring even after the quests completion.

Revision 5155
(Revamp script)
Fixed name generator xml import to import the expected values.
Fixed variable name in customer name generation code which was causing a crash once custom name lists were added.

Revision 4156
(Revamp script)
Fixed crash when signing in with Maya.
Fixed crash when trying to rise or lower the bouncer gold limit from the brothel management menu.
Removed the old shortcut to rise and lower the bouncer gold from the job assignment menu and removed the text indicating that it would be possible to do so.

TODO: Add current management decision text in job description into the job assignment menu.

Monday, May 11, 2015

Revision 4142 - Revision 4148

Revision 4142
fixed an error with the message that came up when adding an exhausted actor to the battle party (referenced actor.girl?, but there was no girl? method, so changed to check actor.girl member instead)

Revision 4143
Continued updates to Niji Island. New area added. New subboss added. Music added. Continued progress on quest events. Close to release!

Revision 4144
Revision 4140 reintroduced some bugs into the script file, script has been reverted to the one from revision 4137 and updated with the correct changes from 4140.
Revisions 4141 to 4143 changes not yet merged.

Revision 4145
BUGFIX: When trying to move an exhausted actor to the battle party, an error would generate and the "he" pronoun would be used regardless of gender.
Solution: actor.girl? replaced with actor.girl (no ?)

Implemented the Onliners XML. Changes Include:
Added the flag translation hashes to the bottom of the database script.
Brought the Array.sample method to Current_Version (from future_revamp)
Added Array.add_unique (adds an element to the array if not already present, returns index where found or added)
Added the Set class to the library
added Set.sample to the Set class

Removed self.get_sleep_text(actor)
Removed self.db_girl_text(actor)
These are replaced by the xml data and are no longer needed

Added Class Oneliner to the library
Added the global method get_oneliner_response(actor,oneliner_list=$data_oneliners) to the Library

Added load_xml_oneliners, and load_oneliner(text) to the import script to import Oneliner data from the xml

Replaced the Game_Actor.get_text function to use the new oneliner data.

Revision 4146
Removed Weapon Master class from the list of buyable skills.

Added improved SP calculations for the remaining classes: (this will only apply to new games, old savegames will still use 100% Intelligence for those classes)
Red Mage - 50% Strength, 50% Intelligence
Shinigami - 50% Strength, 50% Constitution
Arrancar - 50% Strength, 50% Constitution
SeeD - 50% Strength, 50% Agility
Trainer - 100% Charisma
Magic Girl - 70% Intelligence, 30% Charisma
Succubus - 70% Sex, 30% Charisma
Unrelated Link - 30% Strength, 70% Agility
Duelist - 30% Strength, 70% Agility
Desert warrior - 50% Strength, 50% Agility
Elemental Lord - 34% Strength, 33% Agility, 33% Intelligence
Sword-User - 100% Strength
Katana-User - 100% Strength
Shield-User - 100% Constitution
Axe-User - 100% Strength
Great Sword-User - 100% Strength
Great Axe-User - 100% Strength
Spear-User - 50% Strength, 50% Agility
Dagger-User - 100% Agility
Hammer-User - 100% Strength
Bow-User - 70% Agility, 30% Strength
Whip-User - 100% Agility
Fist-User - 70% Agility, 30% Strength
Firearm-User - 100% Agility
Rapier-User - 100% Agility
Scythe-User - 100% Agility

Revision 4147
Fixed Vulture egg not despawning during the desert eggs hunt quest.

Revision 4148
(Revamp script)
Fixed variable name in generate_available_pasttimes method.
Added log for guards.

Missing from the log: Pasttimes and Player.

Sunday, May 10, 2015

Revision 4133 - Revision 4141

Revision 4133
Fixed script is hanging error when entering the bunks in the girl's free time (10:00 to 16:00).
Modified stump of oblivion to make it more clear about it's effect.

Revision 4134
Update to ninja island. Battles and boss fights generated and tested. Some NPC population. Some map adjustments. More to come this weekend.

Revision 4135
Update to the ninja hideout. Working inn added. Minor subevents and NPCs added. Treasure room added. And some other stuff.

Revision 4136
Updates to scroll quest. New event, sprites, and map added. 

Revision 4137
Fixed AoE healing spells that were not giving exp.

Revision 4138
(Revamp script)
Merged count_team_numbers fix into revamp script.
Also tested the other settings, those others work as intended.

Revision 4139
Update to Niji Island quest

Revision 4140
New music plus loop data for new area. Boss theme to follow.

Revision 4141
Moved actor responses (Oneliners) to xml, the xml can be found in Data/Chitchat
default.xml currently holds all the oneliners, but more may now be easily added

implemented array.sample in current_version
added array.add_unique which adds an element to the array if not already present and returns the index where it was found or added
added class Set, and set.sample

Tuesday, May 5, 2015

Revision 4127 - Revision 4131

Revision 4127
Added option in the options menu to show the map gold window by default.
Fixed the map gold window to refresh when gold is obtained through events.

Revision 4128
 Added the functionality of Amount of Windows and Message System Settings items to options menu.
Amount of Windows and Message System Settings items are no longer given at game start (and are now sellable to get rid of them in existing saves).
Modified calculations for work time, free time and resting time switches.

Revision 4129
Fixed non combatants not being able to wear anything.

Revision 4130 - Revision 4131
Reverted mistakenly uploaded file.

Monday, May 4, 2015

Revision 4126

Revision 4126
Added Options menu, taking the spot of the mute/unmute button, only audio options inside at the moment, but will be expanded with more soon

Revision 4124 - Revision 4125

Revision 4121
Fixed a typo in the revamp version of the healing exp fix

Revision 4122
Added improved SP calculations for more classes:
Barbarian - 100% Strength
Ninja - 100% Agility
Lancer - 50% Strength, 50% Agility
Martial Artist - 30% Strength, 70% Agility
Knight - 30% Strength, 70% Constitution
Samurai - 50% Strength, 50% Constitution
Archer - 50% Strength, 50% Agility
Swordsman - 50% Strength, 50% Agility
Firearms - 100% Agility
Weapon Master - 34% Strength, 33% Agility, 33% Constitution
All types of mages - 100% Intelligence 

Revision 4123
Actors skills section in the xml are not case sensitive anymore.
Fixed a lot of skill typos on actors xmls that prevented the skills to be available.

Revision 4124
upload the updated trait list.

Revision 4125
Fixed the left/right arrows in the brothel-jobs menu when the jobs button is highlighted.

(Used to go between work and VIP - even if you didn't have a VIP in your brother - and ignored Bedwarmer - now correctly cycles through the rooms actually built in the brothel)