Jump to content

Home

Changing game start location


revanmg

Recommended Posts

Really you can make the player start anywhere you want them to actually. It may screw up the game but it is possible.;)

 

If you wanted to do that you would need to first make a script that would set all of the globals up to the point of where you want to start off. You would also need to make sure that this said script jumped you to the module you wanted to go to when the game first loads.

 

BTW, where did you have in mind for starting off that game and which version of the game exactly would you like to be able to do this in?

Link to comment
Share on other sites

I am making it for Kotor 1. Here is what I wanted to do. I am planning on making a mod that has the player play as a sith. I know that their might be one made already but I enjoy making mods and wanted to make this mod. I have made a new version of the first level on the republic space ship. I want to have the player start off where the dark jedi is (the one that kills the npc that follows the player in the beginning). Then obviously the player would play through my new story. (although the player would still not be Revan, the player would just be a normal soldier). But to do this I needed to change the start module and location within it. I hope this helps you understand what I am trying to do and I am sure that it is possible. I have the module mostly completed just a few extra things I wanted to add in but it is ready to have the starting location thing set up.

 

I haven't done much with scripting but the best way that I lean this kind of stuff is learning it the way that I am, So if you could explain the scripting thing a little it would help or even direct me to a tutorial that I could check out to see if I can try to figure out how to incorporate it. Thanks

Link to comment
Share on other sites

Well I would suggest asking one of the more knowledgable scripting modders around here as I am not much a of a scripter and more of a module designer. Stoffe or tk102 would probably be able to help you with better then I could.;)

 

Sorry that I can't be more be more help to you.

Link to comment
Share on other sites

But to do this I needed to change the start module and location within it. I hope this helps you understand what I am trying to do and I am sure that it is possible. I have the module mostly completed just a few extra things I wanted to add in but it is ready to have the starting location thing set up.

 

As far as I am aware the name of the first module that's loaded when you start a new game is hardcoded in the game engine. So you'd either need to name your new module the same thing to make the game load yours, or modify the original start module's OnModuleLoad event script to immediately transition to your new area instead of triggering the usual cutscenes where the ships gets attacked and you wake up.

Link to comment
Share on other sites

After looking at some of the scripts I was unable to find one that I could edit so I am guessing that my only choice is to rename the module, although how would I make a new script that would move the player to a coordinate within the module this way I could place the player where I want them to be.

Link to comment
Share on other sites

Do you know which script is the one that I would modify. Also could you explain how I would go about doing this. I think I could probably figure out how to change the module, but the part of placement within the module might give me some problems trying to mess with. It seems like it would be more easy to modify the script because then I think I would be able to control where within the module the player will start off instead of having to script that later, if I could do it all at once in one script I would be very happy.

 

The end_m01aa (Endar Spire Command) area has an OnEnter script called k_pend_area01. If you replace this script with your own that just warps to a new area immediately that should probably be enough. Something like:

 

void main() {
   if (GetIsPC(GetEnteringObject())) {
       StartNewModule("[color=Yellow]NameOfYourModule[/color]");
   }
}

Link to comment
Share on other sites

O ok I am starting to get this now. The only other question I have left is how do I control where within the module the player will go. Mainly something like a player.move (X,Y,Z). Although I know that isn't the right script.

Link to comment
Share on other sites

O ok I am starting to get this now. The only other question I have left is how do I control where within the module the player will go. Mainly something like a player.move (X,Y,Z). Although I know that isn't the right script.

 

If the module you warp the player to is a custom module you've made yourself you can set the module starting location in the module.ifo file of your module. Set the X and Y coordinates in the Mod_Entry_X and Mod_Entry_Y fields. Then the player will automatically end up at that location when the module starts.

 

As an alternative you can place a waypoint in the area where you want the player to appear, and then specify the tag of that waypoint as a second parameter to the StartNewModule() function call.

Link to comment
Share on other sites

Ok thanks, I wound up changing the name instead of using a script because I couldn't get it to change the module. All I got was it to stop the cut scenes. But I have it starting in the new module, and in the correct place. Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...