NPLoader help

Discussions about Coding and Scripting
Fulcrum
Novice
Posts: 24
Joined: Wed May 30, 2012 2:03 pm

NPLoader help

Post by Fulcrum »

I can't seem to find a readme explaining how to use nploader for your own native mutator.
If someone could help could help me out on this one I'd be grateful.

Also; my mutator is for windows only. What will happen when linux players connect and I don't have a dummy .so file?
What should I do with linux players? (is there something like GetProcAddress in uscript?)

Thanks
UT99.org

Re: NPLoader help

Post by UT99.org »

Fulcrum
Novice
Posts: 24
Joined: Wed May 30, 2012 2:03 pm

Re: NPLoader help

Post by Fulcrum »

Thx that got me nploader to work with my mutator. Now figure out what to do with linux clients.

edit: Well it didn't rly work after all. It'd be awesome if someone could show me the source of a project using nploader.
Fulcrum
Novice
Posts: 24
Joined: Wed May 30, 2012 2:03 pm

Re: NPLoader help

Post by Fulcrum »

Help?!
UT99.org

Re: NPLoader help

Post by UT99.org »

billybill wrote:Hi Fulcrum

The file you want is something like the info.u file eg. ACEdll.u and ACEdllinfo.u I'm sure you'll find it. Surprisingly the settings you want are not in the .int files or defaultproperties of the actor. It has a function with the settings embedded which are replicated to the player's nploader. This will give you a field to write the site you want to direct your linux clients to. But I don't see why, not even ACE makes use of .so files (not that I can remember anyway). In the case of anti-cheats the dll files are only required because of file-legitimacy checks and don't actually serve a purpose other than that. In author's defense it would be easier coding-wise to treat all clients the same at some points like the start of loading the anti-cheat. And then you have other mods that are going to want to check over the player's loaded packages etc, it is much easier to only start the separation towards the end of the coding and when you really know what direction you are taking it in

It's been a while since I have used C++ functions from within a player's gameclient, and method we were using was different because this was before the nploader method. But feel free to correct me. By the way, if you do want to contact the author for clarification. Go on IRC to quakenet and ask for him

Also Fulcrum, a lot of people here will be wondering what you are building so please feel free to share
Fulcrum
Novice
Posts: 24
Joined: Wed May 30, 2012 2:03 pm

Re: NPLoader help

Post by Fulcrum »

Hey billybill, thanks for your reply.

I'm coding native because I'm trying to make an anti-cheat package
for cheats such as speedhacking and macro usage. (BUNNYTRACK!)
ACE doesn't provide protection against that.

I've tried detecting speedhacks using uscript alone, but it doesn't seem to work
for speedhacks that only make you go 1% faster. Because uscript timer functions
ain't precise enough. What I tried to do was the following.
1. settimer(30.0, True)
2. Check if the time between 2 Timer functions is 30 seconds using
Level.Millisecond and Level.Second.
The values I get back variate between 25 and 30. So not rly useful.

I've done a native implementation for macro detection (doesn't detect all macro's though)
and speedhack detection. I've tested both and they seem to work quite well.

My goal is to make my package work with nploader so I can begin testing it online with real users.


So basicly I want 2 packages. 1 package that gets loaded by every client.
Then another one that only gets loaded on windows clients and I'd like to be able
to call functions from the 1st package of the 2nd package.

I've got the nploader info uc file you're talking about.
In it it says something about a dll loader package. So I'm kinda stuck there already.
Basically I'm kind of stuck at how I should structure this whole project.
UT99.org

Re: NPLoader help

Post by UT99.org »

billybill wrote:not sure if you are talking about CPU speedhacks or timedilation. I thought the timedilation could be stopped with pure and the CPU one could probably set records but more likely to be a pain in the ass for the player who is experiencing it. Loading it should be a piece of cake really, both ways to do it, and then re calling functions from it there are plenty of examples out there. Let us know exactly what you are having trouble with and I'll take a look
Fulcrum
Novice
Posts: 24
Joined: Wed May 30, 2012 2:03 pm

Re: NPLoader help

Post by Fulcrum »

I'm talking about both speedhacks ways.

I just tested utpure and it doesn't seem to stop a thing.
(fyi: speedhacks that make you go like 1% faster are already a problem in BT)

So yes the only thing I need is a good example on how to structure my project.
Do you have any in mind? :D

BTW: this is my first uscript project.
UT99.org

Re: NPLoader help

Post by UT99.org »

billybill wrote:Really? I would've thought you could set their timedilation to the correct value without using a DLL. However, someone with a speedstep cpu will still have issues albeit impossible to play. I like that you have decided to go with NPLoader as you would be the first aside from ACE to do this, and it is much cleaner, no rebooting the client's UT, no saving servers to favourites

To convert your DLL to a .u file you need to make a dummy actor which declares the DLL as a musicfactory. to later be seperated again as dlls by the clients nploader

Next you need to make another actor, this one for nploader to read the settings of. This one will run serverside only. this is the one I talking about earlier. Goes something like this:
class ACEInfo extends Actor;

var string ModName;
var string ModDLLName;
var string ModSOName;
var string ModDLLLoaderName;
var string ModSOLoaderName;
var string ModPkgDescriptor;
var string ModLicense;
var string ModAuthor;
var string ModDesc;
var string ModDLLURL;
var string ModSOURL;
var string ConflictingClasses;
var string ConflictingActors;
var string ConflictingPackages;
var string RequiredActors;
var string RequiredPackages;

function PostBeginPlay ()
{
ModName = "YourModname";
ModDLLName = "YourDLLname.dll";
ModDLLLoaderName = "YourDLLname.u";
ModPkgDescriptor = "";
ModLicense = "";
ModAuthor = "Your Name";
ModDesc = "AntiCheatEngine for Unreal Tournament 99";
ModDLLURL = "http://url.to.dll.manual.install(.dll)";
ConflictingClasses = "";
RequiredActors = "";
RequiredPackages = "YourModName";
}

function string GetItemName (string FullName)
{
switch (Caps(FullName))
{
case "GETMODNAME":
return ModName;
case "GETMODDLLNAME":
return ModDLLName;
case "GETMODDLLLOADERNAME":
return ModDLLLoaderName;
case "GETMODAUTHOR":
return ModAuthor;
case "GETMODDESC":
return ModDesc;
case "GETMODDLLURL":
return ModDLLURL;
case "GETMODSONAME":
return ModSOName;
case "GETMODSOLOADERNAME":
return ModSOLoaderName;
case "GETMODSOURL":
return ModSOURL;
case "GETMODPKGDESC":
return ModPkgDescriptor;
case "GETMODLICENSECLASS":
return ModLicense;
case "GETCONFLICTINGCLASSES":
return ConflictingClasses;
case "GETCONFLICTINGACTORS":
return ConflictingActors;
case "GETCONFLICTINGPACKAGES":
return ConflictingPackages;
case "GETREQUIREDACTORS":
return RequiredActors;
case "GETREQUIREDPACKAGES":
return RequiredPackages;
case "GETINFOVERSION":
return "3";
default:
}
return "";
}
Then create your NPLoader.ini. I am going from memory for this part but I believe all you do is add the DLL and .u files into the server's System folder and add the correct serverpackages with nploader detecting the rest once you add nploader into serveractors and packages. And be sure to add your mymoddll.u file into the serverpackages

As for the Uscripted part that reads the DLL client settings, the replication would be entirely uscripted for what you are doing, no extra ports open like on ACE. And so you will want to study up on how replication works in uscript

And finally, as with using DLLs in anything you will want to look at how to call upon functions, for this I would suggest looking at the interaction on a uscript music player, qvalidate or anything else you can find


Let me know how far along you are if you get stuck. Did you know that ACE is already meant to handle speedstep? Nonetheless I'm all for seperating HWID, External hook protection, speedstep etc into different DLLs
Fulcrum
Novice
Posts: 24
Joined: Wed May 30, 2012 2:03 pm

Re: NPLoader help

Post by Fulcrum »

Thanks. This information will help certainly help me. :)
I will report back when I've gotten farther.
Fulcrum
Novice
Posts: 24
Joined: Wed May 30, 2012 2:03 pm

Re: NPLoader help

Post by Fulcrum »

Well I've got it to work with NPLoader.
I've tested it on a dedicated windows server with a windows client and that works.

Now I'm trying to put my mutator on a linux server, but I'm having an issue. (I'll fix linux clients later)

Code: Select all

StartMutator: BTACv1.BTAC
appError called:
Can't bind to native class BTACv1.BTACCore
Executing UObject::StaticShutdownAfterError
[SCF] Server Shutdown
Should I only spawn the native class BTACCore on the clients?

Grts :)
UT99.org

Re: NPLoader help

Post by UT99.org »

billybill wrote:you shouldn't have the server call the dll at all. what you are probably better off doing is having the client then replicate whatever is returned from those calls back to the server. I'm not totally sure if you are simply detecting irregularities or preventing them (Anthrax supposedly did this). Maybe a Uscript coder here will lend you a hand replicating the values of whatever it is, whether the check has been done true false, and what OS the client is. I'll be back in a few days if not
User avatar
anth
Adept
Posts: 257
Joined: Thu May 13, 2010 2:23 am

Re: NPLoader help

Post by anth »

Your native class is probably flagged as RF_LoadForServer. My obfuscator used to remove this flag from all native classes to prevent this from happening. You should be able to remove the flag using a package editor such as UTPT. There are other ways to deal with this problem but removing the flag is by far the easiest.
Fulcrum
Novice
Posts: 24
Joined: Wed May 30, 2012 2:03 pm

Re: NPLoader help

Post by Fulcrum »

How do you make the server not call the dll? By unsetting the RF_LoadForServer flag on the native class right?

I've checked out UTPT but I only seem to be able to view information, not edit it.
UTPT doesn't give me the exact offsets to the flags, so I can't hex-edit either.

edit:
http://utdatabase.99k.org/files/ut99/to ... geEdit.zip does the job.

edit2:
Ok it doesn't do the job. It messes up the package. :/ Bugged package editor.
UT99.org

Re: NPLoader help

Post by UT99.org »

billybill wrote:Well I can't help you with that. Whatever method you are using to detect this serverside it sounds like it's going to be really good. Or do you guys just know something I don't. I mean a fake DLL file can send whatever information you want it to send to the server right?, you only have to see what is called and return the correct values
Post Reply