You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: campain editor
posted 11 October 2005 06:19 PM EDT (US)   
i downloaded the campain editor from the scn design tools but i cannot get my custom made campains to work. i have the gold edditio if that is the sourse of the problem. please reply. thanks.
Replies:
posted 12 October 2005 12:10 PM EDT (US)     1 / 28  
Have you installed it?

Rabid Potatoe Is The Win.
posted 12 October 2005 05:44 PM EDT (US)     2 / 28  
insatalled what? the campain editor. yes of coures i did. the game. yes of course i did.
posted 12 October 2005 06:24 PM EDT (US)     3 / 28  
It might be because of the video card or quality of your computer

SANDRO THE WICKE
/\/}{The Broken One}{\/\
A Mind Shattered Upon Time As The Fragments Of Sharpened Stone Upon Darkened Void
{|What Is Wisdom Not But What We Make It To Be|}...
TTWDD|Current Sites|PSD
Shot 1 Shot 2 Shot 3|Best Eyecandy Shots|Shot 4 Shot 5 Shot 6
posted 12 October 2005 06:26 PM EDT (US)     4 / 28  
any idea how i can make my campains work?
posted 12 October 2005 07:08 PM EDT (US)     5 / 28  
There is some information in the design library, I think in fact a short article on creating campaign files. That's the one I learned from. But, short of reading that, here is a re-print of a post I made many months back on making campaign files, one I drew up when I created my first campaign file.

**********************************************

Creating Campaign Files

So you've toiled for weeks on creating your scenarios and now it's time to put it all together into a campaign file. A campaign file is simply a .cpn file that resides in your c/program files/Microsoft Games/AOM/Data folder, and it- among other things- generates the campaign's name on the in-game campaign menu plus all the nifty on-screen instructions or story line. The process is fairly simple but a few key points must be taken into consideration. Follow these simple steps and unlock the amazing world of creating campaigns.

Writing the Campaign Code

I have provided the code from my latest campaign as a template for you to work with. Copy it into Notepad just as it appears here. Note certain parts of the code are bold. Do not bold the text in the code, it is bolded for illustrative purposes here.

<?xml version = "1.0" encoding = "UTF-8"?>
<campaign name = "A Trip To The Colosseum" version = "1">
<BackgroundSet name = "Atlantis">
<Image pos = "1">ui\campmap_atlantis1</Image>
<Image pos = "2">ui\campmap_atlantis2</Image>
<Image pos = "3">ui\campmap_atlantis3</Image>
<Image pos = "4">ui\campmap_atlantis4</Image>
<Image pos = "5">ui\campmap_atlantis5</Image>
<Image pos = "6" textureReplace="">ui\campmap_atlantis6</Image>
<Image pos = "7" textureReplace="">ui\campmap_atlantis7</Image>
<Image pos = "8">ui\campmap_atlantis8</Image>
<Image pos = "9">ui\campmap_atlantis9</Image>
<Image pos = "10">ui\campmap_atlantis10</Image>
<Image pos = "11">ui\campmap_atlantis11</Image>
<Image pos = "12">ui\campmap_atlantis12</Image>
</BackgroundSet>
<Scenario dispName = "Part One - Prepare for the journey to Rome!"
filename = "TripToColosseum1.scx"
BackgroundSet = "Atlantis"> The town crier brings news of a spectacular event being put on in the neighbouring city of Rome.
</Scenario>
<Scenario dispName = "Part Two - Rome At Last" filename = "TripToColosseum2.scx" BackgroundSet = "Atlantis">Time to witness the amazing wonder and the grand spectacle inside.
<Overlay offset = "464 399" size = "32 32">ui\overlay_red_09</Overlay>
</Scenario>
</campaign>

This code runs two scenarios (note them by their suffix ".scx") and gives you two menu screens. The first screen - which is shown below- gives you an idea of what some of the text in the code does. I expanded portions of the screen to show the details.



You will now replace the bolded text above with text that suits your campaign. Additionally, you replace the TripToColosseum1 and 2 .scx file names with the exact names of your own scenarios. Again be careful not to disturb any of the other characters in the code text. If your campaign has more than two scenarios, just copy/paste/and alter, as many times as you need, these lines:

<Scenario dispName = "Part One - Prepare for the journey to Rome!"
filename = "TripToColosseum1.scx"
BackgroundSet = "Atlantis"> The town crier brings news of a spectacular event being put on in the neighbouring city of Rome.
</Scenario>

Just make sure that code ends with </campaign>

Once you have your code to your liking, select "Save As" and you will get this familiar screen:

You are going to save the campaign file to the Start/c/program files/Microsoft Games/AOM/Data folder. In the File Name box, name your campaign and put the .cpn suffix after the name. Then in the Save as Type box use the menu to select "All Files". Then in the Encoding box use the menu to select "UTF-8" Hit save.

To actually generate your campaign file you will have to start up AOM. That is, if you've had AOM open while making your campaign file, and have saved it, you will have to restart AOM before the campaign appears on the campaign list in the menu. You'll know you were successful when your new campaign appears on the menu. Common mistakes are inadvertant deletion of characters in the script during editing, forgetting the .cpn suffix in your campaign name, and otherwise not setting up the "save as" process correctly. Also not putting incorrect scenario names in the script will prevent your scenarios from playing.

Ancillary Notes

In your maps, each map must end with an advance campaign effect and the last scenario should end with a Go To Main Menu effect. Failing to do this will prevent your campaign from properly advancing and ending.

Looking forward to DLing and playing all the great campaigns you'll now be able to create!

posted 15 October 2005 09:30 PM EDT (US)     6 / 28  
ok thanks, but how do you make the map in the backround be say greece? also, how do you make the red dots that are in the aom campains(for example the trojain horse)
posted 16 October 2005 03:32 AM EDT (US)     7 / 28  
Okay, as for changing the background map to Greece and so the word Greece is superimposed over the map, that's easy. In the above code everywhere you see the word "atlantis" change it to say "greece". Leave the rest of the code the same. Save the .cpn file as usual, start AOMTT and the background menu will change to the Greek map. The new code will look like this and the resulting screen is depicted in the screen shot. I realize now that I should have done this when I released the project, but oh well, that was when I was still young and foolish.

<?xml version = "1.0" encoding = "UTF-8"?>
<campaign name = "A Trip To The Colosseum" version = "1">
<BackgroundSet name = "greece">
<Image pos = "1">ui\campmap_greece1</Image>
<Image pos = "2">ui\campmap_greece2</Image>
<Image pos = "3">ui\campmap_greece3</Image>
<Image pos = "4">ui\campmap_greece4</Image>
<Image pos = "5">ui\campmap_greece5</Image>
<Image pos = "6" textureReplace="">ui\campmap_greece6</Image>
<Image pos = "7" textureReplace="">ui\campmap_greece7</Image>
<Image pos = "8">ui\campmap_greece8</Image>
<Image pos = "9">ui\campmap_greece9</Image>
<Image pos = "10">ui\campmap_greece10</Image>
<Image pos = "11">ui\campmap_greece11</Image>
<Image pos = "12">ui\campmap_greece12</Image>
</BackgroundSet>
<Scenario dispName = "Part One - Prepare for the journey to Rome!"
filename = "TripToColosseum1.scx"
BackgroundSet = "greece"> The town crier brings news of a spectacular event being put on in the neighbouring city of Rome.
</Scenario>
<Scenario dispName = "Part Two - Rome At Last" filename = "TripToColosseum2.scx" BackgroundSet = "Atlantis">Time to witness the amazing wonder and the grand spectacle inside.
<Overlay offset = "464 399" size = "32 32">ui\overlay_red_09</Overlay>
</Scenario>
</campaign>

The actual screen is made up of at least 12 .bmps which are contained in the textures/ui .bar files. There are actually a quite a few textures there and maybe you can experiment and try them all. These are the choices (that is everywhere you see "atlantis" in the above code, you can change it to):

greece
egypt
norselands

There are other ones there two but I only tested "greece". Sorry for the colourful campaign name, it was the only thing I could think of on the spot.

As for the Trojan horse overlay, it's been so long since I've played AOM that I can't even remember what it looks like. I'm sure if you extract the texture .bars, and convert the .ddt files to .bmps and look at them, you'll find which bitmap has the trojan horse on it. Then its just a matter of sticking that image file name into the code.

I realized that in your original post you were refering to the campaign utility that someone posted. I remember hearing about but I haven't tried it and don't know too much about it. Simply writing the code in notepad and following the procedure as I've outline it, seems simple enough. GL

Hey, I just realized AOMH has changed my nick to ToMyBoY. I was registered as tbarak here and made the ToMyBoY account on AOE3 Heaven. It seems to have changed it here too.

[This message has been edited by ToMyBoY (edited 10-16-2005 @ 04:11 PM).]

posted 16 October 2005 06:04 AM EDT (US)     8 / 28  
sandro, what does his graphics card have to do with .cpn files? they are notepad docs!

Rabid Potatoe Is The Win.
posted 16 October 2005 01:16 PM EDT (US)     9 / 28  
ok...but say i needed one scinario to have norselands, and one to have greece...what would i do then?
posted 16 October 2005 03:01 PM EDT (US)     10 / 28  

Quoted from Rabid_Potatoe:

sandro, what does his graphics card have to do with .cpn files? they are notepad docs!

I misread the topic sentence sorry for the inconvinience.

SANDRO THE WICKE
/\/}{The Broken One}{\/\
A Mind Shattered Upon Time As The Fragments Of Sharpened Stone Upon Darkened Void
{|What Is Wisdom Not But What We Make It To Be|}...
TTWDD|Current Sites|PSD
Shot 1 Shot 2 Shot 3|Best Eyecandy Shots|Shot 4 Shot 5 Shot 6
posted 16 October 2005 04:26 PM EDT (US)     11 / 28  
You're really making me work for my money.

Being a good modder/designer doesn't mean you know everything, just that you know how where to find it. Since I am a bit of a hack, I usually copy and alter what the game makers provide. Okay, first thing, google for a code writing program called Crimson Editor and download it (it's free). With Crimson Editor you can open .cpn files so go into the c/program files/Microsoft Games/Data folder and open the "main campaign".cpn file. The code is about 500 lines long so I won't paste it here, but you'll see exactly how ES coded each scenario. The code starts with the now familiar:

