Jump to content

Alpine 2.0 Released


Fulby

Recommended Posts

https://fulby.v21hosting.co.uk/gui.png

 

No need to use the command line any more, just select the plugins you want and press Apply.

 

Major changes:

GUI replaces "apply" command line program.

Plugins can now accept a numerical parameter.

Plugins now reside in the plugins\ subdirectory of ALPine.

Added functions needsl, loadfilel, savefilel, loadsub, savesub, loadlangindex and savelangindex.

 

Available from the ALPine Website.

 

Fulby

Link to comment
Share on other sites

NEAT!!! :rolleyes:

 

I have added it to the mods section. This is really what the tool needed! :tank:

 

But one question. Would it be possible to make the tool in such a way that all the modders need to do to make mods compatible with it is to compile them as cfg.vfs, and add a directory under Alpine/Plugins for the mod? Thus modders wouldn't need to learn a new programming language (lua) to add their mods...

 

Edit: It seems like that option is there already I notice. Well done! :D That means this mod can be used with the rebalance mod, with one exception. Does the Alpine tool handle changes to localizationpack.vfs?

 

Edit 2: And I was wrong. There was already a lua file for the music mod. Well, back to my first question then... :)

Link to comment
Share on other sites

Mod Wrapper for ALPine

Update 2.0.1 ALPine

 

This wrapper will allow one mod to be added in a similar method to a plugin. The mod can have a cfg.vfs and a LocalizationPack.vfs. The update fixes a bug regarding localization files that prevented the stun rod from working with the Rebalance mod.

 

Extract the wrapper to the plugins directory and the update to the ALPine directory.

 

Would it be possible to make the tool in such a way that all the modders need to do to make mods compatible with it is to compile them as cfg.vfs, and add a directory under Alpine/Plugins for the mod?

Mods created in that way would only be compatible if they didn't edit the same file. So one mod could change weapon details but none of the others could. For instance, the Rebalance mod and Music mod work together because they mod different files.

 

Does the Alpine tool handle changes to localizationpack.vfs

Yes, the functions were added in 1.7, but it's a bit slow at the moment (the stunrod plugin demonstrates this, it takes ~10 seconds to process the files). Individual entries can be changed/added to the files in LocalizationPack.vfs

 

Fulby

Link to comment
Share on other sites

This wrapper will allow one mod to be added in a similar method to a plugin. The mod can have a cfg.vfs and a LocalizationPack.vfs. The update fixes a bug regarding localization files that prevented the stun rod from working with the Rebalance mod.

Nice! I added the musicmod, the rebalance mod (using the wrapper) and the stunrod. Everything worked fine with one exception. The glossary entries for the rebalance items were not added. I could read about the stunrod in the glossary, but none of the rebalance items...

Mods created in that way would only be compatible if they didn't edit the same file. So one mod could change weapon details but none of the others could. For instance, the Rebalance mod and Music mod work together because they mod different files.

Guess that answers the rebalance items not appearing in the glossary then :rolleyes:. Would it not be possible to have something like a localization directory in the mods/plugin directories, and thus have alpine add/change the files for all the mods at the same time? Thus mods would only conflict if they changed the same file...

 

Anyway, a tool for generating lua files for mods would be neat! Open tool, point to plugin directory, and have tool generate lua file. But that may be a bit too complicated?

Link to comment
Share on other sites

ALPine 2.1 released, available from the web site.

 

Features:

Mod wrapper plugin. Allows multiple non-ALPine mods to be applied in sequence. There's no guarantee they won't conflict, and if two mods include the same file then the later one will overwrite the file from the earlier one. (Write your mod as an ALPine plugin to avoid this problem :rolleyes: )

 

Chopper plugin. Allows the player to set the speed of the chopper from 1/10 its default to some unspecified maximum

 

Changes to the ALPine code makes the Stun rod plugin faster to apply (no 20+ second waits any more).

 

----------------------------------------------------------------

 

Would it not be possible to have something like a localization directory in the mods/plugin directories, and thus have alpine add/change the files for all the mods at the same time? Thus mods would only conflict if they changed the same file...

That's how the mod wrappers work, but the majority of mods would want to change the same files dealing with items, research etc. It only works for Rebalance and Music Mod because they mod different areas of the game.

 

It does sort of merge the files into the alpinecfg.vfs already, doesn't it?

The ALPine functions allow a plugin to view the data files as a list of records, update those records and then save it back into the text format. When a plugin requests a file, ALPine checks to see if another plugin has already used it. If so, the current plugin uses the file. If not, ALPine extracts the file from gamedata.vfs. When all plugins have been processed, ALPine saves the files into alpinecfg.vfs in the UFO directory.

 

The plugins only use files for graphics/sound, editing game data is done within the plugin script. So it doesn't merge files, it adds/modifies/deletes records in databases (which are stored on disk as files) which is why multiple plugins can affect the same "database".

 

Fulby

Link to comment
Share on other sites

NEAT! :rolleyes: Added to the mods section.

 

Now the next thing that would be neat to see are these:

- Automatic detection of the Aftermath folder; The regedit command to extract the information to a .reg file is this: regedit.exe /E test.reg "HKEY_LOCAL_MACHINE\SOFTWARE\ALTAR\UFOAftermath" (know that will be a lot of trouble for very little, but nice...)

- Since the program autofinds the AM folder, it can auto backup the localizationpack.vfs file.

- GUI for adding mods

 

What programming language are you using? I may be able to help if need be, though I'm far from any expert...

Link to comment
Share on other sites

- Automatic detection of the Aftermath folder; The regedit command to extract the information to a .reg file is this: regedit.exe /E test.reg "HKEY_LOCAL_MACHINE\SOFTWARE\ALTAR\UFOAftermath" (know that will be a lot of trouble for very little, but nice...)

Done, see the ALPine 2.2 post and thanks again for the suggestion :rolleyes:

 

- Since the program autofinds the AM folder, it can auto backup the localizationpack.vfs file.

It could, but if the player already had a mod installed it would back up the mod's loc.vfs instead and it would be hard to track down errors unless the player realised what had happened. This way the player can copy the correct vfs if needed.

 

- GUI for adding mods

What sort of GUI did you have in mind?

 

Fulby

Link to comment
Share on other sites

Done, see the ALPine 2.2 post and thanks again for the suggestion

Neat! :rolleyes: I'll check it out...

 

It could, but if the player already had a mod installed it would back up the mod's loc.vfs instead and it would be hard to track down errors unless the player realised what had happened. This way the player can copy the correct vfs if needed.

Um, but couldn't there be a button in the alpine program then. "Backup localization" or whatever. And if you clicked it, a warning would appear stating that if you are already using a mod, the mod local will be backed up. And then a "OK/CANCEL" option...

 

What sort of GUI did you have in mind?

A button with "Add mod". If you click it, it ask for the mod directory. This is where you unziped the mod (or it could ask for a zip, and extract the cfg.vfs and local.vfs). Then it takes the cfg.vfs and local.vfs, adds them to a new directory (modx), and adds it to a list of mods. And there could even be a demand for a textfile that has "rebalance" at the first line, and the description for the mod in the rest of the file. Thus the text in alpine would be "right", instead of the modx thingy with the generic text...

Link to comment
Share on other sites

A button with "Add mod". If you click it, it ask for the mod directory. This is where you unziped the mod (or it could ask for a zip, and extract the cfg.vfs and local.vfs). Then it takes the cfg.vfs and local.vfs, adds them to a new directory (modx), and adds it to a list of mods. And there could even be a demand for a textfile that has "rebalance" at the first line, and the description for the mod in the rest of the file. Thus the text in alpine would be "right", instead of the modx thingy with the generic text...

I think this could work as a standalone program which would add each mod in its own wrapper.

 

Say you download a zipped mod with a cfg.vfs and a localizationpack.vfs. You right click on the zip file and select Install Aftermath Mod or similar. The mod program checks the zip to make sure the right files are in it, then creates a new directory (say plugins\SMM\modX where X is the next available number), extracts the VFS files there, then adds a plugin wrapper which points to the new directory. It wouldn't have to create the plugin code from scratch, instead it could have a template string which has %s where the directory name should be, and the program would call something like sprintf(output, template, dirname) and save the output to file as the new plugin.

 

When the player next starts ALPine the new mod appears on the list with the name of the zip file it was in. The program could even copy the mod's readme.txt as the plugin's "name readme.txt" file so it shows up when the plugin is selected. It wouldn't even need to use ALPine if you didn't want it to, but it would loose the ability to apply plugins after adding the mods if done that way.

 

What programming language are you using? I may be able to help if need be, though I'm far from any expert...

Well ALPine is written in Lua and C++, but you could write this program in whatever language you wanted. I'd be happy to provide a wrapper template, though it shouldn't be difficult to edit the existing one to do the job.

 

Sounds feasible?

 

Fulby

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...