Adding To EXE

Hello All,
I have a question that I couldn’t find here, but I may have overlooked it…

So, on to my question is there any possible way to add stuff to a exe like a map, or a new weapon for example? Instead of having to download a whole new .exe…

I used to have a program that would do something like that, but I can’t find it on my computer, or the internet…

If it is possible can you show me how to do it both in a python script, and in logic bricks if it’s possible.

Thank you all for your time. :smiley:

I don’t understand what you’re asking…

An executable file created with blender is really just the blenderplayer.exe packaged with the blend file.

Why would you have to “download a whole new exe”? You create the executable in Blender from a blend file… what would you be downloading?

Please clarify. Is it an executable that somebody else made and you don’t have the blend file? If so, check resources for the exe/blend splitter (extractor?).

-Sam

I thinks he means that he would like to give updates for his games, without having to make a whole new .exe
Hew justs wants to add the new/changed files to the .exe that already exists.

Why would you need to? Even for big games, exes save fast.

Yes that’s what I meant… Sorry if that I didn’t explain it right…

I would like to know if like I can “add” to a blender exe such as adding, or changing files in a exe so people don’t have to download the exe again, but can like download a extension exe that will ad to the game…

Also, lets say you made 3 new weapons, and you want to add them to your game.

But, the exe of your game is like say 100mb and, you don’t want the players to download another 100mb for 3 new weapons…

How would you make it where like they could download the weapons,for example, then like some how put them in the game without having to download another exe with those 3 weapons…

Now, I hope that helps explain what I mean. :smiley:

So you basically want to be able to “patch” your game.

Blender doesn’t really provide a clear way to do this… but it’s possible.

Updating existing “parts” could be relatively easy. If you split your objects into seperate blend files and link them into your primary one, you should be able to include updates to single files.

For example:

You create a level, a character, and a gun. Now you create an empty blend file and link all 3 parts into one blend file (Using File–Append or Link, make sure “Link” is selected in the bottom right).

Now you want to add another weapon. You create it and save it as another blend file. You link it into the blend file that has the other 3 objects linked in.

The “patch” file would contain the new weapon blend and the new blend file that has now 4 objects linked in. The other weapon, the character, and the level wouldn’t have to be included unless you updated them.

Now you can create an executable file in Blender that just has a Game actuator that loads that general blend file. The general blend file should be relatively small (it doesn’t have any model data of its own, just linked in).

Hope that helps!

-Sam

Thanks that helps a lot sam!

I’ve got a question though… When you i click append or link then click link in the bottom corner what do I do?

Interesting concept. Could be very useful in some games I think… :rolleyes:

I’d say there are two ways (there might be more ways of course):

Linked objects are in a blend file outside the exe file. If you replace the blend file with a new one with some updated meshes for example, the game will use those new meshes.

If you want to add whole new objects, it’s a bit more difficult. You’d probably need a text file or something that tells the game to use the new objects. I think you could link several objects with an empty mesh (not empty objects) from other blend files. So you can later on add blend files to the folder, so the game uses the objects from the blend files. You would need Python to ‘tell’ the game whether it may use the linked objects, though…

This is interesting stuff. I think I’ll try to make a script for it.

You then find your object/objects/groups that you want to link in in the browser. It should be pretty self-explanatory…

If you want to add whole new objects, it’s a bit more difficult. You’d probably need a text file or something that tells the game to use the new objects. I think you could link several objects with an empty mesh (not empty objects) from other blend files. So you can later on add blend files to the folder, so the game uses the objects from the blend files. You would need Python to ‘tell’ the game whether it may use the linked objects, though…

If you want to do it dynamically… yes. If you want to do it statically (ie a patch file) you just have to replace the old “general blend” file with a new one that contains the new model. That general blend file, as I said, should be pretty small and easily replaceable.

If you want to be able to just drag a weapon blend into a directory and have it magically work, then you probably would need to use python.

-Sam

Updating an object is indeed very easy, but I mean when you want to make sort of a plugin. For example. You have a fps and normally you can choose between three guns. But you want to be able to add two more guns after you’ve released the game. The game somehow needs to know if there is a plugin to use, because you can choose between three guns without the plugin, but you should be able to choose between five guns with the plugin. I hope that explains better what I mean.

I don’t think you’re quite grasping what I’m saying, so I made some example files.

http://www.samtregillus.com/blenderpatch

There are 2 zip files here. One, the original.zip, has 3 models, a main.blend, a start.exe file, and all of the necessary DLLs and other files. It’s around 7 megs. When you run “start.exe” it should automatically load main.blend, which will just display the 3 models.

Then there’s the patch.zip. The patch.zip has just a new main.blend file and 2 new model files. If you extract the contents of patch.zip into the same folder as you extracted the original files, you just overwrite main.blend and add 2 model files into the models directory. The patch zip is only 110kb. Then you can use the same start.exe file to load the game, only this time it will display all 5 models.

No scripting is necessary, only a knowledge of linking files.

A few things to note:

  • There’s a starter.blend file that should work for non-windows users. This does the same thing as start.exe.
  • File – External Data – Make all paths relative was essential… otherwise moving the directory will cause your main.blend to freak out. Make all the paths relative once you’re done linking files.
  • I just linked mesh data… but you can link groups as well.
  • Creating a self-extracting executable to automatically patch your program should also be extremely easy.

Hope that helps explain everything!

-Sam

Oh, now I understand… :yes: Thanks for explaining.

@Sam that helps explain it a lot! Thanks again!! You Rock. ::smiley: