Jump to content

New mod tool / library


igi

Recommended Posts

iiInfinityEngine* - a new mod tool - is now available.

 

What can I do with it?

You can make a mod.

You can distribute a mod.

You can make a tool to help someone else make a mod.

 

Where can I get it?

The latest alpha release is attached to this post. If you're nosy, the code is hosted on git-hub.

 

What games does it support?

Currently it only supports BG2: SoA and BG2: ToB.

 

What platforms does it support?

It's written in .NET, so it will run on Windows with the .NET framework installed.

Support for Linux and MacOS is theoretically simple to achieve via the Mono project. I've no access to these platforms to pursue this though.

 

How does it fit with WeiDU?

There's currently no integration with WeiDU (WeiDU doesn't really provide a way to integrate). Integration with WeiDU is planned for the future (it requires an update to WeiDU as well as iiInfinityEngine).

 

Why should I use it?

It makes it a little easier to create mods, by taking care of all the offset related stuff automatically. No hex numbers, no calculations, no read_byte commands, no bitwise operators. It just works. You even get red squiggley underlines for invalid code and pop-up prompts for auto-completion. Later versions will also have the field description in the pop-up, so you can see it right there on screen and check what it does - without having to leave the editor.

 

// Initialize the mod
Game game = new Game();

// Update all stores to buy daggers, morning stars and scrolls
foreach (var store in game.stores)
{
 store.Flags.CanBuyFromPlayer = true;
 store.ItemTypesBoughtByStore.Add(ItemType.Daggers);
 store.ItemTypesBoughtByStore.Add(ItemType.MorningStars);
 store.ItemTypesBoughtByStore.Add(ItemType.Scrolls);
 game.Save(store);
}

// Add a new effect to all level 1 spells
foreach (var spell in game.spells)
{
 if (spell.SpellLevel == 1)
 {
SplExtendedHeader extendedHeader = new SplExtendedHeader();
extendedHeader.LevelRequired = 1;

SplFeatureBlock featureBlock = new SplFeatureBlock();
featureBlock.Opcode = 100;
featureBlock.Parameter1 = 5;
featureBlock.Probability1 = 0;
featureBlock.Probability2 = 100;
featureBlock.TimingMode = TimingMode.Duration;

extendedHeader.splFeatureBlocks.Add(featureBlock);
game.Save(spell);
 }
}

 

How do I use it?

You'll need Visual Studio (the free express edition will do, but you can use any edition). Create a new project and reference the iiInfinityEngine.Core.dll. Initialize the Game object, and then just follow the intellisense prompts. The examples included in the download provide a great starting point.

 

Does it support uninstalling? Backups? Translations? Script de-compilation, and compilation?

Yes, yes and yes.

 

That's pretty cool - what doesn't it do?

Support for dialog files is currently extremely minimal.

 

Anything else I should know?

This is an alpha release. It's not recommended to create or release a mod based on this alpha - things are likely to change and could end up breaking anything you write now. The primary purpose of this release is to solicit feedback, so please, have a play around and give some feedback!

 

 

* It's a working name - suggestions for better names are welcome!

post-106-0-80129300-1335124853_thumb.png

iiInfinityEnginea4.zip

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...