Topic: Strat and Bonk - Mod Chooser, SFC Direct integration - Mods standardisation  (Read 21534 times)

0 Members and 1 Guest are viewing this topic.

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Strat sent me PM the other day with some good ideas to discuss, I though I'd start a record here for now.

We just had a chat on IRC:

Quote
<Bonk> hiya.... one sec...
<Bonk> some good ideas in that PM...
<Bonk> you'll notice that OP+4 already has registry entries
<Bonk> SFB-OP-04 does as well... but only relating to the uninstall
<Bonk> we shoould start a thread to develop this somewhere
<Strat> oh hey!
<Bonk> hey!
<Strat> yeah
<Strat> I saw those keys
<Strat> But the chooser would need more info
<Bonk> yup
<Strat> and I've been debateing if another method of saving the data would be better
<Bonk> I think we should discuss a possible mods standardisation in an apporpriate forum
<Strat> Basically I've decided that I would try another method of file verification than file size
<Bonk> so we have a record and some input
<Strat> MD5
<Bonk> or CRC32
<Strat> I'm not really familiar with either
<Bonk> thats what the serverkit uses
<Strat> oh ok
<Strat> wow
<Strat> I guess I could start a thread
<Bonk> shouldn;t be do hard to get a CRC of a file in VB
<Strat> well I'd have to research it
<Bonk> worst case it might need a windows API call
<Strat> MD5 look like real hard.. at least for me
<Bonk> there's probably some code snippets out there to do it.
<Bonk> lemme did up your PM here...
<Bonk> oh yes...
<Bonk> integration with SFC direct...
<Strat> well i was brainsotrming and that was a thought
<Bonk> if the mod chooser could accept a command line parameter
<Strat> thats what I trhought too
<Strat> of course I dn't know how to do that yet
<Strat> but I'm hopeful
<Bonk> again, shouldn't be too hard
<Bonk> I'd bet there's help on VB websites for both command line parameters and CRCs
<Strat> oh yes
<Strat> I'll keep searching
<Bonk> whcih version you using?
<Strat> most of my troubles are not the code, there is substabntial documentation
<Strat> Express
<Strat> VB
<Bonk> 2005?
<Strat> Yeah
<Bonk> k...
<Strat> Free stuff ;)
<Bonk> yay!
<Strat> lol
<Bonk> for the command line
<Bonk> we'd jsut need to pass something like
<Bonk> "/mod=hardcore"
<Bonk> or 
<Strat> Yes
<Bonk> "/mod=OPP4"
<Strat> exactly
<Strat> which means
<Strat> (Dunno if you've used my older version 6.5 before)
<Bonk> once you come up with that I'd jsut need a list of the mod codes used in the command line
<Strat> The Mod Developter would have to determine his own mod code
<Bonk> have it installed but onoly used it once I think...
<Strat> right now people name thier own mods
<Bonk> you can decide on the mod code...
<Strat> if each user determined a mod code they would not be consistant
<Bonk> or we could make it part of our porpsed stadardised mod structure
<Strat> That my thought
<Bonk> well you can assign them unique codes...
<Bonk> as long as I know which code corresponds to which mod
<Strat> If I was willing to do that for every mod ever made and ask people to DL updates
<Strat> if the delevoper did it, its all much faster and cohesive
<Bonk> they could even be numbers...
<Strat> just two devs cant use same code lol
<Strat> that too
<Strat> Hey
<Strat> the CRC could be the code!
<Strat> hmm
<Strat> perhaps..
<Bonk> could be.... that might be a good idea...
<Strat> well, it would need CRC of shiplist, ftrlist, and modelsiz at least
<Strat> and that a long number
<Strat> Mod code might be better
<Bonk> CRC of the shiplist only would do
<Bonk> mod code would be easier
<Strat> yeah
<Bonk> about the mod chooser and models however...
<Strat> uhuh?
<Bonk> my models folder is huge...
<Strat> lol
<Bonk> 2.29GB
<Bonk> !!!
<Strat> ok, so whats the problem?
<Bonk> does the mod chooser deal with models?
<Strat> From watching people like firesoul and Chris
<Bonk> its vital that the proper models are in place for a mod
<Strat> They mostly don't edit the Models folder at all excet for the modelssiz file
<Strat> They make a serpate folder with the models
<Bonk> or the mod won't work
<Strat> and use the shiplsit and ftrlist to point to those
<Bonk> yes, the models siz is critical
<Strat> but see
<Strat> this would also need to be a standerd
<Bonk> but if a user does not have the proper models in place the mod can crash unpredicatably
<Strat> that no dev edit the models fodler
<Strat> he must make his owm models folder and point the shiplsit to that
<Bonk> SFB-OP-O4 used a subfolder of the models folder
<Strat> just as long as the models themselves artn't edited
<Strat> OP doesn't know
<Strat> but I do think
<Strat> that another folers, perhaps called Mods below assets
<Strat> and each Mod in its own folder below there
<Bonk> I've learned that you cannot caount on the stock models being intact
<Strat> with files like shiplsit models sizes and other thing (sounds GF's_)
<Strat> would be more oranized
<Bonk> particularly with folks like dizzy or kroma
<Strat> hmm
<Bonk> perhaps mods should have an ini file in the op root with all these locations...
<Strat> as long as the model.siz file is ok, then it sohuld not matter what picuteres they use if it doesn't crash them
<Strat> Exactly!
<Bonk> these are the kind of ideas we should put into a thread...
<Strat> I need the dev to proviede the Chooser with a list of all files and there CRC's
<Bonk> just where do we start it... hmmm...
<Bonk> mods forum?
<Strat> Well Bonk, I'm just
<Bonk> beta forum for now and moce it later?
<Strat> My last mod chooser never cught on, Firesoul nor Chris really ever aknowldged it
<Strat> They kep giving poeple batch files
<Bonk> I think if we work on it a bit, and integrate it with SFC DIrect it might help
<Strat> that my hop ealso
<Bonk> I just spent most of this week making a
<Bonk> msi installer for Apache 2.2.0
<Strat> I think that if we (or I) work out enough details, they will see that we've thought of everything to make it easer for them the dev and the end user
<Bonk> I used the evaluation of InstallSheild
<Strat> Making installers is not easy stuff
<Bonk> you might want to take a look at it
<Bonk> it has a lot of the features you're thinking of
<Strat> For my last version I used a freeware tool
<Strat> GInstall
<Bonk> installation repair, upates, downloads etc...
<Strat> hmm
<Bonk> I'm a fan of NSIS (free!)
<Strat> lol
<Strat> I'll have to look that up too
<Bonk> the problem with INstllSheild is its a 3 week eval
<Strat> yeah
<Strat> and really expensive
<Bonk> and the full premier edition costs $2500
<Strat> lol
<Bonk> yup, really expensive
<Strat> I really want the installer to only install
<Strat> I want the Chooser to do eveything else itself
<Bonk> cool, stick with what works for ya...
<Strat> an all in one place tool
<Strat> yeah
<Bonk> I think we're on the same page here...
<Strat> let me ask you though
<Strat> you've already given me idea to use the CRC
<Strat> but as for a files data
<Strat> do you think I should have a file name and CRC of EVERY file in the mod? or just critical files?
<Strat> I've been thinking that there are a lot of pictures
<Strat> and if a few are missing, well that will crash OP
<Bonk> hmmm.... you could skip textures....
<Strat> and the chooser could catch that
<Strat> but thats a BIG list
<Bonk> ah perhaps
<Bonk> depends on how ffast you can get t to run and store...
<Bonk> ini editing/checking capability might be good too...
<Bonk> (warp doubling)
<Strat> aha!
<Strat> good idea!
<Strat> I wrote that down lol
<Bonk> of course only modifying the desired lines of sfc.ini
<Strat> right
<Strat> and I've done that in my oldder version
<Bonk> I'll copy this chat transcript to a thread int he beta forum if that's OK with you
<Bonk> so we have a record
<Strat> sure thing
<Strat> back to my long question
<Strat> lol
<Bonk> shoot
<Strat> If I save file data on ALL files in a devs mod, where do you think a good place is to store alll that info?
<Strat> Not the registry?
<Bonk> i'd be tempted to use a flatfile db
<Strat> I don't know how to do that
<Strat> lol
<Strat> yet I guess, if there info on how
<Bonk> I have a setup to read a flatfile db in VB
<Bonk> nice n simple
<Bonk> csv db loadable in excel
<Bonk> just used a standard ms schema.ini
<Strat> just a tab delimted Text file?
<Bonk> I'll pass it along to ya
<Strat> ok
<Bonk> csv, but tab delimited would do to...
<Bonk> it ws for a F&E project that never took off
<Strat> do you know how to make a program read a compressed file?
<Strat> like op does with sounds and music?
<Bonk> with php or NSIS yes
<Bonk> should be doable in C
<Strat> but not VB?
<Bonk> also in VB
<Bonk> might take a windows api call...
<Bonk> or something like zlib
<Strat> I think compressing the flatfile with all that info would save a considerable amount fo space
<Bonk> have you called a dll in VB?
<Strat> no
<Strat> Hev'ent really messed with DLLs yet
<Bonk> no compressions would only slow access to a flatfile db
<Bonk> the simple databse code I have is witten for a dll
<Strat> well text I suppose doesn't take up that much space relative speaking
<Strat> like a 500 Meg Mod
<Strat> ok
<Bonk> a vb dll that is, I just called it from a simple form to test it
<Bonk> you'll see when I send it to ya...
<Strat> excellent
<Bonk> might try and make a simple windows API call project
<Bonk> like calling muldiv
<Bonk> opens a lot of doors for bv
<Strat> just to test it out yeah
<Bonk> *vb
<Bonk> lets start a thread in the beta forums for development
<Strat> ok
<Bonk> and send ya that old F&E project (was for VB5)
<Strat> you may also put my PM
<Strat> oh wow lol
<Bonk> oh might have been VB 6 I forget now...
<Bonk> but it should be readable/convertable
<Strat> VB 5 is rpetty old
<Strat> yeah
<Strat> I tell what one of the thing most frustrated me was hardcore
<Strat> The installer will NOT install hardcore if you have OP+ 4
<Strat> and a mod choose cant change a od that wont install itself if there are other mods
<Bonk> the idea is OK but making all the pirate ships bpv 999 was not such a great ideaIMO
<Strat> lol
<Bonk> ah, yes I see your difficulty
<Strat> yeah so I was pissed
<Strat> but I got over it lol
<Bonk> well, I'll go start that thread and pack that old vb stuff up to mail to ya
<Strat> sounds great
<Strat> Thanks Bonk

Which should give you the idea of where we're going here.

Todo:
- discuss/establish a propsed standardised mod structure and information file.
- decide on a SFC Direct - Mod chooser integration strategy (command line with mod codes...?)
- discuss coding details.

And whatever else comes along!  ;D  Just wanted to get something down to get the ball rolling on this. (myself, I need to put some more work into the serverside of SFC Direct to get it up and running, its not far off now.)

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
A windows API call to get the command line:

Code: [Select]
Public Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As String

Might come in handy... ;)

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
A possible CRC utility for you in VB:

http://www.di-mgt.com.au/crypto.html#CRC

or perhaps:

http://edais.mvps.org/Tutorials/ZLib/ZLibch2.html

would be better...

or maybe:

http://homepage.ntlworld.com/chris_a/#CRCOcx  (this one looks most useful if it will work in VB 2005)
« Last Edit: March 26, 2006, 02:50:27 pm by Bonk »

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
Ok, let me expand a little further on what I want to accomplish.

Problems/Challenges

1) Myriads of Mods
-  Right now ther are many mods for OP, and Mods are continually made as the Dyna progresses
-  As mods are made by different people, there wind up eing many installs, many batch files, many copies of files, and there is no guarantee that mods will not interfere with one another.  This is especialyl true as eachd dev makes his own Batch files that only switch specific mods.
- it is inevitable that people less familiar with computers as a result of this confusion will corrupt thier OP install, which lead to next challenge

2) OP File Corruption
- As of now, it is not to difficult to corrupt an Op install to the point where a complete reinstallation is nessesary
- There is no quality check before the game is launched, causing untold number of crashes when finally in match

3) Verification
-  not technially a problem, but a shortfall
- No Launchers check the loaded lists if hey are appropriate for the game they are joining
- Means possible crashes, not for file corruption, but wrong mod loaded

4) Ease of use
- Not all Op players are technilogically inclined
- for many, having many different mods is too much to handle
- they don;t know what cuases crashes
- they don't know how to fix Op when te install goes bad
- They don't know how to configure GameSpy for multiple installs of OP
- What they really like a point and click for everything in one place

I think that hits the main points.   For a while I've been wanting a solution, and my first incarnation of the Mod Chooser dealt with a few of the issues.   Now I want to work on a more thorough and complete solution.

Current Version 6.5 Shortfalls I wish to address in next version:
1) File Verification
- Does not scan ALL the appropriate files
- Scans by file size, next version will use MD5 or CRC for file verification
- Provide command line based access to load (or make sure loaded) a specific mod before OP is launched

2) Only 4 mods
- Next version do 14 Mods, more is possible, but highly unlikly to be needed

3) File Corruption
- Next version will feature a specific feature to repait Op in such a way to prevent the need for complete reinstalls

