JediArchivist

[WIP] KOTOR II Mobile (K2M) Project - KOTOR II TSL Content Ported to KOTOR 1 Mobile (IOS / Android) - Alpha 0.4.0 released!

Recommended Posts

Greetings everyone,

This project is meant to attempt to port all content from Star Wars: KOTOR II TSL into Star Wars KOTOR 1 Mobile (for Android / IOS), resulting into a partially / fully playable mobile version of KOTOR II TSL for IOS / Android.

The game will be installed and ran as a Total Conversion Mod over the mobile KOTOR 1 version.

The mod development will consist in the following stages:

- 1. Converting all files from the PC version of KOTOR II, to work with the older KOTOR 1 engine.

- 2. Adapting these files to be installed as a mod (into the Override folder, etc.) for KOTOR 1

- 3. Downgrading / adapting features from KOTOR II that are inexisting in KOTOR 1 (like Crafting, Lightsaber Forms, Companion Training and Loyalty, etc.)

- 3. Adapting and optimising the mod to work on IOS / Android KOTOR 1.

- 4. Testing, Optimising, Polishing

 

----------

Different approaches (listed here as inspiration for other porting endevours):

- Porting the Xoreos Engine or KotOR JS Engine to Android / IOS (for the developers of the Xoreos Engine / KotOR JS Engine)

- Updating the KOTOR 1 Mobile older version of Odissey Engine to work with features from the newer KOTOR II TSL engine (for modders who experimented with the source code of the engines, etc.) 

----------

 

The mod / port will be released here as it is being worked on, and updated as it is progressed on! This endevour will be completly open and collaborative, all work will be uploaded from the start and updated as it progresses!

Everyone who believes they can contribute or help with this project in any way are invited to!

 

==============================

STATUS:

Project Completition: 5%

Project Status: Phase 1 (KOTOR 1 to KOTOR 2 file conversions)

Progress: Ported unmodified files from KOTOR II TSL PC version to KOTOR 1 IOS version.

Filename adapted to work with IOS File System (all files were renamed in lowercase letters).

Practical Result: Succeded in having partial KOTOR II TSL code execution and asset loading into KOTOR 1 IOS version. Specifically, the game crashes when launchimg a mew game, but loading a savegame works. Loading a savegame will display a black screen, however the background music plays, and the Inventory, Map and Quests screens can be accesed and they display the KOTOR II respective content. Accesing the Character screen crashes the game. I will upload a Youtube video showing the resulting functionality soon!

To do next: Convert the modules, textures and animation files from KOTOR 2 format to the KOTOR 1 format and load them into the KOTOR 1 engine.

==============================

 

UPDATE 1:

So far I managed to port the K2 maps to K1 using @Thor110's brilliant tutorial "01 - [TUTORIAL] - Creating a Module for TSL using a KotOR Map!", found here: https://deadlystream.com/topic/6886-tutorial-kotor-modding-tutorial-series/

Now the maps can be warped to but there are no story elements, most NPC's are present but interaction with them does not work, most containers are empty, some still have the loot inside, area transition works for some arear but fails many times, especially when you want to enter the docked Ebon Hawk. Most levels load fine but some of them crash the game (especially the Peragus levels), and the mini-map does not display at all, strangely when the map section is accessed it always shows the Manaan Hrakert Rift Underwater Station map. The character animations also got "broken" after adding the ported files (that is why the characters look so "stiff" in the pictures)... So i could say i had very partial success so far!

==============================

STATUS UPDATE:

Project Completition: 20%

Project Status: Phase 2 (KOTOR 1 to KOTOR 2 converted files adapting and optimising)

Progress: Ported all KOTOR 2 maps to KOTOR 1 format using Thor110's tutorial. Loaded ported / converted maps into the mobile version of KOTOR 1.

Practical Result: Got partial success, most levels work and have been ported fine, some content / features / characters like story elements and NPC interaction do not work, the minimap does not display at all and the map does not work on the ported levels (it always displays the Hrakert Rift Station level map), some area transitions (Return to the Ebon Hawk) do not work, the text above NPC's / area transitions / story objects in level does not display at all (the field is always blank). The character animations also got broken because of the added ported files.

I copied the ported levels into the mobile version of KOTOR 1 (after renaming all filenames in lowercase characters) and managed to get the game to load the ported levels by making a savegame for each module, them transferring that savegame on the mobile version, and loading that save in KOTOR 1 mobile. I am using an iPad 3 to test the mod.

To do next: Adapt and optimise the files causing the bugs / glitches / problems, like script files, restore all functionality (story elements, characters, scripts, etc.). This will be the hardest part (if possible at all)!

==============================

Some pictures of the mod in action (notice the KOTOR 1 mobile HUD):

image.thumb.png.9d84e2edfdc8ff81024b3f87933b6076.pngimage.thumb.png.84b64194aac30a12d83fe3e525dd3c9a.pngimage.thumb.png.75877e2a811bdeb8247da5530bf1c272.pngimage.thumb.png.e9ee424ba9a0204ea86194b3dac6ea99.pngimage.thumb.png.c1149452d08db897de26e5193d8ff6dc.pngimage.thumb.png.76764bd335a0ffb88d19d9b9f49ba445.pngimage.thumb.png.69e932e422be1e3c40f18fb10f38342f.pngimage.thumb.png.bae084672e58bf006e3addad0ead7cf8.pngimage.thumb.png.f2d69aa64bd651cde7519df9f16f2d07.png

Credit:

Many thanks go @Thor110 for his brilliant tutorial "01 - [TUTORIAL] - Creating a Module for TSL using a KotOR Map!", found here: https://deadlystream.com/topic/688

Without this great tutorial I would have been unable to make any progress at all! He basically made it possible to port the levels from K1 to K2!

==============================

UPDATE ALPHA (FIRST RELEASE):

KOTOR II Mobile (K2M) first version – 0.4.0 Alpha released!

Alpha 0.4.0 of the mod is live! We released earlier than expected!
Head over to our ModDb page files section to download it now: https://www.moddb.com/mods/kotor-ii-mobile-k2m/downloads/k2-to-k1-port

Unfortunately in this very early stage of development of the mod there is not much to do, than explore the maps, search for loot, etc. Also, you will most likely encounter lots of bugs and some game-breaking ones as well, this is still an Alpha release.
Still, it’s a great achivement for us, enabling you to experience all game maps / levels in mobile!

THIS RELEASE IS FREE TO MODIFY AND REDISTRIBUTE, RE-RELEASE ON OTHER HOSTING SITES OR TO INCLUDE IN YOUR MOD PROJECT! GIVING CREDIT IS NOT MANDATORY, BUT VERY APPRECIATED!

We encourage all skilled modders out there to use our work as a foundation / framework for their project, or even try to complete the KOTOR II port to mobile before us and work out the bugs and problems!

 

*Updates will be posted to this thread as they come! This post will also be updated as well.

  • Like 1

Share this post


Link to post
Share on other sites
On 12/14/2018 at 10:45 AM, JediArchivist said:

This project is meant to attempt to port all content from Star Wars: KOTOR II TSL into Star Wars KOTOR 1 Mobile (for Android / IOS), resulting into a partially / fully playable mobile version of KOTOR II TSL for IOS / Android.

IANAL, but from a legal standpoint, you won't be able to distribute these converted data files.

What you can distribute (probably, I guess, but again, IANAL) is a converter that everyone will have to run for themselves, and everybody who does that will need to have legal, bought copies of both KotOR Android/iOS and KotOR2 PC.

On 12/14/2018 at 10:45 AM, JediArchivist said:

- Porting the Xoreos Engine [...] to Android / IOS

This is actually not *that* difficult, at least the Android part.

Primarily, what we need is an OpenGL ES renderer. Currently, the renderer subsystem is being rewritten, so adding an OpenGL ES render path would probably clash, but after the rewrite is finished, that would be a very valid thing to do (in fact, that is already on my TODO list).

Apart from that, all our libraries, including SDL2, would already work on Android. You can look at ScummVM for a proof of concept of sorts. There's certain things we'll have to keep in mind, like input, but it's not magic.

iOS, on the other hand... the problem there is licensing, and the walled garden that is iOS. There's no chance xoreos will be allowed on the official Apple App Store. Not with Apple being Apple, and also because xoreos is GPLv3, a license that's fundamentally at odds with the closed-off nature of an App Store. The GPLv3 grants its users to modify the program, and run the modified program, and you can't do that with App Store things. I don't think there's really any sideloading on iOS, right?

  • Like 1

