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

Caesar IV: Game Help
Moderated by kach, Gweilo

Hop to:    
Welcome! You are not logged in. Please Login or Register.28 replies
Caesar IV Heaven » Forums » Caesar IV: Game Help » Editor tutorial
Bottom
Topic Subject:Editor tutorial
Pecunia
CBH Seraph
posted 10-31-07 14:19 ET (US)         
For those of you who haven't seen today's news yet, we've started compiling an editing tutorial/info section.

You can find it here: http://caesar4.heavengames.com/gameinfo/editor/

There are only a few pages yet, but we expect to add pages covering all functionality of the editor (including scripting). Stay tuned for updates!

Any and all feedback on the pages is welcome

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
AuthorReplies:
SimetricalJean
Pleb
posted 11-01-07 09:32 ET (US)     1 / 28       
Hi Pecunia,


Thanks a lot for your work, its really appreciated...Keep up the good work, looking forward for the rest 2 come...if there is anything we can do back for you...
goonsquad
Pleb
posted 11-01-07 11:17 ET (US)     2 / 28       
I was afforded a sneak peek at these pages quite some time back and believe me they have proven invaluable, in particular the apron page. Notice a couple of new pages I hadn't seen previously as well.
Angrod
Pleb
posted 11-01-07 15:20 ET (US)     3 / 28       
This is awesome stuff Pecunia! Thanks - the list of aprons will be incredibly useful. Look forward to the next installment :-)
Pecunia
CBH Seraph
posted 11-03-07 11:28 ET (US)     4 / 28       
Part two is now available

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
SimetricalJean
Pleb
posted 11-09-07 05:14 ET (US)     5 / 28       
Hello Pecunia,

