View Single Post
Old 07-31-2006, 05:26 PM   #4 (permalink)
Ashlar
Forum Expert
 
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 35
Posts: 283
Default

Quote:
Originally Posted by Lokai
I cannot change BaseWeapon.cs to BaseWeapon.wb and work just on that file, because the C# scripts will not compile without BaseWeapon.cs being there.
That is true and I believe that is what Phantom was refering to.
I don't edit the distro files much myself since i am more concerned with making new scripts.
And when you are making new scripts, the problem doesn't appear at all.

There is a partial workaround that works in some cases...
Copy BaseKnife.cs to a new folder, and change the extention on the copy to a .wb ( i.e. BaseKnife.cs.wb ).

You still have the original file as a cs so the server will compile, and a wb file to make your changes in and restart the server quickly.

Doing this however will only show you if the server will compile, since any knives created in game will not use values from the wb BaseKnife.
But, just knowing that your changes will compile as a .cs script will still save time.

I said earlier that this workaround will work in "some cases".
Your BaseWeapon example will still not work due to abstract class protection levels in IDurability.
But, as i have shown (and tested) with the BaseKnife, it doesn't take much time to find out if the workaround will work on a particular script file.

This mod will not work for everything unfortunately.
I didnt understand Phantom's concern until just today, but i still see this as an invaluable tool - it has saved me hours and hours already!

Like any tool however, it doesn't work for every job.... Just most of em


I am going to be looking into seeing if i can fix this problem by getting the wb scriptcompiler to load the Scripts.cs.dll as a resource. Edit: err, reverse that...

In the meantime, I hope that the workaround i suggested helps you Lokai.

P.S. Thanks for trying this out!

Last edited by Ashlar; 07-31-2006 at 06:05 PM. Reason: Formatting/Color
Ashlar is offline   Reply With Quote