[WIPz] GHF Census and Excise Office

Post » Fri May 27, 2011 6:33 am

wow, i'm gonna have to get that custom face and hair i've been working on done, so i can show it off on the website

oh and whole thing with downloading a persons character to fight against it sounds fun, but i'd be too tempted to upload a 60ft lvl 255 argonian equipped ready with his trusty daedric claymore, enchanted with damage health 200pts for 200 seconds in 100ft and a spell that summons 10 golden saints :evil:

maybe something like this, which joins the community which plays the game together and generally makes the whole thing a lot funner, will actually get more people playing the game again, and it's the next best thing to multiplayer (which would screw up the game, imagine you both reach the cavern of the incarnate, it would be a race to see who get's moon and star, i'd probably just throw a daedric dart in the other person's back and laugh as i pick up the ring)
User avatar
tegan fiamengo
 
Posts: 3455
Joined: Mon Jan 29, 2007 9:53 am

Post » Fri May 27, 2011 8:12 am

Zarnatheron's suggestion for handling inventory, stats and spells is a lot better then mine. I second this.
User avatar
Amy Masters
 
Posts: 3277
Joined: Thu Jun 22, 2006 10:26 am

Post » Fri May 27, 2011 11:04 am

This is the most interesting idea I have heard in a long time. If anyone else would have suggested it Fliggerty I would have just disregarded it. But if you actually get this working, I would be very tempted to upload a character of my own (I would have to manually upload it, no internet :brokencomputer: ).

Great idea, it's no wonder you are receiving such a good reception! So I suppose this post is just a support and good luck post :)

-Melchior
User avatar
Silvia Gil
 
Posts: 3433
Joined: Mon Nov 20, 2006 9:31 pm

Post » Fri May 27, 2011 1:05 pm

Knowing that there was a hacker having a go at the community last year what would you do for a secure connection?

Connection security is not an issue, as you are not submitting any personal data.
Database verification for the server would be done at fliggs end. There is no point doing it anywhere else, as they can be avoided.
There is no data coming downstream
Even if it was, it is one terrible program desgin that allows evaluation of code from a remote source.
User avatar
liz barnes
 
Posts: 3387
Joined: Tue Oct 31, 2006 4:10 am

Post » Fri May 27, 2011 10:40 am

I sure hope I don't have to cut this into two posts as well. :hehe:

If you keep history for a person's data, you could graph the progression of their character, which might be interesting.

An interesting idea. Seems like something that will need to be implemented once I get the basic idea working though. Right now my model is based upon overwriting data as it is updated; but that goal is something I will keep in mind.

I can do this! Give me the specifications, such as pixel dimensions, and what you want it to look like and I can get started.

Fantastic! As it is, I have a blank slate; so I will design it around what you build. I suppose for dimensions something like 200x700 px would work well enough. I don't yet have any ideas for the actual look of the place, other than it needs to say "Morrowind" somehow. I would like to keep it different than the Morrowtheme I have as default at GHF though. You are the artist, so I trust your judgment. This is to be a community-endowed project. Perhaps some of the in-game signs (and all of the beautiful retexes out there for them) could give an idea of how a sign for a census and excise office should look. The only requirements I give is the text; I want it to just say "Census and Excise Office." Depending on how it looks complete, I don't care if you feel that using & instead of "and" is better, just so long as the title comes across somehow.

Thank you! :hehe:

- How about having an icon next to everyone's avatar at the GHF Forums, which if they customize their profile it will link to their character(s).

Fantastic idea. Something that would be implemented once this is up and running though.

- Some sort of system for "hooks" so that other mods can add references to this list easily, without having to rewrite any scripts.

Indeed, something that ought to be done. I'm not entirely sure the best way to go about doing something like that, but I have given it thought. I was considering adding things from some of my mods such as number of revenants raised, or number of duels fought. Modding is the name of the game here, so will have to figure out how to make that work. I need to learn a bit more about how MySQL works first so that I can allow for infinite growth like this.

What's the security on something like this Fliggerty? I suffer Internet paranoia and am always deleting cookies and quite careful about what can access my machine.

Knowing that there was a hacker having a go at the community last year what would you do for a secure connection?