4) Many Mods
- The mod Chooser will be able to organise and make compatible most of not all mods
- I propose a way though, that devs in the future, will design thier mods in such a way to directly inegrate with the Mod Chooser
--- The future will provide a way for te Dev to give it information such that it automatically know the new mod is there w/o having to detect it
--- The devs will also provide nessesary file information to verify the files (the CRC or MD5 info)
------ Else, the Mod chooser can detect this info on mod install, thought not as sure as if the Mod Developer provided it

5) easy to use! The Mod Chooser features:
- Auto Repair (Does a quick scan at startup if files are damamged)
- Deep Repair (does a deep scan of all OP files and Mods to verify thier quality)
- Point and click interface for changing Mods
- Auto Detection of Mods
- Mod File Back-up and Restore (smaller files)
- Auto Clean (If 1 Mod becomes damaged, remove the mod and all registry and files related to it)
--- This makes the reinstallation of the Damaged easier
- Auto Integration with new mods (Provided the devs follow guidelines and give needed info to the Chooser)


Now I have sat down and been writing psuedo code and notes to do all this, its just a matter of hasing so some few details left and seeing how the Devs feel about the ideas.  Some of it does require them to do things a little different, for better compatibility and standarization.

I'll post more as I have the time.

Strat


Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
Ok, here are more of my plans.

