Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Tutorials and Resources

Reply
 
Thread Tools
Old 27-11-07, 20:44   #1591
nowid50
Member
 
nowid50's Avatar
 
Joined: Oct 2006
Posts: 1,380
Default

@ Ensi : Can you tell me how to make objects ?
Like :
Quote:
PUSH ObjectID
PUSH X
PUSH Y
PUSH Z
CALL CreateObjectProcedure
ADD ESP,XX
@ ReeceMix : Then I'll not use this word then... I'll use "unmakeable" !
nowid50 is offline   Reply With Quote
Old 28-11-07, 07:08   #1592
Pyuaumch
Member
 
Joined: Dec 2005
Posts: 491
Default

Smooth shadow patch update: as requested by GeckoKid, now shadow will gradually disappear/reappear, when Lara's vertical position decreases/increases. Also now it allows you to change overall shadow darkness. By the way, the best smooth shadow layout i've found so far is transparent 5x5 sprite with only one pure black pixel in the middle. Set shadow darkness to maximum, and you will get absolutely neatly looking shadow.

@nowid50: No, i don't know such command. Grenades and crossbow bolts are spawned somehow, but not with some fixed procedure with specific amount of parameters.
Pyuaumch is offline   Reply With Quote
Old 28-11-07, 08:48   #1593
aktrekker
Member
 
aktrekker's Avatar
 
Joined: Aug 2006
Posts: 5,239
Default

@Pyamuch

Each version of DirectX is 100 percent compatible with previous versions, that is a requirement of COM. That is why you can install DX8 or 9 on your computer and still run TRLE. So it should be possible to still use the force feedback joystick with the DX6 calls even if the driver is DX8. DirectX will translate the calls as required to make them work.

You can't just do a search for all DirectX calls. But you can do a search on the variables used to point to the DX objects. Pointers to the objects are stored in a structure. Sometimes they are used directly, and sometimes using a pointer to the structure. I can provide information about the address of the structure and pointer, as well as the format of the structure. By searching on the variables you can find the DInput functions.
Function at 491e30 creates and sets up DInput for the built-in keyboard definition. 491fc0 closes DInput. 492090 restores DInput if the keyboard is lost (like switching applications).

As for the ESP question earlier, there are 2 styles of calling, "C" style where you restore the stack after calling, and Pascal style where the called function restores the stack. Windows core functions use the Pascal style, so you won't see ESP being adjusted after system calls. Most C and C++ code uses the C style.

I don't really have a place to upload the documentation and include files. Maybe someone could provide a place?
aktrekker is offline   Reply With Quote
Old 28-11-07, 14:42   #1594
Pyuaumch
Member
 
Joined: Dec 2005
Posts: 491
Default

New patch: add textbox into SECRET_MAP slot

This patch utilizes unused SECRET_MAP slot for special nullmesh object that will pop-up text message, when Lara presses ACTION key in front of it. Text message can be ANY string from STRINGS2.TXT file - just put string number into OCB, and it will show corresponding string. Additionally, you can set-up two different on-screen placements for your text - bottom (like in Resident Evil games, useful for short messages and infos) and center (if info / message is too long to fit onto bottom).

To select center or bottom placement, add 10000 to OCB of corresponding SECRET_MAP object. Examples:

OCB 5 - will render STRINGS2.TXT string number 6 (because first string counts as 0) at the bottom part of the screen.
OCB 10005 - will render same string, but in center.

With this patch, you now can put TONS of text in your game, you literally can turn your game into text quest... You can put these nullmeshes near every single object, static mesh or wall of your game, and game will give text comment about corresponding object/static mesh/wall/etc., like it is done in Resident Evil.
Remember that you should texture this nullmesh object with transparent texture, or it will be visible. To edit object interaction zone, just edit bounding box in FexAnim. Note that Lara will activate this object in any case, even on the run or with her guns drawn.

Use it carefully, because i don't sure if there are any bugs left... Basically it uses heavily-modified and simplified code from puzzlehole, maybe i've removed something i shouldn't remove... Anyway, test it.

If you want to get rid of some nullmesh text objects, you of course may kill them with KILL_ITEM command. Just remember that it'll take some time for item to fade-out and disappear.

CRITICAL: Make sure you're using latest syntax.fln file from TREP homepage, since i've found a bug which prevented KILL_ITEM command execution, if Lara was not a first object in your level!

Quote:
Originally Posted by aktrekker
it should be possible to still use the force feedback joystick with the DX6 calls even if the driver is DX8. DirectX will translate the calls as required to make them work.
Hmm, very interesting... But how DX can allow application to use newer functions, if application initializes older interface? I. e. if device is created with DirectInputCreate (not DirectInput8Create), how DirectX will allow to use DirectInput8 functions for it? Is it some kind of forward-compatibility?

Quote:
Originally Posted by aktrekker
You can't just do a search for all DirectX calls. But you can do a search on the variables used to point to the DX objects. Pointers to the objects are stored in a structure. Sometimes they are used directly, and sometimes using a pointer to the structure.
But this structure have dynamic address, right? It is stored in [754468], this value points to other address, where sub-pointers are stored... There are just too many pointers that are referring to pointers, and these pointers also refer to sub-pointers... It drives me crazy, but i'm slowly getting used to it... Still, it's impossible to do anything without some reference (at least include file) to all these functions.

Last edited by Pyuaumch; 28-11-07 at 15:17.
Pyuaumch is offline   Reply With Quote
Old 28-11-07, 15:08   #1595
nowid50
Member
 
nowid50's Avatar
 
Joined: Oct 2006
Posts: 1,380
Default

@ Ensi : How can I make a rope ?
How can I draw objects ?
How can I manage an object get triggerred ?
How can I make bubbles ?
How do I can manage to call code when an object is selected in inventory ?
How can I get current animation frame ?

Oh sorry XD I'm getting really crazy. Assembler is really a good world

Last edited by nowid50; 28-11-07 at 15:51.
nowid50 is offline   Reply With Quote
Old 28-11-07, 16:18   #1596
Kikiloco
Member
 
Joined: Jul 2006
Posts: 380
Default re

Quote:
Each version of DirectX is 100 percent compatible with previous versions, that is a requirement of COM. That is why you can install DX8 or 9 on your computer and still run TRLE. So it should be possible to still use the force feedback joystick with the DX6 calls even if the driver is DX8. DirectX will translate the calls as required to make them work.
It dosent works like that; when you want to make a program using DX6 features you call to the COM for retrieve an object of class IDirect3D6 and then you use all procedure, functions from that class. when you install DX9 in your computer it just mean now the COM can return a object class IDirect3D9 however for backward copatibility it is available to return older IDirect3D8, IDirect3D7, IDirect3D6... so any program coded for thaose version still running when rquesting that object.

There is somthing worse... IDirect3D8 is not exacty the same IDirect3D7 (and so on) with more functions, in every new version the nice Microsoft architects makes severals changes in the interface, some function are removed, or have new parameters or dosent work in the same way; they say they dont want to be tied to backward compatibility to implement new features; so your DX6 program have to be revised/changed if you want to use the new DX version.


Quote:
Hmm, very interesting... But how DX can allow application to use newer functions, if application initializes older interface? I. e. if device is created with DirectInputCreate (not DirectInput8Create), how DirectX will allow to use DirectInput8 functions for it? Is it some kind of forward-compatibility?
Exactly, if tomb4.exe requested DirectInput6Create then you can only call dx6 functions using that Object; if you want to use functions for DirectInput8Create then you have to request your own DirectInput8Create class in your own Dll and call Dx8 functions from there.

Last edited by Kikiloco; 28-11-07 at 16:24.
Kikiloco is offline   Reply With Quote
Old 28-11-07, 16:32   #1597
kill bill
Inactive
 
kill bill's Avatar
 
Joined: Jun 2006
Posts: 6,017
Default

Anyone know how to assgin a flip effect that gives a pysific weapons infinit ammo
kill bill is offline   Reply With Quote
Old 28-11-07, 16:40   #1598
snork
Member
 
snork's Avatar
 
Joined: Mar 2006
Posts: 3,096
Default

pacific weapons with unlimited ammo
snork is offline   Reply With Quote
Old 28-11-07, 16:44   #1599
stranger1992
Member
 
stranger1992's Avatar
 
Joined: Jan 2007
Posts: 3,733
Default

hi. For some reason my tomb4 crashes when i use the options menu. I am using the latest Esse files and i get this:

Code:
AppName: tomb4.exe     AppVer: 0.0.0.0     ModName: tomb4.exe
ModVer: 0.0.0.0     Offset: 00062b9b
Please help since i am trying to make a TREP update for my project and i cannot unless this is fixed.
stranger1992 is offline   Reply With Quote
Old 28-11-07, 17:14   #1600
Pyuaumch
Member
 
Joined: Dec 2005
Posts: 491
Default

Quote:
Originally Posted by Kikiloco
you have to request your own DirectInput8Create class in your own Dll and call Dx8 functions from there.
Do i need a DLL for it? Can i create class in tomb4.exe itself? I don't want to mess with any external files. And can i create extra DI8 device profile for the same hardware, or it will interfere with already opened DI6 interface?

Quote:
Originally Posted by stranger1992 View Post
For some reason my tomb4 crashes when i use the options menu. I am using the latest Esse files
The reason is simple: you're not using latest STRINGS2.TXT file. It should end with three "Swap Gamepad Axes/Yes/No" strings and then "Lara's Diary" string.

I've just checked my latest aliases.rar on TREP webpage, it contains updated sample STRINGS2.TXT file. So check your six

Last edited by Pyuaumch; 28-11-07 at 17:21.
Pyuaumch is offline   Reply With Quote
Reply

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 11:57.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.