<?xml version = "1.0" encoding = "UTF-8"?>
<campaign name = "$$20623$$Fall of the Trident" version = "1">
<BackgroundSet name = "Atlantis">
<Image pos = "1">ui\campmap_atlantis1</Image>
<Image pos = "2">ui\campmap_atlantis2</Image>
<Image pos = "3">ui\campmap_atlantis3</Image>
<Image pos = "4">ui\campmap_atlantis4</Image>
<Image pos = "5">ui\campmap_atlantis5</Image>
<Image pos = "6" textureReplace="">ui\campmap_atlantis6</Image>
<Image pos = "7" textureReplace="">ui\campmap_atlantis7</Image>
<Image pos = "8">ui\campmap_atlantis8</Image>
<Image pos = "9">ui\campmap_atlantis9</Image>
<Image pos = "10">ui\campmap_atlantis10</Image>
<Image pos = "11">ui\campmap_atlantis11</Image>
<Image pos = "12">ui\campmap_atlantis12</Image>
</BackgroundSet>
<BackgroundSet name = "Greece">
<Image pos = "1">ui\campmap_greece1</Image>
<Image pos = "2">ui\campmap_greece2</Image>
<Image pos = "3">ui\campmap_greece3</Image>
<Image pos = "4">ui\campmap_greece4</Image>
<Image pos = "5">ui\campmap_greece5</Image>
<Image pos = "6">ui\campmap_greece6</Image>
<Image pos = "7" textureReplace="">ui\campmap_greece7</Image>
<Image pos = "8" textureReplace="">ui\campmap_greece8</Image>
<Image pos = "9">ui\campmap_greece9</Image>
<Image pos = "10">ui\campmap_greece10</Image>
<Image pos = "11">ui\campmap_greece11</Image>
<Image pos = "12">ui\campmap_greece12</Image>
</BackgroundSet>
<BackgroundSet name = "Egypt">
<Image pos = "1">ui\campmap_Egypt1</Image>
<Image pos = "2">ui\campmap_Egypt2</Image>
<Image pos = "3">ui\campmap_Egypt3</Image>
<Image pos = "4">ui\campmap_Egypt4</Image>
<Image pos = "5">ui\campmap_Egypt5</Image>
<Image pos = "6">ui\campmap_Egypt6</Image>
<Image pos = "7" textureReplace="">ui\campmap_Egypt7</Image>
<Image pos = "8">ui\campmap_Egypt8</Image>
<Image pos = "9">ui\campmap_Egypt9</Image>
<Image pos = "10">ui\campmap_Egypt10</Image>
<Image pos = "11">ui\campmap_Egypt11</Image>
<Image pos = "12">ui\campmap_Egypt12</Image>
</BackgroundSet>
<BackgroundSet name = "Norselands">
<Image pos = "1">ui\campmap_Norselands1</Image>
<Image pos = "2">ui\campmap_Norselands2</Image>
<Image pos = "3" textureReplace="">ui\campmap_Norselands3</Image>
<Image pos = "4" textureReplace="">ui\campmap_Norselands4</Image>
<Image pos = "5">ui\campmap_Norselands5</Image>
<Image pos = "6">ui\campmap_Norselands6</Image>
<Image pos = "7">ui\campmap_Norselands7</Image>
<Image pos = "8">ui\campmap_Norselands8</Image>
<Image pos = "9">ui\campmap_Norselands9</Image>
<Image pos = "10">ui\campmap_Norselands10</Image>
<Image pos = "11">ui\campmap_Norselands11</Image>
<Image pos = "12">ui\campmap_Norselands12</Image>
</BackgroundSet>

