Adding a new location to the worldmap
The Cathedral of Attnam > Programming|
Print
|
Sep 10, 2010 at 1:57 am |
#1
![]() |
|
![]() kobold lord |
Joined: Sep 9, 2010 Occupation: Petty Functionary Location: Eating pea soup in the world map Interests: Mangoes Posts: 118 Groups: | |
|
Adding a new location to the worldmap Warning, parts of this may be a bit spoily, if you can decipher it.I think holybanana intended on setting out a coding tutorial on this topic, but I decided to have a crack at it and have figured out how this is done. I reverse engineered it from differences between IVAN and LIVAN. I will show how to add a new location to the worldmap. In this example I will add the rocket launch pad named Baikonur, situated amongst leafy forest. The parts I added are in bold. 1) In define.dat and in ivandef.h add the line: # define COSMODROME 5 i.e. I inserted into the following lines: Code ... 2) In wterras.h add an owterrain (over-world terrain) called cosmodrome (as per the other entries). For this example: Code ... 3) In wterras.cpp add a const char* cosmodrome (to the best of my knowledge, this adds the new location to IVAN, links the location bitmap to its position in wterra.pcx and attaches the relevant dungeon). Add the following lines of code: Code ... 4) To worldmap.cpp add the CosmodromePos codes, the SetEntryPos(COSMODROME, CosmodromePos) and the GetWSquare. This is slightly more elaborate, I want the cosmodrome to be situated in a leafy forest, so I had to fix that in as well. Firstly inside the function: void worldmap::Generate(), I added another condition in this for loop, and in the statements that follow I added a couple of other lines: Code ... Further along, still in worldmap.cpp, there is an if-statement after which is added: Code ... SPOILER ALERT. Click here to see text. 5) Then hit the Compile button. IVAN will crash if you enter into the location and haven't added the dungeon in dungeon.dat 6) Finally add the dungeon to dungeon.dat, from this position it is only a matter of scripting the dungeon to your hearts content. DON'T forget to increment the number of dungeons and levels! Enjoy. | ||
|
Last edited by Warheck : Sep 10, 2010 at 8:34 am. Edited 3 times total | ||
|
Print
|
||
The Cathedral of Attnam > Programming > Adding a new location to the worldmap


Sep 10, 2010 at 1:57 am

kobold lord
Warning, parts of this may be a bit spoily, if you can decipher it.