Jump to content

Distribution Of Mods


sigget

Recommended Posts

Sigget, I downloaded your code. I downloaded the zlib compression stuff, but I am lost. I admit it. I just wanted to see your code, and know with a little study, I may even know what you did.

 

But, I do not know that when I compile the code, it makes it into a library type file with VS.Net. So, right now, having to learn more things, I probably will not do anything with it, and Altar if they are doing anything will probably come out quicker and better.

 

I just am not sure how to use your tool. Version 1.2 that was just up.

 

I hopefully would like an explanation of what to do with your code.

 

I know how to make a DLL type library, and I can read all of that stuff, but that was with Visual Basic 6.

 

So, to hint, which I would still have to learn, is the second part of my book on C programming but it is MFC and going through a couple of chapters in the book that i did not have with C++ programming first semester.

 

Since I am only a beginner, and what you did in the code is way beyond me, I just assume that you are using those Microsoft calling conventions that are needed to call the functions that you created. I can tie it all together after thinking about it all, and maybe having a lot more time to look at it, but right now, since I have other work to do, even playing the game, is not being done night and day. I like to think about the code and making something if I can after reading those chapters where I can MFC to make a GUI type something if I can, and see the logic of your code, but as I said, that will take a lot of work, and a few months, perhaps, before anything can be done, and Altar probably will come out with something first.

 

I should look perhaps, more at your site, but then, I do not see how to use your code after it compiled into a Library type code file, and it had 11 warnings but nothing that was serious, as to having unsigned intergers or such be signed integers, as VS.Net always does that, but that is nothing to be concerned about, unless, the data would be better to be better about the changing unsigned or signed part of data transpositions, that gives warnings. It probably is not necessary.

 

I can look at it more, later after this week, after catching up with other work, but right now, I can not see how to use this library compiled code of yours for anything.

 

Perhaps, I just am not with it now, and do not know what your code does, or how to use it now, since it is a library, and I would have to read about that.

 

A little more explanation on how to use your code, may help me out, as I do not know abstract factory coding, but do know abstract classes.

 

I know that there would be an logic order to use your code, but I think right now, if anything is done with it, I would use the code, and make a main file code that calls each file of your code when it has to, and apply some logic as to the sequence of doing your code, by calling your classes. I could do that with some time, I think, or I may like to try, but then I still have to learn some things, to tie it all together, but can figure out the logic of doing it.

 

So, onwards, if I accompish anything, for that will take some time, as MFC is not something I have learned yet, but did learn the Windows API in Visual Basic, or part of it.

 

So, to transfer it all to Visual Basic and use that, and reinstall it, since VS.Net is different in some respects as to all of that, seems to be as bad as learning some MFC classes in C and doing it that way.

 

The only thing that may have to be done, is (like in Visual Basic a DLL could be made~~as soon as I look all of that up again and put it in a Visual Basic type interface) or put it all in C++ by using MFC, and going that way, as making an interface that just calls your files, but does not make it into any type of DLL or Library file, but makes it all into a program executable.

 

I may not get anywhere with it all, but at least I am learning something, and making into a console application does not seem to be anything that would be any good. It would just be text, and a console type window, that would be harder to use, and confuse everyone, and right now I am confused enough.

 

But having TreeFile views or anything like that, would indeed make me read the 4 or 5 chapters in the book, that would be covered in C++ II course, and right now, I am not taking any more courses in college, since I just finished.

 

I may see if I can just make a document type program and list the info, but then there may be so much of it, as Altar could probably do it better and in less time, than I ever could, even if I can even do that.

 

So, why a Library type compile, and how do you use your code, if I missed something just browsing at your website??

 

Only message about this all, as this was quite lenghty, and may indicate that I am going crazy or something esle.

Link to comment
Share on other sites

I see in other words, that text files are listed for the most part. What kind of text files? Unicode, or ANSI. And the rest is hex binary that has to have a convertor also.

 

Your code opens up one file, perhaps, after breaking apart gamedata.vfs file ? (which I have not done yet, so I do not know).

 

I may have more time coming up, but this is all tenative if I can at least figure out more of what your files are used for, or how, perhaps??

Link to comment
Share on other sites

Okay, I start over. I unstalled the multiple copies of games like Civ3 and Play the World, get back to them later. Yes, I have two copies, and now it is only in Windows 98SE, and not in Windows 2K Prof. And I unstalled MOO3, but kept the patch somewhere. I rearranged my drive, since the UFO:Aftermath freaking file, is not megaBytes, but a gigaByte file, that takes up much room.

 

I saw the readme.txt file, and now can unpack that gamedata.vfs file to look at it with the Sigget's exe program, and will do so after defragging everything.

 

Later, I may even come up with something but it may be a simple console program first, since I am not sure even what I am doing.

 

That is all I can say at the moment, having too many files, looking at different things and not actually having my computer up to date with getting rid of all these different games lately that I have looked at.

 

I could use a bigger disk, and have one, but that is another bit of work.

Magic does not happen, at the moment.

Link to comment
Share on other sites

Go with a console style app at first, compile zlib and vfs_lib, add the .lib-files to your project. Include vfs_lib.h in your code. This little example should list the entries of the root directory. I just put it together so there's bound to be some typos. Hope it helps you anyway.

 

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

#include "..\vfs_lib\vfs_lib.h"

IFatVirtualFileSystem *vfs = NULL;

void main()
{
 VFSResult res;

 res = OpenVirtualFileSystem( "c:\\games\\ufo aftermath\\gamedata.vfs", VFSM_READWRITE, &vfs );

 if( res!=VFSR_OK )
 {
   puts("failed to open VFS");
   return;
 }

 IDirectory *dir = NULL;

 res = vfs->OpenDirectory( "", &dir );

 if( res != VFSR_OK )
 {
   puts("failed to read root dir");
   vfs->Close();
   return;
 }

 UFO_ENTRY e;

 while( dir->ReadEntry(&e) )
 {
   printf("%s %d\n",e.name,e.size);
 }

 dir->Close();

 vfs->Close();
}

Link to comment
Share on other sites

Ah, I may have spoke too soon. It seems that now since I ran your program, you are giving ms-dos prompt commands, and it worked, but I had to clear disk space.

I deleted some games.

 

Now, the good news, is perhaps, that can be done with MFC's but that is beyond me, and weird to say the least. Yes, there are some Windows API commands for old ms-dos commands, but none like the prompt and entering in the commands for your file to uncompress the file or restore the file. There would be somewhere with MFC's but at the moment I just have other work to do. I may read about it further but I could not find out anything about entering in those commands. I was thinking differently on it, at first, not using the program. I use your executable, and it works fine.

 

But, I am tied up catching up with some work I have to do, maintaneance work, and it has to be done.

 

So, until further time, just have to use the program as it is. I was not thinking about the ms-dos prompt commands, and although a console window is similiar, I fail to see a connection in giving out those commands at the moment.

 

If hot water heaters did not break down, and water pipes, and other things around here, I could look it up for a couple of days. But perhaps, by next week, I may see something in that overgrown MSDN Library, about something that even makes sense.

Windows API has commands to read a file and save a file, and some other things, but basic dos stuff like change directories. Microsoft is still not helpful in that respect with anything, unless someone is with a company where they have to be more helpful then in the past.

 

So, sorry, for I spoke too soon, and if I could, I would. But, I like to look into it anyway, and right now, there should be an MFC class that can do all that, but that is another piece of Microsoft's convention programming, well, something to learn.

Link to comment
Share on other sites

Ah, even adding an library, I would have to look up, as I only learned basically classes.

 

So, when I compiled, I added the zlib.h file where I had it on the disk, and it worked. But, printf function is now something like without making sure, cout >> stringvariable; or inputing a string variable like cin << StringVariable;.

My arrows might be the wrong way, but they are one way or the other.

