Reconstructing WoK

Its all WOK here.

Moderators: Duke, trewqh, korexus, Egbert

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Reconstructing WoK

Post by korexus » Tue Nov 22, 2016 9:44 pm

I've started the long job of putting WoK back together.

Nothing visible so far today, but I can validate as the anonymous user with the API.

Tomorrow I'm hoping to validate as other users, then put back the creation of users from forum accounts, which will at least allow people to log in again.


Chris.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Wed Nov 23, 2016 9:42 pm

I can now validate as a real user against the API. That use can't do much, as there's no data to pull out, but it's got a one way link working with the forums.

Tomorrow I'll get the link going the other way, which should allow users to sign up through the site (and stop the spam bots signing up to the forums).

I a bit of good luck I was able to recover part of the games table, which means I won't have to figure out all of the data structure from the ground up. There'll still be plenty to keep me busy though...


Chris.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Thu Nov 24, 2016 9:27 pm

You can now sign up and log in through the site, so I've disabled registration through the forums. That should confound most of the spam bots.

Signing in to the site no longer signs you in to the forums. I think that's because the forums have been updated rather than anything I broke. I'm considering that to be a minor issue for now, and focussing on other things.

Now that you can log in, I guess the next step is to look at games. That could mean a bit of a delay before any new functionality comes online...


Chris.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Fri Nov 25, 2016 10:58 pm

The first step in setting up a game is having a map. I've managed to recover most of the maps, you can see which ones at https://www.kaomaris.com/maps/

I'm going to need to reprocess the ini files for each of these, which is the next job I guess.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Sun Nov 27, 2016 9:46 pm

I've successfully reimported the original map on the dev site. https://www2.kaomaris.com/maps/119/Original/

For most of the early maps I have the image and ini file, so now I've done it once, the rest shouldn't be difficult. Later maps might be more of a challenge, but we weren't actually using that many, so I can probably just rewrite the inis for those few.

That's enough for tonight though. Reimport on live tomorrow.


Chris.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Mon Nov 28, 2016 9:08 pm

For some reason, only 8 of the orginal 24 maps are playing ball. https://www.kaomaris.com/maps/

However, that probably gives enough for now, except for skirmish. I definitely still have the star islands map and ini somewhere, and I think I should be able to dig out Aruna's 2 player skirmish map too. If I can get those in place, I'll stop with maps for a bit and focus on letting people set up games again.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Tue Nov 29, 2016 8:33 pm

I can now create a game on the dev site.

Not yet possible to view the game page or join it, but it's still progress!

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Wed Nov 30, 2016 8:41 pm

The game page now displays without errors. Next step is to let people join it again.

I think I'm going to recreate a skirmish map first though. Duels are a bit big for quick tests...
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Thu Dec 01, 2016 8:51 pm

I've created a skirmish game, joined it, entered orders, and run a turn. Everything looks right except that the commentary is missing. That was easier than I expected!

Commentary is next, then the most important part of the site will hopefully be back up and running. After that I'll fix the players section, then it will be the long job of filling in historical data.


Chris.
With Great Power comes Great Irritability

User avatar
Ecrivian
Trooper
Trooper
Posts: 223
Joined: Tue Sep 03, 2002 7:00 am
Location: WI, USA
Contact:

Re: Reconstructing WoK

Post by Ecrivian » Fri Dec 02, 2016 6:52 pm

Well on a hunger for WoK I tried to start a new skirmish and got the following message:

