I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

Legacy:Chazums/Developer Journal

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

Trystan[edit]

He's the other guy i'm coding with, if you want to see an a broader view of the classes we're working on in an easy to follow and structured manner go to Trystan/Developer Journal

The Journal[edit]

I plan on updating this as i learn more about programming for UT2003.

I also plan to do a tutorial for creating and adding Immersion (Ifeel effects) - if thats ok that is :)

Moving to UT[edit]

Before the project i worked with the Half-Life code and its certainly a culture shock when you first start. Its pretty much like moving to from c++ to Java, if fact to me its just like that.

After the initial panic I started to look around it a little and i'm growing to really like its structured nature, it makes moving through areas of the code very fast.

The main problem i'm having with it, being a beginner is finding out where to start and trying not to get lost as there are so many files to open.

So if you're a newbie like me i can highly recommend a pencil, paper, rubber, packet of buscuits, a whole lot of drink and a comfy chair. Try and find a small part of the code that has obvious effect and get to know it alter a few values and see what happens. I found that when taken in small pieces its easier to get my mind around.

Axis[edit]

I'm not sure if this is actualy documented anywhere but i'll stick it here just incase.

I just have spent a good few hours trying to get a model to show up properly ingame, the break through came when i discovered the following:

x = z

y = x

z = y

so.....

Increasing x will make things move forward / into the scene

Increasing y will make things move to the right of the screen

Increasing z will make things move down the screen

IMO thats crazy :D

PlayerViewOffset[edit]

This is contained with the DefaultProperties of <weaponname>.u (see Weapon Properties )and relates to positioning the weapon model on screen

PlayerViewOffset=(X,Y,Z)

When altering this there are 2 things to remember

1. This value is multiplied later in the code (by 100)

2. That the Axis are set out as above.

PlayerViewPivot[edit]

This is also in the DefaultProperties of <weaponname>.u (see Weapon Properties)

PlayerViewPivot(Pitch,Yaw,Roll)

16834 = 90 Degree turn


Karmic Quirk[edit]

It would seem that having a very high value for the speed of a Projectile can have some side effects when interacting with Players. When a player is killed by a high-speed Projectile it can cause the player to gib or get their limbs torn off. This can be conpensated by setting a very low value for MomentumTransfer.

Custom Bot Code[edit]

This, for the moment, is will be a very, very rough note on how to get bots to use custom pawn settings.

You will need the following things:

custom Pawn

custom Game

custom Roster

custom RosterEntry

so we have in our own .u called MyPackage

MyPawn

MyGame

MyRoster

MyRosterEntry

set MyGame > DefaultProperties > DefaultEnemyRosterClass = MyPackage.MyRoster

make MyRoster a duplicate of a current roster e.g. xTeamRoster.uc

then Replace all the instances of xRosterEntry with MyRosterEntry

make MyRosterEntry a duplicate of a current rosterentry e.g.xRosterEntry.uc

then in the functions :

 static function xRosterEntry CreateRosterEntry(int prIdx)
 static function xRosterEntry CreateRosterEntryCharacter(string CharName)

set xre.PawnClassName = "MyPackage.MyPawn" in both functions

ta-da.

i appologise for the complete mess that this is, but i shall clean it up and make it a proper wiki page - unless someone else wants too.

PokeTerrain()[edit]

This comes with the new 2225 patch (i think) and allows you to alter the hightmap of a level on the fly - can you say 'deformable terrain'? :D

Leaving[edit]

Because i'm not going to be developing for ut2k3 any more i'm, going to up all the work i've done so people can use it :D

should be up mid-week ish.

What its got:

Projectile based bullets (with bullet drop)

Weapon Recoil

Timed respawns (like RtCW)

Re-inforcements (like battlefield)

Reloading

Iron-Sights

Texture specific hit decals and hit effects

Bullet Penetration

Locational Damage

Deformable Terrain (grens will leave craters etc)

maybe other stuff that i've forgot :P

  • note this is work in progress code so its not perfect*

if you want me to go through and explain some of the mess leave a comment and i'll reply

The Code

The Code and Art ( 2 maps, 4 weapons, Slightly Modified Karma model and various art for effects etc)

I would ask that you don't re-use the Art tho please as it will be used on the new project.


EntropicLqd: What you going to be up to then? Surely you are not quitting modding altogether?

Chazums: For now i am at the end of my final year of University, the rest of the mod team want to wait and mod for HL2 so maybe that :/

TFfF_Renoir Thanks, Chazums, for posting your code so that others may learn. I've been coding an UT2k3 mod for a little while, on and off, and these wiki pages are where I've learnt most of the interesting stuff. Can I just check that you don't mind if I use some of your code (appropriately marked as such) in our mod? I've just about learnt enough to start contributing to the wiki, and everyone's leaving to do HL2 :)

Chazums: Sure thats what its here for. Personally i don't think that HL2 can do anything that ut2k3 can't and with the rumours of ut2k4 being at E3 i wouldn't be supprised if UT ends up being better. Still, you go where the boss says :P

Riddler: How about .int files and your test map to go with the code? Looking at code is great, but it would be nice to see it in-engine so we can see what it plays like.

Chazums: I'll talk to the other guys and see if they mind having their art released.

Riddler: Thanks, appreciate that. You can e-mail me at riddler@megamod.d2g.com, or MSN Messenger at MegaRiddler@hotmail.com if you need

Chazums: There we go all there now ( i think )