1) The database holding the File verification information will be encrypted.
This will prevent, after inegration with the SFC Direct launcher, a person from modifying the DB to possibly allow some custom file to be loaded while launching SFC.

Using the Mod Chooser as a launching utility, it will effectively prevent any kind of cheating (from edited files) by only allowing certain files to be loaded in order to join the game session.  This is further compounded by the fact that even the SFC Direct contains encryption to dissallow poeple to simple find a seesion's IP and joining manually.

2) I have also decided to create this version to switch any file in the OP directory that the Mod Developer chooses, as long as the Developer provides the Mod Switcher with the nessary information.  Otherwise, the Mod Chooser will only change more default files, those modable without the source code, and only those that are likely to be modded.  It will do this by scanning a preset list of files to see if any are edited.

3)The mod developer will be able to supply information to the Mod Chooser
-  The way this will work has not been totally decided yet, but I have in mind that the Dev will simply, using his Mods installer, put a text file with a specific name in the Mod Chooser Directory.  The text file will be a list of Files in his Mod, perhaps thier location, and thier CRC or MD5 (Not yet decided which I will use).  The Mod chooser will load these file details into its encrypted database, verify the mods integrity according to the file, make the mod available for selection, and erase the txt file the mod developer provided.
Edit:
- I think I will have the program leave the Mod Installer's File Detail list indstead of deleting it.  Having one of these with every mod gives an additional way of providing proof of the integrity of a mod.  Even if I encrypted the DB, without this file nothing prevents a creative person from making his own Mod with edited files and using the same Mod code as another mod.  When the mod chooser imported this mod, it would have false files, but it would not know that.

- Solution:  Leave the file detail list provided by the Dev for his mod, and have the the SFC Direct provide this File's MD5 and Mod Code to the Chooser for launching OP.  Even if the 'creative person' had edited the mod and kept another mod's Mod Code, he could not escape the fact his installer file has a different MD5.  The chooser would have to very the MD5 of the installer file also, so that the 'creative person' did not simply install his own mod, then replace his installer file with the installer file of the genuine mod.


4)  This will also depend on the Devs agreeing to a standerd of how they make thier mods.  Basically in the location of the files.  I propose the following:
--OP DIR
----|
----|-Assets
----|-ect
----|-Modifications
-----------|
-----------|-<Mod>
-----------|-<Mod>
-----------------|
-----------------|-Specs
-----------------|-Models
-----------------|-Strings
-----------------|-MetaAssets
-----------------|-Bitmaps


Of course more or less directories depening on what files a Mod is composed of. Just as long as this pattermn is followed, which almost directly mimics OP's existing directory structure, things are very well organized.  I think for the most part, the only thing a Dev would have to adjust is the location if his models and the shiplist ofr that new location.  The Mod Chooser will relocate all other files as needed.

I also suggest that the Stock models Folder not be edited Except for the Models.siz file.  This is just for data integrety issues, it would take too much room for the mod chooser to back up all those files.  Of course, there is no preventing a person from editing his own stock models folder. No data verification will be done on the bitmaps in the Stock models folder, there is no need as long as no mod edits it.  Also follows though, that if the adventurist screws up his OP by editing the Stock models, the Mod Chooser can not repair it.  The Mod Chooser will however verify that the files EXIST, so that a model for every ship exists and the absence of one can not crash OP. This will also mean that any mod(shiplist) can point to stock models and expect that they will be there.

I think this will make an excellent tool for OP.

Let me know you guys thoughts.
« Last Edit: April 02, 2006, 11:14:09 am by Strat »

Offline KBF-Crim

  • 1st Deacon ,Church of Taldren
  • Global Moderator
  • Commodore
  • *
  • Posts: 12271
  • Gender: Male
  • Crim,son of Rus'l
Drool....

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
I need to celebrate!

I just finished the encryption module!
 :multi: :woot: :tonybanks:

This will allow, like mentioned above, us to make sure that with the integrated SFC Direct, only certain files can be loaded in OP for someone to join a game session.

No, I don't expect anyone to cheat, but I figured, why not do it?  It only adds more capability to the program and its make me think.