<!DOCTYPE html><html dir="ltr"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function(e,t,n){function r(n){if(!t[n]){var o=t[n]={exports:{}};e[n][0].call(o.exports,function(t){var o=e[n][1][t];return r(o||t)},o,o.exports)}return t[n].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<n.length;o++)r(n[o]);return r}({1:[function(e,t,n){function r(){}function o(e,t,n){return function(){return i(e,[(new Date).getTime()].concat(u(arguments)),t?null:this,n),t?void 0:this}}var i=e("handle"),a=e(2),u=e(3),c=e("ee").get("tracer"),f=NREUM;"undefined"==typeof window.newrelic&&(newrelic=f);var s=["setPageViewName","setCustomAttribute","setErrorHandler","finished","addToTrace","inlineHit"],l="api-",p=l+"ixn-";a(s,function(e,t){f[t]=o(l+t,!0,"api")}),f.addPageAction=o(l+"addPageAction",!0),f.setCurrentRouteName=o(l+"routeName",!0),t.exports=newrelic,f.interaction=function(){return(new r).get()};var d=r.prototype={createTracer:function(e,t){var n={},r=this,o="function"==typeof t;return i(p+"tracer",[Date.now(),e,n],r),function(){if(c.emit((o?"":"no-")+"fn-start",[Date.now(),r,o],n),o)try{return t.apply(this,arguments)}finally{c.emit("fn-end",[Date.now()],n)}}}};a("setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),function(e,t){d[t]=o(p+t)}),newrelic.noticeError=function(e){"string"==typeof e&&(e=new Error(e)),i("err",[e,(new Date).getTime()])}},{}],2:[function(e,t,n){function r(e,t){var n=[],r="",i=0;for(r in e)o.call(e,r)&&(n=t(r,e[r]),i+=1);return n}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],3:[function(e,t,n){function r(e,t,n){t||(t=0),"undefined"==typeof n&&(n=e?e.length:0);for(var r=-1,o=n-t||0,i=Array(o<0?0:o);++r<o;)i[r]=e[t+r];return i}t.exports=r},{}],ee:[function(e,t,n){function r(){}function o(e){function t(e){return e&&e instanceof r?e:e?c(e,u,i):i()}function n(n,r,o){if(!p.aborted){e&&e(n,r,o);for(var i=t(o),a=v(n),u=a.length,c=0;c<u;c++)a[c].apply(i,r);var f=s[w[n]];return f&&f.push([y,n,r,i]),i}}function d(e,t){b[e]=v(e).concat(t)}function v(e){return b[e]||[]}function g(e){return l[e]=l[e]||o(n)}function m(e,t){f(e,function(e,n){t=t||"feature",w[n]=t,t in s||(s[t]=[])})}var b={},w={},y={on:d,emit:n,get:g,listeners:v,context:t,buffer:m,abort:a,aborted:!1};return y}function i(){return new r}function a(){(s.api||s.feature)&&(p.aborted=!0,s=p.backlog={})}var u="nr@context",c=e("gos"),f=e(2),s={},l={},p=t.exports=o();p.backlog=s},{}],gos:[function(e,t,n){function r(e,t,n){if(o.call(e,t))return e[t];var r=n();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!1}),r}catch(i){}return e[t]=r,r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],handle:[function(e,t,n){function r(e,t,n,r){o.buffer([e],r),o.emit(e,t,n)}var o=e("ee").get("handle");t.exports=r,r.ee=o},{}],id:[function(e,t,n){function r(e){var t=typeof e;return!e||"object"!==t&&"function"!==t?-1:e===window?0:a(e,i,function(){return o++})}var o=1,i="nr@id",a=e("gos");t.exports=r},{}],loader:[function(e,t,n){function r(){if(!h++){var e=y.info=NREUM.info,t=l.getElementsByTagName("script")[0];if(setTimeout(f.abort,3e4),!(e&&e.licenseKey&&e.applicationID&&t))return f.abort();c(b,function(t,n){e[t]||(e[t]=n)}),u("mark",["onload",a()],null,"api");var n=l.createElement("script");n.src="https://"+e.agent,t.parentNode.insertBefore(n,t)}}function o(){"complete"===l.readyState&&i()}function i(){u("mark",["domContent",a()],null,"api")}function a(){return(new Date).getTime()}var u=e("handle"),c=e(2),f=e("ee"),s=window,l=s.document,p="addEventListener",d="attachEvent",v=s.XMLHttpRequest,g=v&&v.prototype;NREUM.o={ST:setTimeout,CT:clearTimeout,XHR:v,REQ:s.Request,EV:s.Event,PR:s.Promise,MO:s.MutationObserver},e(1);var m=""+location,b={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-998.min.js"},w=v&&g&&g[p]&&!/CriOS/.test(navigator.userAgent),y=t.exports={offset:a(),origin:m,features:{},xhrWrappable:w};l[p]?(l[p]("DOMContentLoaded",i,!1),s[p]("load",r,!1)):(l[d]("onreadystatechange",o),s[d]("onload",r)),u("mark",["firstbyte",a()],null,"api");var h=0},{}]},{},["loader"]);</script><title>General Error</title><style type="text/css"> /* <![CDATA[ */ * { margin: 0; padding: 0; } html { font-size: 100%; height: 100%; margin-bottom: 1px; background-color: #E4EDF0; } body { font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; background: #E4EDF0; font-size: 62.5%; margin: 0; } a:link, a:active, a:visited { color: #006699; text-decoration: none; } a:hover { color: #DD6900; text-decoration: underline; } #wrap { padding: 0 20px 15px 20px; min-width: 615px; } #page-header { text-align: right; height: 40px; } #page-footer { clear: both; font-size: 1em; text-align: center; } .panel { margin: 4px 0; background-color: #FFFFFF; border: solid 1px #A9B8C2; } #errorpage #page-header a { font-weight: bold; line-height: 6em; } #errorpage #content { padding: 10px; } #errorpage #content h1 { line-height: 1.2em; margin-bottom: 0; color: #DF075C; } #errorpage #content div { margin-top: 20px; margin-bottom: 5px; border-bottom: 1px solid #CCCCCC; padding-bottom: 5px; color: #333333; font: bold 1.2em "Lucida Grande", Arial, Helvetica, sans-serif; text-decoration: none; line-height: 120%; text-align: left; } /* ]]> */ </style></head><body id="errorpage"><div id="wrap"> <div id="page-header"> <a href="/var/www/html/kaomaris.com/live/api/../../forums/">Return to index page</a> </div> <div id="acp"> <div class="panel"> <div id="content"> <h1>General Error</h1> <div>SQL ERROR [ mysqli ]<br /><br />You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4 [1064]<br /><br />An sql error occurred while fetching this page. Please contact an administrator if this problem persists.</div><p>Please notify the board administrator or webmaster: <a href="mailto:christopher.fitzsimons@gmail.com">christopher.fitzsimons@gmail.com</a></p> </div> </div> </div> <div id="page-footer"> Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited </div></div><script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","licenseKey":"5c7743b252","applicationID":"2541354","transactionName":"M1NaMkBSWkBWU01bXQoZexNBR1teGF5cRW0FRlFJVVJZVnRCXFNGAQ==","queueTime":0,"applicationTime":2179,"atts":"HxRZRAhISU4=","errorBeacon":"bam.nr-data.net","agent":""}</script></body></html>

I don't know what to make of it, but maybe Chris you can see something between the lines (of code).
War determines not who is right, but who is left. We shall see in the days ahead whom of you appear atop the pile of corpses.

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Sat Dec 03, 2016 12:47 pm

It's the phpBB integration. That doesn't happen on the DEV site, which is why I didn't know about it.

2 things here:

phpBB tries to show an error page when something goes wrong, that's overriding my own error handling and ends up putting the source code of an error page out as text, and not emailing me about the problem. I've fixed that.

The latest version of the forums don't save messages quite as quickly as previous ones did. When you create a game we automatically create a forum post about it, when you join a game we rename the thread to include the player information. When you create a game you also join it, and we're getting to the rename part before the post has finished being created. I'll try to syncronise it now.

Even then I'd hold off actually playing a game until I've got the commentary bits sorted. If everything was working you could figure out what was going on without a commentary, but if something is broken the commentary will be useful in figuring out what!

Thanks for the heads up!
Chris.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Sat Dec 03, 2016 2:17 pm

Looks like it's working again, but the phpBB codebase is pretty horrible, so it woudn''t surprise me if something else goes wrong at some point.
With Great Power comes Great Irritability

User avatar
Aussie Gaz
Moderator
Moderator
Posts: 416
Joined: Mon Sep 02, 2002 7:00 am
Location: Thursday Island, Australia. Clan : Valn Ohtar

Re: Reconstructing WoK

Post by Aussie Gaz » Sat Dec 10, 2016 5:21 am

I go away for a little while (ok 3 or 4 years) and you go and kill the bloody game. Well done Korexus :D S

Seriously impressed that you are still perservring with the game. Your kids grown up now?

I may check in again one day :)

Gaz

Grandfather of Wok (dangnabbit I'm almost old enough to be great grandfather of wok)

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Sat Dec 10, 2016 3:51 pm

Good to see you again!

Kids are 4 and 18 months. Not grown up yet, but can't be long now, right?

Sorry for breaking the game. I'll try not to do it again!


Chris.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Sun Dec 11, 2016 9:05 pm

I've created an admin tool which will allow me to recreate old accounts, I'll now start adding people back to the system. After that, I'm going to see how easily I can insert historic game information. Turn reports and orders will be lost, but I'm hopeful that the public information can be restored, which would be nice!


Chris.
With Great Power comes Great Irritability

User avatar
Dragonette
Commander
Commander
Posts: 630
Joined: Wed Apr 18, 2007 7:00 am
Location: mercenary camp

Re: Reconstructing WoK

Post by Dragonette » Wed Dec 14, 2016 5:07 pm

I come back and within a week or two everything goes wrong. I promise I wasn't to blame!

Shame some things seem to be lost forever but great work and dedication from you to be putting it back together again (certainly scream Humpty Dumpty.. though hopefully can be put back together again)!

If there is anything I can do, though unsure what, please feel free to drop me a message and I'll assist as soon as possible.

D
****dragonette****
the
mercenary
****dragonette****
the
gatekeeper
****dragonette****

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Wed Dec 14, 2016 9:19 pm

Nothing specific you can do right now, except convince me that it's worth pushing on!

I'm still putting together some admin utilities that will allow me to write historic data back into the database. Once that's working then there might be some work to do hunting down the historic games. But probably not worth it yet.

Thanks for the offer!
Chris
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Fri Mar 24, 2017 8:44 pm

I've recovered about 30 maps now, you can see them at https://www.kaomaris.com/maps/

I targeted these because they are the ones used in the games present in the old backup I found. Now that the maps are imported I should be able to put the games back in. The database schema has changed completely since then though, so it will take a bit of work...

None of those maps are marked as playable right now. There's no real reason they couldn't be, but I'd like to check them over a bit before enabling them!


Chris.

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Tue Apr 18, 2017 9:07 pm

I've started putting together games from the information in the old backup I found.

Currently only on the test site, while I get everything working, but you can see the results at https://www2.kaomaris.com/games/ (as the games are all over, you need to check the finished box and press search to see anything.)

Players table and map are present for each turn. I'm hoping I can reconstruct the commentaries. I probably won't bother with turn reports.

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Re: Reconstructing WoK

Post by korexus » Thu Apr 27, 2017 8:00 pm

Commentaries are now in place. That was a lot harder than I expected!

Post Reply