In other words they load all the possible map backgrounds first. Then each scenario or .scn file specifies the background like this:

<Scenario dispName = "$$20585$$Prologue: Troubled Sleep" filename = "spc\cinematics\cineA_1" BackgroundSet = "Atlantis">$$20624$$Athena comes to Arkantos in a dream to set him on his quest.</Scenario>
<Scenario dispName = "$$20586$$Omens" filename = "spc\aomsp04" BackgroundSet = "Atlantis">$$20625$$Arkantos sails in to Atlantis. Krakens and pirates attack. You and your men must defend Atlantis at all costs.
<Overlay offset = "480 401" size = "32 32">ui\overlay_red_09</Overlay>
<Overlay offset = "483 351" size = "64 64">ui\overlay_poseidon_4</Overlay>
</Scenario>

Just look for the entry "" BackgroundSet = "Atlantis". Where it says "Atlantis", just replace it with "Greece, "Egypt" or "Norselands".

Also, when you're looking through the main campaign.cpn file, you'll notice all kinds of reference that look like this:

<Overlay offset = "483 351" size = "64 64">ui\overlay_poseidon_4</Overlay>

These are the various little pictures (like the Trojan horse and red dots) you spoke about. I assume you are still familiar with the AOM campaign, and you should now be familiar with how the code calls the various text and images. Just find the scenario in the main campaign file with the Trojan horse on it, and copy and paste that entry into your own campaign file.