I see this feature having more impact if the source ever got released.


Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
I wish I could currently share your enthusiasm. Unfortunately other factors have interfered. I had some comments to make and some more input, but they have been completly wiped from my mind. Hopefully these interfereing issues can soon be resolved one way or the other.  :(

Edit: I'll get back to you with my thoughts as soon as I can gather them up again.
« Last Edit: April 02, 2006, 05:52:11 pm by Bonk »

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
Update:

Today I finished the MD5 file checking function, and the commmand line parameters.

The hardest part I'm facing in connecting to a random access data file, but I'm going to have some help from some programmers I know that will help me set up a database.

I've been thinking about the command line parameters:

/loadmod:<modcode>
'Will cause the switcher to switch to the defined mod if it exists, without opening a GUI except for a progress bar

/modhash:<md5hash>
'Optional to accompany the loadmod command.   Will provide the switcher the MD5 of the mod's installer file to verify the integrety of the mod fixing to be loaded.

/checkmod:<modcode>
'Just threw that is there as an idea.  basically returns if a mod is valid or not.  Could return (damaged, OK, non existant)

/fullscan
'Will do a full scan of all mods and OP files to verify they are OK

/devmode
'also just an idea, a special mode for a mod dev to run the mod chooser in.  One major function would be for the Switcher to scan an installation of OP (where OP was clean installed with the Mod devs mod only mod installed over it) to generate the Installer file and all the MD5 file data needed.

Lest not forget

/help
'that should be self explanatory.

Ideas anyone?

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Update:

Today I finished the MD5 file checking function, and the commmand line parameters.

...

I've been thinking about the command line parameters:

/loadmod:<modcode>
'Will cause the switcher to switch to the defined mod if it exists, without opening a GUI except for a progress bar

/modhash:<md5hash>
'Optional to accompany the loadmod command.   Will provide the switcher the MD5 of the mod's installer file to verify the integrety of the mod fixing to be loaded.

/checkmod:<modcode>
'Just threw that is there as an idea.  basically returns if a mod is valid or not.  Could return (damaged, OK, non existant)

Whoot! Good job man!

These make sense to me and I should be able to work them into SFC Direct. Though using the form:
/LOADMOD=<modcode> would be much easier for me to deal with.

Oh wait though, I cant use an MD5 hash in a url as some of the characters used get mangled in a url. But the /CHECKMOD=<modcode> ought to do the job... ah but wait... if you base64 encode the md5 hash I could use it in urls... though I think just the other two parameters would be needed for basic SFC direct integration anyway (in such a way that would not require updating SFC direct with mod files MD5 hashes as they are added...)

Has the mod chooser got a registry key for its install location so I can tell SFC Direct where to find the copy of it installed on the client machine?

More thoughts on mods standardisation in general to come....

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
Hey,

Do you need the parameter to be all caps?

/LOADMOD=

Or does it matter?

As for the = or :, its very easy for mr to use either, so I will use '=' for you.

Also, can you give me some information about base64 encoding?


Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
= would be great, all caps is not really necessay but is just the way I have been doing it.

I'll see what I can dig up for ya on base64 encoding...

About that Mod Chooser install location registry key? (I could dig for the existing one but I do not see an uninstalltion entry for it in my add/remove programs dialog..)

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
I will make sure there is a key. ;)

Something like HKLocalMachine\Software\ModSwitcher
dir=<location>

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Cool...

Base64 stuff...:

http://en.wikipedia.org/wiki/Base64 (relevant RFCs linked here)

and from one of the same sites linked above:

http://www.di-mgt.com.au/crypto.html#Base64

Some hits on a google search: http://www.google.ca/search?q=base64+encoding+in+VB

http://www.aspsimply.com/vb/MIMECode.aspx

http://www.sevillaonline.com/ActiveX/Base64.htm
(also http://www.sevillaonline.com/ActiveX/code_snippets/crc32.htm linked from http://www.sevillaonline.com/ActiveX/)

And from MSDN:
http://lab.msdn.microsoft.com/search/?query=base64

Using the .NET Framework SDK:

http://msdn2.microsoft.com/en-us/library/system.xml.xmltextreader.readbase64.aspx

Visual Basic (Declaration)

Code: [Select]
Public Function ReadBase64 ( _
    array As Byte(), _
    offset As Integer, _
    len As Integer _
) As Integer

Visual Basic (Usage)

Code: [Select]
Dim instance As XmlTextReader
Dim array As Byte()
Dim offset As Integer
Dim len As Integer
Dim returnValue As Integer

returnValue = instance.ReadBase64(array, offset, len)


http://msdn2.microsoft.com/en-us/library/system.xml.xmltextwriter.writebase64(VS.80).aspx

Visual Basic (Declaration)

Code: [Select]
Public Overrides Sub WriteBase64 ( _
    buffer As Byte(), _
    index As Integer, _
    count As Integer _
)

Visual Basic (Usage)
Code: [Select]
Dim instance As XmlTextWriter
Dim buffer As Byte()
Dim index As Integer
Dim count As Integer

instance.WriteBase64(buffer, index, count)


There, that ought to just about cover it! ;)

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Actaully these classes should be more appropriate than the xmlwriter methods:

http://msdn2.microsoft.com/en-us/library/system.security.cryptography(VS.80).aspx

Covers MD5 and base64... among other more sophisticated encryption algorithms.

Offline KBF-Crim

  • 1st Deacon ,Church of Taldren
  • Global Moderator
  • Commodore
  • *
  • Posts: 12271
  • Gender: Male
  • Crim,son of Rus'l
Id there anyway to set up something like a "first aid"?

