Page 1 of 1

Looking for some help with coding windows

PostPosted: Sun Mar 04, 07 3:11 am
by Ayleth
this is a cross post from the scripting society.

"basically, i want to make a window for my admintool project... right now its using an akward combination of clicks and keys to access the different functions, but now that i think about it, a nicely organised window created via "mutate admin" or some jazz like that would be 100% better. I took a look at the viewable source from the dxmapvote mutator, but all the UnknownFunction119's etc, are all throwing me for a loop. does anyone have an idea what to do? Thx."

Here is my latest plan:

Code: Select all
Categories:
----------------------
Player Info
-To select player: Enter ID, press LOAD PLAYER, press UPDATE PLAYER to save changes
-To be displayed: Current Name, ID, IP, Scores, Team, PlayerList incl ID
-To be acted out: Kill, Ban, Kick, Summon Player to Owner, Teleport to Player,
        Toggle AutoAdmin and AdminCPanel Access, Reset Scores
-To be changable: Name, Team, Scores

Server Info
-To be displayed: Current Augs, Speed, Players Incl Teams
-To be acted out: Reset All Scores, Make Global Announcement, Make All 1 Team,
        Randomise Teams, Reload Map
-To be changable: Augs, Speed  >> Saved by UPDATE SERVER button

Buttons needed:
----------------------
Player Info
-Load Player
-Update Player
-Kill
-Ban
-Kick
-Summon Player
-Tele to Player
-Toggle AutoAdmin
-Toggle AdminCPanel
-Reset Scores

Server Info
-Refresh
-Reset All Scores
-Send Announcement
-Unify Teams
-Randomise Teams
-Reload Map
-Update Server

Text boxes needed:
----------------------
Player Info
-ID (to load player)
-Kills
-Deaths
-Streak

Server Info
-Initial Augs
-Augs per Kill
-Server Speed
-Announcement Text

PostPosted: Sun Mar 11, 07 7:25 am
by Ayleth
So no one can/wants to help? Guys, im REALLY feeling unloved here. And a lil pissed off too. At LEAST POST something.

PostPosted: Sun Mar 11, 07 8:45 am
by VodunLoas
Well I don't think anyone here is good at doing windows. It is one of the hardest things to code.

PostPosted: Sun Mar 11, 07 8:52 am
by Ayleth
LOL... ok i feel a lil better now that ppl actually READ what i post. Thing is, im told Daedalus, MainMan, and others (not to mention Allan did windowing in his TempBan Mut) know a lil of Windowing... ive pmed/talked with them, and Dae never seems to have time, Nobody either, and MM and Allan, they haven't responded to PMs. -.-

PostPosted: Sun Mar 11, 07 9:47 am
by Allan
{M}asamune wrote:LOL... ok i feel a lil better now that ppl actually READ what i post. Thing is, im told Daedalus, MainMan, and others (not to mention Allan did windowing in his TempBan Mut) know a lil of Windowing... ive pmed/talked with them, and Dae never seems to have time, Nobody either, and MM and Allan, they haven't responded to PMs. -.-
I'd be glad to help, but i've lost the source for MMTempBan... X_X

I guess I could have a look at how the main-menu screen is invoked, and do something based off of that.

PostPosted: Sun Mar 11, 07 9:53 am
by Ayleth
i want it to be more of a mutator called window, not a window as i understand that may involve using a new gameclass?? Or am i wrong? anyway... I have a decompiled ver of your tempban, but has unknownfunctions in the spots where i don't need em. i figured a FEW out, but theres others i cant decode. will email upon request.

PostPosted: Sun Mar 11, 07 10:09 am
by Alex
Getting the actual function out of UnknownFunction is easy. An UnknownFunction is a native function. It has a number, UnknownFunction[NUMBERHERE] right?

Well, look into the parent classes of the actor, and look for a native function like this:

native(NUMBER) function stuff.

We take a small example:

This is taken from MTLPlayer.uc
Code: Select all
event Possess ()
{
   local bool VAA;
   local DeusExRootWindow VAB;

   Super(PlayerPawn).Possess();
   NetPriority=Default.NetPriority;
   V89=True;
   UnknownFunction1052();


MTLPlayer extends Human, we look into Human.uc, search for "1052", and we find nothing.
Human extends DeusExPlayer, we look into DeusExPlayer.uc, search for "1052", and we find nothing.
DeusExPlayer extends PlayerPawnExt, we look into PlayerPawnExt.uc, search for "1052", and we find this:
Code: Select all
native(1052) final function InitRootWindow();


There we have our function!
Then, the example becomes this:

Code: Select all
event Possess ()
{
   local bool VAA;
   local DeusExRootWindow VAB;

   Super(PlayerPawn).Possess();
   NetPriority=Default.NetPriority;
   V89=True;
   InitRootWindow();

PostPosted: Sun Mar 11, 07 10:20 am
by Ayleth
ahhh... ok thx!
i had thought about that (about the number being back referanced, but not about it being defined natively) but to tell you the truth, i didn't look into it. Better trust my instincts from now on lol. THX

PostPosted: Tue Mar 13, 07 3:05 pm
by ~ô¿ô~Nobody~
hmm, i should make some unknown function replacer programm :lol:

PostPosted: Tue Mar 13, 07 10:09 pm
by Ayleth
Nobody, im sure many of us re-coders would worship you for that!!! Esp those of us who lose our source (randomly points finger).