Giter VIP home page Giter VIP logo

scpsl-itemspawner's Introduction

SCPSL-ItemSpawner

Latest release

To get the latest release, head over to https://github.com/RogerFK/SMOD2-ItemSpawner/releases/latest.

Usage

Video of me explaining it with my bad spaniard accent: https://www.youtube.com/watch?v=OYSSO26tmHA

You can choose to directly use the files, or you can use the commands below, in the commands section (if you're lazy, it's in this link)

items.txt file format:

RoomType:ItemType1, ItemType2...:Probability:Vector3:Rotation where RoomType comes from this link and ItemTypes from this link; probability takes a float number (75.48 for example); and both Vector3 and Rotation take things like 5,1.48,10:1,0,0

If you're using the ItemManager version, to use the items you must type "IM_XXX" where XXX is the ID of the Custom Item you want to spawn. That is, instead of typing something like IS NL E 1 items=COM15 you'd have to do IS NL E 1 items=IM:101 for the HS8 shotgun, for example; same goes for the .txt file, COIN, IM_101, IM_105 will have a 33% probability of spawning any of these.

Commands

Server console

The command to fetch a new position is newpos. I felt this was the best way because you can easily bind it to any key by doing cmdbind <key> .newpos so you can choose a bunch of spawnpoints easily. These get added to the "NEWLIST", which you can access via the R.A.

Remote Admin Console

You can type ITEMSPAWNER HELP [COMMAND] for more info about one specific command, or just the command without any other argument. <> means it's mandatory, [] is optional

  • ITEMSPAWNER ADDCOINS <RoomType> - Adds the coin spawned through the newpos command to a list you can later modify
  • ITEMSPAWNER CLEARLIST - Removes all the spawned coins positions that haven't been added to the NEWLIST
  • ITEMSPAWNER NEWLIST [EDIT/REMOVE/CONFIRM] <ID> <Parameters> - Displays the current list that will be added to the items.txt file, which you can modify
  • ITEMSPAWNER SPAWNLIST [EDIT/REMOVE] - Displays or modifies the current spawnlist, so you can modify it
  • ITEMSPAWNER ROOMLIST - Displays every RoomType in the game. Non-unique rooms like hallways will probably not work, tho.

Configs

Config Option Value Type Default Value Description
is_enable bool true Enables/disables this plugin completely
is_allowedranks Rank list owner, admin Who can use this plugin, you shouldn't really give this to mods, tbh, instead tell them to download this plugin and tell them to do it in their machines
is_verbose bool true Prints info in the console about spawned stuff and some other stuff
is_use_global_items bool true Reads from items.txt globally or in a per-server basis (or using the items.txt inside the appdata folder if you're hosting one server)

scpsl-itemspawner's People

Contributors

horyu1234 avatar malicean avatar rogerfk avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

horyu1234

scpsl-itemspawner's Issues

is_use_global_items: false - does not work as it should

[11:19:45] >>> itemspawner spawnlist                                                                                                                
[11:19:45] Sending request to SCP: Secret Laboratory...                                                                                             
[11:19:45] List:                                                                                                                                    

1:
 - Roomtype:NUKE
 - Items: MICROHID
 - Probability: 100
 - Position: (-0,05, 402,46, 3,52)
 - Rotation: (1, 0, 0)
2:
 - Roomtype:INTERCOM
 - Items: MTF_LIEUTENANT_KEYCARD, COIN
 - Probability: 100
 - Position: (-9,212725, -6,839905, -3,935197)
 - Rotation: (0,5, 0, 0)
[11:19:50] >>> itemspawner spawnlist remove 1                                                                                                       
[11:19:50] Sending request to SCP: Secret Laboratory...                                                                                             
[11:19:50] Command ITEMSPAWNER failed to excute and threw an exception:                                                                             
Could not find file "/home/scp/light/items.txt"
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <f2e6809acb14476a81f399aeb800f8f2>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize, System.Boolean checkHost) [0x00067] in <f2e6809acb14476a81f399aeb800f8f2>:0 
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding) [0x00009] in <f2e6809acb14476a81f399aeb800f8f2>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string,System.Text.Encoding)
  at System.IO.File.ReadAllLines (System.String path, System.Text.Encoding encoding) [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 
  at FileManager.ReadAllLines (System.String path) [0x00006] in <33fa9b06c3754dfb9528112b6b71a6ef>:0 
  at ItemSpawner.ItemsFileManager.DelSpawnInfo (ItemSpawner.SpawnInfo spawnInfo) [0x00000] in <5c7c09aa392f477ea1ba8ddc86df1057>:0 
  at ItemSpawner.ItemSpawnerCommand.OnCall (Smod2.Commands.ICommandSender sender, System.String[] args) [0x00e1a] in <5c7c09aa392f477ea1ba8ddc86df1057>:0 
  at GameConsole.Console.CallCommand (Smod2.Commands.ICommandSender sender, System.String command, System.String[] args) [0x00031] in <33fa9b06c3754dfb9528112b6b71a6ef>:0 

He created the items.txt file inside the server config (located in /home/scp/light/config/items.txt), and while he is trying to delete the item in a non-existing file (/home/scp/light/items.txt)

Ammo not spawn

Hi,
DROPPED_9, DROPPED_7, DROPPED_5, doesn't spawn with your plugin, is it normal ?
Thank you,
Gaby

Command IS failed to excute and threw an exception

[10:58:57] >>> is                                                                                                                                   
[10:58:57] Sending request to SCP: Secret Laboratory...                                                                                             
[10:58:57] Command IS failed to excute and threw an exception:                                                                                      
Could not load file or assembly 'ItemManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
  at GameConsole.Console.CallCommand (Smod2.Commands.ICommandSender sender, System.String command, System.String[] args) [0x00031] in <33fa9b06c3754dfb9528112b6b71a6ef>:0 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.