I cant tell you how many times I screwed up my whole installation switching something basic...

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Id there anyway to set up something like a "first aid"?

I cant tell you how many times I screwed up my whole installation switching something basic...


That's exactly one of the features Strat is looking at; a "Repair OP Installation" function of some sort I think... I'll let him fill you in on it though.

edit: yup... check above:

Quote
...
5) easy to use! The Mod Chooser features:
- Auto Repair (Does a quick scan at startup if files are damamged)
- Deep Repair (does a deep scan of all OP files and Mods to verify thier quality)
...

http://www.dynaverse.net/forum/index.php/topic,163365813.msg1122696594.html#msg1122696594

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
Id there anyway to set up something like a "first aid"?

I cant tell you how many times I screwed up my whole installation switching something basic...


That's exactly one of the features Strat is looking at; a "Repair OP Installation" function of some sort I think... I'll let him fill you in on it though.

edit: yup... check above:

Quote


...
5) easy to use! The Mod Chooser features:
- Auto Repair (Does a quick scan at startup if files are damamged)
- Deep Repair (does a deep scan of all OP files and Mods to verify thier quality)
...

http://www.dynaverse.net/forum/index.php/topic,163365813.msg1122696594.html#msg1122696594



Exactly  ;D

Offline KBF-Crim

  • 1st Deacon ,Church of Taldren
  • Global Moderator
  • Commodore
  • *
  • Posts: 12271
  • Gender: Male
  • Crim,son of Rus'l
OK Ok....I read that before and forgot.... ::)

Anyways...I know many will appreciate that... ;D

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Actually, let me ammend my command line parameter request:

If you could make the mod chooser accept command line paramters of the style:

ModChooser.exe -loadmod:<modcode> -modhash:<md5hash> -checkmod:<modcode>

That would actually be the easiest for me to deal with, now that I think about it... but I should be able to handle just about any format really...

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
I have updated the SFC Direct installer:
http://www.dynaverse.net/sfcdirect/sfcdirect_setup.exe
(uninstall old version)

And have updated the tests page:
http://www.dynaverse.net/sfcdirect/test.php
to include a sample firewall checking link and some sample Mod Switcher Links.

SFC Direct is currently setup to look for the ModChooser install dir in:
HKLM "SOFTWARE\ModSwitcher" "dir"
And will execute the example links as
ModChooser.exe -loadmod:opp4
or
ModChooser.exe -checkmod:opp4

Just let me know if the executable name changes (ModSwitcher.exe?) or if you use a different regkey for the install location.

We'll need to settle on some modcodes soon...

I was thinking:
stock
opp4
opp4hc
uaw (plus versions)
sfbop4
etc...

Let me know what you think of this stuff. I can adapt as necessary if any of it is a problem...

...Working on a basic game matching page today...

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
..., now that I think about it... but I should be able to handle just about any format really...

lol Bonk!

You are so funny :p

Ok, I'll makes dashes '-parameter=' instead of slashes '/parameter='.

Also you said that you would accept '-modhash=<md5hash>' now.  Does this mean that you found a way that Base64 would not be nessecary?  If not, thats ok too, I just want to be clear.

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
I have updated the SFC Direct installer:
http://www.dynaverse.net/sfcdirect/sfcdirect_setup.exe
(uninstall old version)

And have updated the tests page:
http://www.dynaverse.net/sfcdirect/test.php
to include a sample firewall checking link and some sample Mod Switcher Links.

SFC Direct is currently setup to look for the ModChooser install dir in:
HKLM "SOFTWARE\ModSwitcher" "dir"
And will execute the example links as
ModChooser.exe -loadmod:opp4
or
ModChooser.exe -checkmod:opp4

Just let me know if the executable name changes (ModSwitcher.exe?) or if you use a different regkey for the install location.

We'll need to settle on some modcodes soon...

I was thinking:
stock
opp4
opp4hc
uaw (plus versions)
sfbop4
etc...

Let me know what you think of this stuff. I can adapt as necessary if any of it is a problem...

...Working on a basic game matching page today...


Yeah this all looks great.  I'll be making this next version called the 'Mod Switcher' so yeah, the exe will be 'ModSwitcher.exe'.

Other than that, we're moving ahead!

The codes are what I was thinking too.  Simple acronyms that are self explanatory about the mod they represent.

Feels funny though that you are so far ahead of me, you'll have the SFC Direct able to call the Mod Switcher before it even has a exe. :p

Good work! and Thanks!
Strat

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
And have updated the tests page:
http://www.dynaverse.net/sfcdirect/test.php
to include a sample firewall checking link and some sample Mod Switcher Links.

SFC Direct is currently setup to look for the ModChooser install dir in:
HKLM "SOFTWARE\ModSwitcher" "dir"
And will execute the example links as
ModChooser.exe -loadmod:opp4
or
ModChooser.exe -checkmod:opp4



