[Scripts] CyberVic's In-Game Scripts

Discussion in 'Programming' started by CyberVic, Jan 2, 2015.

  1. CyberVic

    CyberVic Well-Known Member VIP

    All of theses can be setup with a combination of timers, sensors, or other things which trigger them such as running directly or putting the program block set to run on your bar. The "ship" and Status Report run ideally with a timer which activates the programmable block on some regular interval and then restarts the timer. Use at your own risk. The virus is not fully tested. Note that at this time the faction check in the virus is not working so use carefully.

    All my scripts are now managed in Steam Workshop.



    Official Code Release Thread - http://forums.keenswh.com/post/cybervics-ingame-programming-api-script-7233318

    CyberVic's In-Game Programming API Script - http://steamcommunity.com/sharedfiles/filedetails/?id=371689127
    Fleet Status Report - http://steamcommunity.com/sharedfiles/filedetails/?id=371708872
    Active Mode - http://steamcommunity.com/sharedfiles/filedetails/?id=371708554
    Dormant Mode - http://steamcommunity.com/sharedfiles/filedetails/?id=371708735
    Work Ship - http://steamcommunity.com/sharedfiles/filedetails/?id=371712921
    Fighter Ship - http://steamcommunity.com/sharedfiles/filedetails/?id=371712776
    Last edited: Jan 8, 2015
  2. ezeiger92

    ezeiger92 Well-Known Member Lead Admin Survival Admin

    Why are you using longs? I would imagine an unsigned integer would be more than enough (assuming you don't need negatives). Heck, on your system they may just be integers under the hood.
  3. CyberVic

    CyberVic Well-Known Member VIP

    Updated to latest version. Frickin' fun.
    Last edited: Jan 6, 2015
  4. CyberVic

    CyberVic Well-Known Member VIP

    Updated with my latest scripts. Enjoy!

    I'm especially proud of the new power saving Dormant / Active Mode scripts.
  5. Legend9468

    Legend9468 Well-Known Member VIP

    And I had an annoying enough time making a calculator in first year Uni....
  6. CyberVic

    CyberVic Well-Known Member VIP

    This is easy stuff (but then again I've been programming for 23 years)
  7. GingerSwan

    GingerSwan Active Member VIP

    Wasn't C# introduced in 2000? What did you use for the first 8-9 years?
  8. CyberVic

    CyberVic Well-Known Member VIP

    Various other languages. I know several languages.
    C, C++, Basic, Quick Basic, Visual Basic for Dos, Visual Basic for Windows 3.1, Visual Basic for Windows, VB.Net, C#, Java, Javascript, ASP, HTML, PHP

    Early days of programming from around the age of 8 to around 12, it was mostly basic / quick basic and other really simple languages. Around 92/93 I started doing VB for Dos, VB for Win 3.1, and when Windows 95 came out got Visual Studio and started coding in VB for Windows 95 and onward until VB.Net came out. Studied C / C++ and Java in college. Learned HTML around the time of the .com boom, learned Javascript, ASP, but not PHP until a few years back. Got into C# a few years after C# came out (because initially I was doing VB.Net when .Net first came out). Also know a ton of minor sub languages and related technologies like SQL, MySQL, Oracle.

    Overall though C# is my primary language. It what I code in professionally (building enterprise web-based applications) and what I do my wife's business website in and also other sub projects outside ShadeCrest (which I mostly do PHP and Command Helper).
    Last edited: Jan 7, 2015
    GingerSwan likes this.
  9. Legend9468

    Legend9468 Well-Known Member VIP

    Can I make you feel old by saying that you've been coding VB for longer than I've been alive? (Born in '94 for reference)
  10. CyberVic

    CyberVic Well-Known Member VIP

    I graduated highschool when you where 3 years old.
  11. CyberVic

    CyberVic Well-Known Member VIP

    So.... today I completely re-wrote these scripts into a single API that's around 1440 lines of code.

    That API allows for each one of the different programs to execute their code in around 10-20 lines of code instead of hundreds. Now they just need to release some like "master controller" block where I can load the API into it and then call those functions from my other program blocks to cut down on the copy paste madness.

  12. GingerSwan

    GingerSwan Active Member VIP

    How long did that even take?
  13. CyberVic

    CyberVic Well-Known Member VIP

    A few hours yesterday evening.
  14. CyberVic

    CyberVic Well-Known Member VIP

    All my scripts are now on the workshop and if you subscribe to them, easily accessible in game.

    I still might start a GitHub project for my scripts for collaborative purposes.
  15. Snicers

    Snicers New Member

    CyberVic, would be awesome to get this on Github since I can't copy & paste these out of the in game editor without it crashing.
  16. CyberVic

    CyberVic Well-Known Member VIP

  17. biaggiboy15

    biaggiboy15 New Member

    hey vic wut about a script that turned ur inertia dampeners on and ur beacon or antenna on and up in range when u exited ur ship if the program block is turned on. im curious because ive lost many ships from getting kicked while coasting to other asteroids. it would be nice to have a kind of safety feature if flying through space without ur inertia dampeners on in the event of a game crash or server crash. we lost 2 ship today and now they are coasting through space
  18. CyberVic

    CyberVic Well-Known Member VIP

    There is no way currently to check if someone is piloting the ship.

    I do have a half written script to do stuff like this if / when they add the ability to detect that from the API.