Results 1 to 12 of 12

Thread: How to create your own weapons mutator?

  1. #1
    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...

  2. #2
    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 07:00 AM.

  3. #3
    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.

  4. #4
    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.

  5. #5
    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 12:45 PM.

  6. #6
    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.

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

  8. #8
    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).

  9. #9
    Member Felix's Avatar
    Registered
    Apr 2006
    Location
    Frankfurt a.M., Germany
    Posts
    986
    Buffer Overflow, Please Reboot...

  10. #10
    Member lightfoot's Avatar
    Registered
    Oct 2005
    Location
    *teleports up front*
    Posts
    576
    (*reboots Felix*)

  11. #11
    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...

  12. #12
    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 03:57 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •