Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Help with map editing

Page: 1 of 1
 FallenJedi1
11-06-2010, 10:20 AM
#1
Hello people, I would like to ask for help with how to edit a map.
 TimBob12
11-06-2010, 11:46 AM
#2
Well it depends on what you want to edit

Some things such as adding NPCs is most easily done with scripts.

First tell us what you want to do.
 FallenJedi1
11-06-2010, 2:04 PM
#3
All I want to do is place ojects through kotor tool module editor, but don`t know how to use it.
 TimBob12
11-06-2010, 2:26 PM
#4
For placing objects it is usually easier to use scripts. Also it depends on what module you want to use the map for.

http://kotortool.starwarsknights.com/pgs/ktoolmap.php)

there is a list there of all the maps supported for the module editor. If you are modding KOTOR 2 then all the modules are supported although only some from KOTOR 1 are supported. You can do it through the map editor although I prefer to do it through scripts because then you don't have to pacakge the whole .mod file. You only need 2 files. You should only really use the map editor if you are doing lots of major changes or are using an existing module to create a new module.

So check this out

http://www.lucasforums.com/showthread.php?t=143536)

If you get stuck just ask :)
 jerry.boy
01-09-2011, 11:49 AM
#5
I don't know if I have understood everything, but is there any chance to add new enemies, when working with scripts? I noticed that there aren't maps of many locations, so it is preety impossible to make my way easier (with no scripts) to add some creatures in every place in a game.
How long do you think i will spend on learning how to use scripts, only to make games "battles" more interesting and longer? I read about "Module Editing Tutorial" and i hope that there are some advice about that.

http://www.lucasforums.com/showthread.php?t=206096)

Do you know which of those films contains informations how to do that?
 TimBob12
01-09-2011, 12:45 PM
#6
That tutorial is not what you want. That is not about the scripting part. The scripting part is so much easier.

Bear with me on this.

I'm on a different computer than what I normally use and this is Linux so no Kotor Tool so there will be no pics but I can pull code directly from the PC using LogMeIn.

First find the onenter script of the module you want to add a custom npc into. e.g. k_ptat17ag_enter.ncs would be for the the Kotor1 Tatooine Cantina (or possibly czerka office i can't remember)

You want to extract this but put 'old_' in front of it (minus the quotes).

Then using the Kotor Tool Text editor start a new script that has something like this


void main()

{

// ST: Check if it's the player entering the trigger, and that it hasn't already fired

if (!GetLocalBoolean(OBJECT_SELF, 40) && (GetEnteringObject() == GetFirstPC())) {



// ST: Make sure the trigger only fires once.

SetLocalBoolean(OBJECT_SELF, 40, TRUE);





CreateObject(OBJECT_TYPE_CREATURE, "jawa_jobs", Location(Vector(0.41,-7.05,1.39), 90.0));
//Change jawa_jobs to the tag and filename of your custom NPC. Then change The three numbers in the brackets to the orientation you get from the whereami cheat or whereami armband. The fourth number relates to the orientation or the way the npc faces.



}





ExecuteScript("old_k_ptat17ag_enter", OBJECT_SELF); //This part of the code executes the old script so no functionality is lost. change that to the name of your old script.



}


Read the comments in that code and do as they say.

Then compile that, put the resulting .ncs file in your overide along with the old onenter script .ncs file and the character file.

That's it. It may seem daunting at first but once you get the hang of it its really easy. Feel free to ask any questions and I will do my best to answer them. :D

TB12
 Qui-Gon Glenn
01-09-2011, 2:12 PM
#7
^^Easiest way to do it!

Feel free to look at my BoS/RHJawaShop compatibility patch... it edits the OnEnter's of RH and s9 so that the original BoS would work with the Jawa Shop. The mod is obsolete now as s9 changed how he introduced things for BoS:SR, but the source code still may be of some value to you, if for nothing else as to see how others (s9, RH, myself) have done this.

In addition to what Bob posted, there are two important things he omitted: your new file must be named exactly what the original OnEnter was named, so that it gets fired when the module loads. The other is, how to get that vector location for where you want your NPC to spawn.

In K1 it is easy, just make sure you have cheats enabled, enter the console and type
"whereami". This will give you the coordinates where you stand in that module. These coodinates then fill in the parameters for your spawning vector.
In TSL, you will need to use the whereami armband, and learn how to use it (FB.... eerrrrghhh).
 jerry.boy
01-09-2011, 6:53 PM
#8
Thanks for answers.
I played that game many years ago, but I lost it somewhere.Yesterday J got it back.
I really don't remember the story and the quests from the game. I think that it wouldn't be really boring. I thought that game would be more exciting, with more fighting.
For that reason, i apologize, i must say that i need another example. Could you write about situation at the beginning of the game( sith threatens an alien, and then bum!! I get there:)). I don't have save or anything else to check my changes.
When i open KT and modules then .rim files(Taris)
:tar_m02aa_s.rim

I found a lot of ncs. files

which are those i need?
Page: 1 of 1