Author Topic: Changelog  (Read 7248 times)


  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
« on: October 26, 2007, 03:35:25 pm »
Final Version
Changes to 1.1.1 +nb

**generic --> benchmarks resulted in a dramatic performance increase once the "while (list-each)" construct is replaced by i.e. "foreach" or "for". So I changed it in the entire core code (might have missed some). This should speed the game up a few milliseconds on a heavy trafficked server.
**generic --> all_tables.php in lib folder reworked to adapt some field types. int(11) is nice, but not for a flag where a bit would suffice...
*bank.php,configuration.php,lib/pageparts.php,train.php --> number now can be formatted, ingame settings 'moneydecimalpoint' and 'moneythousandssep' added, used with number_format. Another pure lotgd function could be used in the future possibly (more function calls, and on charstats -> not for that effect)
*common.php --> copyright updated and also put some colour into it
*common.php --> made more extensive error message upon db connect/attach failure than just two sentences. Added polite stuff and also whether or not the lib/smsnotify.php (which you REALLY should use) was there or not. In the latter case, the user will get the error message displayed
*configuration.php --> lifted max daysperday from 6 to 24. Why should people not be allowed to make a boring kill-until-you-are-bored game ^^
*create.php --> SSL functionality now supported. in previous versions, the verification link will send you to a bad link. if he/she does not know how to, he/she won't register. now SSL on port 443 is supported, as well as the normal http:// port 80 ... all other ports are treated as http://SERVERNAME:SERVERPORT
*creatures.php,lib/battle.php etc --> changed the creatureaiscript that can be assigned to creatures in the creaturetable to being a FILENAME in the /scripts directory. That prevents users from having basically RAWSQL/RAWPHP access, when having the creature editor right. Modules can freely do what they please, but for the creatures in the table, you have to drop a script in the /scripts folder. Core comes along with one example.
*commentary.php --> minor change to speed output up and not change every line whether or not the user is SU_EDIT_COMMENTS in a loop
*common.php --> now has a check if the installer.php exists in normal gameplay. If it is there, you need to remove it to continue play.
*configuration.php --> made the increment to 1 for all multiple enemies settings, in increments of 2,3,4 is simply unnecessary
*create.php / prefs.php / configuration.php --> added the feature to have users change their email themselves. A new link is generated, sent to either the old OR new address (game setting), and if clicked the new email verified. If you do not require your users to validate their address (NOT recommended!) they will just change it. In any case, a debuglog entry is generated, if link-validation is required, then this will be logged too in category "Email". Additionally, all with SU_EDIT_USERS flag will get a YOM with new and old email. That should prevent an admin trades his acc away and you don't notice it (email change only, password giving away is not trackable)
*creatures.php --> 'createdby' is now set on each and every save, simply because if you change all of the creature, the createdby does not make real sense. This is somewhat arbitrary, but with AI scripts you now more edit them rather than delete.
*creatures.php --> generation altered, removed the "silly" (that was the term by the former developers) table and replaced it with "about right" algorithms to match the table at best. Note that you will still gain exp while at the highest level.
*dragon.php/train.php/masters.php/creatures.php etc --> made a setting 'maxlevel' which means that is the usual level 15 as setting where he can kill the dragon and such. Now you can easily make 3 levels or 300 levels to your liking. Be sure to make enough weapons (amount: maxlevel) to make it even. Also add masters of they will have one master till they can kill the dragon.
*forest.php --> made the "pack" that was hardcoded a setting. now you *can* have monsters being only as *one* enemy in a fight, but not duplicates if you wish. else the chance is 50% that a pack of the same creature type appears
*forest.php --> removed the "if a player is greater than level 17, make the difference in enemies and set the maxlevel to 17" which is simply nonsense.
*gamelog.php --> added more sorting options etc
*paylog.php --> new hook "paylog" added to make items injectable AFTER the superuser nav and BEFORE the months
*lib/saveuser.php --> gzcompressed output to the accounts_output table as standard to reduce db traffic *dramatically*
*lib/addnews.php cleaned up. array_shift is somewhat more decent for it, then a foreach after it</content>
*lib/all_tables.php ... account table has "buffbackup" that was obsolete removed and replaced with a "translatorlanguages" field... now you can assign them to different languages and control their access much better.
*lib/all_tables.php --> reworked the all_tables, specifically (along with comments on 'what is in there'):
        -made 'level' smaller
        -made a new name 'playername' to make it easier to differ, 'name' is now simply 'title'.'playername' (or ctitle)
        -made name and playername bigger, for colours and UTF-8 chars who take up more space
        -made location bigger to 50 chars, UTF-8 needs ore space
