• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Editing the built-in campaign

Status
Not open for further replies.
[Solved] Editing the built-in campaign

Edit: the easy way to this is by using custom scripts to bypass the BJ functions, and load/enable/etc levels, campaigns, etc.

Index (starting from 0) according to CampaignString_exp.txt

Functions:
Code:
call SetCampaignMenuRaceEx(int campaignIndex)
call ForceCampaignSelectScreen()
call SetMissionAvailable(int campaignIndex, int missionIndex, boolean available)
call SetCampaignAvailable(int campaignIndex, boolean available)
call SetOpCinematicAvailable(int campaignIndex, boolean available)
call SetEdCinematicAvailable(int campaignIndex, boolean available)




I want to edit the built-in campaign screen in TFT. More precisely, I want to add in the RoC campaigns, as well as my own Tides of Darkness campaign which I'm building at the moment.

I've already edited the campaignStrings_exp.txt file, without any problems.
Problem is, when a TFT mission is unlocked, it does it as if they're still in their original place. For example, when the second mission of the Sentinels campaign should be unlocked, the second mission of the RoC tutorial (which is the first campaign in this case) is unlocked instead.

This is due to the way the TFT campaign was implemented: in blizzard.j, there's an offset in place, meaning the RoC campaigns are set as campaign 0-4, and the TFT campaigns are set as campaigns 0-3.

Now, there are two possibilities: either I edit blizzard.j to get rid of the offset, or I edit the maps to change the mission unlock triggers.
However, when I do either of those things, the campaign breaks.
In the case of the former, loading a map results in a black screen which you can still exit (sometimes) by pressing Esc. This happens even when I add in a dummy variable definition.
In the case of the latter, it just gives a map corrupted error, which happens even when I insert an unedited map.

I must be doing something wrong, I'm sure it's possible to edit those things?
I used MPQEditor to create the mpq and MPQDraft to create the .exe.


By the way, I'm just doing this for myself, really, to kill some time, so no need to warn me about the infeasibility of it all :)


EDIT


tl;dr: how can I insert a modified blizzard.j file or modified campaign maps without breaking things (via a mpq loaded with an exe)?

Thanks!
 
Last edited:
Status
Not open for further replies.
Top