Black Cat Forums   Alien Swarm - Steampowered Forums
Alien Swarm 2K4 - ThieveryUT
Black Cat Games - TTLG Forums

Go Back   Black Cat Forums > Alien Swarm 2K4 Forums > Alien Swarm 2K4 Mapping

Notices

Reply
 
Thread Tools
Old 24th Apr 2007, 05:48 AM   #1
babyface
New Member
 
Registered: Apr 2007
Posts: 5
Question How to create your own weapons mutator?

Hi ,
a friend of mine should me this game 2 weeks ago and i love it.
So i decided to do to a little more then just playing the game. I'm a programmer in RL and would like to know, if someone have some hints to get started or the libaries to use the basicfunctions.

Later i would like to create some maps,but i'm just know the Hammer-editore very well, so i'll wait with that projekt till AS:I is released.

Primary it would be nice if someone can give me some hints to create my own weapon mutator...
babyface is offline   Reply With Quote
Old 24th Apr 2007, 07:00 AM   #2
lightfoot
Member
 
lightfoot's Avatar
 
Registered: Oct 2005
Location: *teleports up front*
Posts: 576
After a year of learning unreal things I personally think that it is better to start the other way around. To start and learn mapping and using the Editor. To get a feel for the different things populating the Unreal world.

Sure you have seen the FAQ, containing some mapping links. The BCG mapping pages cover the basics of what is different to AlienSwarm. One of the first things those pages teach you is to set up your Ed to have the AlienSwarm recources loaded.

The UnrealEd is a mighty tool, but its is prone to do strange things, and to throw buggy mischief at its user. It certainly needs some time getting used to.


As you are a programmer, things may look a bit different. But still, you would need to know exactly WHAT IS ALREADY THERE, and HOW IT WORKS before modding anything.

Though the Ed may not be a very good environment for proper coding tasks, it sure is a good tool to look at things already done. Open a map that you know from the player perspective. Look at what actors are used to achieve what, and look into some actors' scripts. Or even modify some settings of the actors in the map, and see how it works out.

If you keep the differences in mind, most of the vast documentation about Unreal applies to AS. There is lotsa stuff out there, even several 'weapon modding tutorials'.

Last edited by lightfoot; 24th Apr 2007 at 08:00 AM.
lightfoot is offline   Reply With Quote
Old 24th Apr 2007, 07:37 AM   #3
babyface
New Member
 
Registered: Apr 2007
Posts: 5
Thx so far for the useful tip.
I'll try get famillar with the UT2004 editor and i also try to read some tutorials to get started.
babyface is offline   Reply With Quote
Old 24th Apr 2007, 09:06 AM   #4
Donator
Member
 
Donator's Avatar
 
Registered: Jul 2004
Posts: 457
UnrealED plainly sucks for coding, especially because many of the 'defaultproperties' cannot be acessed. Just stick to notepad. What you want to do for a start is dump the AlienSwarm sourcecode, do this by opening a DOS window and under C:\UT2004\System (or wherever you have it installed) type 'ucc batchexport AoPrototype class uc ..\temp -mod=AlienSwarm'
(if it doesn't work, there's a detailed explanation here http://wiki.beyondunreal.com/wiki/BatchExportCommandlet)
This will create a new folder named 'temp' in UT2004, containing an assload of .uc files that can be opened with any text editor of your choice.

Unreal code is class based, object oriented and follows the basic rules of C++. If, for example, you want to modify the rifle, create a new text file with the first line being 'class AoNewRifle extends AoRifle;'
Any defaultproperty vars that you alter will override the old ones in the masterclass, any functions that you modify will also be executed instead of the old ones. If you use the command 'Super.DoStuff()' within a function with the name 'DoStuff', the commands in the masterclass function 'DoStuff' will be executed at this point.

Now, to get your new code to work in the game, you need to compile your .uc files into a .u file. I personally use a little program called UMake for this. Detailed info and a download link can be found here http://wiki.beyondunreal.com/wiki/UMake

Hope this can get you started.
Donator is offline   Reply With Quote
Old 24th Apr 2007, 11:22 AM   #5
lightfoot
Member
 
lightfoot's Avatar
 
Registered: Oct 2005
Location: *teleports up front*
Posts: 576
Yes unless you exported the scripts before, the Ed will try to make you think that all the scripts only consist of that one SomeClass extends SomeOtherClass line.

Well, you CAN edit the defaultproperties manually in the ED, but of course you are right, Don, having a defaultproperties block in the script is more elegant.
And yes, no one could recommend the Ed for any greater coding task, but as I said, it still is great for looking at things and getting clear what exactly it is you want.

Which is at least half the work.

About writing code, Notepad is ok, but other Texteditors can bring more features useful for coding, eg. allow for correct UScript highlighting. I mostly use a free one called ConText. (Not that I really DO any coding, but I will learn it in time. For starting, I made a habit out of looking into scripts, and trying to understand what is happening there.)

Same with the compiling, there is several methods. You dont necessarily need UMake. (Though I guess it could make the process of compiling more comfortable...)

Alright, compiling for AlienSwarm in a nutshell:
-Add a 'EditPackages=YourModPackage' line to your AlienSwarm.ini, after the other similar lines there.

-Then, you could have a 'compile.bat', looking like that:
Code:
cd C:\UT2004\System
  del YourModPackage.u
  ucc make -mod=AlienSwarm
-Of course, to make this work, you will need a folder called YourModPackage inside your UT2k4 folder, containing another folder called Classes, which finally contains all the nice .uc files you wrote.

Last edited by lightfoot; 24th Apr 2007 at 01:45 PM.
lightfoot is offline   Reply With Quote
Old 24th Apr 2007, 02:54 PM   #6
Baz
Member
 
Baz's Avatar
 
Registered: Jan 2005
Location: 0xbaadf00d
Posts: 3,094
And lets not forget the best tool in the universe! (lawl tool!)
__________________
..it's safer here.
Baz is offline   Reply With Quote
Old 24th Apr 2007, 03:09 PM   #7
Donator
Member
 
Donator's Avatar
 
Registered: Jul 2004
Posts: 457
 Quote:
Well, you CAN edit the defaultproperties manually in the ED
partially true. But only the ones that have a 'var()' instead of a plain 'var' in the variable definition block, which accounts for less than a third of all default variables really.
Donator is offline   Reply With Quote
Old 15th May 2007, 07:54 AM   #8
lightfoot
Member
 
lightfoot's Avatar
 
Registered: Oct 2005
Location: *teleports up front*
Posts: 576
I knew there was more to this, but I couldn't remember where I found it. I just stumbled over it again. Man I love the UWiki!


So I just looked this up: in principle, ALL the properties are accessible via the editor's console.

The only exception being if a coder used the 'hidecategories' command in a superclass script, a rare case I think.

Hidden properties (like the infamous bStatic)
can be made visible with editobj actorname.
or with copying the actor to the clipboard and then a text editor.

About the defaultproperties, you CAN access 'em in the Ed, it just needs
the console command:

editdefault class=classname



So the only real downside I see, is that the Ed just refuses to COMPILE a defaultproperties block. Which can be worked around, so it really is a matter of luxury, mostly.


But if a mapper just wants to mod a single actor a bit, say if he just needs a single or a small handful of subclasses, it is not only possible to handle them from within the Ed.

It might even be handy, if you plan to make it a very map specific piece of modding, to create it using the Ed, inside the mylevel, from scratch.

'Cos that way you won't need any porting of your package afterwards (which could be needed in case that this is what you wanted: to have the modded thing included into the map, as a mylevel=internal package).
lightfoot is offline   Reply With Quote
Old 15th May 2007, 09:41 AM   #9
Felix
Member
 
Felix's Avatar
 
Registered: Apr 2006
Location: Frankfurt a.M., Germany
Posts: 986
Buffer Overflow, Please Reboot...
Felix is offline   Reply With Quote
Old 15th May 2007, 09:52 AM   #10
lightfoot
Member
 
lightfoot's Avatar
 
Registered: Oct 2005
Location: *teleports up front*
Posts: 576
(*reboots Felix*)
lightfoot is offline   Reply With Quote
Old 15th May 2007, 10:38 AM   #11
Donator
Member
 
Donator's Avatar
 
Registered: Jul 2004
Posts: 457
To cut long matters short, I never had notepad crash on me for no reason, eliminating the better part of an hour's work irreversibly. But Ued? Guess...
Donator is offline   Reply With Quote
Old 16th May 2007, 02:37 PM   #12
lightfoot
Member
 
lightfoot's Avatar
 
Registered: Oct 2005
Location: *teleports up front*
Posts: 576
I know what you mean.

I was, on some point, even a bit angry, about all this 'options' in the editor's menu. What is all these menu entries good for? - I thought, then, when most of it just freezes or crashes?


All that is there can be roughly divided into three categories:

- those options that inevitably crash the Ed.

- the options that sometimes will crash the Ed. If you need one of these, in some cases you may have to be glad if it just don't work...

- then, the operations that normally don't crash the Ed. Yet of course, this is no guarantee. The crash will just be some steps later.


In the long run, it is not quite that bad for me. I had a couple of crashes myself, but they taught me to shun away from some options (including the Undo button), and to be wary about some others, and to safe often.

Maybe I am so mild about it right now, 'cos I never had that, that it destroyed some really important work.


Another thing I heard several times now, I think it is rather common sense by now:

A person beginning to use this program will quite likely -cos of all these crashes- come to the opinion that the Ed hates him personally.

I guess this is where all the myths about the UnrealEd Goblin stem from.

But of course this isn't true. It's nothing personal, he hates all the world. That's why he plans to spread his no-holds-barred mischief across the whole universe.
http://forums.blackcatgames.com/atta...2&d=1177083978

Last edited by lightfoot; 12th Aug 2008 at 04:57 PM.
lightfoot is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you create your own map? darkwarlock Alien Swarm 2K4 Mapping 28 19th Jul 2006 11:17 PM
I want to create Brody Thievery Mapping 2 10th Mar 2006 07:14 AM
Another Freebie, DivX Create Bundle - Sept 29, 2005 Salvage Community Chat 15 5th Oct 2005 08:56 PM
Suggestion: CYOM (create your own marine) -=V12US=- Alien Swarm 2K4 Discussion 5 30th May 2004 11:42 PM
Can't create ut4mod file type association. k1DBLITZ Alien Swarm 2K4 Tech Help 2 30th May 2004 04:15 PM


All times are GMT -5. The time now is 04:43 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.