[UT2k4] Just some notes I noticed last night

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
Just a heads up for people who haven't gotten 2k4 yet, here's a couple things I noticed.

- There's no IDE packaged (not counting UED). Harm is still working on the kinks for the new stuff in 2k4 and mentioned on the ut2004mods list that it should be up for download in about a week. I was having problems getting the dev version of wotGreal to work, but with his help it looks like what you have to do is a) use the gametype config to create a UT2004 option, b) go to preferences and make sure the UCC, user.ini, etc. are set for that option, c) refresh your package tree, d) refresh your compiler.

- One of the big changes Steve Polge mentioned was weapon code. Apparently WeaponFire is an object now, not an actor. They've moved a lot of the actor-like functions to there, but states are apparently not supported. I'd say it's pretty easy for custom weapon code to get broken here, although I had some success with using the xpak weapons without trouble.

- The new GUI code looks pretty tight. There is still going to be a lot of tweaking of default properties, but doesn't seem to be as much of the juggling between initializing, declaring, setting in the controls array, then setting the var to the controls array, etc. etc. It sounds the same on the surface - declare var, define, set var to the control, but looks simpler. Plus, I think there's a lot more toys.

However, my config screens for the xpaks seem to work OK untouched, so the old ways seem supported (nice for porting). My weapon loader didn't work, but it was probably referencing an obsolete function.

- Oddly, I didn't see the gametype declarations in the int files, but moving some int files from my UT2003 stuff seem to work nearly as normal (I had some odd behavior but until I get a solid compile, hard to tell why). Interestingly, if the game can't load your gametype (because of dependencies, etc.) it won't show it on the gametype chooser at all - friendlier than the way it was in UT2003 where the gt would just revert to DM when played.
 

Mr Evi1

New Member
Mar 22, 2002
336
0
0
UK
come.to
All sound good except the no states in WeaponFire. That could make it rather difficult to port some of my stuff.

How many //FIXME comments are there in the UT2004 code compared to UT2003 :)
 

TBone_77

New Member
Mar 12, 2004
33
0
0
I'm still trying to figure out what exactly 'bAddToServerPackages' does, since setting it to true doesn't actually add it to the packages at runtime, as the comment would suggest:

Code:
var bool bAddToServerPackages; // if true, the package this mutator is in will be added to serverpackages at load time

Also, I remember Epic staff saying that adding a config menu would be "MUCH easier in UT2004 than it was in UT2003". I actually didn't have a problem with UT2003's GUI coding (thanks to the Wiki, of course), but I'm trying to locate/decypher this "much easier approach" that I've been hearing so much about!

I like the auto-exporting of the int files, though (from Mutator.uc):

Code:
/* rjp ---
	A note about mutators & the caching system:
	In order for your mutator to appear in the game's mutator lists, you must create a cache file which
	contains your mutator's important information.

	This can be done automatically using a commandlet.  If you wish to ensure support for multiple
	languages in your mutator, you should always export localized strings to .int before exporting the mutator's cache
	information.  This ensures that the caching system will recognize that your mutator has localized properties and
	will adjust your mutator's cache entry accordingly.

	To export localized properties, use the 'dumpint' commandlet:
	'ucc dumpint <PackageFileName.ext>' - generates .int file containing all localized properties.

	To export cache entries, use the 'exportcache' commandlet:
	'ucc exportcache <PackageName.ext>' - generates a .ucl file containing all required caching information.

	Ex: (ACoolMutator.u)

	ucc dumpint ACoolMutator.u
	  - generates ACoolMutator.int
	ucc exportcache ACoolMutator.u
	  - generates ACoolMutator.ucl file containing an entry for each mutator, gameinfo, weapon, and crosshair in
	    the ACoolMutator package.


    Adding "Object=()" lines to your mutator's .int file is no longer necessary.  If the caching system finds any
    Object=() entries in an .int file for your mutator, it will automatically create the necessary .ucl file the first
    time the game is started.

	-- rjp
*/

I did notice that some lines that would normally go in the INT file aren't created by the export process. For instance, one of my mutators has a key binding class:

Code:
class MyKeyBinding extends GUIUserKeyBinding;

defaultproperties
{
    KeyData[0] = (KeyLabel="MyKeyBindingSection",bIsSection=True);
    KeyData[1] = (KeyLabel="My Key Binding",Alias="mutate my_1337_command");
}

Per the Wiki, a corresponding entry must be made in the mutator's INT file for this to show up in the key binding menu:

