Daily Lucky Numbers:
3
13
24
32
34
35

Battle 1.0_RC8.0 BETA-UD-X

Started by Chen Zhen, July 20, 2013, 01:05:17 AM

Previous topic - Next topic

Chen Zhen

Tom,

  Using Battle v1.14 Beta21, atm I can not duplicate the issue you are reporting.

Chen Zhen

Issue found:

  Battling other members should result in penalties to stats (ie. def, atk, stamina, energy, etc.) but instead it currently results in + stamina or energy and does not effect atk of def. I will fix this for the next beta.

Tom

Quote from: underdog on December 11, 2013, 03:20:48 PM
Tom,

  Using Battle v1.14 Beta21, atm I can not duplicate the issue you are reporting.

I have Beta21 installed and it still persists. :(

Chen Zhen

Tom,

  Whenever you uninstall a mod and see errors, you must manually parse those errors else issues like this may occur. Under most circumstances you will not see any errors but different mods may edit files in the same areas which cause this sort of thing.

  Imo the edit the mod does to the Display.template.php file (in each theme if a custom file exists) was left over from the older version of Battle. There are probably 2 inserts in that file now whereas the old left-over edit is being triggered first. It has a different custom session id and will cause the issue you have reported.



Solution 1:

  Attach your theme's Display.template.php file (or the one from your default theme if your custom theme does not have that file). I will adjust the edit in that file for you an upload it anew.




Solution 2:

For future reference (and another alternative solution atm if you wish) the next time you botch things up by ignoring parse errors while installing or uninstalling mods, you can use the SMF full upgrade package. Then install all mods anew which will fix any left over edits from all mods you left in error. Make sure not to ignore any parse errors during the installation of your mods. This solution works well especially for those that are not PHP and/or HTML savvy. I will show some basic instruction for this procedure below:

SMF Large Upgrade Package
Replacing current files with upgrade package files
Upgrade Instructions
Hooks Removal (removes previous leftover hooks)
Install mods and smiley packs anew after the above upgrade has been performed.
The upgrade package is not just for upgrading, it can be used to fix botched up forums ie. from people who leave rogue edits throughout their forum files.

Tom

Yeah, I had two displays in this file on posts when I upgraded. Successfully deleted the double code, but I probably deleted the new version instead of the legacy code. Uploaded the file. I'll read over your links for future upgrades. Thanks!

Chen Zhen

#305
Tom,

  The file is attached.

Tom

Perfect, per the usual. Thank you. 8)

Chen Zhen

Battle v1.14 Beta22

Download:
http://s000.tinyupload.com/index.php?file_id=35577976104672598370

Changes:

- fixed/adjusted battle other members sub-routine for stats & points (plus/minus)
- used session variables to contain some data that seldom changes (always unset per hour) this speeds up page loads
- map graphics will now stay the same for 1 hour or when the session ends




  I haven't finished with using session variables to speed up page loads even more. The mod may now load more data when a user first enters the battle page to do various functions which may delay almost a second but each page load that follows will not query the db again for some of the data unless 1 hour passes, the specific session is unset internally or when the session has ended. 

  The map now shows the same graphic for 1 hour. This is just to help speed up page loads for the moment but I intend to add another feature for the next release where this will have more meaning. I will add a game option to allow players to complete a map whereas each square that has already been done will fade and will not allow the user to play that square again (this will not be implemented at this time).




Please let me know if this version works faster on your forums.

Chen Zhen


Issues:

- it may be necessary to disable database driven sessions in smf server settings admin due to the use of lengthy sessions
- page loads even worse while testing on dwight's forum

... I may have to go back and omit the changes regarding $_SESSION usage in most cases except where minimal data is being used. Oh well, I though it might pan out but I was in err and will work with this for the next beta release.

SA

instead of sessions why not use smf's caching? this imo would be a lot better than sessions

Quoteit may be necessary to disable database driven sessions in smf server settings admin due to the use of lengthy sessions

doing that i belive will not help matters this is proven to make the forum slower this is why it is enabled by default in smf

http://samods.github.io/SAChatBar/

Customizer @ SimpleMachines

Chen Zhen

SA,

  I forgot all about it & thanks for the reminder. I will attempt to use the cache to store some of the data & see if it helps speed up page loads.

  The page load time is actually not too bad but because the battle template drops to the index marker (top of the title), the half second delay from loading data (albeit db and/or file) becomes noticeable.  I am attempting to shave fractions of that time off to see if it appears less noticeable but my efforts may be fruitless.  It does need to be more efficient db wise though... ie. the check table function should only be used for the quests and that function seems to delay the most time which is why it needs to be cached for sure.


Chen Zhen

  If anyone has issues with the last 2 Beta's due to the recent changes, simply use Beta20 until I have time to implement the necessary edits for the next Beta.

Regards.

Fog

Beta 20 helped with the quests.

Should I wait on the current Beta 22?

Chen Zhen


  I have been ill over the holidays and have not had much energy or time to fix what I did with the SESSIONS in beta 21 & beta 22 (any cookies or sessions I used need to be replaced with cache use). Beta20 should be used for now until I have time to release Beta23.

Fog

Get well UD...the game can wait.

Most of my users are spending time with family.

I'm on Vacation until next week.