Newbie Questions

  • 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.

_Zd_3s_

Regristered User
I'm a total, complete, utter n00b when it comes down to coding. Please don't throw all kinds of difficult terms at me, because it will make me cry. :p

Now I have been looking around a bit at the tutorials section of Chimeric and there is quite some useful stuff there, but I still have a couple of questions. :)

What is the best program for me to write code for UT?
Once I have written some code, what do I do with it and how can I use it in game? And more importantly, how do I make sure it doesn't interfere with my UT in a way that I'm not able to play online anymore?

Thanks in advance for helping me underway a bit. The actual coding is well-explained at Chimeric, but I just need a bit of motivation to start learning all this stuff. :)
 

Brood_of_Evil

Selene's martyr
Nov 3, 2001
147
0
0
46
Look outside your window!
Visit site
There are quite a few editing programs for UScript out there. Check out the tools section at chimeric for some of them. When you write code for unreal script, you save them in .uc format, which is the format used to compile UScript code.

If you're not familiar with UCC compiling you should check out the "Working with .uc's tutorial in chimeric, once you've read this tutorial you'll have a better understanding about .uc format and the ways to compile it. UCC is a DOS based application which is included with the unreal engine, you can find it in the System folder of your unreal engine based game (UnrealTournament\System in UT's case) used to compile uc code, import models, sounds textures, and also export all of the above into different formats. If you really want to get into coding for unreal engine you should learn UCC compiling instead of using unrealed.

The best way to avoid problems with online gaming, is NOT to modify AND recompile built in unreal classes!! So only compile and work with your own classes, you can of course use built in classes as reference, as long as you don't modify them. This is more likely to happen if you work with UnrealEd, in where you can modify unreal classes directly, and then recompile them. But if you're wotking with UCC, this is not very likely to happen.

Check out this thread for more info about some of the tools people use to edit .ucc. Hope that helps
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
I use wotGreal. It has some annoyances, but I've found it does me well overall.

Read this:
http://unreal.epicgames.com/UTMods.html

It's a primer from epic for writing mutators and mods. Dont try and figure it out, just go through the steps and make the sample Vampire mutator. It was my first step into UScript, and once I got things exported and compiled correctly the first time, things made a lot more sense.



rgx
 

_Zd_3s_

Regristered User
Originally posted by RegularX
Read this:
http://unreal.epicgames.com/UTMods.html

It's a primer from epic for writing mutators and mods. Dont try and figure it out, just go through the steps and make the sample Vampire mutator...
It is a great tutorial, thanks for that. :) Something weird happens, though. I do everything that it says in the tutorial and the mutator shows up fine in UT, but when I select it and play a game, it doesn't work. Nothing happens, really. Any ideas on this? :hmm:
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
three:

1) Welcome to debugging :) First step is to look in the unrealtournament.log file - see if it mentions your mutator. If that doesnt provide clues, try adding:

BroadcastLocalizedMessage("Message")

to your code to make sure is being used.
(I think that's the right function - it should put a message up where the taunts show up)

2) Check your INT file to make sure it's being reported to the game correctly.

3) Post the code for the mutator here and let the class have a look :)


rgx
 

_Zd_3s_

Regristered User
I'm pretty confused now. :)
This is from the game's log file
ScriptLog: InitGame: ?Game=BotPack.DeathMatchPlus?Mutator=SemperFi.Vampire?Name=_Zd_3s_?Class=BotPack.TMale1?team=1?skin=CommandoSkins.daco?Face=CommandoSkins.Luthor?Voice=BotPack.VoiceMaleOne?OverrideClass=
ScriptLog: Base Mutator is DM-Deck16][.DMMutator1
ScriptLog: Mutators SemperFi.Vampire
ScriptLog: Add mutator SemperFi.Vampire
Warning: Failed to load 'SemperFi': Can't find file for package 'SemperFi'
Warning: Failed to load 'Class SemperFi.Vampire': Can't find file for package 'SemperFi'
Apparently, the game can't find a package to which I have referred in the .int of the mutator. In the tutorial I read it says the following.
from Brandon Reinhart's tutorial
...So now you can save this file and rebuild your package. We aren't done yet, though, because the mutator won't show up in the menus without some more work. Open your package's int file and add the following line to the [Public] section:

Object=(Name=SemperFi.Vampire,Class=Class,MetaClass=Engine.Mutator,Description="Vampire,You gain life equal to the amount of damage you do to an enemy.")
It doesn't say I have to replace the "SemperFi" part with something different.

What is this SemperFi package? Why do I need it? Can I replace it with something else?

:confused: Help meeee! :)
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
excellent! Welcome to some of the usual early confusion of OO design.

A "package" is just a group of files, usually in a distinct directory by source. So, in java if you wanted to find the source to the class -

java.io.IOException

You would go into the java dir, the io dir and then find the src file.

UScript works in much the same way, so because "MyPackage" is what you named your code directory, that became the name of the package.

(I imagine you figured this out already, but for prosperity)


Have fun coding!


rgx
 

_Zd_3s_

Regristered User
Wheeee. :) I made my very own mutator. Translocator Arena :rolleyes:. It takes away all pickups and gives the player only a Translocator to kill with. It all works fine, except for the fact that there are translocators scattered around the map, because they replace the weapon-pickups. How do I remove these? :con:

Here's the code. :D
//=============================================================================
// Translocator Arena
// Telefrag l33tness
//=============================================================================

class TranslocatorArena expands Arena;

//Code entirely ripped from InstagibDM.uc that was shipped with UT. :)
//This removes all pickups from the map.

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if ( Other.IsA('TournamentHealth') || Other.IsA('UT_Shieldbelt')
|| Other.IsA('Armor2') || Other.IsA('ThighPads')
|| Other.IsA('UT_Invisibility') || Other.IsA('UDamage') )
return false;

return Super.CheckReplacement( Other, bSuperRelevant );
}




// Code entirely ripped from ca's Shock Rifle Arena Mutator. I don't take any credit. :)
//This replaces the Defaultweapon with the Xlocator.

function PreBeginPlay()
{
WeaponName = 'Translocator';
WeaponString = "Botpack.Translocator";
}

function Class<Weapon> MyDefaultWeapon()
{
return class'Translocator';
}