Code:
[Public]
Object=(Name=MyPackage.MyKeyBindings,Class=Class,MetaClass=XInterface.GUIUserKeyBinding)

My interpretation of RJP's comment in the Mutator class is that the export commandlet interrogates the .u to see what INT entries are needed, and does them automatically. But, the key binding entry above is not made.

I'm sure I've overlooked something, but if someone understands it better than I do, I'm certainly all ears!
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
TBone_77 said:
My interpretation of RJP's comment in the Mutator class is that the export commandlet interrogates the .u to see what INT entries are needed, and does them automatically. But, the key binding entry above is not made.

I'm sure I've overlooked something, but if someone understands it better than I do, I'm certainly all ears!

Interesting. I think I'll interrogate the ut2004mods list and see if we can get a clarification of what belongs in int files and what doesn't.
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
Mr_Evi1 said:
All sound good except the no states in WeaponFire. That could make it rather difficult to port some of my stuff.

How many //FIXME comments are there in the UT2004 code compared to UT2003 :)

Hrm, dunno if this helps (from the ut2004mods list) ..

Steve Polge said:
You can still have states with Objects, but not state
code. States are still useful for scoping functions. By state code, I mean something like;

state Hangout
{
Begin:
sleep(0.2);
playanim('hanging');
sleep(0.3);
}

...Steve
 

TBone_77

New Member
Mar 12, 2004
33
0
0
TBone_77 said:
Also, I remember Epic staff saying that adding a config menu would be "MUCH easier in UT2004 than it was in UT2003". I actually didn't have a problem with UT2003's GUI coding (thanks to the Wiki, of course), but I'm trying to locate/decypher this "much easier approach" that I've been hearing so much about!

Well, I checked out the MutArena class, and figured out how things were made easy... and BOY is it easy:

Code:
static function FillPlayInfo(PlayInfo PlayInfo)
{
	Super.FillPlayInfo(PlayInfo);

	PlayInfo.AddSetting(default.RulesGroup, "MySetting", "My Setting Description", 0, 1, "Check");
}

VERY nice!
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
That might seriously rule.

I got a really simple gametype working last night. I didn't see any indication of automatic int file export or anything, but maybe I didn't call the ucc right or something. Perhaps the new wotGreal will have more linkage? I asked the ut2004mods list, but got nothing back in return.

But, the old int file structure works just fine. You'll see your gametype listed under "Custom Gametypes" in the instant action screen/host game and as part of the pulldown for servers.

If anyone is interested in the code, let me know. It's a basic sniper game, but it shows an example of setting your own gametype, base mutator, and subclassing a weapon. I might wikify it this weekend - but right now it's identical to how you'd do it in UT2003.
 

TBone_77

New Member
Mar 12, 2004
33
0
0
RegularX said:
I didn't see any indication of automatic int file export or anything, but maybe I didn't call the ucc right or something.

The export of the .int and .ucl files are each separate commands. For instance, if your mutator is MyMutator.uc, then you'd execute the following:

ucc dumpint MyMutator.u
ucc exportcache MyMutator.u

You'll have a MyMutator.int and MyMutator.ucl, respectively, after doing this.

On one hand, it seems pretty handy... but on the other hand, the dump/export doesn't seem to catch everything (for instance, my key binding class)... but it does catch most of it (it created the appropriate entry for one of my mutators' weapons to be added to the weapons database - nice).
 

TsN|Byte

Shattered Oasis Producer
Feb 8, 2003
75
0
0
45
Texas
www.tsncentral.com
The exporting does seem to miss a few things at times, but instead of references to mutators, weapons, etc being in the int now. It will all be going into the ucl file - which is autogenerated with exportcache.

Its fairly quick and easy - easiest to setup a batch file that you can pass .u file name to, or maybe somebody will just do a small GUI for it. I could expect something to be part of WOTGreal/IDE once its all sorted out.


TBone_77 said:
The export of the .int and .ucl files are each separate commands. For instance, if your mutator is MyMutator.uc, then you'd execute the following:

ucc dumpint MyMutator.u
ucc exportcache MyMutator.u

You'll have a MyMutator.int and MyMutator.ucl, respectively, after doing this.

On one hand, it seems pretty handy... but on the other hand, the dump/export doesn't seem to catch everything (for instance, my key binding class)... but it does catch most of it (it created the appropriate entry for one of my mutators' weapons to be added to the weapons database - nice).
 

Harmeister

New Member
Mar 14, 2000
43
0
0
49
Billerica, MA
www.wotgreal.com
I'm still waiting for my copy of UT2k4 so that I can test all the kinks that will need to be worked out.

For exportcache, though, you can edit the compile switches to pass this in on the compiler screen. If necessary, I'll add it in as a default.
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
Harmeister said:
I'm still waiting for my copy of UT2k4 so that I can test all the kinks that will need to be worked out.

For exportcache, though, you can edit the compile switches to pass this in on the compiler screen. If necessary, I'll add it in as a default.

Drats to Atari for not hand-delivering one to you! :)

Indian said:
Wasn't 2K4 going to show line numbers for Accessed Nones etc?

I'm not really seeing discernable line numbers, but there is a reference to the var which is throwing it off. That said, I was getting some bizarre AN's last night ( a controller being none off of a controllerlist read)

But they look like this:

Code:
Warning: xBot DM-DesertIsle.xBot (Function UnrealGame.Bot.ExecuteWhatToDoNext:00DF) Rae WhatToDoNext with no weapon, DM-DesertIsle.xPawn health 100
Warning: xBot DM-DesertIsle.xBot (Function UnrealGame.Bot.ChooseAttackMode:0116) Accessed None 'Weapon'
Warning: xBot DM-DesertIsle.xBot (Function UnrealGame.Bot.ChooseAttackMode:0223) Accessed None 'Weapon'
Warning: xBot DM-DesertIsle.xBot (Function UnrealGame.Bot.ChooseAttackMode:0264) Accessed None 'Weapon'

And oddly ( tangent back to Evi1's post ) - UT2k4 seems to spit out a lot more log stuff and AN's than 2k3 did....
 

Mr Evi1

New Member
Mar 22, 2002
336
0
0
UK
come.to
RegularX said:
...And oddly ( tangent back to Evi1's post ) - UT2k4 seems to spit out a lot more log stuff and AN's than 2k3 did....
I had hoped that would not be so. Have they at least fixed the Link Gun accessed none? I always play with the log window open on my second monitor, and seeing it always filled with errors from the Link Gun was not very helpful, and it's terrible for servers which can end up with hundreds of megabytes of log file.
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
Mr_Evi1 said:
I had hoped that would not be so. Have they at least fixed the Link Gun accessed none?

I played with the Link Gun a bit last night and didn't notice anything - so possibly. I may have overspoke before, there might just be situations where it soaks and AI seems to get verbose, because I had several short games last night that had only 7k logs - but I think Wong told me he had gotten a 400k log, and I had seen lots of the "WhatToDo" style errors.

In addition to the tidbits of information, Joe W posted this to the lists, it's a tutorial on using the new mod/community menu:

http://unreal.epicgames.com/ut2004/tutorials/modsupport.htm

Which sounds inviting for TC and PC's alike. I'll be using it (hopefully) in an upcoming PC to keep the vanilla dropdowns from getting cluttered.
 

Mr Evi1

New Member
Mar 22, 2002
336
0
0
UK
come.to
Interesting page. What about the limitation of .upl files (and others) only being read from the UT2003/system directory, not from extra directories specified in the ini? That was the main reason why I've never made a mod with its own directory structure. I would be very happy if that was fixed.

I should be able to test some of these things myself soon, as UT2004 is installing...
 

Mr Evi1

New Member
Mar 22, 2002
336
0
0
UK
come.to
I hav eUT2004 installed now, yay! I exported the source, and the first thing I noticed browsing through is that all subobjects appear to be there. So perhaps there is no longer any need for Epic to release the source code separately?
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
Mr_Evi1 said:
I hav eUT2004 installed now, yay! I exported the source, and the first thing I noticed browsing through is that all subobjects appear to be there. So perhaps there is no longer any need for Epic to release the source code separately?

I havent had a chance to play with it enough to confirm that, but that's what I was suspecting as well.

Now get to work on WOE :)
 

jb

New Member
May 22, 2000
278
0
0
www.planetunreal.com
Mr_Evi1 said:
I hav eUT2004 installed now, yay! I exported the source, and the first thing I noticed browsing through is that all subobjects appear to be there. So perhaps there is no longer any need for Epic to release the source code separately?


I tried to do it via WOT but found a few that crashed..did you just use UE to do it?

So I am confused... do we need both INTs and UCL files? And did I understand you correctly that you can use FillPlayInfo to set up cusom keybinding section? I fiddled with my INT file and got it to show up..but not sure which is the correct method...