I think this is obviously a major concern for me since GHF was one of those hit. I have become quite paranoid about security; that is one of the main reasons I set up a test server at my house, so that I wouldn't be leaving any holes during development.

I am paranoid about SQL injections. Google has a lot to offer though, I spent considerable time yesterday reading a lot about PHP + MySQL security. I will be taking every precaution to keep this as safe and secure as possible. And I am hoping that as far as individuals users download the necessary software and register with the site that my personal reputation around here will contribute to their trust of any endeavor of mine.

How will it work if you have a custom race?

The user will have the option to edit many things, especially mod added aspects of a character. I believe that the setup process in the mod itself will allow the player to input such things; alternatively they can be edited on the site itself.

That's your first database architecture from scratch? You're one hell of a fast-learner.
That's a whole lot better then what I usually see from people who work full-time as programmers.

Thank you, such a compliment means a lot. I've always prided myself on picking up such things quickly. C++ was the exception though...I just can't wrap my head around it for some reason. Although PHP makes perfect sense to me. :shrug:

I believe that the Users table is going to be a bit different. I've been going through a tutorial about implementing an access control list, and the structure suggested for that is a bit different from what I suggested. I will be modifying things a bit to account for that.

I suggest you change IsActive for CreationDate (which I don't see anywhere; might be interesting to keep). When a character is created, you can initialize CreationDate and LastDBUpdate to the same time. Basically, if CreationDate=LastDBUpdate, it means no data has been uploaded yet.

Wonderful suggestion. I have noted it.

Might be worth storing in a separate table, so update queries from the app and update queries from the web won't be focused on the same table.

Does doing such a thing help improve speed and performance? Or is there another reason that doing this is suggested?

So you are suggesting that I make a separate table for data that is collected from the website itself? Should I then include things like the CreationDate in this second table?
User avatar
Emmie Cate
 
Posts: 3372
Joined: Sun Mar 11, 2007 12:01 am

Post » Fri May 27, 2011 1:49 am

Post #2

You could combine these bunch of true/false in binary strings. Like 100101100 where first number is INT fortified: TRUE, second number is STR fortified: FALSE, third number is PERS fortified: FALSE. Only consider this if you don't plan on allowing users to do a search for characters that have an attribute fortified or damaged, or if you don't mind getting a slight headache.

Another good idea, seems to simplify and complicate things at the same time. My type of change! :goodjob:

I also jotted down your suggestion for the vampire change and the faction table. Upon thinking about it, I do think that it may be best to keep faction information in a second table. As such, it is probably best to put the vampire info there, as the clans are technically factions.

I have no idea, but would it make sense to list these per body slots and have only one row per character? Like characterID, Feets, Legs1, Legs2, LeftHand, RightHand, LeftShoulder, RightShoulder, Chest, Over (robes), Neck, Head, Belt, Amulet, Ring1, Ring2 (I might be missing some)? You wouldn't be able to differentiate between gloves and gauntlets, but I don't know if it's an issue.
edit: I'm missing leg3 (pants+skirt+greaves) and chest2 (shirt+cuirass)

The problem with this is the lack of scripting functions to determine what slot something equipped belongs in. I can find what is equipped, but that's about it. I have worked out a complicated method for determining armor type, but it is overly complicated and intensive to be run as often as this will need to do. So I think we will have to settle for simply listing what is equipped, divided by armor and clothing. I would hope that MWSE will fix this in the future.

As for the rest of the inventory, I actually think it will be best to maybe have it all listed in a single text file.

I'd suggest putting it as CharacterID | Creature/NPC | isHostile

So you say that it would be a single row for each NPC? That would get pretty big too. What if rather, this table was changed to represent the current cell, with 20 columns for hostile NPCs and 20 for friendly? That would allow for the data to easily be overwritten with each update, and probably avoid more bloat.

That's gonna get very big very fast. If you don't plan on making this info available through search (like search all characters that use this mod), you might want to consider keeping this in a text file, one for each character.

Thanks for the suggestion. Probably a good thing to do indeed.

Out of curiosity, your lamp's P is PHP right?

Yes, it is. I'm using Ubuntu Server 8.10 Intrepid Ibex. Apache 2, and the latest MySQL and PHP 5.

A fast updating home page that loads achievements from players as they happen might also be cool - like a shout out wall or twitter I guess. Gaaark the orc barbarian is entering xxx ancestral tomb, Wilfred the woodelf mage has been named nerevarine, Kaz the argonian scout has found the backbiter bow, Toby the breton thief has reached 15th level... etc etc. Colour coded for world/lore events vs game mechanic things like leveling, or make the choice a toggle to see either or all. Lots of options I guess.

That would be fun indeed. Again though, this is one of those things that ought to be added once the basic function is implemented. It would actually be quite easy for most things too; all that would be needed is to check journal entries.

One thing I did allow for in the initial database idea is a custom message from the player. I will implement a way for the player to initiate a text box that they can type a message in. When they do, it will be sent to the database immediately and displayed on the character screen. So they could something like "Here I go, to face Dagoth Ur!"

Hm. I think this brings an excellent opportunity to follow the players in-game progress, specially the MQ. The quest-instructions and saga should be able to fit neatly in a text-file. I believe the main quests - thus, the headlines - should all exist in one page. That gives the people over viewing the "players" site, a possibility to see the persons story-based progress. I have more ideas on this subject, but to not confuse or bring a headache to someone, I will stop, for now.

I do like that idea. It could easily be divided into MW, Trib, and BM sections, and the highlights are displayed when it is done. Something to think on.
User avatar
liz barnes
 
Posts: 3387
Joined: Tue Oct 31, 2006 4:10 am

Post » Fri May 27, 2011 11:24 am

And #3. :hehe:

I don't know exactly what this is, but assume it the characters location in the game. Can this be done dynamically? I was thinking a world-map, and adding map-locator's "activators" to the important parts of the game such one as Vivec, Balmora, Suran.. you get the picture. Perhaps even making it co-operate with the original map locating system in Morrowind. It would be fun, time from time, to see where the other persons is, While doing your own adventure. Maybe.. (it's a long-shoot) But, maybe you can add more rows to this column, telling former positions, thus and creating a "tail" where you which way or, in what direction you are heading. Just an idea, thou.

Beyond my current capabilities, but that can always change. :P I can tell which direction the player is facing at any given time, so long as they are in an exterior cell. That might be one more bit of data to add.

Looks good, but I missing a column for a player to write a comment of his print. Thats just my theory. But, if the column is created it should contain of its own ID, perhaps linked through the Comment table back here. I surely believe you will figure out a solution.

Oh there is, I called it "Caption."

In my opinion character table has too many rows, so I would use a few child tables for it:

Wait, you can do that? I didn't know you could put a table in a table. I'll go learn how that works.

One containing all skills with information on their level and whether they were misc/minor or major, whether they were damaged, drained or fortified.

Unfortunately I can't easily tell if a skill is damaged or fortified (unless the player is GCD, then it's a bit easier.) Only with attributed. Another thing I hope to remedy with the next version of MWSE.

A table consisting of all, the spells, which the character has (you forgot the spells).

And spells are another problem. Without running a script that checks for each and every possible spell in the game (which wouldn't be mod compatible) I can't find what spells are on the player. I can determine which spell effects (for some of them, the function doesn't work for all,) but not the name nor magnitude of the spell. I'm still unsure how best to handle this. I may end up limiting spells to only racial ones, or just allow the player to input the spells themselves.


Thanks for all the kind words everyone! :goodjob:
User avatar
Paul Rice
 
Posts: 3430
Joined: Thu Jun 14, 2007 11:51 am

Post » Fri May 27, 2011 3:37 am

And #3. :hehe:
Wait, you can do that? I didn't know you could put a table in a table. I'll go learn how that works.


Unfortunately I can't easily tell if a skill is damaged or fortified (unless the player is GCD, then it's a bit easier.) Only with attributed. Another thing I hope to remedy with the next version of MWSE.


And spells are another problem. Without running a script that checks for each and every possible spell in the game (which wouldn't be mod compatible) I can't find what spells are on the player. I can determine which spell effects (for some of them, the function doesn't work for all,) but not the name nor magnitude of the spell. I'm still unsure how best to handle this. I may end up limiting spells to only racial ones, or just allow the player to input the spells themselves.


Thanks for all the kind words everyone! :goodjob:

I haven't looked at MWSQL, but if it uses normal sql or something similar, then the principle is that, you have a mastertable, which you could call it character with a primary key, which should be system generated to ensure, that it's unique. This table could also standard information like character name, race, level, birthsign and maybe also other information (the vampire example is an efficient way of storing the information, but remember, that you have to both encode it and decode it).
Then you can have the childtables, which are tables as well. They have a row with the value of the primary key for the character it belongs to, so you easily can fetch the data to the character.

With as many rows as you mentioned in your first post, it will cost in performence, while extra rows aren't that expensive as long as the subtables are indexed correctly (using the row with the value of the primary key). It should also be easier to get an overview, I believe.

I hope that made sense.
User avatar
Lady Shocka
 
Posts: 3452
Joined: Mon Aug 21, 2006 10:59 pm

Post » Fri May 27, 2011 4:13 am

G/l With this fliggerty Its gonna be hard..
User avatar
Zualett
 
Posts: 3567
Joined: Mon Aug 20, 2007 6:36 pm

Post » Fri May 27, 2011 1:53 pm

As a natural-born showoff, I love this idea :D
User avatar
Richard
 
Posts: 3371
Joined: Sat Oct 13, 2007 2:50 pm

Post » Fri May 27, 2011 2:27 am

G/l With this fliggerty Its gonna be hard..


Of course it is...that's why I love the idea! :hehe:
User avatar
Monika Krzyzak
 
Posts: 3471
Joined: Fri Oct 13, 2006 11:29 pm

Post » Fri May 27, 2011 2:57 pm

I think the end goal would be the ability to download the character that you are viewing online. It is something that I am definitely keeping in mind, but I would actually consider that to kind of be the aim of "Version 2.0" of this project. Of course, that is the reason that I want to be able to incorporate ES Search to find the mods in the displayed mod list.



How about an Object Definitions Export for all equipped items, complete with media file extraction and bzip compression for storage in "blob" records associated with the character?
User avatar
Euan
 
Posts: 3376
Joined: Mon May 14, 2007 3:34 pm

Post » Fri May 27, 2011 12:42 pm

Haha! 3 posts!

Does doing such a thing help improve speed and performance? Or is there another reason that doing this is suggested?

It's not primarely about having only one source of updates. It's mostly about the PageViews column that has to be updated whenever a character is viewed, which means every reading query on the character table, implies a writting query on the same table. So your amount of writes on the character table will always be greater or equal to your amount of reads.

If you go with the replication solution with replay logs, you'll have to be careful of your write/read ratio on the same given table. The lower, the better. Replication performs best when the amount of reads is greater then the amount of writes. Otherwise queries tend to pile up in the process list, depending on how much queries you get and how fast your server can treat them.

It might not become an issue. You'll have a better idea of how it performs when you get to do some tests with live testers playing the game while other live users browse the website.

Another good idea, seems to simplify and complicate things at the same time. My type of change! :goodjob:

Yeah, but if you go with Zarnatheron's suggestion of splitting stats in a separate table, which I think is better, it won't be worth the hassle.
You can always apply it somewhere else. It's a handy way to stuff lots of true/false flags in a single variable or table column.

So you say that it would be a single row for each NPC? That would get pretty big too. What if rather, this table was changed to represent the current cell, with 20 columns for hostile NPCs and 20 for friendly? That would allow for the data to easily be overwritten with each update, and probably avoid more bloat.

Re-reading it your original post, I realize you meant columns. So my thing isn't a good idea after all. You'd better stick with your original idea.

Yes, it is. I'm using Ubuntu Server 8.10 Intrepid Ibex. Apache 2, and the latest MySQL and PHP 5.

Nice.

In my opinion character table has too many rows, so I would use a few child tables for it:

Wait, you can do that? I didn't know you could put a table in a table. I'll go learn how that works.


No tables within tables, but tables relating to an ID in another table. Exactly like you already did with your Users table and your Character tables.
User avatar
Cayal
 
Posts: 3398
Joined: Tue Jan 30, 2007 6:24 pm

Post » Fri May 27, 2011 1:41 pm

I got ahold of a little mysql distro, and it seems to have the required files to make.............

MyMWSQL

Just need to get the hang of the new API, change the pipe name. Generally it'll be the same, but this should save everyone quite a bit of time from developing new programs. I also got cURL, and am looking into it. As soon as Code::Blocks works right [kicks it]

It will, in the end, interface with databases similar to MWSQL. The problem is I can either have a MySQL embedded server or make it solely client (all that is needed here is client, so this could be a special case deviation).
SQLite, it seems, is far better for the goal of MWSQL. However, the code can be (almost completely) reused for this.

@ Fligg: if you have any special feature requests, and you wanna use a variation of mwsql, I'll see what I can do.

I haven't looked at MWSQL, but if it uses normal sql or something similar

MWSQL, at least as far as queries goes, is standard SQL. It only wraps SQLite and allows communication, it does no internal query processing.
User avatar
Dezzeh
 
Posts: 3414
Joined: Sat Jun 16, 2007 2:49 am

Post » Fri May 27, 2011 5:35 am

A minor update:
- I looked at the MySQL more in-depth.
- All but the result handling code of MWSQL has been ported to MySQL, renamed MyMWSQL. I actually got the row count functional as well.
- It appears cURL won't be needed with the MySQL API, it can connect directly to the server (or from settings in an ini, if that's easier).

So if you, Mr Fligg, do choose to use this for your client-side app, it's almost done. If not, I've learned a little more. :)

Edit: I'm trying to get the code for both versions up, but am having a [censored] of a time with Subversion.
User avatar
Sunnii Bebiieh
 
Posts: 3454
Joined: Wed Apr 11, 2007 7:57 pm

Post » Fri May 27, 2011 12:12 pm

No tables within tables, but tables relating to an ID in another table. Exactly like you already did with your Users table and your Character tables.

Ah, ok. I understand now.

I think that I will be breaking the character table up a little bit. The factions will go in a separate table, and I believe the "current data," such as current cell etc will be another one.

Sounds great peachy!

@ Fligg: if you have any special feature requests, and you wanna use a variation of mwsql, I'll see what I can do.

I do intend to use MWSQL, the whole plan is based around it. ;)

There are two things that I would like to get which it doesn't currently do (primarily because that is not within the scope of MWSQL.) I want to be able to read the mod list from Morrowind.ini, and also send the journal.htm. Is there any way you would be able/willing to perhaps come up with a way to facilitate that? :icecream:

- It appears cURL won't be needed with the MySQL API, it can connect directly to the server (or from settings in an ini, if that's easier).


Okay, so we can have this either query a local database, or a remote database? So we could then give the user the option to just directly write this to our online database without wasting the time and effort of writing it locally first, as Yacoby originally suggested. Or they can change an ini setting and store it locally to be able to upload it later? That would be the best of both worlds, without any compromise at all.

Although, I do have one concern about having it written directly to the online db. It would be fairly simple for someone to make a small program that writes to your pipe (or even use MWSE I suppose) and call all sorts of queries, correct? So this would essentially give someone the option to access everything in the database if they query the right things. Security is an aspect of this that I haven't entirely delved into, though I will before this gets much further along. I had assumed that if we had something running server-side that would accept the data from the client and then write it in the db that there would be the opportunity to check for SQL injection and other such things. But if we are writing it directly from MW, that option isn't available. Does anyone have a suggestion for this perhaps?


P.S. I just want to take a second and complain about "Authorization Mismatch." Anyone else been seeing that an awful lot lately? I can't type more than a few sentences without the need to reload the page before I can post. I sure wish they would change that back to how it was. :(
User avatar
Kellymarie Heppell
 
Posts: 3456
Joined: Mon Jul 24, 2006 4:37 am

Post » Fri May 27, 2011 3:18 am

P.S. I just want to take a second and complain about "Authorization Mismatch." Anyone else been seeing that an awful lot lately? I can't type more than a few sentences without the need to reload the page before I can post. I sure wish they would change that back to how it was. :(
Yes, that and a time out wait before I can send a second PM.

Thought I could comment better on that than MWSQL. :D
User avatar
Motionsharp
 
Posts: 3437
Joined: Sun Aug 06, 2006 1:33 am

Post » Fri May 27, 2011 12:09 pm

The idea really appeals to me. Nope I can't do much to help, but I'm interested in to somehow take part in it...
User avatar
Vincent Joe
 
Posts: 3370
Joined: Wed Sep 26, 2007 1:13 pm

Post » Fri May 27, 2011 5:08 pm

There are two things that I would like to get which it doesn't currently do (primarily because that is not within the scope of MWSQL.) I want to be able to read the mod list from Morrowind.ini, and also send the journal.htm. Is there any way you would be able/willing to perhaps come up with a way to facilitate that? 1146.gif

Reading the INI should be no problem. I'm pretty sure there's code for that in the windows sdk, so I'll just use those functions.

Uploading the journal is trickier. You'd either have to pass the file or read and pass chunks, or have a huge field in the database. I don't know if it's a good idea to keep journals on your site, but it's possible I think.


Okay, so we can have this either query a local database, or a remote database? So we could then give the user the option to just directly write this to our online database without wasting the time and effort of writing it locally first, as Yacoby originally suggested. Or they can change an ini setting and store it locally to be able to upload it later? That would be the best of both worlds, without any compromise at all.

Unfortunately, I don't know if the MySQL part can access a local database. Which makes it incompatible with MWSQL (kinda, or would have to run on another pipe next to it). Unless both are combined. I'm not exactly sure, but I'm starting to think having an external app you run and uploads the data could be far simpler, at least for users.
How it works now, you have MWSQL, using SQLite and a local database. Or MyMWSQL, using MySQL (client only) and a remote server and database. The former is perfect for storage by mods, the latter is useless, as it's forced off-site. You would either have to have a MySQL server included or on your system, or something along those lines. Or run both. Horribly complicated.
Writing the data out to MWSQL/SQLite, then having an app read that data (or the savegame directly, as it contains everything) and send it up to the server using MySQL would keep one app running in the game and probably simplify things quite a bit.

Although, I do have one concern about having it written directly to the online db. It would be fairly simple for someone to make a small program that writes to your pipe (or even use MWSE I suppose) and call all sorts of queries, correct? So this would essentially give someone the option to access everything in the database if they query the right things. Security is an aspect of this that I haven't entirely delved into, though I will before this gets much further along. I had assumed that if we had something running server-side that would accept the data from the client and then write it in the db that there would be the opportunity to check for SQL injection and other such things. But if we are writing it directly from MW, that option isn't available. Does anyone have a suggestion for this perhaps?

