anyone able to build a >> Player Connected mod

Search, find and discuss about Mutators!
Post Reply
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

anyone able to build a >> Player Connected mod

Post by Wises »

just wondering if any Dev's have a bit of time to zap up a simple mod which does the following;

~ Basically when New Players connect to a Server , the following happens in the .log file;

Code: Select all

DevNet: Login request: Index.unr?Name=pentium?Class=BotPack.TMale2?Team=0?skin=SoldierSkins.blkt?Face=SoldierSkins.Othello?Voice=BotPack.VoiceMaleTwo?OverrideClass=
Then they are sent 1/2 dozen files slow / fast / medium paced.. taking up several minutes.

in this time there is likely to be another player on the server *Waiting for Players* but also oblivious to the fact that anyone is trying to join in and play.

soo what Iam requesting is a simple mod which perhaps based on the above info.. would "output to screen" either chat or mid screen in large letters.. Player "Player_Name" is connecting.. , Please wait"

also .. if there is some way perhaps by IP_Connect to detect if .. the same player Disconnects because perhaps too long to wait.. and Again a small Message appears on screen ... "Player Player_Name disconnected from server".. followed by perhaps a 3rd condition if said player reconnects ... "Player Player_Name once more connected to server."

anyways yes.. something like this would be greatly appreciated.

it may hold the balance between the server filling up... or staying empty..
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: anyone able to build a >> Player Connected mod

Post by Higor »

There are some minimum requirements if you want to do this cleanly (no text parsing functions, faster code, no crash risk from retrieving a huge string on a server with lots of players).
Btw nice app, this makes replies a lot easier to understand.
Image
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: anyone able to build a >> Player Connected mod

Post by Wises »

sounds promising :tu:

glad you found app useful.. there are others.. dia & Pencil but if it works ok then awesome.. Good thing is that it can be used to link to GoogleDrive account which can then also be shared collaboratively I guess.

also for MindMapping FreeMind is quite useful ;)
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: anyone able to build a >> Player Connected mod

Post by Higor »

BTW, I'm adding dynamic array accessors to XC_GameEngine in a way they'll be able to be coded into UnrealScript with ease.

This test actor works perfectly on my Dev build:

Code: Select all

class TestArray expands Actor;

var() array<int> IntAr;
var() array<string> StrAr;
var() const array<int> ConstTest;

event PostBeginPlay()
{
	IntAr[0] = 25;
	IntAr[1] = 23;
	StrAr[2] = "Test";

	Array_Length_Int(IntAr,5);
	Array_Length_Int(IntAr,2);
	Array_Length_Int(IntAr,-2);
	Array_Length_Int(ConstTest,0);
	Array_Insert_Int(IntAr, 1, 2);
	Array_Insert_Int(ConstTest,0);
	Array_Remove_Int(IntAr, 1, 2);

	log("Int size: "$Array_Length_Int(IntAr)$", Str size "$Array_Length_Str(StrAr) );
}

native(640) static final function int Array_Length_Int( out array<int> Ar, optional int SetSize);
native(640) static final function int Array_Length_Str( out array<string> Ar, optional int SetSize);

native(641) static final function bool Array_Insert_Int( out array<int> Ar, int Offset, optional int Count );
native(641) static final function bool Array_Insert_Str( out array<string> Ar, int Offset, optional int Count );

native(642) static final function bool Array_Remove_Int( out array<int> Ar, int Offset, optional int Count );
native(642) static final function bool Array_Remove_Str( out array<string> Ar, int Offset, optional int Count );
Now I bet you wonder why are we defining various native functions with an opcode (640), but a non-native package.

== It's like this:
When you define the native function with an opcode number, the compiler won't append the function call to the compiled code but instead the opcode number directly.
This means that if the opcodes 640, 641, 642 happen to be defined in the internal GNatives table, they'll be executed.
XC_GameEngine defines all three opcodes plus the opcode 10 which is the dynamic array accessor (EX_DynArrayElement) which is represented by [].
Since the native code in XC_GameEngine for 640, 641, 642 works independantly of array type, you can define the Array_Insert_blablah function with any type you want and then use it on the same class you're working on :!: .

Also why 640, 641 and 642?

Unreal 227i definitions, this means the compiled code is cross-compatible with 227i and vice-versa.

Code: Select all

native(640) static final function int Array_Size( out array<template> Ar, optional int SetSize );
native(641) static final function bool Array_Insert( out array<template> Ar, int Offset, optional int Count );
native(642) static final function bool Array_Remove( out array<template> Ar, int Offset, optional int Count );
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: anyone able to build a >> Player Connected mod

Post by Wises »

soo ^^ now that this is embedded in XCGE could you also add example Uscript code for the Playerjoin scenario above so that we can see how to use this?
hehe.

Awesome work though keep it up ;)
Post Reply