Page 1 of 1

deleting classes

Posted: Wed Oct 07, 2009 8:21 pm
by Rakiayn
Im working on a MOD called monstermatch. (you can find more info here: http://www.ut99.org/forum/viewtopic.php?f=4&t=2284)
anyway I am busy coding this mod. I have had to learn/am learning scripting as I go along. this is my first scripting project.
anyway. In the process ive redone code sometimes to make them more effecient. and now I have a whole lot of classes that are not used.
I want to delete them but I cant seem to delete them.
Im using Ued to code. I tried exporting the classes to .uc files and then deleting them, but that resultet in a crash when I tried to compile them

Re: deleting classes

Posted: Wed Oct 07, 2009 9:03 pm
by TheDane
sounds like a class is linked to one of those you deleted? does it give an error log?

Also you should consider just using notepad or simular to make your script, editor is crap and makes bugs sometimes.

All you gotta do is add your package name to unrealtournament.ini like EditPackage=MyPackageName

then run ucc.exe to compile it, i use a batch file for that, just create a .bat file in your system folder with these two lines in it:

ucc make
pause

(the pause is so the dos-promt window doesn't close down automaticly) This way you will get an error message while compiling and you can copy/paste that error message here, that way you can get help. Your describtion is kinda vague hehe.

Re: deleting classes

Posted: Wed Oct 07, 2009 9:20 pm
by Rakiayn
thnx
that sounds logic.
Ill give it a try

I am now also worried about something else. when the package compiles ;
1. does ued has to reimport all the custom textures I used ?
2. do I have re add them to the default properties of all classes that uses these custom textures?

Re: deleting classes

Posted: Wed Oct 07, 2009 10:23 pm
by Feralidragon
Rakiayn wrote: 1. does ued has to reimport all the custom textures I used ?
Depends. Custom textures saved directly in the .u file have to need to be imported indeed.
But textures from already existing packages need only to be loaded up during the import and used by the default properties or in code itself.
Rakiayn wrote: 2. do I have re add them to the default properties of all classes that uses these custom textures?
If you import them from bmp/pcx files, you don't need to aplly them to any default properties, unless there are default properties which have to have these set from the beggining (for example: multiskins, hud texture variables, some textures in the inventory settings, etc). If you load up an already existing utx (custom or not), you have either to set the textures you need in the default properties or in the code itself to load them up.

Re: deleting classes

Posted: Thu Oct 08, 2009 3:55 am
by zacman
There IS a simpler way to delete classes...
1) Make a map that references ALL the classes you wanna keep (E.G. placing a gun in it will reference the gun, the ammo, the textures, and the projectile)
2) Save said map
3) Close Ued
4) Open Ued-DO NOT LOAD YOUR PACKAGE
5) Load the Map
6) Save the package that appears in the list now. It will erase the previous one, and only save the data in the map

Just make sure you don't forget anything- maybe make a placeholder class with the line of code:
var() class<Actor> ClassActor [256];
and place all your classes in the list, so they are referenced Definately. The code is nothing but a placeholder, but it IS VERY usefull. Also, this way, any "Useless" classes that are actually useful won't be lost, as with UCC Compiling.

Re: deleting classes

Posted: Fri Oct 16, 2009 9:49 pm
by Rakiayn
@zacman

I did al those things, but when I load the map, my package is not on the list so I cant save it

EDIT: never mind.
I clicked on showpackages 2 times and then it appeared

Re: deleting classes

Posted: Thu Dec 17, 2009 12:11 pm
by Shadow
The simpliest way to actually delete obsolete classes is to delete their *.uc Files in your Project Directory. And then recompile it, but make shure no class depends on it/them anymore !

UnrealTournament\MyMod\Classes -> there are you're extracted Source Files, by simply deleting unused Classes and recompiling the Package you'll delete them. Ah and don't forget to set EditPackages=MyMod in the UnrealTournament.ini File !
So delete the old MyMod.u file and recompile the Package.

btw: coding with the UED is pain in the ass..

Re: deleting classes

Posted: Sun Dec 20, 2009 5:41 pm
by Rakiayn
yeah indeed. I used to code with ued only. but now im a little more skilled the when I first started. so I only code in ued when I am working on stuff that has to be tested in gameplay and can be easely checked if it is working. such as monsters and so on.

Re: deleting classes

Posted: Mon Dec 21, 2009 12:21 pm
by Shadow
Rakiayn wrote:yeah indeed. I used to code with ued only. but now im a little more skilled the when I first started. so I only code in ued when I am working on stuff that has to be tested in gameplay and can be easely checked if it is working. such as monsters and so on.
that's right, I'm doing it that way myself