Link to comment
Share on other sites

I know it's probably too late, but to the original question that started this thread, I believe that mods should be modularized.

 

A mod and a mod tool should limit itself to one file or to one activity.

 

If there were such a system in place, then we could replace one sound mod with another sound mod.

 

We could replace one weapons and rebalance mod, with another weapons and rebalance mod.

 

Use one modding tool to replace one squad or set of soldiers with another set.

 

Have a modding tool that replaces one set of music with another set of music.

 

One set of aliens with another set of aliens.

 

We would replace one set of maps with another set of maps.

 

We could swap one set of alien sounds for another set of alien sounds.

 

As long as nobody crossed the boundaries and limited themselves to what the modding tool was designed for, then we could mix and match mods, and the whole thing would still run. We would just replace one mod with its comparable mod that is better.

 

If the rules or boundaries are set by ALTAR and followed, then we can swap one engine for another engine, and everything works just fine.

 

Then ALTAR would provide a tool for each file or category that they want us to modify separately, and if people limit themselves to whatever that tool can do, then there will be little cross pollution from one mod to the next.

 

There may be additional weapons or aliens added that don't have sounds from a new sound mod, but they would be programmed to default to something that the author provided. There could be a weapons adding mod and file. There could be an aliens adding mod and file. As long as everything remains modularized, then all we have to do is swap one module for another, and the system doesn't crash as long as the modules that are created don't have bugs.

 

Furthermore, the modders could then specialize on what each one of them is good at. The Music people would only work with the music tool. The Sound people would only work with the sound tool and sound files. The Rebalance people would only work with that tool and that set of data, etc.

 

It would require a bit of organized coordination on ALTAR's part to pull it off.

Link to comment
Share on other sites

I agree with what Slaughter is trying to get at about the big huge file.

 

This is the way modding is supposed to work:

 

GurkoZ the sound modder would grab ALTAR's Sound Modification Tool, and when he runs the program, the tool will read a file called Altar_Original_Sounds.snd and pull it into memory, pull it into the tool.

 

GurkoZ would then replace Altar's original sounds with the path names of his own selections, and then GurkoZ would push a button, provide the name GurkoZ, and then ALTAR's Sound Modification Tool would write a new properly formatted stand alone file named GurkoZ_Sounds.snd. It would now become the new default sound module, because ALTAR would program Aftermath so that if there is some other file with the snd extension in the Sound Directory, then it will take preference over the Altar_Original_Sounds.snd file.

 

There would be a Weapons and Balance file along with a Weapons and Balance modding tool.

 

A map making tool and set of files.

 

ALTAR could modularize as much as they like, if they are smart and diligent.

 

They could have an Alien Sounds tool and set of files, along with a Soldier Sounds tool and set of files, along with a Weapons Sounds tool and associated files, along with a Music tool and set of files. There doesn't have to be one huge massive sound tool and one massive file. It can be broken down into smaller tools and smaller files - smaller modules.

 

But one tool affects only one file and therefore one mod affects only what the modding tool can access. It would bring control and organization to the system. Then we could swap one module for another module, straight across. And, we would have the tool that accesses only a specific type of module. We could also build upon ALTAR's original modules.

 

Then GurkoZ could create a new Sound Mod using ALTAR's sound tool and starting with ALTAR's original module.

 

Aralez could come along, and load GurkoZ sound module into the ALTAR tool, change a few things, and then resave his changes along with what he decided to keep from GurkoZ in a new file called Aralez_Sound.snd. Even the average stupid user like me could grab the ALTAR tool, load in a set of sounds, change a couple that he wants to change, and save out his own custom sound module.

 

With the proper exclusive modding tools, the original default modules that ALTAR creates would never be erased, or changed. So ALTAR could then have a button or a switch that goes straight to the defaults and ignores all the mods. Or the button could be pressed to turn on modding, and Aftermath would go with the mod files or modules that have the newest date if there is something there besides the default module.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...