Judith on 16/9/2009 at 07:28
Oh, I didn't think about that. I was just exporting all scripts from the actor class browser menu. Everything was right until it started exporting scripts from my gamesys. But even then there was no warning message in the log. I'll check your method later :)
Edit: <strike>It still crashes :( It does export them only if I use the browser to create new classes, i.e. when T3ed names them as P_1, P_2, etc. </strike>
Ok, now it works! Though I'm not sure why. Maybe I messed up my T3ed install before, this was done on a fresh install. Or maybe I was too chaotic at some point. I'll reinstal T3ed again and try to retrace my steps to make sure it's 100% working.
Edit 2:
I'm trying to define my type of volume, so I brought the Ut2004 class hierarchy to see how it should be done. Looks like it is Actor->Brush->Volume->PhysicsVolume->MyVolume. I'm trying to define Brush right now, i pasted the code from Brush.uc, deleting the sections I mentioned above. Instead, I'm adding properties in the browser:
(
http://img5.imageshack.us/i/defproperties.jpg/)
Inline Image:
http://img5.imageshack.us/img5/9026/defproperties.th.jpg
Judith on 16/9/2009 at 10:56
One thing that makes this work tedious: when you modify a class lower in the stack, you'll also have to re-paste some of the upper classes to compile all changed scripts succesfully :erg: But with some patience we might actually achieve some results. When I look at the t3u structure under UTPT, it finally looks good:
(
http://img171.imageshack.us/i/utpt2.jpg/)
Inline Image:
http://img171.imageshack.us/img171/1218/utpt2.th.jpgEdit: oh, and I'd think before using bat file to create multiple classes at once, at least when you're thinking about inheriting and hierarchy. You must add some properties to upper class, save it and then generate another class below, so it can inherit the properties. But if you need to generate multiple classes on the same level of the hierarchy, the bat file would be useful.
Edit 2: And now it doesn't crash when I'm exporting all scripts at once! I must have done something wrong. I'll try to find out what it is. I'm almost sure that it wasn't the .ini thing.
Edit 3: I'd recommend using UTPT instead of exporting .uc files from the actor browser anyway. If you do everything right, you just view (not decompile) the script and UTPT exports exactly what you need to paste into the script compiler in T3ed, so you don't have to worry about things generated by the actor browser. Small comparison:
MyBrush class exported by T3Ed actor class browser:
Code:
//================================================================================
// MyBrush.
//================================================================================
class MyBrush extends MyT3Actors;
#exec Texture Import File=Textures\S_Vertex.pcx Name=S_Vertex Mips=Off Flags=2
//-----------------------------------------------------------------------------
// Variables.
// CSG operation performed in editor.
var() enum ECsgOper
{
CSG_Active, // Active brush.
CSG_Add, // Add to world.
CSG_Subtract, // Subtract from world.
CSG_Intersect, // Form from intersection with world.
CSG_Deintersect, // Form from negative intersection with world.
} CsgOper;
// Outdated.
var const object UnusedLightMesh;
var vector PostPivot;
// Scaling.
// Outdated : these are only here to allow the "ucc mapconvert" commandlet to work.
// They are NOT used by the engine/editor for anything else.
var scale MainScale;
var scale PostScale;
var scale TempScale;
// Information.
var() color BrushColor;
var() int PolyFlags;
var() bool bColored;
var native private const Object pStaticMesh;
classproperties
{
ClassPlaceableStatus=FALSE
}
defaultproperties
{
BrushColor=(G=255)
bFixedRotationDir=True
RenderType=(DrawType=DT_Brush,Style=STY_Normal)
bHidden=True
bNoDelete=True
bNotTickable=True
bNotMoveableRender=True
bNotSpawnable=True
bNotMoveablePhysics=True
bEdShouldSnap=True
}
You have to remember about deleting classproperties and defaultproperties again.
MyBrush class exported by UTPT:
Code:
//================================================================================
// MyBrush.
//================================================================================
class MyBrush extends MyT3Actors;
#exec Texture Import File=Textures\S_Vertex.pcx Name=S_Vertex Mips=Off Flags=2
//-----------------------------------------------------------------------------
// Variables.
// CSG operation performed in editor.
var() enum ECsgOper
{
CSG_Active, // Active brush.
CSG_Add, // Add to world.
CSG_Subtract, // Subtract from world.
CSG_Intersect, // Form from intersection with world.
CSG_Deintersect, // Form from negative intersection with world.
} CsgOper;
// Outdated.
var const object UnusedLightMesh;
var vector PostPivot;
// Scaling.
// Outdated : these are only here to allow the "ucc mapconvert" commandlet to work.
// They are NOT used by the engine/editor for anything else.
var scale MainScale;
var scale PostScale;
var scale TempScale;
// Information.
var() color BrushColor;
var() int PolyFlags;
var() bool bColored;
var native private const Object pStaticMesh;
You have all unnecessary code left out.
ascottk on 16/9/2009 at 16:48
I managed to add another drawtype with a modified Actor archetype :D
(
http://img147.imageshack.us/i/t3antiportal.jpg/)
Inline Image:
http://img147.imageshack.us/img147/6034/t3antiportal.th.jpgThe code for the anitportal doesn't compile correctly but it works!
Part of Actor.uc:
Code:
//=============================================================================
// Actor: The base class of all actors.
// Actor is the base class of all gameplay objects.
// A large number of properties, behaviors and interfaces are implemented in Actor, including:
//
// - Display
// - Animation
// - Physics and world interaction
// - Making sounds
// - Networking properties
// - Actor creation and destruction
// - Triggering and timers
// - Actor iterator functions
// - Message broadcasting
//
// This is a built-in Unreal class and it shouldn't be modified.
//=============================================================================
class Actor extends Object
abstract
native
nativereplication;
. . .
//----------------------------------------------------------------------------
// Render properties
//----------------------------------------------------------------------------
// Drawing effect.
enum EDrawType
{
DT_None,
DT_Sprite,
DT_Mesh,
DT_Brush,
DT_RopeSprite,
DT_VerticalSprite,
DT_Terraform,
DT_SpriteAnimOnce,
DT_StaticMesh,
DT_DrawType,
DT_Particle,
DT_AntiPortal
};
AnitPortal.uc:
Code:
//=============================================================================
// AntiPortalActor.
//=============================================================================
class AntiPortalActor extends Actor
native
placeable;
//
// TriggerControl
//
state() TriggerControl
{
// Trigger
simulated event Trigger(Actor Other,Pawn EventInstigator)
{
SetDrawType(DT_None);
}
// UnTrigger
simulated event UnTrigger(Actor Other,Pawn EventInstigator)
{
SetDrawType(DT_AntiPortal);
}
}
//
// TriggerToggle
//
state() TriggerToggle
{
// Trigger
simulated event Trigger(Actor Other,Pawn EventInstigator)
{
if (DrawType == DT_AntiPortal)
SetDrawType(DT_None);
else if(DrawType == DT_None)
SetDrawType(DT_AntiPortal);
}
}
classproperties
{
ClassPlaceableStatus=TRUE
}
defaultproperties
{
RenderType=(DrawType=DT_AntiPortal,Style=STY_Normal)
CollisionFlags=()
bNoDelete=True
bEdShouldSnap=True
}
T3 throws an error with the if statements. But I notice is that T3's .uc has a semi-colon after the closing brackets.
Flux on 16/9/2009 at 17:17
Quote:
The code for the antiportal doesn't compile correctly but it works!
Hold on, is it the anti portal from ue2? Does it work in a level, I mean can you add it into a level? If yes, this can lead to interesting optimization results for large levels.
Judith on 16/9/2009 at 17:36
In theory I just built a new volume definition, but how would I put it in here:
(
http://img89.imageshack.us/i/volume.jpg/)
Inline Image:
http://img89.imageshack.us/img89/2263/volume.th.jpgAdding a new item here didn't help:
Code:
enum EVolumeType
{
VOLUME_BASIC,
VOLUME_PHYSICS,
VOLUME_LADDER,
VOLUME_AI,
VOLUME_TAG,
VOLUME_AMBIENT_LIGHT,
VOLUME_SHALLOW_WATER,
VOLUME_DEATH_WATER,
VOLUME_FOG,
};
I haven't found anything in the resource hacker either.
Edit: it might be my bad for e.g. DeathWaterVolume extends Volume, not PhysicsVolume in T3.
ascottk on 16/9/2009 at 17:38
Quote Posted by Flux
Hold on, is it the anti portal from ue2? Does it work in a level, I mean can you add it into a level? If yes, this can lead to interesting optimization results for large levels.
I should say that adding a property to support an antiportal works but the antiportal itself does not work yet. The code looks simple enough so it's possible. I'd like to get warpzones working too!
Judith on 16/9/2009 at 17:42
I think if we want to have anything like brush or volume, we'd have to unlock it. We could compile it under T3ed if we could select it in actor browser :/
Code:
class Brush extends Actor
native
editorinvisible;
ascottk on 16/9/2009 at 17:48
Quote Posted by Judith
I think if we want to have anything like brush or volume, we'd have to unlock it. We could compile it under T3ed if we could select it in actor browser :/
Code:
class Brush extends Actor
native
editorinvisible;
I added a Brush archetype in a different package but it conflicted with the originals.
ascottk on 16/9/2009 at 18:55
Quote Posted by Judith
I think if we want to have anything like brush or volume, we'd have to unlock it. We could compile it under T3ed if we could select it in actor browser :/
Code:
class Brush extends Actor
native
editorinvisible;
Hehehe, whohohoho, hahaha, evil!
Create brush in the editor, right click brush, go to obsolete>Edit Script
(
http://img11.imageshack.us/i/t3editscript.jpg/)
Inline Image:
http://img11.imageshack.us/img11/7255/t3editscript.th.jpg, copy this:
Code:
//=============================================================================
// The brush class.
// This is a built-in Unreal class and it shouldn't be modified.
//=============================================================================
class Brush extends Actor
native;
#exec Texture Import File=Textures\S_Vertex.pcx Name=S_Vertex Mips=Off Flags=2;
//-----------------------------------------------------------------------------
// Variables.
// CSG operation performed in editor.
var() enum ECsgOper
{
CSG_Active, // Active brush.
CSG_Add, // Add to world.
CSG_Subtract, // Subtract from world.
CSG_Intersect, // Form from intersection with world.
CSG_Deintersect, // Form from negative intersection with world.
} CsgOper;
// Outdated.
var const object UnusedLightMesh;
var vector PostPivot;
// Scaling.
// Outdated : these are only here to allow the "ucc mapconvert" commandlet to work.
// They are NOT used by the engine/editor for anything else.
var scale MainScale;
var scale PostScale;
var scale TempScale;
// Information.
var() color BrushColor;
var() int PolyFlags;
var() bool bColored;
var native private const Object pStaticMesh;
into the script editor, compile changed, then viola!
(
http://img170.imageshack.us/i/t3brushrevealed.jpg/)
Inline Image:
http://img170.imageshack.us/img170/4209/t3brushrevealed.th.jpgWe have liftoff!
Judith on 16/9/2009 at 19:24
Wow, I mean, wow
:wot:
You did it! :cheeky: