Author Topic: How do I edit an add-on?  (Read 1210 times)

Do I change the .cs files? How? Does server.cs also need to be changed?
(If this belongs in modification help just tell me)

Just open any .cs file with a plain text editor. Any .cs or .gui file can contain code.

You'll need to learn TorqueScript to actually do anything worthwhile.

Just open any .cs file with a plain text editor. Any .cs or .gui file can contain code.

You'll need to learn TorqueScript to actually do anything worthwhile.
Does server.cs also need to be changed?

Does server.cs also need to be changed?
Any .cs or .gui file can contain code.
It all depends on what code you want to change. The server.cs has all of the server sided code or executes other files with server sided code.

It all depends on what code you want to change. The server.cs has all of the server sided code or executes other files with server sided code.
I copied the basic lights add-on and am editing it. Does the server.cs need to be changed so it can see that it's a different add-on?

I copied the basic lights add-on and am editing it. Does the server.cs need to be changed so it can see that it's a different add-on?
If you copied the folder then you just need to change the name of the folder. Change the contents of the namecheck.txt(if it has one) to the name of the folder. And change all of the datablock and UI names to something unique.

It's not showing up in the add-ons list for some reason.
Here's the add-on

...so why don't you look at what the problem is?


Checking Add-On Light_Smore/Light_Smore
    nested add-on - will not execute


You aren't supposed to make a subfolder in the zip.

...so why don't you look at what the problem is?
Because I'm bad at reading the console.
You aren't supposed to make a subfolder in the zip.
I didn't realize I did that.

Showed up but didn't work, I tried skimming through the console and saw something saying that it contained syntax errors.

Well post the code. We can't do anything without it.


What line does it say the error is on?

Never mind.

Add an ; on the line that's missing it.
Code: [Select]
datablock fxLightData(EmptyLight : RedOrangeLight)
{
uiName = "Empty Light";
radius = 0;
brightness = 0;
color = "0 0 0 0";
flarebitmap = "base/lighting/lightfalloffmono"
};

Remove the random 036 at the end.
Code: [Select]
datablock fxLightData(BrownLight : RedOrangeLight)
{
uiName = "Brown Light";
color = "0.8 0.4 0 1";036
};

Also, move all of the code into the server.cs. There's no reason not to.