For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

UnrealEngine 1 PreProcessor

Unreal Unreal and more Unreal
Post Reply
User avatar
Raven
OldUnreal Member
Posts: 311
Joined: Fri Jun 10, 2005 5:10 am

UnrealEngine 1 PreProcessor

Post by Raven »

This preprocessor is inspired by the one existing in Unreal Engine 3.

Install:
Copy files in the archive to your /system folder.

Download

http://turniej.unreal.pl/files/uenginepp.zip (~570 kb)

ReadMe

ReadMe at [url=http://wiki.beyondunreal.com/UE1:UE1PreProcessor]WIKI[/url]

It's copy of UT3 preprocessor. Currently supported directives are:

`process - should be in the first line of .uc file. Tells preprocessor to parse file
`include file - embade file in the currently opened .uc
`inc_process file - embade file in the currently opened .uc and parses it
`define variable - defines empty variable (used in `ifdef and `ifndef directives)
`define variable=value - defines variable with specified value
`write variable - writes defined variable
`ifdef variable - evaluates to true if variable is defined
`ifndef variable - evaluates to true if variable is not defined
`else  - part of conditional statement
`endif - ends conditional statement
`check definition==value - evaluates to true if defined variable (definition) equals value. Used in strings, floats, integers.
`check definitionvalue - evaluates to true if defined variable (definition) does not match value. Used in strings, floats, integers.
`check definition>value - evaluates to true if defined variable (definition) is greater then value. Used in floats, integers.
`check definitionint2
//var() int test1;
//`else
var() int test2;
var() class NewActor; //`write nc
//`endif[/code]

Of course input file can look different, but most important thing is to write `process in first line.
Last edited by Raven on Wed Aug 27, 2008 9:50 am, edited 1 time in total.
Image
User avatar
DieHard SCWS
Global Moderator
Posts: 2064
Joined: Sun Mar 16, 2003 11:33 pm

Re: UnrealEngine 1 PreProcessor

Post by DieHard SCWS »

For posts like this, you should also include information to what it is and what it does. Theres alot of data in the post but i have absolute no clue whats it about. So please post also information to what this is :)


Otherwise it looks great lol :)
.
.
.
Last edited by DieHard SCWS on Sun Aug 24, 2008 3:51 pm, edited 1 time in total.
User avatar
Raven
OldUnreal Member
Posts: 311
Joined: Fri Jun 10, 2005 5:10 am

Re: UnrealEngine 1 PreProcessor

Post by Raven »

Well... it's preprocessor.
In computer science, a preprocessor is a program that processes its input data to produce output that is used as input to another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers. The amount and kind of processing done depends on the nature of the preprocessor; some preprocessors are only capable of performing relatively simple textual substitutions and macro expansions, while others have the power of fully-fledged programming languages.
Unreal Engine 3 has preprocessor which is kinda useful in scripting. I wrote it for debugging of TCO.
Image
Jâçkrâßßit

Re: UnrealEngine 1 PreProcessor

Post by Jâçkrâßßit »

so basically you can insert "test data" to debug a script before you actually compile the .u?

I guess it would save some time so you wouldn't have to recompile a bunch to get things working correctly.. cool raven
User avatar
Chaos13
OldUnreal Member
Posts: 951
Joined: Sat Feb 16, 2008 10:24 am

Re: UnrealEngine 1 PreProcessor

Post by Chaos13 »

I guess not, it converts .ucp files to .uc files with usage of `... lines like #... lines (compiler directives like #ifdef #endif etc...) with replacement of ` lines with designated script code. Pretty cool and useful ::)

... Edit: Gonna go debug stuff for UT3 ;D
Last edited by Chaos13 on Sun Aug 24, 2008 7:14 pm, edited 1 time in total.
Skydev = Chaos13 = Dimension4
User avatar
Raven
OldUnreal Member
Posts: 311
Joined: Fri Jun 10, 2005 5:10 am

Re: UnrealEngine 1 PreProcessor

Post by Raven »

You have to recompile the code. It generates .uc files. But it saves time if you don't want to edit code to delete some things (like logging functions).
Image
Jâçkrâßßit

Re: UnrealEngine 1 PreProcessor

Post by Jâçkrâßßit »

You have to recompile the code. It generates .uc files. But it saves time if you don't want to edit code to delete some things (like logging functions).
ahhh I gotcha
User avatar
Raven
OldUnreal Member
Posts: 311
Joined: Fri Jun 10, 2005 5:10 am

Re: UnrealEngine 1 PreProcessor

Post by Raven »

Update:

new features:
- globals can be defined in project file in special [globals] group or in commandline with special -global switch:

Code: Select all

[globals]
global_value1=test1
global_value2=test2
or

Code: Select all

uenginepp.exe ..\SomeScript -clean -debug -global testglobal1=test1 -global testglobal2=test2
fixes
- if defined variable does not exists (in `write or `check), it's name will be used instead
Image
User avatar
Chaos13
OldUnreal Member
Posts: 951
Joined: Sat Feb 16, 2008 10:24 am

Re: UnrealEngine 1 PreProcessor

Post by Chaos13 »

uenginepp.exe ..\SomeScript -clean -debug -global testglobal1=test1 -global testglobal2=test2
Ownage ;D GMode=Debug :P
Skydev = Chaos13 = Dimension4
Post Reply

Return to “Unreal General Forum”