Tutorial: World Map and Towns Optional Extras [Edit 2!!]

Discussion in 'Modding and Scripting Support' started by The Pigeon, Jun 6, 2012.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. The Pigeon

    The Pigeon Member

    Messages:
    305
    Likes Received:
    5
    Joined:
    Nov 28, 2007
    Tutorial: World Map + Town's Optional Extras

    A while ago I made a tutorial on how to make a world map with 2 locations
    http://www.terra-arcanum.com/phpBB/view ... hp?t=18057

    I said I would add more as I found stuff out. I have found more stuff out! So I present a few additions:

    Part 6: World Dialogue
    --- Getting an NPC to mark a map location on the world
    Part 7: Ending the World
    --- Ending you module, showing slides and playing music
    --- Not strictly world map related per se, but I'll add it for those who
    --- would like to know.
    Part 8: Random Battles!
    --- When traversing the world map, fight monsters of various kinds!

    In non-world map, but still Module Making news, I am planning on making another tutorial later on which deals with undatting arcanum, hex editing and making custom monsters/npcs for begginers but although I've learned basically all I need to know I want to test a few things before I say "This works and this is how you do it". Anyone who's interested in this let me know.

    ---------------------------------------
    ---------------------------------------
    Part 6: World Dialogue
    ---------------------------------------
    ---------------------------------------

    65) I'll assume you already know how scripting and dialogue generally work (as they are covered in Amtut) so this section is going to be tiny. Below is an example conversation between the player and an NPC in TutWorld

    {1}{G:}{G:}{}{}{}{}
    {2}{Tell me where Town2 is}{}{5}{}{20}{}
    {3}{Tell me where Town2 is}{}{-4}{}{20}{}
    {4}{E:}{}{1}{}{0}{}

    {20}{Sure here is is [She marks it on your map]}{Sure here is is [She marks it on your map]}{}{}{}{mm 2}
    {21}{E:}{}{1}{}{0}{}

    The significant bit is on line 20, in the final pair of curly brackest "mm 2".
    What this means is mark the location of the locations numbered "2" gamearea.mes. In this case, location2 is TestTown2;

    {0}{0, 0, 0, 0 /A Place Unimportant/This is the unknown area.}
    {1}{6000, 6000, 0, 0 /TestTown1/A small river town.}
    {2}{5000, 5000, 0, 0 /TestTown2/Another small river town.}

    I don't know if you can mark a map purely in a script, but then I haven't looked so it may be possible.

    ---------------------------------------
    ---------------------------------------
    Part 7: Ending the World
    ---------------------------------------
    ---------------------------------------

    Ending a game of Arcanum is done via calling a script.
    66) Open up script maker and add the following actions:

    0. end game and play slides
    1. return and RUN default

    Easy huh? There's a little be more to do though. First we want to see where we have the slides and music we want in the right place.

    67) Open the file Arcanum\modules\TutWorld\Rules\slide.mes

    After the explation bit at the begining, there are script lines. Here's an example which shows 1 slide at the end:

    {0}{death.bmp DeathSound.mp3}
    {1}{Credits.bmp }
    {2}{slide01.bmp 10second.mp3}

    The file slide01.bmp is located in Arcanum\modules\TutWorld\Slide and the mp3 file is located in Arcanum\modules\TutWorld\Sound\Speech\Slide.

    The file 10second.mp3 appears to come as default in a module. It does't have any volume, but if you don't include an audio track (even a silent one) then you don't see any slides.

    Now you might be thinking, how does one control which slides are played? After all, arcanum had many possible combinations of endings. To do this you'll have to open an existing script.

    68) Using the script maker, open Arcanum\modules\TutWorld\scr\00997EndSlides.scr

    If you were to only play 1 slide it would look like this:

    0. slideshow: queue slide 1
    1. return and RUN default

    The slide queue line is what shows a particular slide so you'll need an if statement and a goto statement. E.g.

    0. If global flag 1 is set
    THEN slideshow: queue slide 1
    1. Slideshow queue slide 2
    2. Return and RUN default


    Unfortunately I haven't got it to slide the second slide yet (though I know that "set global flag 1 to true" works having tested it with a teleporting if statement. Will research some more later.

    ---------------------------------------
    ---------------------------------------
    Part 8: Random Battles!
    ---------------------------------------
    ---------------------------------------

    While we can traverse the world and have locations marked on our map it'd be neat to fight monsters of various type, frequency and plot relevance. Fortunately this is really easy to do.

    69) Open Arcanum\modules\TutWorld\Rules\WMap_Rnd.mes

    This document has all you need, although I believe having your main map in MapList.mes as "{5000}" not "{5001}" is important as well. At the top of the document you should see a few charts; Frequency Chart, Power Chart and Encounter Index Chart.

    Frequency Chart: describes a point, radius and frequency of encounters that happy in that radius. e.g:

    {10000}{6000, 6000, 4800, 80%}

    The location encounters will happen is 6000,6000 to a radius of 4800 and frequency of 80%. The higher the frequency, the more it will happen. I put 80 here so we can test an encounter happening often. You would want something more like 20% or 5% as you'll be tripping over monsters otherwise.

    Note that smaller circles of frequency override larger ones so you can have a big area with basic dudes and a small area within (maybe next to a town?) with different values. This is true of power charts as well I believe.

    70) Set your frequency chart to {10000}{6000, 6000, 4800, 80%}

    Power Chart: this works the same as the frequency chart, only instead of frequency at the end, you have the power level of the encounter.

    I find "easy" is a good idea as it ensures you'll see an encounter happen. You'll want your power and frequency charts to overlap because it ensures an encounter of power x happens at location y, z amount of the time. You don't need to have an equal number of these charts as you may wish to have multiple power charts with the same frequency.

    Power can be either Easy, Average or Powerful. You'll note that later in the section there are tables called "Grasslands Day Easy" and "Grasslands Day Average" etc. Want a powerful grassland encounter?
    Make a new power chart, e.g. {20001}{5000, 5000, 500, Powerful}.

    71) Set your power chart to {20000}{6000, 6000, 4800, Easy}

    Last of all is the distinct encounters table. This works the same as frequency except that the final value points to a table number at the bottom of the text file. You'll need 1 entry for each distinct encounter table.

    72) Set your encounter table to

    {30000}{4000, 4000, 1000, 54}
    {30001}{4000, 4000, 1000, 55}

    If you want more than 2 distinct encounters, you also need to increase a number located here:

    {49999}{2} // # of Distinct Encounter Tables

    If you wanted 3 (we wont for this tutorial, but I'll show you how anyway) the encounter table would look something like this

    {30000}{4000, 4000, 1000, 54}
    {30001}{4000, 4000, 1000, 55}
    {30002}{3000, 3500, 500, 56}

    And the number like this

    {49999}{3} // # of Distinct Encounter Tables

    73) Go to the bottom of WMap_Rnd.mes and replace table 54 (and 55 if there is one) to this

    Table 54 // Sample
    {55400}{50%, First: 28339, 1, TriggerCount: 1}

    Table 55
    {55500}{50%, First: 28339, 1}

    Each table (not just distinct encounters) must have an index of 100 above the previous. So 55 starts at 55500, while 54 starts at 55400. Each table can have a fair number of different encounters in it, but we will only include one in each for now. In Arcanum, these were used to make the play see the still water bunny and Arronax (one off events). You can make them happy any number of times though buy simply not including
    TriggerCount: 1 in the parameter list.

    When testing Table 54 did not seem to produce any encounters on the world map, but this may have been due to poor choice of encounter location and radius. Also, when I first tried making random encounters (I looked at the file and thought: This'll be easy!) it didn't work....

    I believe what made it work was having Table 54 and 55 have encounters. At least, it didn't work until I added them on a whim : P. I was over the moon to get a attacked by an ailing wolf on the world map!
    Speaking of which some adivce you may want to know:

    ADVICE THAT MIGHT SAVE YOUR DUDES LIFE:

    A starting human character, with 11 Dex, 2 melee may want to fight a sole ailing wolf and win. However, the tables for forrest day include battles with 1 to 2 creatures of various kinds, e.g.

    Forest
    Table 36 Forest Easy Day
    {53600}{50%, First: 28399, 1} // Black Bear
    {53601}{20%, First: 27336, 1-2} // Lesser Kite
    {53602}{60%, First: 28339, 1-2} // Ailing Wolves
    {53603}{5%, First: 28339, 1-2, Second: 28319, 1} // Ailing Wolves+Wolves

    This is bad as your guy will die if he fights 2. Consider putting some static creatures in a town the player starts in so they can level up a bit and/or get healing items. Characters who can't fight at all with die shamefully against tinys creatures unless you change the monster types to something you can talk your way past. And that's ALL monster types you expect Mr Persuasion to encounter from point A to point B.

    It is also worthy of note you DO NOT HEAL AS YOU TRAVEL so investing in a healing spell (fatigue reverts to max as you travel) or healing items is a good idea. Players who are new to your map and are allowed to travel across the world may do so blissfully unaware they will die from lack of preparation and/or skill (Think Fallout 1 - Rad Scorpions although no amount of preparation helps you in that game - Load and save a lot!).

    The ability to customize each encounter is fairly well self explained in the document, but I'll go over it here a little anyways;

    74) Look at this {53702}{60%, First: 28339, 1-2, Second: 28319, 1} // Ailing Wolves+Wolves

    This means there 60% chance (doesn't have to added up to 100 with other enounters of same table) of fighting 1-2 monster prototype number 28339 (ailing wolf) and 1 monster prototype number 28319 (Wolf).


    Hope you enjoyed this tutorial on world maps and happy modding!
     
  2. Wims

    Wims New Member

    Messages:
    161
    Likes Received:
    0
    Joined:
    Jun 13, 2011
    To get all the IF commands just press "c" for condition instead of "a" for action
     
  3. The Pigeon

    The Pigeon Member

    Messages:
    305
    Likes Received:
    5
    Joined:
    Nov 28, 2007
    Oh... right.. oops :p I'll amend it tomorrow.

    Update:

    It doesn't seem to play the second slide yet but I'll work more on it later, still have some ideas to try but I want to finishing trying stuff for my Custom Monster tutorial.

    Update:

    See part 8 for random battles!
     
Our Host!