www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Software Development

Reply
 
Thread Tools
Old 25-02-18, 17:34   #2301
RocketLombax
Hobbyist
 
RocketLombax's Avatar
 
Join Date: Mar 2012
Location: United States
Posts: 80
Default

I love this! I've really been enjoying toying around with the engine! It helped me finally start getting into TRLE modding recently and it's been really nice.

I do definitely want to ask though, How does one use TRLE levels with Open Tomb? I've attempted using the console to try loading levels, but I think I'm doing it wrong. Any advice?

Also, I do apologize if this might have been asked already. I haven't found anything despite all my searching.
RocketLombax is offline   Reply With Quote
Old 26-02-18, 16:06   #2302
vvsgh
Student
 
Join Date: Jun 2015
Posts: 133
Default

TRLE levels are just TR4 with some specifics. But for TR4 basically only loading and rendering levels are supported. Except for some simple objects anything else won't work. There is no documentation for OT scripting, but the format to load level is simple: loadMap(map_name, game_id, level_id), where map_name is name of the file, containing that map, game_id is a constant identifying TR version (full list is in gameflow.h, i.e. GAME_3_5 or 7 is TLA), and level_id is there for some hardcoded engine behaviour and could be anything in general.
vvsgh is offline   Reply With Quote
Old 26-02-18, 17:46   #2303
RocketLombax
Hobbyist
 
RocketLombax's Avatar
 
Join Date: Mar 2012
Location: United States
Posts: 80
Default

Thank you for the help! I'm sorry though, I'm still not sure if I understand completely. I'm still pretty new to all this. I tried it the best I can, but I don't know for sure if I'm even using the script correctly.

Could you give me an example of the loading format? For example, what would the format be if you were to try loading the first level of TR4?

Also, to be sure, this is meant to be entered in the console during play, right? Or is it something you add to one of the scripts outside gameplay?
RocketLombax is offline   Reply With Quote
Old 26-02-18, 18:41   #2304
vvsgh
Student
 
Join Date: Jun 2015
Posts: 133
Default

Quote:
Originally Posted by RocketLombax View Post
Could you give me an example of the loading format? For example, what would the format be if you were to try loading the first level of TR4?
loadMap("data/tr4/data/angkor1.tr4",GAME_4,1)

That's relative to starting the engine in its own directory, or alternatively you could specify a full path otherwise. There are more commented out examples in autoexec.lua. Be aware though, that loading official levels this way is not the shortest one. There is a shortcut by using setgamef(4,1) in this particular case.

Quote:
Originally Posted by RocketLombax View Post
Also, to be sure, this is meant to be entered in the console during play, right? Or is it something you add to one of the scripts outside gameplay?
As I've already noted above, you can use it either in a game debug console or in autoexec.lua script.
vvsgh is offline   Reply With Quote
Old 27-02-18, 00:47   #2305
wmcintosh
Explorer
 
Join Date: Aug 2008
Posts: 502
Default

Quote:
Originally Posted by TeslaRus View Post
Engine is compilable under Linux (one of my working OT repo tested under Linux)
In latest update ragdoll logic was fixed (enabled self collision) + some weapons fix (0 model not breaks hide / draw)
Cool, use linux on a regular basis on primary computer, for installing programs I want, use appcenter from distro website. Not much experience otherwise.

No idea what it'll take to accomplish this.
wmcintosh is offline   Reply With Quote
Old 27-02-18, 16:59   #2306
RocketLombax
Hobbyist
 
RocketLombax's Avatar
 
Join Date: Mar 2012
Location: United States
Posts: 80
Default

Quote:
Originally Posted by vvsgh View Post
loadMap("data/tr4/data/angkor1.tr4",GAME_4,1)

That's relative to starting the engine in its own directory, or alternatively you could specify a full path otherwise. There are more commented out examples in autoexec.lua. Be aware though, that loading official levels this way is not the shortest one. There is a shortcut by using setgamef(4,1) in this particular case.



As I've already noted above, you can use it either in a game debug console or in autoexec.lua script.
It works! Eh, mostly... Thank you so much! It's certainly a bit broken, and some levels don't work, but it's definitely a great way to get an "inside look" into some of the TRLE levels! This tip also helps me understand the OT functions better too, so I really do appreciate it.

Really though, Open Tomb has fantastic potential! I really wish I could help, but I just don't know much about scripting language.
RocketLombax is offline   Reply With Quote
Old 28-02-18, 07:43   #2307
TeslaRus
Student
 
TeslaRus's Avatar
 
Join Date: Jan 2013
Posts: 195
Default

Hmmm... It is time to write OT scripts functions and constants documentation;
To see registered scripts look at src/scripts folder
TeslaRus is offline   Reply With Quote
Old 01-03-18, 03:54   #2308
Nicklander
Historian
 
Nicklander's Avatar
 
Join Date: Oct 2014
Location: Lausanne
Posts: 251
Default

I really hope to see some progress here soon !
Nicklander is offline   Reply With Quote
Old 01-03-18, 06:18   #2309
Joey79100
Professor
 
Join Date: Mar 2012
Location: France
Posts: 2,750
Default

Quote:
Originally Posted by TeslaRus View Post
Hmmm... It is time to write OT scripts functions and constants documentation;
Oh yes! I'd love to dig into OpenTomb one day. I don't think that will happen anytime soon, but if I do, having documentations to help understanding how everything is tied together will certainly be of a great help.
Joey79100 is offline   Reply With Quote
Old 02-03-18, 16:36   #2310
TeslaRus
Student
 
TeslaRus's Avatar
 
Join Date: Jan 2013
Posts: 195
Default scripts doc

First rough scripts documentation
https://github.com/opentomb/OpenTomb...r/SCRIPTING.md
TeslaRus is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 05:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.