posted 16 October 2005 04:54 PM EDT (US)     12 / 28  
first of all...thank ypu.
second of all...sorry for making you work so hard.
posted 16 October 2005 08:58 PM EDT (US)     13 / 28  
Bah, I don't mind, brings back memories of working in the AOM editor. Well I'm having fun at it so here's more information.

I dusted off my AOM disk (about two years of dust on it), popped it in and loaded the campaign to look for your Trojan horse image. A few of the scenarios in the original campaign file have the Trojan horse so I chose the "More Bandits" .scn to look at - it also has an overlayed image of Chiron. Looking at the main campaign file, starting at line 91 is where this scenario entry begins, a few lines down we see these two lines:

<Overlay offset = "759 192" size = "128 128">ui\overlay_trojanhorse_09</Overlay>
<Overlay offset = "543 247" size = "64 64">ui\overlay_chiron_10</Overlay>

Those are the .bmp images of the Trojan Horse and Chiron. So, we add these into the original code to get this. I fixed the sordid name of the campaign for sake of better taste. I made the two lines bold so they're easy to spot.

<?xml version = "1.0" encoding = "UTF-8"?>
<campaign name = "Your New Campaign" version = "1">
<BackgroundSet name = "greece">
<Image pos = "1">ui\campmap_greece1</Image>
<Image pos = "2">ui\campmap_greece2</Image>
<Image pos = "3">ui\campmap_greece3</Image>
<Image pos = "4">ui\campmap_greece4</Image>
<Image pos = "5">ui\campmap_greece5</Image>
<Image pos = "6" textureReplace="">ui\campmap_greece6</Image>
<Image pos = "7" textureReplace="">ui\campmap_greece7</Image>
<Image pos = "8">ui\campmap_greece8</Image>
<Image pos = "9">ui\campmap_greece9</Image>
<Image pos = "10">ui\campmap_greece10</Image>
<Image pos = "11">ui\campmap_greece11</Image>
<Image pos = "12">ui\campmap_greece12</Image>
</BackgroundSet>
<Scenario dispName = "Part One - Prepare for the journey to Rome!"
filename = "TripToColosseum1.scx"
BackgroundSet = "greece"> The town crier brings news of a spectacular event being put on in the neighbouring city of Rome.
<Overlay offset = "759 192" size = "128 128">ui\overlay_trojanhorse_09</Overlay>
<Overlay offset = "543 247" size = "64 64">ui\overlay_chiron_10</Overlay>

</Scenario>
<Scenario dispName = "Part Two - Rome At Last" filename = "TripToColosseum2.scx" BackgroundSet = "Atlantis">Time to witness the amazing wonder and the grand spectacle
inside.
<Overlay offset = "464 399" size = "32 32">ui\overlay_red_09</Overlay>
</Scenario>
</campaign>

Here is the resulting campaign screen showing the Trojan horse and Chiron images superimposed over my sample campaign screen:

The dots and arrows and other various images are found in the texture bars as I have said, or again look at the main campaign file and find a screen with the dots, take note of the image file name, and add it in your campaign file. There you go, you know how to write a campaign file, how to add whatever background map, and how to overlay the various images found in the original games.

I may mess around with adding a custom background if I have time, and hopefully creating campaign files for AOE3 is similar so the knowledge can be carried forward to editing the new title. I haven't opened the AOM games for a while, and it's nice to revisit it now that I am so much wiser at editing it.


posted 17 October 2005 07:08 PM EDT (US)     14 / 28  
ok..i looked at the files under notepad, but now my games is messed up. what application should i change it to open under?
posted 17 October 2005 07:28 PM EDT (US)     15 / 28  
Ha Ha, oh wait that same thing happened to me,... how do you fix it?
posted 17 October 2005 07:30 PM EDT (US)     16 / 28  
Come on guys. i really need help here!!!!!!!

[This message has been edited by urgal101 (edited 10-17-2005 @ 08:25 PM).]

posted 17 October 2005 08:40 PM EDT (US)     17 / 28  

Quote:

ok..i looked at the files under notepad, but now my games is messed up. what application should i change it to open under?

Wow, that's a lot of confusion in so few words. What do you mean your game is messed up? Notepad is a text program and only opens .txt documents. If you're trying to open a .cpn document it won't open it. You'd have to change the suffix in the file name from .cpn to .txt. But that's what Crimson Editor is for, it opens all kinds of formated text files without having to rename the file. It will open all kinds of files, like .cpn, .xml, .map, etc, etc. Just when it's time to save and make the .cpn file, cut and paste the text into Notepad to save it as I described. I'm not knocking you, just that if you have a problem, try to describe it a bit more. Messing around with campaign files won't make AOM stop working. You'd have to screw up pretty badly. And then, even still, you could always uninstall and reinstall the game if you somehow, miraculously really mess up some of the original content.