Share this post


Link to post
Share on other sites

@DrMcCoy

Thank uou for your reply and for showing interest in this project! I am honoured by having your response here! :D

Since PC KOTOR 1 and Mobile KOTOR 1 use the same files (except the lower letter-casing), converting files from KOTOR II TSL to Mobile KOTOR 1 should be as legal as converting them to PC KOTOR I, which has been mostly done since porting is allowed. Many mods port content from KOTOR 1 to KOTOR II TSL though... I'll try to figure out some way to port the whole game content legally, without uploading a whole game's worth of content...

I have been following progress on Xoreos for about 2 years, it is truly great! This year's update really got me excited, seeing it take shape and come closer to completion is awesome! I really admire your work!

It is great news to hear that implementing OpenGL ES into Xoreos and a future Android release are already in the works! It would seem that an Android version of Xoreos would come even sooner then I thought.

Imput can be handled relatively easy for KOTOR I & II, as for movement and looking around all that is needed is a Virtual Directional Joystick, and touch controls mapped to all the in-game buttons. I managed to do something of this sorts, in able to get KOTOR II to run on a Tablet running Windows 8, by using a program called Virtual Gamepad. I just needed a Virtual Joystick, to which I configured the UP and DOWN buttons to go Forwards and Backwards, and the LEFT and RIGHT buttons to look around (since in KOTOR you only have partial looking around in running mode)! A company called Beloko Games sucessfully managed to port both Star Wars: Jedi Knight games to Android by using a custom engine, and implemented great, customisable touch controls (two virtual joysticks and several buttons for main actions). You can find more about it here: http://www.beloko.com

2gvtxzd.jpg

Unfortunately IOS will never allow Xoreos on the App Store, but sideloading really is a thing on IOS.

https://ios.gadgethacks.com/how-to/install-modded-unofficial-apps-your-iphone-by-sideloading-with-cydia-impactor-0176467/

https://beebom.com/how-to-sideload-apps-iphone-ios-10-without-jailbreak/

I managed to do surprising things with sideloading on Jailed (Non-Cydia) iDevices, such as developing a method for modding IOS KOTOR 1 and other apps (injecting a custom payload into an .ipa package, sideloading it, and then syncing it with a genuine version of the app in order to be able to use it without a Developer Certificate that lasts only 7 days)! I would be more than happy to help You with testing an IOS build of Xoreos, if You ever need it! ;) Installing Xoreos on a Jailbroken iDevice would not even require sideloading, as it would install easely with a fakesign.

As an example, there is a ported edition of Half-Life for IOS (I have it and it works fine), including touch controls. It uses an alternate engine called Xash 3D. It also used SDL.

https://github.com/FWGS/xash3d/releases/tag/v0.19

I can't wait to try out the Mobile Xoreos version!

Share this post


Link to post
Share on other sites
On 12/14/2018 at 9:45 AM, JediArchivist said:

Practical Result: Succeded in having partial KOTOR II TSL code execution and asset loading into KOTOR 1 IOS version. Specifically, the game crashes when launchimg a mew game, but loading a savegame works. Loading a savegame will display a black screen, however the background music plays, and the Inventory, Map and Quests screens can be accesed and they display the KOTOR II respective content. Accesing the Character screen crashes the game. I will upload a Youtube video showing the resulting functionality soon!

To do next: Convert the modules, textures and animation files from KOTOR 2 format to the KOTOR 1 format and load them into the KOTOR 1 engine.

Sounds like you are having success, perhaps you will write a tutorial for this process before me, a tutorial is the best and only legal approach to this.

Don't forget to credit everybody that helped ^^ note : presumably you are having success with the steps I explained would most likely be necessary for porting the entire game, if so let me know, would be good to know that I guessed most of the process, I found getting the menu and either game to load most of the other games content on PC relatively easy, but it wouldn't start a new game ( I did not try loading a game ) and I do not have K1 mobile to test this on, so all I can really do is speculate.

Let me know if you have any more trouble and I will see if I can help any more.

If you do not have success I will pick this back up at some point and write a tutorial for the process.

