Jump to content

Jedi Academy turned 20 this year! We celebrated in a ton of different ways: mod contest, server event, podcast, etc. Thank you to all who have been a part of this game for the last two decades. Check out the anniversary content!

Read more

Welcome to JKHub

This community is dedicated to the games Star Wars: Jedi Outcast (2002) and Jedi Academy (2003). We host over 3,000 mods created by passionate fans around the world, and thousands of threads of people showcasing their works in progress and asking for assistance. From mods to art to troubleshooting help, we probably have it. If we don't, request or contribute!

Get started

This game turned 20 years old this year, and it is still one of the greatest Star Wars games of all time. If you're new or returning from a long hiatus, here are the basics of getting started with Star Wars Jedi Knight Jedi Academy in 2023.

Read more

Passworded Doors (Scripting)


Szico VII
  • Title: Admin Password Creation (Atlantica)
  • Subject: Creating a custom admin room password for Atlantica or other maps.
  • Written by: Szico VII
  • Tutorial written for: BehavED/JK3/Atlantica
  • Similar concept work like in: N/A
  • Difficulty level: 5/10
  • Expected time to complete for first attempt: 25 mins
  • Prerequisites: Atlantica Source, BehavED and Pakscape programs downloaded.

 


 


Before we get started with this tutorial, you will NEED two programs in order to get this to work, as well as the Atlantica Source Files

NB: This was written specifically to edit the passworded system found in my map Atlantica, but it can be transposed and used in other maps.

Firstly, you will need a program called BehavED, and secondly you will need a program called Pakscape. BehavED is a scripting tool used to create the password script and is part of the Jedi Academy SDK (Developer’s Kit), and Pakscape is used to make PK3 files. The download links are below:

 

 

 


To install the developer’s kit (SDK) you may use the following tutorial

Look for the section named "Installing the developers kit."

Once you have installed the SDK and Pakscape, and downloaded and extracted the Atlantica Source Files, we are ready to continue:

Open BehavED – you should see a window that looks like this if you have installed it correctly
UDS3bk2.gif

You should now open the default password script file. On the right hand side of the program, find the File>Open button, and press it.

Browse to the following folder:Jedi Academy/GameData/base/scripts/atlantica/keycode/

And open the file named universal.txt

Your BehavED screen should now look like below:
RkzxULX.gif

Click the small + sign next to the first ‘IF’ line, and then click the + sign under the ‘IF’ that appears under that. Repeat until you have pressed all the + signs that stem from the first IF line, as shown below.
SjYUOWy.gif

You will see that the current information (indicated by the green arrows here) reflects the default code used in the map. Changing this information is relatively easy.

To change the code, simply replace the values shown above with your own values by double clicking each line and editing the value in the right-hand most field, as pictured below.
eN1MJb4.gif

Once you have replaced all 6 values, press SAVE. However, we still have another section to edit which relates to how the code resets itself to 999999 (ingame) after a successful use.

Click the + Sign before the second ‘IF’ line to open another block of code, a longer one this time. We are only interested however, in the sections between the lines shown below.
ySgzvNk.gifsn4LBgB.gif

Basically, in order to reset the counter back to 9 after a successful password input, the script tells the counter to move down one number, as many times as it takes to return it to 9 from its ‘success’ position. For example, the first digit of your new code might be 4. This means, when a code is successfully inputted, the digit of button1_code_useable will be 4. (The next step down after 0 is back to 9) In order to return to 9, the script should tell the counter to move down by 1, five times, with the value decreasing from 4, to 3, to 2, to 1, to 0 and then back to 9. Each block of code between the ‘wait 100’ lines tells the digits to decrease by one for each console mentioned.
 


 


FOR EXAMPLE, THE USING THE ORIGINAL INPUT - 557752

 

 

  • The first block of code decreases each digit of all 6 consoles by 1, thus making the digits show 446641.
  • The second block of code is the same as the first, and also decreases each digit of all 6 consoles by 1, thus making the digits show 335530.
  • The third block of code is identical to the first and second blocks, which tell the digit values of consoles 1-6 to decrease by 1, resulting in the digits 224429. (After a console digit reaches zero, the next digit down is back to 9)

 

 

  • CONSOLE #6 HAS NOW RETURNED TO ITS 9 POSITION, AND SO IS NOT INCLUDED IN THE FOURTH BLOCK OF CODE, AS THAT WOULD THEN SET THE DIGIT VALUE OF THIS CONSOLE TO 8.

 

  • As such, the fourth block of code only contains 5 lines, which tells the digit values of consoles 1-5 to decrease by 1, resulting in the digits 113319.
  • The fifth block of code is identical to the fourth block, which tells the digit values of consoles 1-5 to decrease by 1, resulting in the digits 002209.
  • The sixth block of code is identical to the fifth and fourth block, which tells the digit values of consoles 1-5 to decrease by 1, resulting in the digits 991199.

 

  • CONSOLE #1,2,5 AND 6 HAVE NOW RETURNED TO THEIR ORIGINAL POSITIONS, AND SO ARE NOT INCLUDED IN THE SEVENTH BLOCK OF CODE, AS THAT WOULD SET THE DIGIT VALUES OF THESE CONSOLES BACK TO 9.

 

  • As such, the seventh block of code only contains 2 lines, which tells the digit values of consoles 3 and 4 to decrease by 1, resulting in the digits 990099.
  • The eighth block of code is identical to the seventh block, which tells the digit values of consoles 3 and 4 to decrease by 1, resulting in the digits 999999.

 

  • CONSOLE #1,2,3,4,5 AND 6 HAVE NOW RETURNED TO THEIR ORIGINAL POSITIONS, AND SO WE HAVE REACHED THE END OF THIS PORTION OF THE SCRIPT.

 


 


The tricky part about this section is figuring out how many times you need to ‘use’ each console within the script. You can copy/paste lines if you need to add more, or hit the delete key to remove lines. If you need to create new blocks, simply copy and paste an entire block( with the wait 100 line also.)

Once you have finished your changes to the script and are happy they are correct, SAVE the script and press the button that says ‘COMPILE.’

This will generate a file called UNIVERSAL.IBI in your :Jedi Academy/GameData/base/scripts/atlantica/keycode directory

THIS IS THE IMPORTANT FILE WE NEED FOR CREATING OUR PK3, SO DON’T DELETE IT.

NEXT STEP – MAKING OUR PK3 FILE.

OPEN UP PAKSCAPE.EXE

Go to the File menu > New to create a new pk3 file, and then add folders (Object >New Directory) so that you have the setup shown below:
oG3nT59.gif

scripts/atlantica/keycode/UNIVERSAL.IBI
scripts/atlantica_rpg/keycode/UNIVERSAL.IBI

Once you have created this directory setup, click and drag your UNIVERSAL.IBI file into both ‘keycode’ folders, the one in atlantica AND the one in atlantica_rpg.

Click the ‘save’ icon, and make sure you SAVE YOUR FILE AS A PK3 (.PK3) and NOT a .zip

It is important that the file name of this pk3 is alphabetically further down than the ‘Atlantica.pk3’ file or else the original script will still take priority over your new one. As such, you should name this file:

z_AtlanticaCustomKeycode.pk3

You can now upload this file to your server (it is completely server-side, none of your clients will need it)

 


User Feedback

Recommended Comments

There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...