deleting classes

Discussions about Coding and Scripting
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

deleting classes

Post 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
User avatar
TheDane
Masterful
Posts: 660
Joined: Tue Feb 12, 2008 2:47 pm
Personal rank: Happy fool :-)

Re: deleting classes

Post 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.
Retired.
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

Re: deleting classes

Post 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?
User avatar
Feralidragon
Godlike
Posts: 5489
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: deleting classes

Post 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.
User avatar
zacman
Adept
Posts: 412
Joined: Wed Apr 15, 2009 5:36 am
Personal rank: M-M-M-MONSTER KILL

Re: deleting classes

Post 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.
Image[url=steam://friends/add/76561198048595886]Image[/url]
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

Re: deleting classes

Post 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
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany

Re: deleting classes

Post 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..
Image
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

Re: deleting classes

Post 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.
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany

Re: deleting classes

Post 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
Image