April 18, 2024, 21:51
bigger smaller reset     1020px Wide width Full width Reset   * *

Gildor's Forums

  Homepage Facebook Read news on Twitter Youtube channel Github page
Welcome, Guest. Please login or register.
Did you miss your activation email?

« previous next »
Print
Author Topic: Getting Errors  (Read 29921 times)
grained
Jr. Member
**
Posts: 51



View Profile
« Reply #60 on: October 07, 2008, 14:08 »

Thx. I played last night with the utpackages.pas. At the moment it is really cryptic to me.
I think I have to take my time to get used to it.

Quote
tool should check package import and export table, remember used names, and encrypt name table entries, which is not used in package imports/exports

It seems that you are fully awared of what is needed to build something that I imagine. I have to develop the understanding and the skills to resolve this task.

I think this is too much for me at the moment. Is there a diagram or something that visulize the UTPackage Structure?
Is there anything what shows the coherence of the parts from the utpackage to better understand it?

Logged
Gildor
Administrator
Hero Member
*****
Posts: 7973



View Profile WWW
« Reply #61 on: October 07, 2008, 14:19 »

You can look here and here. The best information is still public headers (C++). No other documentation available.

Offtopic. I've just uploaded new umodel version with Rune model support.
Logged
grained
Jr. Member
**
Posts: 51



View Profile
« Reply #62 on: October 07, 2008, 16:43 »

Ok, thx. After reading the descriptions and digging deep into the file format,

Quote
- TextBuffer objects was removed (script source); removal was performed simply by setting object length to 0
- name table: internal package names (names, which are not used to export some package object) are encoded to unreadable form
There is no other changes performed. Such changes may be done using simple tool, which can load and save unreal package without understanding object formats: package header, name table, object table, and objects in a binary form. After loading, this tool shrinks TextBuffer, analyzes name usage (possibly, it analyzes some name flag ... I don't know) and replaces such names with unique random strings (unreadable).

I think I understand what you said.
Yes, it should be easy to do such a tool which are able to do the above things.
So just Change the TextBuffer to Zero and change the names of the Name Table. Am I right?

There is one thing I do not fully understand. If I'm changing the Name of the entries of the Name Table - Unreal is still able to read the file? If yes - there is the source and a compiled version inside the package!? So what is the point in putting the source inside the package if you don't need it to use the package in game?

umodel:
I just tested your tool with rune and everything works really perfect. I really enjoy your tool it makes work much easier.
Some suggestions for expanding your tool. It would be great to have a .uc file when you export models out of packages. Like in UTPT if you export a model in 3d format you get a .uc file as well. It would really help to speed up the work.
Support for Undying would be great.
For the Future: Only a suggestion. Maybe you could combine your tool with ushock so the tool would be a universal viewer and exporter.

I found another usefull site here.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7973



View Profile WWW
« Reply #63 on: October 07, 2008, 17:12 »

Quote
So just Change the TextBuffer to Zero and change the names of the Name Table. Am I right?
Yes, you are.

Quote
If I'm changing the Name of the entries of the Name Table - Unreal is still able to read the file?
Name table is used for following purposes:
1) names of resources, exported from current package
2) names of resources, imported from other packages (for example, when loading textured mesh, texture link is stored as index in import or export table, which is uses link to name table to describe this resource)
3) some other internal structure of package (all places, where text strings required)
4) identifiers inside compiled scripts
You cannot modify names, used in 1-3, otherwise package cannot be loaded. But you can modify names, used in 4 - these names are used internally by engine, and engine does not matter, either variable named "AllowDownloadMesh" or "qwerty1" Smiley

Quote
So what is the point in putting the source inside the package if you don't need it to use the package in game?
There is only one point - to access sources after loading package into UnrealEd. You can edit scripts without rebuilding a whole package.

Quote
It would be great to have a .uc file when you export models out of packages.
Only vertex meshes does require this file, and my tool generates it. Skeletal meshes imported into packages using UnrealEd's GUI. Only mesh scale and orientation properties are lost while exporting - all other data (animaiton names, frame rate etc) are stored inside psk/psa files.

Quote
Support for Undying would be great.
I does not have this game. If I'll get it - probably, I will implement its support.
There is too much Unreal Engine games, I cannot support all of them Wink
Some games are impossible to support - Unreal 2, DeusEx 2. 1st uses strange skeletal animation format, files are stored outside unreal packages  Shocked  2nd does not uses unreal packages at all - all resources are stored in a raw format.

Quote
Maybe you could combine your tool with ushock so the tool would be a universal viewer and exporter.
My codebase is similar to Unreal's one (I'm trying to use similar coding style, I'm using similar data types ... I think, my code can be compiled with unreal engine source  Grin) But Ushock uses STL, it was developed to quickly dig into unreal level format. Its package support is heavily based on utpackage.pas (simply converted from Delphi to C++). It is possible to adapt Ushock to my codebase, but this work requires time and motivation. This is possible to create new game engine, which will support levels and meshes from Unreal Engine (this game engine automatically acquires EnrealEd - one of the greates tools in whole game development world). But there is no reason to integrate animated mesh support into Ushock.

Quote
I found another usefull site here
This page describes unreal's .3d file format, which is not used by game itself.
Logged
grained
Jr. Member
**
Posts: 51



View Profile
« Reply #64 on: October 07, 2008, 17:55 »

Quote
Only vertex meshes does require this file, and my tool generates it. Skeletal meshes imported into packages using UnrealEd's GUI. Only mesh scale and orientation properties are lost while exporting - all other data (animaiton names, frame rate etc) are stored inside psk/psa files.

Yes, but if I want to import a model I have to search the source scripts for the #exec commands.

Quote
I does not have this game. If I'll get it - probably, I will implement its support.
I hope you will get it.  Cheesy

Quote
It is possible to adapt Ushock to my codebase, but this work requires time and motivation.

Good point. Everything needs a reason and it is already working.

Quote
1) names of resources, exported from current package
2) names of resources, imported from other packages (for example, when loading textured mesh, texture link is stored as index in import or export table, which is uses link to name table to describe this resource)
3) some other internal structure of package (all places, where text strings required)
4) identifiers inside compiled scripts

So my problem is I want to find location of the identifiers to change them. But I'm confused at the moment and don't know how to start.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7973



View Profile WWW
« Reply #65 on: October 07, 2008, 18:29 »

Quote
Yes, but if I want to import a model I have to search the source scripts for the #exec commands.
I don't understand. To import skeletal mesh you should simply use UnrealEd menus and GUI, no script seatch Huh?

Quote
So my problem is I want to find location of the identifiers to change them. But I'm confused at the moment and don't know how to start.
You need to scan import table and export table and mark used names. All other names may be modified (not deleted - you should keep names, and all these names should remain unique). You don't need to scan bytecode.

And more. I'm not sure that utpackage can write packages Shocked But package architecture is not so complex in a level, which is required to perform your tasks - it's quite an easy to implement. You need few data structures:
- package header
- name table (array of name entries)
- import table (array)
- export table ...
- array of raw object data
You should read all these structures and write all structures. It's can be easily done using public source, but this is a C++. It's hard to create new package or add new object to package, but it's easy to remove objects or modify package-level structures.
Logged
grained
Jr. Member
**
Posts: 51



View Profile
« Reply #66 on: October 08, 2008, 02:04 »

Quote
I don't understand. To import skeletal mesh you should simply use UnrealEd menus and GUI, no script seatch

Maybe, but not in UT. I have to do it by script.

For the other thing I just play around and try to figure it out. I will see how far I can get.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7973



View Profile WWW
« Reply #67 on: November 13, 2008, 15:48 »

I have found 2 topics about protecting unreal script code - this may be useful for you
http://forums.beyondunreal.com/showthread.php?t=104130&highlight=protecting
http://forums.beyondunreal.com/showthread.php?t=135341&highlight=protecting
Logged
grained
Jr. Member
**
Posts: 51



View Profile
« Reply #68 on: November 14, 2008, 17:02 »

Thx, that's it. Exactly what I needed.  Grin
Logged
grained
Jr. Member
**
Posts: 51



View Profile
« Reply #69 on: December 02, 2008, 02:17 »

Hmmm, downloaded the Version they provided but it won't work for me. Still looking for something that will work.  Angry Sad
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7973



View Profile WWW
« Reply #70 on: December 02, 2008, 12:18 »

What's wrong?
Logged
grained
Jr. Member
**
Posts: 51



View Profile
« Reply #71 on: December 05, 2008, 02:56 »

I think it will only work for UT2004. I have still the same version after trying it out.
Logged
Print 
« previous next »
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS