Results 1 to 6 of 6
  1. #1

    Lightbulb How to set up a working ini file?

    Hi all.

    I have just started with UScript, I have some basic knowledge for it already since I tried to mod for UT2k4.
    But now Im going to create a Gametype for UT3, it will include levels, weapon changes and some other stuff.
    Currently I haven't really done much since im messing around with the .ini file so anyone can change the settings of the game.
    This is what I currently have done:

    GunEvolve.uc
    Code:
    class GunEvolve extends UTDeathmatch
    	config(GunEvolve);
    
    struct WeaponInfo 
    { 
      var string Weapon;
    };
    var config array<WeaponInfo> WeaponPath;
    var config bool          bImpactHammer;
    
    function PostBeginPlay()
    {
      local int i;
    
      Super.PostBeginPlay();
      i=0;
    
      DefaultInventory.Remove(0, DefaultInventory.Length);
      if(bImpactHammer == true){
        DefaultInventory[i] = Class'UTGame.UTWeap_ImpactHammer';
        i++;
      }
      DefaultInventory[i] = Class<UTWeapon>(DynamicLoadObject(WeaponPath[0].Weapon, class'Class'));
      i++;
    }
    GunEvolve.ini
    Code:
    [GunEvolve.GunEvolve]
    bImpactHammer=false
    WeaponPath=(Weapon="UTGame.UTWeap_LinkGun")
    
    [GunEvolve UTUIDataProvider_GameModeInfo]
    GameMode=GunEvolve.GunEvolve
    DefaultMap=
    GameSettingsClass=UTGameSettingsDM
    GameSearchClass=
    OptionSet=DM
    FriendlyName=GunEvolve
    Description=
    PreviewImageMarkup=
    Prefixes=DM
    IconImage=
    bIsCampaign=False
    IconU=0.000000
    IconV=0.000000
    IconUL=0.000000
    IconVL=0.000000
    bRemoveOn360=False
    bRemoveOnPC=False
    bRemoveOnPS3=False
    Basically nothing happens, I still spawn with a impact hammer and a enforcer.
    At some point when messing around I got myself spawning without weapons at all so the DefaultInventory.Remove(); seems to work. But not anymore :S.

    Any help will be greatly appreciated!
    Last edited by Pzych0; 05-04-2008 at 08:09 AM.

  2. #2
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Posts
    118

    Default

    Try renaming that to DefaultGunEvolve.ini instead.

  3. #3
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Location
    Paris
    Posts
    98

    Default

    In UT3, All Ini files have the Prefix UT.
    You should first compile your sources, it will create UTGunEvolve.ini automatically. Then you just need to modify it.

  4. #4

    Default

    Oh, thanks ^^

    Well, the "[GunEvolve.GunEvolve]" is right, isn't it?

    Gah, I still see no difference. I still spawn with a Impact Hammer whatever I do.
    Since I already have my code here, what would be the best way to make me able to configure the weapons you spawn with?

  5. #5

    Default

    you may not be able to see any difference because you aren't running unreal with the "-useunpublished" tag. just an easy mistake to make.

  6. #6

    Default

    Yup that was it, fixed it in a other thread I made tho. ^^


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.