XWADCC - X-Wing Alliance Dynamic Campaign Companion

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.
Post Reply

XWADCC - X-Wing Alliance Dynamic Campaign Companion

User avatar
Venix42
Recruit
Posts: 6
Joined: Thu Feb 12, 2015 11:40 am

Post by Venix42 » Mon Jun 29, 2015 11:36 am

Hi there!
Let me introduce myself before continuing.
I'm Venix42 (guess the origin of that nickname ;) ) from Belgium and I've been lurking this forum since a while (but I didn't create an account nor posted a message).
I'm a huge fan of XWA (since it came out) and I always have been sad that the campaign of XWA (and other custom campaigns) was linear, reducing the replay interest of it.
I've been searching for a thing that would do that, but in vain...
That's why I come with a Proof of Concept showing that we can do dynamic campaign with the current engine of XWA. (not sure if this isn't the wrong forum...)

Let me introduce to you XWADCC, X-Wing Alliance Dynamic Campaign. I've made this program myself (with the few knowledge of programming I have) and it allows to have dynamic campaign in XWA, using a few flaws present in the engine.
Of course, it's not (at the moment) as efficient as an engine which would do this natively, but it's better than nothing :) .

The program comes with an example campaign (Yeah, a "campaign" with "2" missions absolutely useless but it's here to show it can be done) bundled with it.

I'm here right now to ask if you can test it and tell me if things went wrong or not.
/!\ Beware though, this could break your game, as it change some files on the fly and move other things. The best is to backup Mission.lst somewhere else.

It's have been tested on these systems:

Windows 8.0 64bits
Windows 8.1 64bits
Windows XP SP3
Windows XP 64bits SP2

On these XWA:
XWA Vanilla 2.02
XWA Vanilla 2.02 (with ddraw.dll by JeremyaFr)
XWA Vanilla 2.02 (with ddraw.dll and some options from the XWA Exe Patcher from JeremyaFr: triangling, disable wireframe, framerate shown, craft count++, a3d, 32b screenshot, texture limit, opt texture limit,calloc)
XWA 2.02 + XWAUCPv1.3

With these languages:
English
French (XWA.tab)

Current Version: 0.6.0

Program Link: http://1drv.ms/1LDHc2U
Requirements : It needs at least Windows XP and .Net Framework 4.0
Quick install : put XWADCC folder in XWA folder, read readme, modify config.cfg, init the campaign.bat, run the campaign.bat,run XWA, enjoy

So tell me if you encounter bugs while using it.
Thank you for your attention :)

Venix42

PS: I'll update this post.
PS2: Here is the content of changelog and readme files that is located in the archive.
================================================CHANGELOG===================================================
Changelog
------------
V 0.6.0
Working Saves

V 0.5.0
Added Calibration Mode (Allows all the systems to use it XP->10)
Debugging bonus count
Cleaning code (lightening CPU charge)

V 0.4.2
Initial Release (for test)
-- Console Interface added
-- Multiple automation process added
-- Corrected some bugs

V 0.3.4
Internal Release (test only)
==================================================README=====================================================
==========
XWADCC - X-Wing Alliance Dynamic Campaign Companion
==========
/!\ WARNING /!\
This can break your game, use with care!

==========
What does it do?
==========
XWADCC, X-Wing Alliance Dynamic Campaign Companion, is a side program which allows people to create and to play dynamic campaigns, which the native XWA engine cannot allow.
Basically, the program reads the memory of X-Wing Alliance and try to spot different things. To be able to use it to create Dynamic campaign, it reads the value of the bonus made during the mission and the status of the mission (while you play).
Since the bonus is not a meaning of win or lost mission, I thought that we could use it to define several issues of the mission. By winning the mission and having a certain amount of points, you can set which mission is the next one, creating a mission tree instead of a simple list, thus the dynamic campaign.
Using the bonus points (which are not altered by kills or other objectives), it allows the creator of custom missions to set bonus (invisible) objectives, which are static and so monitor-able.

I've also discovered that XWA is loading a second time the mission file to display the debrief text/sound. It allows to XWADCC to change the end debrief according to the bonus points made during the mission.
As well, it loads again the MISSION.Lst after the mission to see if there's another mission loaded. XWADCC write the good things for the next mission in this file.


==========
Installation
==========
1. Unzip the file in the XWA folder (like C:\Program Files(x86)\X-Wing Alliance\)
2. Open config.cfg with a text editor (i.e. notepad)
3. Modify the different options according your situation.
-- /!\ Warning: Use "\\" in file path to avoid problems
-- Tip: if the file isn't working correctly after, just delete him, XWADCC will generate a new one. You'll need to recalibrate XWADCC after.


==========
HOW-TO use it
==========
0. XWADCC need Administrator rights since it has to read in another program memory (It'll prompt you for the rights)
0b. If it's the first time you use XWADCC, YOU HAVE to calibrate the program with your XWA installation. Use Calibrate XWADCC.bat then follow instructions provided below.
1. Use the "initiate campaign 0.bat" file to initialize the campaign "00000000" (in the campaigns folder)
2. Answer all questions.
3. When done, use the "Launch XWADCC with campaign 0.bat" file to launch XWADCC with campaign 0 parameters
4. Let XWADCC sit somewhere (best experience with dual screen :D ) and launch XWA.
5. Test the campaign and enjoy this Proof of Concept. (Not very long enjoyment by the way)

6. Since saves are not supported right now, you have to initialize again the campaign if you want to try another path. ==> "initiate campaign 0.bat" while XWADCC is off.

==========
HOW-TO Calibrate
==========
0. Initialize Campaign 0 by using "initiate campaign 0.bat", make sure the pilot XWADCC is used and the config.cfg file correctly...configured
1. Start the "calibration XWADCC.bat" file.
2. Type "y" after reading everything
3. Launch XWA and start the first mission of the campaign.
4. Destroy the Z-95 and let XWA sit for a minute, allowing XWADCC to detect the kill
5. Destroy the Tie Avenger and, again, let it sit there for a minute.
6. End the mission (using the shortcut is allowing to easily redo without initializing again if things messed up)
7. Now head up to the skirmish and launch any skirmish you want (as long as it's not a campaign mission)
8. Complete the mission and again, let the game sit there for a minute at the end.
9. Head to the main concourse and again stay there for a minute.
9b. If you have a dual screen, XWADCC should show that it's done calibrating. If it's not the case, check the values:
- If there is 0 in Mission (and another number in Bonus), that means that the calibration of mission wasn't done correctly. Try to stay still a bit longer between steps.
- If there is 0 in Bonus(and another number in Mission), that mean that the calibration of bonus wasn't done correctly. Same advice, try to stay still a bit longer between each kill in the campaign mission.
- If both have 0, well, try again much slower. If, after another try, both are still at 0, please report to the thread saying the system, language and xwa settings. It seems you don't have luck at all! :(
9c. If you don't have dual screen, check point 9b. but only after closing XWA (You can always try to Alt+tab (works better in Esc menu or in concourse) but this could crash XWA)
10. If calibration wasn't done correctly, you have to restart the whole process ( step 1 to 9).
10b. If it's done correctly, congratulation!



==========
Tested on
==========
-- XWA versions:
Vanilla 2.02
Vanilla 2.02 (with ddraw.dll by JeremyaFr)
Vanilla 2.02 (with ddraw.dll and some options from the XWA Exe Patcher from JeremyaFr: triangling, disable wireframe, framerate shown, craft count++, a3d, 32b screenshot, texture limit, opt texture limit,calloc)
XWA 2.02 + XWAUCPv1.3
-- Systems
Windows 8.0 64bits
Windows 8.1 64bits
Windows XP SP3
Windows XP SP2 64bits
-- Languages
English
French

==========
Non-working things
==========
- Plenty of things
==========
Limitations
==========
- /!\ The program currently work in a limited way: do try doing things that you would not do normally (pass missions, retry them after win,...). Things might break if you try.
- Doing the mission again after winning is not supported (the following attempt will not be detected as a dynamic mission, therefore the result won't change)
- Bonus points obtained after the victory is obtained are currently not taken in the final count (as the count is done right after the win detection is done)
- Defeat is not supported (for the moment)
- Custom Missions have to be "after" the Battle 7 (Death Star) (for the moment)
- Using the ExampleCampaign file as a base might be a problem since I don't remember all details of what is what at the moment. Use with care
- Don't support auto custom hangar (for the moment)
- Saves might not working (since it's makeshift stuff...)
==========
Known Problems
==========
- If victory string is longer than Unresolved one, it crashes (OK with English language)
- XWADCC *might* crash if you engage it after XWA is launched (It shouldn't but oh well...)

--Demo campaign
- Sometimes, after defeating the X-Wing in first mission, you have to go back to the capital ship to be allowed to win the mission. When trying to end the mission with the shortcut, the game threaten you to loose 2k points.
It also make the mission loose (even if XWADCC says it's ok). The mission is still validated within XWADCC and won't take another result without restarting
Last edited by Venix42 on Fri Jul 24, 2015 11:16 am, edited 1 time in total.
Working on: XWADCC ;)

User avatar
Venix42
Recruit
Posts: 6
Joined: Thu Feb 12, 2015 11:40 am

Post by Venix42 » Thu Jul 23, 2015 11:53 pm

Hi there!
I added the calibration mode. It allows to XWADCC to check where are the things it uses in your RAM. This way it should work with every Operating Systems. You just have to follow a bunch of steps to allow that ;)
I also added a working save system. It's still in Beta but it works if we don't mess around :)
The first post has been updated!
Cya!
Working on: XWADCC ;)

Atruejedi
Cadet 2nd Class
Posts: 50
Joined: Fri Aug 03, 2001 11:01 pm

Post by Atruejedi » Fri Apr 29, 2016 1:07 pm

I'm shocked no one expressed any interest in this :(

User avatar
Venix42
Recruit
Posts: 6
Joined: Thu Feb 12, 2015 11:40 am

Post by Venix42 » Fri May 06, 2016 10:53 pm

Atruejedi wrote:I'm shocked no one expressed any interest in this :(
I can understand, it's absolutely not user friendly at the moment, that's why I'm working on a more usable interface :)
XWADCC01.JPG
XWADCC02.JPG
You do not have the required permissions to view the files attached to this post.
Working on: XWADCC ;)

Post Reply