• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code [Help]Problems with AdminPlus, SDK

Lewt

Grizzled Veteran
Sep 5, 2010
404
112
The AdminPlus mutator (if anyone wants the whole thing, download from http://kf.levels4you.com/downloads.l4y?review=17304&cat=511[url]http://kf.levels4you.com/downloads.l4y?review=17304&cat=511[/URL]) ported from UT2k4 has loads of features, but one of which is out-of-date. The readme accompanying the files states this:

Code:
This mutator is not to be changed in anyway unless written permission from the author.
But is free for distribution on any Killing Floor game-server. (via the KF autouploader)

People may NOT use this mutator, including it's reference material, as a base to build additional mutators/mods without the authors written permission.

You are NOT allowed to commercially exploit this mutator, i.e. put it on a CD or any other electronic medium
that is sold for money without my explicit permission!
The admin command 'Loaded' gives you all the default weapons from release day, but none of the newer ones. All I want to do is add a few lines to add the AA12, MP7M, M32, etc. Now, there are a lot of obstacles I'm encountering; firstly, I don't know how the mod community would take this (is it a real offense to edit someone else's mutator without permission? Even if I don't plan to do anything with it other than to host on my own listen server?), and I'm unable to decompile it.

I'll be making a post in the support section about the SDK which is unusable for me at the moment, so hopefully that will be solved sometime soon.

Also, the proposed changes.

Code:
    P.GiveWeapon("KFMod.Axe");
    P.GiveWeapon("KFMod.Bullpup");
    P.GiveWeapon("KFMod.Chainsaw");
    P.GiveWeapon("KFMod.Crossbow");
    P.GiveWeapon("KFMod.Deagle");
    P.GiveWeapon("KFMod.Single");
    P.GiveWeapon("KFMod.Shotgun");
    P.GiveWeapon("KFMod.Flamethrower");
    P.GiveWeapon("KFMod.Nade");
    P.GiveWeapon("KFMod.Machete");
    P.GiveWeapon("KFMod.Syringe");
    P.GiveWeapon("KFMod.Welder");
    P.GiveWeapon("KFMod.Winchester");
    P.GiveWeapon("KFMod.LAW");
    P.GiveWeapon("KFMod.Knife");
to

Code:
    P.GiveWeapon("KFMod.Axe");
    P.GiveWeapon("KFMod.Bullpup");
    P.GiveWeapon("KFMod.Chainsaw");
    P.GiveWeapon("KFMod.Crossbow");
    P.GiveWeapon("KFMod.Deagle");
    P.GiveWeapon("KFMod.Single");
    P.GiveWeapon("KFMod.Shotgun");
    P.GiveWeapon("KFMod.Flamethrower");
    P.GiveWeapon("KFMod.Nade");
    P.GiveWeapon("KFMod.Machete");
    P.GiveWeapon("KFMod.Syringe");
    P.GiveWeapon("KFMod.Welder");
    P.GiveWeapon("KFMod.Winchester");
    P.GiveWeapon("KFMod.LAW");
    P.GiveWeapon("KFMod.Knife");
    P.GiveWeapon("KFMod.AA12AutoShotgun");
    P.GiveWeapon("KFMod.M32GrenadeLauncher");
    P.GiveWeapon("KFMod.SCARMK17AssaultRifle");
    P.GiveWeapon("KFMod.AK47AssaultRifle");
    P.GiveWeapon("KFMod.PipeBombExplosive");
    P.GiveWeapon("KFMod.MP7MMedicGun");
    P.GiveWeapon("KFMod.M79GrenadeLauncher");
    P.GiveWeapon("KFMod.Katana");
And no. I don't know how to contact the creator, so that's out of the question unless I can find him.

Minor issues.. Not too important, but would be nice to have solved -

1: What's the name of the Mac-10? I tried a few obvious things, but I can't find it in KFMod or by guessing.

2: Is there some way to decompile/compile muts without the SDK?
 
How to decompile a .u file:

Step 1. Create a text document in the Killing Floor system folder.
Step 2. Name it Decompile.bat
Step 3. Right click edit and put this piece of code in:

Code:
UCC BatchExport EXAMPLEMUTATOR class uc ..\EXAMPLEMUTATOR\Classes

Note: Replace ExampleMutator with the file you want to decompile.

Step 4. Save and launch the file

How to compile into a .u
Step 1. Create a text document in the Killing Floor system folder.
Step 2. Name it Compile.bat
Step 3. Right click edit and put this piece of code in:

Code:
UCC make
UCC Dumpint EXAMPLEMUTATOR.u

Note: Replace EXAMPLEMUTATOR with the file you want to compile.

Step 4. Save and launch the file
 
Upvote 0
Example of a batchexport (aka decompile) script, drag and drop the U file into this batch script to use it:

UCC.exe batchexport %1 class .uc "C:\SomeFolder\KFClasses\%~n1\Classes\"

pause

simply put, if you see uc files in that folder it means your decompile was successful. %1 being the name of the mutator you are decompiling. %~n1 be the mutator name as from %1.

So if you are going to decompile MyMut.u, this snippet above will export the classfiles to C:\SomeFolder\KFClasses\MyMut\Classes\
 
Upvote 0
Thanks man, I ran your script... much better than the other one for my needs... very clear.

Alright, I have my .uc files, looks like 18 of them. Yeah, looking at the titles I think only 2 or 3 of them look necessary... so I'm going to rebuild my map by copy/pasting things into a blank map... hopefully no muts will cary over... then I just need to import the 2 or 3 necessary muts...Now, if you can help me get to the point of being able to access/modify these within a development environment and be able to see what they actually do, I suspect I will be ready to finalize the map... these dam muts man.:confused: What's the language, python? I know programming, just not for games... for everything else =).
 
Upvote 0
You cannot just include/exclude classes just like that lol, you have to actually go through the entire code to see whatever links to the classes you want to remove and actually modify accordingly.

"development environment"? Do you mean using an IDE? I doubt there is any IDE that requires as little setup as you can do with Notepad++ & unrealscript formatting for coding in UScript. In fact inside the SDK there should be its own integrated environment (correct me on this).

Also, the language is UnrealScript, a mix of C-like and java-like code. You can take a look at the Legacy tutorials in beyondunreal wiki to have some sense of where things are going
 
Upvote 0
You cannot just include/exclude classes just like that lol, you have to actually go through the entire code to see whatever links to the classes you want to remove and actually modify accordingly.

I don't get it. I have these files that where decompiled from the .u file:
https://docs.google.com/file/d/0B71fEvZJKoXBdEhZa2dQSW04M2M/edit?usp=sharing

I've been slowly moving pieces of my map into a new file... uploading to the server and testing... backing up.... again... again... again... unless something breaks in which case I roll it back. In this process I've reduce the map down to only textures, map and static meshes, all in there own files. So, I'm about done with this process and I'd like to junk the old map version and take this new simplified map and try to add a couple of the muts back in one at a time.... In the .u format KFed can see the muts I need in the actor browser, but how do I use just the 2 or 3 .uc files? I basically want to try to remake my Palacemuts.u file to only include things I know work and doesn't crash servers on map reload.

Here's a bit more background if you need it:
http://forums.tripwireinteractive.com/showthread.php?t=88604

EDIT: so last night I was able to decompile all the muts, then I tried to recompile the only 2 out of 18 muts I actually needed... one mut wouldn't compile at all and no .u was created... When I removed that one from the compilation process and only had the one .uc file left, it compiled correctly... however, when I tried to use that one mut it seems to have corrupted both my local content and my server... okay, so now that I've isolated the problem how do I fix it, thread moved here:http://forums.tripwireinteractive.com/showthread.php?t=89007

lol....
 
Last edited:
Upvote 0