That's a possible problem. My testing program, actually, can write to the pipe (lets you test things without opening the game). That would be all that needs done.
You would have to set up a filter at the server to help with that, or (probably a better solution), upload the data using post (and cURL) to a webpage.

That's the best solution. Just popped into my head. Essentially, the data is written to MWSQL. No MyMWSQL exists, so everything is fully compatible. Whenever you want to upload your data, you run another program, pick a savegame (or database). It read that in, translates it into various fields for a POST, and opens a webpage. The page (written in PHP with filters, only accepts data, no requests and returns, which I could set up for you) adds/updates the character in the database and takes the person to that char's page.

It's essentially perfectly secure (except for huge numbers of chars being added) since the data being sent is strictly limited to what the page reads in from the $_POST array in PHP.

Edit: That's confusing. Here's a list/chart:
- Player saves game
- Player closes game
- Player runs upload program
- Upload program reads game, taking certain records and adds them to a POST query
- Upload program sends the request and POST data to http://fliggerty.com/addchar.php
- addchar.php takes the data, reads certain fields from the POST data, and updates the database

All login information for the database, even the name of the database and table names, is kept on the server and protected by PHP and Apache. Similar to every CMS that exists, and should be just as secure.
It requires one program run by the player, and three pages on the server (add/update character, view characters list, view this character). One database, one or two tables (stats and inventory).
User avatar
Kortknee Bell
 
Posts: 3345
Joined: Tue Jan 30, 2007 5:05 pm

Post » Fri May 27, 2011 2:07 am

Maybe just have all "submit" operations handled by Stored Procedures? That way you could abstract the interface to minimize client-side changes as the database evolves, while validating input and performing add/delete/update operations in a controlled environment.

It's not such a bad thing to allow arbitrary SELECT queries though, maybe someone will want to write custom client apps for as yet unforeseen purposes?
User avatar
dav
 
Posts: 3338
Joined: Mon Jul 30, 2007 3:46 pm

Post » Fri May 27, 2011 1:34 am

That's the best solution. Just popped into my head. Essentially, the data is written to MWSQL. No MyMWSQL exists, so everything is fully compatible. Whenever you want to upload your data, you run another program, pick a savegame (or database). It read that in, translates it into various fields for a POST, and opens a webpage. The page (written in PHP with filters, only accepts data, no requests and returns, which I could set up for you) adds/updates the character in the database and takes the person to that char's page.

Heh, that was what I suggested in the first thread :P (Well nearly)

Although you don't need to open a webpage, you can just send the request to the server. IDK if that is what you meant by 'opens a webpage'

You may want fields in the local database that contain a boolean value if it has changed since it was last updated to the remove server. Cut down on the bandwidth costs, although it may add too much complexity to the MW Code side, which doesn't handle added complexity well (i.e. You can't generalize it into a function). Deppends on the design. :shrug:



@Fligg
If you are going to do a big app in PHP, look up the MVC (Model–view–controller) pattern. There are a load of PHP frameworks, and then there is always stuff like Rails.
User avatar
Petr Jordy Zugar
 
Posts: 3497
Joined: Tue Jul 03, 2007 10:10 pm

Post » Fri May 27, 2011 11:53 am

@ Shanjaq:
If things were updated through a PHP page, any updates needed in the future could be easily modified for that, as could sending data.
That sounds like a much more secure interface, and it would be relatively simple. Old versions could be told to update or be kept compatible, while new ones would supply all the right data. The PHP would take care of updating or adding, splitting, and building the query.


@ Yacoby:
Yeah, well... :P
I meant send the request, not exactly open the page. Unless you wanna do a profile type deal where it opens the page with your new info displayed.

I'm not sure about how to check for updated-since part, though.
Say you have a program that reads the save file and sends the data. Well, you would have to check each field against a stored copy, doubling the space. Or against a checksum of the previous field. Or something. I think checking the save or the database generated for a new checksum would work better, although you would update all the fields.
User avatar
Liii BLATES
 
Posts: 3423
Joined: Tue Aug 22, 2006 10:41 am

Post » Fri May 27, 2011 8:29 am

Reading the INI should be no problem. I'm pretty sure there's code for that in the windows sdk, so I'll just use those functions.

Even Morrowind uses those functions to read its own Morrowind.ini - GetPrivateProfileSection, GetPrivateProfileString.
User avatar
-__^
 
Posts: 3420
Joined: Mon Nov 20, 2006 4:48 pm

Post » Fri May 27, 2011 4:29 pm

Even Morrowind uses those functions to read its own Morrowind.ini - GetPrivateProfileSection, GetPrivateProfileString.


Indeed it does. They seem to be in the docs, too. I'll just use those in whatever app ends up doing this job.
It's also nice how many things MW calls from DLLs. That's the only reason using the My Games folder could be possible, since the import table can be changed around.
User avatar
Rachyroo
 
Posts: 3415
Joined: Tue Jun 20, 2006 11:23 pm

Post » Fri May 27, 2011 8:00 am

@ Yacoby:
[...]
I'm not sure about how to check for updated-since part, though.
Say you have a program that reads the save file and sends the data. Well, you would have to check each field against a stored copy, doubling the space. Or against a checksum of the previous field. Or something. I think checking the save or the database generated for a new checksum would work better, although you would update all the fields.

In its most basic concept (ie take up loads of space, is crap), when the program that syncs the data would create a copy of the database when it uploaded the data, next time it uploaded the data, it would do a comparison check with the data it had previously uploaded (stored in the copy of the database), and only upload the changes. It would then copy the current database (now the same as the one on the remote server), overwriting the previous copy.
Of course, there are more elegant solutions...

Trade off with bandwidth usage / upload time and storage space on the users harddrive.
User avatar
Charlotte Henderson
 
Posts: 3337
Joined: Wed Oct 11, 2006 12:37 pm

PreviousNext

Return to III - Morrowind