Mutator Toolbox's ini is MTB.ini - sektor2111's LoadWeapon is great and works well.Aldebaran wrote:@OjitroC
Mutator Toolbox V2.0 seem not to have an ini file to store the values, so I think it will not work fine on a server.
AllWeaponsFullyLoaded mutator
-
- Godlike
- Posts: 3494
- Joined: Sat Sep 12, 2015 8:46 pm
Re: AllWeaponsFullyLoaded mutator
-
- Masterful
- Posts: 672
- Joined: Thu Jan 28, 2016 7:30 pm
Re: AllWeaponsFullyLoaded mutator
Ok sorry, I have overlooked it. It does not exists in the Installationpackage.OjitroC wrote:Mutator Toolbox's ini is MTB.ini
-
- Godlike
- Posts: 3494
- Joined: Sat Sep 12, 2015 8:46 pm
Re: AllWeaponsFullyLoaded mutator
I was looking for ages for something like MutatorToolbox.ini then suddently thought it might be abbreviated - I think the ini is created when the mutator is first run/configured.Aldebaran wrote: Ok sorry, I have overlooked it. It does not exists in the Installationpackage.
-
- Godlike
- Posts: 10340
- Joined: Wed Jul 15, 2009 11:36 am
- Personal rank: coffee addicted !!!
- Location: Cologne, the city with the big cathedral.
Re: AllWeaponsFullyLoaded mutator
Thanks sektor2111 for this awesome little tool.
Can I add more weapons into the ini?
Can I add more weapons into the ini?
-
- Godlike
- Posts: 6313
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: AllWeaponsFullyLoaded mutator
Will not going to work - this is for 1 weapon as quoted in request. If such things are needed in community I'll think at let's say 16 weapons and ammo - so to speak a small array...papercoffee wrote:Can I add more weapons into the ini?
Edit:
Or not a small array. Maybe admins wants to load... a crash. I think a dynamic array should be cute enough. Of course I don't know if loooong strings deals are healthy but... ini file might go like this:
Code: Select all
[LoadWeaponM.LoadWeapon]
AWeapon=BotPack.PulseGun
AWeapon=BotPack.UT_Eightball
AWeapon=
AnAmmo=BotPack.PAmmo
AnAmmo=BotPack.RocketPack
AnAmmo=
AmmoScale=3.000000
-
- Godlike
- Posts: 6313
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: AllWeaponsFullyLoaded mutator
All right, I think is time for more than "AllWeapons". I went to an evening walk through Wiki and probably it did not help, a half of things there are... FALSE somehow.
https://wiki.beyondunreal.com/Dynamic_arrays
If you need a loader like that I'll share it. For the moment you can run into a compiling spree with this code - and which you can change in a different way and I'm curious about results:This thing is called by me LoadWeaponM - M comes from "Multiple". And this is my test INI file:
Empty spaces are helping game-log for no errors, else there can be 2 warnings about passing over array boundaries.
@Papercoffee
In this "M" version you can add a lot of weapons...
Edit: In other topic I'll show another confusing information from Wiki which I found while I was looking around.
https://wiki.beyondunreal.com/Dynamic_arrays
The truth (I love it) is that you can ACCESS such an array not really to modify it - I'm speaking about an INI file as above looking as default INI containing "ServerPackages" "ServerActors" dynamic arrays that can be edited from preferences and read using natives. The mutator which I want to show is capable of reading these from INI using UnrealScript - read again - UnrealScript if array is being written a bit "nice" - as in above sample and that can be written from Game's Menu using power of natives. Problem comes at end of array - condition to stop reading. When array is copied in a string value you can scan how many commas are there. But how long is this string and how well does this work ? I don't know, so I prefer a simple format making a cute INI. Array limit is unknown by me right now because I'm not gonna write all weaponry from UT in there and ModifyPlayer probably will take ages and crashing. In exchange we can set 2 or 6 or 12 weapons or more, that can be loaded by player at once with some initial scaled ammo accordingly.Wiki wrote: ... The type declaration syntax was available (almost) from the start, but Unreal Engine 1 never provided any way to actually access or modify them at the UnrealScript level.
If you need a loader like that I'll share it. For the moment you can run into a compiling spree with this code - and which you can change in a different way and I'm curious about results:
Code: Select all
class LoadWeapon expands Mutator config (LoadWeapon);
var() config array<string> AWeapon;
var() config array<string> AnAmmo;
var() config float AmmoScale;
var bool bEnabled;
var int i, k;
const version="1.00";
event PostBeginPlay()
{
i = 0;
log ("LoadWeapon version"@version@attempt initialization process...,'LoadWeapon');
if ( AmmoScale <= 0.2)
AmmoScale = 0.2;
DoInit();
Done:
if ( bEnabled )
log (Self.Name@has been Initialized.,'LoadWeapon');
else
log (Self.Name@has encountered a bad configuration, it will not load anything...,'LoadWeapon');
}
final function DoInit()
{
local bool bKeepGoing;
local class<Weapon> W;
local class<Ammo> A;
Top:
W = class<Weapon>( DynamicLoadObject(AWeapon[i], class'Class', True) );
if ( W != None )
{
bKeepGoing = True;
}
else
{
bKeepGoing=False;
}
A = class<Ammo>( DynamicLoadObject(AnAmmo[i], class'Class', True) );
if ( A == None )
{
bKeepGoing=False;
}
if ( bKeepGoing )
{
W = None;
A = None;
i++;
bEnabled = True;
}
else
GoTo Initialized;
GoTo Top;
Initialized:
k = i;
}
function ModifyPlayer (Pawn Other)
{
local class<Ammo> Am;
local class<Weapon> Wp;
local Ammo A;
local Weapon W;
if ( Other.PlayerReplicationInfo == None && Other.bIsPlayer )
GoTo FagitronSet;
if ( bEnabled )
{
for ( i = 0; i < k+1; i++ )
if ( !Other.bHidden )
{
Am = class<Ammo>( DynamicLoadObject(AnAmmo[i], class'Class', True) );
if ( Am != None )
{
A = Spawn (Am,,,Other.Location,Other.Rotation);
if ( A != None )
{
A.RespawnTime = 0.00;
A.AmmoAmount *= AmmoScale;
A.Touch(Other);
}
}
Wp = class<Weapon>( DynamicLoadObject(AWeapon[i], class'Class', True) );
if ( Wp != None )
{
W = Spawn(Wp,,,Other.Location,Other.Rotation);
if ( W != None )
{
W.RespawnTime = 0.00;
W.Touch(Other);
}
}
Am = None; A = None; Wp = None; W = None;
}
}
Super.ModifyPlayer(Other);
FagitronSet:
//Ruin chain for shite
}
defaultproperties
{
AmmoScale=2.000000
}
Code: Select all
[LoadWeaponM.LoadWeapon]
AWeapon=BotPack.PulseGun
AWeapon=BotPack.UT_Eightball
AWeapon=BotPack.UT_FlakCannon
AWeapon=
AnAmmo=BotPack.PAmmo
AnAmmo=BotPack.RocketPack
AnAmmo=BotPack.FlakAmmo
AnAmmo=
AmmoScale=20.000000
@Papercoffee
In this "M" version you can add a lot of weapons...
Edit: In other topic I'll show another confusing information from Wiki which I found while I was looking around.
-
- Godlike
- Posts: 10340
- Joined: Wed Jul 15, 2009 11:36 am
- Personal rank: coffee addicted !!!
- Location: Cologne, the city with the big cathedral.
-
- Godlike
- Posts: 6313
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: AllWeaponsFullyLoaded mutator
Yeah, here is the evidence...papercoffee wrote:So it is possible ...nice!
[attachment=0]LoadWeaponM.7z[/attachment]
Edit: What I was reading there was describing that dynamic arrays cannot be used in replication. Perhaps another incomplete answer. I think I can read them in a slower state code, copying values to another string variable non-array and... happily sending it to clients... but it's a work which I don't see useful for wasting time, unless some "unlimited" MapVote will be a goal for coders... not 1023, not 2048 but... 20000 should be enough for player playing 20 minutes in a server... and reading maps for 30 minutes...

You do not have the required permissions to view the files attached to this post.
-
- Adept
- Posts: 308
- Joined: Fri May 10, 2019 6:15 am
-
- Godlike
- Posts: 6313
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: AllWeaponsFullyLoaded mutator
Not all UT versions are supporting this method, I'm currently using another method for dynamic arrays supported properly by XC_Engine - no crashes.