I took a quick peak at the new pages.  I like the firewall idea.  I see it does a ping test to see if everything is in order.

One question:  What about NAT's and port forwarding?  I guess there is no way to test if a person has port forwarding set up right unless we make some kind module that would run from both server and client side to test port communications.

I guess there may be no simple way to test for that.

What do you think?

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
..., now that I think about it... but I should be able to handle just about any format really...

lol Bonk!

You are so funny :p

Ok, I'll makes dashes '-parameter=' instead of slashes '/parameter='.

Also you said that you would accept '-modhash=<md5hash>' now.  Does this mean that you found a way that Base64 would not be nessecary?  If not, thats ok too, I just want to be clear.

sorry to flipflop....  :-[  Hope its not too much of a pain...

I have it currently set up to use parameters like -loadmod:opp4 (colon instead of equals sign)

I'd still need to have the MD% hashes base64 encoded if we decide to implement that functionality in SFC Direct.

I'll update SFC Direct to call ModSwitcher.exe

You going to use that regekeey for the install dir?

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
Oh hey, just another brainstorming idea.  I could have edited the previous post, but you might have missed it.

Check out this site. descent.cx

It does similar to what you are working on.  (Yeah I used to play Descent, cool game!)

Click on a server's IP to see the join page.  I dont' know how they do what they do, but there they can use almost any character, I estimate, in the call to launch the game.


;)
Strat

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
I took a quick peak at the new pages.  I like the firewall idea.  I see it does a ping test to see if everything is in order.

One question:  What about NAT's and port forwarding?  I guess there is no way to test if a person has port forwarding set up right unless we make some kind module that would run from both server and client side to test port communications.

I guess there may be no simple way to test for that.

What do you think?

Ya, would be nice to check for proper NAT function but it would be a bit complicated to get into. I looked at creating a port scanner in php to scan the directplay ports but the problem is it does not detect them unless there is an application currently listening on those ports, so the SFC Direct client would have to coordinate with a serverside port scanning script, a bit complicated to get into now, I need to get a basic game matching page setup, but NAT detection may be something I'll look at in more detail later. It would be awful handy to have (for D2 troubleshooting as well... something like the directplay test host of SFC3...)

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
You going to use that regekeey for the install dir?

By your command!

HKLM\Software\ModSwitcher\Dir=<path>

Edit:  ok, I'll be using the colons too in the parameters.

Ex: -parameter:<value>

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Oh hey, just another brainstorming idea.  I could have edited the previous post, but you might have missed it.

Check out this site. descent.cx

It does similar to what you are working on.  (Yeah I used to play Descent, cool game!)

Click on a server's IP to see the join page.  I dont' know how they do what they do, but there they can use almost any character, I estimate, in the call to launch the game.


;)
Strat



INteresting, I'll check that out.

Sounds similar to:
http://aluigi.altervista.org/papers.htm#gslist

Which I'm using here:
http://www.dynaverse.net/gslist.php
(hmmm gamespy looks empty there at the moment... I need to confirm this poage is still working properly after the move to the new server...)

It also has the capability to launch and join games but is a bit complicated to configure for the client for the point and click crowd we're aiming for here...

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
It also has the capability to launch and join games but is a bit complicated to configure for the client for the point and click crowd we're aiming for here...

Hehe, I'm with ya there.

I just suggested it becuase it seems very friendly with calling command line parameters. (for the MD5 issue)

But under the assumption that it is not feasable, I'll still be working on the Base64.

Now... must get back to work..

 ;D

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
By your command!

HKLM\Software\ModSwitcher\Dir=<path>

Edit:  ok, I'll be using the colons too in the parameters.

Ex: -parameter:<value>

OK, I currently have SFC Direct geared to:

HKLM "SOFTWARE\ModSwitcher" "Dir"
ModSwitcher.exe
-parameter:<value>

Now it just occurred to me that SFC Direct handles EAW, OP and SFC3, but the Mod Switcher only handles OP. Any chance you're thnking of extending its capability to EAW and SFC3? If not I can just put the hooks in for the Mod Switcher when the SFC Direct game is OP...


Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
Now it just occurred to me that SFC Direct handles EAW, OP and SFC3, but the Mod Switcher only handles OP. Any chance you're thnking of extending its capability to EAW and SFC3? If not I can just put the hooks in for the Mod Switcher when the SFC Direct game is OP...

There is a lot going on for this program JUST to do OP.  Let me get this down and then I'll see where I go from there.

As it is, I don't even have a copy of SFC3.. And I can't remember if I have EAW anymore.

:(

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Cool man. Makes sense.

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
Progress Update:

What I have completed:
Database Structure, Access, and Encryption
Program Logic (How it decides to deal with the mods and files, and various failure scenarios)
Graphical User Interface (about 80%)

Not yet Completed:
Mostly the file manipulation
- Scanning files
- Adding Mod
- Removing Mod
- Changing Mod

At this point I really need some input. 

This is how the program is designed to interoperate with SFC:Orion Pirates Mods so far:

The program will be released with only the basic Taldren files as part of its DB. (ftrlist, shiplist, models.siz)
As mods edit files, the program will adaptively back up files edited by the mod to another location.
-- This is to preserve hard drive space, and to maintain efficiency.

The DB Structure:
I have a few things in there, but only thing concerning the developers is how thier mod will appear in the DB, so they know what information the program will need.

Each Mod will have its own table. The table will store inforamtion for each file the mod is made of.
Each table will have the following fields:

FileName - Name of the file (shiplist.txt)
Source - Its location in the file system (Ex. OPDir\Modifications\<ModCode>\Specs
Destination - Its destination if it has one (Ex. OPDir\Assets\Specs)
FileHash - The MD5 of the file. Not required for each file, but recommended for at least the critical files, such as the shiplist.
Mandatory - True/False field letting the program know if the Mod will function w/o this file, stock files will be used (Ex. Mouse cursors)

Another table holds information about the mods themsevles.
Feilds:

ModCode (ex. opplus)
ModName (ex. OP+ 4.0 by FireSoul)
ModLocation (Ex. OPDir\Modifications\<ModCode>
ModHash - MD5 of the Mod's installer file (more on this later)
ModUninstaller - the command line text (including parameters) to call the mod's uninstaller to silently remove the mod

The DB is not direcly editable.  For the information about the mod to make it to the DB, the dev will have to provide two files containing the required information.  I suggest the files be a simple CSV db format.  The program will detect the files and import all required information to its database.

I suggest the Mod install the files to the 'OPDir\Assets' directory.  This allows an immediate detection of  new mod being installed, its data imported to the Db, and available for use.  The program will move this file to the root its Mod Directory.

The two files could be: FilesData.txt and ModData.txt
ModData.txt layout:
ModCode, ModName, ModLocation, ModHash, ModUninstaller

FileData.txt
FileName, Source, Destination, FileHash, Mandatory (simple 'true', 'false' text should do for the mandatory field)



Aside from the DB:

I am trying to decide how to handle a severe failure of an OP installation.

I can make a procedure that will scan OP for to verify if all files are OK but those mostly likely or commonly to become corrupted.
The question is:
What are the bare minimum files need by OP to work? (Stock 2552, nothing else)
Models
Scripts
Lists
Cursors
Music
Sound
ect.

And what of this list can be made readily available for download?
Lists
cursors
scripts

Once we have decided on this information, we can make a Recovery Installer to bring these files to OP in order to avoid a reinstallation of the whole thing.

As it is, this new version is designed to treat even Taldren v2552 stock files as a Mod, so if they go, Op still works, you may load others mods.  This is becuase the Taldren files are reaily available for download, and people do not really play that mode anymore.

I need thoughts and opinions.  I don't want to spend all this time on this project (which I enjoy) to have a Mod producer come up later and tell me "Well this just isn't feasable."

I also do not want to miss any points or cause incompatilties.

Thank you for any input you have.

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
I do have some input on this, mainly on what stock files and installer implementation. (possibly use of an msi installer with repair capability...)

Too bad we didn't have the client source so we could "refit" the refit utility huh?

Anyway, once we get the site stabilised here and I get back to SFC direct and launch a public beta, I think we should move this thread to the mods forum so that you can get feedback from more modders before you go much further with it. That should happen in the next few weeks. What do you think?

Offline Strat

  • Retired
  • EAW Update Crew
  • Lt. Commander
  • *
  • Posts: 1368
Excellent. I know if I do this and there's no input from modders it'll blow up in my face. lol

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Bump for visibility.

Offline Chris Jones

  • MOD PRODUCER
  • Lt.
  • *
  • Posts: 541
  • Gender: Male
  • Galaxy Class - as seen in DS9
    • Chris Jones Gaming
Mod Standardization
« Reply #37 on: May 27, 2006, 06:19:57 pm »
Files in an OP total conversion that need changing:

Models
Scripts (these are just additions, if there are any)
specs
strings
Cursors
Music
Sound (Need to be able to add new wav files to OP's SFCSounds.zip, so I don't have to include the entire sounds.zip file in a mod download if I want to add audio to a mod. Same for SFCVoices.zip. This is most important. )

Sorry I've not posted till now. Real life and all.. Strat made me aware of this thread recently..



..Because the game does not have to, and will not, remain the same..


Celebrating Life!
Favorite TNG: Yesterday's Enterprise

Offline jharvey18

  • Lt. Junior Grade
  • *
  • Posts: 5
  • Gender: Male
Just came across this thread and thought I'd find out what the latest status is.  I've become acutely aware of this problem, as I'm very new to SFC and SFC:OP, and I forgot to turn off read only when installing the OP Enhancement Package.  So, I'm in the exact situation this would resolve - I'm not sure which mod is in effect now and how I can verify which mod is running when I launch SFC:OP.

Any thoughts?