Merging AI Autoplay with BUG 4.1

PieceOfMind

Drill IV Defender
Retired Moderator
Joined
Jan 15, 2006
Messages
9,319
Location
Australia
I posted in the AI Autoplay thread but maybe it's better to post here...

I'm having trouble merging AI Autoplay with BUG 4.1. Specifically this is for PIG Mod but I don't think that matters.

The Python folder in the mod is based off the BUG 4.1 Python folder.

From there, I copied the following 3 files from the Better AI Mod...
Python\Development\ChangePlayer.py
Python\Development\Test.py
Python\Optional\AIAutoplay.py

to their respective locations in the Python folder for PIG (which basically has all the BUG python in it already).

At this point, if I run the game, the game interface loads properly :) etc. but it's pretty clear AI autoplay is not being loaded because you can't use ctrl+shift+x or use it from the python console.

How can I make the BUG python files see the 3 files from better AI? Do I need to put them in the Contrib folder? Do they need anything added to them to make them work with the way BUG handles its python?

I did my best to search for this but it seems most who tried to merge AI autoplay with BUG did it some time ago, with an older version.

My PythonErr.log file is empty.

I've attached the entire Python folder as it currently exists in my mod.

Thanks in advance.

EDIT... Problem fixed, so attachment removed.
 
Thanks EF.

It's working now. I'm not completely satisified in the sense I don't know why or how it's working but at least it's working. The Config folder and Python folder are pretty alien to me.

Where would you recommend I read specifically to get an idea how BUG handles the various python mods or components (whatever they're called) that get included in Contrib?

Or is the page you linked me above the best that's available?
 
First, the name "Contrib" is just a naming convention taken from the open source software world that means software from external contributors. I put things I merge into BUG when I can, but some files end up having to go in other places in order to replace the original files, e.g. Screens or EntryPoints.

The main way that people mod BTS with Python is through events. BUG makes it easier to add events from different modules. From that link you can read about the XML configuration files as well.

Otherwise, feel free to ask questions if you don't understand something. I should really write up a high-level description of how modding works in BTS. If only I could clone myself. :)
 
Back
Top Bottom