Jump to content
  • Announcements

    • AndalayBay

      Linode Critical Maintenance   01/10/2018

      Phase 1 is complete. There will be a second round once Linode gets a patch. I have updated the forum thread -  please see my post here.
anonimousone

Easy bains

Recommended Posts

Is there a way to write easily a bain .ini?

I want to add to open cities reborn archives 
 

"open cities flag remover"

"open cities skingrad classic"

 

including images.

 

Is there an easy way?  Or do I have to start cutting\copy paste everything and try to make it work?

Share this post


Link to post
Share on other sites

Easy? Not really. I believe that implementing an ini with Oblivion requires OBSE. But if I understand what you want to do correctly, you'd be targeting whatever is being used to INSTALL Open Cities Reborn. So you'd be basically forced into making a BAIN Wizard, OMOD script, or FOMOD script. Which can certainly be done, but you'd have to learn their scripting conventions. One possible route would be to make whats called a BCF (BAIN Conversion File). If you're not familiar with them, they are basically just a scripted document that you use Wrye Bash to apply to a mod, which then rearranges the files & folder structure according to what the BCF specifies. It's normally used to take somebody's messy, poorly structured, or very complex mod & restructure it so Wrye Bash can install it. Unlike a Wizard it doesn't install it for you with options you specify, it just restructures it. In your case, I think you could tell it to restructure OCR to install it in the configuration you want. You'd wind up with different BCFs for each though. Really, a Wizard would be best, but it's a lot more complicated than a BCF (so I've read). If you pop over to AFK, Beermotor has been doing a bunch of Wizards/BCFs. Look for "Mertz WizBAIN" thread in the SSE section. He might be able to assist you further.

More info on BCF's here, and also check out the "Technical Readme" to get into the specifics.

Edited by RavenMind

Share this post


Link to post
Share on other sites

Thank you. For example, I've tweaked in the past the following part of the .bain , for anyone looking to use it:

SelectSubPackage '01 Blood & Mud'

 

SelectOne "Do you want to install Blood & mud and the OCR patch for it?", \

        "|Yes", "Installs Ryan's Bravil Blood & Mud", "_Screenshots\\Bravil.jpg", \

        "No", "Do not install the Blood & Mud.", "_Screenshots\\Bravil.jpg"

            Case 'Yes'

                SelectSubPackage '01 Blood & Mud'

            Break

            Case 'No'

            Break

    EndSelect

EndIf

Share this post


Link to post
Share on other sites

I think you're asking about writing a BAIN wizard script rather than an INI file.

 

You need to learn how a BAIN wizard script works, what the functions and commands are, before you start editing them, otherwise you'll likely break it.

Use Wrye Bash to install Open Cities Reborn, see what it asks and what gets installed based on your choices. Then uninstall and install again, changing your choices. Once you know how Wrye Bash handles the wizard script, you can then look at the script yourself and see what causes Wrye Bash to ask what it does and select the files it does based upon the choices made.

 

If anyone knows of an online guide to writing BAIN wizard scripts, please post a link. I don't know of any such guide, so had to figure it out myself using the process I just described. The best way to learn is by using a mod with a LOT of choices, such as Better Cities or Unique Landscapes Compilation/Compatibility Patches (I wrote those wizard scripts, so I know they're long, they contain pretty much every function and command which BAIN supports).

Share this post


Link to post
Share on other sites
20 minutes ago, Vorians said:

If anyone knows of an online guide to writing BAIN wizard scripts, please post a link. I don't know of any such guide, so had to figure it out myself using the process I just described. The best way to learn is by using a mod with a LOT of choices, such as Better Cities or Unique Landscapes Compilation/Compatibility Patches (I wrote those wizard scripts, so I know they're long, they contain pretty much every function and command which BAIN supports).

A guide would be nice. I have at least one project that would benefit from a wizard script, haven't got round to figuring things out (and I would indeed have looked at your scripts first) so a guide would save some time.

Edited by tegeusCromis

Share this post


Link to post
Share on other sites

Not really a guide, but at least its official..  Wrye Bash Technical Readme

And there's this by Metallicow, a previous & now some-time WB dev.  Wrye Bash Wizard Demo

And a very handy tool once you get writing, by Utumno, the current WB dev.  BAIN Wizard Script Highlighter for Notepad++

There's other N++ UDL's on Nexus too if you want to try them.

You can also try using BAT (BAIN Archive Tools), which is mostly for structruing, but also is supposed help "easily" create a Wizard. Haven't got much experience with it myself though.

Some good info from Alt3rn1ty (on the WB team), here.

Edited by RavenMind

Share this post


Link to post
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

×