Author Topic: script.cs + packaging for playertype?  (Read 3997 times)

Hi, working on this, trying to package it, no idea how. Can someone post a guide to packaging the player? Or at least a link to one?

Save as a server.cs and package it like a normal add-on.
You can name the zip whatever you like, but its mostly (always) a good idea to prefix it with Player_

To package an add-on (of any kind)
in the folder containing server.cs or client.cs create two text documents.
Name the first one "namecheck.txt". the second you name "description.txt".
Open up namecheck.txt and put the title of your add-on as it would appear in the game. For example "brick_food" "gamemode_funtime" "server_Script" "player_playertype". The format of type_name is mandatory.
 In description.txt write down some info about you and the add on. There are no limitations on what you can write in that, but it HAS to be there.

Select namecheck.txt description.txt and all the other files for your add-on and right click on them. Select Send To => Compressed file (.zip). Place your add-on in the addons folder and your good to go!

-snip-
Just to let you know:
1. It isn't necessary to have a nameCheck.txt.
2. It's easier to just keep your addon in a normal folder (not a zip) while testing it in-game so you can actually easily make edits to the file if need be.
3. If you want to, you can leave description.txt blank.

As an amendment to the above advice:

1. It isn't recommended to have a nameCheck.txt. It does absolutely nothing.
2. You should leave your add-on in a normal folder (not a zip) while testing it. It'll load faster (Blockland doesn't have to unzip it), and it'll be easier to re-execute (you can use exec() and e() directly with folders, with zips you have to run discoverFile( path ) so Blockland will update it).
3. Description.txt has no mandatory scheme to it. It's simply a file to explain to people information about the add-on, it's quite useful. The most common format follows:

Code: [Select]
Title: Your Add-On Name
Author: the_stitch
This is a one line description of your add-on.

1. It isn't recommended to have a nameCheck.txt. It does absolutely nothing.

Well if you have a namecheck that's off from the mods name itself it wont execute. So they do a little more than nothing. But they're pretty pointless.

Well if you have a namecheck that's off from the mods name itself it wont execute. So they do a little more than nothing. But they're pretty pointless.
They do absolutely nothing of any value is what I meant, I guess.

Okay, so:
  • make a folder
  • put the model and server.cs
  • description.txt
And to refresh it in-game i type in the console "e(player_feralhound)".
That's it?

And to refresh it in-game i type in the console "e(player_feralhound)".

exec("add-ons/player_feralHound/server.cs");

exec("add-ons/player_feralHound/server.cs");

Nah, he has it right with e(). Either works.

Ahh. Just don't forget the ; at the end.

Nah, he has it right with e(). Either works.
e isn't a default function though

make a folder
The folder's name must be in the format "Category_Name"
« Last Edit: July 11, 2014, 08:09:50 PM by Headcrab Zombie »

Okay, so:
  • make a folder
  • put the model and server.cs
  • description.txt
And to refresh it in-game i type in the console "e(player_feralhound)".
That's it?
Just keep in mind that if you don't provide a namecheck.txt the add-on will not show up in the add-on menu.


Just keep in mind that if you don't provide a namecheck.txt the add-on will not show up in the add-on menu.
False.
Sure it is. Try it out.
==>echo(isFunction("E"));
0