Thor110

  • Like 1

Share this post


Link to post
Share on other sites

Updated the first post to reflect the progress made! Added some pictures as well.

So far I only managed to port the K2 maps to K1 using your tutorial. Now the maps can be warped to but there are no story elements, most NPC's are present but interaction with them does not work, most containers are empty, some still have the loot inside, area transition works for some arear but fails many times, especially when you want to enter the docked Ebon Hawk. Most levels load fine but some of them crash the game (especially the Peragus levels), and the mini-map does not display at all, strangely when the map section is accessed it always shows the Manaan Hrakert Rift Underwater Station map. The character animations also got "broken" after adding the ported files... So i could say I had very partial success so far!

On 13 ianuarie 2019 at 4:58 AM, Thor110 said:

I found getting the menu and either game to load most of the other games content on PC relatively easy, but it wouldn't start a new game ( I did not try loading a game ) and I do not have K1 mobile to test this on, so all I can really do is speculate.

How did you get the games to load the other game's menu and content? That would be awesome! Could you please describe what you did in order to make K1 load K2's menu and content please? I have tried copying the content over and porting the modules and content, but only got very limited success.

  • Like 1

Share this post


Link to post
Share on other sites
Guest Qui-Gon Glenn

The game engine of the two games are different and not entirely compatible.

TSL is a derivative of KotOR. Thus, if you were doing this the other direction, you would likely have had almost instant success. As it stands, I do not think this mod will ever work without actual programming. Copying files and renaming them is simply not enough for this job.

Sorry to be that guy.

Share this post


Link to post
Share on other sites

He already knows this I believe, I may be pursuing the project once my Expanded Galaxy Project K2 to K1 files are completed, it would most likely require re-scripting most of the second game as well as re-creating each and every map / map piece in order to add any Placeable Objects that are not there due to the K1 limit.

I have been slowly coming up with solutions / work around ideas for the limitations that would prevent this.

Though I myself accept it may still be an incredibly difficult task that I may not be able to achieve.

My main focus is the Expanded Galaxy Project - a small storyline for both and the overall ported maps for both games, if my K2 to K1 maps can be fixed to display properly then this could become more feasible, I have already managed to fix Dxun which did not display correctly, I also have a solution for both games ports lacking .vis files.

But beyond the fixing of all the maps, there would be a lot of work to do, effectively and potentially re-building the entire second game in the first games engine.

Thor110

Edited by Thor110
  • Like 1

Share this post


Link to post
Share on other sites
Guest Qui-Gon Glenn

^^^ yes

Share this post


Link to post
Share on other sites

Just to re-iterate: from what I've seen while taking the games apart, the menus are pretty hard-coded. The games in general know what widgets are there for each menu, how they hang together, how they behave and what they do, and they only use the GUI files to read the look.

I.e. there is no way to get fully working menus from one game into the other, just by exchanging data files. You will need to hook into the binary itself

  • Like 2

Share this post


Link to post
Share on other sites

Yeah, I understand this, I would basically need to rewrite the Endar Spire scripts to work for the Peragus level and this is the plan for a potential demo.

ie : Hook the first script of the Endar Spire to the Peragus level instead of the Endar Spire level, then maybe even replace the original maps with the new ones in order to force it to load the correct module / map instead of the existing rim / map.

But who knows, it is no doubt going to be very difficult to achieve and may not happen, but I do believe it is possible, just how much work it might be is the question, my thoughts were to re-purpose as many K1 scripts for K2 maps as possible in order to save on time, then just hook the starting script / endar spire map into skipping over to peragus.

This would allow to leave the K1 menu intact and simply skip over any alterations that would need to be made, creating a new character might need some work in order for the save file to actually work, or add a quick conversation that serves the same purpose.

Edited by Thor110
Creating a new character.
  • Like 1

Share this post


Link to post
Share on other sites
On 17 decembrie 2018 at 12:08 AM, DrMcCoy said:

This is actually not *that* difficult, at least the Android part.

Primarily, what we need is an OpenGL ES renderer. Currently, the renderer subsystem is being rewritten, so adding an OpenGL ES render path would probably clash, but after the rewrite is finished, that would be a very valid thing to do (in fact, that is already on my TODO list).

@DrMcCoy I am verry happy to hear that you are working on an Android and IOS port of Xoreos. Please excuse me if I'm posing an innapropriate question, but when can we expect a release for the Android / IOS version of Xoreos. Just an estimate, if possible, I am definately not trying to tell You to rush anything or something like that. I am just super hyped for Your project and can't wait to test it!

By the way, I used to be a beta tester some time ago for a big game company, and could help you test Xoreos on both Android and IOS (I own both devices)!

 

KOTOR II Mobile (K2M) first version – 0.4.0 Alpha released on ModDb!

Alpha 0.4.0 of the mod is live! We released earlier than expected!
Head over to our ModDb page files section to download it now: https://www.moddb.com/mods/kotor-ii-mobile-k2m/downloads/k2-to-k1-port

We also have se up a site for the project at: https://kotor2mobile.wordpress.com

Unfortunately in this very early stage of development of the mod there is not much to do, than explore the maps, search for loot, etc. Also, you will most likely encounter lots of bugs and some game-breaking ones as well, this is still an Alpha release.
Still, it’s a great achivement for us, enabling You to experience all game maps / levels in mobile!

THIS RELEASE IS FREE TO MODIFY AND REDISTRIBUTE, RE-RELEASE ON OTHER HOSTING SITES OR TO INCLUDE IN YOUR MOD PROJECT! GIVING CREDIT IS NOT MANDATORY, BUT VERY APPRECIATED!

We encourage all skilled modders out there to use our work as a foundation / framework for their project, or even try to complete the KOTOR II port to mobile before us and work out the bugs and problems!

Share this post


Link to post
Share on other sites
9 minutes ago, JediArchivist said:

@DrMcCoy I am verry happy to hear that You are working on an Android and IOS port of Xoreos.

I didn't say that. :P

10 minutes ago, JediArchivist said:

Please excuse me if i'm posing an innapropriate question, but when can we expect a release for the Android / IOS version of Xoreos. Just an estimate, if possible.

No one is currently actively working on an Android port. But I have that on my radar and I do have ideas and plans.

So I'm afraid I can't give you an estimate. Heck, I can't even give you an estimate on when KotOR is playable in xoreos, or when xoreos is "user-ready", or anything, really. I can only say that more contributors = faster work, and we really need more contributors. I know, I probably sound like a broken records, but it is what it is.

  • Like 1
  • Light Side Points 1

Share this post


Link to post
Share on other sites
On 2 iulie 2019 at 12:41 AM, DrMcCoy said:

I didn't say that. :P

No one is currently actively working on an Android port. But I have that on my radar and I do have ideas and plans.

So I'm afraid I can't give you an estimate. Heck, I can't even give you an estimate on when KotOR is playable in xoreos, or when xoreos is "user-ready", or anything, really. I can only say that more contributors = faster work, and we really need more contributors. I know, I probably sound like a broken records, but it is what it is.

Thank you very much for the clarification! I wish you the best of luck with your ambitious project!

Share this post


Link to post
Share on other sites
On 12/19/2018 at 2:04 PM, JediArchivist said:

I'll try to figure out some way to port the whole game content legally, without uploading a whole game's worth of content...

Until you've worked this part out, isn't this like putting the apple cart before the horse?  You gotta solve the "How is this legal?" question. 

Share this post


Link to post
Share on other sites

I know that the release may be kind of borderline-illegal, but i noticed that Thor110 also released all ported maps from K1 to K2 and vice-versa on ModDb, and there were no problems... So I decided to release my work like this as well.

Anyways, I hope you all enjoy the early Alpha release! 😉😀

Share this post


Link to post
Share on other sites
On 8 decembrie 2020 at 6:46 PM, Vabulletizer said:

@JediArchivistToday Aspyr announced official Kotor II port for phones, it will release december 18....

I've seen this and it makes me verry verry happy! :D

Now my ongoing work to port K2 to K1 becomes redundant, so I will close / delete everything related to the port.... A moderator please lock this thread, thank you!

A huge thank you goes to everyone that has offered me precious help and advice with the project!

 

I will instead choose to focus my energy to try to make Aspyr's KOTOR II Mobile compatible with TSLRCM and M7-48!

  • Like 1
  • Light Side Points 2

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.