Jump to content

VampyrBytes

Members
  • Posts

    175
  • Joined

  • Last visited

Posts posted by VampyrBytes

  1.  

    I mean even as traitor. It just pisses me off because most of the time it's not needed. It's pointless.

     

    Weeell, when you need to get off the station after your objectives are completed, a rogue singularity or overcharged supermatter can be a pretty heavy straw when it comes to breaking the camel's back... Where breaking the camel's back = calling the shuttle.

     

    Yes, in theory you could lay low as an antag until a shift change, but the longer you stick around the more likely it is that your target gets cloned and/or you get found out.

     

    Besides! Doing either of those things is pretty hard, what, with a team of dedicated engineers and a crack security team working alongside an all-seeing A.I. Right guys? Right?

     

    Firstly, you're right on the edge of rules 5 and 6 here (and people have had bans for doing these as an antag). Secondly, you're ending the round for everyone, not just yourself. If I finish my objectives in 30 minutes, you're not going to be happy if I force a shuttle call and you've still got lots to do to achieve yours. This type of thing leads to antags rushing their objectives rather than having fun with them (and creating fun for everyone else)

     

    As for the risks... firstly you didn't leave their head somewhere it could be found did you? Secondly, be realistic... security catching you unless you're seen in the act? One round I'd done my objectives quickly, and sec seemed to have no idea, so I figured being the target of a manhunt would be fun... I left my pda open on the syndie menu on the brig desk and went off. I saw no trace of a manhunt and happily left the station on an escape pod at the end of the round :roll:

     

    If you finish your objectives quickly, either find something else to do that'll be fun for both you and anyone else involved, or you could ahelp and ask for another objective (disclaimer - admin's have a sense of humour, don't blame me for any objectives they give you ;) )

     

  2.  

    Oh boy, another thread of whining how karma is impossible to get and thereby bad in every way. :roll:

    Another chucklehead that plays some spotlight heavy role and gets all the karma, stepping down from their pedestal on high to put the low karma commoners in their place.

     

    I got enough karma to unlock slime people while I was only playing the geneticist, and they spend the majority of their time shut away in their lab, really not in the spotlight. It's not what you play, it's how you play it... and I've never played anything like a nutjob.

     

  3. I agree with this. Last time I was an antag I ahelped to ask permission to do something that wasn't on my objectives. I was left unsure which to put it under as it was a question but I needed an admin's response, not a mentor's

  4.  

    Yeah, as I said, I'm not about to try and teach people to code from scratch. As long as you read the first part of the guide on what to do if someone uploads a malicious script you're good. I will start updating the wiki next week, and will try and cover some of the more basic stuff in that.

     

    The AI one can just be copied and pasted into the common server edit code window, so you don't need to understand it to use it.

     

    If anyone has an idea for a script but can't code it themselves let me know and I'll see what I can do

     

  5.  

    At some point I'll probably take you up on that Fj. At the moment I'm focussed on medbay stuff, but I'll let you know if/when I do want to learn atmos

     

    Back on thread, here's a script for all you AI's. Don't you just hate that you can't access the different channels in the same way as people with earpieces? Well, here's the solution. I couldn't use the : as the game automatically strips the first 2 characters from a message if it's the ai and it starts with :, so we're using @ instead. So it's @c for command, @m for medical, ect. It's fully annotated so you can see what's going on and make changes if you want

     

    def searchVec($vector, $string)

    {

    $index = 1;

    $found = 0;

    $test = "";

    while ($index <= length($vector) && $found == 0)

    {

    $test = at($vector, $index);

    if ($test == $string){$found = $index;}

    $index += 1;

    }

    return $found;

    }

     

    def initialise () // so the vector doesn't have to be set up each time

    {

    $codes = vector("@e", "1357", "@n", "1351", "@m", "1355", "@s", "1359", "@c", "1353", "@u", "1347"); // set up a vector with each code to access the channel followed by the channel frequency

    $initialised = 1;

    mem("codes", $codes); // stores the vector in memory

    mem("initialised", $initialised); // this is so we can check easily whether this has already been run

    }

     

    if (tonum(mem("initialised")) != 1) {initialise();} // If the codes aren't already in memory, run initialise

    if ($job == "AI") // Makes sure only the AI can use this

    {

    if (substr($content, 1, 2) == "@") // only runs if the first character is @

    {

    $channel = substr($content, 1, 3); // gets the first 2 characters of the message

    $codes = mem("codes"); // gets the codes vector from memory

    $find = searchVec($codes, $channel); // searches for $channel in the codes vector

    if ($find != 0) // if the code has been found

    {

    $freq = tonum(at($codes, $find + 1)); // change the frequency of the message to the correct one

    $content = substr($content, 4, length($content) + 1); // strips the first 3 characters (the code and space) from the message

    }

    }

    }

     

  6.  

    Actually, I've been on for 2 custom events in the last 2 days.

    The first was based on the corrupt a wish thread in cilvilian days - there were 2 'wish granters' that had been smuggled aboard by the wizard federation and each granted one wish to each person who used it, with some unforeseen consequences - I loved it when one person wished for ultimate power and got turned into an AI :)

     

    The other was a 'tame' alien queen starting off in Xeno with an NT instruction to find a way of using it to make plasma. Unfortunately, when she had children, they weren't so tame ;)

     

    For me to see 2 in 2 days means they have really increased the number of custom events an awful lot... I used to see about one a month.

     

    Bear in mind that it's not just a case of picking people to do events. They have to know for sure they can trust the person with the admin powers - the last thing you want is an admin who gets pissed off and starts griefing. Then that person also has to be willing to be an admin - which means a) you're going to be spending a fair amount of your play time dealing with ahelps and griefers and b) you'll never have any sense of mystery and excitement yourself, as you'll always know what the round type is and who the antags are.

     

  7.  

    Ok, I'm going to start this guide with the reason I'm writing it. I've been teaching myself some of the less well known aspects of ss13. To teach myself Tcomms scripting I set myself a fun challenge - write a script that each time someone spoke changed the name of the person speaking, and changed the message to a random panic message or a urgent call for help.

     

    So, I wrote the script, learning pretty much everything about tcomms as I went, and eventually got it working, and working well. So today was the first time I was an antag since I wrote it. I ahelped for permission to upload it, was given it, ordered an emag, and headed out to the tcomms satellite, uploaded and executed it. First few messages it didn't change as it had to collect names. Then the chaos started. This was about 20 minutes into the round.

     

    Within 5 minutes the shuttle was called :cry: Someone got onto a station bounced radio and pointed out that someone had hacked tcomms - Ah, I thought, now they'll go and fix it and recall the shuttle... nope. Then I realised.... no-one actually knew how to fix it. The script was still running when the shuttle docked at centcom.

     

    So, I'm going to start off by explaining what to do if some git does what I did and uploads a malicious script. Go to the telecoms control room. All scripts run on the telecommunications traffic control computer, so that's the one you want. When you click on it, it shows the network it's connected to and a list of servers on that network. The only network (afaik) is tcommsat so make sure this is in the network part, then scan for servers. You'll get a list of all the servers(channels) available. Click on one will give you the options of editing the code and toggling between having the code run either always or never. setting it to never will disable any script running on it... beneficial or malicious. Job done. To make sure it doesn't get started again, click the edit code button and delete any code in there.

     

    To upload a script, same thing but click the edit code instead. This will give you a window in which you can write/paste your code. Once it's in there, click the apply and compile buttons. When you hit compile it will go through and check that you have no errors in the code. Assuming you don't, you then hit execute. please note, the script is not running at this point! It is now ready to run. You need to change the signal execution to always before it will start.

     

    Ok, so now you know how to upload and remove code from tcomms. So, how do you write the script? Ok... you NEED some experience with coding to go any further. I'll explain a fair amount in this guide, but I'm not about to teach you programming from scratch. If you want to learn and don't have any coding experience I'd suggest finding a good JavaScript guide online and starting with that as there's quite a few similarities between it and the NTSL used in ss13.

     

    Next step, read http://80.244.78.90/wiki/index.php/NT_Script . It's really not very good (I'll update it when I get the chance) but it'll give an overview of the language. Then come back here.

     

    Ok, so you've got some experience and have read through the wiki? Great, now we can get started. As I go through, I'll use examples from the script I wrote. Also, anything that's in *here* is stuff for you to put in, not to copy.

     

    There are 3 types of variables in NTSL. Strings, Numbers and Vectors. Obviously strings hold text and numbers hold numbers. Vectors hold lists of either strings or numbers. You define them as follows

     

    $index = 1;

    $name = “”; // gives an empty string

    $name = “Kiera Whiteman”;

    $list = vector(); //gives an empty vector

    $numbers = vector(1,2,3,4,5); // gives a vector of numbers

    accusations = vector(" is a changeling! They're draining the fluids out of ",

    " has an esword and just killed ",

    " is dressed as a wizard and just threw a fireball at ",

    " has an arcane tome and just dragged off ",

    " just turned into a blob! It killed ",

    " is wearing a red spacesuit! So is "); // gives a vector of strings

     

    And yes, that last one is from my script ;)

     

    Ok, so we know what variables are available. Before we go onto what we can do with them, there's a few rules, and a few set variables you need to know about.

     

    Set variables -

    PI = 3.141592653;

    E = 2.718281828;

    SQURT2 = 1.414213562;

    FALSE = 0;

    TRUE = 1;

    NORTH = 1;

    SOUTH = 2;

    EAST = 4;

    WEST = 8;

     

    $common = 1459

    $science = 1351

    $command = 1353

    $medical = 1355

    $engineering = 1357

    $security = 1359

    $supply = 1347

     

     

    These are always fixed.

     

    $source // the person who just sent the message over the channel

    $content // the content of the message

    $freq // the frequency of the message, so which channel it was broadcast over

    $pass // determines if the message will be broadcasted, 0 for no and 1 for yes

    $job // the job of the source

     

    Obviously these change with each message. They can be changed within a script. Note that $source can be changed to anything, but if it's not a valid name of a current crewmember it will be shown in italics and capitals, which is a bit of a give away. Also, if you change the frequency, the message will NOT then be ran through any scripts on that channel's server.

     

    Ok, the rules for variables.

    If a variable is defined within a block of code ( set of { } )it is only available within that block (and any blocks in that block). So for example -

     

    def example()

    {

    $index = 1; // defining index within the example function but outside of the while block

    while($index <= 10){

    $count += 1; // defines and uses count within the while block

    $index += 1; // this is fine as the while block is within the example block

    }

    $index += 1; // index is now 11

    $count +=1; // count is NOT 11, it is 1. The count in the while block died at the end of the block, so this is a new variable

    }

    // trying to use index here would have the same result as using count outside the while did

     

    The other major rule is that string and number variables are not directly interchangable. For example

     

    $first = 1;

    $second = “2”;

    $third = $first * $second; // This will not be 3, it would still be empty as you can't multiply a string

    $fourth = $first + $second; // again, this will not be 3, it will be a string containing “12”

     

    There are 2 functions that are built in to help with this, tostring() and tonum() which I'll cover in a minute.

    Vectors can hold combinations of strings and numbers.

    The mem function (I'll come to it later) isn't very robust with respect to keeping strings as strings and numbers as numbers, so I'd advise using the tostring or tonum functions on anything you retrieve using it.

     

    Ok, so what can you do with the variables? Each type have built in functions. The vector ones are covered in the wiki, so I'll leave those for you to look at.

     

    STRINGS

     

    + adds to strings together

     

    $test1 = “Kiera Whiteman “

    $test2 = “is hacking into telecoms!”

    $test3 = $test1 + $test2 // this is “Kiera Whiteman is hacking into telecoms!”

     

    length – takes a string as it's argument and returns the number of characters in the string as a number.

     

    $test = “test”;

    $howlong = length($test); // this is now 4

     

    substr – takes a string and 2 numbers as its arguments, returns a smaller string, starting at the position of the second argument and ending the character BEFORE the position of the third argument

     

    $test = “testing this”;

    $part = substr($test, 3, length($test) + 1); // this will now be “sting this”, however, without the +1 it would be “sting thi”

     

    find – takes 2 strings as it's argument and returns a number, either the position of the second string in the first string or 0 if is wasn't found

     

    $test = "testing this";

    $position = find($test, "this"); // this is now 9

     

    replace – this seems to be bugged. It should take 3 string arguments, replacing all instances of the second string in the first string with the third string

     

    $test = “testing this”;

    $changed = ($test, “t”, “s”); // this should now be “sessing shis”, however, when I tried it it came out as “ssshis”

     

    lower and upper – these take a string and return the same contents but in lower case or upper case respectively

     

    $test = "testing this";

    $big = upper($test); // this now contains “TESTING THIS”

    $small = lower($big); // this now contains “testing this”

     

    explode – takes 2 strings. Returns a vector with the first string split at each point it found the second string

     

    $test = “We need a longer sentence for this one”;

    $seperated = explode($test, “ “); // this now contains a vector with 8 entries, first is “we”, second is “need” and so on

     

    repeat – takes a string and a number and returns a string with the string repeated n number of times where n is the number. DO NOT use this to spam!

     

    $test = "testing this";

    $repeated = repeat ($test,3); // this now contains “testing thistesting thistesting thistesting this”

     

     

    reverse – takes a string, returns a string. Can you guess what is does?

     

    $test = "testing this";

    $twisted = reverse($test); // this now contains “siht gnitset”

     

    tonum – takes a string, returns it as a number if possible. It must be in numerical symbols

     

    $first = "5"; // string

    $second = "10"; // string

    $third = tonum($first) * tonum($second); this is now 50

     

    really don't try this with anything that might not be a number, it'll mess up big time

     

     

    NUMBERS

     

    ok, to start you've got 3 obvious... +, - and *. Less obvious is divide, which is ^

     

    sqrt – takes a number, returns the square root of the number

     

    $test = sqrt(9) // this is 3

     

    floor, ceil and round – each take a number and return a number. floor rounds it down, ceil rounds it up, and round rounds it to the nearest integer

    $test = 3.14159;

    $down = floor($test); // this is 3

    $up = ceil($test); // this is 4

    $near = round($test); // this is 3

     

    clamp – takes three numbers. The second is the lower limit, the third is the upper limit. If the first is within the limits, returns it unchanged, otherwise changes it to the limit it crossed.

     

    $test1 = 50;

    $test2 = 10;

    $test3 = 28;

    $result1 = clamp($test1, 20, 40); // this is 40

    $result2 = clamp($test2, 20, 40); // this is 20

    $result3 = clamp($test3, 20, 40); // this is 28

     

    inrange – similar to clamp, but returns 1 if the value is within the limits and 0 if it's not

     

    $test1 = 10;

    $test2 = 28;

    $result1 = inrange($test1, 20, 40) // this is 0

    $result2 = inrange($test2, 20, 40) // this is 1

     

    tostring – this takes a number and returns it as a string

     

    $test = 50;

    $string = tostring($test); // this now contains “50”

     

    OTHER FUNCTIONS

     

    these don't relate directly to a type of variable

     

     

    mem – Usually variables are discarded once the script has finished running. mem lets you store things in server memory and take them out. You can put any type of variable into memory, although if you're storing numbers, use tonum when you get them out as it can get confused. It takes 2 arguments if you're storing something, a string as a name to store it under and the variable to be stored, or 1 if you're retrieving a variable, a string for the name it was stored under

     

    $randoms = vector("Oh fuck, the sing is loose!", "Oh god, I'm vomiting spiders!", "oh shit, there's a ninja onboard", "Help! The AI's trying to kill me!", "Help, xeno Empress!", "Blob! Grab the welders");

    mem("randoms", $randoms); // puts the vector of strings into memory as “randoms”

     

    $randoms = mem(“randoms”); //retrieves the vector – this doesn't need to be the same time it was put in

     

    And yes, you can guess where that came from :)

     

    broadcast – takes up to 4 arguments – message, frequency, source, job and transmits a the message over coms. If you don't pass it all the values it will use the defaults - frequency: 1459, source: the server name, job: None

     

    broadcast (“I'm innocent!”, $common, “Kiera Whiteman”);

     

    Kiera Whiteman [145.9] says, "I'm innocent!" will be transmitted over the radio

     

    broadcast(“I'm innocent!”);

     

    COMMON SERVER [145.9] says, "I'm innocent!" will be transmitted over the radio

     

    If $pass is 1 at the end of the script a broadcast will be transmitted with

     

    broadcast($content, $freq, $source, $job)

     

    If pass is 0, it won't be sent.

     

    signal – takes 2 numbers as arguments, frequency and code. Works just like a remote signaller

     

    if($message = “drop dead captain”)

    {

    signal(145.7, 30); // you didn't put a remote controlled grenade in the captain's backpack did you???

    }

     

    I think the only other bit I need to cover is user defined functions. You can define your own functions for things that you need to do more than once, or are likely to use in more than one script.

    To do this you use def. You then put the function name, followed by any arguments within brackets, and put the function code in curly brackets the same as in an if or while block. If you need the function to send back a value, you do return followed by the variable.

     

    I'm getting tired now, so I hope that made sense. As an example, here's a handy one I made for my script. It takes a vector and a string and searches the vector for the string, returning the position in the vector if it's found, and 0 if it's not

     

    def searchVec($vector, $string)

    {

    $index = 1;

    $found = 0;

    $test = "";

    while ($index <= length($vector) && $found == 0) // continues until it's found or reaches the end of the vector

    {

    $test = at($vector, $index);

    if ($test == $string){$found = $index;}

    $index += 1;

    }

    return $found;

    }

     

    As an example how to use it, here's the one that collected the names of people talking over the radio

     

    def AddName()

    {

    $names = vector();

    $names = mem("names");

     

    if (searchVec($names, $source) == 0) // if the name isn't already in the vector

    {

    push_back($names, $source);

    }

    mem("names", $names);

    }

     

    Ok, that's it for now. I will add useful functions and scripts occasionally as I make them... but only positive ones, if you want ones for your antags, use what I've shown you and make them yourself – if you made it this far you've already got some clues about my script ;)

     

  8.  

    Another reason why this makes me smile: I've just chosen to be a security officer, and deep down I belive this might become routine in future shift. Gods... why can't people just push/disarm an attacker, flee and call security? :lol: :cry:

     

     

    Because that usually involves 10 minutes of yelling over comms, giving up on that, 10 minutes of finding a sec officer and trying to get his attention, 5 minutes explaining what happened, and the rest of the shift of nothing being done about it because they're busy on a manhunt for the clown that left the banana peel outside the brig.

     

    Don't get me wrong, you can find that rare creature - a competent security officer. However, security is only really efficient as a team, and there's more chance of NT donating all their profits to the Syndicate Nuke Ops Recovery Hosptial Appeal than there is of getting a team of competent security officers together

     

  9.  

    Unless you make use of the cryobeakers.

     

    Good point, I forgot about cryo beakers

     

    I want more helpful grenades myself. Seems like a waste to only have grenades for antags or griff.

     

    Pretty much anything that can be administered by syringe can be administered by smoke grenade, both positive and negative, so there's already plenty of scope for positive grenades, they just don't get used much

     

  10.  

    This is possible now. When you make a grenade you put 2 breakers in. Put 2 of the ingredients for smoke in one, and the third in the other (eg potassium and sugar in one and phosphorus in the other. Now top up both beakers with what you want to spread and put them in the grenade. They'll mix when the grenade goes off and the smoke takes on the properties of whatever's in it.

     

    To do tests talk nicely to the RD and get his permission to use the toxins testing area.

     

    Bear in mind that there's some things you can't do grenades of as they'll react with the smoke ingredients. Chloral Hydrate is one of these, the sugar reacts and creates sleep toxin, leaving no sugar for the smoke reaction, however you can make a sleep toxin grenade.

     

  11.  

    Could we get some way for the MediHud to tell the difference between a virus and addiction?

     

    At the moment you've got no chance of isolating a virus quickly as half the station is addicted to something, whether it's nicotine, painkillers or space drugs, so you see the virus icon above someone and just wonder to yourself what they're addicted to.

     

    Really aught to be a way to tell whether it's the chemist or virologist that's been hard at work ;)

     

  12.  

    Granted but the only color they may use will be a Flamboyant Pink

     

    I wish Diona nymphs don't remember things if their outer shell dies.

     

    Granted... the outer shell is now indestructible so nymths remembering is no longer an issue.

     

    I wish virology was on the research station to reduce the chance of epidemics

     

  13.  

    Wow. Never play those positions so didn't know what the EFTPOs were for. Just had a play around with them and they'd be almost perfect. The only thing that would need to be added for my scenario would be a check for if the account to send the funds to is NT and the payee is an employee then there's no charge.

     

    I've checked, and the EFTPOs are available for order from cargo. When I was checking this I had another thought. The QM isn't going to be happy if all his supply points are going on civilians wanting stuff to make money with.... so have certain (civilian safe) crates available either via SP or for a fixed amount of credits. If it's paid for with credits it's auto approved. Both the prices and payment could be built into the request computer so it's no more effort for cargonia. Civilians now have the ability to set up their own businesses.... Want to set up a pizza parlour? get an EFTPO and a pizza crate, find somewhere to set up shop, and you're in business

     

  14.  

    We could try and make credits more important for civilians - NT covers employees food, drink, medical but civilians could have to pay for theirs.

     

    Thats a great idea! If an easier money system was introduced for the civies (maybe some kind of special card) that made money less of a massive pain in the arse to work with, the money system could really be used rather well. Civies would have to directly pay for cargo orders, properly buy drinks, ect. Allows for that aspect of RP without forcing it onto other jobs that have much more imporant uses of their time.

     

    This is in reply to this comment and the comment in the thread about making currency more relevant. All that's actually needed to make currency viable is a pin and chip type of machine. This machine can be set to a certain person (or department)'s account, which is where any funds from transactions are sent. The person making the charge enters the amount to be charged, and then the person paying swipes their ID and enters their pin. Transaction done.

     

    The ability to pay for something by swiping your ID card already exists in the code, you do it every time you use a vending machine. I'd add the entering the pin if we're making currency more important else we'll have ID thefts in order to get the credits. For this scenario you have a simple check... if it's an NT service (eg you're paying NT or a department of NT) and you're not a civilian there is no charge (this check could be performed before you enter your pin, so employees don't have to enter it all the time).

     

  15.  

    Many items have apparently got certain drugs on the TG codebase but there isn't any kind of record if they still have them with Bay medical system.

     

    They do. If you want to find out whether something does have some form of drug in it, take it to the chemist and get them to grind/juice it. You'll be left with any nutrients and any drugs that are in it. You can find anything from bicaridine to cyanide.

     

  16.  

    And which space law paragraph is applicable when an individual is found to be affiliated with such an organization before any actual criminal act has been committed by this individual?

     

    from the wiki -

     

    If you can't find the crime listed in here you can set up a tribunal. See Legal Standard Operating Procedure.

     

    So yes, they could be arrested, but they can't be punished until there's been a tribunal

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use