*lib/clan/applicant_new.php / configuration.php --> added 2 settings to make the names at creation sanitizeable or not from all but latin chars
*lib/clan/clan_default.php --> restored 'leader'==CLAN_LEADER to the check if we need to promote somebody so a clan has a leader. somebody considered all officers leaders... well, good that he told everybody ^^ I changed it back
*lib/clan_clan_membership.php --> a bit heavy, but I added a dropdown box to the former promote/demote position and removed the text. You can now set somebody directly to the desired rank.
*lib/clan/detail.php --> clan info can no longer be edited by moderators, but by people with audit_moderation flag
*lib/commentary.php --> Gamemasters have now no posting limit
*lib/datetime.php / configuration.php --> the village game date format in now an admin setting in the grotto
*lib/mail/case_* --> Added a function to forward mail to *one* user. CC/BCC is possible, but not advisable. The more you mail to, the more spammers have it easier.
*lib/mail/case_write.php --> made the superusermessage translation ready, yet leaving the message itself untranslated, additionally making a reply to a system message not throwing a form with ALL users in the "To" field... instead calling popup_footer() now. Also fixed a wrongly closed "htmlentities" which broke tl-readiness.
*lib/moderate.php newly generated + moderate.php altered.
        -removed the hack to show ALL commentary, regardless if a module wants to block it or not
        -you cannot block the commentary now with "blockcomment" hooking (which *was* possible before!)
        -removed the moderation functions from lib/commentary.php and into lib/moderate.php (though some redundancies are there, the speed should go up)
        -you can now exclude as a game setting in the commentary->exclude sections you don't want to be moderated. A prime example would be the coffers in the dwellings or the grotto chat which simply kills space