I assume you have your scenarios. List their file names and tell me exactly what kind of background screen you want for the campaign file. I can write the code in probably a few minutes for you. Post or email me at tbarak@mts.net. Hurry though, AOE3 is out tomorrow and once I get into the editor, I probably won't come out of it for months.

posted 18 October 2005 12:51 PM EDT (US)     18 / 28  

Quote:

Come on guys. i really need help here!!!!!!!


OMG! You've already had an incredible amount of help!

You may be pushing it a tad.


(¯`·.`.¸¸.°°.¸¸.`.·´¯)
(°¸.·`«Slick G»`·.¸°)
(¯`·.`.¸¸..¸¸.`.·´¯)
posted 18 October 2005 03:37 PM EDT (US)     19 / 28  
i ment i needed help fixing my game!

PS all you need to do is uninstal and reinstal it.


I have just 1 more question: How do you make your own pictures(for example a nemean lion as a picture)

[This message has been edited by urgal101 (edited 10-18-2005 @ 05:48 PM).]

posted 18 October 2005 08:13 PM EDT (US)     20 / 28  

Quote:

I have just 1 more question: How do you make your own pictures(for example a nemean lion as a picture)

Okay, again your question is sorta vague but I assume what you want to do is superimpose a small picture of a nemean lion onto a map background. I had a fast look through the uncompressed texture/ui folder and unfortunately there is no nemean lion bmp in there. The only nemean image I know of is the little icon for the information screen, and that would likely look awful overlapped on the map background. You'd be into creating a custom image .bmp, compressing it to a .dll file, and compressing it again into a bar, and placing the modded bar texture into a new mod folder. In other words, you'd be creating a mod. While I know the theory behind how to create mods, I've never actually done it before for AOM, so really I have experience to draw on to impart to you. I think my post outlines the process so I think you have enough to get started. It's up to you now to experiment and make it work.

GL

posted 19 October 2005 07:12 PM EDT (US)     21 / 28  
im sorry, but i have 1 last question(i promise this will be the last) how do you get the atlantis colony( the new atlantis) to showup as a map?


NVM i figured it out

[This message has been edited by urgal101 (edited 10-19-2005 @ 08:21 PM).]

posted 19 October 2005 09:41 PM EDT (US)     22 / 28  
Don't by shy about asking questions and I didn't mean to sound offended by them. I was hoping you'd use the information and run with it - that is experiment using the direction I pointed you in. It seems you are on the right track figuring out the New Atlantis thing.

If I have time I will mess with adding custom backgrounds and overlays. If it works out I'll try to post more information.

Edited==================================================

OMG, OMG, okay, figured out how to do a custom overlay and....it's really easy. Don't have time to write about it now, but will post again probably tomorrow.

=========================================================

[This message has been edited by ToMyBoY (edited 10-19-2005 @ 10:53 PM).]

posted 20 October 2005 02:37 AM EDT (US)     23 / 28  
Wow, tbarak himself answered the question, so take his advice as godspell.

Without having lots of knowledge about XML, accept my humble opinion boosted by a small search I've made:
The Crimson Editor is just one, but bear some more info in mind...
_________________________________________________________
XML is Text-based
XML is a text-based markup language.

One great thing about XML is that XML files can be created and edited using a simple text-editor like Notepad.

However, when you start working with XML, you will soon find that it is better to edit XML documents using a professional XML editor.
-----------------------------------------------------------
Why Not Notepad?
Many web developers use Notepad to edit both HTML and XML documents because Notepad is included with the most common OS and it is simple to use. Personally I often use Notepad for quick editing of simple HTML, CSS, and XML files.

But, if you use Notepad for XML editing, you will soon run into problems.

Notepad does not know that you are writing XML, so it will not be able to assist you.
-----------------------------------------------------------
Why an XML Editor?
Today XML is an important technology, and development projects use XML-based technologies like:

XML Schema to define XML structures and data types
XSLT to transform XML data
SOAP to exchange XML data between applications
WSDL to describe web services
RDF to describe web resources
XPath and XQuery to access XML data
SMIL to define graphics
To be able to write error-free XML documents, you will need an intelligent XML editor!
-----------------------------------------------------------
XML Editors
Professional XML editors will help you to write error-free XML documents, validate your XML against a DTD or a schema, and force you to stick to a valid XML structure.

An XML editor should be able to:
Add closing tags to your opening tags automatically
Force you to write valid XML
Verify your XML against a DTD
Verify your XML against a Schema
Color code your XML syntax
-----------------------------------------------------------
Altova's XMLSPY
At W3Schools we have been using XMLSPY for many years. XMLSPY is our favorite XML editor. These are some of the features we especially like:
Easy to use
Syntax coloring
Automatic tag completion
Automatic well-formed check
Easy switching between text view and grid view
Built in DTD and / or Schema validation
Built in graphical XML Schema designer
Powerful conversion utilities
Database import and export
Built in templates for most XML document types
Built in XPath analyzer
Full SOAP and WSDL capabilities
Powerful project management

hope I've helped with my humble opinion.

regards


the Elder
"imagination is more important than knowledge."
Albert Einstein
posted 20 October 2005 04:23 AM EDT (US)     24 / 28  

Quote:

Wow, tbarak himself answered the question, so take his advice as godspell.

I don't know if I should feel insulted. I didn't intend for anyone to take my advise as gospel. Urgal had a question, and I had some time on my hands to experiment. I am not a coder, just a hack, and Crimson Editor was the first code editor I ever DLed. It's free, small, easy to use and has a lot of nice features. I got it when I started modding for Doom3, and I do all my coding with it. Is it the best, the only one out there? Of course not, and I still use Notepad a lot. I seem to get into this with professional coders and purists all the time. I'm just a hack that knows how to copy and paste, and understands how to read and intrepret different kinds of code and how to arrange files. I am posting since I couldn't find any tutorials on custom overlays for campaign files. Now there's a permanent record if anyone is interested. If they're not, they can skip this thread.

Adding a Custom Overlay Image

If AOM's original content doesn't have a picture of an overlay you want to use, you can make your own, and it's not too hard. Here's what the new screen looks like - notice the Nemean Lion!:

Making the Texture

Since there is no nice Nemian Lion image in the stock assets that's suitable to use as an overlay, I chose to do that as an experiement. I first wanted to get some terms of reference so I converted the overlay_chiron_10.ddt (found in the AOM/textures/textures.bar, in the ui folder) to a bmp and opened it up with my paint program. It's a tiny image only 64 x 128 pixels so I enlarged it slightly below.

Notice the bmp is the familiar two images, with the actual image of the character above and the alpha channel information below it. My version is the one at right. To get the image of the nemean lion I went into AOMTT editor, placed the lion, and using the camera control got an angle similar to the that of the chiron.bmp. I did a screen copy and copied into the paint program where I cropped and resized the image to 64 x 64. I then in turn copied this image and pasted it below it, and painted in my alpha channel overtop of it: just paint white where ever the lion's body is, and black where it isn't. The result is the image right above. I made sure the whole thing was 64 x 128 in size. I saved this image as "overlay_MyNemean.bmp" at a 24 bit rate. Convert this bmp to a .dll and save it in the aom/textures/ui folder. Here's a close-up of how the lion looks on the "greece" background:

Not bad for a first try at an AOM mod, but my alpha channel could have been drawn a bit more carefully, to include the lion's shadow. Oh well next time!

Editing the Campaign File

Make sure AOM/TT is shut down, then open Notepad and paste this code into it. This is just that original .cpn file I've been using all along. I've made the line I changed bold so its easy to see.

<?xml version = "1.0" encoding = "UTF-8"?>
<campaign name = "Your New Campaign" version = "1">
<BackgroundSet name = "greece">
<Image pos = "1">ui\campmap_greece1</Image>
<Image pos = "2">ui\campmap_greece2</Image>
<Image pos = "3">ui\campmap_greece3</Image>
<Image pos = "4">ui\campmap_greece4</Image>
<Image pos = "5">ui\campmap_greece5</Image>
<Image pos = "6" textureReplace="">ui\campmap_greece6</Image>
<Image pos = "7" textureReplace="">ui\campmap_greece7</Image>
<Image pos = "8">ui\campmap_greece8</Image>
<Image pos = "9">ui\campmap_greece9</Image>
<Image pos = "10">ui\campmap_greece10</Image>
<Image pos = "11">ui\campmap_greece11</Image>
<Image pos = "12">ui\campmap_greece12</Image>
</BackgroundSet>
<Scenario dispName = "Part One - Prepare for the journey to Rome!"
filename = "TripToColosseum1.scx"
BackgroundSet = "greece"> The town crier brings news of a spectacular event being put on in the neighbouring city of Rome.
<Overlay offset = "759 192" size = "128 128">ui\overlay_trojanhorse_09</Overlay>
<Overlay offset = "543 247" size = "64 64">ui\overlay_MyNemean</Overlay>
</Scenario>
<Scenario dispName = "Part Two - Rome At Last" filename = "TripToColosseum2.scx" BackgroundSet = "Atlantis">Time to witness the amazing wonder and the grand spectacle
inside.
<Overlay offset = "464 399" size = "32 32">ui\overlay_red_09</Overlay>
</Scenario>
</campaign>

It's obvious all you need to do is use the line "<Overlay offset = "543 247" size = "64 64">ui\YourImageName</Overlay>". Put this line in the scenario entry where you want the custom overlay to be placed. The first two numbers are the coordinates of where the custom image will rest (the screen is 1024 x 768) and you can change these numbers to move the overlay around. The first number is the x coordinate and second is the y. The "64 64" number I guess must match the size of your custom image (minus the alpha channel).

With these principles you can overlay just about any custom image you want in your campaign screens, and it's a pretty easy mod!!

[This message has been edited by ToMyBoY (edited 10-21-2005 @ 05:25 PM).]

posted 21 October 2005 03:10 AM EDT (US)     25 / 28  
ToMyBoY or tbarak, why were you offended?
I meant it as a point that you really know that stuff ~ and I know next to nothing. Perhaps it's because English isn't my mother tongue, that some times I don't express myself correctly and I'm misunderstood as to my intentions.
My point is proven further, with the info you present ~ it's like a guide.

regards

George


the Elder
"imagination is more important than knowledge."
Albert Einstein
posted 21 October 2005 05:17 PM EDT (US)     26 / 28  
Hi George,

Sorry, I apologize, I took your post too literally and misunderstood and was a bit hasty in the tone of my response. I appreciate your kind words. I was telling a friend it was funny that I didn't know all this stuff while I was actually working in the AOMTT editor, otherwise my Colosseum campaign screen wouldn't have been so dull and full of errors. Oh well, maybe we can carry the knowledge forward to the AOE3.

All the best and I promise in the future to be a little more aware of people's national diversity.

posted 21 October 2005 05:18 PM EDT (US)     27 / 28  
thank you sooooooooooooooooooooo much! i think i understand it. (a screen copy is the same as a scren shot, rite?)
how do you convert files?

[This message has been edited by urgal101 (edited 10-22-2005 @ 02:29 PM).]

posted 22 October 2005 04:49 PM EDT (US)     28 / 28  
You're welcome.

Well the Print Scrn button on the keyboard just copies what you see on the screen to the clipboard. Then you open your paint program and click paste. I then save to .bmp which is the format used by AOM. The screen shot feature in AOM (F12 or whatever it is) actually places an image in the My Documents/My Games/AOM/Screenshot folder. Doing that means having to move the image, etc. I find the first method is a bit more easy and faster.

As for converting files, you need AOMed. You can download it at the Download section. I would suggest doing a little reading in the library, particularly articles on creating custom textures. They explain how to uncompress the .bar files, and how to convert files from .dll, .scn, .xmb to formats like .bmp, .txt, and .xml which can be opened with common tools. Put basically, AOM's original files are compressed into .bar files which must be converted.

[This message has been edited by ToMyBoY (edited 10-22-2005 @ 04:53 PM).]

Age of Mythology Heaven » Forums » Scenario Design » campain editor
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames