I don't need to test my programs. I have an error-correcting modem.
Legacy:Code References
This is a page for various code references off the UT2003 code. Any corrections would be helpful. Arrows indicate an Extends relationship with the leftmost class being the parent and subsequent classes being its children.
Contents
XAdmin[edit]
XEffects[edit]
XGame[edit]
XGame_rc[edit]
XInterface[edit]
XPickups[edit]
TournamentPickup -> TournamentHealth -> HealthPack
TournamentPickup -> TournamentHealth -> MiniHealthPack
TournamentPickup -> TournamentHealth -> SuperHealthPack
TournamentPickup -> AdrenalinePickup
TournamentPickup -> UDamagePack
TournamentPickup -> ShieldPickup -> ShieldPack
TournamentPickup -> ShieldPickup -> SuperShieldPack
XPickups_rc[edit]
XWeapons[edit]
Flak Cannon (UT2003)[edit]
Minigun (UT2003)[edit]
UTWeaponPickup -> MinigunPickup
InstantFire -> MinigunFire -> MinigunAltFire
UTAmmoPickup -> MinigunAmmoPickup
xWeaponAttachment -> MinigunAttachment
XWeapons_rc[edit]
XWebAdmin[edit]
Core[edit]
Engine[edit]
Gameplay[edit]
Vehicles[edit]
UnrealGame[edit]
Comments[edit]
Dragonmaw: I'm gonna try and update this page at least once a week (usually Saturday) with a few more code references. Any corrections will be helpful.
Wormbo: I doubt this will help "n00bs who don't want to decompile and figure it out themselves". UnrealWiki class pages like Actor, Interaction, WeaponFire (UT2003) or also Minigun should contain a list of properties, structs, enums and methods declared and used in that class. Just copying the code is pointless and ineffective, concidering there are over 1300 classes only in UT2003 and the Wiki also describes UT classes. See those other pages for how class pages should look like.
Sobiwan: Is this supposed to be what http://unreal.student.utwente.nl/uncodex/ is all about?
Wormbo: That's just the UnCodeX output of the UT2003 classes plus El Muerte's own stuff. A wiki class page should look like e.g. ZoneInfo. Quoting the code of entire classes isn't useful, even if there are a lot of comments in it.
Tarquin: All the commented default properties should be listed as properties on the relevant class page. ("AttachLoc" for example. Which class defines this?) It might be useful to have a few commented class scripts as tutorials, but not the whole lot!
Dragonmaw: Maybe I'm just a bit ambitious. Besides, I'm bored, and figuring out the code will help me learn UScript. If you want I won't do all of them, but I plan on doing a few Engine classes. Sorry if I did something wrong :(
RDGDanClark: I don't think you did anything wrong... but this is a bit too much. I think it's a great idea to have heavily commented examples of a few classes from each category, especially weapons and pickups. I respectfully disagree with Wormbo – when I was first learning to code C++, it helped me immeasurably to have a block of working, heavily commented code to help me trace through the functionality. The only thing that would concern me on a page like this is the likelihood that classes will change with each patch and especially with UT2004. That being the case, each class laid out should have a build number at the top of the page.
Dragonmaw: I went ahead and cut down the classes to be commented to the main areas people will have difficulty in. And I have to agree with Clark, commented code really helps along the learning process.
Tarquin: Could you follow the standard layout for pages named after classes? If it makes the whole page too long, I suggest you put the code analysis at Template:Classname/script
RDGDanClark: No problem.
Tarquin: It would be nice to tie this in with the "how stuff works" section on the UnrealScript page: How UT2003 Weapons Work. Also, you could make longer comments to the code and take them out of the code, like on How UT2003 Weapons Work/Firing A Weapon.
RDGDanClark: I think the idea, especially in the case of the weapon examples, is that someone could simply copy/paste the entire block of code, put it into a compliler, and have a working weapon – one problem I always had with script tutorials is that very often there are bits left out between code blocks that cause the code to fail when compiled. No offense to the author, but the Creating A New Weapontype tutorial is rather vague and near impossible to follow for someone new to scripting. By seeing all the original code in one place with heavy comments and notes on how to change it (which is my project for tonight), this could be the perfect newbie weapon tutorial.
Tarquin: We seem to have lots of pages which are just script with extra comments. What I think would be more useful would be see single pages that explain things with text and maybe the odd snip fform the code to illustrate.
SuperApe: I completely agree. If you're interested in the actual code, you'll look at the code in the editor, but for reference, it's much more useful to novices and experts alike to see accurate text definitions of functions, event and states. I say keep one or two for explanation purposes (perhaps in the /script subpages?) and convert the rest to English. BTW, this should've been for UT2004 as well.
Sweavo: I also agree completely. Once you know "Don't modify built in packages" and "how to extract the source code" all you need is the how and why, not the what. A how-oriented page might employ a "Flattened" view of the properties in a class, so an ONSPRV page might include the relevant properties of the superclasses so that players' interactions with the hellbender can be clearly explained. What would be great would be more examples of flow of control, e.g. an example of what happens when a player hits fire when in a hellbender's rear turret, or what gets called when a vehicle is destroyed or a player walks off the edge of a cliff. I've been meaning to write up vehicle weapon firing for a while now.