*lib/modules.php --> small modifications for caching
*lib/names.php -->made the get_player_basename easier as the value it now stored in the accounts table. Formerly it needed to be extracted, proving difficulties also with UTF-8 chars and limiting. If you update, you don't need to change anything, the names.php will handle the rest for you and adapt all players once they hit the get_player_basename and save a new name.
*lib/newday/newday_runconce.php --> moved the cleanup of failed autologins to the newday-runonce. it killed all tries anyway and was not working properly
*lib/newday/newday_runonce.php / configuration.php --> entered a few new settings to make the cleanup a bit more configurable: you can now set independtly: cleanup of gamelog-faillog-debuglog to your liking, not dependent on comment expiration anymore
*lib/pageparts.php --> SELECT count(*) is not that wise, replace with coutning the acctid.
*lib/pageparts.php --> Resorted the stat infos. healthbar, expbar and alignment needs to be adapted if you use those modules.
*lib/pvp*.php --> pvprange now makes the attack range in pvp variable with a setting. Note that the lower limit is +1
*lib/showform.php --> textfield now "raw" possible, means you get the `n instead of a newline. Mainly for script stuff like in the creature editor.
*lib/user/user_del.php --> only megausers can now delete anybody with superuser powers. Safety issue. It was unreasonable to not give flags people don't have themselves but let them delete the complete staff.
*lib/user/user_removeban.php --> Added different sort order, made a time to expire possible (different time zones) and added a correct "never" tag. Showing now perma-bans seperately.
*mail.php --> added hook "header-mail" to execute stuff *before* the test if mail needs to be deleted and stuff. use "mailform" to put a button in and then check header-mail to process it. don't forget to set $args['done']=1 if you have done something!
*modules.php --> now faulty or copied libs/no-module-files won't get executed in the "manage modules" section while not being installed. it checks for a valid _getinfo method as well as an _install section.
Also added a better cache handling
*output.php,sanitize.php -> removed in the output_notl part the array_pop and array_push to a direct access and unset if necessary... else too much loss due to pop->push all the time. Also moved the double defined 't' tag for a colour and <em> to 'B' now.
*clan.php with libs --> only clan officers or UP can promote/demote, players who are below that cannot
*prefs.php --> moved the delete button away from the save button. even with confirmation it happened sometimes to get users deleted by accident. Also made the module settings collection more sane. Now you need only a tiny fraction of the former queries if you have more than a handful of modules installed (in my case 156 --> 27 queries)
*pvp.php --> restored legacy support to pvpvictory+defeat
*taunt.php,masters.php and lib/substitute.php --> if you had playernames in buffs, and the substitute detects a %o ... then it replaces it... so it is basically not usable. replaced i.e. %W with {badguy} to make it more clear. MAKE CHANGES IF YOU UPDATE TO YOUR OWN TAUNTS AND MASTERS!!!
*user.php --> 'race' cannot be entered directly anymore (too much screw-up chance), a module CAN set it and it will be preserved. You can change the users race to any valid race who comes in at the racenames hook.
*user.php --> dragonpoints are now also displayed as summary (array_count_values)
*viewpetition.php --> enabled the hook of petition-statuses + fixed the right variable in. Also added a stripslashes to the email popup text so the \' doesn't happen
*viewpetition.php --> removed the "Last Update" if there was none. minus days are always bad.

*lib/modules.php --> now admins who install modules can have ' in  their name and it won't break the module installation (you can never install a module... sad...)
*lib/mail.php --> javascript threw errors on first run (this was null)
*lib/tabledescriptor.php --> line 171 did not act correctly check for NULL validity.
*create.php/dragon.php --> default did set to Degolburg after DK, not the real main city
*lib/expire_chars.php --> when run via cron, the user will get the local directory path, NOT your web address... fixed & will now use the lotgdnet address, whether registered or not, ENTER one there!
*lib/pageparts.php --> header now sanitized

*added an attribute system...  strength/dexterity/wisdom/constitution/intelligence... attacks now base on it, also you cannot spend dk-points for attack/def anymore, you can assign them to your attributes ... the calculations for atk/def/speed are in lib/playerfunctions.php
*added a hook to the mail system "mailform" where you can rawoutput an additional input field etc you can evaluate later on via the mailfunctions hook
        files: lib/mail/case_default.php
*added a deathmessage editor for personal newstexts in the forest/graveyard defeats (i.e. when a player dies the news that will be displayed is now random from a number of entries you entered)
        files: superuser.phpr,deathmessages.php,lib/deathmessages.php,lib/forestoutcomes.php
*added selective AJAX support to refresh stuff like the "You have X new mail...". The timeout still applies. I used a BSD-licensed package located in lib/xajax if you want to check.

*configuration.php + lib/modules.php and more --> added a Debug feature to monitor module load/usage. Currently once activated this will log every execution time when a module hook calls a function _dohook. This will help track down slow do_hooks. Same will be applied to the runmodule.php
*dragon.php --> added hook "dragondeath" to let modules execute own code ONLY if the user gets pwned by the dragon.
*create.php/dragon.php --> weapon/armor a player starts with are now settings rather than DB default values (still there, though, for legacy support)
*forest.php --> added a "forestfight-start" hook that is called before every fight. Modify the $args['options'] i.e. there if you like =)
*hof.php --> added a "hof-add" hook and moved the villagenav now to the top where it belongs
*mail.php --> added more stuff like "check by names" to the mail lib files
*translatorlounge.php / superuser.php --> translators ONLY have now no access to the common grotto talk anymore. On larger servers, with many translators, there might be some laying back, watching the chats and that's all they do. Also, if you want to try somebody new out, you have to show him all your grotto talk. Not good. So they have their own lounge now. Give out the "Can enter Grotto" privilege or ANY other additionally, and they will see the grotto chat (+lounge chat) again.
*user.php,lib/user/user_removeban.php,/lib/user/user_searchban.php --> options to search for a banned user, especially useful if you have a lot of bans and just want one affected user
*lib/commentary.php + forms.php --> changed the number of chars somebody can type in a single line at a commentary form to a setting  (PHP5 necessary to have the adequate table adjustments)
*lib/experience.php --> cached now the calculated on DK experience necessary AND made it a setting to add for as many levels as the admin desires in the 'maxlevel' setting. If too few are entered, 20% are added based on the previous entry and so on.
*lib/battle-buffs.php - battle.php --> added for buffs a flag "expireafterfight" which will let them expire after a fight IN WHICH THEY WERE NOT SUSPENDED. This is i.e. for abilities that last an entire fight, but not beyond that. Fight means entire fight, multiple enemies do count as one fight.
*lib/clan/list.php + applicant_apply.php --> added more sorting options to the list, membercount AND names now. Also fixed two htmlentities bugs while there
*lib/mail/case_write & case_send --> added a "Send and Close" button to it for quick senders (or petition answerers...)
*mail.php /lib/mail* --> added a bit more layout and also to prefs.php the setting for a user-default popupsize (lib/pageparts.php) and also a mailwidth/mailheight which can be set by the user.
*lib/output.php+pageparts.php+others --> moved the nav stuff to a nav.php and also made an output_collector object instead of the string $output. So now you can have the output returned or modified OOP-wise, also the colour codes are now ONLY in output.php at the beginning for the class (might be shifted to a settings file soon) which means a modification of the template .css and this one will do all colour stuff for you.
*prefs.php + lovers module --> added a choice of sexuality and which gender you prefer. Now you can choose if you flirt with Seth or Violet, I think this is less discriminating. Admins not allowing that will have to edit the prefs and remove that line out of the array.

-battle.php --> no $badguy['fightoutput'] anymore.
-lib/modules.php --> removed the collapsable stuff of module outputted texts... way too much load fetching the output and whatnot if you do it OOP

*creature AI scripts can be placed in the /scripts folder which remains empty for you. It makes using scripts easier if you require("scripts/myscript.php"); them in,  though it (if uncached) will cause more disk access

« Last Edit: June 30, 2008, 06:16:16 pm by Nightborn »
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro