I have taken over the AdminUtils mutator project

All about Chaos for Unreal... (UT3, UT2004, UT2003, UT)
Rythmix
Posts: 495
Joined: Mon Apr 26, 2004 6:26 am

I have taken over the AdminUtils mutator project

Post by Rythmix »

After discussing and working on implementing changes to the AdminUtils Mutator that jamie1224 and mKhaos7 have created, It has been handed over to me. ( see here: http://www.ataricommunity.com/forums/sh ... ost5495389 )

I have already implemented some changes and currently using it on my server, I will have download sometime this afternoon for it, and most likely a new name.

Current New features are:

TempAdminOff - Now has the ability to enable AND disable Admin status
ChangeName - Change the name of a player if they have a vulgar name of some sort(ex. admin changename butthead11 NiceGuy11)
MeleeLoaded - Loaded with All Melee Weapons
ChaosLoaded - Loaded with All Chaos Weapons

the bottom 2 are hard coded but will be changed to read from an ini file to work dynamically with all mods. The 2 Chaosloaded and meleeloaded command are equivalent to the MadFragger and MadMelee commands.

This opens doors to test how Duel would play if we started with all melee weapons and got to switch to the melee weapon based on who you were fighting.
Read more at http://www.ataricommunity.com/forums/sh ... ost5495389 for other new features I will be adding.

Stay Tuned for the Download!
Rythm is Gonna Get Ya!
General_Sun
Posts: 446
Joined: Wed Jun 23, 2004 10:51 pm
Contact:

Post by General_Sun »

2 thumbs up
High Council member of The Generals
Image
The_0men
Posts: 165
Joined: Thu Aug 19, 2004 10:31 pm

Post by The_0men »

YEY! finaly cross bows and napalm grenades, slowmo mode and invasion monsters!......*drooles* plzzzzzzzzzz let it be reality!
666

~ The 0men ~
Rythmix
Posts: 495
Joined: Mon Apr 26, 2004 6:26 am

Post by Rythmix »

The_0men wrote:YEY! finaly cross bows and napalm grenades, slowmo mode and invasion monsters!......*drooles* plzzzzzzzzzz let it be reality!
lol those are already in there!
Rythm is Gonna Get Ya!
AA/unreality
Posts: 49
Joined: Sat Jul 03, 2004 5:46 am

Post by AA/unreality »

-dreams off killing warlords with a melee weap
jb
Posts: 9825
Joined: Fri May 03, 2002 12:29 am
Location: Coral Springs, FL
Contact:

Post by jb »

cool!

So you doing melee invasion or you want us too? We do have DOC monsters we can add to go with this :)
Jb
Shadowstar
Chaotic Dreams Team
Posts: 3290
Joined: Sun Apr 06, 2003 6:22 am
Location: Arizona
Contact:

Post by Shadowstar »

Technically melee invasion is already possible but you have to go through some rather unofficial methods to do it... Dont ask me to tell you how.
Kaboodles
Posts: 995
Joined: Fri Mar 05, 2004 3:36 am
Location: Roanoke, VA

Post by Kaboodles »

We've already spawned the DoC monsters, but it's not too much fun since they're all unarmed :? .

Plus, we can't seem to get rid of those pesky skeleton dust things.
High Council member of The Generals
Image
Rythmix
Posts: 495
Joined: Mon Apr 26, 2004 6:26 am

Post by Rythmix »

Sorry for the delay, I almost got the "read weapons for loaded from the INI" working, but while doing that, I thought of another feature.. now you can give a player a particular weapon one at a time.
the new command:
- GiveItem: Give a single weapon to a player, Im also going to try to add giving items like adrenaline powerups, shield/double damage pickups, and perhaps even chaos relics, also configurable from the ini file. thats 5 new functions so far.. and I have a few more in the works, please let me know if you think of any! I will release this new version shortly.
Rythm is Gonna Get Ya!
Shadowstar
Chaotic Dreams Team
Posts: 3290
Joined: Sun Apr 06, 2003 6:22 am
Location: Arizona
Contact:

Post by Shadowstar »

I love Adminutils! It's great for doing dev stuff on my personal server.
Rythmix
Posts: 495
Joined: Mon Apr 26, 2004 6:26 am

Post by Rythmix »

Calling all Devs...

I cant figure this out. I've searched all over the wiki and can't figure this out. Im trying to read from the ini file a dynamic array called 'WeaponName'
so the ini file would read:

[AdminPlus.UltraAdmin]
WeaponName=chaosut.claw
WeaponName=chaosut.cutter
.
.
.
WeaponName=custom.weaponclass

you get the idea... its meant for giving loaded for any custom weaponclasses that a particuliar mod might have available, but instead of hardcoding 500 different mods, I want to read from the ini.
so here is the code:

Code: Select all

//=========================
class UltraAdmin extends Admin;

var config array<string> WeaponName;

//=========================

exec function CustomLoaded(string target)
{
    local Inventory Inv;
    local Mutator myMut;
    local Pawn p;
    local int i;
            
    myMut = findMut(Level.Game.BaseMutator, class'AdminPlus.MutAdminPlus');
    
        p = verifyTarget(target);
            if (p == none)
               return;

            for (i = 0; i < class'AdminPlus.UltraAdmin'.default.WeaponName.Length; i++) {
                P.Giveweapon(WeaponName(i));
            }
	  
            AllAmmo(P);
            For ( Inv=P.Inventory; Inv!=None; Inv=Inv.Inventory )
                if ( Weapon(Inv) != None )
        				Weapon(Inv).Loaded();
       	}
   	}
}

now the rest of the code is a direct copy from the normal 'working' LOADED function so dont worry about that. The code snippet from above that is getting the error is in the for loop here:

Code: Select all

for (i = 0; i < class'AdminPlus.UltraAdmin'.default.WeaponName.Length; i++) {
                P.Giveweapon(WeaponName(i));
            }
the error i get during compile is:
D:\Games\UT2004\AdminPlus\Classes\UltraAdmin.uc(684) : Error, Call to 'Giveweapon': type mismatch in parameter 1

The For loop is getting no error, and I know the GiveWeapon function calls for a string.. and its clearly marked under the class:
var config array<string> WeaponName;

but its giving me a mismatch in the parameter and I can't figure out why. Ive looked at the way chaos guys call the spraypaints from the ini file and it looks very similar. Can anybody see the problem here? In defaultproperties i have:

WeaponName="xweapons.redeemer"


Any help at all would get this baby out the door for its first release under my new ownership.
Rythm is Gonna Get Ya!
Shadowstar
Chaotic Dreams Team
Posts: 3290
Joined: Sun Apr 06, 2003 6:22 am
Location: Arizona
Contact:

Post by Shadowstar »

If I was a coder, I'd probably know what to tell you...

Anyway, I'll see if I can get one of the brains to help out.
jb
Posts: 9825
Joined: Fri May 03, 2002 12:29 am
Location: Coral Springs, FL
Contact:

Post by jb »

Sorry ryth,

I was busy and did not get back to you right away.

Did you every load weaponname as that array will be empty till you fill it with something? I am guess you didnt but dont have all of your code so I could be wrong.

Anyways read them from the ini file like so:
P.Giveweapon(class'AdminPlus.UltraAdmin'.default.WeaponName);

You also may want to read them into new var (or the same one) only once during the game. That way you dont have to re-read the list every time a new player spawns...
Jb
Rythmix
Posts: 495
Joined: Mon Apr 26, 2004 6:26 am

Post by Rythmix »

jb wrote:Sorry ryth,

I was busy and did not get back to you right away.

Did you every load weaponname as that array will be empty till you fill it with something? I am guess you didnt but dont have all of your code so I could be wrong.

Anyways read them from the ini file like so:
P.Giveweapon(class'AdminPlus.UltraAdmin'.default.WeaponName);

You also may want to read them into new var (or the same one) only once during the game. That way you dont have to re-read the list every time a new player spawns...


jb you beautiful person! It works perfectly!! and it makes sense! Thank you so much. Let me see if I understand your idea about the new var. i should set the read weaponname array to another variable array and load it from there correct?
something like:

var array<string> weaponarray

weaponarray()=(class'AdminPlus.UltraAdmin'.default.WeaponName())
P.Giveweapon(weaponarray(i));

?? something like that?

also on an unrelated matter, is there a way to pull the value from a string? such as the val() function in VBasic: (i.e.:

sStringName = "12"
iValue = val(sStringName)
iValue = 12 <----- integer
Rythm is Gonna Get Ya!
jb
Posts: 9825
Joined: Fri May 03, 2002 12:29 am
Location: Coral Springs, FL
Contact:

Post by jb »

Rythmix wrote: jb you beautiful person! It works perfectly!! and it makes sense! Thank you so much. Let me see if I understand your idea about the new var. i should set the read weaponname array to another variable array and load it from there correct?
something like:

var array<string> weaponarray

weaponarray()=(class'AdminPlus.UltraAdmin'.default.WeaponName())
P.Giveweapon(weaponarray(i));

?? something like that?

also on an unrelated matter, is there a way to pull the value from a string? such as the val() function in VBasic: (i.e.:

sStringName = "12"
iValue = val(sStringName)
iValue = 12 <----- integer
About that last one, there are some string functions but NOT that one, IIRC.

About the var, you can use the same name, you have now.

Code: Select all

         for (i = 0; i < class'AdminPlus.UltraAdmin'.default.WeaponName.Length; i++)  
           WeaponName(i)=class'AdminPlus.UltraAdmin'.default.WeaponName(i); 
             
Do this once (say in the postbeginplay, something like that...then in your CustomLoaded function, tweak it to do this:

Code: Select all

            for (i = 0; i < WeaponName.Length; i++) { 
                P.Giveweapon(WeaponName(i)); 
            } 
The idea was is you dont want to re-read the list every time from the server ini file. Just do it once. However by doing this, you would have to resart the current game to get any new changes you made to the weapon list...so... :)
Jb
Post Reply