dont get me wrong, i dont want to rush you or anything, take your time, but just genuinly interested how its going with the editor manual? (When's the next part due? :-) )

Greets,
Pecunia
CBH Seraph
posted 11-10-07 11:02 ET (US)     6 / 28       
The editor manual's doing just fine: I'm working on it at the moment.
(When's the next part due? :-) )
Tomorrow

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
kach
Angel
posted 12-14-07 15:55 ET (US)     7 / 28       
Part four is now available. Thanks Pecunia.
kach
Angel
posted 02-09-08 03:59 ET (US)     8 / 28       
Part 5, describing the XML file, is now available.
goonsquad
Pleb
posted 02-09-08 04:35 ET (US)     9 / 28       
Another excellent chapter, and its taught me a few things I didn't know.

One thing that bears pointing out with xml is that it only represents game text, nothing more (with the proviso that the game reads it in the case of requests and empire states and things need to be present and in the right order in the xml for these to work correctly, more on this below) . Thus when you enter values in the xml for Security, Favor, Prosperity and Culture, these values only appear in the mission briefing. It is not the xml that causes the game to actually award victory when these targets are reached. This comes from within the editor itself. For example, sandbox scenarios have a requirement of 1,000,000 population in the xml and thus in the mission briefing, but unless this has been set in the editor as well, victory will not occur even if this population is somehow reached. The targets shown in the ratings advisor come from the settings made in the editor, not the xml, and there is absolutely no connection whatsoever between the two sets of values. Therefore it is perfectly possible for the mission briefing to be completely at odds with the ratings advisor, however it is the ratings advisor that contains the correct information.

The other thing that I think bears mentioning is that empire city details and also request/demand details in the xml are critical. Notwithstanding that you enter these in the editor as well, they will not "stick" unless they appear in the xml, and in the case of empire cities, I find they have to be entered in the map editor in the same order they appear in the xml or else they get jumbled up.

Lastly, although the convention used in all scenarios that come with the game is that the Players City is listed last in the xml, it is not essential to do this.

[This message has been edited by goonsquad (edited 02-09-2008 @ 04:55 AM).]

Pecunia
CBH Seraph
posted 02-10-08 14:06 ET (US)     10 / 28       
Many thanks for the comments, Goonsquad. I've added a few additional notes to the pages

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
Gordon Farrell
VIP
posted 02-17-08 11:30 ET (US)     11 / 28       
Hey Pecunia et al...

This tutorial rocks! I've FINALLY gotten enough time to build a coupla C4 maps and I have to say I'm blown away by this amazing tutorial. Thanks a million!

President and Creative Director, Alternate Worlds (2011 - present) http://alternate-worlds.com/
Lead Writer, Reverie World Studios, (2008 - present)
Director of Voice Acting, Reverie World Studios, (2014 - present)
Pecunia
CBH Seraph
posted 02-18-08 12:03 ET (US)     12 / 28       
Thanks Gordon

Just wait until you see what's possible with scripting... I'm looking forward to playing your maps!

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
JimMRooney
Pharaolympics 2000 Competitor
posted 02-24-08 16:05 ET (US)     13 / 28       
Hi, Pecunia. Thank you for all your work on the tutorial. I wasn't going to try the editor, because of the XML stuff, but I think I'll give it a try now. I know the CotN editor enough to create scenarios with it; they seem similar. I have some questions looking through things.

First, I couldn't find anywhere if the tutorial is finished or if there are more articles coming.

For the first save, you say to do a "main" save and then "save textures". Is the texture save necessary just the first time or for every save?

About the XML file: In the basic scenario info, you show designer added bits like Victory text in "[]" (ie [Victory text]). In the other examples such as Empire map the text is just Latium (for example) with no "[]" around it. Are the brackets required in those first examples? For example, [You win.] rather than You win.

Another XML question: I think I know the answer to this one, but I'll ask anyways. If you have more than the basic info, such as Empire site names, do you just add it between the StringTable and /StringTable lines, only using the xml version line and ScenarioName lines once or do you do a new set for each one?

Please forgive the xml questions if they are rather basic. I don't have much, if any, experience with programming.

Jim

[This message has been edited by JimMRooney (edited 02-24-2008 @ 04:08 PM).]

Pecunia
CBH Seraph
posted 02-25-08 01:06 ET (US)     14 / 28       
Hi Jim,

There are a few more pages coming on using scripts to set up invasions, military requests and earthquakes. This is a rather complex subject, so I may write a utility to make it easier.

The "Save textures" is required on the first save. Afterwards, it's only necessary if you actually changed the textures by painting on them.

The XML file: the text should be without square brackets. I only used them in the first example to indicate placeholder text.

The XML version line, ScenarioName and StringTable tags only occur once in the XML file, any extra info should be put between the <StringTable> and </StringTable> tags

Don't worry about asking "basic" questions: I wanted to write the tutorials such that they're understandable for people with limited or no programming experience; just ask about any unclear points so I can improve them

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
JimMRooney
Pharaolympics 2000 Competitor
posted 02-25-08 18:54 ET (US)     15 / 28       
Thanks for the reply.
There are a few more pages coming on using scripts to set up invasions, military requests and earthquakes.
So, if I stay clear of those, I should be able to design a working scenario.
Don't worry about asking "basic" questions: I wanted to write the tutorials such that they're understandable for people with limited or no programming experience; just ask about any unclear points so I can improve them
Will do.
JimMRooney
Pharaolympics 2000 Competitor
posted 02-27-08 02:19 ET (US)     16 / 28       
Help! I've already got trouble.

I followed the Basic scenario settings tutorial, using the "Create New Scenario" button to start. I set the map size, hit the reset button as instructed and selected the region and the apron. (When am I supposed to hit the set button for the apron? I clicked it after the set button up top.) I then clicked the set button up top for the opening conditions.

Next I wanted to start the terrain tutorial, but it says to save and exit first. So, per the first save instructions, I saved overall and saved the textures. I exited and returned through "Edit scenario". But, when I click on "Paint ground", it doesn't ask if it should create a new texture set as the tutorial says; it just brings up a cursor to paint the existing one with (the one with the dry river bed shown in the startup screen picture in the tutorial).

I'm assuming the new texture set would let me set the color of the ground since it doesn't match the apron. Or do you always have to paint over this original color layer?

The editor crashed soon after that, so I'm not off to much of a start.
Gordon Farrell
VIP
posted 02-27-08 11:52 ET (US)     17 / 28       
Hey Pecunia! Got another one for you... do you know how we create campaign files? I thought I saw that one of the modders had done that...

President and Creative Director, Alternate Worlds (2011 - present) http://alternate-worlds.com/
Lead Writer, Reverie World Studios, (2008 - present)
Director of Voice Acting, Reverie World Studios, (2014 - present)
Pecunia
CBH Seraph
posted 02-27-08 16:25 ET (US)     18 / 28       
Gordon: I've had a brief look at the three XML files available in the Data\Campaigns\ folder of C4, and you can probably create a new campaign by writing a new XML file and dumping it in that Campaigns folder. I haven't tried it, so I wouldn't know how that would work...

Jim: to be honest, painting the terrain with the editor is a mess... there's a way to do the terrain without using the editor, but it seems I still need to write a page for that as well. The editor tends to crash when painting, and the frequency of the crashes seems to depend on the graphics card. And yes, normally you'd paint over the default map.

For now, you can look up the scenario in which the apron was originally used, and copy the two DDS files of that scenario over the DDS files of your own scenario. That'll give you a start at least; I'll write up something on DDS editing this weekend, if I have the time (it looks like I'll have to work this weekend )

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
JimMRooney
Pharaolympics 2000 Competitor
posted 02-28-08 17:49 ET (US)     19 / 28       
For now, you can look up the scenario in which the apron was originally used, and copy the two DDS files of that scenario over the DDS files of your own scenario.
That's an excellent suggestion. If it isn't in the tutorial (I didn't see it), you might add that in.

Unfortunately, even with that, one click of the brush and the editor crashes. I did try a smaller map (384 instead of 512) and I could paint for a while before it crashed. Perhaps something else to mention in the tutorial?

I can't believe it, but the CotN editor is so much more user friendly than this one, at least graphics-wise. Someone with limited experience could produce some nice looking maps. It seems like C4 editor requires a graphics art degree or experience to get decent results.

I've decided for my first scenario to just recycle a map from the game.

Thanks again for the help.

Jim
goonsquad
Pleb
posted 03-19-08 06:00 ET (US)     20 / 28       
What I did, was found a large map that had a quarter of it as all land, and selected this quarter, then pasted it into a new file (in Gimp) and saved it. I can then resize this file to the size map I want, and add all the necessary features (again in Gimp), lining up the water boundaries with those of the apron (as described by Pecunia in one of the early tutorial articles).

This technique was used on the Aisle of Plenty map, and also the Iceni Queen map (which is still under development, although the map itself has long been completed). The latter was wholly made in a single session of about three hours, from an old map of Londinium. You can make a completely original map in quite a reasonable time once you get the hang of it.

Sometimes I use the map editor to do colour shading, with reasonable success, but mostly I use Gimp. If using the editor to paint terrain, you MUST save often. I believe TM used a third party program to do the terrain on the maps that came with the game, but the blends were done in the editor. I don't find it necessary to mess with the blends at all. You can use pretty much any blend and it looks OK.

An alternative to the above technique is to start with the dds (and apron) from one of the existing scenarios, and use copy and paste (again in Gimp or a similar program) to customise it. You copy whole chunks of the map and judiciously paste them somewhere else, over map features you want to get rid of. This leaves join lines which you can disguise using the blur tool or by adding things like trees, etc. The idea is that your map cannot be readily discerned as originating from some other map. This was the technique I used in The Pink Lake (which came from the default map), Silk Purse, and The Final Deception. The last mentioned started its life as Caesarea, and when Aramann first tested it, it still had Caesarea's requests and invasions, little by little it became its own entity.

My first C4 contest (Bling, a mere 12 months ago) was made using the Djedu map, with no changes whatsoever to the map itself, but changes to the available commodities and trade prices and with mission requirements added, but no scripting whatsoever, it did not even have a cs file. This is a very good way to go first off, this way you don't have to master everything all at once, and you can make something very enjoyable and playable, and completely different from the original, without altering the map terrain at all.

[This message has been edited by goonsquad (edited 03-19-2008 @ 06:46 AM).]

Pecunia
CBH Seraph
posted 03-24-08 03:49 ET (US)     21 / 28       
Part 6 of the tutorial, about scripting, is now available

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
Angrod
Pleb
posted 03-24-08 07:46 ET (US)     22 / 28       
Another excellent addition Pecunia! Just a few very minor things to add:

Something that is obvious when you think about it, but I hadn't realised until doing Arabian Bizarre: if you have Defeat and Victory goals set up, ordering is important: whichever goal is to take precedence has to be listed first.

On gifts to Caesar: if you disable the medium and large gifts, but set the small gift to something other than a scrimshaw, when the player opens the scenario it will appear that two small gifts are available for sending. However, whichever gift is sent, the player will still only gain favor from the first three small gifts sent.

Requests vs. orders: you can set both reward and penalty to be greater than zero. For example, a player could gain 5 favor for meeting a request, or lose 2 favor if s/he fails to meet it.

In the OnTick method there's a call to mMilitaryAI.Update(game, 0.1); The "0.1" refers to the proportion of buildings that a raid/pillage will destroy before leaving. The number can be varied according to taste.

For the cohort type constants, you can actually use the string equivalents (which I'm tending to do now as they are slightly more memorable), e.g. "ENEMY_GREEK_LT" and so on.
aramann
Pleb
posted 03-26-08 13:28 ET (US)     23 / 28       
Simply amazing work Pecunia, congratulations!
Between you and Angrod/Hieronymus I've learnt quite a bit. Almost ready to strike out on my own for scenario design! Wouldn't be possible without a tool like this! Thanks!
Pecunia
CBH Seraph
posted 03-27-08 13:55 ET (US)     24 / 28       
Angrod: thanks for the comments, I've changed the editor pages to add them

Aramann: glad you find the pages useful, looking forward to your scenarios!

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
Gordon Farrell
VIP
posted 03-27-08 20:44 ET (US)     25 / 28       
"In the OnTick method there's a call to mMilitaryAI.Update(game, 0.1); The "0.1" refers to the proportion of buildings that a raid/pillage will destroy before leaving. The number can be varied according to taste."

Nice one, Angrod! Verrrrry useful!

President and Creative Director, Alternate Worlds (2011 - present) http://alternate-worlds.com/
Lead Writer, Reverie World Studios, (2008 - present)
Director of Voice Acting, Reverie World Studios, (2014 - present)
aramann
Pleb
posted 03-28-08 20:18 ET (US)     26 / 28       
IN THAT case, can't wait to see what you come up with Gordon! Good luck and we'll all wait for your scenario here!
Gordon Farrell
VIP
posted 04-25-08 04:25 ET (US)     27 / 28       
"Gordon: I've had a brief look at the three XML files available in the Data\Campaigns\ folder of C4, and you can probably create a new campaign by writing a new XML file and dumping it in that Campaigns folder. I haven't tried it, so I wouldn't know how that would work..."

So here's what I found out. The xml campaign files in Data\Campaign seem to just provide the text for your new campaign but they dont actually turn your scenarios into a campaign. The text leads you to a world map that is inert -- it doesn't have your cities on it and it doesn't activate your first scen when you hit "start."

There must be another function somewhere that actually bundles your scens into a functioning campaign... probably with the extension .ssa.

Has anybody experimented witb this? Any idea how to accomplish it?

President and Creative Director, Alternate Worlds (2011 - present) http://alternate-worlds.com/
Lead Writer, Reverie World Studios, (2008 - present)
Director of Voice Acting, Reverie World Studios, (2014 - present)
Gordon Farrell
VIP
posted 04-25-08 11:56 ET (US)     28 / 28       
Okay, here's the way it works:

You can create functioning campaigns by rewriting one of the xml docs in Data/Campaign. However, your campaign HAS to use the names TM already hard-coded into the campaign map. When your scenario actually loads up, it will have the name you assigned to it. I'm playing with ways of reconciling these two sets of names in a way that feels logical... will report in soon.

President and Creative Director, Alternate Worlds (2011 - present) http://alternate-worlds.com/
Lead Writer, Reverie World Studios, (2008 - present)
Director of Voice Acting, Reverie World Studios, (2014 - present)
You must be logged in to post messages.
Please login or register

Hop to:    

Caesar IV Heaven | HeavenGames